/* The sieve page. Steel paper, navy ink, brass coins. One family: Archivo, wide for text,
   Archivo Narrow for the stamped amounts. */
:root {
  color-scheme: light;
  --ground: #e9edf0; --panel: #f6f8f9; --ink: #16233b; --muted: #4f5d6e; --line: #c9d1d8;
  --mesh: #6d7b8a; --brass: #b8902a; --steel: #8f9aa6; --focus: #2a5bd7; --banner: #dfe5ea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #10161d; --panel: #18212b; --ink: #e4e9ee; --muted: #a3b0bd; --line: #2c3845;
    --mesh: #7d8b99; --brass: #d4ae4a; --steel: #5d6976; --focus: #7aa2ff; --banner: #1a232d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #10161d; --panel: #18212b; --ink: #e4e9ee; --muted: #a3b0bd; --line: #2c3845;
  --mesh: #7d8b99; --brass: #d4ae4a; --steel: #5d6976; --focus: #7aa2ff; --banner: #1a232d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.6 Archivo, system-ui, sans-serif; font-stretch: 104%; }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.banner { background: var(--banner); color: var(--muted); font-size: 14px; padding: 9px 16px; text-align: center; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 72px; }
nav.top { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 18px 0 0; font-size: 15px; }
nav.top a { color: var(--muted); text-decoration: none; }
nav.top a[aria-current] { color: var(--ink); font-weight: 600; }
header.intro { max-width: 680px; margin: 34px 0 22px; }
h1 { font: 800 clamp(40px, 7vw, 72px)/0.95 "Archivo Narrow", Archivo, sans-serif; letter-spacing: -0.01em; margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--muted); margin: 0; }
h2 { font: 700 30px/1.1 "Archivo Narrow", Archivo, sans-serif; margin: 56px 0 12px; }
p { margin: 0 0 14px; max-width: 68ch; }

.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border: 2px solid var(--ink); background: var(--ink); color: var(--ground); font: 600 15px Archivo, sans-serif; cursor: pointer; border-radius: 3px; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.btn:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.date { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.date input { height: 42px; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 15px Archivo, sans-serif; border-radius: 3px; }
.toolbar .spacer { flex: 1; }
.toolbar a { font-size: 15px; }
.privacy { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
#status { font-size: 15px; margin: 6px 0 0; min-height: 1.6em; }

.sorter { position: relative; margin: 26px 0 8px; }
.hopper { font-size: 15px; color: var(--muted); margin: 0 0 4px; }
.hopper b { font: 700 24px "Archivo Narrow", Archivo, sans-serif; color: var(--ink); margin-right: 6px; }
canvas#sorter { display: block; width: 100%; touch-action: pan-y; cursor: crosshair; }
#tip { position: absolute; z-index: 2; max-width: 280px; background: var(--ink); color: var(--ground); font-size: 13.5px; line-height: 1.45; padding: 8px 10px; border-radius: 3px; pointer-events: none; }
.result { font-size: 17px; margin: 8px 0 0; }
.result b { font: 700 28px "Archivo Narrow", Archivo, sans-serif; }
#later { color: var(--muted); font-size: 15px; }
.replay { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 15px; cursor: pointer; }

.panels { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 900px) { .panels { grid-template-columns: 1.2fr 1fr; } }
.rule { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule p { color: var(--muted); font-size: 15px; margin: 4px 0 6px; }
.switch { font-weight: 600; display: flex; gap: 10px; align-items: center; cursor: pointer; }
.switch input, .chip input { width: 18px; height: 18px; accent-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; border: 1px solid var(--line); background: var(--panel); padding: 3px 10px; border-radius: 3px; cursor: pointer; }
#stale-days { width: 70px; height: 32px; font: 15px Archivo, sans-serif; padding: 0 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 3px; }
#columns .field { display: grid; gap: 2px; margin: 0 0 10px; font-size: 14px; }
#columns .field em { color: var(--muted); font-style: normal; }
#columns select { height: 40px; font: 15px Archivo, sans-serif; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 0 8px; }

#catches details { border-top: 1px solid var(--line); }
#catches summary { display: grid; grid-template-columns: 1fr auto 3.5em; gap: 12px; align-items: baseline; padding: 12px 0; cursor: pointer; font-weight: 600; }
#catches summary .amt { font: 700 20px "Archivo Narrow", Archivo, sans-serif; }
#catches summary .n { color: var(--muted); font-weight: 400; text-align: right; font-size: 14px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
th, td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.num { text-align: right; white-space: nowrap; }
.more { font-size: 14px; color: var(--muted); }

.defs { display: grid; gap: 0; margin: 10px 0 0; }
.defs div { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 6px 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.defs dt { font-weight: 700; }
.defs dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { .defs div { grid-template-columns: 1fr; } }
.teams { width: auto; min-width: min(100%, 560px); font-size: 15px; }
.hire { margin-top: 56px; padding: 22px 0 0; border-top: 2px solid var(--ink); }
.hire p { font-size: 18px; }
footer { margin-top: 48px; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
