:root {
  --bg: #F7F2E6;
  --bg-alt: #EFE8D6;
  --card: #FFFFFF;
  --ink: #16302B;
  --muted: #4A5E58;
  --accent: #2C685E;
  --accent-2: #3A897E;
  --line: #D9D2BE;
  --shadow: 0 1px 2px rgba(22, 48, 43, .06), 0 12px 32px rgba(22, 48, 43, .10);
  --hero-bg: radial-gradient(120% 90% at 50% 0%, #1B3932 0%, #16302B 70%);
  --btn-bg: #16302B;
  --btn-ink: #F7F2E6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F211D;
    --bg-alt: #13292A;
    --card: #1B3932;
    --ink: #F7F2E6;
    --muted: #B9C7C1;
    --accent: #7CC4B8;
    --accent-2: #3A897E;
    --line: #2C4A43;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    --hero-bg: radial-gradient(120% 90% at 50% 0%, #1B3932 0%, #0F211D 75%);
    --btn-bg: #F7F2E6;
    --btn-ink: #16302B;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, .skip:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap { width: min(100% - 40px, 1040px); margin-inline: auto; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--btn-bg); color: var(--btn-ink); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; text-align: center; }
h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); line-height: 1.15; text-align: center; margin: 6px 0 40px; letter-spacing: -.01em; }
section { padding: clamp(56px, 9vw, 104px) 0; }

/* Hero: always the deep green, in both themes */
.hero { background: var(--hero-bg); color: #F7F2E6; text-align: center; padding: clamp(56px, 10vw, 112px) 0 clamp(48px, 8vw, 88px); }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.app-icon { width: clamp(104px, 28vw, 144px); height: auto; aspect-ratio: 1; border-radius: 22.5%; box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 0 0 1px rgba(247, 242, 230, .12); }
.wordmark { font-size: clamp(2.8rem, 12vw, 5rem); line-height: 1.05; letter-spacing: -.03em; margin: 28px 0 12px; font-weight: 800; }
.promise { font-size: clamp(1.1rem, 3.6vw, 1.45rem); max-width: 30ch; color: #E4DFD0; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; margin-top: 32px; }
.badges a { display: block; line-height: 0; }
.badges a:focus-visible { outline-color: #F7F2E6; }
.badges img { display: block; }
.badges li:first-child img { height: 50px; width: auto; }
.badges li:last-child img { height: 65px; width: auto; }
.trial-note { margin-top: 16px; color: #C9D6D0; font-size: .95rem; }

/* The name */
.name { background: var(--bg); }
.entries { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; max-width: 880px; margin-inline: auto; }
.entry { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 28px 28px 30px; }
.entry h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 2rem; line-height: 1.2; }
.headword { color: var(--ink); }
.ipa { font: 400 1rem/1 system-ui, sans-serif; color: var(--muted); margin-left: 6px; }
.pos { font-style: italic; color: var(--accent); margin: 4px 0 10px; }
.def { font-size: 1.1rem; }
.ety { color: var(--muted); margin-top: 12px; }
.places { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.places li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.places li span { font-weight: 400; color: var(--muted); }
.join { text-align: center; font-size: 2rem; color: var(--accent); line-height: 1; }
.merged { text-align: center; margin-top: 12px; }
.equals { font-size: 2rem; color: var(--accent); line-height: 1.2; }
.merged-word { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: clamp(3rem, 15vw, 6rem); line-height: 1.1; letter-spacing: -.02em; display: flex; justify-content: center; }
.m-tap { color: var(--accent); }
.m-wick { color: var(--ink); }
.merged-gloss { font-size: 1.25rem; color: var(--muted); font-style: italic; margin-top: 4px; }
@media (min-width: 760px) {
  .entries { grid-template-columns: 1fr auto 1fr; gap: 20px; }
  .join { align-self: center; }
}

/* Animation: only when armed by reveal.js (never under reduced motion) */
.armed .entry-tap { transform: translateX(-36px); }
.armed .entry-wic { transform: translateX(36px); }
.armed .equals, .armed .merged-gloss { opacity: 0; }
.armed .m-tap { transform: translateX(-60px); opacity: 0; }
.armed .m-wick { transform: translateX(60px); opacity: 0; }
.armed .entry, .armed .m-tap, .armed .m-wick { transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .9s ease; }
.armed .equals, .armed .merged-gloss { transition: opacity .6s ease; }
.armed.play .entry, .armed.play .m-tap, .armed.play .m-wick { transform: none; opacity: 1; }
.armed.play .entry { transition-delay: .2s; }
.armed.play .equals { opacity: 1; transition-delay: 1s; }
.armed.play .m-tap, .armed.play .m-wick { transition-delay: 1.1s; }
.armed.play .merged-gloss { opacity: 1; transition-delay: 1.9s; }

/* How it works */
.how { background: var(--bg-alt); }
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; position: relative; }
.steps li::before { content: counter(step); position: absolute; top: 18px; right: 20px; font-weight: 800; font-size: 1.1rem; color: var(--accent); }
.steps svg { width: 56px; height: 56px; margin-bottom: 14px; }
.s-fill { fill: var(--accent-2); }
.s-line { fill: none; stroke: var(--accent); stroke-width: 4; }
.s-stroke { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.steps .s-fill ~ .s-stroke { stroke: #fff; }
.s-dot { fill: var(--accent); }
.steps h3, .cards h3 { font-size: 1.15rem; line-height: 1.3; margin-bottom: 6px; }
.steps p, .cards p { color: var(--muted); }
@media (min-width: 560px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Features */
.cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
.cards li { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; }
.tags-card { background: var(--hero-bg) !important; border-color: transparent !important; }
.cards .tags-card h3 { color: #F7F2E6; }
.cards .tags-card p { color: #D4DED9; }
.btn { display: inline-block; margin-top: 16px; background: #F7F2E6; color: #16302B; font-weight: 700; padding: 10px 20px; border-radius: 999px; text-decoration: none; }
.btn:hover { background: #fff; }
.btn:focus-visible { outline-color: #F7F2E6; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ety i { white-space: nowrap; }
