/* Ported from prototype/index.html (TECH_DESIGN.md "Visual system"). Hips site: the
   "Shootout" cover, a rust sky band over sand ground, sage soft-serif lettering.
   One readable column (max 760px). Each site overrides the tokens below. */
:root {
  --bg: #E4D8B0;          /* sand ground */
  --card: #F3ECD3;
  --paper: #F8F2DE;
  --ink: #231D18;         /* gunslinger charcoal */
  --muted: #5F5442;
  --line: #C9BB8F;
  --primary: #355C42;     /* deep sage: links, buttons */
  --primary-ink: #F8F2DE;
  --highlight: #973F2B;   /* rust: segues, notes */
  --highlight-bg: #EED5C4;
  --band: #93412D;        /* rust sky */
  --band-ink: #F6EEDA;
  --brand: #9BC3A2;       /* sage lettering */
  --ground: #CDBF8E;
  --tape: rgba(147, 65, 45, .28);  /* setlist sheet */
  --display: "Caprasimo", "Cooper Black", "Bookman Old Style", Georgia, serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Verdana, sans-serif;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-soft: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .13 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --tap: 56px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1D1915; --card: #27211C; --paper: #2B241E; --ink: #EEE4C6; --muted: #B4A583; --line: #40362B;
    --primary: #9EC6A6; --primary-ink: #1D1915; --highlight: #E08466; --highlight-bg: #43251B;
    --band: #7A3424; --ground: #3A3127; --tape: rgba(224, 132, 102, .25);
  }
}

* { box-sizing: border-box; }
body {
  background: var(--grain-soft), var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 18px; line-height: 1.5;
  margin: 0; padding-block: 0 48px;
}
.wrap, header.band .inner {
  max-width: 760px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header: the rust sky */
header.band { position: sticky; top: 0; z-index: 5; background: var(--grain), var(--band); color: var(--band-ink); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
header.band .inner { padding-block: 10px 8px; }
.brand { text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; min-height: 48px; justify-content: center; color: var(--brand); }
.brand b { font-family: var(--display); font-weight: 400; font-size: 1.55rem; line-height: 1; }
.brand .rule { display: block; width: 100%; height: 2px; background: var(--band-ink); margin: 4px 0 2px; }
.brand span:last-child { font-family: var(--display); font-size: .95rem; line-height: 1; }
nav.main { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 8px; }
nav.main a { display: flex; align-items: center; justify-content: center; min-height: var(--tap); border-radius: var(--radius); text-decoration: none; color: var(--band-ink); font-weight: 700; font-size: 1rem; }
nav.main a[aria-current] { background: var(--band-ink); color: var(--band); }

main { display: flex; flex-direction: column; gap: 28px; margin-top: 22px; }
section { display: flex; flex-direction: column; gap: 12px; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0; }

/* Home poster: the album cover's composition, without its artwork */
.poster { border-radius: 18px; overflow: hidden; gap: 0; box-shadow: 0 14px 30px -22px rgba(0,0,0,.6); }
.poster .sky { background: var(--grain), var(--band); color: var(--band-ink); padding: 28px 22px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.poster h1 { color: var(--brand); font-size: clamp(2.8rem, 14vw, 4.6rem); line-height: .95; }
.poster .rule { width: min(260px, 70%); height: 3px; background: var(--band-ink); border: 0; margin: 4px 0; }
.poster .tag { margin: 8px 0 0; max-width: 34ch; font-size: 1.02rem; }

/* Lists: one row family for shows, songs, venues */
.rows { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px; min-height: var(--tap); padding: 10px 14px; text-decoration: none; color: var(--ink); }
a.row:hover { background: var(--paper); }
.row .when { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.4em; line-height: 1.25; }
.row .what { min-width: 0; }
/* Timeline: one tight line per show (date · act · venue · city, state), oldest first */
.row.tight { grid-template-columns: auto 1fr; padding-block: 8px; }
.row.tight .when { min-width: 3.9em; }
.row.tight .what { line-height: 1.4; overflow-wrap: anywhere; }
.row.tight .act { font-weight: 700; }
.row.tight .sep { color: var(--muted); }
/* Name + detail rows (who played, the rest of the bill) and label + value rows */
.row.two { grid-template-columns: 1fr auto; }
.row .what b { display: block; overflow-wrap: anywhere; }
.row .what small { display: block; color: var(--muted); font-size: inherit; }
.row.kv { grid-template-columns: 5em 1fr auto; }
.row.kv .k { color: var(--muted); }
.row.kv .v { font-weight: 700; overflow-wrap: anywhere; }
.row .go { color: var(--muted); font-size: 1.3rem; }
/* A second act on the same night: no rule above, no date */
.rows li.same-night { border-top: 0; }
.rows li.same-night .row { padding-top: 0; }

/* One pill component */
.pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); line-height: 1.4; vertical-align: 1px; }


/* Show page: the setlist on a taped-up sheet of paper */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 30px 20px 22px; box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(0,0,0,.4); }
.sheet::before { content: ""; position: absolute; top: -10px; left: 50%; width: 110px; height: 24px; transform: translateX(-50%) rotate(-2deg); background: var(--tape); }
.sheet .setname { font-size: 1.3rem; color: var(--highlight); margin: 18px 0 6px; }
.sheet .setname:first-child { margin-top: 0; }
.sheet ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.sheet ol li { counter-increment: s; display: grid; grid-template-columns: 2em 1fr; gap: 0 6px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-weight: 700; font-size: 1.12rem; }
.sheet ol li::before { content: counter(s); color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; text-align: right; padding-top: 2px; }
.sheet .seg { color: var(--highlight); margin-left: 4px; }
.sheet .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; grid-column: 2; }
.sheet .note { grid-column: 2; color: var(--muted); font-size: .92rem; font-weight: 400; }
.flush { margin: 0; }
.notes p { margin: 0 0 .8em; }
.notes p:last-child { margin-bottom: 0; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos figure { margin: 0; }
.photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.photos figcaption { margin-top: 4px; }

/* Band filter chips (links: the filter is part of the address) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font-size: .95rem; font-weight: 700; display: inline-flex; align-items: center; text-decoration: none; }
.chip[aria-current] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }

.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.years a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: var(--tap); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; line-height: 1.15; padding: 6px 0; }
.years a small { font-weight: 400; font-size: .75rem; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); padding: 8px 14px; border-radius: var(--radius); background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.btn small { color: var(--muted); font-weight: 400; font-size: .85rem; }
.btn.next { text-align: right; grid-column: 2; }
/* The rest of the bands, folded away under one tap */
.more-bands summary { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 2px dashed var(--line); font-size: .95rem; font-weight: 700; cursor: pointer; list-style: none; }
.more-bands summary::-webkit-details-marker { display: none; }
.more-bands summary::after { content: "▾"; color: var(--muted); }
.more-bands[open] summary::after { content: "▴"; }
.more-bands .chips { margin-top: 8px; }
