@import url("/static/tokens.css");

/* What's Good Napa. Direction A, "After Dark".
   tokens.css is the canonical palette and scale. Nothing here invents a
   colour: every value below is a token, a transparent black shadow, or a
   measurement. Read design/direction-a.md before changing any of it. */

/* ---------------------------------------------------------------- base --- */

:root {
  --pad: 36px;
  --shell: 860px;
}

@media (max-width: 760px) { :root { --pad: 26px; } }
@media (max-width: 520px) { :root { --pad: 18px; } }

html { background: var(--ink-900); }

body {
  background-color: var(--ink-900);
  background-image: radial-gradient(120% 80% at 50% 0%, var(--ink-800) 0%, var(--ink-900) 62%);
  background-repeat: no-repeat;
  background-size: 100% 820px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* short pages should still put the footer on the floor */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: var(--pad);
  top: 10px;
  z-index: 60;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 11px 15px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.site-header,
.site-main,
.site-footer {
  /* width:100% matters: as flex items with auto side margins these would
     otherwise shrink to fit their content and take the page wider than the
     viewport on a phone. */
  width: 100%;
  max-width: var(--shell);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Prose links. Quiet until you go near them. */
.intro-blurb a,
.empty-note a,
.form-blurb a,
.form-note a,
.notice-body a,
.detail-report a,
.detail-paragraph a,
.detail-sources-note a,
.evidence-empty a,
.days-foot a,
.footer-links a,
.subscribe-note a,
.admin-blurb a {
  color: var(--paper-dim);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-400);
}
.intro-blurb a:hover,
.empty-note a:hover,
.form-blurb a:hover,
.form-note a:hover,
.notice-body a:hover,
.detail-report a:hover,
.detail-paragraph a:hover,
.detail-sources-note a:hover,
.evidence-empty a:hover,
.days-foot a:hover,
.footer-links a:hover,
.subscribe-note a:hover,
.admin-blurb a:hover {
  color: var(--amber);
  text-decoration-color: var(--amber);
}

/* -------------------------------------------------------------- header --- */

.site-header {
  padding-top: 22px;
  padding-bottom: 18px;
}
.site-header.is-hero {
  padding-top: 28px;
  padding-bottom: 0;
}

.site-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-areas: "title nav" "session session" "tag tag";
  align-items: baseline;
  column-gap: 24px;
  row-gap: 12px;
}
.site-header.is-hero .site-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  grid-template-areas: "nav session" "title title" "tag tag";
  row-gap: 0;
}

.site-title { grid-area: title; }

.wordmark {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .005em;
  color: var(--paper);
  line-height: .9;
  font-size: 26px;
}
.wordmark-accent { color: var(--amber); }

.site-header.is-hero .wordmark {
  font-size: var(--step-4);
  line-height: .86;
  margin-top: 26px;
}
.site-header.is-hero .wordmark-line { display: block; }

.site-nav { grid-area: nav; }
.site-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
.site-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute-2);
  border-bottom: 1px solid transparent;
}
.site-nav-link:hover { color: var(--paper); }
.site-nav-link.is-current {
  color: var(--paper);
  border-bottom-color: var(--amber);
}

.site-tagline {
  grid-area: tag;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-top: 16px;
}

.session {
  grid-area: session;
  justify-self: end;
  text-align: right;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.session a {
  color: var(--mute-2);
  border-bottom: 1px solid var(--ink-500);
  margin-left: 10px;
}
.session a:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* A long signed-in email has no business squeezing the nav on a phone. Below
   this width the header is one column and the session line sits under the nav,
   out of the way of the wordmark. */
@media (max-width: 700px) {
  .site-head,
  .site-header.is-hero .site-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "session" "title" "tag";
    row-gap: 8px;
  }
  .site-head { grid-template-areas: "title" "nav" "session"; }
  .session { justify-self: start; text-align: left; }
  .session a { margin-left: 0; margin-right: 10px; }
}

/* -------------------------------------------------------------- footer --- */

.site-footer {
  margin-top: 68px;
  padding-top: 22px;
  padding-bottom: 58px;
  border-top: 1px solid var(--ink-600);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.footer-note { max-width: 46ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 34px; }

/* ---------------------------------------------------------------- home --- */

.intro { margin-top: 16px; }
.intro-blurb {
  max-width: var(--measure);
  color: var(--mute);
  font-size: var(--step-0);
  line-height: 1.65;
}
.intro-blurb b { color: var(--paper-dim); font-weight: 500; }

/* filters */

.filters {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--ink-600);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip-item { display: block; }

.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px 11px;
  border: 1px solid var(--ink-500);
  color: var(--mute-2);
  border-radius: var(--radius);
  white-space: nowrap;
}
.chip:hover { color: var(--paper); border-color: var(--ink-400); }
.chip.is-on {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
}
.chip.is-on:hover { color: var(--amber-ink); }

.filters-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.filters-range-label { color: var(--mute-3); }
.range {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--mute-2);
  border-bottom: 1px solid transparent;
}
.range:hover { color: var(--paper); }
.range.is-on { color: var(--paper); border-bottom-color: var(--amber); }

/* days */

.days { margin-top: 4px; }

.day-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 38px 0 4px;
  font-weight: 400;
}
.days > .day:first-child .day-heading { margin-top: 30px; }

.day-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.day-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--amber);
  white-space: nowrap;
}
.day-rule {
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: var(--ink-600);
}

/* one listing row */

.event-list { display: block; }

.event-card {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 0 20px;
  align-items: baseline;
  padding: 15px 12px 15px 10px;
  border-bottom: 1px solid var(--ink-700);
  border-left: 2px solid transparent;
  transition: background-color .12s linear, border-color .12s linear;
}
.event-card:hover,
.event-card:focus-within {
  background: var(--ink-850);
  border-left-color: var(--amber);
}

.event-time {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--amber-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.event-body { min-width: 0; }

.event-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-2);
  line-height: 1.06;
  text-transform: uppercase;
  letter-spacing: .012em;
  color: var(--paper);
  margin-bottom: 3px;
}
.event-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.event-link:focus-visible { outline: none; }
.event-link:focus-visible::after {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

.event-where {
  font-size: var(--step--1);
  color: var(--mute-2);
  line-height: 1.45;
}
.event-venue { color: var(--mute); font-weight: 500; }
.sep { margin: 0 .45em; color: var(--mute-3); }

.event-source {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute-3);
  text-align: right;
  white-space: nowrap;
}
.event-source-label {
  border-bottom: 1px solid var(--ink-400);
  padding-bottom: 1px;
}
.event-card:hover .event-source-label,
.event-card:focus-within .event-source-label {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.days-foot {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-600);
  font-size: var(--step--1);
  color: var(--mute-2);
}

/* empty states */

.empty {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-600);
}
.empty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--paper);
  margin-bottom: 12px;
}
.empty-note {
  max-width: var(--measure);
  font-size: var(--step--1);
  line-height: 1.65;
  color: var(--mute-2);
}
.empty-note + .empty-note { margin-top: 12px; }

.day-empty .day-date { color: var(--mute); }
.day-empty .empty-note {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--ink-600);
}

/* back to today */

.to-today {
  position: fixed;
  bottom: 18px;
  right: max(18px, calc(50% - (var(--shell) / 2) - 60px));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink-800);
  border: 1px solid var(--ink-400);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
}
.to-today:hover { border-color: var(--amber); color: var(--amber); }
.to-today[hidden] { display: none; }

/* -------------------------------------------------------------- detail --- */

.event-detail { padding-top: 6px; }

.detail-back,
.back-link {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute-2);
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--ink-500);
}
.back-link:hover { color: var(--amber); border-bottom-color: var(--amber); }

.detail-head { margin-top: 12px; }

.detail-when {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute-2);
}
.detail-time { color: var(--amber-soft); }
.detail-tag { color: var(--amber); }

.detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8.5vw, 66px);
  line-height: .94;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--paper);
  margin-top: 10px;
  text-wrap: balance;
}
.detail-performer {
  margin-top: 8px;
  font-size: var(--step-1);
  color: var(--mute);
}
.detail-venue-line {
  margin-top: 6px;
  font-size: var(--step-0);
  color: var(--mute-2);
}
.detail-venue-line b { color: var(--paper-dim); font-weight: 500; }

.detail-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-left: 2px solid var(--warn);
  background: var(--ink-800);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warn);
}

.detail-facts { margin-top: 30px; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  column-gap: 24px;
  border-top: 1px solid var(--ink-600);
}
.fact {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--ink-700);
}
.fact-key {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.fact-value { margin-top: 6px; color: var(--mute-2); font-size: var(--step--1); }
.fact-strong {
  display: block;
  font-size: var(--step-1);
  color: var(--paper);
  line-height: 1.25;
}
.fact-line { display: block; margin-top: 4px; }
.fact-line a { border-bottom: 1px solid var(--ink-400); word-break: break-word; }
.fact-line a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.fact-ticket {
  display: inline-block;
  color: var(--paper);
  border-bottom: 1px solid var(--amber);
  font-size: var(--step-1);
}
.fact-ticket:hover { color: var(--amber); }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 24px;
}
.detail-actions-note { font-size: var(--step--1); color: var(--mute-3); }

.detail-subtitle {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute-3);
  font-weight: 400;
}

.detail-about { margin-top: 38px; }
.detail-paragraph {
  max-width: var(--measure);
  margin-top: 12px;
  color: var(--mute);
  line-height: 1.7;
}

.detail-sources { margin-top: 42px; }
.detail-sources-note {
  max-width: var(--measure);
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--mute-2);
  line-height: 1.6;
}

.evidence {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink-600);
}
.evidence-item {
  padding: 15px 0 17px;
  border-bottom: 1px solid var(--ink-700);
}
.evidence-kind {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.evidence-primary { color: var(--mute-2); }
.evidence-name { margin-top: 5px; }
.evidence-link {
  font-size: var(--step-1);
  color: var(--paper);
  border-bottom: 1px solid var(--ink-400);
  word-break: break-word;
}
a.evidence-link:hover { color: var(--amber); border-bottom-color: var(--amber); }
.evidence-link.is-plain { color: var(--mute); border-bottom: 0; }
.evidence-seen {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .04em;
  color: var(--mute-3);
}
.evidence-empty {
  margin-top: 16px;
  max-width: var(--measure);
  font-size: var(--step--1);
  color: var(--mute-2);
}

.detail-report {
  margin-top: 26px;
  font-size: var(--step--1);
  color: var(--mute-2);
}

/* --------------------------------------------------------------- forms --- */

.page-form .site-main { padding-bottom: 20px; }

.form-kicker {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute-3);
  margin-top: 10px;
}
.form-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 7vw, 56px);
  line-height: .96;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--paper);
  margin-top: 10px;
}
.form-blurb {
  max-width: var(--measure);
  margin-top: 14px;
  color: var(--mute);
  line-height: 1.65;
}

.form { max-width: 640px; margin-top: 10px; }

.fieldset { border: 0; padding: 0; margin-top: 30px; }
.fieldset-legend {
  display: block;
  width: 100%;
  padding: 0 0 10px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ink-600);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute-3);
}

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field-label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute-2);
}
.field-required { color: var(--amber); text-decoration: none; border: 0; }

.field-input {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  background: var(--ink-800);
  border: 1px solid var(--ink-500);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--step-0);
}
.field-input::placeholder { color: var(--mute-3); }
.field-input:hover { border-color: var(--ink-400); }
.field-input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 0;
  border-color: var(--amber);
}
.field-input[aria-invalid="true"] { border-color: var(--bad); }

.field-textarea { min-height: 116px; line-height: 1.55; resize: vertical; }

.field-select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238E8477' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.field-select option { background: var(--ink-800); color: var(--paper); }

.field-check {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  margin-bottom: 14px;
}
.field-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--amber);
  flex: 0 0 auto;
}
.field-check .field-label {
  font-family: var(--font-body);
  font-size: var(--step-0);
  letter-spacing: 0;
  text-transform: none;
  color: var(--mute);
  cursor: pointer;
}

.field-hint {
  font-size: var(--step--1);
  color: var(--mute-3);
  line-height: 1.5;
}
.field-error {
  font-size: var(--step--1);
  color: var(--bad);
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: .1em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--ink-400);
  border-radius: var(--radius);
  color: var(--paper);
  cursor: pointer;
}
.button:hover { border-color: var(--amber); color: var(--amber); }
.button-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
}
.button-primary:hover {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--amber-ink);
}

.form-note {
  max-width: var(--measure);
  margin-top: 16px;
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--mute-2);
}
.form-note-ok {
  padding: 12px 15px;
  border-left: 2px solid var(--ok);
  background: var(--ink-800);
  color: var(--paper-dim);
}

.flash {
  margin: 20px 0 0;
  padding: 13px 16px;
  border-left: 2px solid var(--ok);
  background: var(--ink-800);
  font-size: var(--step--1);
  color: var(--paper-dim);
}
.flash-error { border-left-color: var(--bad); }

.form-errors {
  margin: 20px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--bad);
  background: var(--ink-800);
}
.form-errors-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bad);
}
.form-errors-body {
  margin: 6px 0 12px;
  font-size: var(--step--1);
  color: var(--mute);
}
.form-error-field {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.form-errors-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.form-error-link {
  font-size: var(--step--1);
  color: var(--paper-dim);
  border-bottom: 1px solid var(--ink-400);
}
.form-error-link:hover { color: var(--amber); border-bottom-color: var(--amber); }

.subscribe-note {
  max-width: var(--measure);
  margin-top: 20px;
  font-size: var(--step--1);
  color: var(--mute-3);
}

/* ------------------------------------------------------------- notices --- */

.notice { padding: 40px 0 0; max-width: var(--measure); }
.notice-kicker {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .22em;
  color: var(--amber);
}
.notice-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 8vw, 60px);
  line-height: .96;
  text-transform: uppercase;
  color: var(--paper);
  margin-top: 10px;
}
.notice-body { margin-top: 14px; color: var(--mute); }
.notice-actions { margin-top: 24px; }

/* --------------------------------------------------------------- admin --- */

.admin-page { font-size: var(--step--1); }
.admin-page .site-main,
.admin-page .site-header,
.admin-page .site-footer { max-width: 1180px; }
.admin-page .site-header { padding-bottom: 12px; }

.admin-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--ink-600);
}
.admin-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.admin-nav-link:hover { color: var(--paper); }
.admin-nav-link.is-current { color: var(--paper); border-bottom-color: var(--amber); }

.admin-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--paper);
}
.admin-subtitle {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute-3);
  font-weight: 400;
  margin-top: 30px;
}
.admin-blurb {
  max-width: var(--measure);
  margin-top: 10px;
  color: var(--mute-2);
  line-height: 1.6;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--ink-600);
  border: 1px solid var(--ink-600);
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.tile { background: var(--ink-800); }
.tile-link { display: block; padding: 14px 16px 15px; }
.tile-link:hover { background: var(--ink-850); }
.tile-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.tiles-queue .tile[data-waiting="1"] .tile-value { color: var(--amber); }
.tiles-crawl .tile[data-alert="1"] .tile-value { color: var(--bad); }
.tile-label {
  display: block;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-2);
}

.admin-panel { margin-top: 34px; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--ink-600);
}
.tab a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab a:hover { color: var(--paper); }
.tab.is-current a { color: var(--paper); border-bottom-color: var(--amber); }

.table-scroll { overflow-x: auto; margin-top: 12px; }
.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-3);
  font-weight: 400;
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--ink-600);
  white-space: nowrap;
}
.table td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--ink-700);
  vertical-align: top;
  color: var(--mute-2);
}
.table tbody tr:hover { background: var(--ink-850); }
.cell-when {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--amber-soft);
  white-space: nowrap;
}
.cell-title a,
.cell-source a,
.cell-actions a {
  color: var(--paper);
  border-bottom: 1px solid var(--ink-400);
}
.cell-title a:hover,
.cell-source a:hover,
.cell-actions a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.cell-actions a {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cell-error { color: var(--mute-3); max-width: 34ch; }
.cell-fails { color: var(--bad); font-variant-numeric: tabular-nums; }

.flag-conflict {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warn);
  border-bottom: 1px solid var(--warn);
}
.flag-locked,
.field-lock {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-3);
}

.edit-log { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; }
.edit-log-item { font-size: var(--step--1); color: var(--mute-3); }
.edit-log-item a { color: var(--paper-dim); border-bottom: 1px solid var(--ink-500); }
.edit-log-item a:hover { color: var(--amber); border-bottom-color: var(--amber); }
.edit-field { font-family: var(--font-mono); color: var(--mute); }
.edit-old { color: var(--mute-3); }
.edit-new { color: var(--ok); text-decoration: none; }

/* queue cards */

.submission-list,
.source-list,
.conflict-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.submission, .source, .conflict { min-width: 0; }
.submission-card,
.source-card,
.conflict-card {
  min-width: 0;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  padding: 16px 18px 18px;
}
.submission-title,
.source-title,
.conflict-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: .012em;
  color: var(--paper);
}
.conflict-title a:hover { color: var(--amber); }

.submission-when,
.conflict-when {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amber-soft);
}
.submission-where { margin-top: 6px; color: var(--mute); }
.submission-meta,
.source-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.submission-description {
  margin-top: 10px;
  max-width: var(--measure);
  color: var(--mute-2);
  line-height: 1.6;
}
.submission-source a,
.source-url a,
.submission-tickets a,
.submission-event a {
  color: var(--mute);
  border-bottom: 1px solid var(--ink-500);
  word-break: break-all;
}
.submission-source,
.source-url,
.submission-tickets,
.submission-event { margin-top: 8px; font-size: var(--step--1); }
.submission-source a:hover,
.source-url a:hover,
.submission-tickets a:hover,
.submission-event a:hover { color: var(--amber); border-bottom-color: var(--amber); }

.submission-submitter,
.source-submitter,
.source-health {
  margin-top: 8px;
  font-size: var(--step--1);
  color: var(--mute-3);
}
.source-failures { color: var(--bad); margin-left: 10px; }
.source-error { display: block; margin-top: 4px; color: var(--mute-3); }
.submission-review-note { margin-top: 8px; color: var(--warn); font-size: var(--step--1); }

/* review row: label, note and the two buttons on one line where there is room */
.form-review,
.form-source {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-600);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 16px;
  align-items: start;
}
.form-review .field,
.form-source .field { margin: 0; min-width: 0; }
.form-review .form-actions,
.form-source .form-actions {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.form-review .field-textarea { min-height: 44px; }

.button-approve {
  border-color: var(--ok);
  color: var(--ok);
}
.button-approve:hover { background: var(--ok); border-color: var(--ok); color: var(--amber-ink); }
.button-reject:hover { border-color: var(--bad); color: var(--bad); }
.button-resolve { border-color: var(--amber); color: var(--amber); }
.button-resolve:hover { background: var(--amber); color: var(--amber-ink); }
.button-rescind:hover { border-color: var(--bad); color: var(--bad); }
.link-edit {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-2);
  border-bottom: 1px solid var(--ink-500);
  align-self: center;
}
.link-edit:hover { color: var(--amber); border-bottom-color: var(--amber); }

.form-search {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 520px;
  margin-top: 16px;
}
.form-search .field { flex: 1; margin: 0; }
.form-search .form-actions { margin: 0; }

.event-edit-locked,
.event-edit-links {
  margin: 10px 0 14px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.event-edit-links a { color: var(--mute); border-bottom: 1px solid var(--ink-500); }
.event-edit-links a:hover { color: var(--amber); border-bottom-color: var(--amber); }

.admin-panel-edit {
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  padding: 18px 20px 22px;
}
.admin-panel-edit .form-event-edit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0 20px;
  max-width: none;
}
.admin-panel-edit .form-event-edit > .form-actions,
.admin-panel-edit .form-event-edit > .event-edit-locked,
.admin-panel-edit .form-event-edit > .field-description { grid-column: 1 / -1; }
.admin-panel-edit .field-input { background: var(--ink-900); }

/* conflicts: the competing claims, side by side, each with its source */

.conflict-field { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.conflict-field-name {
  display: block;
  width: 100%;
  padding: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
}
.claim-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.claim { min-width: 0; }
.claim-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 11px;
  align-items: start;
  min-height: 44px;
  padding: 12px 14px 13px;
  border: 1px solid var(--ink-500);
  background: var(--ink-900);
  border-radius: var(--radius);
  cursor: pointer;
  height: 100%;
}
.claim-label:hover { border-color: var(--ink-400); }
.claim-label:focus-within { outline: 2px solid var(--amber); outline-offset: 1px; }
.claim-radio {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: var(--amber);
}
.claim-value {
  grid-column: 2;
  font-size: var(--step-1);
  color: var(--paper);
  line-height: 1.25;
  word-break: break-word;
}
.claim-source {
  grid-column: 2;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute-2);
}
.claim-confidence {
  grid-column: 2;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--mute-3);
  font-variant-numeric: tabular-nums;
}
.claim.is-winner .claim-label { border-color: var(--ink-400); }
.claim-current { color: var(--amber); }
.conflict-field-count { color: var(--mute-3); letter-spacing: .12em; }
.claim:has(.claim-radio:checked) .claim-label { border-color: var(--amber); }

.empty-note a { color: var(--paper-dim); }

/* ------------------------------------------------------------- sources --- */

/* The public list of everything we read. A dense reference page, so it takes
   the admin's tighter measure and smaller base size rather than the airy
   listing treatment, on exactly the same tokens. Nothing here is new colour. */

/* the shell widens for the list, and the header and footer widen with it so
   the wordmark, the rows and the footer links share one left edge */
.page-sources .site-main,
.page-sources .site-header,
.page-sources .site-footer { max-width: 1040px; }
.sources-page { font-size: var(--step--1); }
.sources-page .form-blurb { font-size: var(--step-0); }

.sources-tally {
  margin-top: 18px;
  max-width: var(--measure);
  color: var(--mute);
  line-height: 1.6;
}
.sources-live {
  margin-top: 8px;
  max-width: var(--measure);
  font-family: var(--font-mono);
  font-size: var(--step--2);
  line-height: 1.7;
  color: var(--mute-3);
}

/* The way off the site. It is the one thing a venue owner arrives looking for,
   so it sits above the list rather than under it. */
.sources-optout {
  margin-top: 26px;
  padding: 16px 18px 18px;
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-left: 2px solid var(--amber);
  max-width: 640px;
}
.sources-optout-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--paper);
}
.sources-optout-body {
  margin-top: 9px;
  color: var(--mute);
  line-height: 1.65;
}
.sources-optout-body a {
  color: var(--paper-dim);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-400);
}
.sources-optout-body a:hover { color: var(--amber); text-decoration-color: var(--amber); }

.source-group { margin-top: 40px; }
.source-group-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--paper);
}
.source-group-note {
  margin-top: 7px;
  max-width: var(--measure);
  color: var(--mute-2);
  line-height: 1.6;
}

.source-entries {
  margin-top: 14px;
  border-top: 1px solid var(--ink-600);
}
.source-entry {
  padding: 13px 2px 14px;
  border-bottom: 1px solid var(--ink-700);
}
.source-entry:hover { background: var(--ink-850); }

.source-entry-name {
  color: var(--paper);
  font-weight: 500;
  font-size: var(--step-0);
  line-height: 1.3;
}
.source-entry-meta {
  margin-top: 4px;
  color: var(--mute-2);
  line-height: 1.5;
}
.source-entry-kind {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute-3);
}
.source-entry-origin {
  color: var(--mute);
  border-bottom: 1px solid var(--ink-400);
}
.source-entry-origin:hover { color: var(--amber); border-bottom-color: var(--amber); }
.source-entry-origin.is-plain { color: var(--mute-3); border-bottom: 0; }

/* The two facts that make the page worth reading: what a source has carried,
   and whether we are still managing to read it. Mono and tabular so the
   numbers line up down the column. */
.source-entry-stats {
  margin-top: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 22px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--step--2);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.source-entry-count { color: var(--amber-soft); }
.source-entry-count.is-zero { color: var(--mute-3); }
.source-entry-read { color: var(--mute-3); text-align: right; }
/* One accent per row. A failing source spends it on the warning, so the
   contribution count drops back to a quiet colour. */
.source-entry.is-failing .source-entry-count { color: var(--mute-3); }
.source-entry.is-failing .source-entry-read { color: var(--warn); }

.detail-sources-all {
  margin-top: 18px;
  font-size: var(--step--1);
  color: var(--mute-2);
  line-height: 1.6;
}
.detail-sources-all a {
  color: var(--paper-dim);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-400);
}
.detail-sources-all a:hover { color: var(--amber); text-decoration-color: var(--amber); }

/* -------------------------------------------------------------- mobile --- */

@media (max-width: 640px) {
  /* the chip strip runs off the edge and scrolls, rather than stacking into
     four rows and pushing the listing off the screen */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    padding-left: var(--pad);
    padding-right: var(--pad);
    padding-bottom: 2px;
    scroll-padding-left: var(--pad);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip-item { flex: 0 0 auto; }
  .chip { min-height: 44px; padding: 0 14px; }
  .filters-range {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0 14px;
    margin-left: calc(var(--pad) * -1);
    margin-right: calc(var(--pad) * -1);
    padding-left: var(--pad);
    padding-right: var(--pad);
  }
  .filters-range::-webkit-scrollbar { display: none; }
  .site-nav-link,
  .footer-links a { min-height: 44px; }
  /* the stats line stops being two columns and becomes two lines, so a long
     honest sentence about a failing source has somewhere to go */
  .source-entry-stats { justify-content: flex-start; gap: 2px 0; }
  .source-entry-count,
  .source-entry-read { flex: 0 0 100%; text-align: left; }
  .source-entry-meta .sep { margin: 0 .35em; }
  .filters-range-label,
  .range { flex: 0 0 auto; white-space: nowrap; }
  .range { min-height: 44px; }
}

/* Between a phone and a laptop the source column, which cannot wrap, was
   squeezing the act name into four lines. Keep the time rail, drop the source
   under the venue instead. */
@media (max-width: 700px) {
  .event-card { grid-template-columns: 82px minmax(0, 1fr); }
  .event-source {
    grid-column: 2;
    text-align: left;
    margin-top: 7px;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .event-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 13px 8px 15px 12px;
  }
  .event-source { grid-column: 1; }
  .event-time { margin-bottom: 3px; }
  .event-title { font-size: 23px; }
  .day-heading { margin-top: 32px; gap: 10px; }
  .day-date { font-size: 26px; }
  .site-header.is-hero .wordmark { margin-top: 20px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .form-search { flex-direction: column; align-items: stretch; }
  .form-search .form-actions .button { width: 100%; }
  .site-footer { flex-direction: column; }
}

/* ------------------------------------------------------------- motion --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
