/* Name by Decade — a shelf of bound decades, catalog-card results. */
[hidden] { display: none !important; }
:root {
  --ink: #241910;
  --paper: #f3efe4;
  --spine: #3e1e28;
  --gold: #8a5a12;
  --muted: #564c40;
  --card: #fffaf2;
  --rule: rgba(36, 25, 16, 0.16);
  --focus: #8a5a12;
  --banner: #ebe3d0;
  --boy: #1e3a4c;
  --error: #8b1d1d;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", Palatino, "Times New Roman", serif;
  line-height: 1.55;
}
.skip {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  background: var(--spine);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 20;
}
.skip:focus { top: 0.75rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }

.hero {
  background: var(--spine);
  color: #f3efe4;
  padding: 1.15rem 1.25rem 1.35rem;
}
.hero-inner, .wrap, footer {
  width: min(48rem, calc(100% - 2rem));
  margin-inline: auto;
}
.spines {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 1rem;
  height: 3.1rem;
  align-items: stretch;
}
.spine {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.25rem 0.3rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #f3efe4;
  border-radius: 2px 2px 0 0;
  min-width: 2.4rem;
}
.spine.s1 { background: #5a3340; flex: 1; }
.spine.s2 { background: #6a3d2a; flex: 1.1; }
.spine.s3 { background: #8a5a12; color: #f3efe4; flex: 0.9; }
.spine.s4 { background: #2c3a44; flex: 1.15; }
.spine.s5 { background: #f3efe4; color: #3e1e28; flex: 1.6; font-size: 0.58rem; }

.wordmark {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  line-height: 1.05;
}
.tagline {
  margin: 0.4rem 0 0;
  font-style: italic;
  font-size: 1.15rem;
  color: #e8d3a0;
}
.wrap { padding: 1rem 0 2.5rem; }

.disclaimer, .estimate-banner {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  background: var(--banner);
  border-left: 4px solid var(--gold);
  padding: 0.8rem 1rem;
  margin: 0.7rem 0 0;
}
.estimate-banner { margin: 0 0 1rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 1rem 1.05rem 1.1rem;
  margin: 0 0 0.9rem;
  box-shadow: 0 1px 0 rgba(36, 25, 16, 0.04);
}
.field { display: grid; gap: 0.3rem; margin: 0 0 0.75rem; }
.field label, .field legend, h2, h3, caption, summary {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
}
.field label, .field legend { font-size: 0.9rem; }
.sex-field { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.sex-field legend { padding: 0; margin: 0 0 0.35rem; }
.radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
}
.radios label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  min-height: 44px;
}
.radios input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  accent-color: var(--spine);
}

.hint, .meta, .note, .status, .subhead, .samples-label {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
}
.subhead { font-size: 1rem; margin: 0 0 1rem; color: var(--ink); }
.error {
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: var(--error);
  background: #f8ecea;
  border-left: 4px solid var(--error);
  padding: 0.8rem 1rem;
  margin: 0 0 1.1rem;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 0.55rem 0.75rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}
.chip {
  min-height: 44px;
  padding: 0.3rem 0.75rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.chip:hover { background: var(--banner); }
.samples-label { margin: 0 0 0.45rem; }

.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
  min-height: 48px;
  padding: 0.5rem 1rem;
  background: var(--spine);
  color: #fff;
  border: 2px solid var(--spine);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
  cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn:hover { filter: brightness(1.08); }

.headline {
  margin: 0 0 0.6rem;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  line-height: 1.3;
}

.chart-wrap {
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 0.6rem 0.4rem 0.3rem;
  margin: 0 0 0.6rem;
  overflow: auto;
}
#chart { display: block; max-width: 100%; height: auto; }

.decade-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.2rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  background: var(--card);
}
.decade-table caption {
  text-align: left;
  padding: 0 0 0.45rem;
  color: var(--ink);
}
.decade-table th, .decade-table td {
  border-bottom: 1px solid var(--rule);
  padding: 0.45rem 0.5rem;
  text-align: left;
  font-weight: 500;
}
.decade-table thead th {
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}
.decade-table .num, .decade-table th.num, .decade-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.decade-table tbody th { font-weight: 600; }

.method {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  margin: 0.6rem 0 1.1rem;
}
.method summary { cursor: pointer; }
.method p { margin: 0.6rem 0 0; }

.card-preview {
  margin: 1rem 0;
  border: 1px solid var(--rule);
  background: var(--spine);
  padding: 0.4rem;
}
.card-preview img {
  display: block;
  width: 100%;
  height: auto;
}
.status { margin: 0.6rem 0 0; min-height: 1.2em; }

footer {
  padding: 0 0 2.5rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
}
footer p { margin: 0 0 0.75rem; }
footer a { color: var(--ink); }
footer strong { color: var(--ink); }

.wordmark a, .hero a { color: inherit; text-decoration: none; }
.page-privacy a { color: inherit; }

@media (max-width: 480px) {
  .spine.s1, .spine.s2 { display: none; }
}
