:root {
  --blue: #1F5BD8;
  --blue-soft: rgba(31, 91, 216, .1);
  --red: #D7263D;
  --red-soft: rgba(215, 38, 61, .09);
  --ink: #0F1B33;
  --muted: #55607A;
  --line: #E3E8F2;
  --bg: #FFFFFF;
  --bg-soft: #F4F7FC;
  --card: #FFFFFF;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #6E9BFF;
    --blue-soft: rgba(110, 155, 255, .14);
    --red: #FF6B7D;
    --red-soft: rgba(255, 107, 125, .12);
    --ink: #EEF2FA;
    --muted: #A6B0C6;
    --line: #26314A;
    --bg: #0B1222;
    --bg-soft: #111A2E;
    --card: #141E35;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { color: #fff; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 12px; font-weight: 600; text-decoration: none; font-size: .95rem; border: 0; cursor: pointer; font-family: inherit; transition: transform .15s ease, opacity .15s ease; }
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { background: var(--blue); padding: 9px 16px; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* Hero */
.hero { padding: 56px 0 40px; background: radial-gradient(1200px 500px at 80% -10%, var(--blue-soft), transparent 70%); }
.hero.home { padding: 80px 0 64px; text-align: center; }
.hero-inner { max-width: 820px; }
.hero.home .hero-inner { margin: 0 auto; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }
.eyebrow { display: inline-flex; font-size: .85rem; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 18px; }
.hero.home h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); }
.hero h1 em { font-style: normal; color: var(--blue); }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 40em; }
.hero.home .lede { margin: 0 auto 30px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; }
.rating { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .95rem; }
.stars { color: #F5A623; letter-spacing: 2px; }
.small-note { margin-top: 14px; font-size: .9rem; color: var(--muted); }

/* Generic sections (home and tools) */
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.2; letter-spacing: -.01em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }
a.card { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--blue); transform: translateY(-2px); }
a.card .more { color: var(--blue); font-weight: 600; font-size: .92rem; margin-top: 10px; display: inline-block; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); margin-bottom: 14px; }
.icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps-row { counter-reset: s; }
.steps-row .card::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.sound { display: flex; gap: 16px; }
.ipa-chip { flex: none; min-width: 64px; height: 48px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; font-weight: 600; color: var(--red); background: var(--red-soft); font-family: "Lucida Sans Unicode", "Arial Unicode MS", "Segoe UI", sans-serif; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-soft); }
td .ipa, td.ipa { font-family: "Lucida Sans Unicode", "Arial Unicode MS", "Segoe UI", sans-serif; }

/* Prose pages */
.prose-wrap { padding-top: 8px; padding-bottom: 56px; }
.prose { max-width: 760px; font-size: 1.07rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -.01em; margin-top: 2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose .table-wrap { margin-top: 1.4em; }
.prose blockquote, .callout { border-left: 3px solid var(--blue); background: var(--bg-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.prose .ipa { font-family: "Lucida Sans Unicode", "Arial Unicode MS", "Segoe UI", sans-serif; color: var(--red); white-space: nowrap; }
.toc { background: var(--bg-soft); border-radius: var(--radius); padding: 18px 22px; font-size: .97rem; }
.toc strong { display: block; margin-bottom: 6px; }
.toc ol { padding-left: 1.2em; }
.toc a { text-decoration: none; }

/* FAQ */
.faq { max-width: 760px; margin-top: 56px; }
.faq h2 { font-size: 1.6rem; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin-top: 10px; }

/* Related */
.related { margin-top: 56px; }
.related h2 { font-size: 1.35rem; margin-bottom: 16px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .rel-grid { grid-template-columns: 1fr; } }
.rel-card { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--card); transition: border-color .15s; }
.rel-card:hover { border-color: var(--blue); }
.rel-card span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }

/* CTA band */
.cta-wrap { padding: 24px 0 72px; }
.cta-band { text-align: center; background: linear-gradient(135deg, #1F5BD8, #0F2F7A); color: #fff; border-radius: 28px; padding: 56px 24px; }
.cta-band h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: 10px; }
.cta-band p { opacity: .85; font-size: 1.05rem; margin: 0 auto 26px; max-width: 34em; }
.cta-band .btn { background: #fff; color: #0F1B33; }
.cta-band .cta-note { font-size: .9rem; margin: 16px 0 0; opacity: .75; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--muted); font-size: .92rem; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr .8fr; gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer .brand { margin-bottom: 10px; font-size: 1rem; }
.site-footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin: 0 0 10px; }
.site-footer h3 + ul + h3 { margin-top: 18px; }
.site-footer ul { list-style: none; }
.site-footer li + li { margin-top: 6px; }
.site-footer ul.cols { columns: 2; column-gap: 16px; }
.site-footer ul.cols li { break-inside: avoid; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer p + p { margin-top: 10px; }
.copyright { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Pronunciation answer box */
.answer { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 6px 22px; }
.answer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0; }
.answer-row + .answer-row { border-top: 1px solid var(--line); }
.answer .label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.answer .ipa { font-size: 1.7rem; font-weight: 600; color: var(--red); margin-right: 10px; }
.answer .ipa.us { color: var(--muted); }
.answer .respell { color: var(--muted); font-size: 1rem; }
.voice-note { font-size: .88rem; color: var(--muted); padding: 0 0 14px; }
.say { border: 1px solid var(--line); background: var(--card); color: var(--blue); border-radius: 999px; width: 30px; height: 30px; cursor: pointer; font-size: .8rem; font-family: inherit; vertical-align: middle; }
.say.big { width: auto; height: auto; padding: 10px 16px; font-weight: 600; font-size: .95rem; background: var(--blue); color: #fff; border: 0; }
.say.big.alt { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.say:hover { border-color: var(--blue); }
.sentences { list-style: none; padding-left: 0 !important; }
.sentences li { display: flex; align-items: center; gap: 12px; }
.steps li::marker { color: var(--blue); font-weight: 700; }

/* Tools */
.tool { max-width: 760px; }
.tool-box { border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 28px; box-shadow: 0 20px 50px -30px rgba(15, 27, 51, .35); }
.tool-input { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-input input { flex: 1 1 260px; font: inherit; font-size: 1.1rem; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.tool-input input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font: inherit; font-size: .9rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-decoration: none; }
.chip:hover { border-color: var(--blue); color: var(--blue); }

/* Quiz */
.quiz-progress { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .25s; }
.quiz-q { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.quiz-hint { color: var(--muted); margin-bottom: 18px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-options button { text-align: left; font: inherit; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.quiz-options button:hover, .quiz-options button:focus-visible { border-color: var(--blue); background: var(--blue-soft); outline: none; }
.quiz-options small { display: block; color: var(--muted); }
.quiz-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--muted); font-size: .9rem; }
.quiz-meta button { font: inherit; background: none; border: 0; color: var(--blue); cursor: pointer; }
.result-name { font-size: 2rem; line-height: 1.15; margin: 4px 0 10px; color: var(--blue); }
.result-bars { margin: 20px 0; display: grid; gap: 8px; }
.result-bars div { display: grid; grid-template-columns: 150px 1fr 44px; gap: 10px; align-items: center; font-size: .92rem; }
.result-bars i { display: block; height: 8px; border-radius: 999px; background: var(--blue); }
.result-bars b { font-weight: 600; text-align: right; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (max-width: 520px) { .tool-box { padding: 20px; } .result-bars div { grid-template-columns: 110px 1fr 40px; } }
