/* The showcase of bugs.genproof: the genproof.com world (Roboto Mono, near-black on white, [BRACKET] actions) with
 * one loud element, a sky of bug cards that float behind the numbers. Everything else stays quiet. */
@font-face { font-family: "Roboto Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/bugs/assets/fonts/roboto-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/bugs/assets/fonts/roboto-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #fff; --fg: #171717; --muted: #595959; --soft: #737373; --line: var(--rule); --rule: #e5e5e5; --rule-hover: #c7c7c7; --panel: #f5f5f5;
  --link: #025fbc; --link-hover: #004499; --ok: #157f3d;
  --inverse-bg: var(--fg); --inverse-fg: #f5f5f5; --inverse-muted: #a3a3a3; --inverse-link: #9cc3ee;
  --found: #c2410c; --sent: #025fbc;
  --sky-top: #eaf2fb; --sky-bottom: #fff;
  --font: "Roboto Mono", "Courier New", monospace;
  /* Typography shared with genproof.com (app/globals.css and SideMenu.module.css). */
  --type-body: 1.1rem; --type-ui: 1rem; --type-small: 0.875rem;
  --type-h1: 2.25rem; --type-h2: 1.75rem; --type-h3: 1.5rem;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --content-width: 1184px; --pad: 32px; --card-w: 272px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-height, 80px) + 24px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--link); color: #fff; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wrap { width: min(var(--content-width), 100% - 2 * var(--pad)); margin: 0 auto; }
.muted { color: var(--muted); }
@media (max-width: 720px) { :root { --pad: 16px; --card-w: 220px; } }

/* bracket actions: the signature of the world */
.act { color: var(--link); white-space: nowrap; text-transform: uppercase; font-size: var(--type-ui); }
.bar .act { font-size: var(--type-body); }
.act::before { content: "["; } .act::after { content: "]"; }
.act:hover { color: var(--link-hover); text-decoration: underline; }
.act[aria-pressed="true"] { color: var(--fg); font-weight: 700; text-decoration: none; cursor: default; }

/* hero: the sky of cards and the glass panel */
.hero { position: relative; height: 100dvh; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; padding: calc(var(--bar-height, 72px) + var(--space-6)) var(--pad) var(--space-6); overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 92%); isolation: isolate; }
.sky { position: absolute; inset: 0; z-index: -1; display: flex; flex-direction: column;
  justify-content: center; gap: 20px; padding: var(--sky-top-inset, 88px) 0 var(--sky-bottom-inset, 24px); }
.lane { position: relative; flex: none; z-index: 3; }
.track { position: relative; display: flex; align-items: flex-start; width: max-content; will-change: transform; }
.lane.far { z-index: 1; }
.lane.mid { z-index: 2; }
.float { position: relative; flex: none; margin-left: 32px; }

.bar { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: var(--space-4) var(--space-6); flex-wrap: wrap; padding: 20px max(var(--pad), calc((100% - var(--content-width)) / 2));
  background-color: var(--sky-bottom);
  background-image: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 92%);
  background-size: 100% var(--hero-height, 100svh);
  background-position: 0 calc(var(--gradient-top, 0px) - var(--page-scroll, 0px));
  background-repeat: no-repeat; border-bottom: 1px solid var(--rule);
  }
.brand { font-size: 1.65rem; line-height: 1.2; font-weight: 700; color: #000; letter-spacing: normal; }
.brand:hover { color: var(--fg); text-decoration: none; }
.bar-links { margin-left: auto; display: flex; align-items: center; gap: var(--space-2) var(--space-6); flex-wrap: wrap; }

.panel { position: relative; width: min(784px, 100%); padding: 36px 40px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 1px 2px rgb(23 23 23 / 0.04), 0 30px 80px rgb(23 23 23 / 0.12); }
.hero .panel { max-height: 100%; overflow-y: auto; }
h1 { margin: 0 0 var(--space-6); font-size: var(--type-h1); font-weight: 700; line-height: 1.2; letter-spacing: normal; text-wrap: balance; }
.hero-copy { display: grid; gap: var(--space-4); }
.lede, .hero-hint { margin: 0; font-size: var(--type-body); line-height: 1.6; text-wrap: pretty; }
.lede { color: var(--fg); max-width: 66ch; }
.hero-hint { color: var(--fg); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); margin: 28px 0; }
.stats div { display: flex; flex-direction: column; min-width: 0; }
.stats dt { margin-top: 6px; color: var(--fg); font-size: var(--type-ui); }
/* Align the label with the visible edge of the leading numeral, rather than its font box. */
.stats div:has([data-total="projects"]) dt { padding-inline-start: clamp(4px, 0.55vw, 6px); }
.stats dd { order: -1; margin: 0; font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; white-space: nowrap; }
.stats div:first-child dd { color: var(--found); }
.cta { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); margin: 0; }
.cta .act { font-size: var(--type-body); }
@media (max-width: 720px) {
  .hero { padding-top: calc(var(--bar-height, 90px) + 16px); padding-bottom: 56px; }
  .bar { padding-block: var(--space-4); }
  .brand { font-size: 1.65rem; }
  .bar-links { gap: 4px 12px; }
  .bar .act { font-size: var(--type-body); }
  .panel { padding: var(--space-6); }
  .panel h1 { margin-bottom: 20px; }
  .lede, .hero-hint { font-size: var(--type-body); }
  .stats { gap: var(--space-6) var(--space-4); margin: var(--space-6) 0; }
  .stats dt { font-size: var(--type-ui); }
  .cta { flex-direction: column; gap: var(--space-3); }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* a bug card in the sky */
.card { position: relative; display: block; width: var(--card-w); padding: var(--space-4); text-align: left; color: var(--fg); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 2px rgb(23 23 23 / 0.04), 0 10px 28px rgb(23 23 23 / 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--rule-hover); box-shadow: 0 2px 4px rgb(23 23 23 / 0.05), 0 18px 40px rgb(23 23 23 / 0.12); text-decoration: none; color: var(--fg); }
/* Keep text colors stable: opacity overlays change different paint layers unevenly. */
.card-proj { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.75rem; color: var(--fg); font-weight: 500;  line-height: 1.6; }
.card-proj .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo { flex: none; width: 18px; height: 18px; border-radius: 4px; object-fit: contain; background: #fff; }
.logo.blank { display: inline-flex; align-items: center; justify-content: center; line-height: 1; text-align: center; background: var(--panel); color: var(--soft); font-size: var(--type-small); font-weight: 700; }
.card-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: var(--space-2) 0 var(--space-3); color: var(--fg); font-size: var(--type-ui); font-weight: 700; line-height: 1.6; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);   }
.chip::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.fixed { color: var(--ok); } .chip.confirmed, .chip.fixing { color: var(--sent); } .chip.reported { color: var(--soft); }
.chip.queue { color: var(--found); } .chip.queue::before { background: none; border: 2px solid currentColor; width: 5px; height: 5px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-foot .when { font-size: 0.6875rem; color: var(--muted); white-space: nowrap; }
.card-metrics { display: block; margin: var(--space-2) 0 0; font-size: 0.75rem; line-height: 1.5; color: var(--muted); }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) 0.5em; color: var(--muted); }
.card-metrics .project-meta { flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 720px) { .card-metrics { font-size: 0.6875rem; } }
.meta-item { display: inline-flex; align-items: center; gap: 0.5em; }
.project-meta .dl { display: inline-flex; align-items: center; }
.metric-value, .popularity-metric { display: inline-flex; align-items: center; gap: 0.4em; vertical-align: middle; color: var(--muted); font-weight: 400; }
.metric-icon { display: block; flex: none; width: 1em; height: 1em; color: inherit; }
.card-metrics .dl, .bugs td.proj .dl { white-space: nowrap;  font-size: 0.75rem; }
.popularity-metric { color: var(--muted); font-size: inherit; white-space: nowrap; }
.bugs td.proj .popularity-metric { display: flex; font-size: 0.75rem; }
.metric-source, .meta-language { display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap; }
.metric-source::before, .meta-item + .meta-item::before { content: ""; flex: none; width: 0.18em; height: 0.18em; border-radius: 50%; background: currentColor; }
.metric-source { margin-left: 0.5em; }
.card-metrics:empty, .review-metrics:empty, .sheet-meta:empty { display: none; }
.metric-unavailable { color: var(--muted); }
.metric-package { display: block; color: var(--muted); font-size: 0.6875rem; overflow-wrap: anywhere; }
.has-reply { font-size: 0.6875rem; color: var(--soft); }

/* a reply joined to its card, like a speech bubble */
.reply-bubble { visibility: hidden; pointer-events: none; position: absolute; top: 100%; left: 28px; width: calc(var(--card-w) - 28px); margin: 12px 0 0; padding: 9px 12px; background: var(--inverse-bg); color: var(--inverse-fg); border-radius: 10px;
  font-size: 0.71875rem; line-height: 1.45; box-shadow: 0 10px 24px rgb(23 23 23 / 0.16); }
.reply-bubble.is-visible { visibility: visible; }
/* Keep the upper reactions clear of the central panel, with the pointer down. */
.lane:first-child .reply-bubble { top: auto; bottom: 100%; margin: 0 0 12px; }
.lane:first-child .reply-bubble::before { top: auto; bottom: -6px; }
.reply-bubble::before { content: ""; position: absolute; top: -6px; left: 22px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.reply-bubble q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; quotes: "\201C" "\201D"; }
.reply-bubble span { display: block; margin-top: 3px; color: var(--inverse-muted); }
.hero-replies { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hero-replies .reply-bubble { top: 0; left: 0; margin: 0; pointer-events: auto; cursor: pointer; text-align: left; }
.sky .lane .reply-bubble { visibility: hidden; }
.hero-replies .reply-bubble.is-above::before { top: auto; bottom: -6px; }

/* sections */
main { display: grid; gap: var(--space-16); padding-top: var(--space-16); }
.band { padding: 0; }
#projects h2 { margin-bottom: var(--space-6); }
h2 { margin: 0 0 var(--space-3); font-size: var(--type-h2); font-weight: 700; line-height: 1.6; letter-spacing: normal; }
.band h2 { font-size: var(--type-h1); line-height: 1.2; }
h3 { margin: 0 0 var(--space-4); font-size: var(--type-h3); font-weight: 700; line-height: 1.6; }
.caption { margin: 0 0 var(--space-6); max-width: 72ch; color: var(--fg); font-size: var(--type-body); line-height: 1.6; }
.caption b { color: var(--fg); }
#why h2 { margin-bottom: var(--space-6); }
.why-copy { display: grid; gap: var(--space-6); max-width: 76ch; color: var(--fg); font-size: var(--type-body); line-height: 1.6; }
.why-copy p { margin: 0; }
.why-copy strong { font-weight: 700; }



/* in the maintainers' words: fixed quotes, drawn as the cards of the sky */
#words h2 { margin-bottom: var(--space-6); }
.quotes { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin: 0; padding: 0; }
.quotes li { display: flex; min-width: 0; }
.quote-card { display: flex; flex-direction: column; width: 100%; }
.quote-text { display: block; margin: var(--space-3) 0 var(--space-4); color: var(--fg); font-size: var(--type-body); font-weight: 700; line-height: 1.6; quotes: "\201C" "\201D"; }
.quote-by { margin-bottom: var(--space-4); color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.quote-by .who { color: var(--fg); font-weight: 500; }
.quote-card .card-foot { margin-top: auto; }
/* Narrow screens: the three cards stack vertically. */
@media (max-width: 860px) { .quotes { grid-template-columns: minmax(0, 560px); } }

/* what each status means, in words for a reader without a technical background */
.status-help { display: grid; gap: var(--space-2); margin: 0 0 var(--space-8); }
.status-help div { display: grid; grid-template-columns: 176px 1fr; gap: var(--space-6); align-items: baseline; }
.status-help dt { margin: 0; }
.status-help dd { margin: 0; font-size: var(--type-body); line-height: 1.6; color: var(--fg); }
@media (max-width: 520px) {
  .status-help { gap: var(--space-4); }
  .status-help div { grid-template-columns: 1fr; gap: var(--space-1); }
}
.tools { display: grid; grid-template-columns: 224px 224px minmax(0, 1fr); align-items: center; gap: var(--space-6); margin: 0 0 var(--space-4); padding: var(--space-4) 0; border-block: 1px solid var(--line); }
.tool-select { display: flex; align-items: center; gap: var(--space-2); min-width: 0; font-size: var(--type-ui); }
.tool-label { flex: none; width: 48px; color: var(--muted); font-size: 0.8125rem;  line-height: 1.6; }
.select-shell { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; color: var(--link); border-radius: 3px; }
.select-shell::before { content: "["; }
.select-shell::after { content: "]"; }
.select-shell select, .dropdown-trigger { appearance: none; width: 100%; height: 44px; min-width: 0; padding: 10px 25px 10px 8px; border: 0; border-radius: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23025fbc' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 7px center; color: var(--link); cursor: pointer; text-transform: uppercase; text-align: left; white-space: nowrap; }
#sort-order, #sort-order ~ .dropdown-trigger { width: 100%; }
.dropdown-menu { position: absolute; left: -16px; z-index: 100; min-width: calc(100% + 16px); padding: 6px; border: 1px solid var(--rule); border-radius: 4px; background: var(--bg); box-shadow: 0 8px 24px rgb(23 23 23 / 0.14); color: var(--fg); }
.dropdown-option { position: relative; height: 40px; padding: 8px 12px 8px 28px; line-height: 24px; white-space: nowrap; text-transform: uppercase; cursor: pointer; border-radius: 2px; }
.dropdown-option[aria-selected="true"] { color: var(--link); font-weight: 700; }
.dropdown-option[aria-selected="true"]::before { content: "✓"; position: absolute; left: 8px; }
.dropdown-option.active { background: var(--sky-top); color: var(--link); }
.select-shell:hover, .select-shell:focus-within { background-color: var(--sky-top); }
.select-shell select:focus-visible { outline-offset: 0; }
.select-shell option { background: var(--bg); color: var(--fg); }
.search { min-width: 0; }
.search input { display: block; width: 100%; height: 44px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--bg); font-size: var(--type-ui); }
.search input:focus { outline: 2px solid var(--link); outline-offset: -1px; border-color: transparent; }
@media (max-width: 1000px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); }
  .search { grid-column: 1 / -1; grid-row: 1; }
  .tool-select { gap: var(--space-2); }
  .select-shell { flex: 1; justify-content: space-between; }
  .select-shell select, .dropdown-trigger, #sort-order ~ .dropdown-trigger { width: 100%; }
}
@media (max-width: 420px) {
  .tools { column-gap: var(--space-4); }
  .tool-select { align-items: flex-start; flex-direction: column; gap: var(--space-1); }
  .select-shell { width: 100%; }
}
.more { margin: var(--space-8) 0 0; text-align: center; }

/* the table of reported bugs, in the layout of the table of the team board */
table.bugs { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bugs th { text-align: left; font-size: 0.75rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: var(--space-3) var(--space-4) var(--space-3) 0; box-shadow: inset 0 -1px 0 var(--rule); white-space: nowrap; }
.bugs th.w-sev { width: 104px; } .bugs th.w-proj { width: 210px; } .bugs th.w-status { width: 150px; } .bugs th.w-date { width: 104px; }
.bugs td { padding: var(--space-4) var(--space-4) var(--space-4) 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.8125rem;  line-height: 1.6; }
.bugs tr.bug { cursor: pointer; transition: background-color 0.15s ease; }
.bugs tr.bug:hover { background: #fafafa; }
.bugs tr.bug:hover .headline { color: var(--link); }
.bugs th:last-child, .bugs td:last-child { padding-right: 0; }
.bugs .headline { display: block; text-align: left; font-size: var(--type-body); font-weight: 700; line-height: 1.6; color: var(--fg); overflow-wrap: anywhere; text-wrap: pretty; }
.bugs .sub { display: block; margin-top: var(--space-1); font-size: var(--type-ui); line-height: 1.6; color: var(--muted); }
.bugs .sub-proj { display: none; }
.bugs .row-metrics { display: none; }
.bugs .pline { display: inline-flex; align-items: flex-start; gap: 8px; }
.bugs .pline > span { font-weight: 500; }
.bugs .pline .logo { margin-top: calc((1.6em - 18px) / 2); }
.bugs td.proj .stars { display: block; color: var(--muted); font-size: 0.75rem; }
.bugs td.proj .dl { display: block; color: var(--muted); font-size: var(--type-small); cursor: help; }
.dl-inline { cursor: help; }
.bugs td.status .since { display: block; margin-top: 3px; color: var(--muted); font-size: 0.75rem; }
.bugs td.date { color: var(--muted); white-space: nowrap; }
.bugs .label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.sq { display: inline-block; width: 9px; height: 9px; flex-shrink: 0; background: var(--soft); }
.sev-critical { background: #b42318; } .sev-high { background: var(--found); } .sev-medium { background: #b88300; } .sev-low { background: #8c8c8c; }
.sev-info { background: transparent; box-shadow: inset 0 0 0 1.5px #8c8c8c; } .sev-unrated { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule); }
.reply-line { display: block; margin-top: 8px; padding: 4px 0 4px 12px; border-left: 2px solid var(--rule); font-size: var(--type-ui); line-height: 1.6; color: var(--muted); }
.reply-line q { quotes: "\201C" "\201D"; }
.reply-line .by { color: var(--soft); white-space: nowrap; }
@media (max-width: 1000px) {
  .bugs th.w-proj, .bugs td.proj, .bugs th.w-date, .bugs td.date { display: none; }
  .bugs .sub-proj { display: inline; }
  .bugs .row-metrics { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--muted); font-size: var(--type-small); line-height: 1.6; }
  .bugs .row-metric, .bugs .row-metric .dl { display: inline-flex; align-items: center; white-space: nowrap; }
}
@media (max-width: 720px) {
  table.bugs, .bugs tbody, .bugs tr, .bugs td { display: block; width: auto; }
  .bugs thead { display: none; }
  .bugs tr.bug { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
  .bugs tr.bug td { border: 0; padding: 0; }
  .bugs td.bug { order: 1; flex: 1 1 100%; min-width: 0; }
  .bugs td.sev { order: 2; } .bugs td.status { order: 3; }
  .bugs td.status .since { display: none; }
}
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6); margin-top: var(--space-16); padding: var(--space-6) 0 var(--space-8); border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted);  line-height: 1.6; }

/* the open card */
.sheet { width: min(680px, calc(100% - 32px)); max-height: 88dvh; padding: 0; border: 0; border-radius: 14px; background: #fff; color: var(--fg);
  box-shadow: 0 40px 120px rgb(23 23 23 / 0.3); overflow: auto; }
.sheet::backdrop { background: rgb(234 242 251 / 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: rise 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } html { scroll-behavior: auto; } }
.sheet-body { display: grid; gap: var(--space-6); padding: var(--space-8); }
.sheet-body > p { margin: 0; }
.sheet-heading { display: grid; gap: var(--space-2); }
.sheet-top { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--muted);  line-height: 1.6; }
.sheet-top .project-link { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.sheet-top a.project-link:hover .proj { color: var(--link-hover); }
.sheet-top .logo { width: 28px; height: 28px; border-radius: 6px; }
.sheet-top .proj { min-width: 0; overflow-wrap: anywhere; color: var(--fg); font-weight: 700; font-size: 0.9375rem; }
.sheet-top .x { margin-left: auto; flex: none; }
.sheet-meta { margin: 0; font-size: 0.8125rem; line-height: 1.6; }
.sheet h2:focus { outline: none; }
.sheet h2 { margin: 0; font-size: var(--type-h2); line-height: 1.2; letter-spacing: normal; }
.sheet .project-status { margin: 0; }
.sheet .summary { margin: 0; color: var(--fg); font-size: var(--type-body); line-height: 1.6; }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); margin: 0; padding: var(--space-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 0.8125rem;  line-height: 1.6; }
.facts > div { display: grid; align-content: start; gap: var(--space-1); }
.facts dt { color: var(--soft); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; }
.facts dd { margin: 0; }
.quote { position: relative; margin: 0; padding: 20px var(--space-6); background: var(--inverse-bg); color: var(--inverse-fg); border-radius: 12px; }
.quote::before { content: ""; position: absolute; top: -7px; left: 26px; width: 14px; height: 14px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.quote p { margin: 0; font-size: var(--type-body); line-height: 1.6; }
.quote footer { margin-top: 8px; font-size: 0.75rem; color: var(--inverse-muted);  line-height: 1.6; }
.quote footer a { color: var(--inverse-link); }
.sheet-actions { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: baseline; margin: 0; padding: var(--space-4) 0 0; border-top: 1px solid var(--line); background: #fff; }
.sheet-actions .hint { margin-left: auto; font-size: 0.75rem; color: var(--soft); }
@media (max-width: 720px) {  /* on a phone the open card is a sheet from the bottom edge */
  .sheet { width: 100%; max-width: none; max-height: 90dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .sheet[open] { animation-name: slide; }
  .sheet-body { padding: var(--space-6); }
  .sheet h2 { font-size: var(--type-h2); }
  .sheet .summary { font-size: var(--type-body); }
  .quote p { font-size: var(--type-body); }
  .sheet-actions { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .sheet-actions .hint { display: none; }
}
@keyframes slide { from { transform: translateY(40%); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* the named projects of the queue: a name and a count, never a class */
.named-projects { margin-top: 52px; }
.wall { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin: 0; padding: 0; }
.pchip { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-2); border: 1px solid var(--rule); border-radius: 999px; background: #fff; font-size: 0.8125rem; color: var(--fg); transition: border-color 0.15s ease, transform 0.15s ease;       }
.pchip:hover { border-color: var(--rule-hover); transform: translateY(-1px); }
.pchip .logo { width: 18px; height: 18px; border-radius: 50%; }
.pchip b { min-width: 26px; padding: 0 7px; border-radius: 999px; background: var(--panel); color: var(--fg); font-size: 0.75rem; line-height: 20px; text-align: center;   }
.wall-more { display: none; margin: var(--space-6) 0 0; text-align: center; }
.wall.folded li:nth-child(n+21) { display: none; }
.wall:has(li:nth-child(21)) + .wall-more { display: block; }

@media (max-width: 720px) {
  main { gap: var(--space-12); padding-top: var(--space-12); }
  .search input { font-size: var(--type-ui); }
  .foot { margin-top: var(--space-12); }
}

/* Phone composition: homepage-like copy, followed by two unobstructed moving rows. */
@media (max-width: 720px), (max-width: 960px) and (max-height: 540px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    padding: calc(var(--bar-height, 90px) + var(--space-8)) 0 0;
    background: var(--bg);
  }
  /* Keep the opening header white while the card data is still loading. */
  .bar { --gradient-top: 100svh; background-image: none; background-color: var(--bar-sky-color, var(--bg)); }
  .card-metrics .project-meta { flex-wrap: wrap; white-space: normal; }
  .card-metrics .meta-item { white-space: nowrap; }
  .brand { font-size: clamp(1.125rem, 5.5vw, 1.65rem); }
  .hero .panel {
    order: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* svh, not dvh: dvh changes while iOS toolbars collapse, which would shift the row mid-scroll. */
    min-height: calc(100svh - var(--bar-height, 90px) - 2 * var(--space-8));
    width: calc(100% - 2 * var(--pad));
    margin-inline: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    max-height: none;
    overflow: visible;
  }
  .hero .sky {
    order: 1;
    position: relative;
    inset: auto;
    z-index: 0;
    flex: none;
    width: 100%;
    margin-top: var(--space-8);
    /* Room for the first row's replies above and the second row's below. */
    padding: 104px 0;
    gap: var(--space-6);
    overflow: hidden;
    background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 92%);
  }
  .hero .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The rows move by transform only; horizontal swipes are handled in phone-row-drag.js. */
  .hero .lane { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
  .hero .lane img { -webkit-user-drag: none; }
  .sky[data-layout="phone"] .lane .reply-bubble.is-visible { visibility: visible; pointer-events: auto; cursor: pointer; }
  .hero .stats dd { font-size: clamp(2rem, 7vw, 3rem); }
}
