/* SerialHunt web lookup. Ink and vault, as the app: intaglio green ground, rag-paper cream for what is read,
   Treasury seal green and collector gold as the only accents. Gold (--keep) is spent on keepers only. */
:root {
  --vault: #0b1310;
  --raised: #121d18;
  --edge: #1f3029;
  --ink: #edefea;
  --muted: #8fa097;
  --paper: #f3ecdc;
  --paper-ink: #1d2a23;
  --seal: #2e7d5b;
  --keep: #e9b23c;
  --warn: #d9825b;
  --display: "Fraunces", Georgia, serif;
  --body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  background:
    repeating-radial-gradient(circle at 50% -20%, rgba(46, 125, 91, .07) 0 1px, transparent 1px 9px),
    radial-gradient(120% 60% at 50% 0%, rgba(46, 125, 91, .22), transparent 60%),
    var(--vault);
  min-height: 100vh;
}
a { color: var(--keep); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--keep); outline-offset: 3px; border-radius: 4px; }
.mono, code { font-family: var(--mono); }
small { color: var(--muted); font-size: .84em; }

.masthead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  max-width: 1040px; margin: 0 auto; padding: 18px 16px 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.35rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand b { color: var(--keep); font-weight: 900; }
.brand img { border-radius: 8px; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 4px; }
.masthead nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; padding: 10px 12px; border-radius: 999px;
}
.masthead nav a:hover { color: var(--ink); }
.masthead nav a[aria-current="page"] { color: var(--vault); background: var(--paper); }

main { max-width: 1040px; margin: 0 auto; padding: 0 16px 24px; }

.hero { padding: 36px 0 18px; animation: rise .6s ease both; }
.kicker {
  margin: 0; color: var(--seal); font-weight: 600; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}
h1, h2 { font-family: var(--display); letter-spacing: -.015em; line-height: 1.1; }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 900; margin: 10px 0 12px; max-width: 18ch; }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.7rem); font-weight: 700; margin: 0 0 12px; }
.lede { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.15rem); max-width: 60ch; margin: 0; }

.panel {
  background: rgba(18, 29, 24, .86); border: 1px solid var(--edge); border-radius: 18px;
  padding: 22px 18px; margin: 16px 0; animation: rise .6s ease both;
}
.panel:nth-of-type(2) { animation-delay: .06s; }
.panel:nth-of-type(3) { animation-delay: .12s; }
.panel:nth-of-type(4) { animation-delay: .18s; }
.panel--warn { border-color: var(--warn); }
.panel--warn h2 { color: var(--warn); }
.prose p, .prose li { max-width: 68ch; }
.aside { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }
.warn { color: var(--warn); }

/* The form */
.lookup, .filters { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 6px; }
.field small { font-weight: 400; }
input, select, button { font: inherit; }
input[name="serial"] {
  font: 600 clamp(1.25rem, 5vw, 1.7rem)/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper-ink); background: var(--paper); border: 2px solid transparent; border-radius: 12px;
  padding: 14px 16px; width: 100%;
}
input[name="serial"]::placeholder { color: #a39b88; }
input[name="serial"]:focus { border-color: var(--keep); outline: none; }
select {
  color: var(--ink); background: var(--vault); border: 1px solid var(--edge); border-radius: 10px;
  padding: 12px; min-height: 48px; width: 100%;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; min-width: 56px; min-height: 44px; padding: 10px 14px; text-align: center;
  border: 1px solid var(--edge); border-radius: 10px; font: 600 1rem/1.4 var(--mono); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip span:hover { border-color: var(--seal); }
.chip input:checked + span { background: var(--seal); border-color: var(--seal); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--keep); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--seal); }
button {
  justify-self: start; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--keep); color: #2a1f05; font-weight: 600; transition: transform .15s;
}
button:hover { transform: translateY(-1px); }
@media (min-width: 720px) {
  .lookup { grid-template-columns: 1fr 1fr; }
  .field--serial, .lookup button { grid-column: 1 / -1; }
  .filters { grid-template-columns: repeat(3, 1fr); align-items: end; }
  .filters .check, .filters button { grid-column: 1 / -1; }
}

/* The verdict */
.verdict { border-width: 2px; }
.verdict--keep { border-color: var(--keep); box-shadow: 0 0 0 6px rgba(233, 178, 60, .08); }
.verdict--notable { border-color: var(--seal); }
.serial-big {
  margin: 0; font-size: clamp(1.6rem, 8vw, 2.8rem); font-weight: 600; letter-spacing: .06em; color: var(--paper);
  overflow-wrap: anywhere;
}
.serial-big .star { color: var(--keep); }
.verdict-word { font: 700 clamp(1.2rem, 4vw, 1.5rem)/1.2 var(--display); margin: 6px 0 16px; }
.verdict--keep .verdict-word { color: var(--keep); }
.verdict--notable .verdict-word { color: #6fc59d; }
.verdict--ordinary .verdict-word { color: var(--muted); }

.facts { display: grid; grid-template-columns: 1fr; gap: 2px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: .84rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 10px; }
.facts dd { margin: 0; }
@media (min-width: 640px) {
  .facts { grid-template-columns: 11rem 1fr; }
  .facts dt { margin-top: 0; padding: 8px 0; border-top: 1px solid var(--edge); }
  .facts dd { padding: 8px 0; border-top: 1px solid var(--edge); }
}
.series-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.series-picks a {
  font-family: var(--mono); padding: 8px 10px; border: 1px solid var(--edge); border-radius: 8px; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center;
}
.ranges { margin: 0; padding: 0; list-style: none; }
.run-words { font-size: 1.08rem; margin: 0 0 12px; }

.patterns { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pattern {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--edge); background: var(--vault);
}
.pattern--exceptional, .pattern--strong { border-color: rgba(233, 178, 60, .55); }
.pattern--exceptional b, .pattern--strong b { color: var(--keep); }
.pattern .odds { color: var(--muted); font-size: .9rem; }

.examples { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.examples a { font-size: 1.1rem; letter-spacing: .05em; margin-right: 10px; }
.examples span { color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.num { text-align: right; white-space: nowrap; }
td.small { font-size: .84rem; }
.band { white-space: nowrap; }
.band--very_rare, .band--rare { color: var(--keep); font-weight: 600; }
.band--scarce { color: #6fc59d; }
.band--common { color: var(--muted); }
.pattern-table tr.pattern--exceptional td:first-child b,
.pattern-table tr.pattern--strong td:first-child b { color: var(--keep); }
.coverage td a { text-decoration: none; }

.colophon {
  max-width: 1040px; margin: 0 auto; padding: 18px 16px 40px; color: var(--muted); font-size: .84rem;
  border-top: 1px solid var(--edge);
}
.colophon a { color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
