/* Nursery Resources — the site's own stylesheet.
 *
 * The look is Direction A, the Guild Hall, from docs/design-options.html: warm
 * ink-on-paper, the guild register in the heading and the rank pips, and the
 * flat, one-block-per-result density borrowed from Direction C. Usability won
 * the argument over theme, so the theme is confined to the parts nobody scans
 * while looking for a counting activity.
 *
 * Three constraints shaped this rather than decoration (SPEC.md 9, and the
 * brief): text-first, so there are no image assets to load or license; usable
 * on an old tablet in a room, so body text stays at 16px, every colour pair
 * below clears 4.5:1, and every interactive thing is reachable and visible from
 * the keyboard; and it must still read at a phone width.
 */

:root {
  --ink: #2b2118;
  --muted: #5c4a38;
  --line: #d9c9ae;
  --bg: #faf4e8;
  --card: #fffdf8;
  --accent: #6b3f10;
  --accent-ink: #fffdf8;
  --warn: #6a4413;
  --warnbg: #f7e3c8;
  --chip: #efe3cd;
  --chip-ink: #4a3a26;
  --focus: #a8361c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

header, main, footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  padding-top: 26px;
  padding-bottom: 14px;
  border-bottom: 4px double var(--line);
}
h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: -0.01em;
  font-family: Georgia, "Iowan Old Style", serif; }
h1 a { color: inherit; text-decoration: none; }
h1 a:hover { text-decoration: underline; }
.sub { color: var(--muted); font-size: 15px; margin: 0; max-width: 62ch; }

main { padding-top: 18px; padding-bottom: 40px; }
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding-top: 16px;
  padding-bottom: 44px;
}
footer p { max-width: 70ch; }

/* ---------------------------------------------------------------- search --- */

.search { margin: 0; }
.query { margin-bottom: 16px; }
.query label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 5px;
}
.query input[type="search"] {
  width: 100%;
  max-width: 460px;
  padding: 11px 13px;
  font-size: 16px;
  border: 2px solid #b89a6f;
  border-radius: 4px;
  background: var(--card);
  color: inherit;
}
.query button {
  margin-top: 8px;
  padding: 10px 16px;
  font-size: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .rail { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
}

/* ------------------------------------------------------------------ rail --- */

.rail fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 14px;
  padding: 10px 0 0;
}
.rail legend {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 0;
}
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { margin: 0 0 2px; }
.rail label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.rail label:hover { background: #f3ebdb; }
.rail input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}
.rail .tally {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.rail-note { font-size: 13.5px; color: var(--muted); margin: 4px 0 0; }

/* --------------------------------------------------------------- results --- */

.count { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.active { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
/* The guild register's one line of framing. Italic, and deliberately small:
   it is atmosphere for a reader who has already found the thing. */
.quest {
  font: italic 14.5px/1.5 Georgia, "Iowan Old Style", serif;
  color: #6a5535;
  margin: 0 0 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid #b89a6f;
  border-radius: 3px;
  padding: 15px 17px;
  margin: 0 0 14px;
}
.card h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.3;
  font-family: Georgia, "Iowan Old Style", serif; }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.teaser { margin: 0 0 10px; font-size: 15px; color: #33302b; }

/* The rank pip. aria-hidden in the markup, because the badge beside it says the
   same thing in words — a bare dot ladder would be read as a quality score. */
.pips {
  color: #8a5a1a;
  font-size: 12px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.kind {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--chip);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: 3px;
  white-space: nowrap;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 8px;
  padding: 0;
}
.chip {
  font-size: 12.5px;
  background: var(--chip);
  color: var(--chip-ink);
  border-radius: 11px;
  padding: 2px 9px;
}
.chip.eyfs { background: #dfe6d2; color: #33431f; }

.meta { font-size: 14px; color: var(--muted); margin: 0; }
.bucket { margin-left: 4px; }
.attrib { font-size: 13.5px; color: var(--muted); font-style: italic; margin: 8px 0 0; }
.links { font-size: 14px; margin: 10px 0 0; }
/* SPEC 10: reporting is a back channel, not a headline action. */
.links .report { color: var(--muted); text-decoration-style: dotted; }
.links .report:hover, .links .report:focus { color: var(--ink); }
.note { font-size: 13.5px; color: var(--muted); margin: 8px 0 0; }
.provenance { word-break: break-all; }

.flag {
  display: inline-block;
  font-size: 13px;
  padding: 2px 9px;
  border-radius: 5px;
  background: var(--warnbg);
  color: var(--warn);
  border: 1px solid #e8d3a8;
  margin: 8px 8px 0 0;
}
.flag.review { background: #e4e0d2; color: #4d4636; border-color: #cdc7b2; }
.flag.dead { display: block; background: #f6d6cf; color: #7a2c17; border-color: #e6bcb2; }

.back { font-size: 15px; margin: 0 0 6px; }

.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 3px;
  padding: 16px 18px;
}
.empty h2 { margin: 0 0 8px; font-size: 18px; }
.empty p { margin: 0 0 8px; }
.empty ul { margin: 0 0 8px; padding-left: 20px; }

dl.spec {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 7px 16px;
  margin: 0;
}
@media (max-width: 480px) {
  dl.spec { grid-template-columns: 1fr; gap: 2px 0; }
  dl.spec dd { margin: 0 0 8px; }
}
dl.spec dt { color: var(--muted); font-size: 14px; }
dl.spec dd { margin: 0; font-size: 15px; }

[hidden] { display: none !important; }
