/* OneWord site. Brand colors from the app (oneword_app/Shared/Palette.swift).
   Editorial: white paper, navy ink, the app's blue used sparingly; the word and the tiles are the decoration. */
:root {
  --paper: #FFFFFF;
  --mist: #F6F8FC;
  --ink: #0B1E4D;
  --text: #0B1220;
  --subtle: #5F6878;
  --rule: #E3E8F0;
  --blue: #0878F9;
  --blue-soft: #E6F1FF;
  --cyan: #29D3FF;
  --right: #16A34A;
  --right-soft: #E8F7EE;
  --t-empty: #E9EEF5;
  --t-learning: #B3D6FF;
  --t-remembered: #3D8EF7;
  --t-mastered: #0A4FC2;
  --serif: ui-serif, "New York", "Newsreader", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  /* Side margins; on wide screens content stays in a centered 1320px column. */
  --gutter: max(clamp(20px, 5vw, 72px), calc((100vw - 1320px) / 2));
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A0F1A;
    --mist: #0F1626;
    --ink: #DCE8FF;
    --text: #F2F5FA;
    --subtle: #9AA3B2;
    --rule: #263045;
    --blue: #3B95FF;
    --blue-soft: #15263F;
    --right-soft: #12301F;
    --right: #4ADE80;
    --t-empty: #1C2436;
    --t-learning: #1E4A85;
    --t-remembered: #2F7BE0;
    --t-mastered: #8CC4FF;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.6 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
section { padding: clamp(72px, 9vw, 128px) var(--gutter); }
.big { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.04; letter-spacing: -0.025em; text-wrap: balance; }

/* Header */
.top { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 22px var(--gutter); z-index: 5; }
.brand { display: flex; align-items: center; min-height: 44px; gap: 9px; font-weight: 650; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; }
.top-link { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; padding: 12px 0; }
.top-link:hover { text-decoration: none; color: var(--blue); }

/* 1. Hero: one row. The promise on the left; a lock screen you can try on the right. */
.hero { min-height: min(100svh, 900px); display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 5vw, 88px); align-items: center; padding-top: 84px; padding-bottom: clamp(28px, 4vw, 48px); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; }
.hero h1 { font-size: clamp(52px, 7vw, 104px); line-height: .98; letter-spacing: -0.035em; text-wrap: balance; }
.lede { color: var(--subtle); font-size: clamp(18px, 1.5vw, 20px); max-width: 30em; margin: 26px 0 32px; }
.soon { font-weight: 600; color: var(--ink); }
/* The language switch sits above the lock screen, so it works while the animation plays too. */
/* Sized like an iPhone: from the window's height, so the whole phone fits beside the headline. */
.hero-try { display: grid; gap: 8px; width: clamp(280px, min(31vw, calc((100svh - 150px) * .47)), 410px); }
.pick { display: flex; justify-content: center; align-items: baseline; gap: 10px; font-size: 15px; margin: 0; }
.pick span { color: var(--rule); }
.pick button { font: inherit; font-weight: 600; padding: 10px 0 2px; border: 0; background: none; color: var(--subtle); cursor: pointer; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.pick button:hover { color: var(--ink); }
.pick button[aria-pressed="true"] { color: var(--ink); border-color: var(--blue); }
.speak { display: inline-grid; place-items: center; vertical-align: -3px; width: 26px; height: 26px; margin: 0 2px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: #E6F1FF; color: #0878F9; transition: transform .2s; }
.speak svg { width: 15px; }
.speak:hover { transform: scale(1.1); }
.hero.switching .notif { opacity: 0; }

/* The lock screen: the app icon's navy with a soft glow, and notifications as iOS draws them */
/* Until it's tapped, the panel plays the lock-screen animation; the language switch and the real notification follow. */
.lock-panel.demoing { padding: 0; overflow: hidden; }
.lock-panel.demoing > :not(.demo) { display: none; }
.lock-panel:not(.demoing) > .demo { display: none; }
/* After the hand-over, the same lock screen: same size, the clock on top, the notification below it. */
.lock-panel:not(.demoing) { align-content: start; padding: 64px 14px 20px; }
/* The Dynamic Island, so the interactive screen still reads as an iPhone. */
.lock-panel:not(.demoing)::before { content: ""; position: absolute; top: 10px; left: 50%; width: 31%; height: 28px; margin-left: -15.5%; border-radius: 16px; background: #000; }
.lock-clock { text-align: center; color: #fff; margin: 4px 0 6px; }
.lock-clock span { display: block; font-size: 14px; font-weight: 600; opacity: .85; }
.lock-clock strong { display: block; font-size: clamp(52px, 5vw, 68px); font-weight: 700; line-height: 1; letter-spacing: -1.5px; }
.demo { position: absolute; inset: 0; display: block; padding: 0; border: 0; background: #0B1E4D; cursor: pointer; overflow: hidden; }
.demo iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; transform-origin: 0 0; transform: scale(var(--s, 1)); pointer-events: none; }
.demo-try { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; font-size: 14px; font-weight: 600; color: #fff; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .2s; }
.demo:hover .demo-try { background: rgba(255,255,255,.28); }
.lock-panel { position: relative; aspect-ratio: 390 / 844; overflow: hidden; border: 11px solid #0A0F1A; border-radius: 56px; padding: 22px 20px 24px; background: radial-gradient(120% 80% at 80% 0%, #2B4C8C 0%, transparent 60%), radial-gradient(90% 70% at 0% 100%, #16357F 0%, transparent 60%), #0B1E4D; box-shadow: 0 30px 70px -30px rgba(11, 30, 77, .55); display: grid; gap: 10px; }
.notif { background: rgba(246, 248, 252, .94); color: #0B1220; border-radius: 22px; padding: 14px 14px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: arrive .7s var(--ease) .4s both; }
@keyframes arrive { from { opacity: 0; transform: translateY(-14px) scale(.97); } }
.notif-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6B7280; }
.notif-head img { width: 22px; border-radius: 6px; }
.notif-head b { color: #0B1220; font-weight: 600; }
.notif-head span { margin-left: auto; }
.notif-q { font-size: 18px; font-weight: 600; margin: 10px 2px 12px; }
.notif-q b { font-family: var(--serif); font-size: 20px; color: #0B1E4D; }
.notif-hint { font-size: 13px; font-weight: 600; color: #0878F9; margin: -4px 2px 10px; transition: opacity .3s; }
.hero.answered .notif-hint { display: none; }
.notif-choices { display: grid; gap: 7px; }
.notif-choices button { font: inherit; font-size: 16px; font-weight: 600; text-align: left; padding: 12px 15px; border-radius: 14px; border: 1px solid #E3E8F0; background: #fff; color: #0B1220; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.notif-choices button:hover:not(:disabled) { border-color: #0878F9; }
.notif-choices button:active:not(:disabled) { transform: scale(.98); }
.notif-choices button:disabled { cursor: default; }
.notif-choices .right { background: #E8F7EE; border-color: #16A34A; color: #15803D; }
.notif-choices .wrong { background: #FDECEC; border-color: #DC2626; color: #DC2626; }
.notif-result { font-size: 14px; color: #6B7280; margin: 0 2px; max-height: 0; overflow: hidden; transition: max-height .4s var(--ease), margin .4s var(--ease); }
.notif-result.show { max-height: 80px; margin-top: 12px; }
.notif-result b { color: #0B1220; }
/* After answering, the word is already scheduled to come back. */
.notif-later { display: none; padding: 12px 14px; }
.notif-later .notif-q { margin: 6px 2px 0; font-size: 15px; }
.notif-later .notif-q b { font-size: 16px; }
.notif-later .notif-head span { color: #0878F9; font-weight: 600; }
.hero.answered .notif-later { display: block; animation: arrive .6s var(--ease) .7s both; }

/* Sign-up */
/* A field only bots fill in; hidden from people and screen readers. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.signup { display: flex; gap: 8px; max-width: 440px; }
.signup input {
  flex: 1; min-width: 0; font: inherit; min-height: 54px; padding: 13px 16px; border-radius: 13px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--text);
}
.signup input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.signup button { font: inherit; font-weight: 600; min-height: 54px; padding: 13px 22px; border: 0; border-radius: 13px; background: var(--ink); color: var(--paper); cursor: pointer; white-space: nowrap; }
.signup button:hover { background: var(--blue); color: #fff; }
.signup-note { font-size: 15px; color: var(--subtle); margin-top: 10px; }
.signup-done { color: var(--blue); font-weight: 600; }

/* 2. Meeting a word: centered stage, steps around the phone */
.meet { background: var(--mist); }
.meet-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); }
.meet-time { color: var(--subtle); font-size: 18px; margin-top: 18px; }
.meet-stage { display: grid; grid-template-columns: 1fr minmax(280px, 380px) 1fr; grid-template-areas: "a phone c" "b phone c"; column-gap: clamp(16px, 2.6vw, 40px); row-gap: 16px; align-items: center; max-width: 1100px; margin: 0 auto; }
.meet-phone { grid-area: phone; }
.meet-step.s0 { grid-area: a; align-self: end; }
.meet-step.s1 { grid-area: b; align-self: start; }
.meet-step.s2 { grid-area: c; }
.meet-step { font: inherit; color: inherit; background: none; border: 0; padding: 18px 20px; border-radius: 20px; cursor: pointer; transition: background .3s, box-shadow .3s; }
.meet-step.s0, .meet-step.s1 { text-align: right; }
.meet-step.s2 { text-align: left; }
.meet-step b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2.2vw, 28px); color: var(--subtle); transition: color .3s; }
.meet-step span { display: block; color: var(--subtle); font-size: 17px; margin-top: 6px; }
.meet-step:hover b { color: var(--ink); }
.meet-step[aria-pressed="true"] { background: var(--paper); box-shadow: 0 16px 40px -20px rgba(11, 30, 77, .25); }
.meet-step[aria-pressed="true"] b { color: var(--ink); }
/* While it steps through on its own, the open step shows how long until the next. */
.meet-step { position: relative; overflow: hidden; }
.meet-step::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 8px; height: 2px; border-radius: 1px; background: var(--blue); transform: scaleX(0); transform-origin: left; opacity: 0; }
.meet-stage.auto .meet-step[aria-pressed="true"]::after { opacity: .5; animation: fill 5s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.meet-phone .phone { width: 100%; }
.phone { position: relative; aspect-ratio: 552 / 1200; border-radius: 46px; padding: 10px; background: #0A0F1A; box-shadow: 0 40px 80px -20px rgba(11, 30, 77, .35), inset 0 0 0 2px #2A3550; }
.screen { position: absolute; inset: 10px; border-radius: 36px; overflow: hidden; opacity: 0; transition: opacity .6s var(--ease); background: #F6F8FC; }
.screen.on { opacity: 1; }
.screen:not(.on) { pointer-events: none; }
.screen img { width: 100%; height: 100%; object-fit: cover; }

/* 2b. Notification quizzes: three lock-screen moments, each answered once when scrolled into view */
.glance-head { text-align: center; max-width: 780px; margin: 0 auto clamp(40px, 5vw, 64px); }
.glance-head p { color: var(--subtle); font-size: 18px; margin-top: 18px; text-wrap: balance; }
.glance-row { display: grid; grid-template-columns: repeat(3, minmax(0, 340px)); justify-content: center; align-items: start; gap: clamp(16px, 2.4vw, 32px); }
.glance-card { margin: 0; }
.glance-card figcaption { text-align: center; font-family: var(--serif); font-size: 22px; color: var(--ink); margin-bottom: 14px; }
.gl-lock { border-radius: 28px; padding: 18px 14px; background: radial-gradient(120% 80% at 80% 0%, #2B4C8C 0%, transparent 60%), radial-gradient(90% 70% at 0% 100%, #16357F 0%, transparent 60%), #0B1E4D; box-shadow: 0 30px 60px -30px rgba(11, 30, 77, .5); }
.gl-notif { display: flex; align-items: center; gap: 7px; margin: 0 4px 8px; font-size: 12px; color: rgba(255,255,255,.85); }
.gl-notif img { width: 18px; border-radius: 5px; }
.gl-notif b { font-weight: 600; color: #fff; }
.gl-notif span { margin-left: auto; opacity: .7; }
.gl-card { border-radius: 20px; overflow: hidden; background: #fff; color: #0B1220; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.gl-q { padding: 14px 16px; background: linear-gradient(135deg, #0B1E4D, #16357F); color: #fff; }
.gl-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #8FBBFF; }
.gl-eyebrow img { width: 16px; }
.gl-word { font-family: var(--serif); font-size: 28px; font-weight: 600; margin-top: 4px; line-height: 1.15; }
.gl-word.gl-en { font-family: var(--sans); font-size: 24px; font-weight: 700; }
.gl-ask { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.75); margin-top: 2px; }
.gl-a { padding: 14px; display: grid; gap: 7px; }
.gl-choice { padding: 10px 12px; border-radius: 12px; border: 1.5px solid #E3E8F0; font-size: 15px; font-weight: 600; transition: background .3s, border-color .3s, color .3s; }
.gl-choice.right { background: #E8F7EE; border-color: #16A34A; color: #15803D; }
.gl-slots, .gl-tiles { display: flex; flex-wrap: wrap; gap: 4px; }
.gl-slots { margin-bottom: 8px; }
.gl-slots .pre { font-family: var(--serif); font-size: 20px; font-weight: 600; align-self: center; margin-right: 4px; }
.gl-slot, .gl-tile { width: 26px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.gl-slot { border: 1.5px dashed #E3E8F0; color: #0B1E4D; }
.gl-slot.filled { border-style: solid; border-color: #0878F9; background: #E6F1FF; }
.gl-slots.right .gl-slot { border-color: #16A34A; background: #E8F7EE; color: #15803D; }
.gl-tile { border: 1.5px solid #E3E8F0; background: #fff; transition: opacity .2s; }
.gl-tile { transition: opacity .35s, background .2s, border-color .2s, transform .2s; }
.gl-tile.picking { background: #E6F1FF; border-color: #0878F9; color: #0878F9; transform: translateY(-3px); }
.gl-tile.used { opacity: 0; }
/* Once spelled, the letter choices step aside so only the answer remains. */
.glance-card.done .gl-tiles { display: none; }
.gl-result { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #16A34A; opacity: 0; transition: opacity .4s; margin-top: 2px; }
.gl-result span { font-weight: 500; color: #6B7280; }
.glance-card.done .gl-result { opacity: 1; }
.gl-tap { animation: tapring .5s var(--ease); }
.glance-foot { text-align: center; color: var(--subtle); font-size: 14px; margin-top: 32px; }

/* 3. Why OneWord: the original layout the owner liked, copy left, chunky bars right */
.why { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.why-copy p { color: var(--subtle); font-size: 19px; margin-top: 24px; max-width: 30em; }
.why-copy .keep { margin-top: 14px; font-weight: 600; color: var(--ink); }
.gaps { margin: 0; }
.gaps-title { font-size: 14px; color: var(--subtle); margin-bottom: 18px; }
.bars { display: flex; align-items: flex-end; gap: clamp(8px, 1.2vw, 14px); height: clamp(170px, 18vw, 240px); }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar::before { content: ""; width: 100%; height: var(--h); border-radius: 12px; background: var(--c); transform-origin: bottom; transition: transform .7s var(--ease); }
.bar span { position: absolute; top: 100%; margin-top: 10px; font-size: 14px; color: var(--subtle); white-space: nowrap; }
.why.waiting .bar::before { transform: scaleY(0); }
.bar:nth-child(2)::before { transition-delay: .1s; } .bar:nth-child(3)::before { transition-delay: .2s; }
.bar:nth-child(4)::before { transition-delay: .3s; } .bar:nth-child(5)::before { transition-delay: .4s; }
.gaps { padding-bottom: 32px; }

/* 4. Story */
.story { background: var(--mist); }
.story-grid { display: grid; grid-template-columns: minmax(320px, 1.15fr) 0.85fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.story-copy p { color: var(--subtle); font-size: 18px; margin-top: 24px; max-width: 28em; }
.langs { display: flex; align-items: baseline; gap: 10px; margin-top: 28px; font-size: 16px; }
.langs span { color: var(--rule); }
.langs button { font: inherit; font-weight: 600; padding: 2px 0; border: 0; background: none; color: var(--subtle); cursor: pointer; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.langs button:hover { color: var(--ink); }
.langs button[aria-selected="true"] { color: var(--ink); border-color: var(--blue); }
.chat { background: var(--paper); border-radius: 28px; padding: 26px 20px; box-shadow: 0 30px 60px -30px rgba(11, 30, 77, .25); }
.chat-head { text-align: center; margin-bottom: 16px; }
/* The topic's words: each lights up as the line it unlocks appears; the rest wait, locked. */
/* A wide band across the top of the section. */
.topic-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.topic-words button { font: inherit; cursor: pointer; background: none; font-family: var(--serif); font-size: 16px; padding: 3px 11px; border-radius: 999px; border: 1px dashed var(--rule); color: var(--subtle); opacity: .6; transition: background .4s, color .4s, border-color .4s, opacity .4s; }
.topic-words button.lit { opacity: 1; border: 1px solid transparent; background: var(--blue-soft); color: var(--blue); }
.topic-words button.next { opacity: 1; border-style: solid; border-color: var(--blue); color: var(--blue); animation: beckon 1.6s var(--ease) infinite; }
@keyframes beckon { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 14%, transparent); } }
.topic-words button.new { animation: pop .5s var(--ease); }
@keyframes pop { 40% { transform: scale(1.12); } }
.bubble mark { background: none; color: var(--blue); font-weight: 600; }
.bubble.flash { animation: flash 1.1s var(--ease); }
@keyframes flash { 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 30%, transparent); border-color: var(--blue); } }
.locked span b { font-family: var(--serif); color: var(--blue); }
.locked.done { border-style: solid; border-color: var(--right); color: var(--right); font-weight: 600; max-width: 100%; }
.locked.done b { font-family: var(--serif); color: var(--right); }
.bubble.sentence { box-shadow: 0 0 0 2px var(--right); }
.chat-head b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); }
.chat-head span { font-size: 13px; color: var(--subtle); }
.bubbles { display: flex; flex-direction: column; gap: 6px; }
.who { font-size: 12px; color: var(--subtle); margin-top: 8px; }
.who.you { text-align: right; }
.bubble {
  max-width: 82%; font-family: var(--serif); font-size: 18px; line-height: 1.35; padding: 10px 14px; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--text); text-align: left; font-weight: 400;
  animation: rise .45s var(--ease) both;
}
.bubble.you { align-self: flex-end; background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.bubble small { display: block; font-family: var(--sans); font-size: 13px; color: var(--subtle); margin-top: 4px; }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--rule); }
.typing.you { align-self: flex-end; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.locked { align-self: flex-start; display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 10px 14px; border-radius: 18px; border: 1.5px dashed var(--rule); color: var(--subtle); font-size: 14px; animation: rise .45s var(--ease) both; }
.locked svg { width: 14px; }
@keyframes blink { 50% { opacity: .25; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* 5. Practice: a centered card, the style names drifting by underneath */
.practice { text-align: center; overflow: hidden; }
.practice-head { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 60px); }
.practice-head p { color: var(--subtle); font-size: 18px; margin-top: 20px; }
.round { text-align: left; width: min(460px, 100%); margin: 0 auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 28px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(11, 30, 77, .22); min-height: 380px; display: flex; flex-direction: column; }
.ticker { margin: clamp(40px, 5vw, 60px) calc(var(--gutter) * -1) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; gap: clamp(28px, 4vw, 56px); width: max-content; animation: tick 50s linear infinite; }
.ticker-track span { font-family: var(--serif); font-size: clamp(24px, 3vw, 40px); color: var(--subtle); white-space: nowrap; }
.ticker-track span:nth-child(3n+1) { color: var(--ink); }
@keyframes tick { to { transform: translateX(-50%); } }
.round-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--subtle); margin-bottom: 18px; }
.round-dots { display: flex; gap: 6px; }
.round-dots[hidden] { display: none; }
.round-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--rule); transition: background .3s; }
.round-dots i.done { background: var(--blue); }
.round-body { flex: 1; display: flex; flex-direction: column; animation: rise .4s var(--ease) both; }
.q-kind { font-size: 13px; font-weight: 600; color: var(--blue); }
.q-prompt { font-size: 18px; margin: 6px 0 18px; color: var(--text); }
.q-prompt b { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); display: block; margin-top: 2px; }
.q-hint { font-size: 14px; color: var(--subtle); margin: -10px 0 16px; }
.opt { display: block; width: 100%; font: inherit; font-family: var(--serif); font-size: 18px; text-align: left; padding: 12px 16px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--rule); background: var(--paper); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.opt:hover:not(:disabled) { border-color: var(--blue); }
.opt.right, .slot.right, .pair.right { background: var(--right-soft); border-color: var(--right); color: var(--right); }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.slots { display: flex; gap: 6px; margin-bottom: 18px; }
.slot { width: 38px; height: 46px; border-radius: 10px; border: 1.5px dashed var(--rule); display: grid; place-items: center; font-size: 20px; font-weight: 600; color: var(--ink); }
.slot.filled { border-style: solid; border-color: var(--blue); background: var(--blue-soft); }
.tiles-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { width: 44px; height: 48px; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper); font: inherit; font-size: 20px; font-weight: 600; color: var(--ink); cursor: pointer; transition: opacity .2s, transform .15s; }
.tile:hover:not(:disabled) { border-color: var(--blue); }
.tile:disabled { opacity: .15; cursor: default; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair { font: inherit; font-size: 16px; padding: 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.pair.target { font-family: var(--serif); font-size: 18px; }
.pair.picked { border-color: var(--blue); background: var(--blue-soft); }
.pair:disabled { cursor: default; }
.round-end { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
.round-end b { font-family: var(--serif); font-size: 30px; font-weight: 500; color: var(--ink); line-height: 1.15; }
.round-end p { color: var(--subtle); }
/* Demo mode: a gentle ring where it "taps", and the whole card invites a tap. */
.round.autoplay { cursor: pointer; }
.round.autoplay .round-head span { color: var(--blue); }
.tapped { animation: tapring .5s var(--ease); }
@keyframes tapring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.typed { display: flex; gap: 8px; }
.typed input { flex: 1; min-width: 0; font: inherit; font-family: var(--serif); font-size: 18px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rule); background: var(--paper); color: var(--text); }
.typed input.right { background: var(--right-soft); border-color: var(--right); color: var(--right); }
.typed .check { width: auto; margin: 0; font-family: var(--sans); font-weight: 600; font-size: 16px; }
.ticker-track span.now { color: var(--blue) !important; }
.again { margin-top: 14px; font: inherit; font-weight: 600; padding: 12px 20px; border: 0; border-radius: 12px; background: var(--ink); color: var(--paper); cursor: pointer; }
.again:hover { background: var(--blue); color: #fff; }

/* 6. Mosaic: full width, big tiles */
.mosaic-head { display: grid; grid-template-columns: auto minmax(0, 34em); justify-content: space-between; gap: clamp(32px, 6vw, 96px); align-items: center; margin-bottom: clamp(32px, 4vw, 48px); }
.mosaic-head h2 { white-space: nowrap; }
.mosaic-head p:first-child { color: var(--ink); font-size: 20px; font-weight: 500; text-wrap: pretty; }
.mosaic-head .mosaic-more { color: var(--subtle); font-size: 18px; margin: 10px 0 14px; text-wrap: pretty; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 7px; background: var(--c); }
.mosaic { display: grid; grid-template-columns: repeat(28, 1fr); gap: clamp(3px, .45vw, 6px); }
.mosaic i { aspect-ratio: 1; border-radius: 22%; background: var(--t-empty); transition: background .35s var(--ease), transform .35s var(--ease); }
.mosaic i.l { background: var(--t-learning); }
.mosaic i.r { background: var(--t-remembered); }
.mosaic i.m { background: var(--t-mastered); }
.mosaic i.today { background: var(--blue); transform: scale(1.25); border-radius: 4px; }
.mosaic-wrap { position: relative; }
.mosaic i { cursor: pointer; }
.mosaic i.on-tip { outline: 2px solid var(--ink); outline-offset: 1px; }
/* The word behind a tile */
.tip { position: absolute; z-index: 3; left: 0; top: 0; min-width: 160px; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px rgba(11, 30, 77, .25); pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 12px)) scale(.96); transition: opacity .15s, transform .15s; }
.tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 12px)); }
.tip b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.tip span { display: block; font-size: 14px; opacity: .8; }
.tip em { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.14); }

/* 9. Join */
.join { background: var(--ink); color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; }
@media (prefers-color-scheme: dark) { .join { background: #0B1E4D; } }
.join .big { color: #fff; margin-bottom: 28px; }
.join-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 28px; }
.join-brand img { width: 34px; }
/* The language choice: one quiet panel, the chosen language's word of the day attached to it. */
.join-each { color: #C9D6F2; font-size: 18px; margin: -10px 0 36px; max-width: 32em; text-wrap: balance; }
.join-pick { width: min(460px, 100%); margin-left: auto; margin-right: auto; margin-bottom: 20px; padding: 6px 6px 16px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.join-langs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.join-langs button { font: inherit; font-family: var(--serif); font-size: 22px; padding: 10px 6px; border: 0; border-radius: 16px; background: none; color: #9FB2DA; cursor: pointer; transition: background .2s, color .2s; }
.join-langs button:hover { color: #fff; }
.join-langs button[aria-pressed="true"] { background: rgba(255,255,255,.12); color: #fff; }
.join-word { margin-top: 12px; font-size: 14px; color: #9FB2DA; }
.join-word b { font-family: var(--serif); font-size: 19px; font-weight: 500; color: #fff; margin: 0 6px 0 8px; }
.join .signup { width: min(460px, 100%); }
.join .signup input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.join .signup input::placeholder { color: #9FB2DA; }
.join .signup button { background: var(--blue); color: #fff; }
.join .signup button:hover { background: #fff; color: #0B1E4D; }
.join .signup-note { color: #9FB2DA; }
.join .signup-done { color: var(--cyan); }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--gutter); font-size: 14px; color: var(--subtle); }
.foot nav { display: flex; gap: 8px; }
.foot nav a { padding: 12px 8px; }
.foot a { color: var(--subtle); }

/* Plain pages: privacy, support */
.doc { max-width: 760px; margin: 0 auto; padding: 150px var(--gutter) 96px; overflow-wrap: anywhere; }
.doc h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1; letter-spacing: -0.03em; margin-bottom: 14px; }
.doc .updated { color: var(--subtle); margin-bottom: 48px; }
.doc h2 { font-size: 26px; margin: 44px 0 10px; }
.doc p, .doc li { font-size: 17px; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0 0; }
.doc li { margin-bottom: 10px; }
.faq details { border-top: 1px solid var(--rule); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { font-family: var(--serif); font-size: 22px; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; overflow-wrap: anywhere; }
.faq summary::after { flex: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--blue); font-size: 22px; line-height: 1; transition: transform .25s var(--ease); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--subtle); margin-top: 10px; }

/* Scroll-in */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Phones and small tablets */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 100px; gap: 36px; }
  .hero h1 { font-size: clamp(44px, 12vw, 64px); }
  .lede { margin: 18px 0 24px; }
  .hero-try { width: min(300px, 80vw); justify-self: center; }
  .lock-panel { border-width: 9px; border-radius: 46px; }
  .meet-stage { grid-template-columns: 1fr; grid-template-areas: "phone" "a" "b" "c"; row-gap: 6px; }
  .meet-phone { width: min(260px, 72vw); justify-self: center; margin-bottom: 18px; }
  .meet-step, .meet-step.s0, .meet-step.s1, .meet-step.s2 { text-align: left; padding: 14px 16px; }
  .meet-step:not([aria-pressed="true"]) span { display: none; }
  .story-grid, .mosaic-head { grid-template-columns: 1fr; }
  .mosaic-head h2 { white-space: normal; }
  .mosaic { grid-template-columns: repeat(20, 1fr); gap: 3px; }
  .round { padding: 18px; }
  .tile { width: 40px; }
  .mosaic { gap: 3px; }
  .signup { flex-direction: column; }
  .why { grid-template-columns: 1fr; }
  .glance-row { grid-template-columns: minmax(0, 340px); }
  .gl-lock { min-height: 0; }
  .bar span { font-size: 12px; white-space: normal; text-align: center; width: 100%; line-height: 1.25; }
  .join-langs button { font-size: 19px; }
}

/* Dark mode: the navy panels sit on near-black, so give them a faint edge and a lift. */
@media (prefers-color-scheme: dark) {
  .lock-panel, .demo, .gl-lock { box-shadow: 0 0 0 1px rgba(143, 187, 255, .18), 0 30px 70px -30px rgba(0, 0, 0, .8); }
  .join { background: #10245C; }
  .chat, .round, .meet-step[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--rule); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
