/* Layout: one 1040px column; tricolour band is the brand device. Country colours come from --c1/--c2/--c3 (set per country in config). */
:root {
  --c1: #1b2a5c; --c2: #ffffff; --c3: #d6303c;
  --bg: #f6f7fb; --fg: #18213d; --muted: #5a6480; --line: #dde1ec; --card: #ffffff; --tint: #eaf0fb;
  --accent: #1f3f99; --accent-fg: #ffffff; --hot: #c22a35;
  --ok: #157347; --ok-bg: #e6f4ec; --bad: #b42318; --bad-bg: #fdecea;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1424; --fg: #e9ecf5; --muted: #a2abc4; --line: #273050; --card: #161d33; --tint: #1b2546;
    --accent: #8fb0ff; --accent-fg: #0f1424; --hot: #ff7a84;
    --ok: #5dd39e; --ok-bg: #12291f; --bad: #ff8a80; --bad-bg: #2f1715; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1424; --fg: #e9ecf5; --muted: #a2abc4; --line: #273050; --card: #161d33; --tint: #1b2546;
  --accent: #8fb0ff; --accent-fg: #0f1424; --hot: #ff7a84;
  --ok: #5dd39e; --ok-bg: #12291f; --bad: #ff8a80; --bad-bg: #2f1715; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--font); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 0 0 .6em; }
h3 { font-size: 1.1rem; margin: 0 0 .3em; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 28px 56px; }
.narrow { max-width: 760px; }

/* Tricolour band */
.tricolore { display: flex; height: 6px; }
.tricolore i { flex: 1; }
.tricolore i:nth-child(1) { background: var(--c1); } .tricolore i:nth-child(2) { background: var(--c2); } .tricolore i:nth-child(3) { background: var(--c3); }

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-family: var(--display); font-weight: 800; font-size: 1.2rem; }
.mark { display: inline-flex; width: 26px; height: 26px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.mark i { flex: 1; } .mark i:nth-child(1) { background: var(--c1); } .mark i:nth-child(2) { background: var(--c2); } .mark i:nth-child(3) { background: var(--c3); }
.brand small { font-family: var(--font); font-weight: 500; font-size: .85rem; color: var(--muted); }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.menu a { text-decoration: none; color: var(--fg); padding: 6px 10px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--tint); color: var(--accent); }
.menu a.lang { border: 1px solid var(--line); }
.menu a.cta { background: var(--accent); color: var(--accent-fg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn.hot { background: var(--hot); color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

/* Home */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; padding-block: 12px 8px; }
.hero > * { min-width: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hot); margin-bottom: 10px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-art svg, .hero-art img { width: 100%; height: auto; display: block; border-radius: 22px; box-shadow: 0 20px 50px -30px rgba(27, 42, 92, .55); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-block: 32px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.facts div { padding: 16px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; }
.facts b { display: block; font-family: var(--display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .9rem; }
.section { margin-block: 48px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tint); color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.theme { display: flex; justify-content: space-between; gap: 12px; align-items: center; text-decoration: none; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.theme:hover { border-color: var(--accent); }
.theme span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; white-space: nowrap; }
.premium-band { background: var(--c1); color: #fff; border-radius: 18px; padding: 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; }
.premium-band h2 { color: #fff; }
.premium-band p, .premium-band li { color: #d9e1f7; }
.premium-band .btn { background: #fff; color: var(--c1); }
.prose { max-width: 70ch; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

/* Practice app */
.muted { color: var(--muted); font-size: .92rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.card { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font: inherit; color: var(--fg); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.card:hover { border-color: var(--accent); }
.card.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.card.primary span { color: inherit; opacity: .85; }
.card span { color: var(--muted); font-size: .9rem; }
.card.locked { opacity: .7; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.q { font-size: 1.35rem; }
.opts { display: grid; gap: 10px; padding: 0; }
.opt { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; font: inherit; color: var(--fg); cursor: pointer; }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.ok, ol.opts li.ok { border-color: var(--ok); background: var(--ok-bg); }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); }
ol.opts { list-style-position: inside; }
ol.opts li { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--card); }
.fb { border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; }
.fb.ok { background: var(--ok-bg); border: 1px solid var(--ok); }
.fb.bad { background: var(--bad-bg); border: 1px solid var(--bad); }
.fb p { margin: 6px 0 0; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); }
.review li { margin-bottom: 14px; }
.notice { background: var(--tint); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.qlist li { margin: 5px 0; }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--display); font-size: 2rem; font-weight: 800; margin: 0; }
.features { padding-left: 1.2em; } .features li { margin: 6px 0; }
.unlock { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.unlock input { flex: 1 1 220px; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
select { font: inherit; padding: 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }

/* Footer */
footer.site { background: var(--card); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
footer.site .wrap { padding-block: 24px 32px; display: grid; gap: 6px; }
footer.site a { color: var(--muted); }

@media (max-width: 760px) {
  .hero, .premium-band { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .top { position: static; }
}
