/* AnCo Live Archive */
:root {
  --bg: #f6f5f8;
  --surface: #ffffff;
  --surface-2: #eeecf2;
  --text: #1c1a21;
  --muted: #655f6e;
  --line: #e0dde6;
  --accent: #6a3ea1;        /* purple */
  --accent-ink: #ffffff;
  --accent-soft: #efe8f8;
  --green: #1f5c40;         /* dark green */
  --green-ink: #ffffff;
  --green-soft: #e2efe7;
  --ok: #1f5c40;
  --warn: #9a6a00;
  --bad: #b3261e;
  --add: #e2efe7;
  --del: #f9e3e1;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(30,20,50,.05), 0 4px 16px rgba(30,20,50,.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121015; --surface: #1b1820; --surface-2: #25212b; --text: #ece9f1; --muted: #a59eb0; --line: #353040;
    --accent: #b794f0; --accent-ink: #160c24; --accent-soft: #2d2140;
    --green: #5fbf8a; --green-ink: #0b1f14; --green-soft: #173023;
    --ok: #5fbf8a; --warn: #f2c94c; --bad: #ff8a80; --add: #173023; --del: #4a2222; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.mt { margin-top: 1.25rem; }
.inline { display: inline; }
.hp { position: absolute; left: -9999px; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.top-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.logo { color: var(--accent); flex: none; }
.logo path { fill: var(--green); }
.topsearch { flex: 1 1 200px; max-width: 340px; }
.topsearch input { width: 100%; }
.mainnav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-left: auto; font-size: .95rem; }
.mainnav a { color: var(--text); text-decoration: none; }
.mainnav a[aria-current] { color: var(--accent); font-weight: 600; }
.mainnav a.btn { color: var(--accent-ink); }
.who { color: var(--muted); }
main { padding-top: 24px; padding-bottom: 40px; min-height: 60vh; }
.foot { color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 32px; }

/* controls */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .65rem; min-width: 0; width: 100%;
}
textarea { font-family: var(--mono); font-size: .9rem; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  display: inline-flex; align-items: center; gap: .35em; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  padding: .5rem .95rem; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { padding: .28rem .7rem; font-size: .85rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.pill { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 .45em; font-size: .75rem; font-weight: 700; }
.badge { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; white-space: nowrap; }
.badge.vid { background: var(--green-soft); color: var(--green); }
.badge.arch { background: var(--surface-2); color: var(--text); }
.badge.bad { background: var(--del); color: var(--bad); }
.badge.warn { background: var(--surface-2); color: var(--warn); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.flash { padding: .7rem 1rem; border-radius: 8px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--surface); }
.flash.ok { border-color: var(--ok); }
.flash.err { border-color: var(--bad); color: var(--bad); }
.flash.info { border-color: var(--line); background: var(--surface-2); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }

/* forms */
.form .field, .filters .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.form label, .filters label, .mapcontrols label { font-size: .85rem; font-weight: 600; }
.field small { color: var(--muted); font-size: .8rem; }
.row2, .row3 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500 !important; margin: 4px 0 12px; }
.check input { width: auto; }
.formactions { display: flex; gap: 10px; margin-top: 8px; }
.recrow { display: grid; grid-template-columns: 110px minmax(0, 2.2fr) minmax(0, 1.3fr) 120px 28px; gap: 8px; margin-bottom: 8px; align-items: center; }
.recrow .rm { text-decoration: none; color: var(--muted); font-size: 1.1rem; }
.editmap { height: 240px; border-radius: 8px; margin: 4px 0 6px; border: 1px solid var(--line); }
.geo .btn { width: 100%; justify-content: center; }

/* home */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; margin-bottom: 24px; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stats dt { font-size: .8rem; color: var(--muted); }
.stats dd { color: var(--green); margin: 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.yearbars { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 18px; }
.yearbars a { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; text-decoration: none; min-width: 0; }
.yearbars .bar { width: 100%; max-width: 34px; background: var(--green); border-radius: 4px 4px 0 0; position: relative; opacity: .85; }
.yearbars a:hover .bar { opacity: 1; background: var(--accent); }
.yearbars .n { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: .7rem; color: var(--muted); }
.yearbars .y { font-size: .7rem; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.artistlist { columns: 2; padding-left: 1.1rem; margin: 0; }
.artistlist li { margin-bottom: .3rem; break-inside: avoid; }
.help ol { margin: 0; padding-left: 1.2rem; }

/* show list */
.count { font-size: 1rem; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { margin: 0; flex: 1 1 150px; }
.filters .grow { flex: 2 1 240px; }
.filters .actions { flex-direction: row; flex: 0 0 auto; }
.maplink { margin: -6px 0 6px; }
.yearhead { margin-top: 28px; font-size: 1.4rem; }
.showtable { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; padding: 0; }
.showtable th, .showtable td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.showtable th { font-size: .8rem; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.showtable tr:last-child td { border-bottom: 0; }
.showtable tbody tr:hover { background: var(--surface-2); }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.songhit { color: var(--green); }

/* show page */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.prevnext { margin-left: auto; display: flex; gap: 14px; }
.showhead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; flex-wrap: wrap; }
.eyebrow { color: var(--green); font-weight: 600; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.place { margin: 0; font-size: 1.1rem; }
.place a { color: var(--text); }
.billing { color: var(--muted); margin: 4px 0 0; }
.showactions { display: flex; gap: 8px; }
.showgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.stage { background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 16px; aspect-ratio: 16 / 9; position: relative; }
.stage.ia-audio { aspect-ratio: auto; height: 420px; background: var(--surface-2); }
.stage.sc { aspect-ratio: auto; height: 166px; }
.stage.bc { aspect-ratio: auto; height: 470px; background: #fff; }
.stage iframe { border: 0; width: 100%; height: 100%; display: block; }
.stage.empty { aspect-ratio: auto; background: var(--surface-2); display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.facade { all: unset; cursor: pointer; position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #2b1d40, #0f2a1e); }
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.playicon { position: relative; width: 74px; height: 74px; border-radius: 50%; background: #6a3ea1; box-shadow: 0 0 0 6px rgba(31,92,64,.55); color: #fff; display: grid; place-items: center; font-size: 28px; padding-left: 5px; box-shadow: 0 6px 30px rgba(0,0,0,.4); }
.facade:hover .playicon, .facade:focus-visible .playicon { transform: scale(1.06); }
.facade-label { position: absolute; bottom: 14px; left: 16px; right: 16px; color: #fff; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.reclist { list-style: none; padding: 0; margin: 0; }
.rec { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: .55rem .4rem; border-bottom: 1px solid var(--line); border-radius: 6px; }
.rec.active { background: var(--green-soft); }
.rec.dead .recmeta strong { text-decoration: line-through; color: var(--muted); }
.kind { font-size: .78rem; font-weight: 700; color: var(--muted); }
.kind.k-video { color: var(--green); }
.recmeta { min-width: 0; overflow-wrap: anywhere; }
.recbtns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.setlist { margin: 0; padding-left: 1.8rem; columns: 2; column-gap: 32px; }
.setlist li { break-inside: avoid; padding: 2px 0; }
.setlist li a { color: var(--text); text-decoration: none; }
.setlist li a:hover { color: var(--accent); text-decoration: underline; }
.setlist .meta { color: var(--muted); font-style: italic; }
.segue { color: var(--green); font-weight: 700; }
.notes { overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; }
.minimap { height: 200px; border-radius: 8px; margin-bottom: 8px; }

/* history/admin */
.rev summary { cursor: pointer; }
.rev[open] summary { margin-bottom: 12px; }
.difftable { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 10px; }
.difftable th { text-align: left; width: 130px; color: var(--muted); vertical-align: top; padding: 6px 8px 6px 0; font-weight: 600; }
.difftable td { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.diff { font-family: var(--mono); font-size: .82rem; }
.d-add { background: var(--add); }
.d-del { background: var(--del); text-decoration: line-through; }
.d-same { color: var(--muted); }
ins { background: var(--add); text-decoration: none; }
del { background: var(--del); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: .5rem .8rem; text-decoration: none; color: var(--text); border-bottom: 2px solid transparent; }
.tabs a[aria-current] { border-color: var(--green); color: var(--accent); font-weight: 600; }
.subhead { margin-bottom: 10px; }
.summary { margin: 6px 0 0; font-style: italic; }
.subactions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rejectform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rejectform input { width: 200px; }
.pager { display: flex; gap: 16px; }

/* tour map */
.maphead h1 { margin-bottom: 12px; }
.mapcontrols { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; padding: 12px 16px; }
.mapcontrols .field { display: flex; flex-direction: column; gap: 4px; }
.mapcontrols select { width: auto; min-width: 150px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: .9rem; background: var(--surface); color: var(--text); border: 0; border-right: 1px solid var(--line); padding: .45rem .8rem; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); }
.mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.tourmap { height: 640px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.maplist { height: 640px; overflow: auto; margin: 0; padding: 14px; }
.maplistol { padding-left: 1.6rem; margin: 0; font-size: .9rem; }
.maplistol li { padding: 4px 4px; border-radius: 6px; }
.maplistol li.active { background: var(--green-soft); }
.popuplist { padding-left: 1rem; margin: 6px 0 0; max-height: 220px; overflow: auto; }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); }

@media (max-width: 900px) {
  .hero, .grid2, .showgrid, .mapwrap { grid-template-columns: 1fr; }
  .tourmap { height: 60vh; }
  .maplist { height: 360px; }
  .setlist { columns: 1; }
}
@media (max-width: 640px) {
  .row2, .row3 { grid-template-columns: 1fr; gap: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .mainnav { gap: 10px; font-size: .9rem; }
  .topsearch { max-width: none; order: 3; flex-basis: 100%; }
  .recrow { grid-template-columns: 1fr 1fr 28px; }
  .recrow input[name="rec_url[]"] { grid-column: 1 / -1; grid-row: 1; }
  .rec { grid-template-columns: 1fr; gap: 4px; }
  .recbtns { justify-content: flex-start; }
  .showtable thead { display: none; }
  .showtable, .showtable tbody, .showtable tr, .showtable td { display: block; width: 100%; }
  .showtable tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .showtable td { border: 0; padding: 2px 12px; }
  .yearbars .n { display: none; }
  .artistlist { columns: 1; }
}

/* roles */
.rolechip { display: inline-block; font-size: .72rem; font-weight: 700; padding: .08rem .5rem; border-radius: 999px; white-space: nowrap; vertical-align: middle;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.rolechip.r-contributor { background: var(--green-soft); color: var(--green); border-color: transparent; }
.rolechip.r-moderator { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.rolechip.r-supermod { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.rolechip.r-admin { background: var(--green); color: var(--green-ink); border-color: transparent; }
.rolechip.r-banned { color: var(--bad); }
.who { text-decoration: none; color: var(--text) !important; display: inline-flex; gap: 6px; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chips a { font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--surface); }
.chips a[aria-current] { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.rolehelp ul { margin: 0 0 8px; padding-left: 1.1rem; }
.rolehelp li { margin-bottom: 4px; }
.bulk { margin-bottom: 12px; }
@media (max-width: 640px) { .who .rolechip { display: none; } }

/* not-for-profit banner + support */
.nfp { background: var(--green); color: var(--green-ink); font-size: .88rem; }
.nfp-inner { display: flex; gap: 6px 18px; align-items: center; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.nfp p { margin: 0; flex: 1 1 380px; }
.nfp-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.nfp-links a { color: var(--green-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; white-space: nowrap; }
.nfp-links a.more { opacity: .85; }
.badge.official { background: var(--accent); color: var(--accent-ink); text-decoration: none; margin-left: 4px; }
.supportcard { border-color: var(--accent); }
.supportcard .bcmini { border: 0; width: 100%; height: 120px; border-radius: 6px; background: #fff; }
.supportlinks { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.supportgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.supportgrid iframe { border: 0; width: 100%; height: 470px; border-radius: 8px; background: #fff; }
.biglinks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 640px) { .nfp p { flex-basis: 100%; } }

.sideprojects { list-style: none; padding-left: .9rem; margin: .2rem 0 .1rem; font-size: .9rem; }
.sideprojects li::before { content: '↳ '; color: var(--muted); }
.artistlist > li { break-inside: avoid; }

/* albums & lyrics */
.small-lede { font-size: 1rem; max-width: 75ch; }
.discgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; align-items: start; }
.disc h2 { font-size: 1.1rem; margin-bottom: 8px; }
.disc .eyebrow { margin-bottom: 2px; }
.discbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.bcslot iframe { border: 0; width: 100%; height: 470px; border-radius: 8px; background: #fff; margin-bottom: 10px; }
.tracks { margin: 0; padding-left: 1.5rem; font-size: .92rem; }
.tracks li { padding: 2px 0; }
.tracks.plainlist { list-style: none; padding-left: 0; }
.tracks .lyr { color: var(--text); text-decoration: none; }
.tracks .lyr:hover { color: var(--accent); text-decoration: underline; }
.livecount { font-size: .72rem; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 0 .45rem; margin-left: 4px; text-decoration: none; white-space: nowrap; }
.lyrlink { font-size: .7rem; color: var(--muted) !important; text-decoration: none !important; border: 1px solid var(--line); border-radius: 999px; padding: 0 .35rem; margin-left: 3px; vertical-align: 1px; }
.lyrlink:hover { color: var(--accent) !important; border-color: var(--accent); }
.songtable th a { color: inherit; text-decoration: none; }
.songtable th a[aria-current] { color: var(--accent); text-decoration: underline; }

/* map tiles: soften OSM colours to sit with the palette; invert for dark mode */
.tinted .leaflet-tile-pane { filter: saturate(.55) contrast(.95); }
@media (prefers-color-scheme: dark) {
  .tinted .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(.4) brightness(.85) contrast(.9); }
}

/* banner collapse */
.nfp-inner { position: relative; padding-right: 72px; }
.nfp-full { display: flex; gap: 6px 18px; align-items: center; flex-wrap: wrap; flex: 1; }
.nfp-short { display: none; margin: 0; }
.nfp-short a { color: var(--green-ink); font-weight: 600; }
.nfp-toggle { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: transparent; border: 1px solid rgba(255,255,255,.45);
  color: var(--green-ink); border-radius: 999px; font: inherit; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; cursor: pointer; }
.nfp-toggle:hover { background: rgba(255,255,255,.12); }
.nfp-toggle .when-min { display: none; }
.nfp-min .nfp-full { display: none; }
.nfp-min .nfp-short { display: block; }
.nfp-min .nfp-inner { padding-top: 4px; padding-bottom: 4px; }
.nfp-min .nfp-toggle .when-open { display: none; }
.nfp-min .nfp-toggle .when-min { display: inline; }
@media (prefers-color-scheme: dark) { .nfp-toggle { border-color: rgba(0,0,0,.35); } .nfp-toggle:hover { background: rgba(0,0,0,.1); } }
@media (max-width: 640px) { .nfp-toggle { top: 10px; transform: none; } .nfp-min .nfp-toggle { top: 50%; transform: translateY(-50%); } }
