/* German practice: the section's own styles. Colours and type follow the site
   (public/assets/site.css): paper and ink, pine green, a bronze rule. */


:root {
  --bg: #f6f4ee;
  --page: #ffffff;
  --page-2: #ffffff;
  --panel: #faf9f5;
  --panel-raised: #ffffff;
  --line: #dedad0;
  --line-soft: #ebe8e0;
  --text: #1a1d1a;
  --muted: #4a514b;
  --faint: #737a74;

  --terracotta: #1f3a2c;
  --terracotta-bright: #2c5240;
  --ochre: #9a7438;
  --ochre-bright: #7d5e2d;
  --olive: #2f6b3f;
  --olive-text: #2f6b3f;
  --cinnabar: #a3321f;
  --stone: #4f6470;

  --font-inscription: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 4px;

  --meander: none;
  --grain: none;
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100vh; }
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  background: var(--grain), radial-gradient(ellipse at 50% 25%, #f6f4ee, transparent 65%),
    radial-gradient(ellipse at 50% 120%, #f6f4ee, transparent 60%), var(--bg);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
::selection { background: var(--terracotta); color: var(--page); }
code { font-family: var(--mono); font-size: 0.9em; background: var(--panel); border: 1px solid var(--line-soft); padding: 0 5px; border-radius: var(--radius); }
b, strong { font-weight: 600; }

/* ---------- top bar ---------- */

.header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  width: 100%; max-width: 1120px; margin: 0 auto; padding: 18px 24px;
}
.header.narrow-bar { max-width: 760px; }
.logo-section {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-inscription); font-weight: 600; letter-spacing: 0.18em; font-size: 1rem;
  color: var(--text);
}
.logo-section:hover { text-decoration: none; color: var(--ochre-bright); }
.mini-logo { width: 28px; height: 28px; border-radius: 50%; }
.site-name { color: inherit; }
.site-name small {
  font-family: var(--font-inscription); font-size: 0.68rem; letter-spacing: 0.24em;
  color: var(--faint); margin-left: 6px;
}
.header-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 20px; }
.header-btn {
  color: var(--muted); font-size: 0.88rem; background: none; border: none; padding: 2px 0;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.header-btn:hover { color: var(--text); text-decoration: none; }
.header-btn.active { color: var(--terracotta); border-bottom: 1px solid var(--terracotta); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.user-chip img { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ochre); }

/* ---------- the manuscript page ---------- */

main {
  position: relative;
  width: calc(100% - 24px); max-width: 740px; margin: 6px auto 0;
  background: var(--grain), linear-gradient(180deg, var(--page), var(--page-2));
  border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: 6px;
  padding: 0 44px 44px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.06), 0 2px 0 rgba(255, 255, 255, 0.4) inset;
}
main.wide { max-width: 1120px; }
main::before, main::after {
  content: ""; display: block; height: 20px; background: var(--meander) repeat-x center;
}
main::before { margin: 24px -16px 0; }
main::after { margin: 36px -16px -20px; transform: scaleY(-1); }

.footer { text-align: center; padding: 2.5rem 1rem; }
.footer p, .footer .copyright {
  font-family: var(--font-inscription); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.footer .policy-note { font-family: var(--font-body); letter-spacing: 0; text-transform: none; font-size: 0.8rem; margin-top: 0.5rem; opacity: 0.85; }
.footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- headings ---------- */

.hero { text-align: center; padding: 28px 0 8px; }
.seal-logo {
  width: 104px; height: 104px; display: block; margin: 0 auto 22px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12)) sepia(0.12);
}
.eyebrow {
  font-family: var(--font-inscription); font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ochre); margin: 0 0 12px;
}
h1.title {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.05; margin: 0 0 14px; text-align: center; color: var(--text);
}
h1.title em { font-style: italic; color: var(--terracotta); }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto 8px; text-align: center; }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap;
  margin: 40px 0 14px; padding-top: 22px; border-top: 1px solid var(--line);
}
.section-title h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; line-height: 1.2; }
.section-title h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.85rem; }
.mono, td.mono { font-family: var(--mono); font-size: 0.92em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }

/* ---------- panels ---------- */

.card {
  position: relative;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 4px 14px rgba(0, 0, 0, 0.03);
}
.card::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--terracotta), transparent); opacity: 0.45;
}
.card.center { text-align: center; }
.card h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.15; margin-bottom: 6px; }
.card h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.2; margin-bottom: 6px; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 4px; }
.card p { color: var(--muted); }
.card p b { color: var(--text); }
/* tables and the setup box sit flush in their card */
.card.table-wrap::before { display: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  padding: 12px 24px; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  background: transparent; color: var(--terracotta); border: 1.5px solid var(--terracotta);
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--terracotta); color: var(--page); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--terracotta); }
.btn.green { color: var(--olive-text); border-color: var(--olive); }
.btn.green:hover { background: var(--olive); color: var(--page); }
.btn.red { color: var(--cinnabar); border-color: var(--cinnabar); }
.btn.red:hover { background: var(--cinnabar); color: var(--page); }
.btn.ghost { color: var(--muted); border-color: var(--line); border-width: 1px; }
.btn.ghost:hover { background: var(--panel); color: var(--text); border-color: var(--ochre); }
.btn.small { padding: 6px 12px; font-size: 0.82rem; }
.btn.big { padding: 14px 30px; font-size: 1rem; }
/* the Discord glyph is white; tint it to match the button text */
.btn img { width: 18px; height: 18px; filter: brightness(0) saturate(100%) invert(26%) sepia(76%) saturate(1620%) hue-rotate(352deg) brightness(91%); }
.btn:hover img { filter: brightness(0) invert(1); }
.btn.green img { filter: brightness(0) saturate(100%) invert(38%) sepia(28%) saturate(840%) hue-rotate(43deg) brightness(92%); }
.btn.green:hover img { filter: brightness(0) invert(1); }

/* big medal at the top of a status card (replaces emoji) */
.medal {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-inscription); font-weight: 600; font-size: 1.6rem; color: var(--terracotta);
  background: #eef1ec; border: 2px solid var(--terracotta);
  box-shadow: inset 0 0 0 4px #eef1ec, inset 0 0 0 5px var(--terracotta);
}
.medal.ok { color: var(--olive-text); border-color: var(--olive); background: #e3e2bf; box-shadow: inset 0 0 0 4px #e3e2bf, inset 0 0 0 5px var(--olive); }
.medal.small-text { font-size: 1.15rem; }
.big-emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; }

/* ---------- forms ---------- */

label.field, .field { display: block; margin-bottom: 18px; }
label.field > span, .field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
label.field > small { display: block; color: var(--faint); margin-top: 6px; font-size: 0.82rem; }
input[type=text], input[type=search], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--radius); font: inherit; font-size: 0.95rem; color: var(--text);
  background: #ffffff; border: 1px solid var(--line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(31, 58, 44, 0.14); outline: none; }
textarea { min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa09b; }
input[type=checkbox] { accent-color: var(--terracotta); }

.yesno { display: flex; gap: 10px; }
.yesno label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; position: relative;
  padding: 11px; border-radius: var(--radius); border: 1px solid var(--line); background: #ffffff;
  cursor: pointer; font-weight: 600; transition: background 0.15s, border-color 0.15s;
}
.yesno input { position: absolute; opacity: 0; pointer-events: none; }
.yesno label:has(input:checked) { border-color: var(--terracotta); background: #e7eee9; box-shadow: inset 0 0 0 1px var(--terracotta); }
.yesno label:has(input:focus-visible) { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.yesno .emoji { font-size: 18px; }

.choice-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 18px; }
.choice-tabs button {
  padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: #ffffff;
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.choice-tabs button small { display: block; color: var(--faint); font-weight: 400; font-size: 0.82rem; margin-top: 2px; }
.choice-tabs button[aria-pressed=true] { border-color: var(--terracotta); background: #e7eee9; box-shadow: inset 0 0 0 1px var(--terracotta); }
.choice-tabs button[aria-pressed=true]::before { content: "◆ "; color: var(--terracotta); font-size: 0.7em; vertical-align: 2px; }

.form-error {
  border-left: 3px solid var(--cinnabar); background: #fbeeec; color: #7a2020;
  padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 14px; font-size: 0.92rem;
}

/* ---------- notices ---------- */

.notice {
  border-left: 3px solid var(--ochre); background: var(--panel);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 18px; color: var(--muted);
}
.notice strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 2px; }
.notice.good { border-color: var(--olive); background: #ecebd0; }
.notice.warn { border-color: var(--ochre); background: #f1efe8; }
.notice.bad { border-color: var(--cinnabar); background: #f6ebe8; }

.invite-box {
  margin: 20px auto; max-width: 440px; padding: 16px 18px; border-radius: var(--radius);
  background: #ffffff; border: 1px solid var(--line); outline: 1px solid var(--line-soft); outline-offset: 3px;
}
.invite-url { font-family: var(--mono); color: var(--terracotta); font-size: 1.2rem; font-weight: 500; word-break: break-all; }
.countdown { font-variant-numeric: tabular-nums; }
.server-address { font-family: var(--mono); color: var(--terracotta); font-size: 1.5rem; font-weight: 500; }

/* ---------- badges (same as omnarch.com's) ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-inscription); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; background: transparent;
}
.badge.green { color: var(--olive-text); border-color: #7d9450; }
.badge.amber { color: var(--ochre-bright); border-color: #a8783f; }
.badge.red { color: var(--cinnabar); border-color: #b5524b; }
.badge.blue { color: var(--terracotta); border-color: var(--terracotta); }
.badge.grey { color: var(--faint); border-color: var(--line); }
.tabs .badge, .header-btn .badge { margin-left: 4px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: var(--text); color: var(--page); border-radius: var(--radius); padding: 11px 18px;
  box-shadow: 0 10px 30px rgba(20, 24, 21, 0.3); max-width: calc(100% - 32px); font-size: 0.92rem;
}
.toast.bad { background: var(--cinnabar); }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--terracotta); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   debate-only
   ===================================================================== */

input[type=email], input[type=password] {
  width: 100%; padding: 11px 13px; border-radius: var(--radius); font: inherit; font-size: 0.95rem; color: var(--text);
  background: #ffffff; border: 1px solid var(--line);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn.block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--terracotta); cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* the sign-in panel */
.auth-card { max-width: 440px; margin: 28px auto 0; }
.omnarch-btn { width: 100%; padding: 13px 18px; }
.omnarch-btn .avatar { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.omnarch-btn .seal { width: 22px; height: 22px; border-radius: 50%; }
.omnarch-hint { text-align: center; font-size: 0.82rem; color: var(--faint); margin-top: 8px; }

.divider {
  display: flex; align-items: center; gap: 14px; margin: 22px 0 18px;
  font-family: var(--font-inscription); font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--faint);
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Sign in / Create account switch */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.auth-tabs button {
  padding: 10px 8px; border: none; background: #ffffff; color: var(--muted); cursor: pointer;
  font-family: var(--font-inscription); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.auth-tabs button + button { border-left: 1px solid var(--line); }
.auth-tabs button[aria-selected=true] { background: #e7eee9; color: var(--terracotta); box-shadow: inset 0 -2px 0 var(--terracotta); }
.auth-tabs button:focus-visible { outline-offset: -3px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.field-row a { font-size: 0.82rem; font-weight: 400; }
.fine { font-size: 0.8rem; color: var(--faint); text-align: center; margin-top: 14px; }

/* =====================================================================
   sobl-only
   ===================================================================== */

.header { max-width: 880px; }
main { max-width: 820px; }
.loading { text-align: center; padding: 60px 0; }
.btn.solid { background: var(--terracotta); color: var(--page); }
.btn.solid:hover { background: var(--terracotta-bright); border-color: var(--terracotta-bright); }
.btn.solid:disabled:hover { background: var(--terracotta); color: var(--page); }
.shared-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
h2.h { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; line-height: 1.2; }
.page-head { padding: 26px 0 6px; text-align: center; }
.page-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.1; }
.page-head p { color: var(--muted); margin-top: 6px; }

/* ---------- the study timer ---------- */

.timer-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  width: max-content; max-width: calc(100% - 32px); margin: 0 auto 8px; padding: 5px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel-raised);
  font-size: 0.84rem; color: var(--text); font-variant-numeric: tabular-nums;
}
.timer-bar[hidden] { display: none; }
.timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--olive); box-shadow: 0 0 0 3px #dfe3c4; }
.timer-bar.paused .timer-dot { background: var(--faint); box-shadow: 0 0 0 3px var(--line-soft); }
.timer-bar.paused #timerText::after { content: ' · paused'; color: var(--faint); }
.timer-sep { color: var(--faint); }

/* ---------- dashboard ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.tile {
  background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; min-width: 0;
}
.tile .k { font-family: var(--font-inscription); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.tile .v { font-family: var(--font-display); font-weight: 600; font-size: 2rem; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .v small { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-left: 3px; }
.tile .s { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

.meter { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 10px 0 6px; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--olive); transition: width 0.4s ease; }
.meter.terracotta > span { background: var(--terracotta); }
.meter.thin { height: 6px; margin: 6px 0 0; }

.countdown-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.countdown-num { font-family: var(--font-display); font-weight: 600; font-size: 3.2rem; line-height: 1; color: var(--terracotta); font-variant-numeric: tabular-nums; }
.countdown-card .body { flex: 1; min-width: 200px; }

.start-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 22px 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  border: 1px solid var(--line); background: #ffffff; color: var(--muted); border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 0.84rem; cursor: pointer;
}
.chips button[aria-pressed=true] { border-color: var(--terracotta); background: #e7eee9; color: var(--text); box-shadow: inset 0 0 0 1px var(--terracotta); }
.chips button small { color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- questions ---------- */

.round-top { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; }
.round-top .phase { font-family: var(--font-inscription); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ochre); white-space: nowrap; }
.round-top .meter { flex: 1; margin: 0; }
.round-top .count { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.q-card { text-align: center; padding: 34px 26px 28px; margin-top: 14px; }
.q-dir { font-family: var(--font-inscription); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); }
.q-prompt {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 6vw, 2.8rem); line-height: 1.15;
  margin: 10px 0 4px; overflow-wrap: anywhere;
}
.q-prompt.en { font-family: var(--font-body); font-weight: 500; font-size: clamp(1.4rem, 4.5vw, 1.9rem); }
.q-hint { color: var(--muted); font-size: 0.9rem; }
.speak {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: #ffffff; color: var(--terracotta); cursor: pointer; vertical-align: middle;
  font-size: 15px; line-height: 1;
}
.speak:hover { border-color: var(--terracotta); }
.speak svg { width: 16px; height: 16px; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; text-align: left; }
.opt {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #ffffff; color: var(--text); font: inherit; font-size: 1rem; cursor: pointer;
  min-height: 56px; overflow-wrap: anywhere;
}
.opt:hover:not(:disabled) { border-color: var(--terracotta); background: #fbeee2; }
.opt .n {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); color: var(--faint);
  font-size: 0.72rem; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--olive); background: #e6e8c9; box-shadow: inset 0 0 0 1px var(--olive); }
.opt.wrong { border-color: var(--cinnabar); background: #f4ddd3; box-shadow: inset 0 0 0 1px var(--cinnabar); }
.opt.right .n { border-color: var(--olive); color: var(--olive-text); }
.opt.wrong .n { border-color: var(--cinnabar); color: var(--cinnabar); }

.type-row { display: flex; gap: 10px; margin: 24px auto 0; max-width: 480px; }
.type-row input {
  flex: 1; min-width: 0; font-size: 1.2rem; padding: 12px 14px; text-align: center;
  background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-family: inherit;
}
.type-row input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(31, 58, 44, 0.14); outline: none; }
.type-row input.right { border-color: var(--olive); background: #eef0d6; }
.type-row input.wrong { border-color: var(--cinnabar); background: #f7e4dc; }
.umlauts { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.umlauts button {
  width: 36px; height: 32px; border: 1px solid var(--line); background: #ffffff; border-radius: var(--radius);
  font: inherit; font-size: 1rem; cursor: pointer; color: var(--text);
}
.umlauts button:hover { border-color: var(--terracotta); }

.fb {
  margin: 22px auto 0; max-width: 520px; text-align: left; padding: 14px 18px; border-left: 3px solid var(--olive);
  background: #ecebd0; border-radius: 0 var(--radius) var(--radius) 0;
}
.fb.bad { border-color: var(--cinnabar); background: #f6ebe8; }
.fb.close { border-color: var(--ochre); background: #f1efe8; }
.fb .t { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.fb .ans { font-size: 1.05rem; margin-top: 2px; }
.fb .note { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.fb .actions { margin-top: 12px; }
.kbd-hint { color: var(--faint); font-size: 0.78rem; margin-top: 14px; }
kbd { font-family: var(--mono); font-size: 0.75rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: #ffffff; }

.intro .badge { margin-bottom: 8px; }
.intro .q-en { font-size: 1.25rem; color: var(--text); margin-top: 6px; }
.note-line { color: var(--muted); font-size: 0.92rem; margin-top: 10px; }

/* ---------- round summary ---------- */

.score-ring { width: 120px; height: 120px; margin: 4px auto 12px; display: block; }
.result-list { border: 1px solid var(--line); background: var(--panel-raised); border-radius: var(--radius); margin-top: 12px; text-align: left; }
.result-row { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
.result-row + .result-row { border-top: 1px solid var(--line-soft); }
.result-row .mark { flex: none; width: 20px; font-weight: 600; }
.result-row .mark.ok { color: var(--olive-text); }
.result-row .mark.no { color: var(--cinnabar); }
.result-row .w { font-weight: 600; min-width: 120px; }
.result-row .e { color: var(--muted); flex: 1; min-width: 140px; }
.result-row .given { font-size: 0.85rem; color: var(--cinnabar); width: 100%; padding-left: 30px; }

/* ---------- flashcards ---------- */

.flash-wrap { perspective: 1200px; margin: 18px auto 0; max-width: 560px; }
.flash {
  position: relative; display: grid; width: 100%; cursor: pointer; transform-style: preserve-3d;
  transition: transform 0.45s ease;
}
.flash:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }
.flash.flipped { transform: rotateY(180deg); }
.flash .face {
  grid-area: 1 / 1; min-height: 260px; position: relative;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(80, 50, 15, 0.08);
}
.flash .back { transform: rotateY(180deg); }
.flash .tapnote { position: absolute; bottom: 12px; left: 0; right: 0; font-size: 0.78rem; color: var(--faint); }
.flash-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .flash { transition: none; } }

/* ---------- word list ---------- */

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0 12px; }
.toolbar input[type=search] { flex: 1; min-width: 180px; width: auto; }
.toolbar select { width: auto; max-width: 100%; }
.word-list { border: 1px solid var(--line); background: var(--panel-raised); border-radius: var(--radius); }
.word-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 270px; gap: 4px 14px; align-items: center; padding: 10px 14px; }
.word-row + .word-row { border-top: 1px solid var(--line-soft); }
.word-row .de { font-weight: 600; overflow-wrap: anywhere; }
.word-row .en { color: var(--muted); overflow-wrap: anywhere; }
.word-row .note { grid-column: 1 / -1; font-size: 0.82rem; color: var(--faint); }
.word-row .meta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.word-row .acc { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon-btn { background: none; border: none; color: var(--faint); cursor: pointer; font: inherit; font-size: 0.8rem; padding: 2px 4px; }
.icon-btn:hover { color: var(--terracotta); }

/* ---------- stats ---------- */

.chart-card { padding: 20px 20px 14px; }
.chart-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.chart-card .sub { color: var(--muted); font-size: 0.85rem; }
.chart { position: relative; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis text { fill: var(--faint); font-size: 10px; font-family: var(--font-body); }
.chart .bar { fill: var(--terracotta); }
.chart .bar.today { fill: var(--terracotta-bright); }
.chart .bar.zero { fill: var(--line); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .bar, .chart .bar.hover { fill: var(--ochre-bright); }
.chart .goal { stroke: var(--olive); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chart .goal-label { fill: var(--olive-text); font-size: 10px; font-family: var(--font-body); }
.chart .dot { fill: var(--terracotta); stroke: var(--panel-raised); stroke-width: 2; }
.chart .line { fill: none; stroke: var(--terracotta); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tip {
  position: absolute; pointer-events: none; z-index: 3; background: var(--text); color: var(--page);
  font-size: 0.8rem; padding: 6px 10px; border-radius: var(--radius); white-space: nowrap; transform: translate(-50%, -100%);
  box-shadow: 0 6px 16px rgba(43, 27, 16, 0.25); font-variant-numeric: tabular-nums;
}
.tip b { font-weight: 600; }
.tip[hidden] { display: none; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-raised); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl th { font-family: var(--font-inscription); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 600; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .de { font-weight: 600; }
.tbl .typed { color: var(--cinnabar); font-size: 0.82rem; }

.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 64px; gap: 4px 14px; align-items: center; padding: 9px 14px; }
.topic-row + .topic-row { border-top: 1px solid var(--line-soft); }
.topic-row .name { font-weight: 600; font-size: 0.92rem; }
.topic-row .sub { font-size: 0.78rem; color: var(--faint); }
.topic-row .pct { text-align: right; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.stack-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line-soft); gap: 2px; }
.stack-bar span { display: block; height: 100%; }
.stack-bar .m { background: var(--olive); }
.stack-bar .l { background: #c9b07f; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: #ffffff; padding: 6px 12px; font: inherit; font-size: 0.82rem; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: #e7eee9; color: var(--text); box-shadow: inset 0 -2px 0 var(--terracotta); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

@media (max-width: 720px) {
  main { padding: 0 16px 32px; outline-offset: 4px; }
  main::before, main::after { margin-left: -6px; margin-right: -6px; }
  .header { padding: 14px 16px; }
  .card { padding: 20px 16px; }
  .card::before { left: 16px; right: 16px; }
  .q-card { padding: 26px 14px 22px; }
  .opts { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .word-row { grid-template-columns: minmax(0, 1fr) auto; }
  .word-row .meta { max-width: 150px; }
  .word-row .en { grid-column: 1 / 2; grid-row: 2; }
  .word-row .meta { grid-row: 1 / 3; grid-column: 2; }
  .topic-row { grid-template-columns: minmax(0, 1fr) 70px 48px; padding: 9px 10px; }
  .kbd-hint { display: none; }
  .header-buttons { gap: 4px 14px; }
}
@media (max-width: 480px) {
  .site-name small { display: none; }
  .user-chip span { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile .v { font-size: 1.6rem; }
}

/* Cormorant only has old-style figures (0 looks like O, 1 like I), so numbers use Inter / Cinzel. */
.tile .v { font-family: var(--font-body); font-size: 1.7rem; letter-spacing: -0.01em; }
.countdown-num { font-family: var(--font-inscription); }

/* ---------- flagged words ---------- */

.flag-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #ffffff; color: var(--faint); cursor: pointer; vertical-align: middle; flex: none;
}
.flag-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }
.flag-btn svg { width: 15px; height: 15px; }
.flag-btn[aria-pressed=true] { border-color: var(--terracotta); background: #e7eee9; color: var(--terracotta); }
.flag-btn[aria-pressed=true] svg { fill: currentColor; }
.tbl .flag-col { width: 1%; padding-right: 0; }
.flag-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.flag-chip {
  border: 1px solid var(--line-soft); background: transparent; color: var(--text); border-radius: 999px;
  padding: 1px 9px; font: inherit; font-size: 0.84rem; cursor: pointer;
}
.flag-chip:hover { border-color: var(--terracotta); }
.flag-chip[aria-pressed=true] { border-color: var(--terracotta); background: #e7eee9; }
.flag-chip[aria-pressed=true]::before { content: "⚑ "; color: var(--terracotta); }
.result-row .flag-btn { align-self: center; }

/* ---------- settings: sections you already know ---------- */

fieldset.skip-set { border: 0; min-width: 0; }
fieldset.skip-set legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; padding: 0; }
fieldset.skip-set > small { display: block; color: var(--faint); font-size: 0.82rem; }
.skip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; margin-top: 6px; }
.skip-item {
  display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border: 1px solid var(--line-soft);
  border-radius: var(--radius); background: #ffffff; cursor: pointer; font-size: 0.9rem;
}
.skip-item input { margin-top: 4px; width: auto; }
.skip-item small { display: block; color: var(--faint); font-size: 0.76rem; }
.skip-item:has(input:checked) { border-color: var(--terracotta); background: #e7eee9; }
.skip-item:has(input:checked) span { text-decoration: line-through; text-decoration-color: var(--faint); }

/* ---------- der / die / das ---------- */

.art-slot {
  display: inline-block; min-width: 2.2em; border-bottom: 2px solid var(--line); line-height: 1; color: var(--faint);
  text-align: center; vertical-align: baseline;
}
.art-slot:empty::before { content: "\00a0"; }
.art-slot.ok { color: var(--olive-text); border-color: var(--olive); }
.art-slot.no { color: var(--cinnabar); border-color: var(--cinnabar); }
.art-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px auto 0; max-width: 480px; }
.art-opt {
  position: relative; justify-content: center; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600;
  min-height: 64px;
}
.art-opt .n { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-weight: 400; }
.fb .art-tip { color: var(--text); }
.art-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 16px auto 4px; max-width: 420px; }
.art-split .tile { padding: 10px 12px; }
.art-split .k { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
@media (max-width: 480px) {
  .art-opt .n { display: none; }
}


/* ================================================================== *
 * Site look (paper and ink). Flattens the old manuscript framing; the
 * site bar and footer come from /assets/site-bar.css.
 * ================================================================== */
body { background: var(--bg) !important; }
main {
  background: var(--page); border: 1px solid var(--line); outline: none; box-shadow: none;
  padding: 36px 44px 44px; margin-top: 28px; border-radius: var(--radius);
}
main::before, main::after { display: none; }
@media (max-width: 640px) { main { padding: 24px 18px 32px; width: 100%; border-left: 0; border-right: 0; margin-top: 0; } }
.card { box-shadow: none; }
.card::before { display: none; }
.seal-logo, .mini-logo { display: none; }
.logo-section { font-family: var(--font-display); letter-spacing: 0.02em; font-size: 1.15rem; text-transform: none; }
.site-name small { font-family: var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.7rem; color: var(--ochre); }
.eyebrow { font-family: var(--font-body); letter-spacing: 0.14em; font-weight: 600; }
h1.title em { color: var(--text); }
.btn { border-width: 1px; }
.btn:hover img { filter: brightness(0) invert(1); }
.footer { display: none; }
::selection { background: #cfe0d5; color: var(--text); }

/* "I'm 13 or older" on sign-up forms */
.age-box { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; font-size: 0.92rem; cursor: pointer; }
.age-box input { width: auto; margin: 0; }
