@font-face {
  font-family: "Big Shoulders Stencil Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/big-shoulders-stencil-display.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Big Shoulders Stencil Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/big-shoulders-stencil-display.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #060605;
  --surface: #0c0b09;
  --ink: #e9e5d6;
  --ink-soft: #b6b09c;
  --muted: #726c59;
  --line: rgba(233, 229, 214, 0.14);
  --amber: #c9a227;
  --rust: #a8402c;
  --teal: #2c8f8a;
}

* { box-sizing: border-box; }

html, body {
  background: transparent;
  color: var(--ink);
  margin: 0;
}

body {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 14.5px;
  line-height: 1.7;
  position: relative;
}

.site-fallback {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg);
  pointer-events: none;
}

.site-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}

.site-scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(6,6,5,0.55) 0%,
    rgba(6,6,5,0.72) 45%,
    rgba(6,6,5,0.88) 100%
  );
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.028) 0px,
    rgba(255,255,255,0.028) 1px,
    transparent 1px,
    transparent 3px
  );
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, #000000b0 100%);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

.wrap {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 22px 70px;
  position: relative;
  z-index: 1;
}

.side-panel { display: block; margin: 0 0 40px; }
.side-panel .status-echo {
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px;
}
.side-panel .panel { border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.side-panel .panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.side-panel h2.tag { margin: 0; font-size: 14px; }
.side-panel .panel-note { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.side-panel .promo-text {
  font-size: 13.5px; line-height: 1.7; color: var(--ink-soft);
  margin: 0 0 22px;
}
.side-panel .promo-text b { color: var(--amber); }
.side-panel .submit-btn { text-decoration: none; display: inline-block; }

@media (min-width: 960px) {
  .page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 22px;
    position: relative;
  }
  .page .wrap { max-width: none; margin: 0; padding: 0 460px 70px 0; }
  .page .side-panel {
    margin: 0;
    position: fixed;
    top: 26px;
    right: max(22px, calc((100vw - 1400px) / 2 + 22px));
    width: 400px;
    max-height: calc(100vh - 52px);
    overflow-y: auto;
    padding-top: 46px;
    z-index: 2;
  }
}

.status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.status .live { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.status a { color: inherit; text-decoration: none; }
.status a:hover { color: var(--amber); }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--rust);
  box-shadow: 0 0 6px 1px color-mix(in srgb, var(--rust) 70%, transparent);
  animation: blink 2.2s steps(1) infinite;
}
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }

.hazard {
  height: 8px; margin: 0;
  background-image: repeating-linear-gradient(-45deg, var(--amber) 0px, var(--amber) 10px, #000 10px, #000 20px);
  opacity: 0.85;
}

.hero { padding: 46px 0 34px; }
.hero.compact { padding: 40px 0 28px; }
.eyebrow {
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 20px;
}
.eyebrow::before { content: "◢ "; }

h1.glitch {
  font-family: "Big Shoulders Stencil Display", "Arial Narrow", sans-serif;
  font-weight: 800; font-size: clamp(58px, 14vw, 118px); line-height: 0.84;
  letter-spacing: 0.01em; margin: 0 0 22px; text-wrap: balance;
  position: relative; color: var(--ink);
}
h1.glitch.small { font-size: clamp(40px, 9vw, 70px); }
h1.glitch span { position: relative; display: inline-block; }
h1.glitch span::before, h1.glitch span::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%;
  mix-blend-mode: screen; opacity: 0.75;
}
h1.glitch span::before { color: var(--rust); transform: translate(2px, 0); }
h1.glitch span::after { color: var(--teal); transform: translate(-2px, 0); }
@media (prefers-reduced-motion: no-preference) {
  h1.glitch span::before { animation: glitchA 7s ease-in-out infinite; }
  h1.glitch span::after { animation: glitchB 7s ease-in-out infinite; }
}
@keyframes glitchA {
  0%, 94%, 100% { transform: translate(2px, 0); }
  95% { transform: translate(-3px, 1px); }
  96% { transform: translate(4px, -1px); }
  97% { transform: translate(-2px, 0); }
}
@keyframes glitchB {
  0%, 94%, 100% { transform: translate(-2px, 0); }
  95% { transform: translate(3px, -1px); }
  96% { transform: translate(-4px, 1px); }
  97% { transform: translate(2px, 0); }
}

.subhead { font-size: 15.5px; color: var(--ink-soft); max-width: 48ch; margin: 0 0 18px; }
.coords {
  font-size: 12px; letter-spacing: 0.04em; color: var(--muted);
  border-left: 2px solid var(--rust); padding-left: 10px;
}

.count-live {
  color: var(--rust);
  font-weight: 600;
  animation: count-pulse 2.4s ease-in-out infinite;
}
@keyframes count-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .count-live { animation: none; } }
.coords b { color: var(--ink-soft); font-weight: 600; }

section { padding: 40px 0; }

h2.tag {
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber); margin: 0 0 22px;
}
h2.tag::before { content: "// "; color: var(--muted); }

.tag-row {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
}
.tag-row h2.tag { margin: 0; }
.tag-stat {
  font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted);
}

.log { max-width: 58ch; }
.log p { margin: 0 0 10px; color: var(--ink-soft); }
.log p .prompt { color: var(--amber); }
.cursor {
  display: inline-block; width: 8px; height: 15px; background: var(--ink-soft);
  vertical-align: -2px; margin-left: 2px; animation: cursor 1s steps(1) infinite;
}
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
@keyframes cursor { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.checklist { display: grid; gap: 9px; max-width: 44ch; }
.checkitem {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px;
  font-size: 13px; letter-spacing: 0.03em; color: var(--ink-soft);
}
.checkitem .box { color: var(--amber); font-weight: 600; }

.connects { display: flex; flex-direction: column; }
.connect {
  display: grid; grid-template-columns: 96px 1fr auto; align-items: center;
  gap: 16px; padding: 18px 0; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.connects a.connect:last-child { border-bottom: 1px solid var(--line); }
.connect .cmd { font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.connect .cmd .flag { color: var(--amber); }
.connect .info { min-width: 0; }
.connect .name {
  font-family: "Big Shoulders Stencil Display", sans-serif; font-weight: 700;
  font-size: 21px; letter-spacing: 0.01em; line-height: 1; margin-bottom: 4px;
}
.connect .desc { font-size: 12px; color: var(--muted); }
.connect .go { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.connect:hover { background: rgba(233,229,214,0.03); }
.connect:hover .name { color: var(--amber); }
.connect:hover .go { color: var(--rust); }
.connect:hover .go::after { content: " ▶"; }
.connect:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

footer {
  padding-top: 30px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 8px; border-top: 1px dashed var(--line);
}
footer a { color: inherit; }
.visits { font-variant-numeric: tabular-nums; }
.visits #visit-count {
  color: var(--amber); background: var(--surface); border: 1px solid var(--line);
  padding: 1px 5px; letter-spacing: 0.02em;
}

/* ---- upload form ---- */
.upload-form { display: grid; gap: 16px; max-width: 46ch; margin-bottom: 46px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input[type="text"],
.field input[type="file"],
.field select {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-family: inherit; font-size: 13.5px; padding: 10px 12px;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select:invalid { color: var(--muted); }
.field input[type="text"]:focus,
.field input[type="file"]:focus,
.field select:focus {
  outline: 2px solid var(--amber); outline-offset: -1px; border-color: var(--amber);
}
.field .hint { font-size: 11px; color: var(--muted); }
.field .optional { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }

.spotify-link {
  font-size: 11px; letter-spacing: 0.04em; color: var(--muted);
  text-decoration: none; border-bottom: 1px dotted var(--muted); margin-left: 4px;
}
.spotify-link:hover { color: var(--amber); border-color: var(--amber); }

.radio-group { display: flex; gap: 18px; padding: 10px 0 2px; }
.radio-option {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--ink-soft); cursor: pointer;
}
.radio-option input[type="radio"] {
  accent-color: var(--amber); width: 15px; height: 15px; margin: 0;
}

.consent {
  display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start;
  font-size: 12px; line-height: 1.6; color: var(--ink-soft);
  border: 1px solid var(--line); padding: 14px; background: var(--surface);
}
.consent input { margin-top: 3px; accent-color: var(--amber); width: 15px; height: 15px; }
.consent b { color: var(--ink); }

.submit-btn {
  justify-self: start; background: transparent; border: 1.5px solid var(--amber);
  color: var(--amber); font-family: "Big Shoulders Stencil Display", sans-serif;
  font-size: 18px; letter-spacing: 0.03em; padding: 10px 26px; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.submit-btn:hover { background: var(--amber); color: #0c0b09; }
.submit-btn:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

.notice {
  border-left: 2px solid var(--amber); padding: 10px 14px; font-size: 12.5px;
  color: var(--ink-soft); margin-bottom: 22px; background: var(--surface);
}
.notice.error { border-color: var(--rust); }

.track-list { display: grid; gap: 14px; }
.track-row { border: 1px solid var(--line); background: var(--surface); padding: 14px 16px; }
.track-row .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.track-row .who {
  font-family: "Big Shoulders Stencil Display", sans-serif; font-size: 19px;
  letter-spacing: 0.01em; color: var(--ink);
}
.track-row .who .artist { color: var(--amber); }
.track-row .when { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.track-tags { display: flex; gap: 6px; margin-bottom: 10px; }
.track-tag {
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--amber); border: 1px solid var(--line); padding: 2px 7px;
}
.track-row audio { width: 100%; height: 34px; }
.empty {
  color: var(--muted); font-size: 13px; border: 1px dashed var(--line);
  padding: 20px; text-align: center;
}

.field textarea {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-family: inherit; font-size: 13.5px; padding: 10px 12px; resize: vertical;
}
.field textarea:focus {
  outline: 2px solid var(--amber); outline-offset: -1px; border-color: var(--amber);
}
.kk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- tracks page: form + listing side by side ---- */
.track-layout { display: block; }
.mobile-only { display: block; }

@media (min-width: 900px) {
  body.page-tracks .wrap { max-width: 1400px; }

  .track-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 0 56px;
    align-items: start;
  }
  .track-layout .upload,
  .track-layout .listing { margin-bottom: 0; }
  .track-layout .upload-form { max-width: none; }
  .track-layout .listing {
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 28px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 26px;
  }
  .track-layout .track-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .mobile-only { display: none; }
}

/* ---- track filters ---- */
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-field { display: grid; gap: 6px; min-width: 160px; flex: 1; }
.filter-field label {
  font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.filter-field select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  font-family: inherit; font-size: 13.5px; padding: 10px 30px 10px 12px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.filter-field select:focus { outline: 2px solid var(--amber); outline-offset: -1px; border-color: var(--amber); }

/* ---- legal pages ---- */
.legal { max-width: 68ch; }
.legal h3 {
  font-family: "Big Shoulders Stencil Display", sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: 0.01em;
  color: var(--ink); margin: 32px 0 10px;
}
.legal h3:first-child { margin-top: 0; }
.legal p, .legal ul {
  color: var(--ink-soft); font-size: 13.5px; line-height: 1.75; margin: 0 0 14px;
}
.legal ul { padding-left: 20px; }
.legal a { color: var(--amber); text-decoration: none; border-bottom: 1px dotted var(--amber); }
.legal a:hover { color: var(--rust); border-color: var(--rust); }
.legal .placeholder { color: var(--rust); }

.legal-links { display: inline-flex; gap: 4px; }
.legal-links a { text-decoration: none; }
.legal-links a:hover { color: var(--amber); }
