/* club.slopped.site. Hand-written; club/scripts/build.mjs doesn't touch it. Brand tokens and type as on slopped.site
   (slopped-brand); colours read tokens so the network themes work (themes skill). The room itself (the stage canvas)
   is always dark: it is a picture of a club, not page chrome. */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
@font-face { font-family: "Archivo Black Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Noto Sans Bold"), local("NotoSans-Bold"); size-adjust: 112%; }
:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --ink: #171815;
  --acid: #e3ff59;
  --muted: #6b6b62;
  --line: #d4d2c9;
  --focus: #728600;
  --card: #fff;
  --room: #070a08;
  --room-ink: #e8f0e6;
  --room-line: #26302a;
  --slime: #59ff7a;
  --head: "Archivo Black", "Arial Black", "Archivo Black Fallback", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: inherit; }
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 1000; letter-spacing: -1.5px; line-height: 1.02; font-synthesis: none; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1440px; margin: auto; padding: 0 5%; }
main:focus { outline: none; }
html:not(.can-install) [data-install] { display: none !important; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code, pre, kbd { font-family: var(--mono); font-size: 14px; }
:not(pre) > code { background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
pre { background: var(--code, #171815); color: var(--code-ink, #f4f1e8); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.45; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 15px Arial, Helvetica, sans-serif; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.big { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: default; }
section + section { padding: 36px 0; border-top: 2px solid var(--ink); }
section h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 8px 40px; max-width: 1100px; }
.cols p { margin: 0 0 12px; font-size: 17px; }
footer { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer p { margin: 0; }
footer .brand img { width: 140px; height: auto; display: block; }

/* the intro: the name and what it is, beside the DJ */
.intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px 48px; align-items: center; padding: 40px 0 40px; }
.intro h1 { font-size: clamp(56px, 9vw, 148px); letter-spacing: -4px; }
.lede { max-width: 30ch; margin: 18px 0 0; font-size: clamp(20px, 2vw, 25px); line-height: 1.3; letter-spacing: -.3px; font-weight: 700; }
.sub { max-width: 46ch; margin: 14px 0 0; font-size: 17px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.hero { margin: 0; }
.hero img { display: block; width: 100%; border-radius: 12px; border: 2px solid var(--ink); background: var(--room); }
.hero figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* the floor: the room, the transport, the set */
.floor-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.floor-head h2 { margin: 0; }
.views { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.views button { min-width: 64px; min-height: 42px; border: 0; background: transparent; color: var(--ink); font: 700 15px Arial, Helvetica, sans-serif; cursor: pointer; }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.views button:disabled { opacity: .45; cursor: default; }
.deck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); grid-template-rows: auto 1fr; grid-template-areas: "stage set" "transport set"; gap: 12px 20px; }
.transport { align-self: start; }
.stage-wrap { grid-area: stage; position: relative; align-self: start; }
.stage { position: relative; min-height: 320px; border-radius: 12px; overflow: hidden; background: var(--room); color: var(--room-ink); border: 2px solid var(--ink); }
.stage-line { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 4px 10px; border-radius: 999px; background: rgba(7, 10, 8, .72); color: var(--room-ink); font-size: 13px; pointer-events: none; max-width: calc(100% - 24px); }
.stage-line:empty { display: none; }
.transport { grid-area: transport; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "play now calm" "seek seek time"; gap: 8px 14px; align-items: center; }
.play { grid-area: play; min-width: 96px; }
.play.on { background: var(--acid); color: #171815; border-color: var(--ink); }
.now { grid-area: now; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.now b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now span { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seek { grid-area: seek; display: block; min-width: 0; }
.seek input { width: 100%; min-height: 32px; accent-color: var(--ink); }
.time { grid-area: time; font: 14px var(--mono); color: var(--muted); }
.calm { grid-area: calm; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; min-height: 42px; cursor: pointer; white-space: nowrap; }
.calm input { width: 20px; height: 20px; accent-color: var(--ink); }
.set { grid-area: set; list-style: none; counter-reset: t; margin: 0; padding: 0; border-top: 2px solid var(--ink); align-self: start; }
.set li { counter-increment: t; border-bottom: 1px solid var(--line); }
.set button { display: grid; grid-template-columns: 2.4ch minmax(0, 1fr); gap: 2px 10px; width: 100%; padding: 10px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; font: inherit; cursor: pointer; min-height: 56px; }
.set button::before { content: counter(t, decimal-leading-zero); grid-row: span 3; font: 1000 20px var(--head); font-synthesis: none; color: var(--muted); }
.set .t { font-weight: 700; font-size: 15px; line-height: 1.25; }
.set .ft { font-size: 13px; color: var(--muted); }
.set .m { font: 12px var(--mono); color: var(--muted); }
.set li[aria-current="true"] button { background: var(--acid); color: #171815; }
.set li[aria-current="true"] button::before, .set li[aria-current="true"] .ft, .set li[aria-current="true"] .m { color: #171815; }
.set .open { display: inline-flex; align-items: center; min-height: 42px; margin: -6px 0 0 3.4ch; font-size: 13px; }
.note { max-width: 80ch; margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* the 2D views */
.v2d { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 30%); gap: 2px; background: var(--room-line); }
.v2d canvas { display: block; width: 100%; height: 100%; }
.v2d-stage { position: relative; min-height: 300px; background: var(--room); }
.v2d-stage canvas { position: absolute; inset: 0; }
.v2d-side { display: grid; grid-template-rows: auto auto; align-content: start; gap: 2px; min-width: 0; background: var(--room); }
.v2d figure { margin: 0; background: var(--room); position: relative; min-width: 0; }
.v2d-plan canvas { aspect-ratio: 20 / 23; height: auto; }
.v2d figcaption { position: absolute; left: 8px; top: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(7, 10, 8, .7); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #9fb0a3; }
.v2d-dmx { padding: 38px 6px 6px; }
.v2d-dmx canvas { aspect-ratio: 2 / 1; height: auto; cursor: crosshair; }
.v2d-dmx-head { position: absolute; left: 8px; right: 6px; top: 2px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #9fb0a3; }
.v2d-unis { display: inline-flex; gap: 2px; }
.v2d-unis button { min-width: 32px; height: 32px; border: 1px solid #3a463d; background: transparent; color: #cfe0d2; font: 11px var(--mono); border-radius: 4px; cursor: pointer; }
.v2d-unis button[aria-pressed="true"] { background: #e3ff59; color: #171815; }
.v2d .v2d-dmx-at { position: static; margin-top: 4px; font: 11px var(--mono); letter-spacing: 0; text-transform: none; color: #cfe0d2; min-height: 1.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3d { position: relative; aspect-ratio: 16 / 9; }
.v3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* the editor: the file beside the room */
.ed-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; padding: 32px 0 18px; }
.ed-head h1 { font-size: clamp(40px, 6vw, 80px); letter-spacing: -2.5px; }
.ed-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pick { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.pick select { min-height: 44px; max-width: 100%; padding: 0 10px; border: 2px solid var(--ink); border-radius: 10px; background: var(--card); color: var(--ink); font: 15px Arial, Helvetica, sans-serif; }
.ed { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; padding-bottom: 32px; }
.ed-text { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ed-text textarea { width: 100%; min-height: 62vh; resize: vertical; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--code, #171815); color: var(--code-ink, #f4f1e8); font: 13px/1.55 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }
.ed-text textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ed-status { padding: 8px 12px; border-radius: 10px; border: 2px solid var(--ink); font-size: 14px; font-weight: 700; }
.ed-status[data-state="ok"] { background: var(--acid); color: #171815; }
.ed-status[data-state="bad"] { background: var(--card); border-color: var(--no, #b3261e); color: var(--ink); }
.ed-status:empty { display: none; }
.ed-errors { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.ed-errors li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.ed-errors li.warn { color: var(--muted); }
.ed-errors li.safety { font-weight: 700; }
.ed-errors button { min-height: 32px; padding: 0 8px; margin-right: 4px; border: 1px solid var(--ink); border-radius: 6px; background: var(--card); color: var(--ink); font: 700 12px var(--mono); cursor: pointer; }
.ed-view { min-width: 0; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
.ed-view .transport { grid-template-areas: "play now calm" "seek seek time"; }
.ed-view .v2d { grid-template-columns: 1fr; }
.ed-view .v2d-stage { min-height: 0; aspect-ratio: 16 / 10; }
.ed-view .v2d-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; align-items: start; }
.ed-view .v2d-plan canvas { aspect-ratio: 2 / 1; }

/* the docs: the spec as a page */
.spec { max-width: 980px; padding: 32px 0 40px; }
.spec h1 { font-size: clamp(44px, 7vw, 96px); letter-spacing: -3px; }
.spec h2 { margin: 40px 0 12px; padding-top: 22px; border-top: 2px solid var(--ink); font-size: clamp(26px, 3.4vw, 38px); }
.spec h3 { margin: 26px 0 10px; font-size: 22px; letter-spacing: -.6px; }
.spec p, .spec li { font-size: 17px; max-width: 75ch; }
.spec pre { font-size: 13px; }
.tbl { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl th { background: var(--card); font-size: 13px; }

@media (max-width: 900px) {
  .ed { grid-template-columns: 1fr; }
  .ed-view { position: static; order: -1; }
  .ed-text textarea { min-height: 50vh; }
  .intro { grid-template-columns: 1fr; padding-top: 28px; }
  .deck { grid-template-columns: 1fr; grid-template-areas: "stage" "transport" "set"; }
  .v2d { grid-template-columns: 1fr; }
  .v2d-stage { min-height: 0; aspect-ratio: 16 / 10; }
  .v2d-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
}
@media (max-width: 520px) {
  .v2d-side { grid-template-columns: 1fr; }
  .v2d-plan canvas { aspect-ratio: 3 / 2; }
  .transport { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "play now" "seek seek" "time calm"; }
  .calm { justify-self: end; }
  .ed-view .transport { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "play now" "seek seek" "time calm"; }
  .ed-view .v2d-side { grid-template-columns: 1fr; }
  .v3d { aspect-ratio: 4 / 5; }
  .v2d-stage { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
