/* Avasis. Tokens first; see DESIGN-v2.md + docs/design/DECISIONS.md. No gradients, no glows, no purple. Motion: MOTION.md Part 2. */
:root {
  --bg: #09090b; --surface: #111113; --surface-2: #18181b; --line: #27272a; --line-2: #3f3f46;
  --text: #fafafa; --text-2: #d4d4d8; --muted: #a1a1aa; --faint: #52525b; --ink: #09090b;
  --attn: #f0b100; --pass: #3fb950;
  --wall: #18181b;
  --plus: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><path d='M14 11v6M11 14h6' stroke='%2327272a' stroke-width='1'/></svg>");
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 1180px; --pad: 40px;
  --t: 160ms; --t-slow: 400ms;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --line: #e4e4e7; --line-2: #d4d4d8;
  --text: #09090b; --text-2: #27272a; --muted: #52525b; --faint: #a1a1aa; --ink: #fafafa;
  --attn: #7a4a00; --pass: #14532d;
  --wall: #e4e4e7;
  --plus: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28'><path d='M14 11v6M11 14h6' stroke='%23e4e4e7' stroke-width='1'/></svg>");
  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; } }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text-2); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a.link:hover { text-decoration-color: var(--text); }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code, pre, kbd, .mono { font-family: var(--mono); }
code { font-size: .92em; padding: 1px 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 3px; color: var(--text); overflow-wrap: anywhere; }
pre { margin: 0; overflow-x: auto; font-size: 13px; line-height: 1.7; }
pre code { border: 0; padding: 0; background: none; font-size: inherit; }
h1, h2, h3, h4 { color: var(--text); font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
h1 { font-size: 64px; }
h2 { font-size: 40px; }
h3 { font-size: 28px; letter-spacing: -0.015em; }
h4 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono-cap { font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mark { height: 22px; width: auto; color: var(--muted); }
.mark svg { height: 100%; width: auto; fill: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- frame ---------- */
.bar { border-bottom: 1px solid var(--line); background: var(--surface); font: 400 14px/1.4 var(--sans); color: var(--text-2); }
.bar .in { max-width: var(--max); margin: 0 auto; padding: 10px var(--pad); display: flex; gap: 12px; align-items: center; justify-content: center; }
.bar a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.bar button { margin-left: auto; color: var(--muted); }
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav .in { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand small { font: 400 12px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.brand .logo { width: 22px; height: 22px; align-self: center; }
.nav nav { display: flex; gap: 22px; font-size: 15px; color: var(--text-2); }
.nav nav a[aria-current="page"] { color: var(--text); }
.nav nav a:hover { color: var(--text); }
.nav .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.nav .lbl-s { display: none; }
.frame { max-width: var(--max); margin: 0 auto; border-left: 1px dashed var(--line); border-right: 1px dashed var(--line); }
.divider { border-top: 1px dashed var(--line); padding: 10px var(--pad); font: 400 12px/1.4 var(--mono); color: var(--muted); }
.sec { padding: 72px var(--pad); }
.sec.tight { padding: 48px var(--pad); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; font: 500 13px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--text); border: 1px solid var(--line-2); white-space: nowrap; transition: background-color .16s ease-out, border-color .16s ease-out, color .16s ease-out; }
.btn:hover { border-color: var(--text); }
.btn .i { width: 15px; height: 15px; }
.btn-primary { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn-primary:hover { background: var(--text-2); border-color: var(--text-2); }
.btn-bracket { position: relative; border-color: transparent; }
.btn-bracket::before, .btn-bracket::after, .btn-bracket .bk::before, .btn-bracket .bk::after { content: ""; position: absolute; width: 8px; height: 8px; border: 0 solid var(--text); }
.btn-bracket::before { left: -1px; top: -1px; border-top-width: 1px; border-left-width: 1px; }
.btn-bracket::after { right: -1px; bottom: -1px; border-bottom-width: 1px; border-right-width: 1px; }
.btn-bracket .bk::before { right: -1px; top: -1px; border-top-width: 1px; border-right-width: 1px; }
.btn-bracket .bk::after { left: -1px; bottom: -1px; border-bottom-width: 1px; border-left-width: 1px; }
.btn-bracket:hover { background: var(--surface-2); border-color: transparent; }
.btn-paid { background: var(--text); border-color: var(--text); color: var(--ink); }
.btn-paid:hover { filter: none; background: var(--text-2); opacity: 1; }
.btn.icon { padding: 0 10px; border-color: transparent; }
.theme-toggle .sun { display: none; } [data-theme="light"] .theme-toggle .sun { display: block; } [data-theme="light"] .theme-toggle .moon { display: none; }
.btn.icon:hover { border-color: var(--line-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding: 88px var(--pad) 72px; align-items: start; }
.hero .label { font: 400 12px/1.4 var(--mono); color: var(--muted); margin-bottom: 28px; display: flex; align-items: center; gap: 8px; }
.hero .label i { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); }
.hero h1 { max-width: 15ch; font-size: clamp(44px, 4.6vw, 64px); }
.hero .lede { margin-top: 24px; }
.hero .actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero .note { margin-top: 16px; font: 400 12px/1.5 var(--mono); color: var(--muted); }
.live { margin-top: 14px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; font: 400 12px/1.6 var(--mono); color: var(--muted); display: flex; gap: 10px; align-items: center; }
.live b { color: var(--pass); font-weight: 500; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); flex: none; }

/* ---------- stacked paper code panel ---------- */
.paper { position: relative; z-index: 0; }
.paper::before, .paper::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--line); background: var(--surface); z-index: -1; }
.paper::before { transform: translate(6px, 6px); }
.paper::after { transform: translate(12px, 12px); opacity: .55; }
.panel { border: 1px solid var(--line); background: var(--surface); }
.panel .head { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 4px; border-bottom: 1px solid var(--line); height: 44px; font: 400 13px/1 var(--mono); color: var(--muted); overflow-x: auto; }
.panel .head .t { padding: 0 12px; height: 44px; display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.panel .head .t[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.panel .head .t .mark { height: 14px; color: inherit; }
.panel .head .copy { margin-left: auto; }
.panel .body { padding: 18px 20px; }
.panel .foot { border-top: 1px solid var(--line); padding: 12px 20px; font: 400 12px/1.4 var(--mono); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.panel .foot a { color: var(--text); }
.copy { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/1 var(--mono); color: var(--muted); padding: 6px 8px; }
.copy:hover { color: var(--text); }
.copy.done { color: var(--pass); }
.term { font: 400 13px/1.7 var(--mono); color: var(--text-2); min-height: 300px; white-space: pre-wrap; word-break: break-word; }
.term .c { color: var(--muted); }
.term .k { color: var(--text); }
.term .p { color: var(--muted); }
.term .g { color: var(--pass); }
.term .cur { display: inline-block; width: 7px; height: 14px; background: var(--text); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tok-s { color: var(--pass); } .tok-k { color: var(--text); } .tok-c { color: var(--muted); } .tok-n { color: var(--text); }

/* ---------- marks band ---------- */
.marks { padding: 28px var(--pad); display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.marks .lead { font: 400 14px/1.4 var(--sans); color: var(--muted); margin-right: 8px; }
.marks .lead b { color: var(--text); font-weight: 500; }
.marks .m { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font: 500 14px/1 var(--sans); }
.marks .m .mark { height: 20px; color: inherit; }
.marks .m:hover { color: var(--text); }

/* ---------- pivot ---------- */
.pivot { display: grid; grid-template-columns: 6fr 6fr; gap: 56px; align-items: start; }
.pivot h2 { max-width: 16ch; }
.pivot p + p { margin-top: 14px; }

/* ---------- board cards ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.pcard { border: 1px solid var(--line); background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-height: 220px; transition: border-color .16s ease-out; }
.pcard:hover { border-color: var(--line-2); }
.pcard .top { display: flex; justify-content: space-between; gap: 12px; align-items: center; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.pcard .top .src { display: inline-flex; gap: 6px; align-items: center; }
.pcard .top .src .mark { height: 14px; color: inherit; }
.pcard h3 { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .sig { font: 400 12px/1.5 var(--mono); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { margin-top: auto; display: flex; gap: 14px; font: 400 12px/1.4 var(--mono); color: var(--muted); flex-wrap: wrap; align-items: center; }
.pcard .meta .paid { color: var(--muted); }
.pcard .meta .pass { color: var(--pass); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; flex-wrap: wrap; }

/* ---------- cta on the wall ---------- */
.cta { position: relative; overflow: hidden; padding: 120px var(--pad); text-align: left; }
.cta .wall { position: absolute; inset: 0; margin: 0; font: 400 12px/1.15 var(--mono); color: var(--wall); pointer-events: none; user-select: none; white-space: pre; overflow: hidden; }
.cta .in { position: relative; max-width: 640px; }
.cta .in p { margin-top: 12px; color: var(--muted); }
.cta .actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.cta .paper { margin-top: 32px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); }
footer .in { max-width: var(--max); margin: 0 auto; padding: 40px var(--pad); display: grid; grid-template-columns: 5fr 2fr 2fr 3fr; gap: 32px; font-size: 14px; color: var(--muted); }
footer h5 { margin: 0 0 12px; font: 500 12px/1.4 var(--mono); letter-spacing: .04em; color: var(--muted); }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
footer a:hover { color: var(--text); }
footer .honest { margin-top: 14px; font: 400 12px/1.6 var(--mono); color: var(--muted); max-width: 44ch; }
footer .social { display: flex; gap: 14px; margin-top: 12px; }
footer .social .mark { height: 18px; }

/* ---------- page: problems ---------- */
.filters { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; align-items: center; }
.filters input { height: 40px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); padding: 0 12px; font: 400 14px/1 var(--mono); min-width: 280px; }
.filters input:focus { border-color: var(--text); outline: 0; }
.filters .btn[aria-pressed="true"] { border-color: var(--text); background: var(--surface-2); }
.count { font: 400 12px/1.4 var(--mono); color: var(--muted); margin-left: auto; }

/* ---------- page: problem ---------- */
.crumbs { font: 400 12px/1.4 var(--mono); color: var(--muted); display: flex; gap: 8px; margin-bottom: 20px; }
.crumbs a:hover { color: var(--text); }
.ptitle { display: grid; grid-template-columns: 8fr 4fr; gap: 40px; align-items: end; }
.ptitle h1 { font-size: 40px; }
.ptitle .tags { display: flex; gap: 8px; flex-wrap: wrap; font: 400 12px/1 var(--mono); color: var(--muted); margin-bottom: 14px; }
.ptitle .tags span { border: 1px solid var(--line); padding: 6px 8px; }
.ptitle .tags .solved { color: var(--pass); border-color: var(--pass); }
.sig-block { margin-top: 28px; border: 1px solid var(--line); background: var(--surface); padding: 16px 20px; }
.sig-block .mono-cap { margin-bottom: 8px; }
.sig-block .s { font: 400 13px/1.7 var(--mono); color: var(--text); white-space: pre-wrap; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 0; }
.facts > div { padding: 14px 20px; border-right: 1px solid var(--line); background: var(--surface); }
.facts > div:last-child { border-right: 0; }
.facts .k { font: 400 12px/1.4 var(--mono); color: var(--muted); }
.facts .v { color: var(--text); font-size: 15px; margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.facts .v .mark { height: 14px; }
.prose { max-width: 76ch; }
.prose p, .prose li { color: var(--text-2); font-size: 15.5px; }
.prose p + p, .prose p + pre, .prose pre + p, .prose ul, .prose ol, .prose table, .prose h2, .prose h3 { margin-top: 16px; }
.prose h2 { font-size: 24px; margin-top: 28px; } .prose h3 { font-size: 18px; margin-top: 22px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; font-size: 12.5px; }
.prose table { width: 100%; border-collapse: collapse; font: 400 13px/1.5 var(--mono); }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 400; }
/* ---------- docs / publish ---------- */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 48px; margin-top: 40px; }
.toc { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.toc .mono-cap { margin: 14px 0 6px; }
.toc a { color: var(--muted); } .toc a:hover { color: var(--text); }
.docs h2 { font-size: 26px; margin-top: 48px; padding-top: 24px; border-top: 1px dashed var(--line); }
.docs h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.docs p { margin-top: 12px; font-size: 15px; }
.docs .paper { margin-top: 16px; }
.docs table { width: 100%; border-collapse: collapse; font: 400 13px/1.5 var(--mono); margin-top: 16px; }
.docs th, .docs td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs th { color: var(--muted); font-weight: 400; }
.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.terms > div { border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.terms h4 { font-size: 16px; margin-bottom: 8px; }
.terms p { font-size: 14.5px; color: var(--muted); }
.terms .big { font: 500 40px/1 var(--mono); color: var(--text); margin-bottom: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) and (min-width: 1001px) {
  .marks { gap: 28px; }
  .hero { gap: 36px; }
}
@media (max-width: 1000px) {
  :root { --pad: 24px; }
  h1 { font-size: 48px; } h2 { font-size: 32px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 48px; }
  .pivot, .tools, .who, .faq, .case, .numbers, .sol, .mid-task, .docs, .ptitle { grid-template-columns: minmax(0, 1fr); }
  .hero { gap: 40px; padding-top: 56px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(2) { border-right: 0; }
  .facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .case > div:first-child, .sol .buy { border-right: 0; border-left: 0; border-top: 1px solid var(--line); }
  .mid-task > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .num-panel:nth-child(1), .num-panel:nth-child(3) { border-right-width: 0; }
  .num-panel:nth-child(3) { border-bottom-width: 1px; }
  .toc { position: static; }
  footer .in { grid-template-columns: 1fr 1fr; }
  .nav nav { display: none; }
  .terms { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dash .toc { display: flex; flex-wrap: wrap; gap: 6px 18px; }
}
@media (max-width: 640px) {
  :root { --pad: 18px; }
  h1 { font-size: 38px; } h2 { font-size: 28px; } h3 { font-size: 22px; }
  .lede { font-size: 17px; }
  .board { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav .in { gap: 12px; height: 56px; }
  .nav .right .btn-bracket, .nav .right .gh { display: none; }
  .nav .lbl { display: none; } .nav .lbl-s { display: inline; }
  .nav .right { gap: 6px; }
  .bar .in { font-size: 13px; }
  .hero .actions .btn, .cta .actions .btn { width: 100%; justify-content: center; }
  .num-panel .wall { display: none; }
  .marks { gap: 20px; }
  footer .in { grid-template-columns: 1fr; }
  .cta { padding: 80px var(--pad); }
  .divider, .bar .in { padding-left: var(--pad); padding-right: var(--pad); }
  .paper::after { display: none; }
}


/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; margin-top: 8px; }
.dash pre, .dash .panel .body { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.dash .panel { max-width: 100%; }
.dash .toc a[aria-current="page"] { color: var(--text); }
.dash h2 { font-size: 26px; }
.dash .section { margin-top: 40px; padding-top: 24px; border-top: 1px dashed var(--line); }
.dash .section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.dash p { margin-top: 10px; font-size: 15px; }
.dash .paper { margin-top: 16px; }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); margin-top: 20px; }
.kv > div { padding: 18px 20px; border-right: 1px solid var(--line); background: var(--surface); }
.kv > div:last-child { border-right: 0; }
.kv .k { font: 400 12px/1.4 var(--mono); color: var(--muted); }
.kv .v { font: 500 28px/1.1 var(--mono); color: var(--text); margin-top: 6px; letter-spacing: -0.01em; }
.kv .v.paid { color: var(--muted); } .kv .v.pass { color: var(--pass); }
.kv .s { font: 400 12px/1.5 var(--mono); color: var(--muted); margin-top: 4px; }
.tbl { width: 100%; border-collapse: collapse; font: 400 13px/1.5 var(--mono); margin-top: 16px; }
.tbl th, .tbl td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 400; }
.tbl td { color: var(--text-2); }
.tbl td.paid { color: var(--muted); } .tbl td.pass { color: var(--pass); }
.tbl .btn.sm { height: 28px; padding: 0 10px; font-size: 11px; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { margin-top: 16px; border: 1px dashed var(--line); padding: 18px 20px; font: 400 13px/1.6 var(--mono); color: var(--muted); }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.door { border: 1px solid var(--line); background: var(--surface); padding: 24px; }
.door h3 { font-size: 20px; }
.door p { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.door form { margin-top: 16px; display: flex; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font: 400 12px/1.4 var(--mono); color: var(--muted); }
input.in, textarea.in, select.in { width: 100%; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 10px 12px; font: 400 14px/1.5 var(--mono); min-width: 0; }
input.in { height: 40px; padding: 0 12px; }
textarea.in { min-height: 120px; resize: vertical; }
input.in:focus, textarea.in:focus, select.in:focus { border-color: var(--text); outline: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.notice { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); padding: 12px 14px; font: 400 13px/1.6 var(--mono); color: var(--text-2); }
.notice.ok { border-color: var(--pass); color: var(--pass); }
.notice.err { border-color: var(--attn); color: var(--attn); }
.status { font: 500 12px/1 var(--mono); border: 1px solid var(--line-2); padding: 5px 8px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); display: inline-block; }
.status.queued, .status.in_progress { color: var(--muted); border-color: var(--line-2); }
.status.delivered, .status.paid { color: var(--pass); border-color: var(--pass); }
.tabs-in { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 16px; overflow-x: auto; }
.tabs-in [role="tab"] { padding: 10px 12px; font: 400 13px/1 var(--mono); color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.tabs-in [role="tab"] .mark { height: 14px; color: inherit; }
.tabs-in [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.prompt-box { border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; font: 400 13px/1.7 var(--mono); color: var(--text-2); white-space: pre-wrap; word-break: break-word; margin-top: 16px; }

/* ================= v3 ================= */
/* full-bleed hero on the wall */
.bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.hero3 { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px dashed var(--line); }
.hero3 .hero-wall { position: absolute; inset: 0; margin: 0; font: 400 13px/1.05 var(--mono); color: var(--wall); opacity: .55; overflow: hidden; pointer-events: none; user-select: none; white-space: pre; }
.hero3 .in { position: relative; max-width: var(--max); margin: 0 auto; padding: 76px var(--pad) 64px; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.hero3 .label { font: 400 12px/1.4 var(--mono); color: var(--muted); margin-bottom: 26px; display: flex; align-items: center; gap: 8px; }
.hero3 .label i { width: 6px; height: 6px; border-radius: 50%; background: var(--pass); }
.hero3 h1 { max-width: 16ch; font-size: clamp(44px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.03em; }
.hero3 .lede { margin-top: 22px; max-width: 46ch; font-size: 18px; }
.hero3 .actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hsearch { margin-top: 30px; display: flex; align-items: stretch; border: 1px solid var(--line-2); background: var(--surface); padding: 6px 6px 6px 16px; gap: 8px; max-width: 640px; }
.hsearch .prompt { align-self: center; font: 500 20px/1 var(--mono); color: var(--muted); }
.hsearch input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: 400 17px/1.4 var(--mono); padding: 10px 6px; caret-color: var(--text); }
.hsearch input::placeholder { color: var(--muted); }
.hsearch input:focus { outline: none; }
.hsearch:focus-within { border-color: var(--text); }
.hsearch .btn { flex: none; }

/* connect home + how tiles */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; align-items: start; }
.row.wrap { flex-wrap: wrap; gap: 12px; }
.howtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.howtile { border: 1px solid var(--line); background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.howtile .hn { display: flex; align-items: center; gap: 10px; font: 500 22px/1.2 var(--sans); color: var(--text); }
.howtile .hn .i { width: 20px; height: 20px; color: var(--muted); }
.howtile p { color: var(--muted); font-size: 14px; }
.howtile .paper { margin: 0; }
.howtile .panel .head { flex-wrap: wrap; }
.ref { border: 1px solid var(--line); background: var(--surface); }
.ref > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; font: 500 16px/1.3 var(--sans); color: var(--text); }
.ref > summary::-webkit-details-marker { display: none; }
.ref > summary .i { width: 18px; height: 18px; transition: transform .16s ease-out; }
.ref[open] > summary .i { transform: rotate(45deg); }
.ref-body { padding: 0 22px 22px; }
.ref-item { padding: 22px 0; border-top: 1px dashed var(--line); }
.ref-head { display: flex; gap: 12px; align-items: center; }
.ref-head code { font-size: 15px; color: var(--text); }
.ref-item p { margin-top: 8px; color: var(--muted); font-size: 14px; max-width: 80ch; }
.ref-item .two { margin-top: 14px; }
.ref-item table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.ref-item th, .ref-item td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-item th { font: 400 12px/1.4 var(--mono); color: var(--muted); }

/* problem page v3 */
.facts .v.heat { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); }
.facts .v.heat .i { width: 14px; height: 14px; }
.ctx { margin-top: 28px; border: 1px solid var(--line); background: var(--surface); padding: 0 20px; }
.ctx > summary { cursor: pointer; padding: 14px 0; font: 400 12px/1.4 var(--mono); color: var(--muted); list-style: none; }
.ctx > summary::-webkit-details-marker { display: none; }
.ctx > summary::before { content: "› "; color: var(--muted); }
.ctx[open] > summary::before { content: "‹ "; }
.ctx .prose { padding-bottom: 20px; }
/* responsive v3 */
@media (max-width: 1000px) {
  .hero3 .in { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 56px var(--pad) 48px; min-height: 0; }
  .hero3 h1 { font-size: clamp(38px, 8vw, 56px); }
  .two, .howtiles, .agents, .fixgrid { grid-template-columns: minmax(0, 1fr); }
  .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nums > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nums > div:nth-child(2n) { border-right: 0; }
}
@media (max-width: 640px) {
  .hsearch { flex-wrap: wrap; padding: 8px; }
  .hsearch .prompt { display: none; }
  .hsearch .btn { width: 100%; justify-content: center; }
  .nums { grid-template-columns: minmax(0, 1fr); }
  .nums > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .fixrow { grid-template-columns: minmax(0, 1fr) auto; }
  .fixrow .app, .fixrow .helped { display: none; }
  .leaders th:nth-child(3), .leaders td:nth-child(3), .leaders th:nth-child(5), .leaders td:nth-child(5) { display: none; }
}
/* v3 polish */
.howtile .panel .head, .connect-home .panel .head { height: auto; min-height: 44px; flex-wrap: wrap; overflow: visible; padding-top: 2px; padding-bottom: 2px; }
.howtile .panel .head .t { padding: 0 9px; height: 38px; font-size: 12px; }
.howtile .panel .body pre, .two .panel .body pre, .ref-item pre, .agent pre, .install pre, .install-line pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.hero3 .hero-wall { opacity: .8; }

/* ================= v4 ================= */
.hero3 .note { margin-top: 14px; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.hero3 .lede { max-width: 50ch; }
.panel.install .foot a { display: inline-flex; gap: 6px; align-items: center; }
.panel.install .foot .i { width: 14px; height: 14px; }
.term.still { min-height: 0; }
.term.still > span { display: block; }
.term.still span span { display: inline; }

/* numbers strip */
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px dashed var(--line); }
.nums > div { padding: 26px var(--pad); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.nums > div:last-child { border-right: 0; }
.nums b { font: 500 40px/1 var(--mono); color: var(--text); letter-spacing: -0.02em; }
.nums span { font: 400 12px/1.4 var(--mono); color: var(--muted); }

/* fix list rows */
.fixlist { border: 1px solid var(--line); background: var(--surface); }
.fixrow { display: grid; grid-template-columns: 120px minmax(0, 1fr) 110px 70px; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background-color .16s ease-out; }
.fixrow:last-child { border-bottom: 0; }
.fixrow:hover { background: var(--surface-2); }
.fixrow .app { display: inline-flex; gap: 8px; align-items: center; font: 400 12px/1.3 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixrow .app .mark { height: 14px; color: inherit; }
.fixrow .err { font: 400 13.5px/1.4 var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixrow .pass, .fixrow .helped { display: inline-flex; gap: 6px; align-items: center; font: 400 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.fixrow .pass.ok { color: var(--pass); }
.fixrow .i { width: 13px; height: 13px; }
.pcard .meta .pass { color: var(--pass); display: inline-flex; gap: 5px; align-items: center; }
.pcard .meta .i { width: 12px; height: 12px; }
.pcard .meta span { display: inline-flex; gap: 5px; align-items: center; }

/* leaders table */
.leaders { width: 100%; border-collapse: collapse; font-size: 15px; border: 1px solid var(--line); background: var(--surface); }
.leaders th, .leaders td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.leaders th { font: 400 12px/1.4 var(--mono); color: var(--muted); }
.leaders td.mono { font-family: var(--mono); font-size: 14px; }
.leaders td.pass { color: var(--pass); }
.leaders tr:last-child td { border-bottom: 0; }

/* fix page */
.tags { display: flex; gap: 8px; flex-wrap: wrap; font: 400 12px/1 var(--mono); color: var(--muted); margin-bottom: 14px; }
.tags span { border: 1px solid var(--line); padding: 6px 8px; }
.tags .solved { color: var(--pass); border-color: var(--pass); }
.sig-h1 { font-family: var(--mono); font-weight: 500; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; max-width: 34ch; }
.sig-h1.long { font-size: clamp(18px, 1.7vw, 24px); max-width: 60ch; }
.facts .v.pass { color: var(--pass); }
.facts .v.mono.small { font-size: 12px; }
.fix .fixtitle { font-size: 30px; }
.fixgrid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px; margin-top: 28px; align-items: start; }
.block { margin-top: 24px; }
.block:first-child { margin-top: 0; }
.block .mono-cap { margin-bottom: 10px; }
.block.tried { border: 1px dashed var(--line-2); padding: 18px 20px; background: var(--surface); }
.block.tried .prose p, .block.tried .prose li { color: var(--text-2); }
.block.checkb .paper { margin-top: 4px; }
.report { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.report .msg { font: 400 12px/1.5 var(--mono); color: var(--pass); }
.fixside { position: sticky; top: 88px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); }
.kv1 { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.kv1:last-child { border-bottom: 0; }
.kv1 .k { font: 400 12px/1.4 var(--mono); color: var(--muted); }
.kv1 .v { font: 500 26px/1.1 var(--mono); color: var(--text); margin-top: 6px; }
.kv1 .v.pass { color: var(--pass); }
.kv1 .s { font: 400 12px/1.5 var(--mono); color: var(--muted); margin-top: 4px; }
.install-line { max-width: 720px; }
.install-line p { color: var(--text-2); margin-bottom: 14px; }

/* connect page */
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.agent { border: 1px solid var(--line); background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; scroll-margin-top: 90px; }
.agent .hn { display: flex; align-items: center; gap: 10px; font: 500 20px/1.2 var(--sans); color: var(--text); }
.agent .hn .mark, .agent .hn .i { height: 20px; width: 20px; color: var(--muted); }
.agent .paper { margin: 0; }
.agent .paper::after { display: none; }
.howtile .hn .i { color: var(--muted); }
.sec > .howtiles:first-child, .sec > .agents:first-child { margin-top: 0; }
.hero3 .hero-wall { opacity: .45; }
.reported { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.reported .link { display: inline-flex; gap: 4px; align-items: center; }
.cta .wall { opacity: .6; }

/* v4 responsive (after the base rules so they win) */
@media (max-width: 1000px) {
  .nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nums > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nums > div:nth-child(2n) { border-right: 0; }
  .agents, .fixgrid { grid-template-columns: minmax(0, 1fr); }
  .fixside { position: static; }
  .fixrow { grid-template-columns: 100px minmax(0, 1fr) 90px 60px; gap: 12px; }
}
@media (max-width: 640px) {
  .nums { grid-template-columns: minmax(0, 1fr); }
  .nums > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .nums > div:last-child { border-bottom: 0; }
  .fixrow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .fixrow .app, .fixrow .helped { display: none; }
  .fixrow .err { white-space: normal; }
  .leaders th:nth-child(3), .leaders td:nth-child(3), .leaders th:nth-child(5), .leaders td:nth-child(5) { display: none; }
  .hero3 .in { padding-top: 40px; }
  .facts .v { flex-wrap: wrap; }
  .fix .fixtitle { font-size: 24px; }
}
.door pre, .door .panel .body { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.door .paper::after { display: none; }

/* ================= M2: verification (PROBLEM_PAGE.md, DECISIONS §1) ================= */
/* amber = attention: only the state classes below, `touches`, and `notice` (audit tell 17) */
.status-verified { color: var(--pass); }
.status-unverified, .status-reproduced, .status-mixed, .status-failing, .status-stale { color: var(--attn); }
.expiry-current { color: var(--text); }
.expiry-possibly_outdated, .expiry-outdated, .expiry-superseded { color: var(--attn); }
.verdict-clear { color: var(--pass); } .verdict-caution, .verdict-blocked { color: var(--attn); } .verdict-unknown { color: var(--text); }
.touches { color: var(--attn); }
.msg.notice { color: var(--attn); border-color: var(--attn); }
a[class^="status-"], a[class^="expiry-"] { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a[class^="status-"]:hover, a[class^="expiry-"]:hover { text-decoration-color: currentColor; }
.pass { color: var(--pass); }

/* problem header */
.divider.row { display: flex; }
.sigbox { margin: 4px 0 20px; }
.sigbox .panel .body pre { margin: 0; font: 400 14px/1.5 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.ptitle-h1 { font-size: clamp(26px, 3vw, 40px); line-height: 1.15; letter-spacing: -0.02em; max-width: 30ch; }
.factsline { margin-top: 18px; font: 400 13px/1.8 var(--mono); color: var(--muted); }
.factsline .link { color: var(--text); }
.factsline .srcl { display: inline-flex; gap: 5px; align-items: center; }
.factsline .srcl .mark { height: 14px; color: var(--muted); }
.factsline .srcl .i { width: 12px; height: 12px; }

/* verification block + environment table */
.vgrid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; margin-top: 28px; align-items: start; }
.vblock, .envblock { border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; min-width: 0; }
.vblock .mono-cap, .envblock .mono-cap { margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.kv dt { font: 400 12px/1.9 var(--mono); color: var(--muted); }
.kv dd { margin: 0; color: var(--text); line-height: 1.7; overflow-wrap: anywhere; }
.kv .sub, .envblock .sub, .report .sub { font: 400 12px/1.6 var(--mono); color: var(--muted); margin: 4px 0 0; }
.kv .link.small { font-size: 12px; display: inline-flex; gap: 3px; align-items: center; }
.kv .link.small .i { width: 11px; height: 11px; }
.prov { margin-top: 2px; }
.prov > summary { cursor: pointer; list-style: none; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.prov > summary::-webkit-details-marker { display: none; }
.prov > summary::before { content: "▸ "; } .prov[open] > summary::before { content: "▾ "; }
.prov ul { margin: 6px 0 0; padding-left: 0; list-style: none; font: 400 12px/1.7 var(--mono); color: var(--muted); }
.tscroll { overflow-x: auto; max-width: 100%; }
.envt { width: 100%; border-collapse: collapse; font: 400 13px/1.5 var(--mono); }
.envt th, .envt td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.envt th { color: var(--muted); font-weight: 400; }
.envt td { color: var(--text-2); }
.envblock .sub { margin-top: 12px; }

/* fix body */
.fixbody { margin-top: 28px; max-width: 860px; }
.bh { font: 500 18px/1.3 var(--sans); color: var(--text); margin-bottom: 12px; }
.block.tried .bh { margin-bottom: 10px; }
.regex { margin-top: 10px; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.regex code { color: var(--text-2); }
.sbr { margin-top: 14px; font: 400 13px/1.6 var(--mono); color: var(--text-2); max-width: 70ch; }
.sbr.right { text-align: right; max-width: none; margin-top: 8px; font-size: 12px; color: var(--muted); }
.report { display: block; margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 16px; }
.report .row { gap: 12px; align-items: center; }
.report .btn.btn-bracket.sm.btn-primary { background: var(--text); color: var(--ink); }
.envform { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; gap: 12px; align-items: end; margin-top: 14px; }
.envform label { display: flex; flex-direction: column; gap: 4px; font: 400 12px/1.4 var(--mono); color: var(--muted); min-width: 0; }
.envform input, .envform select { height: 36px; padding: 0 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 400 13px/1 var(--mono); min-width: 0; }
.envform input:focus, .envform select:focus { outline: 1px solid var(--text); outline-offset: -1px; }
.envform .btn.sm { height: 36px; }
.envform .sub { grid-column: 1 / -1; margin: 0; }
.link-btn { font: 400 12px/1.4 var(--mono); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; height: 36px; }
.link-btn:hover { color: var(--text); }
.report .msg { display: block; margin-top: 12px; font: 400 12px/1.6 var(--mono); color: var(--text); border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; }
.agentline { display: flex; gap: 12px; align-items: center; margin-top: 20px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.agentline code { color: var(--text); }
.agentline .copy { margin-left: 0; }
.fixrow .st { font: 400 12px/1 var(--mono); white-space: nowrap; }
.pcard .meta.mono { font: 400 12px/1.6 var(--mono); flex-wrap: wrap; gap: 10px; }

/* connect: agent tabs, rule, install.sh */
.agenttabs .panel .head { height: auto; min-height: 44px; flex-wrap: nowrap; overflow-x: auto; }
.agenttabs .panel .head .t .mark { height: 18px; width: 18px; color: var(--muted); }
.agentblocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 20px; }
.agentblocks .paper::before, .agentblocks .paper::after { display: none; }
.agentblocks .panel pre, #rule .panel pre, #install-sh .panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.glosses { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.shaline { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; margin: 16px 0; font-size: 12px; color: var(--muted); }
.shaline .k { color: var(--muted); } .shaline code { color: var(--text); overflow-wrap: anywhere; }
#install-sh .paper + .paper, #install-sh .shaline + .paper { margin-top: 0; }
.oneliner { margin-top: 20px; border: 1px solid var(--line); background: var(--surface); padding: 0 20px 20px; }
.oneliner > summary { cursor: pointer; list-style: none; padding: 14px 0; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.oneliner > summary::-webkit-details-marker { display: none; }
.oneliner > summary::before { content: "▸ "; } .oneliner[open] > summary::before { content: "▾ "; }
.oneliner .sub { font: 400 12px/1.6 var(--mono); color: var(--muted); margin: 0 0 12px; }
.oneliner .paper::before, .oneliner .paper::after { display: none; }
.preview { margin: 8px 0 0; background: var(--bg); border: 1px solid var(--line); padding: 12px 14px; font: 400 12px/1.6 var(--mono); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.sec .mono-cap + .paper { margin-top: 12px; }
#redaction .sub, .doc .sub { font: 400 12px/1.6 var(--mono); color: var(--muted); }

/* prose pages: /how-we-verify/, /security/ */
.doc p, .doc li { color: var(--text-2); font-size: 15.5px; max-width: 76ch; }
.doc h3 { font-size: 22px; margin-top: 28px; }
.doc .tbl { max-width: 96ch; } .doc .tbl td:first-child { white-space: nowrap; }
.doc ul { margin-top: 12px; padding-left: 20px; } .doc li + li { margin-top: 8px; }
.doc p + p { margin-top: 14px; }
.defs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 16px 0; max-width: 86ch; }
.defs dt { font: 500 14px/1.7 var(--mono); color: var(--text); }
.defs dd { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.defs + p { margin-top: 8px; }
.doc .mono b { font: 500 22px/1 var(--mono); color: var(--text); }
.doc .mono { font: 400 14px/1.8 var(--mono); color: var(--muted); }
.doc .preview { margin: 12px 0 14px; color: var(--text-2); }
footer .marks { max-width: var(--max); margin: -16px auto 0; padding: 0 var(--pad) 28px; font: 400 11px/1.6 var(--mono); color: var(--faint); }

@media (max-width: 1000px) {
  .vgrid, .agentblocks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .envform { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .defs { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .defs dd { margin-bottom: 10px; }
  .divider.row { flex-direction: column; gap: 4px; align-items: flex-start; }
  .fixrow .st { display: inline-flex; }
  .sbr.right { text-align: left; }
}
.fix .lede { max-width: 76ch; }
.prose pre { overflow-x: auto; max-width: 100%; }

/* ================= M8: motion (MOTION.md Part 2; opacity/transform only; the global reduced-motion rule zeroes all of it) ================= */
.reveal { opacity: 0; transform: translateY(4px); }
.reveal.in { opacity: 1; transform: none; transition: opacity var(--t) ease-out, transform var(--t) ease-out; }
.tabpanel { transition: opacity var(--t) ease-out, transform var(--t) ease-out; }
.tabpanel.out { opacity: 0; transform: translateY(4px); }
.xf { opacity: 0; transition: opacity 80ms ease-out; }
[data-v-status], [data-v-rate] { transition: opacity 120ms ease-out; }
@keyframes fadein { from { opacity: 0; } }
.ref[open] > .ref-body, .prov[open] > ul, .oneliner[open] > .sub, .oneliner[open] > .paper, .ctx[open] > .prose { animation: fadein var(--t) ease-out; }
.map b, .nums b, .rbig, .rfacts b, .tbl td.n { font-variant-numeric: tabular-nums; }
.term .cur { animation-duration: 1s; }   /* the blink is bounded by real latency: site.js removes it on the first response line */

/* hero: segmented control + check form (HOME.md) */
.hseg { display: inline-flex; border: 1px solid var(--line-2); margin-top: 30px; font: 400 12px/1 var(--mono); }
.hseg .t { padding: 10px 14px; color: var(--muted); border-right: 1px solid var(--line-2); }
.hseg .t:last-child { border-right: 0; }
.hseg .t[aria-selected="true"] { color: var(--ink); background: var(--text); }
.hseg + .hsearch, .hseg + .hcheck, .hseg ~ .hcheck { margin-top: 12px; }
.hcheck { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; max-width: 640px; }
.hcheck label { display: flex; flex-direction: column; gap: 4px; font: 400 12px/1.4 var(--mono); color: var(--muted); min-width: 0; }
.hcheck input, .hcheck select, .pf-form input, .pf-form select { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 400 14px/1 var(--mono); min-width: 0; }
.hcheck input:focus, .hcheck select:focus, .pf-form input:focus, .pf-form select:focus { outline: 0; border-color: var(--text); }
.hcheck .btn { height: 40px; }
.hcheck .pf-inline { grid-column: 1 / -1; margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.transcript .term { min-height: 300px; max-height: 340px; overflow: hidden; font-size: 12.5px; line-height: 1.6; }
.transcript .term span { display: inline; }
.transcript .foot span:first-child { color: var(--text-2); }
.panel .foot a { display: inline-flex; gap: 6px; align-items: center; } .panel .foot .i { width: 14px; height: 14px; }
.livenote { margin-top: 14px; font-size: 12px; color: var(--muted); }
.hero3 .hero-r .livenote { margin-top: 22px; }

/* on the map: asymmetric panels on the wall (HOME.md) */
.map { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 14px; }
.mpanel { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mpanel.big { grid-row: 1 / 3; padding-top: 28px; }
.mpanel .wall { position: absolute; right: 0; bottom: 0; margin: 0; font: 400 12px/1.15 var(--mono); color: var(--wall); pointer-events: none; user-select: none; white-space: pre; opacity: .8; }
.mpanel b { position: relative; font: 500 44px/1 var(--mono); color: var(--text); letter-spacing: -0.02em; }
.mpanel.big b { font-size: 72px; }
.mpanel .mono-cap { position: relative; color: var(--muted); }
.mpanel .sub { position: relative; font-size: 12px; color: var(--muted); margin: 0; }
.status-verified.dim { color: var(--muted); }

/* latest fixes: six cards */
.fixcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fixcard { border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: border-color .16s ease-out; }
.fixcard:hover { border-color: var(--line-2); }
.fixcard .chip { font-size: 12px; color: var(--muted); }
.fixcard .ttl { color: var(--text); font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fixcard .ln { font-size: 12px; color: var(--muted); margin-top: auto; overflow-wrap: anywhere; }

/* how it's used (tiles keep .term.still), the clip, the verify band */
.howtile .hn { font-size: 20px; }
.clip { margin: 36px 0 0; }
.clip video { display: block; width: 100%; max-width: 900px; height: auto; border: 1px solid var(--line); background: var(--bg); }
.clip figcaption { margin-top: 10px; font-size: 12px; color: var(--muted); max-width: 80ch; }
.verify { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }

p.sub { font: 400 12px/1.6 var(--mono); color: var(--muted); }
/* /preflight/ (PREFLIGHT.md) */
.pf-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 28px; max-width: 760px; }
.pf-form label { display: flex; flex-direction: column; gap: 4px; font: 400 12px/1.4 var(--mono); color: var(--muted); min-width: 0; }
#preflight .note { margin-top: 14px; font-size: 12px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.pf-result { border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; min-width: 0; }
.pf-result .checking { display: none; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pf-result[data-state="checking"] .checking { display: block; }
.pf-result .verdict { font: 500 34px/1.1 var(--mono); letter-spacing: -0.02em; margin-top: 6px; }
.pf-result .r { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 14px; margin-top: 8px; font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.pf-result .r .k { font: 400 12px/1.7 var(--mono); color: var(--muted); }
.pf-result .r .k:empty { display: none; }
.pf-result .r .k:empty + .v { grid-column: 1 / -1; }
.pf-cards { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.pf-card { border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; }
.pf-card h3 { font-size: 18px; line-height: 1.35; margin-top: 8px; }
.pf-card .facts { display: block; border: 0; font-size: 12px; color: var(--muted); margin-top: 8px; }
.pf-card .sum { font-size: 14px; color: var(--text-2); margin-top: 10px; max-width: 80ch; }
.pf-card .mono-cap { margin-top: 12px; }
.pf-card .fixes { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.pf-card .sub { margin-top: 10px; font-size: 12px; color: var(--muted); }
.pf-out .sbr { margin-top: 16px; }
.pf-unknown { margin-top: 18px; }
.pf-unknown .sub { font-size: 13px; color: var(--muted); }
.tbl.bk td, .tbl.bk th { white-space: nowrap; }
.tbl .link { display: inline-flex; gap: 4px; align-items: center; } .tbl .link .i { width: 12px; height: 12px; }
#agent .sbr { margin-top: 0; }
#agent .two { margin-top: 16px; }

/* dashboard: queue controls, radar panels (RADAR.md; the wall bars are --muted on --surface, no chroma) */
.qctl { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.qctl label { display: inline-flex; gap: 6px; align-items: center; }
.qctl select, .qctl input:not([type="checkbox"]) { height: 32px; padding: 0 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 400 12.5px/1 var(--mono); }
.qctl input.in { width: auto; height: 32px; }
.tbl.queue td { vertical-align: top; }
.tbl td.notice, .tbl td .notice, .notice.inline { color: var(--attn); }
.tbl td.n, .tbl th.n { text-align: right; }
.tbl td.bar { color: var(--muted); }
.rtop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; margin-top: 16px; }
.rpanel { border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; margin-top: 16px; min-width: 0; }
.rtop .rpanel { margin-top: 0; }
.rbig { display: block; font: 500 56px/1 var(--mono); color: var(--text); letter-spacing: -0.02em; margin: 6px 0; }
.rpanel .sub { font-size: 12px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.rbars { margin: 10px 0 0; font-size: 13px; color: var(--muted); white-space: pre; overflow-x: auto; }
.rfacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin-top: 12px; }
.rfacts b { display: block; font: 500 22px/1.1 var(--mono); color: var(--text); }
.rfacts span { font-size: 12px; color: var(--muted); }
.rpanel .tbl { margin-top: 10px; }
.rpanel .tbl th { cursor: help; }
.rpanel .empty { margin-top: 10px; }
.radar .notice { margin-top: 16px; }
footer .ghl { display: inline-flex; gap: 6px; align-items: center; } footer .ghl .mark { height: 14px; }
.nav .btn-primary .i { width: 15px; }

@media (max-width: 1000px) {
  .map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mpanel.big { grid-column: 1 / -1; grid-row: auto; }
  .fixcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-grid, .rtop { grid-template-columns: minmax(0, 1fr); }
  .hcheck, .pf-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .fixcards { grid-template-columns: minmax(0, 1fr); }
  .map { gap: 10px; }
  .mpanel { padding: 16px; }
  .mpanel b { font-size: 34px; }
  .mpanel.big b { font-size: 56px; }
  .hcheck, .pf-form { grid-template-columns: minmax(0, 1fr); }
  .hcheck .btn, .pf-form .btn { width: 100%; justify-content: center; }
  .transcript .term { min-height: 200px; }
  .hseg { display: flex; }
  .hseg .t { flex: 1; text-align: center; justify-content: center; }
  .verify { font-size: 12px; }
}

/* admin tables: wrap the scraped text column, keep every panel inside the column at 390 */
.dash > div, .rpanel, .dash .section { min-width: 0; max-width: 100%; }
.qctl input, .qctl select { max-width: 100%; }
.qctl input.in { width: 180px; }
.tbl.queue td:nth-child(6) { min-width: 240px; max-width: 420px; white-space: normal; overflow-wrap: anywhere; }
.tbl.queue .actions { flex-direction: column; align-items: flex-start; }
.rbars { max-width: 100%; }
@media (max-width: 640px) {
  .rfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .rfacts b { font-size: 18px; } .rfacts span { overflow-wrap: anywhere; }
  .qctl { gap: 8px 12px; } .qctl label { flex-wrap: wrap; }
  .qctl input.in, .qctl input:not([type="checkbox"]) { width: 130px; }
  .rbig { font-size: 44px; }
}
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } }   /* the base .dash rule above came after the 900px query and won; restated here */

/* ---------- looping corner marks (landing page; founder request 2026-09-11) ----------
   Four L-shaped brackets sit on the corners of the hero and its panels and "trace" in sequence: each corner brightens
   and nudges outward by 2 px, one after another, on an 8 s loop. Transform + opacity only, pointer-events none,
   zeroed by the global prefers-reduced-motion rule above. Ambient, low contrast; it explains the frame, nothing else. */
.corners { position: absolute; inset: 0; pointer-events: none; }
.corners i { position: absolute; width: 14px; height: 14px; border: 0 solid var(--text); opacity: .35;
  animation: corner-trace 8s ease-in-out infinite; will-change: transform, opacity; }
.corners i:nth-child(1) { left: 8px; top: 8px; border-top-width: 1px; border-left-width: 1px; }
.corners i:nth-child(2) { right: 8px; top: 8px; border-top-width: 1px; border-right-width: 1px; animation-delay: 2s; }
.corners i:nth-child(3) { right: 8px; bottom: 8px; border-bottom-width: 1px; border-right-width: 1px; animation-delay: 4s; }
.corners i:nth-child(4) { left: 8px; bottom: 8px; border-bottom-width: 1px; border-left-width: 1px; animation-delay: 6s; }
@keyframes corner-trace {
  0%, 22%, 100% { opacity: .35; transform: translate(0, 0); }
  8%  { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)); }
}
.corners i:nth-child(1) { --cx: -2px; --cy: -2px; } .corners i:nth-child(2) { --cx: 2px; --cy: -2px; }
.corners i:nth-child(3) { --cx: 2px; --cy: 2px; }  .corners i:nth-child(4) { --cx: -2px; --cy: 2px; }
.paper { position: relative; }
.paper > .corners i { width: 10px; height: 10px; }

/* ---------- F5: contributor impact (dashboard overview) ----------
   The dashboard strip is a div grid (the dl-based .kv on the problem page came later in this file and won the cascade;
   restated here under .dash). Amber only on state: pending_review / failing marks carry status-* classes. */
.dash .kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); margin-top: 20px; font-size: 16px; }
.dash .kv.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash .kv > div { padding: 18px 20px; border-right: 1px solid var(--line); background: var(--surface); min-width: 0; }
.dash .kv > div:last-child { border-right: 0; }
.dash .kv .s { overflow-wrap: anywhere; }
.impact .paidin { margin-top: 12px; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.impact .sub { font: 400 12px/1.6 var(--mono); color: var(--muted); margin-top: 12px; overflow-wrap: anywhere; }
.impact .tbl td.n, .impact .tbl th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.impact .tbl td.fixcell { min-width: 180px; max-width: 340px; }
.impact .tbl th, .impact .tbl td { padding: 10px 8px; }
.impact .tbl th.n { white-space: normal; }
.impact .tbl .sub { margin-top: 4px; }
.impact .rate { color: var(--muted); }
.status-pending_review { color: var(--attn); }
.status-rejected { color: var(--muted); }
.spark { display: block; width: 100px; height: 28px; color: var(--text-2); overflow: visible; }
.spark .base { stroke: var(--line-2); }
.spark .line { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.spark .p { fill: var(--pass); }
.spark .status-failing { fill: var(--attn); }
.pend { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); padding: 16px 18px; }
.pend .ph { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font: 400 12px/1.5 var(--mono); color: var(--muted); }
.pend .ph b { font: 500 15px/1.4 var(--sans); color: var(--text); }
.pend ul { margin: 10px 0 0; padding-left: 0; list-style: none; font: 400 13px/1.6 var(--mono); color: var(--text-2); }
.pend li { margin-top: 8px; }
.pend li .where { color: var(--muted); }
.pend pre { margin: 6px 0 0; padding: 8px 10px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.pend .actions { margin-top: 12px; }
@media (max-width: 900px) { .dash .kv.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash .kv.four > div:nth-child(2) { border-right: 0; } .dash .kv.four > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 640px) { .dash .kv { grid-template-columns: 1fr; } .dash .kv > div { border-right: 0; border-bottom: 1px solid var(--line); } .dash .kv > div:last-child { border-bottom: 0; } .dash .kv.four > div:nth-child(2) { border-bottom: 1px solid var(--line); } }
