:root {
  color-scheme: dark;
  --bg: #0a1424;
  --bg-2: #0e1b31;
  --surface: #13243f;
  --surface-2: #1a2f50;
  --text: #eef2f7;
  --muted: #a9b8cb;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #d9b25a;
  --gold-bright: #f0c75e;
  --gold-ink: #1b1407;
  --der: #82b4ff;
  --die: #ff9487;
  --das: #78d9a4;
  --gold-text: #f0c75e;
  --focus: #f0c75e;
  --glow-1: rgba(217, 178, 90, 0.20);
  --glow-2: rgba(60, 110, 200, 0.18);
  --shadow: rgba(0, 0, 0, 0.55);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 18px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-2: #e8edf4;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #10213a;
  --muted: #485b73;
  --line: rgba(16, 33, 58, 0.14);
  --gold: #d9a93a;
  --gold-bright: #c99a2e;
  --gold-ink: #1b1407;
  --der: #1f5fa8;
  --die: #a8342a;
  --das: #22703f;
  --gold-text: #86600f;
  --focus: #0b57d0;
  --glow-1: rgba(217, 169, 58, 0.22);
  --glow-2: rgba(60, 110, 200, 0.12);
  --shadow: rgba(16, 33, 58, 0.25);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f6f9;
    --bg-2: #e8edf4;
    --surface: #ffffff;
    --surface-2: #eef2f7;
    --text: #10213a;
    --muted: #485b73;
    --line: rgba(16, 33, 58, 0.14);
    --gold: #d9a93a;
    --gold-bright: #c99a2e;
    --gold-ink: #1b1407;
    --der: #1f5fa8;
    --die: #a8342a;
    --das: #22703f;
    --gold-text: #86600f;
    --focus: #0b57d0;
    --glow-1: rgba(217, 169, 58, 0.22);
    --glow-2: rgba(60, 110, 200, 0.12);
    --shadow: rgba(16, 33, 58, 0.25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 1em; max-width: 64ch; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
em, i { font-style: italic; }
::selection { background: var(--gold); color: var(--gold-ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; z-index: 40; }
.skip:focus { top: 8px; }

/* Article colours */
.art { font-family: var(--sans); font-weight: 700; font-style: normal; }
.art.der { color: var(--der); }
.art.die { color: var(--die); }
.art.das { color: var(--das); }

/* Progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 35; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; text-decoration: none; letter-spacing: 0.01em; white-space: nowrap; }
.site-header nav { display: flex; gap: 22px; align-items: center; font-size: 0.9rem; font-weight: 500; }
.site-header nav a { text-decoration: none; white-space: nowrap; color: var(--muted); transition: color .15s; }
.site-header nav a:not(.nav-cta):hover { color: var(--text); }
.nav-cta { background: var(--gold); color: var(--gold-ink) !important; padding: 10px 20px; border-radius: 999px; font-weight: 700; }
.nav-cta:hover { background: var(--gold-bright); }

.theme-toggle { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle.is-dark .icon-sun { display: block; }
.theme-toggle.is-dark .icon-moon { display: none; }
.header-tools { display: flex; align-items: center; gap: 10px; }

.menu-toggle { display: none; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.site-header.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.open .menu-toggle span:nth-child(2) { opacity: 0; }
.site-header.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  padding: 15px 28px; border-radius: 999px; text-decoration: none; border: 1.5px solid var(--gold);
  cursor: pointer; transition: background .15s, color .15s, transform .15s; text-align: center;
}
.btn-primary { background: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn-quiet { background: transparent; color: var(--text); border-color: rgba(255,255,255,.3); }
.btn-quiet:hover { border-color: var(--gold); color: var(--gold-text); }

/* Hero */
.hero-wrap { position: relative; overflow: hidden; }
.hero-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 60% at 78% 35%, var(--glow-1), transparent 70%),
    radial-gradient(45% 55% at 10% 90%, var(--glow-2), transparent 70%);
}
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(40px, 7vw, 100px) var(--gutter) clamp(64px, 9vw, 120px);
  max-width: 1320px; margin: 0 auto;
}
.hello { font-family: var(--serif); font-style: italic; font-size: 1.5rem; margin-bottom: 16px; color: var(--muted); }
.hello [data-word] { color: var(--gold-text); }
.hero h1 { font-size: clamp(2.9rem, 6.4vw, 5.6rem); font-weight: 400; margin-bottom: 28px; max-width: 13ch; }
.lead { font-size: 1.12rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 34px; }

.first-words { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 0.93rem; color: var(--muted); max-width: 520px; }
.first-words b { font-weight: 700; color: var(--gold-text); margin-right: 6px; }

.portrait { margin: 0 14px 14px 0; position: relative; }
.portrait::before {
  content: ""; position: absolute; inset: 0; transform: translate(16px, 16px);
  border: 1.5px solid var(--gold); border-radius: 8px 48px 8px 48px; z-index: 0;
}
.portrait img {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 6%;
  border-radius: 8px 48px 8px 48px;
  box-shadow: 0 30px 80px var(--shadow);
}
.portrait figcaption {
  position: absolute; z-index: 2; left: -14px; bottom: 30px;
  background: rgba(10, 20, 36, 0.86); backdrop-filter: blur(10px); border: 1px solid rgba(217, 178, 90, 0.5);
  padding: 14px 22px; border-radius: 0 16px 16px 0;
  font-family: var(--serif); font-size: 1.25rem; max-width: 82%; color: #eef2f7;
}
.portrait figcaption span { display: block; font-style: italic; font-size: 0.95rem; color: #c3cfdd; }

/* One orchestrated entrance on load */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-copy > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.hero-copy > :nth-child(4) { animation-delay: .3s; }
.hero-copy > :nth-child(5) { animation-delay: .4s; }
.portrait { animation: rise 1s .25s cubic-bezier(.2,.7,.2,1) both; }

/* Sections */
.section { padding: clamp(60px, 9vw, 112px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.section-head { margin-bottom: 46px; }
.section h2, .sectors h2, .band h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 400; margin-bottom: 18px; max-width: 22ch; }
.section h2::before, .sectors h2::before, .band h2::before { content: ""; display: block; width: 48px; height: 2px; background: var(--gold); margin-bottom: 22px; }
.section-head p { color: var(--muted); }
.note { margin-top: 28px; color: var(--muted); }
.note b { color: var(--text); font-weight: 700; }

/* Professions */
.jobs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.jobs a {
  height: 100%; text-decoration: none; background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 2px; transition: border-color .2s, transform .2s;
}
.jobs a:hover { border-color: var(--gold); transform: translateY(-3px); }
.jobs .art { font-size: 0.95rem; }
.jobs strong { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; line-height: 1.1; overflow-wrap: anywhere; }
.jobs em { font-family: var(--serif); color: var(--muted); font-size: 1.05rem; margin-top: 6px; }

/* Sector explorer */
.sectors { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sectors-inner { max-width: 1320px; margin: 0 auto; padding: clamp(60px, 9vw, 112px) var(--gutter); }
.sectors .section-head p { color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 38px; }
.tabs button {
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { border-color: var(--gold); }
.tabs button[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

.sector-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.sector-main h3 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 400; margin-bottom: 14px; }
.sector-main > p { color: var(--muted); }
.focus { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.focus li { position: relative; padding-left: 28px; }
.focus li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 14px; height: 1.5px; background: var(--gold); }
.branches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 0.86rem; }
.chip b { font-weight: 600; margin-right: 6px; }
.chip em { font-family: var(--serif); color: var(--muted); }
.sample { margin: 0; padding: 24px 28px; border-left: 2px solid var(--gold); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.sample p { margin: 0; }
.sample p:first-child { font-family: var(--serif); font-size: clamp(1.3rem, 2.3vw, 1.7rem); line-height: 1.3; margin-bottom: 8px; }
.sample p:last-child { font-family: var(--serif); font-style: italic; color: var(--muted); }

.glossary { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); }
.glossary h4 { font-size: 1.4rem; font-weight: 500; margin-bottom: 16px; }
.glossary table { width: 100%; border-collapse: collapse; }
.glossary th { text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--muted); padding: 0 0 10px; border-bottom: 1px solid var(--gold); }
.glossary td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.glossary td:first-child { font-weight: 600; width: 55%; }
.glossary td:last-child { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--muted); }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.feature { background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.feature h3 { font-size: 1.5rem; margin-bottom: 14px; }
.feature p { color: var(--muted); font-size: 1rem; }
.feature p b { color: var(--text); font-weight: 700; }
.feature .art { font-size: 1.05rem; }
.feature .ex {
  margin: 18px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); color: var(--text);
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.4;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
}
.feature .ex .tr { flex-basis: 100%; font-style: italic; color: var(--gold-text); font-size: 1.05rem; }
.feature .ex mark { background: rgba(217, 178, 90, 0.25); color: var(--text); padding: 0 5px; border-radius: 4px; }
.feature .ex b { font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; color: var(--text); }
.feature .ex i { font-family: var(--sans); font-size: 1rem; }

/* Article game */
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-inner {
  max-width: 1320px; margin: 0 auto; padding: clamp(60px, 8vw, 100px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center;
}
.band-copy p { color: var(--muted); }
.game-score { font-weight: 700; color: var(--gold-text) !important; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); }
.game-word { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 4px; }
.game-tr { font-family: var(--serif); color: var(--muted); font-style: italic; font-size: 1.2rem; margin-bottom: 24px; }
.game-options { display: flex; gap: 12px; flex-wrap: wrap; }
.opt { font-family: var(--sans); font-weight: 700; font-size: 1.15rem; padding: 12px 30px; border-radius: 999px; background: transparent; border: 1.5px solid currentColor; cursor: pointer; }
.opt.der { color: var(--der); } .opt.die { color: var(--die); } .opt.das { color: var(--das); }
.opt:hover:not(:disabled) { background: currentColor; }
.opt:hover:not(:disabled) { color: var(--bg); }
.opt:disabled { cursor: default; opacity: .4; }
.opt.right { opacity: 1; background: var(--das); color: var(--bg); border-color: var(--das); }
.opt.wrong { opacity: 1; background: var(--die); color: var(--bg); border-color: var(--die); }
.game-feedback { margin: 18px 0 0; min-height: 1.6em; font-weight: 600; }
.game-next { margin-top: 8px; }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px; }
.steps li { counter-increment: step; border-top: 1px solid var(--gold); padding-top: 22px; }
.steps li::before { content: counter(step); font-family: var(--serif); font-style: italic; font-size: 3rem; line-height: 1; color: var(--gold); display: block; margin-bottom: 10px; }
.steps h3 { font-size: 1.55rem; margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.about-intro p { color: var(--muted); }

/* Level quiz */
.quiz { max-width: 780px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); }
.quiz-top { display: flex; align-items: center; gap: 16px; font-weight: 600; font-size: 0.9rem; color: var(--muted); margin-bottom: 26px; }
.quiz-bar { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.quiz-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
.quiz-q { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.25; margin-bottom: 24px; }
.quiz-options { display: flex; flex-wrap: wrap; gap: 12px; }
.quiz-options button { font-family: var(--sans); font-weight: 600; font-size: 1rem; padding: 13px 26px; border-radius: 999px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.3); cursor: pointer; }
.quiz-options button:hover { border-color: var(--gold); background: rgba(217,178,90,.12); }
.quiz-level { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 5vw, 3.2rem); color: var(--gold-text); margin-bottom: 10px; }
.quiz-result p { color: var(--muted); }
.quiz-result .hero-actions { margin-bottom: 0; }

/* FAQ */
.faq-list { max-width: 840px; border-top: 1px solid var(--gold); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; padding: 22px 44px 22px 0; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.6rem; font-weight: 300; color: var(--gold); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding-bottom: 22px; }

/* Contact */
.contact { border-top: 1px solid var(--line); }
#contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 780px; }
#contact-form label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
#contact-form .wide, #contact-form button { grid-column: 1 / -1; }
#contact-form button { justify-self: start; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(217,178,90,.25); }
select option { background: var(--surface); color: var(--text); }
.phone { font-weight: 700; color: var(--gold-text); white-space: nowrap; }

.site-footer { padding: 56px var(--gutter) 110px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); text-align: center; background: var(--bg-2); }
.site-footer p { margin: 0 auto 8px; }
.site-footer .farewell { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.3rem); color: var(--text); }
.site-footer .farewell span { font-style: italic; color: var(--gold-text); }
.site-footer a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* Floating WhatsApp and vocabulary counter */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  background: #25a35a; color: #fff; text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 14px 24px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.wa-float:hover { background: #2dbd69; }

.vocab {
  position: fixed; left: 18px; bottom: 18px; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  background: rgba(19, 36, 63, 0.92); backdrop-filter: blur(10px); border: 1px solid rgba(217, 178, 90, 0.5);
  border-radius: 999px; padding: 8px 20px 8px 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem; line-height: 1.25; font-weight: 600; color: #eef2f7;
}
.vocab-count { min-width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; }
.vocab-count.bump { animation: bump .35s ease-out; }
@keyframes bump { 50% { transform: scale(1.25); } }
.vocab-text { display: flex; flex-direction: column; }
.vocab-last { color: #c3cfdd; font-size: 0.78rem; font-weight: 400; min-height: 1em; }

/* Tablet and mobile */
@media (max-width: 1100px) {
  .menu-toggle { display: flex; }
  .site-header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--line); font-size: 1.05rem;
  }
  .site-header.open nav { display: flex; }
  .site-header nav a { padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .site-header nav .nav-cta { margin-top: 18px; text-align: center; border-bottom: 0; padding: 15px 20px; }
}

@media (max-width: 860px) {
  .hero, .about, .band-inner, .sector-panel { grid-template-columns: 1fr; }
  .portrait { max-width: 440px; margin-right: 16px; }
  #contact-form { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .brand { font-size: 1.4rem; }
  .hero h1 { font-size: clamp(2.5rem, 12vw, 3.2rem); }
  .lead { font-size: 1.05rem; }
  .jobs { grid-template-columns: 1fr 1fr; gap: 12px; }
  .jobs a { padding: 18px 16px 20px; }
  .jobs strong { font-size: 1.25rem; }
  .jobs em { font-size: 0.95rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .glossary td { padding: 10px 8px 10px 0; font-size: 0.95rem; }
  .glossary td:first-child { width: 52%; }
  .feature { padding: 24px; }
  .year { font-size: 2.8rem; }
  .wa-float { right: 12px; bottom: 12px; padding: 13px 18px; font-size: 0.88rem; }
  .vocab { left: 12px; bottom: 12px; padding-right: 8px; }
  .vocab-text { display: none; }
  .btn { width: 100%; }
  #contact-form button { justify-self: stretch; }
  .quiz-options button { flex: 1 1 100%; }
  .site-footer { padding-bottom: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .portrait { animation: none; }
  .vocab-count.bump { animation: none; }
  .jobs a:hover { transform: none; }
}

/* Quick paths: pulled up over the hero edge */
.paths { max-width: 1320px; margin: -56px auto 0; padding: 0 var(--gutter); position: relative; z-index: 2; }
.paths-title { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 14px; }
.paths-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.path {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold);
  border-radius: var(--radius); padding: 24px 26px; box-shadow: 0 20px 50px var(--shadow);
  transition: transform .2s, border-color .2s;
}
.path:hover { transform: translateY(-4px); border-color: var(--gold); }
.path strong { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.15; }
.path span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* Exams */
.exam-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-bottom: 64px; }
.exam-main h3 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 400; margin-bottom: 14px; }
.exam-main p { color: var(--muted); }
.exam-main .tip { padding: 16px 20px; border-left: 2px solid var(--gold); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.95rem; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skills li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.skills b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.45rem; }
.skills em { font-family: var(--serif); color: var(--gold-text); font-size: 1.02rem; }
.skills p { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

.ladder-box { background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 44px); }
.ladder-box h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 400; margin-bottom: 8px; }
.ladder-box > p { color: var(--muted); }
.ladder-controls { display: flex; flex-wrap: wrap; gap: 16px; margin: 20px 0 28px; }
.ladder-controls label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.88rem; color: var(--muted); min-width: 170px; }
.ladder { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ladder li {
  text-align: center; padding: 18px 4px 10px; font-family: var(--serif); font-size: 1.4rem;
  border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: transparent; position: relative;
}
.ladder li:nth-child(1) { padding-bottom: 10px; }
.ladder li.done { color: var(--text); background: var(--surface-2); }
.ladder li.path { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); font-weight: 600; }
.ladder li.goal { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
.ladder-summary { font-weight: 600; color: var(--text) !important; }
.ladder-detail { border-left: 2px solid var(--gold); padding-left: 20px; margin: 18px 0 8px; }
.ladder-detail p { margin: 0 0 6px; color: var(--muted); }
.ladder-detail .ladder-group { color: var(--gold-text); font-weight: 700; }

/* Active section in the menu */
.site-header nav a.active:not(.nav-cta) { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 8px; }

@media (max-width: 860px) {
  .paths { margin-top: -28px; }
  .paths-grid { grid-template-columns: 1fr; }
  .exam-panel { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .skills { grid-template-columns: 1fr 1fr; gap: 10px; }
  .skills li { padding: 16px; }
  .ladder li { font-size: 1.1rem; padding: 14px 2px 8px; }
  .ladder-controls label { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .path:hover { transform: none; } }

/* Dictionary teaser */
.band-inner.teaser { grid-template-columns: minmax(0, 1.3fr) auto auto; }
.teaser-levels { display: flex; gap: 8px; }
.teaser-levels b { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; border: 1px solid var(--gold); border-radius: 14px; padding: 10px 16px; color: var(--gold-text); }
@media (max-width: 860px) { .band-inner.teaser { grid-template-columns: 1fr; } }


/* footer columns (shared with the home page) */
.foot-cols { max-width: 1180px; margin: 0 auto 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 26px; text-align: left; }
.foot-cols h2 { font: 700 0.78rem var(--sans); letter-spacing: 0.04em; color: var(--text); margin-bottom: 12px; text-transform: none; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-cols a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.foot-cols a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--gold); }
.site-footer .legal { font-size: 0.82rem; margin-top: 6px; }
.site-footer .farewell { margin-bottom: 12px !important; }


/* Areas (districts) on the home page */
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.area { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: linear-gradient(160deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .15s, transform .15s; }
.area:hover { border-color: var(--gold); transform: translateY(-3px); }
.area strong { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; line-height: 1.15; }
.area span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .area:hover { transform: none; } }

/* Cookie banner */
.link-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.cookie-banner {
  position: fixed; left: 16px; bottom: 16px; z-index: 70; width: min(470px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-top: 2px solid var(--gold);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: 0 24px 70px var(--shadow);
}
.cookie-banner h2 { font-size: 1.3rem; margin-bottom: 8px; }
.cookie-banner p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0 0 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cookie-actions .btn { padding: 10px 20px; font-size: 0.92rem; }
.cookie-actions a { color: var(--gold-text); font-size: 0.88rem; margin-left: auto; text-underline-offset: 3px; }
@media (max-width: 600px) { .cookie-banner { left: 8px; right: 8px; bottom: 8px; width: auto; } .cookie-actions .btn { flex: 1; } }

/* About: story + delivery note (Lieferschein) */
.about { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.about-intro h2 { max-width: 14ch; }
.signature { font-family: var(--serif); font-style: italic; font-size: 1.7rem; color: var(--text) !important; margin-top: 26px; line-height: 1.1; }
.signature span { display: block; font-family: var(--sans); font-style: normal; font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.lieferschein { position: relative; background: var(--surface); border: 1px dashed color-mix(in srgb, var(--gold) 70%, transparent); border-radius: 10px; padding: clamp(22px, 3.5vw, 36px); box-shadow: 10px 10px 0 color-mix(in srgb, var(--gold) 22%, transparent); }
.ls-stamp { position: absolute; right: clamp(14px, 3vw, 28px); top: clamp(16px, 3vw, 28px); transform: rotate(-7deg); border: 2px solid var(--gold); color: var(--gold-text); border-radius: 6px; padding: 4px 12px; font: 600 1rem var(--serif); letter-spacing: 0.02em; opacity: .9; }
.ls-head { padding-bottom: 14px; border-bottom: 1px dashed var(--line); margin-bottom: 6px; padding-right: 150px; }
.ls-head h3 { font-size: 2rem; font-weight: 500; }
.ls-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.ls-rows { margin: 0; }
.ls-rows > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.ls-rows > div:last-child { border-bottom: 0; }
.ls-rows dt span { display: block; font: italic 500 1.05rem var(--serif); color: var(--text); }
.ls-rows dt small { color: var(--muted); font-size: 0.78rem; }
.ls-rows dd { margin: 0; color: var(--muted); font-size: 0.97rem; line-height: 1.55; }
.ls-route ol { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--gold); display: grid; gap: 10px; }
.ls-route li { position: relative; }
.ls-route li::before { content: ""; position: absolute; left: -25px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.ls-route b { color: var(--gold-text); font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin-right: 6px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .ls-head { padding-right: 0; padding-top: 34px; }
  .ls-rows > div { grid-template-columns: 1fr; gap: 4px; }
  .ls-rows dt { display: flex; align-items: baseline; gap: 8px; }
}

/* ---- Phone refinements ---- */
@media (max-width: 1100px) {
  .site-header nav { max-height: calc(100dvh - 70px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 30px 60px var(--shadow); }
  .site-header nav a { min-height: 48px; display: flex; align-items: center; }
}
@media (max-width: 600px) {
  .lead-more { display: none; }
  .hero { padding-top: 24px; padding-bottom: 56px; gap: 28px; }
  .hello { font-size: 1.25rem; margin-bottom: 10px; }
  .hero-actions { margin: 24px 0 22px; }
  .first-words { padding-top: 16px; gap: 6px 20px; }
  .portrait { max-width: 100%; margin-right: 12px; }
  .portrait figcaption { left: -10px; bottom: 18px; padding: 10px 14px; font-size: 1.05rem; }
  .section { padding-top: 52px; padding-bottom: 52px; }
  .section-head { margin-bottom: 28px; }
  .section h2, .sectors h2, .band h2 { margin-bottom: 14px; }
  .section h2::before, .sectors h2::before, .band h2::before { margin-bottom: 16px; }
  .band-inner { padding-top: 48px; padding-bottom: 48px; }
  .sectors-inner { padding-top: 48px; padding-bottom: 48px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
  .glossary td { padding: 10px 8px 10px 0; }
  .glossary td:first-child { width: 52%; }
  .feature, .game, .quiz { padding: 22px; }
  .areas { grid-template-columns: 1fr 1fr; gap: 10px; }
  .area { padding: 16px; }
  .area strong { font-size: 1.25rem; }
  .area span { font-size: 0.8rem; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .site-footer { padding-bottom: 96px; }
  .wa-float { right: 10px; bottom: 10px; }
  .btn { padding: 14px 22px; }
  .hero-actions .btn { width: 100%; }
  .cookie-banner { padding: 16px; }
  .cookie-banner h2 { font-size: 1.1rem; margin-bottom: 6px; }
  .cookie-banner p { font-size: 0.86rem; margin-bottom: 12px; }
}
@media (max-width: 600px) {
  .vocab { left: 8px; bottom: 8px; padding: 4px; box-shadow: none; opacity: .92; }
  .vocab-count { min-width: 36px; height: 36px; font-size: 1rem; }
  .wa-float { padding: 11px 15px; font-size: 0.82rem; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
}

/* Check boxes and radios keep their native look; the text-field styling above must not reach them. */
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; padding: 0; margin: 0; flex: none; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; accent-color: var(--gold); cursor: pointer;
}

/* Long German compound words in the profession cards break at syllables instead of mid-word */
.jobs strong { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; word-break: normal; }
@media (max-width: 600px) { .jobs strong { font-size: clamp(1rem, 4.6vw, 1.25rem); } }
