/* ==========================================================================
   BürokratieBuster – Stylesheet
   Editorial paper · ink · signal red · deep green
   ========================================================================== */

:root {
  --paper: #f3eee3;
  --paper-2: #ece5d6;
  --paper-3: #e3dac7;
  --card: #faf6ec;
  --ink: #17201b;
  --ink-2: #26332b;
  --ink-3: #3f4d44;
  --muted: #6d756b;
  --line: #cec4b0;
  --line-dark: #b6ab95;
  --red: #b23b2e;
  --red-dark: #8b2b21;
  --green: #245c4a;
  --green-light: #dce8df;
  --amber: #b47a22;
  --amber-light: #f1e2c4;
  --white: #fbf8f0;
  --shadow-sm: 0 2px 8px rgba(23, 32, 27, .06);
  --shadow-md: 0 18px 50px rgba(23, 32, 27, .12);
  --shadow-lg: 0 32px 90px rgba(23, 32, 27, .18);
  --sans: "Inter", "Helvetica Neue", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --page: 1320px;
  --pad: clamp(20px, 5vw, 64px);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.38'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

::selection {
  background: var(--red);
  color: var(--paper);
}

img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 3000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { top: 16px; }

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 12px var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--red);
  color: #fbf6ea;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -.04em;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 16px;
  box-shadow: 2px 2px 0 var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.brand-text em { font-style: italic; color: var(--red); }
.brand-text small {
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 2px;
  height: 1.5px;
  background: var(--red);
  transition: right .25s ease;
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.status-pill i,
.key-state .dot,
.key-state-box .dot,
.floating-note .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 18%, transparent);
}

.status-pill.is-live i,
.key-state.is-live .dot,
.key-state-box.is-live .dot { background: var(--green); box-shadow: 0 0 0 3px rgba(36, 92, 74, .16); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .015em;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 17px; height: 17px; }

.btn-primary {
  background: var(--red);
  color: #fff8ee;
  border-color: var(--red);
  box-shadow: 0 5px 0 var(--red-dark);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); box-shadow: 0 6px 0 #6b2018; }

.btn-light {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .25);
}
.btn-light:hover { background: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-dark);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-3);
  padding: 0 4px;
  text-decoration: underline;
  text-decoration-color: var(--line-dark);
  text-underline-offset: 4px;
}
.btn-quiet:hover { color: var(--red); }

.btn-sm { height: 38px; padding: 0 14px; font-size: 11px; }
.btn:disabled { opacity: .42; pointer-events: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-3);
}
.icon-btn:hover { background: var(--ink); color: var(--paper); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link .icon { width: 15px; height: 15px; }
.text-link:hover { color: var(--red); }
.text-link.light { color: var(--paper); }

/* --------------------------------------------------------------------------
   Shared section scaffolding
   -------------------------------------------------------------------------- */

.hero,
.section,
.footer {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section { padding-top: clamp(72px, 9vw, 132px); padding-bottom: clamp(72px, 9vw, 132px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .num {
  padding: 2px 6px;
  border: 1px solid var(--line-dark);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.eyebrow.light { color: color-mix(in srgb, var(--paper) 66%, transparent); }
.eyebrow.light .num { border-color: rgba(255, 255, 255, .3); color: var(--paper); }

.signal {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent);
}

.section-head { margin-bottom: 46px; }

.section-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(30px, 6vw, 90px);
  align-items: end;
  margin-top: 22px;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2.45rem, 4.6vw, 4.15rem);
  font-weight: 500;
  line-height: .99;
  letter-spacing: -.035em;
}

.serif-em { font-style: italic; color: var(--red); }
.light .serif-em { color: #e8b49c; }

.section-intro {
  max-width: 380px;
  padding-bottom: 7px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.source-note {
  margin-top: 26px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 820px;
}

.hint { font-size: 11.5px; line-height: 1.6; color: var(--muted); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(54px, 7vw, 100px);
  padding-bottom: clamp(64px, 8vw, 110px);
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -180px;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(178, 59, 46, .09) 0%, rgba(178, 59, 46, 0) 66%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.hero h1 {
  margin: 22px 0 26px;
  font-family: var(--serif);
  font-size: clamp(3.15rem, 6.4vw, 6.35rem);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.05em;
}

.hero h1 .serif-em {
  display: inline;
  font-size: .92em;
  letter-spacing: -.045em;
}

.lead {
  max-width: 560px;
  font-size: clamp(15px, 1.4vw, 17.5px);
  line-height: 1.68;
  color: var(--ink-3);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-meta dt {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -.03em;
}
.hero-meta dd {
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero document */

.hero-visual {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.akte {
  position: relative;
  width: min(100%, 430px);
  padding: 30px 30px 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 45%),
    var(--card);
  border: 1px solid #d6ccb8;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.4deg);
  color: var(--ink);
}

.akte::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 96px;
  height: 26px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(214, 199, 168, .5);
  border-left: 1px dashed rgba(23, 32, 27, .12);
  border-right: 1px dashed rgba(23, 32, 27, .12);
}

.akte-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.akte-az { font-family: var(--mono); letter-spacing: 0; }

.akte-kicker {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
}

.akte-amount {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1;
  letter-spacing: -.045em;
}
.akte-amount span {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.akte-rule { height: 1px; margin: 22px 0 6px; background: var(--line); }

.akte-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  font-size: 11px;
}
.akte-row span { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: 9px; font-weight: 600; }
.akte-row b { font-weight: 600; text-align: right; }
.mark {
  color: var(--red);
  background: linear-gradient(transparent 62%, rgba(178, 59, 46, .18) 62%);
}

.redacted { display: flex; flex-direction: column; gap: 6px; margin: 20px 0 16px; }
.redacted i { display: block; height: 7px; background: #dcd3c1; }
.redacted i:nth-child(1) { width: 92%; }
.redacted i:nth-child(2) { width: 78%; }
.redacted i:nth-child(3) { width: 86%; }
.redacted i:nth-child(4) { width: 55%; }
.redacted i:nth-child(5) { width: 70%; }

.akte-foot { font-size: 8.5px; letter-spacing: .04em; color: var(--muted); }

.stamp {
  position: absolute;
  right: 18px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  transform: rotate(-13deg);
  opacity: .82;
  box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5.5px var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.stamp small {
  margin-top: 3px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .2em;
}

.floating-note {
  position: absolute;
  left: -22px;
  bottom: -16px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 15px;
  background: #fffdf6;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  font-size: 10.5px;
  transform: rotate(-1deg);
}
.floating-note b { font-weight: 700; }
.floating-note .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(178, 59, 46, .13); }

.floating-note.second {
  left: auto;
  right: -18px;
  top: -16px;
  bottom: auto;
  transform: rotate(2deg);
  gap: 8px;
}
.mini-label { font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mini-bar { width: 62px; height: 5px; background: var(--paper-3); }
.mini-bar i { display: block; width: 68%; height: 100%; background: var(--green); }
.mini-value { font-family: var(--serif); font-size: 18px; }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  overflow: hidden;
  contain: paint;
  background: var(--ink);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  padding: 13px 0;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--paper);
  white-space: nowrap;
  opacity: .82;
}
.marquee span:nth-child(3n+2) { color: var(--red); opacity: .9; font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Model cards
   -------------------------------------------------------------------------- */

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 25px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.model-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--model);
}
.model-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--model) 45%, var(--line));
}

.model-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.model-index { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--muted); }
.model-badge {
  padding: 4px 8px;
  background: var(--model);
  color: #fff9ef;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.model-name {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
}
.model-maker {
  margin-top: 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.model-tagline {
  margin-top: 19px;
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  line-height: 1.25;
  color: var(--model);
}
.model-desc {
  margin-top: 12px;
  font-size: 12.8px;
  line-height: 1.65;
  color: var(--ink-3);
}

.spec-list { margin-top: 22px; border-top: 1px solid var(--line); }
.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  font-size: 10.5px;
}
.spec-row dt { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 8.5px; font-weight: 600; }
.spec-row dd { text-align: right; font-weight: 600; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.tag {
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--model) 32%, var(--line));
  color: color-mix(in srgb, var(--model) 88%, var(--ink));
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
}
.watch-list { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.watch-list li {
  position: relative;
  padding-left: 13px;
  font-size: 10px;
  color: var(--muted);
}
.watch-list li::before { content: "×"; position: absolute; left: 0; color: var(--red); font-weight: 700; }

.model-quote {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
}
.model-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.model-link .icon { width: 14px; height: 14px; transition: transform .2s ease; }
.model-link:hover { color: var(--red); }
.model-link:hover .icon { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Why
   -------------------------------------------------------------------------- */

.why { background: var(--ink); color: var(--paper); }
.why-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 120px);
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 124px) var(--pad);
}
.why-lead h2 {
  margin: 24px 0 22px;
  font-size: clamp(2.5rem, 4.8vw, 4.2rem);
  color: var(--paper);
}
.why-lead p {
  max-width: 470px;
  font-size: 15px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--paper) 68%, transparent);
}
.why-lead .text-link { margin-top: 28px; }

.why-points { display: flex; flex-direction: column; justify-content: center; }
.why-points article {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.why-points article:last-child { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.why-num {
  font-family: var(--mono);
  font-size: 10px;
  color: #d78a6d;
  padding-top: 6px;
}
.why-points h3 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -.02em;
}
.why-points p {
  grid-column: 2;
  font-size: 13px;
  line-height: 1.65;
  color: color-mix(in srgb, var(--paper) 60%, transparent);
}

/* --------------------------------------------------------------------------
   Filter + task cards
   -------------------------------------------------------------------------- */

.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 26px; }
.chip {
  height: 34px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.task-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 268px;
  padding: 24px 23px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: left;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.task-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}
.task-no {
  position: absolute;
  top: 8px;
  right: 15px;
  font-family: var(--serif);
  font-size: 67px;
  line-height: 1;
  color: color-mix(in srgb, var(--line) 62%, transparent);
  pointer-events: none;
}
.task-cat {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
}
.task-cat::before { content: ""; width: 14px; height: 1px; background: var(--red); }
.task-title {
  position: relative;
  z-index: 1;
  max-width: 90%;
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.task-teaser {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}
.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}
.difficulty { display: inline-flex; align-items: center; gap: 7px; }
.diff-dots { display: inline-flex; gap: 3px; }
.diff-dots i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--line-dark); }
.diff-dots i.on { background: var(--red); border-color: var(--red); }
.difficulty span, .task-min { font-size: 8.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.task-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.task-arrow .icon { width: 14px; height: 14px; }
.task-card:hover .task-arrow { background: var(--red); border-color: var(--red); color: #fff; }

/* --------------------------------------------------------------------------
   Arena
   -------------------------------------------------------------------------- */

.arena {
  background: #1a241e;
  color: var(--paper);
  padding-top: clamp(72px, 9vw, 124px);
  padding-bottom: clamp(72px, 9vw, 124px);
}
.arena .section-head,
.arena-shell {
  max-width: var(--page);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.arena .section-title-row h2 { color: var(--paper); }
.arena .section-intro { color: color-mix(in srgb, var(--paper) 62%, transparent); }
.arena .section-head { margin-bottom: 34px; }

.arena-shell { padding-left: calc(var(--pad) + 0px); padding-right: calc(var(--pad) + 0px); }
.arena-shell > * { max-width: calc(var(--page) - 2 * var(--pad)); }
.arena-toolbar,
.custom-wrap,
.banner,
.arena-grid,
.arena-foot { margin-left: auto; margin-right: auto; }

.arena-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(160px, .7fr) auto auto;
  gap: 12px;
  align-items: end;
  max-width: var(--page);
  padding: 18px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .12);
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 55%, transparent);
}
.field select,
.field input,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 0;
  background: #243028;
  color: var(--paper);
  font-size: 12.5px;
  outline: none;
  transition: border-color .2s ease;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f3eee3' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.field textarea { height: auto; min-height: 108px; padding: 12px; resize: vertical; line-height: 1.55; font-family: var(--sans); }
.field select:focus,
.field input:focus,
.field textarea:focus { border-color: #d78a6d; }
.field select option { background: #243028; }

.custom-wrap {
  max-width: var(--page);
  margin-top: 12px;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .12);
}
.custom-wrap .hint { color: color-mix(in srgb, var(--paper) 50%, transparent); margin-top: 8px; }

.switch-field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 6px;
  font-size: 11px;
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  cursor: pointer;
  white-space: nowrap;
}
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 30px; height: 17px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; transition: background .2s ease; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; background: rgba(255, 255, 255, .55); transition: transform .2s ease, background .2s ease; }
.switch-field input:checked + .switch-ui { background: #d78a6d; border-color: #d78a6d; }
.switch-field input:checked + .switch-ui::after { transform: translateX(13px); background: #1a241e; }
.switch-field input:focus-visible + .switch-ui { outline: 2px solid #e8b49c; outline-offset: 3px; }

.btn.run { height: 44px; background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.btn.run:hover { background: #fff; border-color: #fff; }
.btn.run:disabled { opacity: .55; }

.banner {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: var(--page);
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(197, 138, 46, .12);
  border: 1px solid rgba(214, 160, 76, .35);
  color: #f2dfbf;
}
.banner[hidden] { display: none; }
.banner-tag {
  align-self: flex-start;
  padding: 3px 6px;
  background: #d6a04c;
  color: #1a241e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.banner p { font-size: 11px; line-height: 1.55; color: color-mix(in srgb, #f2dfbf 85%, transparent); }
.banner p b { color: #fff4df; }
.banner .btn { margin-left: auto; border-color: rgba(242, 223, 191, .35); color: #f2dfbf; flex: 0 0 auto; }
.banner .btn:hover { background: #f2dfbf; color: var(--ink); }

.arena-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  max-width: var(--page);
}

.arena-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  background: var(--card);
  border-top: 4px solid var(--model);
  color: var(--ink);
  padding: 18px 18px 14px;
  transition: box-shadow .2s ease;
}
.arena-card.is-running { box-shadow: 0 0 0 1px var(--model), 0 18px 40px rgba(0, 0, 0, .25); }
.arena-card.is-error { border-top-color: var(--red); }

.arena-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.arena-model { display: flex; flex-direction: column; gap: 3px; }
.arena-model .idx { font-family: var(--mono); font-size: 8px; color: var(--muted); letter-spacing: .08em; }
.arena-model h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -.02em; line-height: 1.05; }
.arena-model .maker { font-size: 8px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.arena-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.arena-status .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--line-dark); }
.arena-status.is-live .dot { background: var(--green); }
.arena-status.is-error .dot { background: var(--red); }
.arena-status.is-ai .dot { background: var(--model); }

.arena-divider { height: 1px; margin: 14px 0 12px; background: var(--line); }

.response {
  flex: 1;
  min-height: 230px;
  max-height: 560px;
  overflow: auto;
  padding-right: 5px;
  font-size: 12.5px;
  line-height: 1.68;
  scrollbar-width: thin;
  scrollbar-color: var(--line-dark) transparent;
}
.response::-webkit-scrollbar { width: 6px; }
.response::-webkit-scrollbar-thumb { background: var(--line-dark); }
.response p { margin-bottom: 8px; }
.response h1, .response h2, .response h3 {
  margin: 13px 0 6px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.response h1:first-child, .response h2:first-child, .response h3:first-child { margin-top: 0; }
.response ul, .response ol { margin: 5px 0 9px; padding-left: 17px; }
.response ul { list-style: disc; }
.response ol { list-style: decimal; }
.response li { margin-bottom: 3px; }
.response strong { font-weight: 700; }
.response em { font-style: italic; }
.response blockquote { margin: 8px 0; padding: 4px 0 4px 10px; border-left: 2px solid var(--red); color: var(--ink-3); }
.response code { font-family: var(--mono); font-size: .9em; background: var(--paper-2); padding: 1px 4px; }
.response pre { overflow: auto; padding: 10px; background: var(--paper-2); font-size: 11px; }
.response pre code { background: transparent; padding: 0; }

.response-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 230px;
  text-align: center;
  color: var(--muted);
}
.response-empty .empty-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--line-dark);
}
.response-empty p { max-width: 190px; font-size: 10.5px; line-height: 1.5; }

.typing::after {
  content: "▌";
  display: inline-block;
  margin-left: 2px;
  color: var(--red);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.arena-error {
  margin-top: 8px;
  padding: 9px 10px;
  background: #f6e2dc;
  border-left: 3px solid var(--red);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--red-dark);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.metric { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 7px 2px 6px; background: var(--card); }
.metric span { font-size: 8px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.metric b { font-family: var(--mono); font-size: 10.5px; font-weight: 600; }

.arena-card-foot { display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.arena-card-foot .btn { border-color: var(--line); color: var(--ink-3); }
.arena-card-foot .btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rated-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.rated-flag .icon { width: 12px; height: 12px; }

.arena-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.key-state { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--paper) 57%, transparent); }
.arena-actions { display: flex; gap: 8px; }
.arena-actions .btn { border-color: rgba(255, 255, 255, .2); color: color-mix(in srgb, var(--paper) 75%, transparent); }
.arena-actions .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* --------------------------------------------------------------------------
   Results
   -------------------------------------------------------------------------- */

.result-tabs {
  display: flex;
  gap: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; transition: background .2s ease; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { background: var(--red); }
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  background: var(--paper-3);
  border-radius: 10px;
  font-size: 9px;
  letter-spacing: 0;
  color: var(--ink-3);
}

.expect-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.matrix-card { background: var(--card); border: 1px solid var(--line); }
.matrix-head,
.matrix-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) repeat(3, minmax(0, 1fr));
  align-items: center;
}
.matrix-head {
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.matrix-head span:not(:first-child) { text-align: center; }
.m-kolibri { color: #a94b2c !important; }
.m-deepseek { color: #344e86 !important; }
.m-qwen { color: #1f6a62 !important; }
.matrix-row { padding: 9px 17px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.matrix-row:last-child { border-bottom: 0; }
.matrix-label { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.matrix-cell { display: flex; justify-content: center; }
.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 5px 7px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.2;
}
.level-3 { background: var(--green); color: #f7f3e8; }
.level-2 { background: #dce8df; color: #245c4a; }
.level-1 { background: #eee6d5; color: #7a705d; }
.matrix-note { padding: 13px 17px 15px; border-top: 1px solid var(--line); font-size: 10px; line-height: 1.55; color: var(--muted); }

.expect-aside { padding-top: 4px; }
.expect-aside h3 { margin-top: 12px; font-family: var(--serif); font-size: 27px; font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }
.expect-aside > p:not(.eyebrow) { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.verdict-list { margin-top: 22px; display: flex; flex-direction: column; }
.verdict {
  padding: 15px 0 16px 15px;
  border-left: 3px solid var(--model);
  border-bottom: 1px solid var(--line);
}
.verdict:first-child { border-top: 1px solid var(--line); }
.verdict-kicker { font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--model); }
.verdict h4 { margin-top: 4px; font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.verdict p { margin-top: 5px; font-size: 10.5px; line-height: 1.55; color: var(--muted); }

/* Measurement empty state */

.measure-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-dark);
  text-align: center;
  background: color-mix(in srgb, var(--card) 55%, transparent);
}
.measure-empty .big {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-style: italic;
  line-height: .95;
  letter-spacing: -.04em;
  color: var(--line-dark);
}
.measure-empty h3 { margin-top: 18px; font-family: var(--serif); font-size: 25px; font-weight: 500; }
.measure-empty p { max-width: 440px; margin-top: 8px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.measure-empty .btn { margin-top: 20px; }

/* Measurement populated */

.measure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
  gap: 26px;
  align-items: start;
}
.ranking { display: flex; flex-direction: column; gap: 10px; }
.rank-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 15px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--model);
}
.rank-no { font-family: var(--serif); font-size: 25px; color: var(--model); line-height: 1; }
.rank-name { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.1; }
.rank-sub { margin-top: 3px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rank-score { text-align: right; }
.rank-score b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.rank-score span { font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.radar-card { background: var(--card); border: 1px solid var(--line); padding: 18px; }
.radar-card h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.radar-card p { margin-top: 3px; font-size: 9px; color: var(--muted); }
.radar-wrap { margin-top: 10px; }
.radar-wrap svg { width: 100%; height: auto; overflow: visible; }
.radar-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.radar-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.radar-legend i { width: 7px; height: 7px; border-radius: 50%; }

.measure-table-card { margin-top: 20px; background: var(--card); border: 1px solid var(--line); overflow-x: auto; }
.measure-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.measure-table th { padding: 9px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); text-align: left; font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.measure-table td { padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); font-size: 10.5px; vertical-align: top; }
.measure-table tr:last-child td { border-bottom: 0; }
.measure-table td num { font-family: var(--mono); }
.best-score { color: var(--red); font-weight: 700; }
.measure-note { margin-top: 12px; font-size: 10px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Method
   -------------------------------------------------------------------------- */

.method-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 26px; align-items: start; }
.method-card { padding-top: 19px; border-top: 3px solid var(--ink); }
.method-card h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }

.rubric-table { width: 100%; margin-top: 16px; border-collapse: collapse; }
.rubric-table th {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.rubric-table th:nth-child(2), .rubric-table td:nth-child(2) { text-align: center; width: 64px; }
.rubric-table td { padding: 11px 8px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: top; font-size: 10.5px; line-height: 1.5; }
.rubric-table td:first-child { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.rubric-table td:nth-child(2) { font-family: var(--mono); font-size: 11px; color: var(--red); }
.rubric-table td:nth-child(3) { color: var(--muted); }

.formula {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--paper);
}
.formula span { display: block; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #d78a6d; margin-bottom: 5px; }
.formula code { font-family: var(--mono); font-size: 9px; line-height: 1.6; color: color-mix(in srgb, var(--paper) 82%, transparent); }
.method-card .hint { margin-top: 10px; }

.rule-list { margin-top: 18px; display: flex; flex-direction: column; }
.rule-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rule-list li:last-child { border-bottom: 1px solid var(--line); }
.rule-list span { font-family: var(--mono); font-size: 9px; color: var(--red); padding-top: 2px; }
.rule-list p { font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }

.limits { margin-top: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 60%, transparent); }
.limits summary { padding: 11px 13px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.limits p { padding: 0 13px 13px; font-size: 10.5px; line-height: 1.6; color: var(--muted); }

.repro {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 34px;
  align-items: center;
  margin-top: 46px;
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
}
.repro h3 { font-family: var(--serif); font-size: 27px; font-weight: 500; }
.repro p { margin-top: 7px; font-size: 11px; line-height: 1.65; color: color-mix(in srgb, var(--paper) 62%, transparent); }
.repro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.repro-actions .btn { border-color: rgba(255, 255, 255, .25); color: var(--paper); }
.repro-actions .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.code-block {
  margin: 0;
  padding: 16px;
  overflow: auto;
  background: #101713;
  border: 1px solid rgba(255, 255, 255, .12);
  color: #d8d2c2;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.65;
  white-space: pre;
}
.code-block.small { padding: 10px 12px; margin: 7px 0; font-size: 9px; }

/* --------------------------------------------------------------------------
   Closing
   -------------------------------------------------------------------------- */

.closing {
  background: var(--red-dark);
  color: var(--paper);
  padding: clamp(72px, 10vw, 130px) var(--pad);
  text-align: center;
}
.closing > * { max-width: 930px; margin-left: auto; margin-right: auto; }
.closing .eyebrow { justify-content: center; color: color-mix(in srgb, var(--paper) 70%, transparent); }
.closing .signal { background: #f2c6ab; box-shadow: 0 0 0 4px rgba(242, 198, 171, .14); }
.closing h2 {
  margin: 22px auto 20px;
  font-size: clamp(2.1rem, 4.4vw, 3.9rem);
  line-height: 1.02;
  color: var(--paper);
}
.closing p { max-width: 680px; font-size: 14.5px; line-height: 1.7; color: color-mix(in srgb, var(--paper) 78%, transparent); }
.closing .btn { margin-top: 30px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding-top: 56px;
  padding-bottom: 34px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.footer-name { font-family: var(--serif); font-size: 20px; }
.footer-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; padding: 28px 0; }
.footer-cols h4 { font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-cols li { margin-bottom: 5px; font-size: 10.5px; line-height: 1.5; color: var(--ink-3); }
.footer-cols a { text-decoration: none; border-bottom: 1px solid transparent; }
.footer-cols a:hover { color: var(--red); border-bottom-color: var(--red); }
.footer-legal { padding-top: 18px; border-top: 1px solid var(--line); font-size: 9px; line-height: 1.6; color: var(--muted); max-width: 760px; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal {
  width: min(920px, 94vw);
  max-height: 88vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.modal-narrow { width: min(540px, 94vw); }
.modal::backdrop { background: rgba(16, 23, 19, .62); backdrop-filter: blur(4px); }
.modal[open] .modal-inner { animation: modal-in .22s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }

.modal-inner {
  max-height: 88vh;
  overflow: auto;
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line-dark);
  box-shadow: var(--shadow-lg);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-head h2 { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1; letter-spacing: -.03em; margin-top: 9px; }
.modal-lead { margin: 14px 0 18px; font-size: 12px; line-height: 1.65; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

.task-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.task-dialog-head h2 { margin-top: 10px; max-width: 680px; font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.meta-chip { padding: 4px 9px; border: 1px solid var(--line); font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.meta-chip.red { border-color: var(--red); color: var(--red); }

.dialog-section { margin-top: 24px; }
.dialog-section h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.dialog-section h3::before { content: ""; width: 13px; height: 1px; background: var(--red); }
.dialog-section p { font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.doc-block {
  margin-top: 7px;
  padding: 16px 17px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-dark);
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 300px;
  overflow: auto;
  color: var(--ink-2);
}
.prompt-block {
  border-left-color: var(--red);
  font-size: 12px;
  background: #f7efe0;
}
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 18px; }
.check-grid li { display: flex; gap: 7px; font-size: 10.5px; line-height: 1.5; color: var(--ink-3); }
.check-grid li::before { content: "✓"; color: var(--green); font-weight: 700; flex: 0 0 auto; }
.pitfall-list li { display: flex; gap: 7px; margin-bottom: 4px; font-size: 10.5px; line-height: 1.5; color: var(--ink-3); }
.pitfall-list li::before { content: "!"; display: grid; place-items: center; width: 13px; height: 13px; margin-top: 1px; border-radius: 50%; background: var(--red); color: #fff; font-size: 8px; font-weight: 800; flex: 0 0 auto; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 17px; border-top: 1px solid var(--line); }

/* Settings */
.settings-details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.settings-details summary { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; color: var(--ink-3); }
.settings-details p { margin-top: 7px; font-size: 10.5px; color: var(--muted); }
.settings-details code { font-family: var(--mono); font-size: .95em; background: var(--paper-2); padding: 1px 4px; }
.key-state-box { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; background: var(--paper-2); border: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.key-state-box.is-live { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); color: var(--green); }

/* Rating */
.rating-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.rating-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rating-label { font-size: 11px; font-weight: 600; }
.rating-label small { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 400; color: var(--muted); }
.rating-opts { display: flex; gap: 3px; }
.rate-opt { position: relative; }
.rate-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-opt span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rate-opt span:hover { border-color: var(--ink); color: var(--ink); }
.rate-opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rate-opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 4000;
  max-width: min(520px, 90vw);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border-left: 3px solid var(--red);
  box-shadow: var(--shadow-md);
  font-size: 11.5px;
  line-height: 1.5;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .nav { gap: 18px; }
  .nav a { font-size: 10px; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 40px; }
  .floating-note { left: 0; }
  .floating-note.second { right: 0; }
}

@media (max-width: 1020px) {
  .nav { display: none; }
  .topbar { justify-content: space-between; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: auto; justify-content: center; margin-top: 26px; }
  .akte { transform: rotate(.6deg); }
  .floating-note { display: none; }
  .floating-note { left: 6%; bottom: 6%; }
  .floating-note.second { right: 4%; top: 2%; }
  .model-grid { grid-template-columns: 1fr; }
  .model-card { max-width: none; }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title-row { grid-template-columns: 1fr; gap: 20px; }
  .section-intro { max-width: 560px; }
  .why-panel { grid-template-columns: 1fr; gap: 44px; }
  .why-points { max-width: 640px; }
  .arena-toolbar { grid-template-columns: 1fr 1fr; }
  .arena-toolbar .btn.run { grid-column: 1 / -1; justify-self: start; }
  .arena-grid { grid-template-columns: 1fr; }
  .arena-card { min-height: 0; }
  .response { max-height: none; }
  .expect-grid { grid-template-columns: 1fr; }
  .measure-layout { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .repro { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 84px; }
  .topbar { padding-top: 9px; padding-bottom: 9px; gap: 12px; }
  .brand-mark { width: 38px; height: 38px; font-size: 16px; }
  .brand-text { font-size: 18px; }
  .brand-text small { display: none; }
  .status-pill { display: none; }
  .btn { height: 46px; padding: 0 16px; }
  #openSettings { width: 40px; padding: 0; }
  #openSettings span { display: none; }
  .btn-sm { height: 36px; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(2.65rem, 13.2vw, 4.1rem); }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .hero-actions .btn { justify-content: center; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-meta dt { font-size: 27px; }
  .akte { padding: 22px 20px 20px; }
  .akte-amount { font-size: 45px; }
  .floating-note { display: none; }
  .stamp { width: 84px; height: 84px; font-size: 10px; right: 10px; bottom: 12px; }
  .stamp small { font-size: 6px; }
  .marquee span { font-size: 13px; }
  .task-grid { grid-template-columns: 1fr; }
  .task-card { min-height: 235px; }
  .filter-row { gap: 5px; }
  .chip { height: 31px; padding: 0 10px; font-size: 9px; }
  .arena-toolbar { grid-template-columns: 1fr; padding: 14px; }
  .arena-toolbar .btn.run { width: 100%; }
  .switch-field { height: 34px; }
  .banner { flex-wrap: wrap; }
  .banner .btn { margin-left: 0; }
  .arena-actions { flex-wrap: wrap; }
  .arena-foot { flex-direction: column; align-items: flex-start; }
  .result-tabs { gap: 16px; }
  .tab { font-size: 10px; }
  .matrix-head, .matrix-row { grid-template-columns: 1.3fr repeat(3, minmax(0, .9fr)); padding-left: 10px; padding-right: 10px; }
  .matrix-head { font-size: 7px; }
  .matrix-label { font-size: 9.5px; }
  .level-pill { min-width: 0; width: 100%; font-size: 7.5px; padding: 5px 3px; }
  .check-grid { grid-template-columns: 1fr; }
  .modal-inner { padding: 22px 18px; }
  .task-dialog-head { flex-direction: column-reverse; align-items: flex-start; }
  .doc-block { max-height: 230px; }
  .rating-row { grid-template-columns: 1fr; gap: 7px; }
  .rating-opts { justify-content: flex-start; }
  .repro { padding: 20px; }
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
  .closing h2 { font-size: clamp(1.9rem, 8vw, 2.7rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
