/* ------------------------------------------------------------------
   Almost Swedish — public site
   Palette: Swedish flag blue + gold, warm-cream paper, deep navy.
   Type: Bricolage Grotesque (display), Manrope (body),
         Instrument Serif italic (flourish accents).
------------------------------------------------------------------ */

:root {
  --blue: #006aa7;
  --blue-deep: #003a5c;
  --blue-ink: #00253c;
  --gold: #fecc00;
  --gold-deep: #d9a900;
  --gold-soft: #fff3cf;
  --flag-blue: #006aa7;
  --flag-gold: #fecc00;
  --ink: #0b1f33;
  --ink-soft: #44586b;
  --paper: #faf6ec;
  --paper-warm: #f3ebd6;
  --white: #ffffff;
  --line: #e6dcc1;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --shadow-sm: 0 1px 0 rgba(11, 31, 51, 0.04), 0 2px 8px rgba(11, 31, 51, 0.05);
  --shadow: 0 4px 14px rgba(0, 58, 92, 0.08), 0 24px 60px -20px rgba(0, 58, 92, 0.18);
  --shadow-blue: 0 24px 80px -20px rgba(0, 58, 92, 0.45);

  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Instrument Serif', 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

/* ------------------------------------------------------------------ NAV */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 236, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand [data-i18n='brand'] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand__mark {
  width: 34px;
  height: 24px;
  border-radius: 4px;
  background: var(--flag-blue);
  position: relative;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.brand__mark::before,
.brand__mark::after {
  content: '';
  position: absolute;
  background: var(--flag-gold);
}
.brand__mark::before {
  left: 11px;
  top: 0;
  bottom: 0;
  width: 4px;
}
.brand__mark::after {
  top: 10px;
  left: 0;
  right: 0;
  height: 4px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav a:hover {
  background: rgba(0, 106, 167, 0.08);
  text-decoration: none;
}
.nav a.is-active {
  background: var(--ink);
  color: var(--paper);
}
.nav-toggle {
  display: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin-left: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}
.lang button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
}
.lang button.is-on {
  background: var(--ink);
  color: var(--gold);
}

:root[dir='rtl'] {
  direction: rtl;
}
:root[dir='rtl'] .topbar__inner,
:root[dir='rtl'] .hero__inner,
:root[dir='rtl'] .consent__copy,
:root[dir='rtl'] .modal__panel--settings {
  text-align: right;
}
:root[dir='rtl'] .nav {
  margin-left: 0;
  margin-right: auto;
}
:root[dir='rtl'] .topbar__tools,
:root[dir='rtl'] .lang,
:root[dir='rtl'] .cta-pill {
  margin-left: 0;
}
:root[dir='rtl'] .topbar__tools {
  margin-right: 8px;
}
:root[dir='rtl'] .lang {
  margin-right: 10px;
}
:root[dir='rtl'] .cta-pill {
  margin-right: 6px;
}
:root[dir='rtl'] .hero__ctas,
:root[dir='rtl'] .consent__actions {
  justify-content: flex-start;
}
:root[dir='rtl'] .modal__close {
  left: 14px;
  right: auto;
}
:root[dir='rtl'] .modal__head .modal__close {
  position: static;
}
:root[dir='rtl'] .set-palette,
:root[dir='rtl'] .set-link {
  text-align: right;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--gold);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  margin-left: 6px;
  white-space: nowrap;
}
.cta-pill:hover {
  background: var(--blue-ink);
  text-decoration: none;
}

/* ------------------------------------------------------------------ HERO */

.hero {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__cross {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
}
.hero__cross::before,
.hero__cross::after {
  content: '';
  position: absolute;
  background: var(--flag-blue);
}
.hero__cross::before {
  top: 0;
  bottom: 0;
  right: 12%;
  width: 56px;
}
.hero__cross::after {
  left: 0;
  right: 0;
  top: 38%;
  height: 56px;
}

.hero__inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 140px 28px 130px;
  display: block;
}
.hero__col {
  max-width: 760px;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--blue);
  padding: 0;
  border-radius: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 22px 0 28px;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
.hero p.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0;
}

.hero__ctas {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: 0;
  transition:
    transform 0.08s,
    box-shadow 0.15s,
    background 0.15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn--gold {
  background: var(--ink);
  color: var(--gold);
}
.btn--gold:hover {
  background: var(--blue);
  color: var(--gold);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn--ink {
  background: var(--ink);
  color: var(--gold);
}

/* ------------------------------------------------------------------ SECTION FRAMING */

section.band {
  padding: 140px 28px;
  border-top: 1px solid var(--line);
}
.wrap {
  max-width: 1240px;
  margin: 0 auto;
}
.wrap--narrow {
  max-width: 820px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow .num {
  display: none;
}

h2.headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 16px 0 22px;
  max-width: 20ch;
  text-wrap: balance;
}
h2.headline em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}

p.deck {
  font-size: 19px;
  line-height: 1.55;
  max-width: 56ch;
  color: var(--ink-soft);
  margin: 0 0 56px;
}

/* ------------------------------------------------------------------ DEMO QUESTION */

.demo {
  background: var(--paper);
  position: relative;
}
.qcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px;
  position: relative;
  margin-top: 24px;
}
.qcard__chip {
  position: absolute;
  top: -14px;
  left: 26px;
  background: var(--gold);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  white-space: nowrap;
}
.qcard__q {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 8px 0 22px;
  text-wrap: balance;
}
.qcard__opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qopt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--paper-warm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: inherit;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.08s;
}
.qopt:hover {
  background: var(--gold-soft);
}
.qopt .key {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--white);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
}
.qopt.is-correct {
  background: #dff0e2;
  border-color: #1e874b;
}
.qopt.is-correct .key {
  background: #1e874b;
  color: white;
  border-color: #1e874b;
}
.qopt.is-wrong {
  background: #fbe1d6;
  border-color: #c2410c;
}
.qopt.is-wrong .key {
  background: #c2410c;
  color: white;
  border-color: #c2410c;
}
.qopt[disabled] {
  cursor: default;
}

.qcard__explain {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  line-height: 1.55;
  display: none;
}
.qcard.is-answered .qcard__explain {
  display: block;
}
.qcard__explain b {
  color: var(--ink);
}

.qcard__meta {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-family: var(--mono);
}
.qcard__meta button {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.qcard__meta button:hover {
  background: var(--ink);
  color: var(--gold);
}

/* ------------------------------------------------------------------ QUIET LIST (chapters) */

.quiet {
  background: var(--paper);
}
.list-quiet {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.list-quiet li {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: padding-left 0.2s;
}
.list-quiet li:hover {
  padding-left: 12px;
}
.list-quiet__n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  min-width: 32px;
  letter-spacing: 0.08em;
}
.list-quiet__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}
.list-quiet__meta {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

/* ------------------------------------------------------------------ FAQ */

.faq__list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-block: 1.5px solid var(--ink);
}
.faq__item {
  border-top: 1px solid var(--line);
  padding: 22px 4px;
  cursor: pointer;
}
.faq__item:first-child {
  border-top: 0;
}
.faq__item summary {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  list-style: none;
  cursor: pointer;
  text-wrap: balance;
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary::before {
  content: '+';
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  transition:
    transform 0.2s,
    background 0.2s;
}
.faq__item[open] summary::before {
  transform: rotate(45deg);
  background: var(--blue);
}
.faq__item p {
  margin: 14px 0 0 54px;
  color: var(--ink-soft);
  font-size: 16.5px;
  max-width: 60ch;
}
.faq__item p em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}

/* ------------------------------------------------------------------ FOOTER */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 70px 28px 30px;
}
.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 14px;
  color: var(--gold);
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer a {
  color: var(--paper);
  opacity: 0.8;
  font-weight: 500;
}
.footer a:hover {
  opacity: 1;
  color: var(--gold);
}
.footer__brag {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  max-width: 22ch;
}
.footer__brag em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.footer__rule {
  grid-column: 1 / -1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 30px 0 16px;
}
.footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 14px;
}

/* ------------------------------------------------------------------ DOC PAGES */

.doc {
  background: var(--paper);
  padding: 80px 28px 120px;
  min-height: 70vh;
}
.doc__inner {
  max-width: 820px;
  margin: 0 auto;
}
.doc__back {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--ink-soft);
}
.doc__back a {
  color: var(--ink-soft);
}
.doc__kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 14px;
}
.doc h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 14px 0 22px;
  max-width: 16ch;
  text-wrap: balance;
}
.doc h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
.doc__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}
.doc__meta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.doc__meta b {
  color: var(--ink);
}

.doc__body {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 52px;
  align-items: start;
}
.doc__nav {
  position: sticky;
  top: 90px;
  font-size: 14px;
}
.doc__nav h5 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.doc__nav ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: section;
}
.doc__nav li {
  counter-increment: section;
  margin: 6px 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.doc__nav li::before {
  content: counter(section, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
}
.doc__nav a {
  color: var(--ink);
  font-weight: 600;
}

.doc__main h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 48px 0 14px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.doc__main > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.doc__main h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  margin: 26px 0 6px;
}
.doc__main p,
.doc__main li {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
}
.doc__main ul {
  padding-left: 22px;
}
.doc__main li {
  margin: 4px 0;
}
.callout {
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  padding: 16px 18px;
  border-radius: 0 14px 14px 0;
  margin: 20px 0;
}
.callout--blue {
  border-color: var(--blue);
  background: #e7f1f8;
}
.callout b {
  color: var(--ink);
}

/* ------------------------------------------------------------------ PAGE SWITCH */

[data-page] {
  display: none;
}
[data-page].is-active {
  display: block;
}

/* ------------------------------------------------------------------ PRACTICE */

.practice {
  background: var(--paper);
  padding: 100px 28px 140px;
  min-height: 80vh;
}
.practice__inner {
  max-width: 720px;
  margin: 0 auto;
}
.practice__inner--wide {
  max-width: 1080px;
}
.practice__head {
  text-align: center;
  margin-bottom: 48px;
}
.practice__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 12px 0 0;
  text-wrap: balance;
}
.practice__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}

.hub {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hub__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.hub__stats > div,
.hub__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.hub__stats > div {
  min-height: 112px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hub__statlabel,
.hub__statof,
.hub__meta {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hub__statvalue {
  display: inline-block;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--ink);
}
.hub__quickbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  background: var(--paper-warm);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
}
.hub__quickbtn:hover {
  background: var(--ink);
  color: var(--gold);
  text-decoration: none;
}
.hub__quickbtn--gold {
  background: var(--gold);
  color: var(--ink);
}
.hub__h2 {
  margin: 8px 0 -8px;
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}
.hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.hub__card {
  min-height: 176px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}
.hub__card:hover {
  border-color: var(--blue);
  text-decoration: none;
  transform: translateY(-1px);
}
.hub__row,
.hub__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hub__emoji {
  font-size: 26px;
  line-height: 1;
}
.hub__num,
.hub__acc {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--blue);
}
.hub__acc {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink);
}
.hub__title {
  margin: 0;
  min-height: 2.4em;
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: 0;
}
.hub__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-warm);
}
.hub__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.hub__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

.quiz {
  position: relative;
}
.quiz__progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 28px;
}
.quiz__dot {
  height: 4px;
  flex: 1;
  max-width: 40px;
  background: var(--line);
  border-radius: 999px;
  transition:
    background 0.2s,
    transform 0.12s;
  /* button reset (navigable dots render as <button>) */
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  position: relative;
}
button.quiz__dot.is-nav {
  cursor: pointer;
}
/* enlarge the tap target without changing the slim visual */
button.quiz__dot.is-nav::after {
  content: '';
  position: absolute;
  inset: -9px -2px;
}
button.quiz__dot.is-nav:hover {
  transform: scaleY(2);
}
button.quiz__dot:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.quiz__dot.is-on {
  background: var(--blue);
}
.quiz__dot.is-right {
  background: #1e874b;
}
.quiz__dot.is-wrong {
  background: #c2410c;
}
.quiz__screen-disclaimer {
  max-width: 520px;
  margin: 0 auto 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.quiz__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 40px;
}
.quiz__crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.quiz__q {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
  text-wrap: balance;
}
.quiz__source {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.quiz__source-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}
.quiz__source-row .quiz__source,
.quiz__source-row .quiz__feedback-source,
.quiz__source-row .mock-review__source {
  flex: 1 1 240px;
  margin: 0;
}
.quiz__provenance {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--ink-soft);
  background: var(--paper-warm);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}
.quiz__provenance--uhr {
  color: var(--blue-ink);
  background: rgba(0, 106, 167, 0.08);
  border-color: rgba(0, 106, 167, 0.28);
}
.quiz__provenance--derived {
  color: #5a3416;
  background: var(--gold-soft);
  border-color: rgba(217, 169, 0, 0.45);
}
.quiz__provenance--editorial {
  color: var(--ink-soft);
  background: var(--white);
}
.quiz__disclaimer {
  margin: -14px 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}
.quiz__opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--paper-warm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 16.5px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.quiz__opt:hover:not([disabled]) {
  background: var(--gold-soft);
  border-color: var(--gold);
}
.quiz__opt .key {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--white);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
}
.quiz__opt.is-correct {
  background: #dff0e2;
  border-color: #1e874b;
}
.quiz__opt.is-correct .key {
  background: #1e874b;
  color: white;
  border-color: #1e874b;
}
.quiz__opt.is-wrong {
  background: #fbe1d6;
  border-color: #c2410c;
}
.quiz__opt.is-wrong .key {
  background: #c2410c;
  color: white;
  border-color: #c2410c;
}
.quiz__opt[disabled] {
  cursor: default;
}

.quiz__feedback {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  font-size: 15.5px;
  line-height: 1.6;
}
.quiz__feedback b {
  color: var(--ink);
}
.quiz__feedback.is-wrong {
  background: #fbe9df;
  border-left-color: #c2410c;
}
.quiz__feedback .quiz__source-row {
  margin: 14px 0 0;
}
.quiz__feedback-source {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.quiz__feedback-disclaimer {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.quiz__actions {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.quiz__counter {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* result */
.quiz__result {
  text-align: center;
  padding: 12px 4px;
}
.quiz__score {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--blue);
  margin: 0;
}
.quiz__score em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
}
.quiz__verdict {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.02em;
  margin: 8px 0 18px;
  text-wrap: balance;
}
.quiz__breakdown {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.quiz__breakdown b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  margin-right: 4px;
}
.quiz__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ MOCK EXAM */

.mock {
  background: var(--paper);
  padding: 70px 28px 110px;
  min-height: 80vh;
}
.mock__inner {
  max-width: 900px;
  margin: 0 auto;
}

.mock-landing__inner {
  padding: 12px 0;
}
.mock-landing__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 16px 0 32px;
}
.mock-landing__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.mock-cfg {
  margin: 28px 0 32px;
  padding: 28px 28px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mock-cfg__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-cfg__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.mock-cfg__label output {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}
.mock-cfg__row input[type='range'] {
  width: 100%;
  height: 28px;
  accent-color: var(--blue);
  cursor: pointer;
}
.mock-cfg__hint,
.mock-cfg__meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.mock-cfg__select-actions {
  display: flex;
  gap: 8px;
  text-transform: none;
}
.mock-cfg__link {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
}
.mock-cfg__link:hover {
  background: rgba(0, 106, 167, 0.08);
}
.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.mock-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.mock-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: var(--paper-warm);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 9px 11px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.mock-chip:hover {
  background: var(--gold-soft);
}
.mock-chip.is-on {
  background: var(--ink);
  color: var(--gold);
  border-color: var(--ink);
}
.mock-chip.is-on .mock-chip__num {
  color: var(--gold);
}
.mock-chip__emoji {
  font-size: 16px;
  flex: 0 0 auto;
}
.mock-chip__num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.mock-chip__t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 600;
}
.mock-cfg__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 4px;
}
.mock-cfg__meta b {
  margin-right: 4px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.mock-history {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.mock-history h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mock-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mock-history li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.mock-history__date,
.mock-history__pct {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.mock-history__score {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}
.mock-history__pct.pass {
  color: #1e874b;
}
.mock-history__pct.fail {
  color: #c2410c;
}
.mock-history__verdict {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.mock-bar__title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-bar__counter {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}
.mock-bar__timer {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.mock-bar__timerlabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mock-timer {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.mock-timer.is-low {
  color: #c2410c;
  animation: mock-pulse 1s ease-in-out infinite;
}
@keyframes mock-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 6px;
  margin-bottom: 18px;
}
.mock-dot {
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
}
.mock-dot.is-done {
  background: rgba(0, 106, 167, 0.12);
  border-color: var(--blue);
  color: var(--blue);
}
.mock-dot.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold);
}

.mock-card {
  margin-bottom: 18px;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.mock-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--paper-warm);
  border: 1.5px solid transparent;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.mock-opt:hover {
  background: var(--gold-soft);
}
.mock-opt.is-chosen {
  background: rgba(0, 106, 167, 0.1);
  border-color: var(--blue);
}
.mock-opt .key {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 7px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}
.mock-opt.is-chosen .key {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--gold);
}

.mock-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mock-actions__progress {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.mock-result {
  text-align: center;
  padding: 20px 0;
}
.mock-result__verdict {
  margin: 4px 0;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: 0;
}
.mock-result.is-strong .mock-result__verdict {
  color: #1e874b;
}
.mock-result.needs-study .mock-result__verdict {
  color: #c2410c;
}
.mock-result__pct {
  margin: 0 0 32px;
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.result-chapters {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.result-chapters li {
  display: grid;
  grid-template-columns: auto 1fr auto 120px;
  gap: 14px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.result-ch__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.result-ch__title {
  font-family: var(--display);
  font-weight: 600;
}
.result-ch__score {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink-soft);
}
.result-ch__bar {
  display: block;
  height: 4px;
  background: var(--paper-warm);
  border-radius: 999px;
  overflow: hidden;
}
.result-ch__bar > i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.mock-review {
  margin: 0 0 32px;
  text-align: left;
}
.mock-review h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0;
}
.mock-review__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.mock-review__item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
}
.mock-review__item.is-correct summary b {
  color: #1e874b;
}
.mock-review__item.is-wrong summary b {
  color: #c2410c;
}
.mock-review__body {
  padding: 0 16px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.mock-review__q {
  margin: 0 0 12px;
  font-weight: 700;
}
.mock-review__body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.mock-review__body dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.mock-review__body dd {
  margin: 4px 0 0;
  font-weight: 600;
}
.mock-review__why {
  margin: 0;
  color: var(--ink-soft);
}
.mock-review__source {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.mock-review__body .quiz__source-row {
  margin: 10px 0 0;
}
.mock-review__disclaimer {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

/* ------------------------------------------------------------------ NATIVE AD ROW IN LIST */

.list-quiet__ad {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
  margin: 0 -8px;
  padding-left: 12px;
  padding-right: 12px;
  border-radius: 10px;
}
.list-quiet__ad[hidden] {
  display: none;
}
.list-quiet__sponsored {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft) !important;
  min-width: 80px !important;
}
.list-quiet__ad-body {
  flex: 1;
  position: relative;
  min-height: 46px;
  display: block;
}
.list-quiet__ad-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(11, 31, 51, 0.04) 8px 9px);
  border-radius: 8px;
}
.adsbygoogle:not(:empty) + .list-quiet__ad-placeholder {
  display: none;
}

.ad-slot {
  display: block;
  padding: 28px 28px 0;
}
.ad-slot[hidden] {
  display: none;
}
.ad-slot__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 24px 26px;
  background: var(--paper-warm);
  border: 1px dashed rgba(11, 31, 51, 0.18);
  border-radius: 18px;
  position: relative;
}
.ad-slot__label {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.ad-slot__frame {
  position: relative;
  min-height: 120px;
  display: grid;
  place-items: center;
}
.ad-slot__placeholder,
.ad-anchor__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(11, 31, 51, 0.04) 8px 9px);
  border-radius: 12px;
}
.adsbygoogle:empty + .ad-slot__placeholder,
.adsbygoogle:empty + .ad-anchor__placeholder {
  display: grid;
}
.adsbygoogle:not(:empty) + .ad-slot__placeholder,
.adsbygoogle:not(:empty) + .ad-anchor__placeholder {
  display: none;
}

.ad-anchor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 8px 12px 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  box-shadow: 0 -10px 30px -10px rgba(0, 58, 92, 0.18);
}
.ad-anchor[hidden] {
  display: none;
}
.ad-anchor__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 30px;
  display: inline-block;
  padding: 2px 4px;
}
.ad-anchor__frame {
  position: relative;
  min-height: 60px;
}
.ad-anchor__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  display: grid;
  place-items: center;
  z-index: 2;
}
.ad-anchor__close:hover {
  background: var(--ink);
  color: var(--gold);
  border-color: var(--ink);
}

/* ------------------------------------------------------------------ COOKIE CONSENT */

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  background: var(--ink);
  color: var(--paper);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.4);
  font-size: 14.5px;
  line-height: 1.5;
}
.consent[hidden] {
  display: none;
}
.consent__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.consent__copy b {
  display: block;
  font-family: var(--display);
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--gold);
}
.consent__copy a {
  color: var(--gold);
}
.consent__actions {
  display: flex;
  gap: 8px;
}
.btn--sm {
  padding: 9px 16px;
  font-size: 13.5px;
  border-radius: 999px;
}
.consent .btn--ghost {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.4);
}
.consent .btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
}
.consent .btn--gold {
  background: var(--gold);
  color: var(--ink);
}

@media (max-width: 720px) {
  .consent__inner {
    grid-template-columns: 1fr;
  }
  .consent__actions {
    flex-wrap: wrap;
  }
  .ad-anchor__placeholder {
    font-size: 11px;
  }
}

/* ------------------------------------------------------------------ RESPONSIVE */

@media (max-width: 980px) {
  .hero__inner {
    padding: 100px 24px 80px;
  }
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .doc__body {
    grid-template-columns: 1fr;
  }
  .doc__nav {
    position: static;
  }
  section.band {
    padding: 90px 24px;
  }
}
@media (max-width: 620px) {
  .nav {
    gap: 0;
  }
  .nav a {
    padding: 6px 10px;
    font-size: 14px;
  }
  .cta-pill {
    display: none;
  }
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: clamp(40px, 11vw, 64px);
  }
  .list-quiet li {
    font-size: 18px;
    gap: 16px;
    padding: 18px 4px;
  }
  .hub__stats,
  .hub__grid {
    grid-template-columns: 1fr;
  }
  .hub__grid {
    gap: 10px;
  }
  .hub__card {
    min-height: 150px;
  }
  .mock {
    padding: 44px 18px 76px;
  }
  .mock-bar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }
  .mock-bar__title {
    flex: 1;
  }
  .mock-bar__counter {
    font-size: 13px;
  }
  .mock-timer {
    font-size: 18px;
  }
  .mock-card {
    padding: 22px 18px;
  }
  .mock-cfg {
    padding: 20px 18px;
    gap: 20px;
  }
  .mock-cfg__label output {
    font-size: 18px;
  }
  .mock-chapters {
    grid-template-columns: 1fr 1fr;
  }
  .mock-chip__t {
    font-size: 11.5px;
  }
  .mock-grid {
    gap: 4px;
  }
  .mock-dot {
    height: 30px;
    font-size: 11px;
  }
  .mock-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .mock-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    font-size: 14px;
  }
  .mock-actions__progress {
    width: 100%;
    text-align: center;
    order: -1;
  }
  .result-chapters li {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .result-ch__bar {
    display: none;
  }
  .mock-review__body dl {
    grid-template-columns: 1fr;
  }
  .mock-history li {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .mock-history__verdict {
    display: none;
  }
}

/* ==================================================================
   THEME — dark mode overrides
   ================================================================== */

:root[data-theme='dark'] {
  --paper: #0d1620 !important;
  --paper-warm: #16212e !important;
  --white: #1a2532 !important;
  --ink: #f1ede0 !important;
  --ink-soft: #a8b6c4 !important;
  --line: #25313e !important;
}
:root[data-theme='dark'] .topbar {
  background: rgba(13, 22, 32, 0.85);
}
:root[data-theme='dark'] .qcard,
:root[data-theme='dark'] .quiz__card,
:root[data-theme='dark'] .mock-cfg,
:root[data-theme='dark'] .mock-bar,
:root[data-theme='dark'] .mock-card,
:root[data-theme='dark'] .mock-review__item,
:root[data-theme='dark'] .ebook__reader {
  background: var(--white);
}
:root[data-theme='dark'] .qopt,
:root[data-theme='dark'] .quiz__opt,
:root[data-theme='dark'] .mock-chip,
:root[data-theme='dark'] .mock-opt {
  background: #1f2b39;
}
:root[data-theme='dark'] .qopt:hover:not([disabled]),
:root[data-theme='dark'] .quiz__opt:hover:not([disabled]),
:root[data-theme='dark'] .mock-chip:hover,
:root[data-theme='dark'] .mock-opt:hover {
  background: #2b3849;
}
:root[data-theme='dark'] .qopt.is-correct,
:root[data-theme='dark'] .quiz__opt.is-correct {
  background: rgba(30, 135, 75, 0.18);
}
:root[data-theme='dark'] .qopt.is-wrong,
:root[data-theme='dark'] .quiz__opt.is-wrong {
  background: rgba(194, 65, 12, 0.18);
}
:root[data-theme='dark'] .mock-chip.is-on {
  background: var(--gold);
  color: #0b1f33;
}
:root[data-theme='dark'] .mock-chip.is-on .mock-chip__num {
  color: #0b1f33;
  opacity: 0.65;
}
:root[data-theme='dark'] .btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}
:root[data-theme='dark'] .btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
:root[data-theme='dark'] .qopt .key,
:root[data-theme='dark'] .quiz__opt .key {
  background: #0e1620;
  border-color: var(--line);
  color: var(--ink);
}

/* ==================================================================
   TOPBAR TOOLS
   ================================================================== */

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.icon-btn:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.icon-btn--square {
  padding: 9px;
  border-radius: 50%;
}
.icon-btn svg {
  display: block;
}

@media (max-width: 720px) {
  .icon-btn span:not([aria-hidden]) {
    display: none;
  }
  .icon-btn {
    padding: 9px;
    border-radius: 50%;
  }
  .topbar__inner {
    gap: 10px;
    padding: 10px 16px;
    flex-wrap: wrap;
  }
  .brand {
    flex: 1 1 auto;
    gap: 10px;
    font-size: 17px;
  }
  .brand__mark {
    width: 30px;
    height: 22px;
  }
  .brand__mark::before {
    left: 10px;
    width: 4px;
  }
  .brand__mark::after {
    top: 9px;
    height: 4px;
  }
  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }
  .topbar__tools {
    flex: 0 0 auto;
    margin-left: 0;
  }
  .nav {
    order: 10;
    display: none;
    flex: 1 0 100%;
    width: 100%;
    margin: 0;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
  }
  .topbar.is-nav-open .nav {
    display: flex;
  }
  .nav a {
    min-height: 44px;
    width: 100%;
    justify-content: flex-start;
    padding: 10px 14px;
  }
}

/* ==================================================================
   MODAL
   ================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
}
.modal[hidden] {
  display: none;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 51, 0.55);
  backdrop-filter: blur(4px);
}
.modal__panel {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.4);
  animation: smt-modal-in 0.18s ease-out;
}
@keyframes smt-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal__panel--settings {
  width: min(640px, calc(100vw - 32px));
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.modal__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.modal__close {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: absolute;
  top: 14px;
  right: 14px;
}
.modal__close:hover {
  background: var(--paper-warm);
  color: var(--ink);
}
.modal__head .modal__close {
  position: static;
}
.modal__body {
  padding: 18px 24px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.modal__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}
.modal__hint {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.set-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.set-group__h {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}
.set-group__sub {
  margin: -4px 0 4px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.set-segment {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--paper-warm);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.set-segment--language {
  flex-wrap: wrap;
  align-self: flex-start;
  max-width: 100%;
}
.set-segment button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 14px;
  min-height: 44px;
  border-radius: 9px;
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
}
.set-segment button.is-on {
  background: var(--ink);
  color: var(--gold);
}

.set-palettes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.set-palette {
  text-align: left;
  cursor: pointer;
  background: var(--paper-warm);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.set-palette:hover {
  transform: translateY(-1px);
}
.set-palette.is-on {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold-soft);
}
.set-palette__chips {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
}
.set-palette__chips i {
  flex: 1;
}
.set-palette__chips i:first-child {
  flex: 1.4;
}
.set-palette__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14.5px;
}
.set-palette__hint {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14.5px;
}
.set-link {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--blue);
  padding: 6px 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 540px) {
  .set-palettes {
    grid-template-columns: 1fr;
  }
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* EBOOK */

.ebook {
  display: grid;
  grid-template-columns: 280px 1fr;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 28px 80px;
  gap: 56px;
  align-items: start;
}
.ebook__sidebar {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 8px;
}
.ebook__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
}
.ebook__brand-mark {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  background: var(--flag-blue);
  position: relative;
}
.ebook__brand-mark::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--flag-gold);
}
.ebook__brand-mark::after {
  content: '';
  position: absolute;
  top: 8.5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--flag-gold);
}
.ebook__sub {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 8px 0 22px;
  line-height: 1.5;
}
.ebook__local-note {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
  margin: -12px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-warm);
}
.ebook__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-top: 1px solid var(--line);
}
.ebook__nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  font-family: var(--body);
}
.ebook__nav a:hover {
  background: var(--paper-warm);
  text-decoration: none;
}
.ebook__nav a.is-active {
  color: var(--blue);
}
.ebook__nav-n {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-soft);
  min-width: 22px;
  letter-spacing: 0.08em;
}

.ebook__reader {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 56px clamp(28px, 5vw, 64px) 60px;
  min-height: 70vh;
  max-width: 760px;
}
.ebook__crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.ebook__h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 14px 0 18px;
  text-wrap: balance;
}
.ebook__h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--blue);
}
.ebook__lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 32px;
}
.ebook__reader h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 44px 0 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.ebook__reader h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.ebook__reader h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  margin: 26px 0 6px;
}
.ebook__reader p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 14px;
  max-width: 65ch;
}
.ebook__reader ul,
.ebook__reader ol {
  padding-left: 22px;
  max-width: 65ch;
}
.ebook__reader li {
  font-size: 17px;
  line-height: 1.65;
  margin: 6px 0;
}
.ebook__reader em {
  font-family: var(--serif);
  font-style: italic;
}
.ebook__reader blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 12px 12px 0;
}
.ebook__reader blockquote p {
  margin: 0;
}
.ebook__factbox {
  margin: 26px 0;
  padding: 18px 20px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.ebook__factbox h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 6px;
}
.ebook__factbox p {
  margin: 0;
  font-size: 15px;
}
.ebook__source-note {
  margin-top: 10px !important;
  color: var(--ink-soft) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
.ebook__provenance-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 28px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-warm);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}
.ebook__provenance-badge span {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ebook__footnote-ref {
  margin-left: 4px;
  font-size: 0.74em;
  vertical-align: super;
}
.ebook__footnote-ref a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.ebook__footnote-ref a:focus-visible,
.ebook__footnote-back:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
.ebook__footnotes {
  margin: 34px 0 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-warm);
}
.ebook__footnotes h2 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 18px !important;
}
.ebook__footnotes ol {
  margin: 0;
  padding-left: 22px;
}
.ebook__footnotes li {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}
.ebook__footnote-label {
  color: var(--ink);
  font-weight: 700;
}
.ebook__footnote-back {
  margin-left: 6px;
  color: var(--blue);
  text-decoration: none;
}

.ebook__study-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin: 34px 0 10px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ebook__study-actions p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.ebook__progress {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.ebook__study-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.ebook__study-links .btn {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.ebook__notes {
  margin-top: 18px;
}
.ebook__notes h2 {
  margin-top: 28px;
}
.eb-notes-empty {
  color: var(--ink-soft) !important;
  font-size: 15px !important;
}
.eb-notes-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.eb-notes-item__text {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
}
.eb-notes-item__note {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}
.eb-notes-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.eb-notes-item__actions button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.eb-notes-item__actions button:hover {
  border-color: var(--ink);
  background: var(--paper-warm);
}

.ebook__pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.ebook__pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}
.ebook__pager a:hover {
  background: var(--paper-warm);
  text-decoration: none;
  border-color: var(--ink);
}
.ebook__pager a .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ebook__pager a.next {
  text-align: right;
  align-items: flex-end;
}

.ebook__stub {
  margin-top: 22px;
  padding: 36px 28px;
  border-radius: 18px;
  background: var(--paper-warm);
  text-align: center;
  border: 1px dashed var(--line);
}
.ebook__stub p {
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 44ch;
  margin: 6px auto 0;
}

@media (max-width: 980px) {
  .ebook {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .ebook__sidebar {
    position: static;
    max-height: none;
  }
  .ebook__study-actions {
    grid-template-columns: 1fr;
  }
  .ebook__study-links {
    justify-content: flex-start;
  }
}

/* DALA */

.dala-buddy {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.dala-buddy[hidden] {
  display: none;
}
.dala-bubble {
  max-width: 280px;
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  padding: 14px 16px 12px;
  font-size: 14px;
  line-height: 1.55;
  position: relative;
  box-shadow: 6px 6px 0 var(--ink);
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition:
    opacity 0.42s ease-out,
    transform 0.42s cubic-bezier(0.2, 0.8, 0.3, 1);
  pointer-events: none;
}
.dala-bubble.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.dala-bubble.is-out {
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
}
.dala-bubble[hidden] {
  display: none;
}
.dala-bubble::after {
  content: '';
  position: absolute;
  right: -10px;
  bottom: 18px;
  border: 8px solid transparent;
  border-left-color: var(--ink);
}
.dala-bubble::before {
  content: '';
  position: absolute;
  right: -7px;
  bottom: 18px;
  border: 8px solid transparent;
  border-left-color: var(--white);
  z-index: 1;
}
.dala-bubble__name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 2px;
}
.dala-bubble__close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
}
.dala-bubble__close:hover {
  color: var(--ink);
}
.dala-bubble__msg {
  padding-right: 14px;
}
.dala-bubble__msg em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}

.dala-horse {
  width: 64px;
  height: 64px;
  cursor: pointer;
  filter: drop-shadow(2px 4px 0 rgba(11, 31, 51, 0.18));
  animation: dala-idle 4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.dala-horse:hover {
  animation-play-state: paused;
  transform: scale(1.06);
}
.dala-buddy.is-talking .dala-horse {
  animation: dala-talk 1.2s ease-in-out infinite;
}

@keyframes dala-idle {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}
@keyframes dala-talk {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(4deg);
  }
}
@keyframes dala-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

:root[data-motion='reduce'] .dala-horse,
:root[data-motion='reduce'] .dala-bubble,
:root[data-motion='reduce'] .modal__panel {
  animation: none;
}

@media (max-width: 560px) {
  .dala-buddy {
    right: 14px;
    bottom: 14px;
  }
  .dala-bubble {
    max-width: 220px;
    font-size: 13px;
  }
  .dala-horse {
    width: 52px;
    height: 52px;
  }
}

/* ==================================================================
   FX — shake, toast, pulse, entrance
   ================================================================== */

@keyframes smt-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(4px);
  }
}
.smt-shake {
  animation: smt-shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes smt-pulse-correct {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 135, 75, 0.55);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(30, 135, 75, 0);
  }
}
.quiz__opt.is-correct,
.qopt.is-correct {
  animation: smt-correct-in 0.35s ease-out;
}
.quiz__opt.is-correct.is-pulse {
  animation:
    smt-correct-in 0.35s ease-out,
    smt-pulse-correct 1.4s ease-out 2;
}
@keyframes smt-correct-in {
  0% {
    transform: scale(0.98);
  }
  60% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes smt-toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.smt-toast {
  background: var(--ink);
  color: var(--gold);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.35);
  animation: smt-toast-in 0.22s ease-out;
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.smt-toast--streak {
  background: linear-gradient(95deg, #d97706, #fecc00);
  color: #0b1f33;
}
.smt-toast--win {
  background: linear-gradient(95deg, #006aa7, #1e874b);
  color: #fff;
}

/* Dark mode: --ink flips light, so pin toast surfaces to a real dark colour */
:root[data-theme='dark'] .smt-toast {
  background: #060d15;
  color: var(--gold);
  border: 1px solid rgba(254, 204, 0, 0.2);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
}
:root[data-theme='dark'] .smt-toast--streak {
  background: linear-gradient(95deg, #b45309, #f59e0b);
  color: #0b1f33;
}
:root[data-theme='dark'] .smt-toast--win {
  background: linear-gradient(95deg, #003a5c, #1e874b);
  color: #fff;
}

/* Quiz card entrance */
@keyframes smt-quiz-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.quiz__card,
.quiz__result {
  animation: smt-quiz-in 0.28s ease-out;
}

/* Progress dot pop when activated */
@keyframes smt-dot-pop {
  0% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(2.5);
  }
  100% {
    transform: scaleY(1);
  }
}
.quiz__dot.is-on {
  animation: smt-dot-pop 0.35s ease-out;
  transform-origin: center;
}

/* Score counter pulse */
@keyframes smt-score-pop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}
.quiz__score #score-num {
  display: inline-block;
  animation: smt-score-pop 1.2s ease-out;
}

/* Hero CTA subtle pulse on hover */
.btn--gold {
  position: relative;
}
.btn--gold::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(254, 204, 0, 0);
  transition: box-shadow 0.25s;
}
.btn--gold:hover::after {
  box-shadow: 0 0 0 6px rgba(254, 204, 0, 0.25);
}

/* Chapter list rows fade-in on first viewport entry */
.list-quiet li {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.list-quiet li.is-in {
  opacity: 1;
  transform: none;
}

/* Hero text shimmer on load */
@keyframes smt-hero-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero h1,
.hero p.lede,
.hero__ctas,
.hero__eyebrow {
  animation: smt-hero-in 0.55s ease-out both;
}
.hero h1 {
  animation-delay: 0.05s;
}
.hero p.lede {
  animation-delay: 0.15s;
}
.hero__ctas {
  animation-delay: 0.25s;
}

/* Reduced motion */
:root[data-motion='reduce'] .quiz__card,
:root[data-motion='reduce'] .quiz__result,
:root[data-motion='reduce'] .quiz__dot,
:root[data-motion='reduce'] .quiz__score #score-num,
:root[data-motion='reduce'] .smt-toast,
:root[data-motion='reduce'] .list-quiet li,
:root[data-motion='reduce'] .hero h1,
:root[data-motion='reduce'] .hero p.lede,
:root[data-motion='reduce'] .hero__ctas,
:root[data-motion='reduce'] .hero__eyebrow {
  animation: none !important;
  transition: none !important;
  opacity: 1;
  transform: none;
}
:root[data-motion='reduce'] .list-quiet li {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .smt-shake,
  .quiz__card,
  .quiz__result,
  .quiz__dot,
  .hero h1,
  .hero p.lede,
  .hero__ctas,
  .hero__eyebrow {
    animation: none !important;
  }
}

/* Buddy picker grid (settings modal) */
.set-buddies {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.buddy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  background: var(--paper-warm);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition:
    border-color 0.15s,
    transform 0.08s;
}
.buddy-card:hover {
  transform: translateY(-1px);
}
.buddy-card.is-on {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold-soft);
}
.buddy-card__svg {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
}
.buddy-card__svg svg {
  width: 100%;
  height: 100%;
  animation: none !important;
}
.buddy-card__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.buddy-card__sub {
  font-size: 9.5px;
  color: var(--ink-soft);
  line-height: 1.2;
  text-align: center;
  display: none; /* tooltip via title only — too cramped */
}
@media (max-width: 540px) {
  .set-buddies {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==================================================================
   DARK MODE — extra surface fixes + aurora
   ================================================================== */

/* keep "dark surfaces" actually dark in dark mode */
:root[data-theme='dark'] .footer {
  background: #060d15 !important;
  color: #e6e2d5;
}
:root[data-theme='dark'] .footer a {
  color: #c8d0d8;
}
:root[data-theme='dark'] .footer a:hover {
  color: var(--gold);
}
:root[data-theme='dark'] .footer h4 {
  color: var(--gold);
}

:root[data-theme='dark'] .btn--gold {
  background: var(--gold);
  color: #0b1f33;
}
:root[data-theme='dark'] .btn--gold:hover {
  background: #ffd633;
  color: #0b1f33;
}
:root[data-theme='dark'] .btn--ink {
  background: var(--blue);
  color: var(--gold);
}
/* nav active pill — flip back to dark bg + gold text */
:root[data-theme='dark'] .nav a.is-active {
  background: var(--blue);
  color: var(--gold);
}
:root[data-theme='dark'] .icon-btn {
  color: var(--ink);
  border-color: #2a3540;
}
:root[data-theme='dark'] .icon-btn:hover {
  background: var(--blue);
  color: var(--gold);
  border-color: var(--blue);
}

/* qcard offset shadow in dark looks weird */
:root[data-theme='dark'] .qcard {
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  border-color: #25313e;
}
:root[data-theme='dark'] .qcard__chip {
  background: var(--gold);
  color: #0b1f33;
  border-color: var(--gold);
}

/* consent banner already dark — leave it */

/* faq button head + numbers strip override */
:root[data-theme='dark'] .faq__item summary::before {
  background: var(--blue);
  color: var(--gold);
}
:root[data-theme='dark'] .faq__list {
  border-color: #25313e;
}
:root[data-theme='dark'] .faq__item {
  border-color: #1c2632;
}

/* ad slot inner card on dark */
:root[data-theme='dark'] .ad-slot__inner {
  background: #16212e;
  border-color: #25313e;
}
:root[data-theme='dark'] .ad-anchor {
  background: #0e1620;
  border-color: #25313e;
}
:root[data-theme='dark'] .ad-anchor__close {
  background: #0e1620;
}

/* set-palette card on dark */
:root[data-theme='dark'] .set-palette,
:root[data-theme='dark'] .buddy-card {
  background: #16212e;
}

/* dala bubble */
:root[data-theme='dark'] .dala-bubble {
  background: #16212e;
  border-color: #f1ede0;
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--gold);
}
:root[data-theme='dark'] .dala-bubble::before {
  border-left-color: #16212e;
}
:root[data-theme='dark'] .dala-bubble::after {
  border-left-color: #f1ede0;
}
:root[data-theme='dark'] .dala-bubble__name {
  color: var(--gold);
}

/* ebook reader card */
:root[data-theme='dark'] .ebook__reader {
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.5);
  border-color: #25313e;
}

/* ------------------- AURORA — northern lights backdrop --------------------
   Easter egg in dark mode. Real-aurora characteristics:
   - vertical "curtain" striations that ripple horizontally
   - slow drift left/right
   - intensity pulse (whole thing brightens/dims)
   - subtle skew, like the curtain is being blown
   Three layered gradients with different speeds + a global pulse.
-------------------------------------------------------------------------- */

:root[data-theme='dark'] body {
  position: relative;
  overflow-x: clip;
}

/* Layer A — primary green-teal curtain, drifts right */
:root[data-theme='dark'] body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -20%;
  right: -20%;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    /* the vertical "rain" striations that make it read as aurora */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(170, 255, 220, 0.14) 24px,
      transparent 48px,
      rgba(140, 240, 200, 0.09) 72px,
      transparent 96px,
      rgba(180, 250, 230, 0.12) 120px,
      transparent 144px
    ),
    /* the soft glowing bands */
    radial-gradient(ellipse 60% 40% at 25% 18%, rgba(80, 230, 170, 0.55), transparent 65%),
    radial-gradient(ellipse 50% 32% at 55% 8%, rgba(120, 200, 240, 0.42), transparent 70%),
    radial-gradient(ellipse 55% 34% at 78% 16%, rgba(170, 140, 230, 0.48), transparent 65%);
  background-size:
    240px 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  filter: blur(18px) saturate(140%);
  mix-blend-mode: screen;
  animation:
    aurora-drift-a 18s linear infinite,
    aurora-skew-a 9s ease-in-out infinite alternate,
    aurora-pulse 12s ease-in-out infinite alternate;
  transform-origin: 50% 0%;
  will-change: transform, background-position, opacity;
}

/* Layer B — secondary purple/teal curtain, drifts left */
:root[data-theme='dark'] body::after {
  content: '';
  position: fixed;
  top: -8%;
  left: -20%;
  right: -20%;
  height: 60vh;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      rgba(190, 150, 240, 0.1) 32px,
      transparent 64px,
      rgba(140, 220, 240, 0.08) 96px,
      transparent 128px
    ),
    radial-gradient(ellipse 45% 30% at 38% 12%, rgba(80, 220, 200, 0.42), transparent 70%),
    radial-gradient(ellipse 55% 36% at 68% 22%, rgba(190, 140, 240, 0.42), transparent 70%),
    radial-gradient(ellipse 32% 22% at 10% 32%, rgba(120, 240, 220, 0.32), transparent 80%);
  background-size:
    320px 100%,
    100% 100%,
    100% 100%,
    100% 100%;
  filter: blur(30px) saturate(135%);
  mix-blend-mode: screen;
  animation:
    aurora-drift-b 26s linear infinite,
    aurora-skew-b 13s ease-in-out infinite alternate,
    aurora-pulse 12s ease-in-out infinite alternate reverse;
  transform-origin: 50% 0%;
  will-change: transform, background-position, opacity;
}

/* drift the striated pattern horizontally — gives that "rain falling sideways" aurora look */
@keyframes aurora-drift-a {
  from {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0;
  }
  to {
    background-position:
      480px 0,
      0 0,
      0 0,
      0 0;
  }
}
@keyframes aurora-drift-b {
  from {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0;
  }
  to {
    background-position:
      -640px 0,
      0 0,
      0 0,
      0 0;
  }
}

/* curtain sway — the whole layer skews + translates as if blown by wind */
@keyframes aurora-skew-a {
  0% {
    transform: translate3d(-3%, 0, 0) skewX(-6deg) scaleY(1);
  }
  50% {
    transform: translate3d(2%, 1%, 0) skewX(4deg) scaleY(1.06);
  }
  100% {
    transform: translate3d(4%, 0, 0) skewX(-3deg) scaleY(0.98);
  }
}
@keyframes aurora-skew-b {
  0% {
    transform: translate3d(4%, 0, 0) skewX(5deg) scaleY(1);
  }
  50% {
    transform: translate3d(-3%, 2%, 0) skewX(-5deg) scaleY(1.08);
  }
  100% {
    transform: translate3d(-5%, 0, 0) skewX(3deg) scaleY(0.96);
  }
}

/* global brighten/dim pulse — dimmed so dark-mode text stays readable */
@keyframes aurora-pulse {
  0% {
    opacity: 0.22;
  }
  35% {
    opacity: 0.42;
  }
  65% {
    opacity: 0.28;
  }
  100% {
    opacity: 0.38;
  }
}

/* Aurora kill-switch via settings toggle */
:root[data-aurora='off'][data-theme='dark'] body::before,
:root[data-aurora='off'][data-theme='dark'] body::after {
  display: none;
}

/* Respect reduced motion: keep the look, drop the animation */
:root[data-motion='reduce'][data-theme='dark'] body::before,
:root[data-motion='reduce'][data-theme='dark'] body::after {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  :root[data-theme='dark'] body::before,
  :root[data-theme='dark'] body::after {
    animation: none;
  }
}

/* ==================================================================
   DARK MODE — text-on-light-bg readability fixes
   ================================================================== */

/* gold-soft callouts have a LIGHT bg that doesn't flip — text inherits
   from parent (which flips light in dark mode), giving unreadable
   light-on-light. Pin the text colour. */
:root[data-theme='dark'] .callout,
:root[data-theme='dark'] .callout p,
:root[data-theme='dark'] .callout b,
:root[data-theme='dark'] .qcard__explain,
:root[data-theme='dark'] .qcard__explain p,
:root[data-theme='dark'] .qcard__explain b,
:root[data-theme='dark'] .quiz__feedback,
:root[data-theme='dark'] .quiz__feedback b,
:root[data-theme='dark'] .ebook__factbox p,
:root[data-theme='dark'] .ebook__factbox h4,
:root[data-theme='dark'] .ebook__reader blockquote,
:root[data-theme='dark'] .ebook__reader blockquote p {
  color: #0b1f33 !important;
}

/* gold soft callouts: keep them cream but make the kicker readable */
:root[data-theme='dark'] .ebook__factbox h4 {
  color: #5a3416 !important;
}
:root[data-theme='dark'] .callout--blue,
:root[data-theme='dark'] .callout--blue p,
:root[data-theme='dark'] .callout--blue b {
  color: #002b4a !important;
}

/* consent banner: stay dark-on-dark in dark mode */
:root[data-theme='dark'] .consent {
  background: #060d15 !important;
  color: #f1ede0 !important;
  border: 1px solid #25313e;
}
:root[data-theme='dark'] .consent__copy b {
  color: var(--gold);
}

/* settings segment "is-on" button: in dark mode the --ink bg flips
   to light, leaving gold text on cream — switch to blue accent */
:root[data-theme='dark'] .set-segment button.is-on {
  background: var(--blue);
  color: var(--gold);
}

/* nav.a active gets pushed to blue in dark mode (already overridden) */
/* qcard offset shadow already handled */

/* qcard__meta button — hover state used --ink bg which flips light */
:root[data-theme='dark'] .qcard__meta button {
  border-color: var(--ink);
}
:root[data-theme='dark'] .qcard__meta button:hover {
  background: var(--blue);
  color: var(--gold);
  border-color: var(--blue);
}
:root[data-theme='dark'] .ebook__pager a {
  border-color: #25313e;
}

/* faq summary text already var(--ink) good. */

/* ad-slot label chip */
:root[data-theme='dark'] .ad-slot__label {
  background: #16212e;
  color: var(--ink-soft);
  border-color: #25313e;
}

/* modal close hover bg uses paper-warm — in dark mode that's still dark, fine */

/* lang button is-on (legacy) */
:root[data-theme='dark'] .lang button.is-on {
  background: var(--blue);
  color: var(--gold);
}

/* btn--gold focus state in dark — already overridden */

/* settings buddy card svg drop-shadow looks black on dark — remove it */
:root[data-theme='dark'] .buddy-card__svg svg {
  filter: none;
}

/* ====== FOOTER redesigned ====== */
.footer {
  background: #060d15;
  color: #d4d8de;
  padding: 0;
  position: relative;
  overflow: hidden;
}
:root[data-theme='dark'] .footer {
  background: #04080e !important;
}
.footer__inner {
  /* override the stale earlier `.footer__inner { display:grid; 1.4fr repeat(3,1fr) }`
     rule that was cramming hero + nav columns into a 4-cell grid */
  display: block !important;
  grid-template-columns: none !important;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

.footer__hero {
  display: block;
  padding: 72px 0 0;
}
.footer__brag {
  padding-bottom: 64px;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: #d4d8de !important;
}
.footer__brand:hover {
  color: var(--gold) !important;
  text-decoration: none;
}
.footer__tagline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #f1ede0;
  margin: 22px 0 22px;
  text-wrap: balance;
}
.footer__tagline em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.footer__honest {
  color: #98a2ad;
  font-size: 14px;
  line-height: 1.55;
  max-width: 36ch;
  margin: 0;
}

.footer__scene {
  width: 100%;
  height: auto;
  display: block;
  align-self: stretch;
}

.footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1.4fr 1fr;
  gap: 80px;
  padding: 64px 0 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 56px;
}
.footer__cols h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.footer__cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__cols a {
  color: #c8d0d8;
  font-weight: 500;
  font-size: 14.5px;
}
.footer__cols a:hover {
  color: var(--gold);
  text-decoration: none;
}
.footer__cols p {
  font-size: 14px;
  line-height: 1.55;
  color: #98a2ad;
  margin: 0;
  max-width: 28ch;
}
.footer__fikahint kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--gold);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  color: #7a838e;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

@media (max-width: 1100px) {
  .footer__cols {
    gap: 48px;
  }
}
@media (max-width: 980px) {
  .footer__hero {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 60px;
  }
  .footer__brag {
    padding-bottom: 24px;
  }
  .footer__scene {
    max-width: 540px;
    margin: 0 auto;
  }
  .footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 36px 48px;
    margin-top: 32px;
    padding: 36px 0 30px;
  }
}
@media (max-width: 560px) {
  .footer__cols {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .footer__tagline {
    font-size: clamp(30px, 8vw, 44px);
  }
}

/* ==================================================================
   Easter-egg cheatsheet
   ================================================================== */
.cheats__panel {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 22px;
  padding: 32px 36px 28px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: 10px 10px 0 var(--ink);
  position: relative;
}
.cheats__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 14px;
}
.cheats__close:hover {
  color: var(--ink);
  background: var(--paper-warm);
}
.cheats__panel h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.cheats__panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cheats__panel li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.5;
}
.cheats__panel kbd {
  display: inline-block;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
  min-width: 40px;
  text-align: center;
}
.cheats__foot {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  text-align: right;
}
@keyframes smt-cheats-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* dark mode kbd visibility */
:root[data-theme='dark'] .cheats__panel kbd {
  background: #16212e;
  border-color: #25313e;
  color: var(--gold);
}
:root[data-theme='dark'] .cheats__panel {
  box-shadow: 8px 8px 0 var(--gold);
}

/* ==========================================================================
   Almost Swedish — design refresh overrides (banner, logos, mascots, ads,
   ebook footnote dedupe, CJK italic, provenance rectangle, big buddy)
   Appended after repo sync. Override-style only — keep at end of file.
   ========================================================================== */

img.brand__mark {
  width: 36px !important;
  height: 36px !important;
  border-radius: 0 !important;
  background: transparent !important;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  box-shadow: none !important;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 10px rgba(11, 31, 51, 0.06));
  transition: transform 0.2s ease;
}
img.brand__mark::before,
img.brand__mark::after {
  content: none !important;
}
.brand:hover img.brand__mark {
  transform: rotate(-4deg) scale(1.04);
}

img.ebook__brand-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  filter: drop-shadow(0 1px 2px rgba(11, 31, 51, 0.08));
}

.footer__scene {
  display: none !important;
}
.footer__hero {
  align-items: center;
}
.footer__banner {
  width: 100%;
  max-width: 460px;
  height: auto;
  justify-self: end;
  display: block;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
}
.footer__banner:hover {
  transform: translateY(-2px) rotate(-1deg);
}
@media (max-width: 880px) {
  .footer__hero {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .footer__banner {
    max-width: 320px;
    justify-self: start;
  }
}

.dala-horse,
.buddy-img {
  object-fit: contain;
  display: block;
}

.set-buddies {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.buddy-card {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px !important;
  min-width: 0;
  overflow: hidden;
  text-align: center;
}
.buddy-card__svg {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4;
  min-height: 84px;
  display: grid !important;
  place-items: center;
  overflow: hidden;
}
.buddy-card__svg svg,
.buddy-card__svg .buddy-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: none !important;
  transform: none !important;
  filter: drop-shadow(0 2px 4px rgba(11, 31, 51, 0.12));
  cursor: default;
  display: block;
}
.buddy-card[data-buddy='tomte'] .buddy-img,
.buddy-card[data-buddy='lucia'] .buddy-img {
  max-height: 80px !important;
}
.buddy-card[data-buddy='algis'] .buddy-img,
.buddy-card[data-buddy='vasa'] .buddy-img,
.buddy-card[data-buddy='stang'] .buddy-img,
.buddy-card[data-buddy='snogubbe'] .buddy-img {
  max-height: 92px !important;
}
.buddy-card__name {
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buddy-card__sub {
  font-size: 10px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
@media (max-width: 540px) {
  .set-buddies {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.practice__dashboard {
  margin: 0 0 36px;
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--line, #e6dcc1);
}
.practice__dashboard .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.ebook__ad {
  margin: 56px 0 0;
  padding: 22px 0 0;
  display: block;
}
.ebook__ad-rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line, #e6dcc1) 18%,
    var(--line, #e6dcc1) 82%,
    transparent
  );
  margin-bottom: 18px;
}
.ebook__ad-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ebook__ad-label {
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft, #44586b);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ebook__ad-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold, #fecc00);
  box-shadow: 0 0 0 3px rgba(254, 204, 0, 0.18);
}
.ebook__ad-meta {
  font-size: 12px;
  color: var(--ink-soft, #44586b);
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 500;
}
.ebook__ad-meta em {
  font-family: var(--serif, 'Instrument Serif', Georgia, serif);
  font-style: italic;
  color: var(--ink, #0b1f33);
  font-weight: 400;
}
.ebook__ad-frame {
  position: relative;
  background: var(--paper-warm, #f3ebd6);
  border: 1px solid var(--line, #e6dcc1);
  border-radius: 16px;
  padding: 18px;
  min-height: 140px;
  display: grid;
  place-items: stretch;
  overflow: hidden;
}
.ebook__ad-frame .adsbygoogle:empty {
  display: none;
}
.ebook__ad-placeholder {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.ebook__ad-ph-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--paper, #faf6ec);
  border: 1px solid var(--line, #e6dcc1);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ebook__ad-ph-mark img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.ebook__ad-ph-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ebook__ad-ph-copy b {
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink, #0b1f33);
  letter-spacing: -0.01em;
}
.ebook__ad-ph-copy span {
  font-size: 13px;
  color: var(--ink-soft, #44586b);
  line-height: 1.4;
}
.ebook__ad-ph-cta {
  display: inline-flex;
  align-items: center;
  background: var(--ink, #0b1f33);
  color: var(--gold, #fecc00);
  padding: 9px 14px;
  border-radius: 999px;
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.ebook__ad-ph-cta:hover {
  background: var(--blue, #006aa7);
  color: var(--gold, #fecc00);
  text-decoration: none;
}
@media (max-width: 540px) {
  .ebook__ad-placeholder {
    grid-template-columns: 44px 1fr;
    row-gap: 10px;
  }
  .ebook__ad-ph-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .ebook__ad-ph-cta {
    grid-column: 1 / -1;
    justify-content: center;
  }
}
:root[data-theme='dark'] .ebook__ad-frame {
  background: #16212e;
  border-color: #25313e;
}
:root[data-theme='dark'] .ebook__ad-ph-mark {
  background: #0e1726;
  border-color: #25313e;
}

.ebook__footnotes ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ebook__footnotes li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 10px 14px;
  padding: 10px 0;
  border-top: 1px dashed var(--line, #e6dcc1);
  font-size: 14px;
  line-height: 1.5;
}
.ebook__footnotes li:first-child {
  border-top: 0;
}
.ebook__footnote-num {
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 700;
  color: var(--blue, #006aa7);
  font-size: 13px;
  letter-spacing: -0.01em;
  text-align: right;
}
.ebook__footnote-body {
  color: var(--ink-soft, #44586b);
  min-width: 0;
  word-break: break-word;
}
.ebook__footnote-body a {
  color: var(--ink, #0b1f33);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.ebook__footnote-backs {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ebook__footnote-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--paper-warm, #f3ebd6);
  border: 1px solid var(--line, #e6dcc1);
  color: var(--ink-soft, #44586b);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  text-decoration: none;
  transition:
    background 0.12s,
    color 0.12s;
}
.ebook__footnote-back:hover {
  background: var(--ink, #0b1f33);
  color: var(--gold, #fecc00);
  text-decoration: none;
}
@media (max-width: 540px) {
  .ebook__footnotes li {
    grid-template-columns: 24px 1fr;
    grid-template-rows: auto auto;
  }
  .ebook__footnote-backs {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}
:root[data-theme='dark'] .ebook__footnote-back {
  background: #16212e;
  border-color: #25313e;
  color: #98a2ad;
}
:root[data-theme='dark'] .ebook__footnote-back:hover {
  background: var(--gold, #fecc00);
  color: #0b1f33;
}

html[lang='zh-Hans'] em,
html[lang='zh-Hant'] em,
html[lang='ar'] em,
html[lang='ckb'] em,
html[lang='fa'] em,
html[lang='ti'] em,
html[lang='so'] em {
  font-style: normal !important;
  font-family: inherit !important;
  font-weight: 600;
  color: var(--blue, #006aa7);
}
html[lang='zh-Hans'] .hero h1 em,
html[lang='zh-Hant'] .hero h1 em,
html[lang='ar'] .hero h1 em,
html[lang='ckb'] .hero h1 em,
html[lang='fa'] .hero h1 em,
html[lang='ti'] .hero h1 em,
html[lang='so'] .hero h1 em,
html[lang='zh-Hans'] .ebook__h1 em,
html[lang='zh-Hant'] .ebook__h1 em,
html[lang='ar'] .ebook__h1 em,
html[lang='ckb'] .ebook__h1 em,
html[lang='fa'] .ebook__h1 em,
html[lang='ti'] .ebook__h1 em,
html[lang='so'] .ebook__h1 em,
html[lang='zh-Hans'] h2.headline em,
html[lang='zh-Hant'] h2.headline em,
html[lang='ar'] h2.headline em,
html[lang='ckb'] h2.headline em,
html[lang='fa'] h2.headline em,
html[lang='ti'] h2.headline em,
html[lang='so'] h2.headline em,
html[lang='zh-Hans'] .doc h1 em,
html[lang='zh-Hant'] .doc h1 em,
html[lang='ar'] .doc h1 em,
html[lang='ckb'] .doc h1 em,
html[lang='fa'] .doc h1 em,
html[lang='ti'] .doc h1 em,
html[lang='so'] .doc h1 em {
  font-style: normal !important;
  font-family: inherit !important;
}

.ebook__provenance-badge {
  display: block !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  max-width: 100%;
  margin: 0 0 24px !important;
  word-break: break-word;
  overflow-wrap: break-word;
}
.ebook__provenance-badge span {
  font-size: 10.5px !important;
  margin-right: 6px;
}
.ebook__provenance-badge a {
  color: var(--ink, #0b1f33);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#dala-figure {
  width: 144px !important;
  height: 144px !important;
}
#dala-figure .buddy-img {
  width: 144px !important;
  height: 144px !important;
}
.dala-buddy {
  bottom: 56px !important;
}
@media (max-width: 640px) {
  #dala-figure {
    width: 112px !important;
    height: 112px !important;
  }
  #dala-figure .buddy-img {
    width: 112px !important;
    height: 112px !important;
  }
  .dala-buddy {
    bottom: 32px !important;
  }
}

/* --- Topbar language picker dropdown -------------------------------------- */
.lang-pick {
  position: relative;
  display: inline-flex;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow, 0 24px 60px -20px rgba(0, 58, 92, 0.18));
  padding: 6px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  font-family: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
}
.lang-menu[hidden] {
  display: none;
}
.lang-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--ink, #0b1f33);
  transition:
    background 0.12s,
    color 0.12s;
}
.lang-menu button:hover,
.lang-menu button:focus-visible {
  background: var(--paper-warm, #f3ebd6);
  color: var(--blue, #006aa7);
  outline: none;
}
.lang-menu button.is-on {
  background: var(--ink, #0b1f33);
  color: var(--gold, #fecc00);
  font-weight: 700;
}
:root[data-theme='dark'] .lang-menu {
  background: #16212e;
  border-color: #25313e;
}
:root[data-theme='dark'] .lang-menu button {
  color: #d4d8de;
}
:root[data-theme='dark'] .lang-menu button:hover {
  background: #1c2a3a;
  color: var(--gold, #fecc00);
}
html[dir='rtl'] .lang-menu {
  right: auto;
  left: 0;
}

/* --- Hide nav-toggle on desktop (the !important wins against any later rule) */
@media (min-width: 721px) {
  .nav-toggle {
    display: none !important;
  }
}

/* --- Big floating buddy widget — bring back a friendly idle bob ----------- */
#dala-figure .buddy-img {
  animation: as-buddy-idle 4s ease-in-out infinite !important;
  transform-origin: 50% 90%;
  cursor: pointer;
}
#dala-figure:hover .buddy-img {
  animation-duration: 1.2s !important;
}
.dala-buddy.is-talking #dala-figure .buddy-img {
  animation: as-buddy-talk 1.1s ease-in-out infinite !important;
}
@keyframes as-buddy-idle {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}
@keyframes as-buddy-talk {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-3px) rotate(-3deg) scale(1.02);
  }
  50% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  75% {
    transform: translateY(-3px) rotate(3deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}
:root[data-motion='reduce'] #dala-figure .buddy-img,
@media (prefers-reduced-motion: reduce) {
  #dala-figure .buddy-img {
    animation: none !important;
  }
}

/* ============================ SIGN IN (optional account) */
.signin-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.signin-trigger.is-signed {
  border-color: var(--blue);
  color: var(--blue);
}
.modal__panel--signin {
  max-width: 380px;
}
.signin__lede {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.signin__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.05s;
}
.signin__btn:hover {
  border-color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.015);
}
.signin__btn:active {
  transform: translateY(1px);
}
.signin__btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.signin__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--ink-soft);
  font-size: 12px;
}
.signin__divider::before,
.signin__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.signin__input {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
}
.signin__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 117, 222, 0.12);
}
.signin__magic {
  width: 100%;
}
.signin__fineprint {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.signin__signedin {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.signin__signout {
  width: 100%;
}

/* ============================ V11 DASHBOARD (login-gated progress panel) */
#v11-dashboard {
  margin-top: 8px;
}
.v11-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.v11-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(11, 31, 51, 0.04);
}
.v11-card--readiness {
  align-items: center;
  text-align: center;
}
.v11-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.v11-score-ring {
  position: relative;
  width: 80px;
  height: 80px;
}
.v11-score-ring svg {
  transform: rotate(-90deg);
}
.v11-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display, inherit);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}
.v11-verdict {
  font-weight: 600;
  font-size: 14px;
}
.v11-weak-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v11-weak-item {
  display: flex;
}
.v11-weak-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.v11-weak-link:hover {
  border-color: var(--blue);
  background: rgba(0, 117, 222, 0.04);
}
.v11-weak-title {
  font-weight: 500;
}
.v11-weak-acc {
  font-family: var(--mono, monospace);
  font-size: 12px;
  color: var(--ink-soft);
}
.v11-recap-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.v11-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.v11-stat b {
  font-family: var(--display, inherit);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.v11-stat--warn b {
  color: #c2410c;
}
.v11-streak-num {
  font-family: var(--display, inherit);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  color: #dd5b00;
}
.v11-streak-unit {
  font-size: 13px;
  color: var(--ink-soft);
}
.v11-freeze-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}
.v11-freeze-bar {
  display: inline-flex;
  gap: 4px;
}
.v11-freeze-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.v11-freeze-pip--on {
  background: #1aae39;
}
.v11-sparse {
  color: var(--ink-soft);
  font-size: 13px;
}

/* Signed-out: dashboard shape stays visible but blurred, with a sign-in overlay */
.v11-dashboard--locked {
  position: relative;
  min-height: 220px;
}
.v11-dashboard--locked .v11-grid {
  filter: blur(7px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}
.v11-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.v11-lock__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  max-width: 420px;
  padding: 28px 26px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(11, 31, 51, 0.12);
}
.v11-lock__badge {
  font-size: 30px;
  line-height: 1;
}
.v11-lock__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.v11-lock__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.v11-lock__cta {
  margin-top: 4px;
}

/* ============================ BRAND WORDMARK (header logo) */
.brand__wordmark {
  display: block;
  height: 39px;
  width: auto;
  object-fit: contain;
}
@media (max-width: 640px) {
  .brand__wordmark {
    height: 34px;
  }
}

/* ------------------------------------------------------------------ ACCOUNT PURCHASES */

.purchase__lede {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 68ch;
}
.purchase__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.purchase__card {
  background: var(--paper-soft);
  border: 1.5px solid var(--ink);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
}
.purchase__card h3 {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.purchase__card p {
  color: var(--ink-soft);
  margin: 0;
}
.purchase__eyebrow {
  color: var(--blue) !important;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.purchase__price {
  color: var(--ink) !important;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
}
.purchase__price span {
  color: var(--ink-soft);
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-transform: uppercase;
}
.purchase__btn {
  justify-content: center;
  margin-top: auto;
  width: 100%;
}
.purchase__btn[aria-disabled='true'] {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.72;
}
.purchase__status {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 20px 0 0;
}


/* ------------------------------------------------------------------ LIVE FIXES: consent, purchases, and narrow screens */
:root[data-consent-visible] .dala-buddy {
  display: none !important;
}

.purchase__grid,
.purchase__card,
.purchase__btn,
.hero__inner,
.qcard,
.mock-card,
.modal__panel {
  min-width: 0;
}

.purchase__btn {
  justify-content: center;
  text-align: center;
  width: 100%;
  white-space: normal;
}

.purchase__btn[data-purchase-locked='true'] {
  cursor: pointer;
}

@media (max-width: 420px) {
  body {
    overflow-x: clip;
  }
  .topbar__inner {
    padding-inline: 10px;
  }
  .brand {
    min-width: 0;
  }
  .brand__wordmark {
    max-width: min(52vw, 180px);
    height: auto;
  }
  .topbar__tools {
    gap: 6px;
  }
  .icon-btn,
  .btn--sm {
    min-width: 44px;
    min-height: 44px;
  }
  .signin-trigger {
    padding-inline: 10px;
  }
  .signin-trigger span:not([aria-hidden]) {
    display: none;
  }
  .hero__inner {
    padding: 96px 18px 72px;
  }
  .hero h1 {
    font-size: clamp(36px, 13vw, 48px);
    overflow-wrap: anywhere;
  }
  .hero p.lede,
  p.deck,
  .purchase__lede {
    font-size: 16.5px;
  }
  section.band {
    padding: 72px 18px;
  }
  .hero__ctas,
  .consent__actions {
    align-items: stretch;
    flex-direction: column;
  }
  .hero__ctas .btn,
  .consent__actions .btn,
  .mock-actions .btn {
    justify-content: center;
    width: 100%;
  }
  .qcard {
    padding: 28px 18px 22px;
  }
  .qcard__q {
    font-size: 22px;
  }
  .qopt {
    align-items: flex-start;
  }
  .qcard__meta {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .qcard__meta button {
    min-height: 44px;
  }
  .purchase__grid {
    grid-template-columns: 1fr !important;
  }
  .purchase__card {
    padding: 24px 18px;
  }
  .consent {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 16px;
  }
  .consent__inner {
    gap: 14px;
  }
  .consent__copy {
    font-size: 13.5px;
  }
  .dala-buddy {
    right: 10px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
  #dala-figure,
  #dala-figure .buddy-img {
    width: 84px !important;
    height: 84px !important;
  }
  .dala-bubble {
    max-width: min(230px, calc(100vw - 110px));
  }
}
