/*
  avcs website: components (AVCS - Design Lead, draft 1, 2026-10-06), the old kit.
  Superseded by abso (abso.css, #41): the views that haven't been redesigned
  still use these classes, on abso's tokens (dark only, Recursive Sans and
  Mono). Load after abso.css. New pages use abso's ab- classes, never these.
*/

/* ---------- page ---------- */
.page { max-width: var(--measure); margin: 0 auto; padding: 0 var(--space-4); }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: var(--text-2xl); line-height: 1.08; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: var(--text-xl); font-weight: 700; }
h3 { font-size: var(--text-m); font-weight: 650; }
.muted { color: var(--muted); }
pre { margin: 0; background: var(--wash); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }

/* the logo's mark (logo/mark.svg, inlined): currentColor, as tall as 0.78 of the word */
.logo { display: block; height: .78em; width: auto; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { border-color: var(--ink); }

/* ---------- agent mark: color + monogram, never color alone ---------- */
.mark { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; vertical-align: middle; }
.mark > i {
  font-style: normal; display: inline-grid; place-items: center;
  min-width: 26px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--c, var(--muted)); color: var(--ct, #ffffff);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; font-family: var(--font-mono);
}
.mark > .label { font-size: var(--text-xs); color: var(--muted); font-family: var(--font-mono); }
/* agent slots, by join order: 1-8 take the 8 hues, 9-16 the same hues hollow */
.agent-1 { --c: var(--agent-1); --ct: var(--on-agent-1); }
.agent-2 { --c: var(--agent-2); --ct: var(--on-agent-2); }
.agent-3 { --c: var(--agent-3); --ct: var(--on-agent-3); }
.agent-4 { --c: var(--agent-4); --ct: var(--on-agent-4); }
.agent-5 { --c: var(--agent-5); --ct: var(--on-agent-5); }
.agent-6 { --c: var(--agent-6); --ct: var(--on-agent-6); }
.agent-7 { --c: var(--agent-7); --ct: var(--on-agent-7); }
.agent-8 { --c: var(--agent-8); --ct: var(--on-agent-8); }
.agent-9 { --c: var(--agent-1); }
.agent-10 { --c: var(--agent-2); }
.agent-11 { --c: var(--agent-3); }
.agent-12 { --c: var(--agent-4); }
.agent-13 { --c: var(--agent-5); }
.agent-14 { --c: var(--agent-6); }
.agent-15 { --c: var(--agent-7); }
.agent-16 { --c: var(--agent-8); }
.agent-9 > i, .agent-10 > i, .agent-11 > i, .agent-12 > i, .agent-13 > i, .agent-14 > i, .agent-15 > i, .agent-16 > i { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--c); }
/* in the ribbon's author row, agents 9-16 are drawn at half strength */
.ribbon .hollow { fill-opacity: .5; }
/* the edits mark (README, "The edits mark"): the healthy states add nothing */
.mark[data-edits="commands"] > i { outline: 1.5px dashed var(--muted); outline-offset: 1px; }
.mark[data-edits="hook"]::after { content: "hook"; }
.mark[data-edits="commands"]::after { content: "no mod"; }
.mark[data-edits="old-mod"]::after { content: "old mod ↻"; }
.mark[data-edits]::after { font-size: var(--text-xs); color: var(--muted); font-family: var(--font-mono); }

/* a stack of marks, for who's in a file */
.marks { display: inline-flex; align-items: center; }
.marks > .mark > i { box-shadow: 0 0 0 2px var(--surface); }
.marks > .mark + .mark { margin-left: -6px; }
.marks > .more { margin-left: 6px; font-size: var(--text-xs); color: var(--muted); font-family: var(--font-mono); }

/* ---------- rows and cells ---------- */
.rows { border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: var(--cols, auto 1fr auto); align-items: center; gap: var(--space-3); padding: 8px 6px; border-bottom: 1px solid var(--rule); font-size: 14px; }
.row:hover { background: var(--wash); }
.cell { min-width: 0; }
.cell-num { text-align: right; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.cell-path { font-family: var(--font-mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
.cell-path > bdi { direction: ltr; unicode-bidi: isolate; }
.cell-sub { display: block; color: var(--muted); font-size: var(--text-s); }

/* ---------- badge: outlined, muted, never colored ---------- */
.badge { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border: 1px solid var(--faint); border-radius: 4px; color: var(--muted); vertical-align: middle; }
.badge-dashed { border-style: dashed; }

/* ---------- state symbols: only pass and fail have a hue ---------- */
.sym { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; flex: none; }
.sym-pass { background: var(--pass); }
.sym-fail { background: var(--fail); clip-path: polygon(20% 0,50% 30%,80% 0,100% 20%,70% 50%,100% 80%,80% 100%,50% 70%,20% 100%,0 80%,30% 50%,0 20%); }
.sym-run { border: 1px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--ink) 0 3px, transparent 3px 6px); background-size: 200% 100%; animation: avcs-stripe var(--stripe) linear infinite; }
.sym-wait { border: 1.5px solid var(--muted); }
.sym-none { border: 1.5px dashed var(--faint); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-s); }
@keyframes avcs-stripe { to { background-position: 17px 0; } }

/* ---------- live: a draft recording now ---------- */
.rec { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink)); margin-right: 6px; vertical-align: 1px; }
/* No pulse: nothing on the site pulses (abso's Motion rules; Design, step 1 review). */
@keyframes avcs-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) {
  .rec { animation: none; width: auto; height: auto; background: none; border-radius: 0; font-size: 11px; color: var(--muted); }
  .rec::before { content: "live"; }
}

/* ---------- settle stamp ---------- */
.stamp { display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: 1px 7px; border-radius: 4px; }

/* ---------- shared's state, the project page's first line ---------- */
.banner-red, .banner-green { padding: 8px 12px; border-left: 3px solid; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; }
.banner-red { background: var(--fail-wash); border-color: var(--fail); }
.banner-green { background: var(--pass-wash); border-color: var(--pass); }

/* ---------- notice: overlap warnings, news, the mod note ---------- */
.notice { padding: 8px 12px; border-left: 3px solid var(--ink); background: var(--wash); border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--text-s); }

/* ---------- card and its { } twin ---------- */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-card); min-width: 0; }
.card > header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.card > .body { padding: 12px 14px 14px; }
.twin-btn { margin-left: auto; font-family: var(--font-mono); font-size: 13px; background: none; border: 1px solid var(--rule); color: var(--ink); border-radius: var(--radius); padding: 2px 8px; cursor: pointer; }
.twin-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.twin { display: none; }
.show-twin .twin { display: block; }
.show-twin .human { display: none; }
.twin dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; font-size: 13px; }
.twin dt { color: var(--muted); }
.twin dd { margin: 0; font-family: var(--font-mono); }

/* ---------- version ribbon (server-rendered SVG) ---------- */
.ribbon { display: block; width: 100%; height: 34px; }
.ribbon .r-pass { fill: var(--pass); }
.ribbon .r-fail { fill: var(--fail); }
.ribbon .r-none { fill: var(--rule); }
.ribbon .r-run { fill: var(--ink); opacity: .5; animation: avcs-blink var(--pulse) ease-in-out infinite; }
.ribbon .r-wait { fill: var(--faint); opacity: .45; }
.ribbon .hover { fill: var(--ink); }
@keyframes avcs-blink { 50% { opacity: .2; } }
.ribbon .playhead { fill: var(--ink); }

/* ---------- replay: a project's files lighting up as agents record, over the
   ribbon with a playhead (Builder 3's component, /p/<project>/replay and the
   front page's hero). History moves here only because someone pressed Play,
   so nothing pulses: the dot is filled while playing and hollow while paused. */
.replay { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-card); overflow: hidden; }
.replay-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: var(--text-s); color: var(--muted); }
.replay-head b { color: var(--ink); font-weight: 600; font-family: var(--font-mono); }
.replay-head .ctl { margin-left: auto; display: flex; gap: 6px; }
.replay .livedot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); margin-right: 6px; vertical-align: 1px; }
.replay.playing .livedot { background: var(--ink); }
/* 136px: two folders a row on a 375px phone, six on a desktop */
.replay .map { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 136px), 1fr)); gap: 14px 18px; padding: 16px 14px 10px; }
.replay .folder h4 { margin: 0 0 6px; font-size: var(--text-xs); font-weight: 500; color: var(--muted); font-family: var(--font-mono); }
.replay .tiles { display: flex; flex-wrap: wrap; gap: 3px; }
.replay .tile { width: 14px; height: 14px; border-radius: 3px; background: var(--wash); transition: background-color .5s, box-shadow .5s; }
/* a lit tile takes the agent's slot class (or --c); slots 9-16 light hollow */
.replay .tile.lit { background: var(--c, var(--ink)); }
.replay .tile.lit.hollow,
.replay .tile.lit:is(.agent-9, .agent-10, .agent-11, .agent-12, .agent-13, .agent-14, .agent-15, .agent-16) { background: var(--surface); box-shadow: inset 0 0 0 2.5px var(--c); }
.replay .tile.collide { outline: 2px solid var(--ink); outline-offset: 1px; animation: replay-collide .9s steps(2) 2; }
@keyframes replay-collide { 50% { transform: scale(1.35); } }
.replay .ribbon-box { padding: 6px 14px 4px; }
.replay .scrub { display: block; width: 100%; margin: 6px 0 4px; accent-color: var(--ink); }
.replay .readout { margin: 0 0 8px; font-size: var(--text-xs); color: var(--muted); }
.replay .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px 14px; border-top: 1px solid var(--rule); font-size: var(--text-s); }

/* ---------- the front page's hero: eyebrow, headline, lede, the replay, the
   links, then the record's counts. Every number in .stats is a count from the
   record and links to it: never a rate, a speed or a hand-typed claim. ---------- */
.hero { padding: var(--space-8) 0 28px; }
.eyebrow { color: var(--muted); font-size: var(--text-s); margin: 0 0 14px; }
.hero h1 { max-width: 18ch; margin: 0 0 var(--space-4); }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 60ch; margin: 0 0 28px; }
.lede strong { color: var(--ink); font-weight: 600; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 18px; }
.ctas .btn { padding: 10px 16px; font-size: var(--text-m); }
.stats { display: flex; flex-wrap: wrap; gap: var(--space-2) 28px; list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--muted); }
.stats b { display: block; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.01em; font-family: var(--font-mono); }
.stats a { text-decoration: none; }
.stats a:hover b, .stats a:focus-visible b { text-decoration: underline; text-decoration-color: var(--faint); }

/* ---------- a guided path: numbered stops, each a sentence and its links
   (the judges' frozen copy, "Start here") ---------- */
ol.path { list-style: none; counter-reset: stop; margin: var(--space-4) 0; padding: 0; border-top: 1px solid var(--rule); max-width: 760px; }
ol.path > li { counter-increment: stop; display: grid; grid-template-columns: 2em 1fr; column-gap: var(--space-3); padding: 12px 4px; border-bottom: 1px solid var(--rule); }
ol.path > li::before { content: counter(stop); grid-row: span 2; font-family: var(--font-mono); font-weight: 700; font-size: var(--text-l); line-height: 1.35; color: var(--muted); }
ol.path > li > p { margin: 0; }
ol.path > li > p strong { font-weight: 650; }
ol.path > li > p + p { margin-top: 4px; font-size: var(--text-s); }
ol.path > li > p + p a { font-weight: 600; }

/* ---------- a run's steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; font-size: var(--text-s); }
.steps > li { display: grid; grid-template-columns: 18px 70px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.steps > li:last-child { border-bottom: 0; }
.steps .detail, .steps .time { color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); }

/* ---------- code with a blame gutter ---------- */
.code { font-family: var(--font-mono); font-size: 12.5px; border: 1px solid var(--rule); border-radius: var(--radius); overflow: auto; }
.code .line { display: grid; grid-template-columns: 44px 10px 1fr; align-items: stretch; }
.code .line > .ln { color: var(--faint); text-align: right; padding: 1px 8px 1px 0; user-select: none; }
.code .line > .who { background: var(--c, transparent); border-radius: 2px; margin: 2px 4px 2px 0; }
.code .line > .text { white-space: pre; padding: 1px 8px; }
.code .line.unpublished > .text { background: var(--wash); }
.code .line:target { background: var(--wash); }

/* ---------- diff lines (a version's page): added and removed are line states,
   so they take the pass and fail washes, never the full hues ---------- */
.code .line.add > .text { background: var(--pass-wash); }
.code .line.del > .text { background: var(--fail-wash); color: var(--muted); }
.code .line > .sign { width: 14px; text-align: center; color: var(--muted); user-select: none; }
.code.diff .line { grid-template-columns: 44px 44px 14px 1fr; }
.code.diff .line > .ln + .ln { border-right: 1px solid var(--rule); }
.code .hunk { padding: 2px 8px; color: var(--muted); background: var(--wash); border-block: 1px solid var(--rule); font-size: 12px; }

/* ---------- blame: who and which version, once per run of lines ---------- */
.code.blame .line { grid-template-columns: 44px 10px 132px 1fr; }
.code.blame .line > .by { display: flex; align-items: center; gap: 6px; padding: 1px 6px; overflow: hidden; white-space: nowrap; font-size: 11.5px; }
.code.blame .line > .by a { color: var(--muted); }
.code.blame .line.run-start { border-top: 1px solid var(--rule); }
.code.blame .line:not(.run-start) > .by { visibility: hidden; }

/* ---------- streamed output: CI logs now, Actions' steps later ---------- */
pre.log { max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; }
pre.log:focus-visible { outline-offset: 0; }
