/* Shared styles of the static SEO landing pages (web/telc-*.html).
   The pages sit next to the Flutter app; see docs in tool/build_web.sh. */
@font-face {
  font-family: "Fraunces";
  /* Same file the Flutter app bundles; served from the web build. */
  src: url("/assets/assets/fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --void: #0d0433;
  --deep: #150449;
  --glow: #1d0b58;
  --line: #3a2c78;
  --text: #f2f0fa;
  --muted: #a49fc4;
  --signal: #5be588;
  --amber: #ffc64a;
  --paper: #f5f3fa;
  --paper-line: #d9d4ea;
  --ink: #1b1442;
  --ink-soft: #4a4270;
  --ok-paper: #1f7a43;
  --bad-paper: #8a5a00;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Arial, system-ui, sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  background-color: var(--void);
  background-image: radial-gradient(ellipse 90% 40% at 50% -6%,
    var(--glow) 0%, var(--deep) 45%, var(--void) 100%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}

a { color: var(--signal); text-underline-offset: 3px; }
a:hover { color: #8ff0b0; }

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

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Header ─────────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
}
.brand img { width: 34px; height: 34px; }
.brand:hover { color: var(--text); }
.top-link {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.top-link:hover { border-color: var(--signal); color: var(--text); }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 28px 0 32px; }
h1 {
  font-size: clamp(36px, 8vw, 58px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text);
  max-width: 36em;
  margin: 0;
}
.lead-note {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ── The exam sheet: the one loud element on the page ───── */
.sheet {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #ffffff14, 0 24px 60px -20px #000000aa;
  overflow: clip;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 2px solid var(--ink);
  font-size: 14px;
  color: var(--ink-soft);
}
.sheet-head strong { color: var(--ink); font-size: 15px; }

.part { padding: 26px 22px 30px; border-bottom: 1px solid var(--paper-line); }
.part:last-of-type { border-bottom: 0; }
.part h2 {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.2;
  margin: 0 0 4px;
  color: var(--ink);
}
.part-range { font-size: 14px; color: var(--ink-soft); margin: 0 0 14px; }
.instruction {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 3px solid var(--ink);
  font-style: italic;
}

.headings {
  margin: 0 0 22px;
  padding: 14px 18px 14px 40px;
  background: #ebe7f5;
  border-radius: 4px;
  list-style: lower-alpha;
}
.headings li { padding: 2px 0; }
.headings li::marker { font-weight: 700; }

.task { margin: 0 0 22px; }
.task:last-child { margin-bottom: 0; }
.task-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  margin-right: 8px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  vertical-align: 1px;
}
.task p { margin: 0 0 10px; }

select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #8f87b3;
  border-radius: 4px;
  padding: 8px 10px;
  max-width: 100%;
}
.pick { width: 100%; }

/* Sprachbausteine: gaps sit inside the letter. */
.letter {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  padding: 18px 18px 10px;
}
.letter p { margin: 0 0 14px; }
.gap { white-space: nowrap; }
.gap b { font-size: 13px; margin-right: 3px; }
.gap select { padding: 3px 4px; font-size: 16px; }

fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin: 0 0 8px; font-weight: 700; }
.situation { margin: 0 0 10px; color: var(--ink-soft); }
audio { width: 100%; margin: 4px 0 12px; }
.tf { display: flex; gap: 10px; flex-wrap: wrap; }
.tf label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid #8f87b3;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.tf input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

.is-ok select, .is-ok .tf label:has(input:checked) { border-color: var(--ok-paper); box-shadow: 0 0 0 2px #1f7a4333; }
.is-bad select, .is-bad .tf label:has(input:checked) { border-color: var(--bad-paper); box-shadow: 0 0 0 2px #8a5a0033; }

.fb {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 15.5px;
  line-height: 1.5;
}
.fb[hidden] { display: none; }
.fb.ok { background: #e3f5ea; color: #134d2b; }
.fb.bad { background: #fff2d4; color: #5c3c00; }
.fb strong { display: block; margin-bottom: 2px; }
.fb-list { list-style: none; margin: 16px 0 0; padding: 0; }

/* ── Answer sheet bar (sticky while the test is on screen) ── */
.bogen {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 18px;
  padding: 12px var(--gutter);
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cells {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
  flex: 1 1 340px;
  min-width: 0;
}
.cell {
  aspect-ratio: 1;
  min-width: 0;
  border: 1.5px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cell.filled { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.cell.ok { background: var(--signal); border-color: var(--signal); color: #0a3a1c; }
.cell.bad { background: var(--amber); border-color: var(--amber); color: #3d2600; }
.bogen-side { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.count { font-family: var(--sans); font-size: 14px; color: var(--muted); white-space: nowrap; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--signal);
  color: #0a3a1c;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #8ff0b0; color: #0a3a1c; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--signal); color: var(--text); }

/* ── Result ─────────────────────────────────────────────── */
.result {
  margin-top: 28px;
  padding: 26px 22px;
  border: 1.5px solid var(--signal);
  border-radius: 6px;
  background: #0d043399;
}
.result[hidden] { display: none; }
.score {
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 10px;
}
.result p { margin: 0 0 18px; max-width: 34em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ── Text sections ─────────────────────────────────────── */
.section { padding: 56px 0 0; }
.section h2 {
  font-size: clamp(27px, 5vw, 34px);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.section p { margin: 0 0 16px; max-width: 36em; }

.table-scroll { overflow-x: auto; margin: 0 0 18px; }
table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.45;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 600; font-size: 14px; }
td:first-child { font-weight: 700; color: var(--text); }
td.num, th.num { text-align: right; white-space: nowrap; padding-right: 0; }
tfoot td, tfoot td:first-child { border-bottom: 0; color: var(--muted); font-weight: 400; }

.tips { margin: 0; }
.tips dt { font-weight: 700; margin: 18px 0 4px; }
.tips dd { margin: 0; max-width: 36em; }

.features { list-style: none; padding: 0; margin: 0 0 24px; }
.features li {
  padding: 12px 0 12px 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 9px;
  height: 9px;
  background: var(--signal);
}
.stores { font-family: var(--sans); font-size: 15px; color: var(--muted); margin-top: 14px; }

details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--signal); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; color: var(--text); }

footer {
  margin-top: 64px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}
footer p { margin: 0 0 10px; max-width: 46em; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .lead { font-size: 18px; }
  .part { padding: 22px 16px 26px; }
  .sheet-head { padding: 12px 16px; flex-direction: column; gap: 2px; }
  .letter { padding: 14px 12px 6px; }
  .bogen { padding: 8px 10px; gap: 8px; }
  .cells { flex-basis: 100%; }
  .bogen-side { width: 100%; justify-content: space-between; }
  .bogen .btn { padding: 9px 18px; font-size: 15px; }
}

@media (prefers-reduced-motion: no-preference) {
  .cell { transition: background-color .15s, border-color .15s; }
}

/* Word box for Sprachbausteine Teil 2 */
.wordbox {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 18px;
  padding: 14px 18px;
  background: #ebe7f5;
  border-radius: 4px;
  list-style: none;
}
.wordbox li { font-weight: 700; letter-spacing: .02em; }
.wordbox li span { font-weight: 400; color: var(--ink-soft); margin-right: 4px; }

/* Links between the landing pages */
.more { list-style: none; padding: 0; margin: 0; }
.more li { border-bottom: 1px solid var(--line); }
.more a { display: block; padding: 12px 0; text-decoration: none; }
.more a span { display: block; font-family: var(--sans); font-size: 15px; color: var(--muted); }
