/* Katakata (Lenewt): brand tokens from lenewt.com (Roboto, navy, indigo, green). Light only, like lenewt.com. */
:root {
    --navy: #00072d;
    --navy-2: #13213a;
    --indigo: #6673EF;
    --indigo-deep: #454D9B;
    --green: #26885D;
    --green-soft: #6CBD99;
    --green-pale: #B6EED5;
    --cyan: #19a4a5;

    --bg: #ffffff;
    --bg-tint: #f5f6ff;
    --surface: #ffffff;
    --border: #e6e8f5;
    --text: #1d2233;
    --text-muted: #555b73;
    --heading: #00072d;
    --accent-text: #454D9B;
    --link: #26885D;
    --ok: #1f7a52;
    --warn: #9a6400;
    --ko: #b23a48;
    --us-bg: #eef0ff;
    --ime: #26885D;
    --display: 'Roboto Flex', 'Roboto', system-ui, sans-serif;
    --key-top: #ffffff;
    --key-skirt: #d3d7f0;
    --key-legend: #454D9B;
    --shadow: 0 20px 50px rgba(70, 80, 155, 0.18);
    --radius: 12px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must win over display rules such as img { display: block }. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; }

img, video { max-width: 100%; display: block; }
a { color: var(--link); }
a:hover { color: var(--green-soft); }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

.visuallyHidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 0 1.6rem;
    font: inherit; font-weight: 500; text-decoration: none;
    border-radius: 6px; border: 2px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--green); color: #fff; box-shadow: rgba(99, 99, 99, .2) 0 2px 8px; }
.btn--primary:hover { background: var(--green-soft); color: var(--navy); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--accent { background: var(--green-soft); color: var(--navy); font-weight: 700; }
.btn--accent:hover { background: #fff; color: var(--indigo-deep); }
.btn--small { min-height: 40px; padding: 0 1.1rem; font-size: .92rem; }

/* Header */
.siteHeader {
    position: sticky; top: 0; z-index: 20;
    background: rgba(0, 7, 45, .92);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.headerInner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; white-space: nowrap; }
.brand:hover { color: #fff; }
/* The logo files carry 24/18 units of padding around the lettering: pull the image left so the
   letters, not the padding, line up with the page edge. */
.brandLogo { display: block; height: 34px; width: auto; margin-left: -5px; }
.siteNav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.siteNav a { color: var(--green-soft); text-decoration: none; font-size: .9rem; font-weight: 700; }
.siteNav a:hover { color: var(--green-pale); }
/* Two groups: green jumps to home-page sections, a divider, then white links to other pages. */
.siteNav__sep { flex: none; width: 1px; height: 1.1rem; background: rgba(255,255,255,.25); }
.siteNav a.siteNav__page { color: #fff; }
.siteNav a.siteNav__page:hover { color: var(--green-pale); }
.siteNav a.siteNav__page[aria-current="page"] {
    text-decoration: underline; text-decoration-color: var(--green-soft);
    text-decoration-thickness: 2px; text-underline-offset: 7px;
}

/* Hero */
.hero {
    background: var(--navy);
    color: #fff;
    padding: 4.5rem 0 3rem;
}
/* One sentence per line, so "35 languages" never splits across lines. */
.heroLine { display: block; }
.heroGrid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.hero h1 {
    margin: 0 0 2rem; max-width: 22ch;
    font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 720; font-stretch: 103%;
    line-height: 1.06; letter-spacing: -.02em;
    text-wrap: balance;
}
.heroLead { margin: 0 0 2rem; font-size: 1.12rem; color: rgba(255,255,255,.85); max-width: 36rem; }
.heroCta { display: flex; flex-wrap: wrap; gap: 1rem; }
.heroMedia { margin: 0; }
.heroMedia video { width: 100%; border-radius: 16px; box-shadow: 0 30px 70px rgba(0,0,0,.45); }
.heroMedia figcaption { margin-top: .75rem; font-size: .88rem; color: rgba(255,255,255,.65); }

.keyRow {
    list-style: none; margin: 3.5rem 0 0; padding: 12px;
    display: grid; grid-template-columns: 1fr 1.2fr 1fr 1.1fr 1.5fr; gap: 12px;
    background: #0d1543; border: 1px solid rgba(255,255,255,.07); border-radius: 18px;
}
.keyRow .keycap {
    display: flex; flex-direction: column; justify-content: space-between; gap: 1.1rem;
    min-height: 100px; padding: 1rem 1.15rem .95rem;
    background: #26306b; border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 5px 0 #070c33, 0 8px 18px rgba(0,0,0,.35);
}
.keyLegend {
    font-family: var(--display); font-weight: 700;
    font-size: 1.55rem; line-height: 1; letter-spacing: -.015em; color: #fff; white-space: nowrap;
}
.keySub { font-size: .9rem; line-height: 1.3; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* One keystroke per key on load, like someone typing the figures in. */
.keyRow.is-typing .keycap { animation: keyPress .32s cubic-bezier(.3, .7, .4, 1) both; animation-delay: var(--press-at, 0ms); }
@keyframes keyPress {
    0%, 100% { transform: none; }
    35% {
        transform: translateY(4px); background: #454D9B;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 0 #000318, 0 2px 4px rgba(0,0,0,.4);
    }
}
@media (prefers-reduced-motion: reduce) { .keyRow.is-typing .keycap { animation: none; } }

/* Sections */
.section { padding: 5rem 0; scroll-margin-top: 64px; }
.section--tint { background: var(--bg-tint); }
.sectionTitle {
    margin: 0 0 1rem; color: var(--heading); max-width: 34ch;
    font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12;
    font-weight: 700; letter-spacing: -.012em;
    border-left: 4px solid var(--green-soft); padding-left: .85rem;
    text-wrap: balance;
}
.sectionLead { margin: 0 0 2.5rem; max-width: 50rem; font-size: 1.08rem; color: var(--text-muted); }
.subTitle { margin: 0 0 .9rem; color: var(--accent-text); font-size: 1.2rem; text-align: left; font-weight: 700; }
.note { color: var(--text-muted); font-size: .95rem; margin: 1.5rem 0 0; }

/* Cards */
/* Pictograms: same treatment as the service icons on lenewt.com */
.itemHead { display: flex; align-items: center; gap: .9rem; min-height: 48px; margin-bottom: 1rem; }
.problem .itemHead h3, .pillar .itemHead h3 { margin: 0; }
.pictogram {
    flex: none; width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--indigo), var(--indigo-deep)); color: #fff;
}
.pictogram svg { width: 26px; height: 26px; }
.problem .itemHead { flex-direction: column; align-items: flex-start; gap: 1.1rem; }

.problemGrid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.problem { padding: 1.9rem 2rem 2.1rem; }
.problem + .problem { border-left: 1px solid var(--border); }
.problem h3 { margin: 0 0 .7rem; color: var(--heading); font-size: 1.2rem; line-height: 1.25; font-weight: 700; }
.problem p { margin: 0; color: var(--text-muted); }
.cardGrid { display: grid; gap: 1.25rem; }
.cardGrid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.6rem; transition: border-color .2s, transform .2s;
}
.card h3 { margin: 0 0 .6rem; color: var(--accent-text); font-size: 1.18rem; line-height: 1.3; }
.card p { margin: 0; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.pillar {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.6rem;
}
.pillar h3 { margin: 0 0 1rem; color: var(--heading); font-size: 1.25rem; line-height: 1.25; font-weight: 650; }
.proofList { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.proofList li { position: relative; padding-left: 1.5rem; font-size: .96rem; line-height: 1.5; }
.proofList li::before {
    content: ""; position: absolute; left: 0; top: .5em;
    width: 12px; height: 2px; background: var(--indigo);
}

/* Comparison */
.compareFilter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.compareFilterLabel { font-weight: 700; color: var(--heading); margin-right: .25rem; font-size: .95rem; }
.compareFilter button {
    font: inherit; font-size: .9rem; cursor: pointer;
    padding: .45rem .9rem; border-radius: 999px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    transition: background-color .2s, border-color .2s, color .2s;
}
.compareFilter button:hover { border-color: var(--indigo); }
.compareFilter button[aria-pressed="true"] { background: var(--indigo-deep); color: #fff; border-color: var(--indigo-deep); }
.compareSwitch {
    margin: 0 0 1.25rem; padding: 1rem 1.25rem; border-radius: 10px;
    background: var(--us-bg); border: 1px solid var(--border); max-width: 60rem;
}

.tableScroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tableScroll:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
.compareTable { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .93rem; }
.compareTable th, .compareTable td { padding: .95rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.45; }
.compareTable tbody tr:last-child th, .compareTable tbody tr:last-child td { border-bottom: 0; }
.compareTable thead th { color: var(--heading); font-size: .92rem; background: var(--bg-tint); }
.compareTable thead th small { display: block; font-weight: 400; color: var(--text-muted); font-size: .8rem; }
.compareTable tbody th { color: var(--heading); font-weight: 700; width: 17%; }
.compareTable .us { background: var(--us-bg); }
.compareTable thead th.us { background: var(--indigo-deep); color: #fff; }
.compareTable .hl { box-shadow: inset 0 0 0 9999px rgba(255, 196, 0, .10); }
.compareTable thead th.hl { box-shadow: inset 0 0 0 9999px rgba(255, 196, 0, .22); }
.compareTable .dim { opacity: .45; }
.ok, .warn, .ko, .na { font-weight: 700; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.ko { color: var(--ko); }
.na { color: var(--text-muted); }
.footnote { font-size: .85rem; color: var(--text-muted); margin: .75rem 0 0; }

/* CJK edge section (always dark, like the hero) */
.section--deep {
    background:
        radial-gradient(900px 420px at 100% 0%, rgba(102,115,239,.30), transparent 60%),
        radial-gradient(700px 380px at 0% 100%, rgba(25,164,165,.20), transparent 60%),
        var(--navy);
    color: rgba(255,255,255,.88);
}
.sectionTitle--onDark { color: #fff; }
.sectionLead--onDark { color: rgba(255,255,255,.75); }
.cjkGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cjkCard {
    display: flex; flex-direction: column;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius); overflow: hidden; cursor: pointer;
    transition: border-color .2s, transform .2s;
}
.cjkCard:hover { border-color: var(--green-soft); }
.cjkMedia { position: relative; background: #14223b; display: flex; align-items: center; }
.cjkMedia video, .cjkMedia img { width: 100%; aspect-ratio: 9 / 5; object-fit: contain; }
.cjkCard:has(video) .cjkMedia::after {
    content: "▶"; position: absolute; right: 12px; bottom: 12px;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: .8rem;
    background: rgba(255,255,255,.9); color: var(--indigo-deep); transition: opacity .2s;
}
.cjkCard.playing .cjkMedia::after { opacity: 0; }
.cjkBody { padding: 1.4rem 1.5rem 1.6rem; }
.cjkGlyph { margin: 0; font-size: 1.6rem; font-weight: 700; color: var(--green-soft); line-height: 1.2; }
.cjkBody h3 { margin: .2rem 0 .3rem; color: #fff; font-size: 1.3rem; }
.cjkMethods { margin: 0 0 1rem; color: #a8b0ff; font-weight: 500; font-size: .92rem; }
.proofList--onDark li { color: rgba(255,255,255,.85); }
.proofList--onDark li::before { background: var(--green-soft); }
.cjkShared {
    margin-top: 2rem; padding: 1.5rem 1.75rem; border-radius: var(--radius);
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 1.5rem 2.5rem; align-items: center;
}
.cjkStat { display: flex; flex-direction: column; }
.cjkStatNum { font-family: var(--display); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; color: #fff; white-space: nowrap; }
.cjkStatLabel { font-size: .85rem; color: var(--green-soft); }
.cjkSharedNote { margin: 0; font-size: .9rem; color: rgba(255,255,255,.7); }
.trustNote { margin: .6rem 0 0; font-size: .78rem; color: rgba(255,255,255,.55); }


/* Languages */
.langTiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.langTile {
    font: inherit; color: var(--text); cursor: pointer; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem;
    padding: 1.3rem .75rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    transition: border-color .2s, transform .2s, background-color .2s;
}
.langTile:hover { border-color: var(--indigo); transform: translateY(-2px); color: var(--text); }
.langTile.active { border-color: var(--indigo); background: var(--us-bg); }
.langTile--ime .langGlyph { color: var(--ime); }
.langTile--more { border-style: dashed; }
.langGlyph { font-size: 2rem; font-weight: 700; color: var(--indigo); line-height: 1.2; }
.langName { font-weight: 700; color: var(--heading); }
.langCount { font-size: .8rem; color: var(--text-muted); }
.langPreview { margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1.5rem; }
.langPreview[hidden] { display: none; }
.langShot { margin: 0; min-width: 0; }
/* Every screenshot at one height, whatever its proportions, so pairs line up and tabs don't jump. */
.langShot img { height: min(300px, calc((100vw - 80px) / 3.7)); width: auto; max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.langShot figcaption { margin-top: .6rem; font-size: .9rem; font-weight: 500; color: var(--text-muted); }

/* Modes and themes */
.modeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.modeGrid figure, .themeGrid figure { margin: 0; }
.modeGrid img, .themeGrid img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.modeGrid figcaption, .themeGrid figcaption { margin-top: .6rem; font-weight: 700; color: var(--heading); font-size: .95rem; }
.themeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* Engineers */
.engGrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.snippet {
    margin: 0; padding: 1.4rem 1.5rem; overflow-x: auto;
    background: var(--navy); color: #e8ebff; border-radius: var(--radius);
    font: 400 .9rem/1.6 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}
.snippet .kw { color: #c792ea; }
.snippet .ty { color: #82aaff; }
.snippet .pr { color: #6CBD99; }
.snippet .st { color: #f0b552; }
.snippet .va { color: #ff9cac; }
.specTable { width: 100%; border-collapse: collapse; font-size: .93rem; }
.specTable th, .specTable td { padding: .7rem .5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.specTable th { color: var(--heading); width: 32%; }

/* Evaluate */
.evaluate {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-deep) 100%);
    color: #fff; border-radius: 16px; padding: 2.75rem;
}
.evaluate h2 { margin: 0 0 .6rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.evaluateLead { margin: 0 0 1.75rem; max-width: 52rem; color: rgba(255,255,255,.92); }
.steps { list-style: none; counter-reset: step; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.steps li {
    counter-increment: step; position: relative;
    background: rgba(255,255,255,.1); border-radius: 10px;
    padding: 1rem 1rem 1rem 3.1rem; line-height: 1.45; color: rgba(255,255,255,.9); font-size: .95rem;
}
.steps li::before {
    content: counter(step); position: absolute; left: 1rem; top: 1rem;
    width: 1.5rem; height: 1.5rem; border-radius: 50%;
    background: var(--green-soft); color: var(--navy); font-weight: 700; font-size: .85rem;
    display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; color: #fff; margin-bottom: .2rem; }
.evaluateActions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.evaluateLink { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.evaluateLink:hover { color: var(--green-pale); }
.evaluateLink--dark { color: var(--accent-text); }
.evaluateLink--dark:hover { color: var(--green); }

/* Evaluation request form (fields as in lenewt.com's quote form) */
.siteForm {
    display: grid; gap: 1.1rem;
    background: #fff; color: var(--text); border-radius: 12px;
    padding: 2rem; box-shadow: 0 14px 40px rgba(0, 7, 45, .25);
}
.siteFormTitle { margin: 0; color: var(--heading); font-size: 1.25rem; }
.formRow { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.formField { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.formField label, .evalMarkets legend { font-weight: 700; color: var(--heading); font-size: .93rem; }
.formOptional { font-weight: 400; color: var(--text-muted); font-size: .85rem; }
.siteForm input[type="text"], .siteForm input[type="email"], .siteForm input[type="tel"],
.siteForm select, .siteForm textarea {
    width: 100%; padding: .65rem .8rem;
    border: 1px solid #d4d8ee; border-radius: 8px;
    font: inherit; color: var(--text); background: #fff;
}
.siteForm textarea { resize: vertical; }
.siteForm input:focus-visible, .siteForm select:focus-visible, .siteForm textarea:focus-visible {
    outline: 2px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo);
}
.siteForm .formField [aria-invalid="true"] { border-color: var(--ko); }
.evalMarkets { margin: 0; padding: 0; border: 0; }
.evalMarkets legend { padding: 0; margin-bottom: .35rem; }
.evalMarketGrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem .8rem;
    padding: .8rem 1rem; border: 1px solid #d4d8ee; border-radius: 8px;
}
[data-required-group][aria-invalid="true"] .evalMarketGrid { border-color: var(--ko); }
.evalMarketGrid label, .formConsent { display: flex; align-items: flex-start; gap: .5rem; font-size: .92rem; font-weight: 400; color: var(--text); cursor: pointer; }
.evalMarketGrid input, .formConsent input { margin: .25rem 0 0; accent-color: var(--green); flex: none; }
.formConsent { font-size: .85rem; line-height: 1.45; color: var(--text-muted); }
.formConsent a { color: var(--accent-text); }
.hpField { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.formMessage { padding: .85rem 1rem; border-radius: 8px; font-weight: 500; }
.formMessage--ok { background: #e6f5ee; color: #1f6b46; border: 1px solid var(--green-soft); }
.formMessage--error { background: #fde8e8; color: #8b1c1c; border: 1px solid #e8a0a0; }
.siteForm .btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Contact page: the form on the left, where-else-to-go cards on the right. */
.contactLayout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.contactPage .siteForm { margin: 0; border: 1px solid var(--border); box-shadow: var(--shadow); }
.contactAside { display: grid; gap: 1.25rem; }
.contactCard { display: grid; gap: .6rem; text-decoration: none; color: var(--text); }
.contactCard .itemHead { margin-bottom: .2rem; }
.contactCard:hover { border-color: var(--green-soft); transform: translateY(-2px); }
.contactCardTitle { color: var(--heading); font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.contactCardText { color: var(--text-muted); font-size: .95rem; line-height: 1.55; }
.contactCardLink { color: var(--link); font-weight: 700; font-size: .95rem; }
.siteNav a[aria-current="page"], .siteFooter nav a[aria-current="page"] { color: #fff; }
@media (max-width: 960px) {
    .contactLayout { grid-template-columns: 1fr; }
    .contactAside { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* FAQ */
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0 1.25rem; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 700; color: var(--heading); list-style: none; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: .85rem; font-size: 1.3rem; color: var(--indigo); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1.1rem; color: var(--text-muted); }

/* Footer */
.siteFooter { background: var(--navy); color: rgba(255,255,255,.75); padding: 3rem 0; font-size: .92rem; }
.footerInner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: start; }
.footerProduct { display: grid; gap: 1rem; justify-items: start; }
.footerMaker { display: grid; gap: .4rem; justify-items: start; font-size: .85rem; color: rgba(255,255,255,.6); }
.footerMakerLogo img { display: block; height: 36px; width: auto; }
.legal { grid-column: 1 / -1; }
.footerInner p { margin: 0; }
.siteFooter nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.siteFooter nav a { color: var(--green-soft); text-decoration: none; font-weight: 700; }
.siteFooter nav a:hover { color: var(--green-pale); }
.footerBrand { display: inline-block; }
.footerBrand .kk-wordmark { display: block; height: 46px; width: auto; margin-left: -7px; }

.legal { font-size: .8rem; color: rgba(255,255,255,.5); }

/* Responsive */
@media (max-width: 1024px) {
    .footerInner { grid-template-columns: minmax(0, 1fr); }
    .heroGrid { grid-template-columns: 1fr; gap: 2.5rem; }
    .keyRow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .keyRow .keycap--space { grid-column: span 2; }
    .problemGrid { grid-template-columns: minmax(0, 1fr); }
    .problem + .problem { border-left: 0; border-top: 1px solid var(--border); }
    .pillars, .cardGrid--3, .modeGrid, .themeGrid { grid-template-columns: repeat(2, 1fr); }
    .cardGrid--3 > :last-child:nth-child(odd),
    .themeGrid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .cjkGrid { grid-template-columns: 1fr; }
    .cjkCard { flex-direction: row; }
    .cjkMedia { flex: 0 0 44%; }
    .cjkShared { grid-template-columns: repeat(3, 1fr); }
    .cjkSharedNote { grid-column: 1 / -1; }
    .langTiles { grid-template-columns: repeat(3, 1fr); }
    .langPreview { flex-direction: column; gap: 1.25rem; }
    /* Stacked: same height for every shot, set by the wide (9:4) screenshots at full width. */
    .langShot img { height: calc(min(100vw - 48px, 640px) / 2.25); width: auto; }
    .engGrid { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .wrap { padding: 0 16px; }
    .brandLogo { height: 30px; margin-left: -4px; }
    .hero { padding: 3rem 0 2rem; }
    .heroCta .btn { width: 100%; }
    .keyRow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; margin-top: 2.5rem; }
    .keyRow .keycap { min-height: 86px; padding: .8rem .9rem; }
    .keySub { white-space: normal; font-size: .85rem; }
    .keyRow .keycap--space { grid-column: 1 / -1; }
    .keyLegend { font-size: 1.35rem; }
    .pictogram { width: 44px; height: 44px; }
    .pictogram svg { width: 24px; height: 24px; }
    .itemHead { min-height: 44px; }
    .hero h1 { margin-bottom: 1.5rem; }
    .section { padding: 3.5rem 0; }
    .pillars, .cardGrid--3, .modeGrid, .themeGrid, .steps { grid-template-columns: 1fr; }
    .cjkCard { flex-direction: column; }
    .cjkMedia { flex: none; }
    .cjkShared { grid-template-columns: 1fr 1fr; padding: 1.25rem; }
    .cjkStatNum { font-size: 1.35rem; }
    .langTiles { grid-template-columns: repeat(2, 1fr); }
    .evaluate { padding: 1.75rem 1.25rem; }
    .evaluateActions .btn { width: 100%; }
    .siteForm { padding: 1.25rem; margin: 0 -.5rem; }
    .formRow { grid-template-columns: 1fr; }
    .evalMarketGrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
    .headerInner { gap: .75rem; }
    .headerCta { padding: 0 .8rem; font-size: .85rem; }
}

/* Custom vocabulary demo */
.vocabGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3rem; align-items: center; }
.vocabText .sectionLead { margin-bottom: 1.5rem; }
.vocabControls { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.75rem 0 1rem; }
.vocabMode, .vocabReplay {
    font: inherit; font-size: .92rem; cursor: pointer; padding: .55rem 1rem; border-radius: 999px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border);
    transition: background-color .2s, border-color .2s, color .2s;
}
.vocabMode:hover, .vocabReplay:hover { border-color: var(--indigo); }
.vocabMode[aria-pressed="true"] { background: var(--indigo-deep); border-color: var(--indigo-deep); color: #fff; }
.vocabReplay { background: transparent; color: var(--accent-text); font-weight: 700; }
.vocabScore { margin: 0; font-size: .95rem; color: var(--text-muted); }
.vocabScore strong { color: var(--heading); }

.device { margin: 0; }
.deviceScreen {
    background: #0e1830; border-radius: 22px; padding: 14px;
    border: 10px solid #2a3142; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.05);
    color: #e6ebff;
}
.deviceBar {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    font-size: .8rem; color: rgba(255,255,255,.7); padding: 2px 4px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.deviceMode {
    font-weight: 700; color: var(--navy); background: var(--green-soft);
    padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; letter-spacing: .03em;
    transition: background-color .2s;
}
#vocabulary:not(.is-medical) .deviceMode { background: #c9cee6; }
.deviceForm { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1rem; align-items: center; padding: 14px 6px 16px; }
.deviceLabel { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; }
.deviceValue { font-size: .95rem; }
.deviceField {
    min-height: 44px; display: block; line-height: 1.5; padding: 0 12px; border-radius: 8px;
    background: #ffffff; color: #0b1024; font-size: 1.05rem; font-weight: 500;
    border: 2px solid var(--green-soft); white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 8px; padding-bottom: 8px;
}
.deviceField span:first-child { display: inline; }
.caret { display: inline-block; width: 2px; height: 1.25em; background: var(--indigo-deep); margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Colours are the shipped dark theme (lnvk-assets data/themes/dark.json), so the demo types like the real keyboard. */
.vkb { background: #132538; border-radius: 12px; padding: 8px; }
.vkbCandidates { display: flex; gap: 6px; min-height: 40px; align-items: stretch; margin-bottom: 8px; }
.vkbCand {
    flex: 1 1 0; min-width: 0; font-size: .95rem; color: #F9F8F7; text-align: center; user-select: none;
    background: transparent; border: 0; border-radius: 8px; padding: 6px 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background-color .15s;
}
.vkbCand + .vkbCand { border-left: 1px solid rgba(255,255,255,.12); border-radius: 0 8px 8px 0; }
.vkbCand.is-picking { background: #23A4DD; border-radius: 8px; }
.vkbKeys { display: grid; gap: 6px; }
.vkbRow { display: flex; gap: 5px; justify-content: center; }
.vkbKey {
    flex: 1 1 0; min-width: 0; height: 42px; font-size: 1rem; color: #F9F8F7;
    display: flex; align-items: center; justify-content: center; user-select: none;
    background: #1E3550; border: 0; border-radius: 7px; padding: 0;
    transition: background-color .1s;
}
/* Real keys only change colour when pressed (keyPressedBackground), they don't grow. */
.vkbKey.is-pressed { background: #23A4DD; }
.vkbRow:nth-child(2) { padding: 0 5%; }
.vkbKey--fn { background: #454D9B; font-size: .85rem; }
.vkbKey--wide { flex: 1.6 1 0; }
.vkbKey--space { flex: 5 1 0; }
.device figcaption { margin-top: .9rem; font-size: .85rem; color: var(--text-muted); }
#vocabTaps { font-weight: 700; color: var(--heading); }

@media (max-width: 1024px) {
    .vocabGrid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .device { max-width: 620px; }
}
@media (max-width: 640px) {
    .deviceScreen { border-width: 6px; padding: 10px; border-radius: 16px; }
    .vkbKey { height: 38px; font-size: .9rem; }
    .vkbRow { gap: 4px; }
    .vkbCand { font-size: .85rem; padding: 6px 4px; }
}
.vocabDomains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1.75rem 0 0; }
@media (max-width: 640px) { .vocabDomains { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vocabDomain {
    font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; padding: .55rem .5rem; border-radius: 8px; line-height: 1.25;
    background: transparent; color: var(--accent-text); border: 2px solid var(--border);
    transition: border-color .2s, background-color .2s, color .2s;
}
.vocabDomain:hover { border-color: var(--indigo); }
.vocabDomain[aria-pressed="true"] { border-color: var(--green-soft); background: var(--surface); color: var(--heading); }
.vocabDomains + .vocabControls { margin-top: .75rem; }

/* ===== Phone and tablet ===== */

/* Below 1080px the menu (six section jumps, two pages) no longer fits on one line with room
   to breathe, in English or French: it moves into a burger menu that drops down under the header.
   Keep in step with the matchMedia query in main.js. */
.menuToggle { display: none; }
@media (max-width: 1080px) {
    .siteHeader .headerInner { position: relative; }
    .menuToggle {
        display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
        width: 44px; height: 44px; margin-right: -10px; padding: 0 10px;
        background: none; border: 0; cursor: pointer;
    }
    .menuToggle span { display: block; height: 2px; background: #fff; border-radius: 1px; transition: transform .2s, opacity .2s; }
    .menuToggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menuToggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menuToggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .headerCta { margin-left: auto; }
    .siteNav {
        display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
        flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 24px 1.25rem;
        background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 18px 30px rgba(0, 7, 45, .35);
    }
    .siteHeader.menuOpen .siteNav { display: flex; }
    .siteNav a { font-size: 1.05rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.07); }
    .siteNav a:last-child { border-bottom: 0; }
    /* In the menu, the divider becomes a stronger rule between sections and pages. */
    .siteNav__sep { width: auto; height: 1px; margin: .5rem 0; background: rgba(255,255,255,.3); }
    .siteNav a:has(+ .siteNav__sep) { border-bottom: 0; }
    .siteNav a.siteNav__page[aria-current="page"] { text-underline-offset: 5px; }
    @media (prefers-reduced-motion: reduce) { .menuToggle span { transition: none; } }
}

@media (max-width: 1024px) {
    /* Vocabulary demo: show the device right after the intro, controls under it. */
    /* Vocabulary demo: controls sit right above the device, so changing product or mode
       never needs a scroll; the explanation follows the demo. */
    .vocabGrid { gap: 0; }
    .vocabText { display: contents; }
    .vocabText .sectionLead { margin-bottom: 1.5rem; }
    .vocabDomains { order: 1; margin-top: 0; }
    .vocabDomains + .vocabControls { order: 2; margin: .5rem 0 .9rem; }
    .device { order: 3; }
    .vocabScore { order: 4; margin-top: 1rem; }
    .vocabText .proofList { order: 5; margin-top: 1.75rem; }
}

@media (max-width: 640px) {
    .section { padding: 3rem 0; }
    .sectionLead { margin-bottom: 1.75rem; }

    /* Problem points: pictogram beside the heading, tighter padding. */
    .problem { padding: 1.25rem 1.25rem 1.4rem; }
    .problem .itemHead { flex-direction: row; align-items: center; gap: .85rem; margin-bottom: .7rem; }

    /* Long card groups become swipe rows; the next card peeks in to show there is more. */
    .pillars, .cjkGrid, .modeGrid, .themeGrid, .costGrid {
        display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%;
        gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
        margin: 0 -16px; padding: 4px 16px 14px; scroll-padding: 0 16px; scrollbar-width: thin;
    }
    .pillars > *, .cjkGrid > *, .modeGrid > *, .themeGrid > *, .costGrid > * { scroll-snap-align: start; min-width: 0; }
    .costGrid > :last-child:nth-child(odd), .themeGrid > :last-child:nth-child(odd) { grid-column: auto; }
    .pillar { padding: 1.25rem; }
    .cjkBody { padding: 1.1rem 1.1rem 1.25rem; }

    /* Language tiles: three compact columns. */
    .langTiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .langTile { padding: .8rem .35rem; }
    .langGlyph { font-size: 1.5rem; }
    .langName { font-size: .9rem; }
    .langCount { font-size: .72rem; line-height: 1.3; }

    /* Comparison: one card per criterion, Katakata against the option picked above. */
    .compareFilter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 1rem; padding: 0 16px 6px; scrollbar-width: none; }
    .compareFilter::-webkit-scrollbar { display: none; }
    .compareFilter button { white-space: nowrap; flex: none; }
    .compareFilterLabel { flex: none; }
    .tableScroll { overflow: visible; border: 0; background: none; border-radius: 0; }
    .compareTable, .compareTable tbody, .compareTable tr { display: block; min-width: 0; }
    .compareTable thead { display: none; }
    .compareTable tr {
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        padding: .9rem 1rem 1rem; margin-bottom: .75rem;
    }
    .compareTable tbody th { display: block; width: auto; padding: 0 0 .6rem; border: 0; font-size: 1.02rem; }
    .compareTable td { display: none; border: 0; padding: .6rem .75rem; border-radius: 8px; }
    .compareTable td.us, .compareTable td.hl { display: block; }
    .compareTable td.hl { margin-top: .5rem; }
    .compareTable td::before {
        content: attr(data-label); display: block; margin-bottom: .2rem;
        font-size: .78rem; font-weight: 700; color: var(--text-muted);
    }
    .compareTable td.us::before { color: var(--accent-text); }
    .compareTable .dim { opacity: 1; }

    /* Evaluation steps: a compact numbered list. */
    .steps { gap: .4rem; }
    .steps li { background: none; padding: .45rem 0 .45rem 2.3rem; }
    .steps li::before { left: 0; top: .5rem; }

    .snippet { font-size: .8rem; padding: 1.1rem 1.1rem; }

    .siteNav { padding-left: 16px; padding-right: 16px; }

    /* Compact demo controls: products in a 2x2 grid, then built-in / custom / replay on one row. */
    .vocabDomains { gap: .4rem; }
    .vocabDomain { padding: .45rem .4rem; font-size: .8rem; }
    .vocabDomains + .vocabControls { display: grid; grid-template-columns: 1fr 1fr auto; gap: .4rem; }
    .vocabMode, .vocabReplay { padding: .5rem .6rem; font-size: .8rem; line-height: 1.2; border-radius: 10px; }
}
