/* Open Source Scanner — opensourcescanner.xyz
 *
 * Minimal, full-bleed, light only. Structure comes from hairlines and space,
 * not from cards, radii or shadows — nothing on this page has a border-radius
 * or a box-shadow, and that is deliberate.
 *
 * Near-monochrome with one accent. Green is reserved for a single meaning —
 * "this is free, you can take it" — and appears nowhere else. The mass of
 * already-taken issues is rendered in near-black, because it is the weight of
 * the problem, not a second brand colour.
 *
 * Fonts self-hosted (OFL): Schibsted Grotesk for everything read as language,
 * Geist Mono for everything read as data or as a label.
 */

@font-face {
  font-family: 'Serif';
  src: url('fonts/serif.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Sans';
  src: url('fonts/sans.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'Mono';
  src: url('fonts/mono.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #faf9f7;
  --white: #fff;
  --ink: #121212;
  --gray: #656360;
  --faint: #9b9892;
  --line: #e6e3dd;
  --line-soft: #efedE8;

  --go: #00a34a;
  --go-deep: #00713a;
  --go-wash: #eaf6ee;
  --taken: #1c1c1c;

  --serif: 'Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --pad: clamp(20px, 4.2vw, 72px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--sans);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* Full-bleed section; every rule on the page spans the whole viewport. */
.band { border-bottom: 1px solid var(--line); }
.band.white { background: var(--white); }
.band:last-of-type { border-bottom: 0; }

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

/* Language is capped for readability even though structure runs edge to edge. */
.measure { max-width: 62ch; }

/* ── Type ─────────────────────────────────────────────────────────────────── */

.eyebrow {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 22px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.018em; margin: 0; }

.display {
  font-size: clamp(37px, 5.1vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.display .go { color: var(--go-deep); }
.display .took { color: var(--taken); }

.title {
  font-size: clamp(28px, 3.5vw, 46px);
  line-height: 1.1;
  text-wrap: balance;
}

.lede {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--gray);
  margin: 0;
}
.lede a { color: var(--go-deep); text-underline-offset: 3px; }

/* ── Header ───────────────────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}
header.site .wrap {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 62px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 16px/1 var(--sans);
  letter-spacing: -0.025em;
  text-decoration: none;
}
.logo::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--go);
}

nav.site {
  display: flex;
  gap: 30px;
  margin-left: auto;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
nav.site a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.15s;
}
nav.site a:hover { color: var(--ink); }

/* ── Banner ───────────────────────────────────────────────────────────────── */

.banner {
  background: var(--taken);
  color: #fff;
  font: 400 13px/1.5 var(--mono);
  padding: 11px var(--pad);
}

/* ── The sieve ────────────────────────────────────────────────────────────── */

.sieve {
  display: block;
  width: 100%;
  height: auto;
  shape-rendering: crispEdges;
}
.sv-dim { fill: #dedbd4; }
.sv-taken { fill: var(--taken); }
.sv-held { fill: #9fdcb8; }
.sv-listed { fill: var(--go); }

.sieve path { animation: sv 0.6s both cubic-bezier(0.2, 0.7, 0.3, 1); }
.sv-taken { animation-delay: 0.14s; }
.sv-held { animation-delay: 0.26s; }
.sv-listed { animation-delay: 0.36s; }
@keyframes sv { from { opacity: 0; } to { opacity: 1; } }

.scanline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 400 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
}

/* The legend is four numbers with labels — the same object as a stat row, so
   it is built as one: full-bleed cells split by hairlines. */
.legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.legend li {
  padding: 26px var(--pad) 30px;
  border-left: 1px solid var(--line);
}
.legend li:first-child { border-left: 0; }
.legend b {
  display: block;
  font: 400 clamp(27px, 2.9vw, 42px) / 1 var(--serif);
  letter-spacing: -0.02em;
}
.legend .k {
  display: block;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 12px 0 8px;
}
.legend i {
  font-style: normal;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--gray);
  text-wrap: pretty;
}
.lg-taken b { color: var(--taken); }
.lg-listed b { color: var(--go-deep); }

/* ── Thesis: heading left, argument right ─────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 90px);
  align-items: start;
  padding: clamp(48px, 6vw, 96px) var(--pad);
}
.split .right { padding-top: 10px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }

/* ── Section heads ────────────────────────────────────────────────────────── */

.sec {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: clamp(44px, 5vw, 76px) var(--pad) 26px;
}
.sec .meta {
  font: 400 12.5px/1 var(--mono);
  color: var(--faint);
  text-decoration: none;
}
.sec a.meta:hover { color: var(--ink); }

.pagehead .wrap {
  padding-top: clamp(44px, 5vw, 80px);
  padding-bottom: clamp(34px, 4vw, 56px);
}
.pagehead .lede { margin-top: 18px; }
.pagehead .actions { margin-top: 26px; }

/* ── Issue rows ───────────────────────────────────────────────────────────── */
/* A board is a list, not a deck of cards. Each row runs the full width and is
   separated from its neighbours by a hairline.

   The row earns its rhythm from type scale, not from chrome: one large title
   per row, everything else small and quiet. A uniform grid of same-size grey
   text is what makes a list look dead. */

.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 1px solid var(--line); }
.rows > li[hidden] { display: none; }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(112px, auto);
  gap: clamp(20px, 3.4vw, 64px);
  padding: 30px var(--pad) 32px;
  position: relative;
  transition: background 0.15s;
}
.row::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 3px;
  background: var(--go);
  transform: scaleY(0);
  transition: transform 0.18s;
}
.row:hover { background: var(--white); }
.row:hover::before { transform: scaleY(1); }

.rowmeta {
  margin: 0 0 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.rowmeta .slug { color: var(--faint); text-decoration: none; }
.rowmeta .slug:hover { color: var(--ink); }

.row h3 {
  font-size: clamp(19px, 1.62vw, 26px);
  line-height: 1.24;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: pretty;
}
.row h3 a { text-decoration: none; }
.row:hover h3 a { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

.row .attrs {
  margin: 12px 0 0;
  font: 400 12px/1.5 var(--mono);
  color: var(--faint);
}
.row .attrs a { color: var(--faint); text-decoration: none; }
.row .attrs a:hover { color: var(--ink); }

.row-body { padding-top: 22px; }

.excerpt {
  margin: 0;
  color: var(--gray);
  font-size: 14.5px;
  line-height: 1.55;
}

.verdict {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 23px;
}
.stamp {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--go-deep);
  white-space: nowrap;
}
.arrow {
  font-size: 17px;
  line-height: 1;
  color: var(--faint);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s, transform 0.18s;
}
.row:hover .arrow { opacity: 1; transform: translateX(0); color: var(--ink); }

.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.signals:empty { display: none; }

/* Chips, in the same hairline-box language as the facet links — just smaller.
   Deliberately uncoloured: there are four or five per row across a page of
   rows, and tinting the positive ones green is how the accent stopped meaning
   anything last time. Only the proportion bar carries colour. */
.sig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 11.5px/1 var(--mono);
  color: var(--gray);
  background: transparent;
  border: 1px solid var(--line);
  padding: 6px 9px;
  white-space: nowrap;
}
.sig.warn { color: var(--ink); border-color: #cfcbc3; }

/* A merge rate is a proportion, so draw it as one. */
.bar {
  display: inline-block;
  width: 40px;
  height: 4px;
  background: var(--line);
}
.bar i { display: block; height: 100%; width: calc(var(--f) * 100%); background: var(--gray); }
.sig.good .bar i { background: var(--go); }
.sig.warn .bar i { background: var(--taken); }

/* ── Filters ──────────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px var(--pad);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 62px;
  z-index: 20;
}
.filters input[type='search'], .filters select {
  font: 400 13px/1 var(--mono);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 12px;
  min-height: 38px;
}
.filters input[type='search'] { flex: 1 1 260px; min-width: 0; }
.filters input[type='search']::placeholder { color: var(--faint); }
.filters select { cursor: pointer; }
.filters input:focus-visible, .filters select:focus-visible { border-color: var(--ink); outline-offset: 1px; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 400 12.5px/1 var(--mono);
  color: var(--gray);
  border: 1px solid var(--line);
  padding: 10px 13px;
  cursor: pointer;
  user-select: none;
  min-height: 38px;
}
.toggle:hover { color: var(--ink); }
.toggle input { accent-color: var(--go); margin: 0; }
.toggle:has(input:checked) { color: var(--go-deep); border-color: var(--go); background: var(--go-wash); }

#result-count {
  font: 400 12.5px/1 var(--mono);
  color: var(--faint);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Chips ────────────────────────────────────────────────────────────────── */

.chips {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad) clamp(44px, 5vw, 72px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font: 400 13px/1 var(--mono);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 10px 13px;
  transition: border-color 0.15s;
}
.chips a:hover { border-color: var(--ink); }
.chips .c { color: var(--faint); }

/* ── Stat grid ────────────────────────────────────────────────────────────── */

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--line);
}
.stat {
  padding: 30px var(--pad);
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat .n {
  font: 400 clamp(31px, 3.3vw, 48px) / 1 var(--serif);
  letter-spacing: -0.02em;
}
.stat .l {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 14px;
}
.stat.hi .n { color: var(--go-deep); }

/* ── Prose ────────────────────────────────────────────────────────────────── */

.prose {
  max-width: 68ch;
  padding: 0 var(--pad) clamp(48px, 6vw, 90px);
}
.prose h2 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  margin: 48px 0 14px;
}
.prose h3 { font-size: 19px; line-height: 1.3; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--gray); }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 18px; margin: 0; }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--faint); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font: 400 13px/1 var(--mono); background: var(--white); border: 1px solid var(--line); padding: 2px 5px; }
.prose a { color: var(--go-deep); text-underline-offset: 3px; }

table.prose { width: 100%; max-width: none; border-collapse: collapse; padding: 0; }
.table-scroll { overflow-x: auto; padding: 0 var(--pad) clamp(44px, 5vw, 72px); }
table.prose th, table.prose td {
  text-align: left;
  padding: 15px 16px 15px 0;
  border-bottom: 1px solid var(--line);
}
table.prose th {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
table.prose td { color: var(--gray); font-size: 15px; }
table.prose td:last-child { font-family: var(--mono); text-align: right; padding-right: 0; color: var(--ink); }
table.prose tr.is-taken td { color: var(--taken); font-weight: 500; }

/* ── Empty ────────────────────────────────────────────────────────────────── */

.empty {
  padding: 72px var(--pad);
  text-align: center;
  color: var(--faint);
  font: 400 14px/1.6 var(--mono);
  border-top: 1px solid var(--line);
}
.empty a { color: var(--go-deep); }

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line);
  padding: clamp(40px, 5vw, 64px) var(--pad) 56px;
}
footer.site .rejected {
  font-size: clamp(17px, 1.9vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.025em;
  max-width: 34ch;
  margin: 0 0 32px;
}
footer.site .rejected .took { color: var(--taken); }
footer.site .rejected .go { color: var(--go-deep); }
footer.site .rejected a { color: var(--gray); font-size: 15px; letter-spacing: 0; display: block; margin-top: 14px; }
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
footer.site nav a { color: var(--gray); text-decoration: none; }
footer.site nav a:hover { color: var(--ink); }
footer.site .fine { font: 400 12.5px/1.5 var(--mono); color: var(--faint); margin: 20px 0 0; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .legend { grid-template-columns: repeat(2, 1fr); }
  .legend li:nth-child(3) { border-left: 0; }
  .legend li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .split { grid-template-columns: 1fr; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(112px, auto); }
  .row-body { grid-column: 1; padding-top: 4px; }
}

@media (max-width: 760px) {
  nav.site { gap: 18px; }
  nav.site a[data-secondary] { display: none; }
  .row { grid-template-columns: 1fr; gap: 14px; padding-top: 24px; padding-bottom: 26px; }
  .row-body, .verdict { padding-top: 0; }
  .verdict { order: -1; justify-content: flex-start; }
  .row .arrow { display: none; }
  .filters { position: static; }
  .legend { grid-template-columns: 1fr; }
  .legend li { border-left: 0; border-bottom: 1px solid var(--line); }
  .scanline { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
