:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --surface-2: #f1ebe0;
  --ink: #1d2426;
  --muted: #5b6563;
  --line: #e2dacb;
  --brand: #3a3738;
  --brand-ink: #ffffff;
  --accent: #c4313b;
  --state: #1f7a6d;
  --you: #d98e3f;
  --wa: #1f8f4e;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 6px 20px rgb(15 61 62 / 7%);
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1615;
    --surface: #152120;
    --surface-2: #1a2928;
    --ink: #e8eee9;
    --muted: #9fb0ab;
    --line: #26393a;
    --brand: #e6e2e3;
    --brand-ink: #0e1615;
    --accent: #f0636c;
    --state: #4fb8a8;
    --you: #e9a55c;
    --wa: #3cc275;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, .h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3, .h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

.banner { background: var(--brand); color: var(--brand-ink); font-size: .92rem; }
.banner .wrap { padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.banner a { color: inherit; font-weight: 600; }
.machine { background: var(--surface-2); font-size: .85rem; color: var(--muted); }
.machine .wrap { padding: 6px 16px; }
.banner-after { background: var(--surface-2); color: var(--ink); }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: block; text-decoration: none; margin-right: auto; line-height: 0; }
.logo img { height: 34px; width: auto; }
@media (prefers-color-scheme: dark) { .logo { background: #fff; padding: 6px 10px; border-radius: 8px; } }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; order: 3; width: 100%; padding-bottom: 8px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang a, .lang span { padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.lang span { background: var(--brand); color: var(--brand-ink); }
@media (min-width: 760px) {
  .nav { order: 0; width: auto; padding: 0; margin-right: 8px; }
}
/* On a phone the header runs to three rows, so it scrolls away and everything in it is a full 44px to tap.
   Written as the desktop rule negated, so no zoomed or fractional width falls between the two. */
@media not all and (min-width: 760px) {
  .site-header { position: static; }
  .logo { display: flex; align-items: center; min-height: 44px; }
  .nav { gap: 0 16px; padding-bottom: 4px; }
  .nav a, .lang a, .lang span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  /* The same 44px for what stands alone below the header. A link inside a sentence keeps its line. */
  .machine a, .site-footer a, .linkish { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
}

.hero { padding: 40px 0 32px; }
.hero-slim { padding-bottom: 8px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero { padding: 64px 0 48px; } }
.hero-media { position: relative; }
/* A tick rises from the tablet's bubble, which sits at the same spot in all six pictures.
   Where a language has a walk-home clip, it lies over the picture and shows only once it
   plays, so the picture is what loads, and what stays if the clip never starts. */
.hero-ticks { position: absolute; left: 22.2%; top: 46.9%; width: 5%; aspect-ratio: 1; pointer-events: none; }
.hero-ticks i { position: absolute; inset: 0; border-radius: 22%; opacity: 0; background: #2fae66 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4 10-11' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 76% no-repeat; }
/* The ticks never end, so they move only once the script has shown the button that pauses them. */
.hero-media.live .hero-ticks i { animation: tick-rise 4.5s ease-out infinite; }
/* The delays carry the same prefix: the shorthand above resets the delay, and a shorter selector would lose to it. */
.hero-media.live .hero-ticks i:nth-child(2) { animation-delay: 1.5s; }
.hero-media.live .hero-ticks i:nth-child(3) { animation-delay: 3s; }
@keyframes tick-rise {
  0% { opacity: 0; transform: translateY(0) scale(.7); }
  12% { opacity: 1; transform: translateY(-30%) scale(1); }
  70% { opacity: .85; }
  100% { opacity: 0; transform: translateY(-420%) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .hero-ticks { display: none; } }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); opacity: 0; pointer-events: none; }
.hero-media.walking .hero-video { opacity: 1; }
/* The ticks never end and the clip runs past five seconds, so one button pauses both. */
.hero-media.paused .hero-ticks i { animation-play-state: paused; }
.hero-pause { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 2px rgb(255 255 255 / .85); background: rgb(0 0 0 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 6v12M16 6v12' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 50% no-repeat; }
.hero-pause[aria-pressed="true"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l9 6-9 6z' fill='%23fff'/%3E%3C/svg%3E"); }
/* The site's red focus ring is lost against the pots and cobbles under the button, so it gets white on dark. */
.hero-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px rgb(0 0 0 / .7); }
.hero-img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.note { font-size: .9rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 650; text-decoration: none; border: 2px solid var(--accent); cursor: pointer; font-size: 1rem; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-wa { background: var(--wa); border-color: var(--wa); }
@media (prefers-color-scheme: dark) { .btn { color: var(--brand-ink); } .btn-ghost { color: var(--ink); } }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.section { padding: 48px 0; }
.section.alt { background: var(--surface-2); }
.grid-3, .grid-2 { display: grid; gap: 16px; margin-top: 20px; }
@media (min-width: 760px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
/* The door drawing runs to the card's edges, so it undoes the card's padding. Its colours
   are the page's own, so it follows light and dark. */
.door-art { margin: -22px -22px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.door-art svg { display: block; width: 100%; height: auto; }
/* The whole door card is the link: the title's anchor stretches over it. */
.door { position: relative; }
.door-link { color: inherit; text-decoration: none; }
.door-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.door:hover { border-color: var(--accent); }
.door-link:focus-visible { outline: none; }
.door-link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.da-s { fill: var(--surface); stroke: var(--line); }
.da-m { fill: var(--muted); opacity: .3; }
.da-i { fill: none; stroke: var(--muted); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.da-over { fill: var(--surface); }
.da-a { fill: var(--accent); }
.da-top { stroke: var(--accent); stroke-width: 2; }
.da-w { fill: var(--wa); }
.da-g { fill: #fff; }
.da-ok { fill: #2fae66; }
.da-c { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.da-dim { opacity: .55; }
.da-dash { fill: var(--surface); stroke: var(--state); stroke-width: 2.5; stroke-dasharray: 7 6; }
.da-rd { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.da-pin, .da-msg, .da-tick { transform-box: fill-box; transform-origin: center; }
/* Each plays once and rests on its finished state: motion that starts by itself must end
   within five seconds or offer a pause (WCAG 2.2.2), and these have no pause. */
.da-pin { transform-origin: 50% 100%; animation: da-drop .6s ease-out .4s backwards; }
.da-msg { animation: da-pop .5s ease-out 1.1s backwards; }
.da-tick { animation: da-pop .5s ease-out .6s backwards; }
.da-t2 { animation-delay: 1.4s; }
.da-t3 { animation-delay: 2.2s; }
@keyframes da-drop { 0% { opacity: 0; transform: translateY(-16px); } }
@keyframes da-pop { 0% { opacity: 0; transform: scale(.6); } }
@media (prefers-reduced-motion: reduce) { .da-pin, .da-msg, .da-tick { animation: none; } }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.steps li { counter-increment: s; background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 10px; }

.tool label { display: block; font-weight: 600; margin: 0 0 14px; }
.tool output { float: right; font-variant-numeric: tabular-nums; color: var(--accent); }
.tool input[type="range"] { width: 100%; margin-top: 8px; accent-color: var(--accent); height: 32px; }
/* After the rule it overrides: the same selector earlier in the file would lose to it. */
@media not all and (min-width: 760px) { .tool input[type="range"] { height: 44px; } }
.tool .check { font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.tool .check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.stat { border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.stat span { display: block; font-size: .85rem; color: var(--muted); }
.stat strong { font-size: clamp(1.4rem, 5vw, 1.9rem); font-variant-numeric: tabular-nums; }
.stat-state strong { color: var(--state); }
.stat-you strong { color: var(--you); }
.big { font: 700 1.6rem var(--serif); margin: 8px 0 0; }

.chart { width: 100%; margin-top: 12px; overflow: visible; }
.chart text { fill: var(--muted); font: 12px var(--sans); }
.chart .axis { stroke: var(--line); }
.chart .state { fill: var(--state); }
.chart .you { fill: var(--you); }
.chart .mark { stroke: var(--ink); stroke-dasharray: 4 3; }
.chart .mark-label { fill: var(--ink); font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: .88rem; color: var(--muted); margin-top: 8px; }
.legend .swatch-state { background: var(--state); }
.legend .swatch-you { background: var(--you); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.facts { display: grid; gap: 12px; margin: 20px 0 32px; }
@media (min-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.facts dt { font-weight: 700; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--muted); }
.sources { padding-left: 20px; }

.phone { width: min(360px, 100%); margin: 0 auto; border-radius: 28px; padding: 14px; background: #0b141a; box-shadow: var(--shadow); }
.chat { min-height: 440px; border-radius: 18px; padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; background: #efe7dd; }
@media (prefers-color-scheme: dark) { .chat { background: #0b141a; } }
.msg { max-width: 82%; padding: 8px 11px; border-radius: 10px; font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; color: #111b21; background: #fff; box-shadow: 0 1px 1px rgb(0 0 0 / 12%); animation: pop .25s ease-out; }
.msg.bot { align-self: flex-start; }
/* The assistant's avatar: the little O from the logo, in a round white badge beside
   its lines and its typing dots. Decoration only, so it is a background, not an image. */
.msg.bot, .typing-live { position: relative; margin-left: 36px; }
.msg.bot::before, .typing-live::before { content: ""; position: absolute; left: -36px; top: 0; width: 28px; height: 28px; border-radius: 50%; background: #fff url("/brand/oppian-mark-64.png") center / 20px no-repeat; box-shadow: 0 1px 1px rgb(0 0 0 / 12%); }
.msg.guest { align-self: flex-end; background: #d9fdd3; }
@media (prefers-color-scheme: dark) { .msg { background: #202c33; color: #e9edef; } .msg.guest { background: #005c4b; } }
.msg b { display: block; font-size: .75rem; opacity: .7; }
.typing { align-self: flex-start; color: #667781; font-size: .85rem; padding: 4px 8px; }
/* The assistant's typing indicator: three dots in a bubble, with a label for screen readers in .vh. */
.typing-live { display: flex; gap: 5px; align-items: center; padding: 12px 14px; border-radius: 10px; background: #fff; box-shadow: 0 1px 1px rgb(0 0 0 / 12%); animation: pop .25s ease-out; }
.typing-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #54656f; animation: dot 1.2s ease-in-out infinite; }
.typing-live .dot:nth-child(2) { animation-delay: .2s; }
.typing-live .dot:nth-child(3) { animation-delay: .4s; }
@media (prefers-color-scheme: dark) { .typing-live { background: #202c33; } .typing-live .dot { background: #8696a0; } }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dot { 0%, 70%, 100% { opacity: .35; transform: none; } 35% { opacity: 1; transform: translateY(-3px); } }
/* Static dots, no fade: the indicator is still there, it just does not move. */
@media (prefers-reduced-motion: reduce) { .msg, .typing-live { animation: none; } .typing-live .dot { animation: none; opacity: .7; } }
/* Read by a screen reader, never seen. */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.checkup { display: grid; gap: 14px; }
.q { margin: 0; }
.q legend { font-weight: 650; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.q legend + * { clear: left; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .85rem; margin-right: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 8px 8px 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--bg); }
.pill input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.pill:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.result { margin-top: 24px; scroll-margin-top: 140px; }
.result ul { padding-left: 20px; }
.result .door-title { display: flex; align-items: center; gap: 10px; margin-top: 18px; }

.prose { padding-top: 16px; }
.contact { background: var(--brand); color: var(--brand-ink); }
.contact .lead { color: inherit; opacity: .85; }
.contact .btn-ghost { color: var(--brand-ink); border-color: currentColor; }
.contact .btn:not(.btn-ghost) { background: var(--brand-ink); color: var(--brand); border-color: var(--brand-ink); }
.site-footer { padding: 28px 0 40px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer .honest { font-weight: 600; color: var(--ink); }

/* The check-up conversation. The bubbles are the WhatsApp demo's, so what this
   adds is the row the visitor types in and the box that scrolls. */
/* The hidden attribute is display:none in the UA stylesheet, so any class that
   sets display beats it: .checkup does, and the form the conversation hides
   stayed on the page. Caught in the browser, not by the suite. */
[hidden] { display: none !important; }
.chat-panel { display: grid; gap: 14px; }
.chat-live { min-height: 300px; max-height: 60vh; overflow-y: auto; }
/* The bot check's host is out of the grid's flow, and so adds no gap, until the widget asks the visitor for something. */
.chat-human { position: absolute; }
.chat-human.asking { position: static; }
.chat-say { display: flex; gap: 8px; }
.chat-say input { flex: 1; min-width: 0; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; }
/* The assistant's tappable answers, under its reply. Real buttons, so they take focus and the keyboard. They carry the page's surface colour because the chat's own background is tinted. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.chips-hint { flex-basis: 100%; margin: 0; font-size: .85rem; color: #54656f; }
@media (prefers-color-scheme: dark) { .chips-hint { color: #8696a0; } }
.chip { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .92rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
