/* SweetVocab — the website. Dark like the app, with paper flashcards like
   its icon; dictionary-entry headings; everything animated is decoration
   and stops for prefers-reduced-motion. */

:root {
  --bg: #0b0f16;
  --bg-2: #0e131c;
  --surface: #121923;
  --surface-2: #17202c;
  --line: rgba(240, 246, 252, .08);
  --line-2: rgba(240, 246, 252, .14);
  --text: #f0f6fc;
  --soft: #c4ccd7;
  --muted: #8b949e;
  --faint: #5b6573;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #a78bfa;
  --paper: #f8f9fc;
  --paper-2: #eef1f7;
  --ink: #101a36;
  --ink-soft: #4b5674;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Malgun Gothic", "Apple SD Gothic Neo",
          "Yu Gothic UI", "Hiragino Sans", "Noto Sans", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --radius: 22px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {                      /* two slow glows behind everything */
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(40vmax 40vmax at 78% 8%, rgba(59, 130, 246, .16), transparent 60%),
    radial-gradient(36vmax 36vmax at 8% 62%, rgba(167, 139, 250, .09), transparent 60%),
    radial-gradient(30vmax 30vmax at 90% 92%, rgba(34, 197, 94, .06), transparent 60%);
  animation: drift 28s ease-in-out infinite alternate;
}
body::after {                       /* film grain */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(-3vmax, 2vmax, 0) scale(1.06); } }

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(96, 165, 250, .35); }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px;
  background: var(--blue); color: #fff; }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-tiny { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; color: var(--green); }
.ico-big { width: 30px; height: 30px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.sep { opacity: .45; margin: 0 4px; }
.c-red { color: var(--red); } .c-amber { color: var(--amber); } .c-green { color: var(--green); } .c-blue { color: var(--blue-2); }

/* ------------------------------------------------------------ background letters, progress */
.glyphs { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 150; height: 2px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--green));
}

/* ------------------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 20px; border-radius: 13px; border: 1px solid transparent;
  font: 600 15px/1.2 var(--sans); color: var(--text); cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s;
  overflow: hidden; isolation: isolate;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  background: linear-gradient(180deg, #4d8ff8, #2f6fe8);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 30px -10px rgba(59, 130, 246, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary::after {               /* a light sweep */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-primary:hover { box-shadow: 0 16px 40px -12px rgba(59, 130, 246, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(240, 246, 252, .24); }
.btn-big { padding: 16px 26px; font-size: 16.5px; border-radius: 15px; }
.btn-small { padding: 9px 15px; font-size: 14px; border-radius: 11px; }
.btn-small .ico { width: 17px; height: 17px; }
.btn-block { width: 100%; }

.kbd {
  display: inline-block; min-width: 1.6em; padding: 1px 6px; border-radius: 6px; text-align: center;
  font: 600 11.5px/1.5 ui-monospace, "Cascadia Code", Menlo, monospace;
  border: 1px solid currentColor; border-bottom-width: 2px; opacity: .75;
}

/* ------------------------------------------------------------ navigation */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120; height: 70px;
  display: flex; align-items: center; gap: 28px; padding: 0 max(24px, calc((100vw - 1180px) / 2 + 24px));
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 15, 22, .72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font: 650 18px/1 var(--sans); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; box-shadow: 0 6px 18px -6px rgba(59, 130, 246, .6); }
.brand-vocab { color: #40a9ff; font-weight: inherit; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { position: relative; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; border-radius: 2px;
  background: var(--blue-2); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; margin-left: 4px; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04); cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.6px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-toggle span:first-child { top: 16px; } .nav-toggle span:last-child { top: 24px; }
.nav.open .nav-toggle span:first-child { top: 20px; transform: rotate(45deg); }
.nav.open .nav-toggle span:last-child { top: 20px; transform: rotate(-45deg); }

/* ------------------------------------------------------------ reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 90px; }
.hero-ruled {                       /* an index card: blue lines, a red margin */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 43px, rgba(96, 165, 250, .07) 43px 44px);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 45%, #000 20%, transparent 75%);
}
.hero-ruled::after { content: ""; position: absolute; top: 0; bottom: 0; left: max(5vw, 24px); width: 1px; background: rgba(239, 68, 68, .22); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; margin-bottom: 26px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .04);
  color: var(--soft); font-size: 13.5px; font-weight: 500;
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); animation: ping 2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.2); opacity: 0; } }

h1 {
  font-family: var(--serif); font-weight: 600; font-variation-settings: "opsz" 144;
  font-size: clamp(50px, 7.2vw, 96px); line-height: 1.08; letter-spacing: -.025em; margin-bottom: 30px;
}
.morph { position: relative; display: inline-block; vertical-align: bottom; transition: width .6s var(--ease); white-space: nowrap; }
.morph-word {
  display: inline-block; padding-right: .06em;
  background: linear-gradient(95deg, #7cb4ff 0%, #a78bfa 55%, #f0abfc 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.morph-word.out { animation: word-out .45s var(--ease) forwards; }
.morph-word.in { animation: word-in .7s var(--ease) forwards; }
@keyframes word-out { to { opacity: 0; filter: blur(10px); transform: translateY(-.35em) scale(.96); } }
@keyframes word-in { from { opacity: 0; filter: blur(10px); transform: translateY(.35em) scale(.96); } to { opacity: 1; filter: none; transform: none; } }
.morph-reading {
  position: absolute; left: .05em; top: 96%; white-space: nowrap;
  font: italic 400 clamp(13px, 1.25vw, 17px)/1 var(--serif); letter-spacing: .02em; color: var(--muted);
  transition: opacity .4s;
}
.stay { position: relative; font-style: italic; font-weight: 500; }
.stay-underline { position: absolute; left: -2%; right: -4%; bottom: -.08em; width: 106%; height: .3em; overflow: visible; }
.stay-underline path {
  fill: none; stroke: var(--amber); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 1.4s 1s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.lede { font-size: clamp(17.5px, 1.5vw, 20px); color: var(--soft); max-width: 33em; line-height: 1.65; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 16px; }
.fine { font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------ the flashcard demo */
.hero-demo { position: relative; perspective: 1600px; }
.demo-stage { position: relative; width: min(420px, 100%); height: 520px; margin: 0 auto; }
/* the SweetVocab cat peeks over the card: floats, and hops for a good answer */
.hero-cat { position: absolute; z-index: 4; top: -44px; right: -34px; width: 104px; height: 104px; border-radius: 26px;
  box-shadow: 0 18px 40px -14px rgba(64, 169, 255, .55); cursor: pointer; transform: rotate(6deg);
  animation: cat-float 3.6s ease-in-out infinite; }
.hero-cat.hop { animation: cat-hop .62s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cat-float { 0%, 100% { transform: translateY(0) rotate(6deg); } 50% { transform: translateY(-6px) rotate(4deg); } }
@keyframes cat-hop { 0% { transform: translateY(0) rotate(6deg); } 40% { transform: translateY(-28px) rotate(-5deg) scale(1.05); }
  75% { transform: translateY(0) rotate(6deg) scale(1.03, .93); } 100% { transform: translateY(0) rotate(6deg); } }
.demo-shadow {
  position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(160deg, #e3e8f1, #cbd3e0); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.demo-shadow.s1 { transform: rotate(4.5deg) translate(16px, 8px); background: linear-gradient(160deg, #c9d3e3, #aab6ca); opacity: .9; }
.demo-shadow.s2 { transform: rotate(-6deg) translate(-16px, 18px); background: linear-gradient(160deg, #94a3bd, #6f7f9b); opacity: .7; }
.flashcard {
  position: absolute; inset: 0; cursor: pointer; text-align: left; transform-style: preserve-3d; outline: none;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.flashcard:focus-visible .face { box-shadow: 0 0 0 3px var(--blue-2), 0 40px 80px -30px rgba(0, 0, 0, .85); }
.flashcard.entering { animation: card-in .7s var(--spring); }
@keyframes card-in { from { transform: translateY(18px) scale(.94) rotate(-2deg); opacity: .4; } }
.flashcard.leave-0 { transform: translate(-30%, 60px) rotate(-14deg) scale(.9); opacity: 0; transition-duration: .55s; }
.flashcard.leave-1 { transform: translate(-90%, -10px) rotate(-18deg); opacity: 0; transition-duration: .55s; }
.flashcard.leave-2 { transform: translate(90%, -20px) rotate(16deg); opacity: 0; transition-duration: .55s; }
.flashcard.leave-3 { transform: translate(40%, -120%) rotate(12deg); opacity: 0; transition-duration: .6s; }
.flashcard-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .85s cubic-bezier(.3, 1.25, .45, 1); }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  color: var(--ink); background: linear-gradient(165deg, var(--paper), var(--paper-2));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(255, 255, 255, .7);
  padding: 26px 28px;
}
.face::after {                      /* gloss that follows the pointer */
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(420px circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, .9), transparent 45%);
  opacity: .55;
}
.front {
  display: flex; flex-direction: column;
  background:
    linear-gradient(rgba(239, 68, 68, .45), rgba(239, 68, 68, .45)) 0 76px / 100% 1px no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 33px, rgba(59, 130, 246, .13) 33px 34px) 0 110px / 100% calc(100% - 110px) no-repeat,
    linear-gradient(165deg, var(--paper), var(--paper-2));
}
.face-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.lang { display: inline-flex; align-items: center; gap: 9px; }
.lang svg, .flag-mini { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(16, 26, 54, .12); }
.front-word { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-bottom: 20px; }
.front .word { font-size: clamp(54px, 8vw, 86px); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.front .reading { margin-top: 6px; font: italic 400 22px/1.3 var(--serif); color: var(--ink-soft); min-height: 1.3em; }
.hint { text-align: center; font-size: 13px; color: var(--ink-soft); }
.back { transform: rotateY(180deg); display: flex; flex-direction: column; gap: 12px; }
.back-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid rgba(16, 26, 54, .1); }
.word-small { font-size: 28px; font-weight: 700; line-height: 1.1; }
.reading-small { font: italic 400 17px var(--serif); color: var(--ink-soft); }
.type { margin-left: auto; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  padding: 3px 8px; border-radius: 6px; background: rgba(16, 26, 54, .06); }
.meaning { margin: 0; font: 600 17px/1.45 var(--sans); }
.tr-row { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15.5px; }
.example { margin: 0; padding: 2px 0 2px 13px; border-left: 3px solid rgba(16, 26, 54, .15); display: flex; flex-direction: column; gap: 2px; }
.example .ex-t { font-size: 15.5px; }
.example .ex-reading { font: italic 13.5px var(--serif); color: var(--ink-soft); }
.example .ex-reading:empty { display: none; }
.example .ex-tr { font-size: 13.5px; color: var(--ink-soft); }
.trick { margin-top: auto; padding: 11px 13px; border-radius: 12px; border-left: 3px solid var(--blue);
  background: rgba(59, 130, 246, .09); font-size: 13.5px; line-height: 1.5; color: #1e3a8a; display: flex; flex-direction: column; gap: 3px; }
.trick-label { font-size: 10.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--blue); }

.toast {
  position: absolute; left: 50%; top: -20px; z-index: 5; transform: translate(-50%, 8px); opacity: 0;
  padding: 9px 16px; border-radius: 999px; white-space: nowrap; font-size: 14px; font-weight: 500;
  background: rgba(18, 25, 35, .94); border: 1px solid var(--line-2); box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .8);
  transition: opacity .35s var(--ease), transform .45s var(--spring); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { font-weight: 650; }
.rate-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; width: min(420px, 100%); margin: 26px auto 0;
  transition: opacity .4s, filter .4s; }
.rate-row.waiting { opacity: .32; filter: saturate(.4); }
.rate {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid; font: inherit; color: inherit; transition: transform .2s var(--ease), background-color .2s;
}
.rate b { font-size: 14.5px; font-weight: 650; }
.rate span { font-size: 12px; opacity: .85; }
.rate:hover { transform: translateY(-3px); }
.rate:active { transform: translateY(0) scale(.97); }
.rate.again { color: #f87171; border-color: rgba(239, 68, 68, .6); background: rgba(239, 68, 68, .1); }
.rate.hard { color: #fbbf24; border-color: rgba(245, 158, 11, .6); background: rgba(245, 158, 11, .1); }
.rate.good { color: #4ade80; border-color: rgba(34, 197, 94, .6); background: rgba(34, 197, 94, .1); }
.rate.easy { color: #7cb4ff; border-color: rgba(59, 130, 246, .7); background: rgba(59, 130, 246, .12); }
.rate.again:hover { background: rgba(239, 68, 68, .18); } .rate.hard:hover { background: rgba(245, 158, 11, .18); }
.rate.good:hover { background: rgba(34, 197, 94, .18); } .rate.easy:hover { background: rgba(59, 130, 246, .2); }
.demo-caption { text-align: center; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.demo-caption .kbd { font-size: 10.5px; }
.demo-done {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 34px; border-radius: var(--radius); border: 1px solid var(--line-2);
  background: radial-gradient(circle at 50% 30%, rgba(245, 158, 11, .14), transparent 55%), var(--surface);
  animation: card-in .8s var(--spring);
}
.demo-done[hidden] { display: none; }
.done-title { font: 600 30px/1.2 var(--serif); margin: 26px 0 8px; }
.done-sub { color: var(--muted); max-width: 22em; }
.done-actions { display: flex; gap: 10px; margin-top: 8px; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 40px; margin-left: -13px; border-radius: 14px;
  border: 1.5px solid var(--line-2); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--muted); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ------------------------------------------------------------ medals */
.medal { position: relative; flex: none; width: 92px; height: 92px; }
.medal::before, .medal::after {     /* the ribbon, behind the face */
  content: ""; position: absolute; top: 62%; width: 28px; height: 46px; background: var(--ribbon);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.medal::before { left: 18px; transform: rotate(16deg); }
.medal::after { right: 18px; transform: rotate(-16deg); }
.medal span {
  position: absolute; inset: 0; z-index: 1; border-radius: 50%; display: grid; place-items: center;
  font: 800 26px/1 var(--sans); color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%) 160% 0 / 260% 100% no-repeat,
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .55), transparent 32%),
    radial-gradient(circle, var(--face-1) 0 54%, var(--face-2) 55% 62%, var(--rim-1) 63% 78%, var(--rim-2) 79%);
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .8), 0 0 40px -6px var(--glow);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { background-position: 160% 0, 0 0, 0 0; } 100% { background-position: -60% 0, 0 0, 0 0; } }
.medal-gold { --face-1: #f59e0b; --face-2: #d97706; --rim-1: #fde68a; --rim-2: #b45309; --ribbon: #c2410c; --glow: rgba(245, 158, 11, .45); }
.medal-blue { --face-1: #3b82f6; --face-2: #1d4ed8; --rim-1: #e5e7eb; --rim-2: #9ca3af; --ribbon: #1d4ed8; --glow: rgba(59, 130, 246, .45); }

/* ------------------------------------------------------------ marquee */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; background: rgba(255, 255, 255, .012);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; gap: 54px; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { color: var(--muted); font-size: 15px; white-space: nowrap; }
.marquee b { color: var(--text); font-weight: 600; font-size: 21px; margin-right: 10px; font-family: var(--serif); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ sections */
.section { position: relative; padding: 150px 0; }
h2 { font-family: var(--serif); font-variation-settings: "opsz" 144; font-size: clamp(36px, 4.7vw, 60px); line-height: 1.06;
  letter-spacing: -.02em; margin-bottom: 26px; }
.muted-h { color: var(--muted); font-weight: 450; }
.entry {
  display: inline-block; margin-bottom: 26px; padding: 7px 14px 7px 13px; border-left: 2px solid var(--blue);
  border-radius: 0 10px 10px 0; background: linear-gradient(90deg, rgba(59, 130, 246, .1), rgba(59, 130, 246, .02));
  color: var(--soft); font-size: 15px;
}
.entry b { font: 600 16px var(--serif); color: var(--text); letter-spacing: .01em; }
.entry i { font-family: var(--serif); color: var(--muted); margin: 0 2px; }
.entry.center { display: block; width: fit-content; margin-inline: auto; }
.section p { color: var(--soft); }
.small-note { font-size: 15px; color: var(--muted) !important; }
.small-note b { color: var(--text); font-family: var(--serif); font-style: italic; font-weight: 500; }
.two-col { display: grid; grid-template-columns: 1fr 1.12fr; gap: 76px; align-items: center; }
.two-col.reverse .col-text { order: 2; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; }
.checks li { display: flex; gap: 12px; align-items: flex-start; margin: 13px 0; color: var(--soft); }
.checks .ico { color: var(--green); margin-top: 3px; }

/* the forgetting curve */
.curve-figure {
  margin: 0; padding: 26px 22px 18px; border-radius: 26px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .8);
}
.curve-figure svg { width: 100%; height: auto; overflow: visible; }
.axis line { stroke: var(--line-2); stroke-width: 1.5; }
.axis line.grid { stroke-dasharray: 4 6; stroke-width: 1; }
.axis text { fill: var(--muted); font: 500 15px var(--sans); }
.axis .axis-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; fill: var(--faint); }
.c-forget { fill: none; stroke: #6b7280; stroke-width: 2.5; stroke-dasharray: 7 7; opacity: .9; }
.c-memory { fill: none; stroke: var(--blue-2); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.c-area { opacity: 0; transition: opacity 1.4s 1.8s; }
.curve-figure.in .c-area { opacity: 1; }
.mark circle { fill: var(--bg); stroke: var(--green); stroke-width: 3; }
.mark text { fill: var(--text); font: 600 15.5px var(--sans); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.mark { opacity: 0; transform-box: fill-box; transform-origin: center; }
.mark.on { animation: pop .6s var(--spring) forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.curve-figure figcaption { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px;
  font-size: 13.5px; color: var(--muted); }
.legend { display: inline-block; width: 26px; height: 0; border-top: 3px solid var(--blue-2); margin-left: 14px; }
.legend.l-forget { border-top: 2.5px dashed #6b7280; margin-left: 0; }

/* one word in, a whole card out */
.maker-demo {
  padding: 22px; border-radius: 26px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .85);
}
.maker-input { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; }
.maker-label { grid-column: 1 / -1; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.maker-field { display: flex; align-items: center; min-height: 52px; padding: 0 16px; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--bg); font-size: 22px; font-weight: 600; }
.caret { width: 2px; height: 26px; margin-left: 2px; background: var(--blue-2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.maker-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; border-radius: 13px; font-weight: 600; font-size: 15px;
  background: linear-gradient(180deg, #4d8ff8, #2f6fe8); transition: transform .2s, filter .2s; }
.maker-btn.press { transform: scale(.95); filter: brightness(1.2); }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; display: none; animation: rot .8s linear infinite; }
.maker-btn.busy .spin { display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.maker-card { margin-top: 18px; padding: 6px 18px 8px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.mk-row { display: grid; grid-template-columns: 116px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.mk-row.show { opacity: 1; transform: none; }
.mk-row:first-child { border-top: 0; }
.mk-head { grid-template-columns: auto auto 1fr; align-items: baseline; gap: 12px; }
.mk-word { font-size: 32px; font-weight: 700; line-height: 1.1; }
.mk-reading { font: italic 18px var(--serif); color: var(--muted); }
.mk-type { justify-self: end; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 7px; padding: 3px 8px; }
.mk-k { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }
.mk-v { color: var(--soft); font-size: 15.5px; }
.mk-v small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.mk-trick { margin: 6px -8px 4px; padding: 12px 8px; border-top: 0; border-radius: 12px; background: rgba(59, 130, 246, .1);
  box-shadow: inset 3px 0 0 var(--blue); }
.mk-trick .mk-v { color: #bcd3ff; }

/* ------------------------------------------------------------ features */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 64px; }
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 24px 24px 22px; border-radius: 24px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  transition: border-color .3s, transform .4s var(--ease);
}
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(96, 165, 250, .13), transparent 45%);
}
.tile:hover { border-color: var(--line-2); }
.tile:hover::before { opacity: 1; }
.tile h3 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; margin: 20px 0 8px; }
.tile p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.6; }
.tile-art { position: relative; flex: 1; min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 22px;
  border-radius: 16px; border: 1px solid var(--line); background: rgba(0, 0, 0, .22); padding: 18px; overflow: hidden; }
.t-alpha, .t-talk { grid-column: span 3; grid-row: span 2; }
.t-story, .t-say, .t-quiz { grid-column: span 2; }
.t-badges, .t-sentences, .t-doctor, .t-sync { grid-column: span 3; }
.t-alpha .tile-art, .t-talk .tile-art { min-height: 300px; }

/* alphabet */
.alpha-art { flex-direction: column; gap: 26px; }
.hangul { display: flex; align-items: center; gap: 10px; font-size: 42px; font-weight: 700; }
.hangul .plus, .hangul .eq { color: var(--faint); font-size: 26px; font-weight: 400; }
.hangul .block { font-size: 64px; color: var(--text); text-shadow: 0 0 30px rgba(96, 165, 250, .6); }
.hangul .block-read { font: italic 18px var(--serif); color: var(--muted); align-self: flex-end; margin-bottom: 10px; }
.hangul > * { opacity: 0; transform: translateY(14px); }
.hangul.play > * { animation: rise .6s var(--spring) forwards; }
.hangul.play > :nth-child(2) { animation-delay: .25s; } .hangul.play > :nth-child(3) { animation-delay: .5s; }
.hangul.play > :nth-child(4) { animation-delay: .75s; } .hangul.play > :nth-child(5) { animation-delay: 1s; }
.hangul.play > :nth-child(6) { animation-delay: 1.4s; } .hangul.play > :nth-child(7) { animation-delay: 1.6s; }
.hangul.play > :nth-child(8) { animation-delay: 2s; }
.j1 { color: #f87171; } .j2 { color: #fbbf24; } .j3 { color: #4ade80; }
@keyframes rise { to { opacity: 1; transform: none; } }
.kana { display: flex; align-items: center; gap: 18px; }
.kana svg { width: 118px; height: 118px; border-radius: 14px; background:
  linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat,
  linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat, rgba(255, 255, 255, .03); border: 1px solid var(--line-2); }
.kana path { fill: none; stroke: var(--text); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.kana path.drawing { stroke: var(--blue-2); }
.kana text { fill: var(--amber); font: 700 8px var(--sans); }
.kana-label { font: italic 30px var(--serif); color: var(--muted); min-width: 2.2em; }

/* story */
.story-art { flex-direction: column; align-items: flex-start; gap: 4px; }
.st-line { font-size: 21px; color: var(--text) !important; margin: 0; }
.st-line mark { background: none; color: var(--blue-2); font-weight: 700; }
.st-read { font: italic 14px var(--serif); color: var(--muted) !important; margin: 0; }
.st-tr { font-size: 13.5px; color: var(--faint) !important; margin: 0; font-style: italic; }
.t-story.in .st-line mark { animation: glowmark 2.2s 1s ease-in-out infinite alternate; }
@keyframes glowmark { to { text-shadow: 0 0 18px rgba(96, 165, 250, .9); } }

/* talk */
.chat-art { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; padding: 22px; }
.bubble { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 17px; opacity: 0; transform: translateY(12px) scale(.97); }
.bubble small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.bubble b { font-weight: 600; }
.bubble.them { align-self: flex-start; background: rgba(59, 130, 246, .14); border-bottom-left-radius: 5px; }
.bubble.me { align-self: flex-end; background: rgba(34, 197, 94, .15); border-bottom-right-radius: 5px; }
.bubble.tip { align-self: flex-end; font-size: 13.5px; color: #fbbf24; background: rgba(245, 158, 11, .12); }
.chat-art.play .bubble { animation: rise .55s var(--spring) forwards; }
.chat-art.play .bubble.me { animation-delay: 1.2s; } .chat-art.play .bubble.tip { animation-delay: 2.1s; }
.chat-mic { position: absolute; right: 20px; bottom: 18px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #4d8ff8, #2f6fe8); box-shadow: 0 10px 30px -8px rgba(59, 130, 246, .8); }
.chat-mic .ico { width: 22px; height: 22px; }
.rings { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue-2); animation: ping 1.8s var(--ease) infinite; }

/* say it */
.say-art { flex-direction: column; gap: 14px; }
.wave { display: flex; align-items: center; gap: 4px; height: 64px; }
.wave i { width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--blue-2), var(--violet)); height: 20%;
  animation: bar var(--t, 1s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes bar { to { height: var(--h, 80%); } }
.heard { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; color: var(--soft) !important; }
.heard .ico { color: var(--green); width: 18px; height: 18px; }

/* quiz */
.quiz-art { flex-direction: column; gap: 14px; }
.quiz-art .q { margin: 0; font-size: 30px; font-weight: 600; color: var(--text) !important; }
.quiz-art .q small { font: italic 15px var(--serif); color: var(--muted); margin-left: 6px; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.opt { padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 14px; color: var(--soft); transition: all .4s var(--ease); }
.quiz-art.play .opt.right { border-color: var(--green); color: #4ade80; background: rgba(34, 197, 94, .12); transform: scale(1.06); transition-delay: 1s; }
.quiz-art.play .opt:not(.right) { opacity: .45; transition-delay: 1s; }

/* badges */
.badge-art { gap: 26px; }
.streak { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.streak .flame { font-size: 30px; animation: flicker 1.6s ease-in-out infinite alternate; }
.streak b { font: 700 38px var(--sans); color: var(--amber); margin-top: 4px; font-variant-numeric: tabular-nums; }
.streak small { font-size: 12px; color: var(--muted); margin-top: 6px; }
@keyframes flicker { 0% { transform: rotate(-4deg) scale(1); } 100% { transform: rotate(4deg) scale(1.08); } }
.heat { display: grid; grid-template-columns: repeat(7, 13px); gap: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: rgba(255, 255, 255, .06); transition: background-color .4s; }
.heat i.l1 { background: rgba(34, 197, 94, .35); } .heat i.l2 { background: rgba(34, 197, 94, .6); } .heat i.l3 { background: #22c55e; }

/* sentences */
.sent { margin: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sent span { display: block; transition: opacity .6s, transform .6s var(--ease), filter .6s; }
.sent-t { font: 600 25px/1.3 var(--sans); color: var(--text); }
.sent-m { font: italic 17px var(--serif); color: var(--muted); opacity: 0; transform: translateY(8px); filter: blur(4px); }
.sent.flip .sent-m { opacity: 1; transform: none; filter: none; }
.sent.away span { opacity: 0; transform: translateY(-8px); filter: blur(4px); }

/* word doctor */
.doctor-art { flex-direction: column; gap: 12px; }
.stuck { padding: 8px 14px; border-radius: 10px; font-size: 16px; font-weight: 600; background: rgba(239, 68, 68, .1); border: 1px dashed rgba(239, 68, 68, .5); color: #fca5a5; }
.stuck i { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 6px; }
.rx { font-size: 14.5px; color: #bcd3ff; padding: 8px 14px; border-radius: 10px; background: rgba(59, 130, 246, .1); box-shadow: inset 3px 0 0 var(--blue); }

/* two computers */
.sync-art { gap: 18px; }
.pc { position: relative; width: 74px; height: 50px; border-radius: 8px; border: 2px solid var(--soft); }
.pc::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: -10px; height: 6px; border-radius: 0 0 6px 6px; background: var(--soft); }
.pc + .sync-dots + .pc { width: 64px; height: 54px; }
.pc + .sync-dots + .pc::after { left: 22px; right: 22px; bottom: -12px; height: 10px; border-radius: 2px; }
.sync-dots { display: flex; gap: 8px; }
.sync-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-2); animation: hop 1.4s ease-in-out infinite; }
.sync-dots i:nth-child(2) { animation-delay: .2s; } .sync-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes hop { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }

/* ------------------------------------------------------------ screens */
.tabs { display: flex; width: fit-content; max-width: 100%; margin: 48px auto 0; padding: 5px; gap: 4px; overflow-x: auto;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); scrollbar-width: none; }
.tabs button { flex: none; padding: 9px 18px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font: 500 14.5px var(--sans); cursor: pointer; transition: color .2s, background-color .3s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); background: rgba(59, 130, 246, .22); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .35); }
.window {
  position: relative; max-width: 1060px; margin: 34px auto 0; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line-2); background: #0d1117;
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 120px -40px rgba(59, 130, 246, .35);
  transform: perspective(1800px) rotateX(var(--tilt, 0deg)) scale(var(--scale, 1));
}
.window.reveal { transition: opacity .9s var(--ease), transform .2s linear; }
.window-bar { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 12px; background: #090d13;
  border-bottom: 1px solid var(--line); }
.wb-title { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.wb-title img { border-radius: 3px; }
.wb-ctl { display: flex; gap: 18px; }
.wb-ctl i { width: 10px; height: 10px; border: 1px solid var(--faint); border-radius: 1px; }
.wb-ctl i:first-child { height: 0; border-width: 1px 0 0; margin-top: 5px; }
.wb-ctl i:last-child { border: 0; position: relative; }
.wb-ctl i:last-child::before, .wb-ctl i:last-child::after { content: ""; position: absolute; left: -1px; top: 4px; width: 12px; height: 1px; background: var(--faint); transform: rotate(45deg); }
.wb-ctl i:last-child::after { transform: rotate(-45deg); }
.window-body { position: relative; aspect-ratio: 16 / 10; background: #0d1117; }
.window-body img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .45s var(--ease); }
.window-body img.fade { opacity: 0; }
.shot-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .04); }
.shot-progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--blue-2); }
.shot-progress i.run { animation: fill var(--dur, 7s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.shot-caption { margin: 22px auto 0; max-width: 40em; text-align: center; color: var(--muted) !important; min-height: 3.3em; transition: opacity .3s; }

/* ------------------------------------------------------------ languages */
.lang-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 60px; }
.lang-grid .lang-card:nth-child(n+6) { --row: 2; }
.lang-card {
  position: relative; padding: 24px 20px 22px; border-radius: 22px; border: 1px solid var(--line); text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
  transition: transform .45s var(--spring), border-color .3s, box-shadow .45s var(--ease);
}
.lang-card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--hue) 55%, transparent);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--hue) 70%, transparent); }
.lang-card .flag { width: 46px; height: 31px; border-radius: 5px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .1); }
.hello { margin: 20px 0 0 !important; font-size: 25px; font-weight: 650; color: var(--text) !important; line-height: 1.25; }
.hello-read { margin: 2px 0 0 !important; font: italic 14.5px var(--serif); color: var(--muted) !important; }
.lang-card h3 { margin-top: 18px; font-size: 16px; font-weight: 650; }
.lang-note { margin: 4px 0 0 !important; font-size: 13.5px; color: var(--muted) !important; line-height: 1.5; }
.coming { margin-top: 34px; color: var(--muted) !important; font-size: 15.5px; }
.soon { display: inline-block; margin-top: 12px; padding: 7px 16px; border-radius: 999px; border: 1px dashed var(--line-2);
  color: var(--soft); font-size: 14px; }

/* ------------------------------------------------------------ levels */
.level-switch { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); width: fit-content; margin: 46px auto 0;
  padding: 6px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.level-switch button { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 22px; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; transition: color .3s; }
.level-switch button b { font-size: 15px; font-weight: 600; }
.level-switch button small { font-size: 11.5px; letter-spacing: .06em; }
.level-switch button[aria-selected="true"] { color: var(--text); }
.level-thumb { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: 0; border-radius: 13px;
  background: linear-gradient(180deg, rgba(59, 130, 246, .35), rgba(59, 130, 246, .18)); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .4);
  transition: left .5s var(--spring), width .5s var(--spring); }
.level-words { display: grid; grid-template-columns: repeat(3, minmax(0, 250px)); justify-content: center; gap: 14px; margin: 42px auto 26px; min-height: 200px; }
.lw { padding: 14px 22px 13px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .035); text-align: center;
  opacity: 0; transform: translateY(14px) scale(.96); animation: rise .6s var(--spring) forwards; animation-delay: var(--d); }
.lw b { display: block; font: 600 24px var(--serif); color: var(--text); }
.lw small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------ pricing */
.billing { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: fit-content; margin: 40px auto 0; padding: 5px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.billing button { position: relative; z-index: 1; padding: 9px 22px; border: 0; border-radius: 999px; background: none; color: var(--muted);
  font: 500 14.5px var(--sans); cursor: pointer; transition: color .3s; }
.billing button[aria-checked="true"] { color: var(--text); }
.billing-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: 0; border-radius: 999px; background: rgba(59, 130, 246, .3);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .4); transition: left .45s var(--spring), width .45s var(--spring); }
.billing button { white-space: nowrap; }
@media (max-width: 420px) { .billing button { padding: 9px 14px; } }
.save { margin-left: 6px; white-space: nowrap; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #052e16; background: var(--green); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 40px auto 0; }
.plan { position: relative; display: flex; flex-direction: column; padding: 32px 30px 30px; border-radius: 26px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012)); }
.plan h3 { font-size: 18px; font-weight: 650; color: var(--soft); }
.plan .price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 10px; }
.plan .price b { font: 600 52px/1 var(--serif); color: var(--text); letter-spacing: -.02em; transition: opacity .25s, transform .25s var(--ease); }
.plan .price b.swap { opacity: 0; transform: translateY(-8px); }
.plan .price span { color: var(--muted); font-size: 16px; }
.plan-lede { color: var(--muted) !important; font-size: 15px; min-height: 3.2em; }
.plan .checks { margin: 6px 0 28px; flex: 1; }
.plan .checks li { font-size: 15px; margin: 11px 0; }
.plan-pro {
  border: 1px solid transparent;
  background: linear-gradient(180deg, #151d2b, #111824) padding-box,
              linear-gradient(160deg, rgba(96, 165, 250, .8), rgba(167, 139, 250, .5), rgba(96, 165, 250, .15)) border-box;
  box-shadow: 0 40px 120px -40px rgba(59, 130, 246, .5);
}
.plan-flag { position: absolute; top: 22px; right: 22px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: #dbe8ff; background: rgba(59, 130, 246, .25); border: 1px solid rgba(96, 165, 250, .45); }
.forever { max-width: 760px; margin: 36px auto 0; text-align: center; font-size: 15.5px; color: var(--muted) !important; }
.forever b { color: var(--text); }

/* ------------------------------------------------------------ privacy */
.private-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 70px; align-items: start; }
.private h2 em { font-style: italic; color: var(--blue-2); }
.private-list { list-style: none; margin: 0; padding: 0; }
.private-list li { padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.private-list li:first-child { border-top: 0; padding-top: 6px; }
.private-list b { display: block; color: var(--text); font-size: 18px; margin-bottom: 4px; }

/* ------------------------------------------------------------ questions */
.faq-list { margin-top: 40px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: 24px 48px 24px 0; font-size: 18.5px; font-weight: 600;
  transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue-2); }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; border-radius: 2px;
  background: var(--muted); transition: transform .35s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details p { margin: 0; padding: 0 40px 24px 0; color: var(--muted) !important; animation: rise .45s var(--ease) both; }

/* ------------------------------------------------------------ download */
.final { overflow: hidden; padding-bottom: 170px; }
.final-glow { position: absolute; left: 50%; top: 52%; width: 900px; height: 600px; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .28), rgba(167, 139, 250, .1) 60%, transparent); filter: blur(10px); }
.final-icon { margin: 0 auto 26px; border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(59, 130, 246, .8); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
.final h2 { font-size: clamp(40px, 6vw, 76px); }
.final .lede { margin: 0 auto; }
.download-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 40px 0 18px; }
.dl-card { display: flex; align-items: center; gap: 16px; min-width: 270px; padding: 18px 22px; border-radius: 18px; text-align: left; color: var(--text);
  border: 1px solid var(--line-2); background: rgba(18, 25, 35, .8); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.dl-card:hover { text-decoration: none; transform: translateY(-4px); border-color: rgba(96, 165, 250, .6); }
.dl-card span { flex: 1; }
.dl-card b { display: block; font-size: 18px; }
.dl-card small { display: block; color: var(--muted); font-size: 13px; }
.dl-card.yours { border-color: rgba(96, 165, 250, .7); box-shadow: 0 20px 60px -20px rgba(59, 130, 246, .7); }
.mobile-note { max-width: 30em; margin: 26px auto 0; }

/* ------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line); padding: 46px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: start; }
.footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer nav a { color: var(--muted); font-size: 14.5px; }
.footer .muted { margin: 8px 0 0; font-size: 14px; font-family: var(--serif); font-style: italic; }
.credits { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; color: var(--faint); }
.credits a { color: var(--muted); }

/* ------------------------------------------------------------ install dialog */
.install { width: min(580px, calc(100vw - 32px)); padding: 30px 30px 24px; border-radius: 24px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .9); }
.install[open] { animation: card-in .5s var(--spring); }
.install::backdrop { background: rgba(5, 8, 12, .72); backdrop-filter: blur(6px); }
.install .close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.install .close:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.install-head { display: flex; gap: 16px; align-items: center; margin-right: 30px; }
.install-head img { border-radius: 12px; }
.install-head h2 { font: 650 21px/1.3 var(--sans); margin: 0; letter-spacing: 0; }
.install-head p { margin: 2px 0 0; font-size: 13.5px; word-break: break-all; }
.install-os { display: flex; gap: 6px; margin: 22px 0 6px; }
.install-os button { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line); background: none; color: var(--muted); font: 500 14px var(--sans); cursor: pointer; }
.install-os button[aria-selected="true"] { color: var(--text); border-color: rgba(96, 165, 250, .5); background: rgba(59, 130, 246, .15); }
.steps { list-style: none; counter-reset: step; margin: 14px 0 6px; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 12px 0 12px 50px; border-top: 1px solid var(--line); color: var(--soft); font-size: 15px; }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 11px; width: 32px; height: 32px; border-radius: 50%; display: grid;
  place-items: center; font-weight: 700; font-size: 14px; color: var(--blue-2); background: rgba(59, 130, 246, .14); border: 1px solid rgba(96, 165, 250, .35); }
.steps li b { color: var(--text); }
.steps li small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.install-foot { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------ confetti */
.confetti { position: fixed; inset: 0; z-index: 180; pointer-events: none; }

/* ------------------------------------------------------------ smaller screens */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .two-col { grid-template-columns: 1fr; gap: 50px; }
  .two-col.reverse .col-text { order: 0; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .t-alpha, .t-talk { grid-column: span 2; grid-row: auto; }
  .t-story, .t-say, .t-quiz, .t-badges, .t-sentences, .t-doctor, .t-sync { grid-column: span 1; }
  .t-quiz { grid-column: span 2; }
  .lang-grid { grid-template-columns: repeat(3, 1fr); }
  .private-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { gap: 12px; height: 64px; }
  .nav-links {
    position: absolute; top: 64px; left: 12px; right: 12px; flex-direction: column; gap: 0; padding: 8px; margin: 0;
    border-radius: 16px; border: 1px solid var(--line-2); background: #0e131c; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease);
  }
  .nav-links a { padding: 13px 14px; border-radius: 10px; }
  .nav-links a::after { display: none; }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav.open { background: rgba(11, 15, 22, .95); }
  .nav-cta { margin-left: auto; }
  .nav-cta span { display: none; }
  .nav-toggle { display: block; }
  .section { padding: 100px 0; }
  .hero { padding-top: 104px; }
  .demo-stage { height: 470px; }
  .hero-cat { width: 78px; height: 78px; top: -30px; right: -8px; border-radius: 20px; }
  .face { padding: 22px; }
  .bento { grid-template-columns: 1fr; }
  .t-alpha, .t-talk, .t-story, .t-say, .t-quiz, .t-badges, .t-sentences, .t-doctor, .t-sync { grid-column: auto; }
  .t-alpha .tile-art, .t-talk .tile-art { min-height: 260px; }
  .hangul { font-size: 32px; gap: 7px; } .hangul .block { font-size: 50px; }
  .lang-grid { grid-template-columns: 1fr 1fr; }
  .level-switch { grid-template-columns: repeat(2, 1fr); }
  .level-words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-switch button { padding: 10px 14px; }
  .plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mk-row { grid-template-columns: 1fr; gap: 3px; }
  .mk-head { grid-template-columns: auto 1fr; }
  .mk-type { grid-column: 1 / -1; justify-self: start; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .glyphs { display: none; }
  .marquee-track { animation: none; }
}

/* ------------------------------------------------------------ the privacy page */
.doc-page .nav-back { margin-left: auto; }
.doc { max-width: 800px; padding-top: 140px; padding-bottom: 100px; }
.doc h1 { font-family: var(--serif); font-variation-settings: "opsz" 144; font-size: clamp(46px, 7vw, 76px); letter-spacing: -.025em; line-height: 1.05; }
.doc-date { color: var(--muted); margin-top: 12px; }
.doc section { margin-top: 46px; }
.doc h2 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 14px; }
.doc p, .doc li { color: var(--soft); }
.doc ul:not(.checks) { padding-left: 22px; margin: 0 0 1em; }
.doc ul:not(.checks) li { margin: 6px 0; }
.doc ul:not(.checks) li::marker { color: var(--blue-2); }
.doc code { padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); font: 14px ui-monospace, "Cascadia Code", Menlo, monospace; color: var(--text); }
.doc-short { padding: 26px 28px 12px; border-radius: 22px; border: 1px solid rgba(96, 165, 250, .3);
  background: linear-gradient(180deg, rgba(59, 130, 246, .1), rgba(59, 130, 246, .03)); }
.doc-short .checks { margin-top: 6px; }
.doc-short b { color: var(--text); }
.todo { padding: 2px 8px; border-radius: 6px; border: 1px dashed var(--amber); color: var(--amber); }
