/* The public forge's pages (docs/PUBLIC-FORGE.md §5), after
   docs/img/public-forge.html: review.css's tokens, both themes. The theme
   follows the system; data-theme on the root fixes it (color-scheme drives
   light-dark()). System fonts alone: nothing is loaded from elsewhere. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root {
  --bg: light-dark(#fafafa, #09090b); --card: light-dark(#ffffff, #18181b);
  --border: light-dark(#ececee, #27272a); --border-strong: light-dark(#e4e4e7, #3f3f46);
  --border-field: light-dark(#8a8a93, #71717a);
  --text: light-dark(#18181b, #f4f4f5); --muted: light-dark(#6f6f78, #a1a1aa);
  --faint: light-dark(#8a8a93, #71717a); --hover: light-dark(#f4f4f5, #27272a);
  --sh1: light-dark(rgb(24 24 27 / .04), rgb(0 0 0 / .32)); --sh2: light-dark(rgb(24 24 27 / .04), rgb(0 0 0 / .24));
  --blue: light-dark(#2563eb, #3b82f6); --blue-bg: light-dark(#eff6ff, #172554); --blue-fg: light-dark(#1d4ed8, #93c5fd);
  --grey: light-dark(#8c8c95, #71717a); --grey-bg: light-dark(#f4f4f5, #27272a); --grey-fg: light-dark(#52525b, #d4d4d8);
  --cyan: light-dark(#0891b2, #22d3ee); --cyan-bg: light-dark(#ecfeff, #083344); --cyan-fg: light-dark(#0e7490, #67e8f9);
  --green: light-dark(#15803d, #22c55e); --green-bg: light-dark(#f0fdf4, #213026); --green-fg: light-dark(#15803d, #86efac);
  --red: light-dark(#991b1b, #ef4444); --red-bg: light-dark(#fef2f2, #382221); --red-fg: light-dark(#b91c1c, #fca5a5);
  --add-bg: light-dark(#ecfdf3, #0f2a1a); --add-ln: light-dark(#dcfce7, #14361f);
  --del-bg: light-dark(#fef2f2, #2f1214); --del-ln: light-dark(#fee2e2, #3d1619);
  --brand: light-dark(#4f46e5, #818cf8); --accent-bg: light-dark(#f3f5ff, #1e1b4b);
  --accent-fg: light-dark(#4338ca, #a5b4fc); --accent-border: light-dark(#c7d2fe, #3730a3); --on-brand: light-dark(#ffffff, #09090b);
  --syn-comment: light-dark(#6f6f78, #a1a1aa); --syn-string: light-dark(#15803d, #86efac); --syn-constant: light-dark(#b45309, #fdba74);
  --syn-keyword: light-dark(#6d28d9, #c4b5fd); --syn-operator: light-dark(#0e7490, #67e8f9); --syn-type: light-dark(#a16207, #fde047);
  --syn-name: light-dark(#1d4ed8, #93c5fd); --syn-param: light-dark(#b91c1c, #f87171); --syn-char: light-dark(#be185d, #f9a8d4);
  /* The minimal mark: the f alone, its parts by theme (forge-pages ui.rs MARK). */
  --mk-cable-a: light-dark(#5b5bf0, #8b93ff); --mk-cable-b: light-dark(#4338ca, #6366f1);
  --mk-metal-a: light-dark(#9a958d, #8a8784); --mk-metal-b: light-dark(#7d7871, #6f6c69); --mk-hole: light-dark(#2a2826, #050505);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px; --radius-control: 4px;
  /* The app's lanes (web/src/index.css): a language's colour by its rank. */
  --lane-1: light-dark(#2563eb, #3b82f6); --lane-2: light-dark(#ea580c, #facc15);
  --lane-3: light-dark(#831843, #dc2626); --lane-4: light-dark(#4c1d95, #2dd4bf);
  --lane-5: light-dark(#854d0e, #0f766e); --lane-6: light-dark(#155e75, #ca8a04);
  --lane-7: light-dark(#a21caf, #f87171);
}

/* Base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-control); }
code, pre, .mono { font-family: var(--mono); font-variant-ligatures: contextual; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.meta { width: 12px; height: 12px; }
.ico.ctl { width: 16px; height: 16px; }
h1 { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-bottom: 6px; }
.card.spaced { margin-bottom: 16px; }
a.path { color: var(--text); }
.note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* Frame: a bordered column, full-width bands, cells drawn by 1px rules */
.frame { max-width: 72rem; margin: 0 auto; border-inline: 1px solid var(--border); }
.band { border-bottom: 1px solid var(--border); }
header.top { position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--border); }
header.top .bar { position: relative; display: flex; align-items: stretch; height: 48px; }
header.top a { color: var(--muted); }
header.top a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
header.top .brand { display: inline-flex; align-items: center; gap: 8px; padding: 0 1.1rem; font-weight: 600; font-size: 15px; letter-spacing: -.01em; border-right: 1px solid var(--border); }
header.top a.brand { color: var(--text); }
.mark { width: 22px; height: 22px; flex: none; }
#mark .cable-from { stop-color: var(--mk-cable-a); } #mark .cable-to { stop-color: var(--mk-cable-b); }
#mark .metal-top { stop-color: var(--mk-metal-a); } #mark .metal-foot { stop-color: var(--mk-metal-b); }
#mark .hole { fill: var(--mk-hole); } #mark .core { fill: var(--mk-cable-a); }
.places { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.places a { display: inline-flex; align-items: center; padding: 0 1rem; font-size: 13px; font-weight: 500; white-space: nowrap; border-right: 1px solid var(--border); }
header.top .places a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.grow { flex: 1; }
.lang { display: flex; flex: none; border-left: 1px solid var(--border); }
.lang a { display: inline-flex; align-items: center; padding: 0 .8rem; font: 500 12px var(--mono); }
header.top .lang a[aria-current="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
header.top a.cta { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 0 1.25rem; background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 500; white-space: nowrap; }
header.top a.cta:hover { background: var(--accent-fg); color: var(--on-brand); }
.iconbtn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-control);
  border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.iconbtn:hover { background: var(--hover); color: var(--text); }
header.top .iconbtn.cellbtn { width: 48px; height: 48px; border-radius: 0; border-left: 1px solid var(--border); }
.tabsrow { border-top: 1px solid var(--border); }
nav.tabs { display: flex; align-items: stretch; height: 40px; overflow-x: auto; scrollbar-width: none; }
nav.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 0 1rem; white-space: nowrap; font-size: 13px; font-weight: 500; border-right: 1px solid var(--border); }
header.top nav.tabs a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
nav.tabs .repo { font-family: var(--mono); color: var(--text); }
main.frame { padding: 2rem 2rem 3.5rem; min-height: 36rem; }

/* Page header */
.ph { margin-bottom: 1.25rem; }
.ph .h { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ph .end { margin-left: auto; display: flex; gap: 6px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 6px; }
.facts .ico { color: var(--faint); }
.lede { max-width: 75ch; margin: 10px 0 0; font-size: 15px; }
.ph .meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* Section, card, rows */
.section { margin: 1.75rem 0 0; }
.section > .sh, .card > .sh { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.section > .sh { margin-bottom: .6rem; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--grey-bg); color: var(--grey-fg); font-variant-numeric: tabular-nums; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px var(--sh1), 0 4px 16px var(--sh2); padding: 14px 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card > .sh { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: .6rem; padding: 9px 16px; border-top: 1px solid var(--border); min-width: 0; }
.rows > li:first-child { border-top: 0; }
.rows > li:hover { background: color-mix(in srgb, var(--hover) 50%, transparent); }
.rows .grow { flex: 1 1 auto; min-width: 0; }
.rows .title { color: var(--text); font-weight: 500; }
.rows a.title:hover { color: var(--accent-fg); }
.rows .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rows .ends { display: flex; align-items: center; gap: 8px; flex: none; }

/* Badge, chip, state */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.badge.outline { border: 1px solid var(--border-strong); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; font: 12px/1.6 var(--mono); padding: 0 .45rem; border-radius: var(--radius-control); white-space: nowrap; background: var(--grey-bg); color: var(--grey-fg); vertical-align: middle; }
.chip.tag, .chip.release { background: var(--cyan-bg); color: var(--cyan-fg); }
a.chip:hover { text-decoration: none; color: var(--text); }
.topics { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.rows .topics { margin-top: 6px; }
.chip.trunk { background: var(--grey-bg); color: var(--grey-fg); }
.chip .ico { width: 12px; height: 12px; }
.sha { display: inline-flex; align-items: center; gap: 2px; }
.state { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.state.ok { color: var(--green-fg); } .state.ok .ico { color: var(--green); }
.state.muted { color: var(--grey-fg); } .state.muted .ico { color: var(--grey); }

/* Controls */
.btn { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 var(--sans); padding: 8px 14px; border-radius: var(--radius-control); border: 1px solid transparent; cursor: pointer; background: var(--brand); color: var(--on-brand); white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.quiet { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.copyfield { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 3px 0 8px; border: 1px solid var(--border-field); border-radius: var(--radius-control); background: var(--bg); min-width: 0; }
.copyfield code { flex: 1; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); user-select: all; }
.copybtn { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); font: 500 12px var(--sans); cursor: pointer; }
.copybtn:hover { background: var(--hover); color: var(--text); }
.copybtn.done { color: var(--green-fg); }
/* The Clone button: a <details>, its address and copy button below it. */
.clone { position: relative; }
.clone[open] { z-index: 30; }
.clone > summary { list-style: none; user-select: none; }
.clone > summary::-webkit-details-marker { display: none; }
.clone > summary .ico:last-child { width: 12px; height: 12px; opacity: .75; transform: rotate(90deg); transition: transform .15s; }
.clone[open] > summary .ico:last-child { transform: rotate(-90deg); }
.clone .pop { position: absolute; right: 0; top: calc(100% + 6px); width: 24rem; max-width: calc(100vw - 2rem); padding: 10px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 1px 2px var(--sh1), 0 8px 24px var(--sh2); }
.clone .pop .note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
/* Languages: one bar, each a lane; the legend's dots in the same. */
.langbar { display: block; height: 8px; border-radius: 999px; overflow: hidden; background: var(--grey-bg); }
.langbar svg { display: block; width: 100%; height: 8px; }
.langbar rect { stroke: var(--card); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.langbar rect:hover { opacity: .75; }
.l1 { fill: var(--lane-1); background: var(--lane-1); } .l2 { fill: var(--lane-2); background: var(--lane-2); }
.l3 { fill: var(--lane-3); background: var(--lane-3); } .l4 { fill: var(--lane-4); background: var(--lane-4); }
.l5 { fill: var(--lane-5); background: var(--lane-5); } .l6 { fill: var(--lane-6); background: var(--lane-6); }
.l7 { fill: var(--lane-7); background: var(--lane-7); } .l0 { fill: var(--grey); background: var(--grey); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 999px; }
.legend b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.field { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--border-field); border-radius: var(--radius-control); background: var(--card); min-width: 0; }
.field:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 13px var(--sans); outline: none; }
.field input::placeholder { color: var(--muted); }
.field .ico { color: var(--faint); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-control); border: 1px solid var(--border); background: var(--card); font-size: 13px; color: var(--text); white-space: nowrap; }
.pill:hover { background: var(--hover); text-decoration: none; }
.pill[aria-current="true"] { background: var(--accent-bg); color: var(--accent-fg); border-color: var(--accent-border); }
.pill .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill[aria-current="true"] .n { color: inherit; }

/* Home: bands of cells */
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-fg); }
.kicker::before { content: ""; width: 6px; height: 6px; background: var(--brand); }
.shead { padding: 3.5rem 2rem 2rem; border-bottom: 1px solid var(--border); }
.shead h2 { margin: 14px 0 0; font-size: clamp(24px, 3.2vw, 36px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.shead p { margin: 12px 0 0; max-width: 60ch; font-size: 15px; color: var(--muted); }
.hero { padding: 4rem 2rem 0; }
.latest { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; font: 500 12px var(--mono); color: var(--muted); }
.latest:hover { color: var(--text); text-decoration: none; }
.latest .ico { color: var(--accent-fg); }
.latest > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest b { font-weight: 500; color: var(--text); }
.hero h1 { margin: 1.1rem 0 0; max-width: 20ch; font-size: clamp(30px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; }
.hero .lede { margin: 1rem 0 0; max-width: 62ch; font-size: 16px; color: var(--muted); }
.ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.75rem; }

/* The chain: changes pass build, tests and review, then plug into main by
   the mark's jack. One clock: a 12 s cycle, three changes 4 s apart; the
   lights, the jack and the commits follow by negative delays. A change's
   centre goes from -12 % to 80 % over 0 to 70 % of the cycle (linear), so
   it passes the gates (25, 45, 65 %) at 28.2 / 43.4 / 58.6 %, and drops
   into the jack from 70 to 77 % (9.1 s). No script. */
.chain { position: relative; height: 200px; margin: 3rem -2rem 0; overflow: hidden; border-top: 1px solid var(--border);
  background-image: radial-gradient(var(--border) 1px, transparent 1.5px); background-size: 16px 16px; background-position: center; }
.chain > *, .chain .card > *, .chain .gate > span { display: block; position: absolute; }
.chain .rail { left: 0; width: 80%; top: 64px; border-top: 1px dashed var(--border-field); }
.chain .drop { left: 80%; top: 64px; height: 96px; border-left: 1px dashed var(--border-field); }
.chain .gate { top: 16px; height: 80px; border-left: 1px solid var(--border-strong); }
.chain .g1 { left: 25%; } .chain .g2 { left: 45%; } .chain .g3 { left: 65%; }
.chain .gate > span { top: -2px; left: 0; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; transform: translateX(-50%); border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg); font: 500 11px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }
.chain .gate i { width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); animation: led 4s linear infinite; }
.chain .g1 i { animation-delay: -.77s; } .chain .g2 i { animation-delay: -2.95s; } .chain .g3 i { animation-delay: -1.12s; }
.chain .line { left: 0; right: 0; top: 159px; height: 2px; background: var(--border-strong); }
.chain .trunk { left: 0; width: calc(80% - 20px); top: 152px; height: 16px; background-image: radial-gradient(circle, var(--bg) 0 2.5px, var(--faint) 3px 4.5px, transparent 5px); background-size: 24px 16px; background-repeat: repeat-x; background-position: 100% 0; mask-image: linear-gradient(90deg, transparent, #000 35%); animation: commit 4s cubic-bezier(.2, .7, .3, 1) -2.88s infinite; }
.chain .jack { left: 80%; top: 160px; width: 26px; height: 26px; display: grid; place-items: center; transform: translate(-50%, -50%); border: 4px solid var(--mk-metal-b); border-radius: 999px; background: var(--mk-hole); animation: plug 4s ease-out -2.88s infinite; }
.chain .jack::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--mk-cable-a); }
.chain .branch { right: 1.25rem; top: 174px; display: inline-flex; align-items: center; gap: 5px; font: 500 12px var(--mono); color: var(--text); }
.chain .branch .ico { color: var(--accent-fg); }
.chain .cards { inset: 0; z-index: 2; }
.chain .card { --d: 0s; position: absolute; display: block; left: -12%; top: 64px; width: 11.5rem; height: 50px; padding: 7px 10px; transform: translate(-50%, -50%); opacity: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 2px var(--sh1), 0 8px 20px var(--sh2); animation: ride 12s linear var(--d) infinite; }
.chain .card:nth-child(2) { --d: -4s; } .chain .card:nth-child(3) { --d: -8s; }
.chain .card > * { position: static; }
.chain .card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chain .card b { font: 600 12px var(--mono); color: var(--accent-fg); }
.chain .card .t { margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chain .ck { display: flex; gap: 3px; }
.chain .ck i { width: 8px; height: 8px; border-radius: 2px; background: var(--border-strong); animation: ck1 12s linear var(--d) infinite; }
.chain .ck i:nth-child(2) { animation-name: ck2; } .chain .ck i:nth-child(3) { animation-name: ck3; }
@keyframes ride {
  0% { left: -12%; top: 64px; opacity: 0; transform: translate(-50%, -50%) scale(1); }
  5% { opacity: 1; }
  70% { left: 80%; top: 64px; opacity: 1; transform: translate(-50%, -50%) scale(1); }
  77%, 100% { left: 80%; top: 160px; opacity: 0; transform: translate(-50%, -50%) scale(.2); }
}
@keyframes ck1 { 0%, 28.4% { background: var(--border-strong); } 29%, 100% { background: var(--green); } }
@keyframes ck2 { 0%, 43.6% { background: var(--border-strong); } 44.2%, 100% { background: var(--green); } }
@keyframes ck3 { 0%, 58.8% { background: var(--border-strong); } 59.4%, 100% { background: var(--green); } }
@keyframes led { 0%, 22% { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); } 32%, 100% { background: var(--border-strong); box-shadow: 0 0 0 3px transparent; } }
@keyframes plug { 0% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 30%, transparent); } 45%, 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes commit { 0% { background-position-x: 100%; } 30%, 100% { background-position-x: calc(100% - 24px); } }

/* Featured cells, the facts */
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.cells.n1 { grid-template-columns: minmax(0, 1fr); }
.cells.n2, .cells.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cells > * { background: var(--bg); }
.cell-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 1.75rem 1.5rem; min-width: 0; transition: background .15s; }
.cell-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.cell-card:hover { background: color-mix(in srgb, var(--hover) 55%, var(--bg)); }
.cell-card:hover::before { transform: scaleX(1); }
.cell-card .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--card); color: var(--accent-fg); }
.lng { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cell-card .name { font: 600 16px var(--mono); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-card .name::after { content: ""; position: absolute; inset: 0; }
.cell-card .name:hover { color: var(--accent-fg); text-decoration: none; }
.cell-card p { flex: 1; margin: 0; color: var(--muted); }
.cell-card .kinds { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.cell-card .kinds .grow { flex: 1; }
.cell-card .clone, .cell-card .langbar { position: relative; z-index: 1; }
.cell-card .langbar rect { stroke: var(--bg); }
.cells.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 1.75rem 2rem; }
.stat b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Every repository */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; padding: 12px 2rem; border-bottom: 1px solid var(--border); }
.toolbar .field { width: 16rem; }
.catalog > li { padding: 14px 2rem; }
.catalog .title { font-family: var(--mono); }
.empty { padding: 18px 2rem; color: var(--muted); margin: 0; }
.prose { max-width: 75ch; }
.prose p { margin: 10px 0; }
footer.foot { border-top: 1px solid var(--border); border-bottom: 0; }
.journal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1px; background: var(--border); }
.journal > div { padding: 2.5rem 2rem; background: var(--bg); }
.journal > .who:only-child { grid-column: 1 / -1; }
.journal .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--text); }
.journal .who p { margin: 12px 0 16px; max-width: 36ch; font-size: 13px; color: var(--muted); }
.flinks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.flinks a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.flinks a:hover { color: var(--text); }
.log h2 { margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.log ol { position: relative; list-style: none; margin: 0; padding: 0; }
.log ol::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px; width: 2px; background: var(--border-strong); }
.log li { position: relative; display: grid; grid-template-columns: 10px 7rem 4.5rem minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.log li::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--bg); border: 2px solid var(--brand); }
.log .r { font: 600 12px var(--mono); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .s { font: 12px var(--mono); color: var(--accent-fg); }
.log .m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.log time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.fbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 1rem 2rem; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.fbar .mono { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* Repository */
.repo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.lastcommit { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--hover) 60%, transparent); font-size: 13px; min-width: 0; }
.lastcommit .msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.lastcommit .who { color: var(--text); font-weight: 500; }
.files .ico { color: var(--faint); }
.files .ico.dir { color: var(--muted); }
.files .name { flex: 1; min-width: 0; color: var(--text); font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files a.name:hover { color: var(--accent-fg); }
/* A README as GitHub shows it: a word breaks only when it overflows the line. */
.readme { padding: 4px 24px 20px; overflow-wrap: break-word; line-height: 1.5; }
.readme > :first-child { margin-top: 16px; }
.readme h1, .readme h2, .readme h3, .readme h4, .readme h5, .readme h6 { margin: 24px 0 16px; font-weight: 600; line-height: 1.25; overflow-wrap: break-word; }
.readme h1 { font-size: 2em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.readme h2 { font-size: 1.5em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.readme h3 { font-size: 1.25em; }
.readme h4 { font-size: 1em; }
.readme h5 { font-size: .875em; }
.readme h6 { font-size: .85em; color: var(--muted); }
.readme p, .readme ul, .readme ol, .readme dl, .readme pre, .readme table, .readme blockquote, .readme details { margin: 0 0 16px; }
.readme ul, .readme ol { padding-left: 2em; }
.readme ul ul, .readme ul ol, .readme ol ol, .readme ol ul { margin: 0; }
.readme li + li { margin-top: .25em; }
.readme li:has(> input[type=checkbox]) { list-style: none; }
.readme li > input[type=checkbox] { margin: 0 .2em .25em -1.4em; vertical-align: middle; }
.readme blockquote { padding: 0 1em; color: var(--muted); border-left: .25em solid var(--border); }
.readme blockquote > :last-child { margin-bottom: 0; }
.readme hr { height: .25em; margin: 24px 0; padding: 0; border: 0; background: var(--border); }
.readme img { max-width: 100%; box-sizing: content-box; vertical-align: middle; }
.readme kbd { display: inline-block; padding: 3px 5px; font: 11px/10px var(--mono); vertical-align: middle; background: var(--grey-bg); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: var(--radius-control); }
.readme summary { cursor: pointer; }
.readme dt { font-weight: 600; }
.readme dd { margin: 0 0 16px; padding: 0 16px; }
.readme code { font-size: .9em; background: var(--grey-bg); padding: .05em .35em; border-radius: var(--radius-control); }
.readme pre { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
.readme pre code { background: none; padding: 0; font-size: inherit; }
.readme pre.plain { white-space: pre-wrap; border: 0; background: none; padding: 0; }
/* A wide table scrolls in its container rather than squeeze its words. */
.readme table { display: block; width: max-content; max-width: 100%; overflow: auto; border-collapse: collapse; border-spacing: 0; }
.readme th, .readme td { border: 1px solid var(--border); padding: 6px 13px; }
.readme th { font-weight: 600; }
.readme tr:nth-child(2n) { background: var(--grey-bg); }
.side .card h2 { font-size: 13px; margin-bottom: 8px; }
.side .card p { margin: 0; }
.side .note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.links a { display: inline-flex; align-items: center; gap: 6px; }

/* File, diff, code */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font: 14px var(--mono); }
.crumbs .ico { color: var(--faint); }
.crumbs b { font-weight: 600; color: var(--text); }
.filehead { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.filehead .end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.code { margin: 0; padding: 8px 0; list-style: none; font: 12.5px/1.65 var(--mono); overflow-x: auto; counter-reset: ln; background: var(--card); }
.code li { counter-increment: ln; white-space: pre; padding-right: 16px; display: flex; }
.code li::before { content: counter(ln); flex: none; width: 3.5rem; padding-right: 14px; text-align: right; color: var(--muted); user-select: none; }
.diff { width: 100%; border-collapse: collapse; font: 12.5px/1.65 var(--mono); }
.diff td { padding: 0 10px; white-space: pre; vertical-align: top; }
.diff td.n { width: 3rem; text-align: right; color: var(--muted); user-select: none; padding: 0 8px; }
.diff tr.hunk td { background: var(--blue-bg); color: var(--blue-fg); padding-top: 2px; padding-bottom: 2px; }
.diff tr.add td { background: var(--add-bg); } .diff tr.add td.n { background: var(--add-ln); color: var(--green-fg); }
.diff tr.del td { background: var(--del-bg); } .diff tr.del td.n { background: var(--del-ln); color: var(--red-fg); }
.diff td.sg { width: 1rem; padding: 0 2px; user-select: none; }
.diff tr.add td.sg { color: var(--green-fg); } .diff tr.del td.sg { color: var(--red-fg); }
.scroll { overflow-x: auto; }
.diffstat { display: inline-flex; align-items: center; gap: 6px; font: 12px var(--mono); }
.diffstat .a { color: var(--green-fg); } .diffstat .d { color: var(--red-fg); }
.message { white-space: pre-wrap; font: 13px/1.6 var(--mono); margin: 0; color: var(--text); max-width: 75ch; }
.h-comment { color: var(--syn-comment); font-style: italic; }
.h-string { color: var(--syn-string); }
.h-constant { color: var(--syn-constant); }
.h-constant-character { color: var(--syn-char); }
.h-keyword, .h-storage { color: var(--syn-keyword); }
.h-keyword-operator { color: var(--syn-operator); }
.h-entity-other { color: var(--syn-type); }
.h-entity-name { color: var(--syn-name); }
.h-markup-heading { color: var(--syn-param); font-weight: 600; }
.h-markup-bold { font-weight: 600; }
.h-markup-italic { font-style: italic; }
.h-punctuation { color: var(--syn-comment); }

/* History, tags */
.day { padding: 8px 16px; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); background: color-mix(in srgb, var(--hover) 60%, transparent); }
.day:first-child { border-top: 0; }
.history > li { align-items: flex-start; }
.history .grow { display: flex; flex-direction: column; gap: 2px; }
.history .ends { padding-top: 1px; }
.pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* Narrow */
@media (max-width: 64rem) {
  .repo-grid { grid-template-columns: minmax(0, 1fr); }
  .journal { grid-template-columns: minmax(0, 1fr); }
  .cells, .cells.n2, .cells.n4 { grid-template-columns: minmax(0, 1fr); }
  .cells.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  header.top .brand { padding: 0 .9rem; }
  header.top .places a { padding: 0 .75rem; }
  header.top .brand .word, header.top a.cta { display: none; }
  .lang a { padding: 0 .6rem; }
  .hero { padding: 2.5rem 1rem 0; }
  .hero .lede { font-size: 15px; }
  .ctas .btn { flex: 1 1 100%; justify-content: center; }
  .chain { margin: 2.5rem -1rem 0; }
  .chain .card { width: 6.5rem; height: 34px; }
  .chain .card .t { display: none; }
  .stat { padding: 1.25rem 1rem; }
  .stat b { font-size: 28px; }
  .cell-card { padding: 1.5rem 1rem; }
  .toolbar { padding: 12px 1rem; }
  .toolbar .field { width: 100%; }
  .toolbar .grow { display: none; }
  nav.tabs .ico { display: none; }
  nav.tabs a { padding: 0 .75rem; }
  main.frame { padding: 1.25rem 1rem 2.5rem; }
  .shead { padding: 2.5rem 1rem 1.5rem; }
  .catalog > li { padding: 12px 1rem; }
  .empty { padding: 18px 1rem; }
  .journal > div { padding: 1.75rem 1rem; }
  .log li { grid-template-columns: 10px 5.5rem minmax(0, 1fr); }
  .log .s, .log time { display: none; }
  .fbar { padding: 1rem; }
  .rows > li { flex-wrap: wrap; }
  .rows .ends { width: 100%; flex-wrap: wrap; }
  .files .meta { display: none; }
  .readme { padding: 4px 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  /* The chain stands on its first moment: two changes on their way, one
     past a gate, the other past all three. */
  .chain *, .chain *::after { animation-play-state: paused !important; }
  .chain .gate i { animation: none; background: var(--green); }
}
