/* Floor's open — the manual on the club floor in the Neon Void (codex: neon-void, site-club). A place. Every colour
   comes from one green with oklch() relative colours: oklch(from var(--base) l c calc(h + 150)) turns the hall's
   green into the pink of the headings, the cyan of the links and the beams' light, so changing --base re-lights the
   room. Hex fallbacks come first for browsers without relative colours. The rig's two beams sway and change colour
   on registered @property hues, slowly (never a flash), and a crowd of beings (humans, robots, animals, slop and
   aliens) bobs along the foot of the floor behind the panels. Reduced motion stops all of it.
   Designed by machine for the Slopwright. */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
@property --beam-a { syntax: "<number>"; inherits: false; initial-value: 300; }
@property --beam-b { syntax: "<number>"; inherits: false; initial-value: 190; }
:root {
  color-scheme: dark;
  /* fallbacks first: the same room in plain hex */
  --hall: #0b1f17; --hall-hi: #18402f; --arch: #1f5a41; --panel: rgb(8 20 15 / .94); --line: #2f5c48;
  --text: #ecf5ef; --dim: #b4cdbf; --pink: #ff9ccf; --cyan: #7fe6f0; --gold: #f2d27a;
  --head: "Archivo Black", "Arial Black", Arial, sans-serif;
}
@supports (color: oklch(from red l c h)) {
  :root {
    --base: oklch(0.42 0.1 160);                               /* the hall: one green, everything else from it */
    --hall: oklch(from var(--base) 0.2 c h);
    --hall-hi: oklch(from var(--base) 0.34 c h);
    --arch: oklch(from var(--base) 0.44 calc(c * 1.2) h);
    --panel: oklch(from var(--base) 0.16 calc(c * .4) h / .94);
    --line: oklch(from var(--base) 0.45 calc(c * .6) h);
    --text: oklch(from var(--base) 0.96 0.015 h);
    --dim: oklch(from var(--base) 0.84 0.04 h);
    --pink: oklch(from var(--base) 0.83 0.13 calc(h + 190));  /* the headings: across the wheel from the hall */
    --cyan: oklch(from var(--base) 0.87 0.11 calc(h + 50));   /* the links */
    --gold: oklch(from var(--base) 0.88 0.11 calc(h - 70));
  }
}
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  position: relative; min-width: 320px; margin: 0; color: var(--text);
  font: 17px/1.65 "Helvetica Neue", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0, var(--hall-hi), transparent 70%),
    /* arches along the walls, one ring per bay */
    radial-gradient(circle at 50% 100%, transparent 61%, var(--arch) 62% 64%, transparent 65%) 0 40px / 240px 170px repeat-x,
    radial-gradient(circle at 50% 100%, transparent 61%, var(--hall-hi) 62% 64%, transparent 65%) 120px 150px / 240px 170px repeat-x,
    var(--hall);
  background-attachment: fixed;
}
a { color: var(--cyan); text-underline-offset: 3px; }
:where(a, [tabindex]):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--gold); color: #10140f; font-weight: 700; }
.skip:focus { top: 12px; }
.page { position: relative; z-index: 1; max-width: 1060px; margin: auto; padding: 0 20px 40px; }
.main:focus { outline: none; }

/* ---------------------------------------------------------------- the scene, behind the panels */
.extra { position: fixed; pointer-events: none; z-index: 0; }
/* the rig: two beams from the truss, each a conic wedge whose hue is its own registered number */
.extra-1, .extra-2 { top: -40px; width: 70vmax; height: 120vh; transform-origin: 50% 0; opacity: .5; }

.extra-1 { left: -30vmax; background: conic-gradient(from 165deg at 50% 0, transparent, rgb(255 122 200 / .4) 12deg 18deg, transparent 30deg); background: conic-gradient(from 165deg at 50% 0, transparent, oklch(0.8 0.16 var(--beam-a) / .45) 12deg 18deg, transparent 30deg); transform: rotate(-12deg); }
.extra-2 { right: -30vmax; background: conic-gradient(from 165deg at 50% 0, transparent, rgb(120 220 240 / .4) 12deg 18deg, transparent 30deg); background: conic-gradient(from 165deg at 50% 0, transparent, oklch(0.82 0.13 var(--beam-b) / .45) 12deg 18deg, transparent 30deg); transform: rotate(12deg); }
/* the crowd: beings at the foot of the floor (humans with round heads, robots with square ones, aliens with tall bulbs),
   one shape each, copied along the floor with box-shadow; the boxes themselves are transparent */
.extra-3, .extra-4 { --f: #06120d; left: 0; right: 0; bottom: 0; height: 110px; overflow: hidden; }
.extra-3::before, .extra-3::after, .extra-4::before, .extra-4::after { content: ""; position: absolute; left: 0; }
.extra-3::before { bottom: -34px; width: 64px; height: 70px; border-radius: 50% 50% 40% 40%;
  box-shadow: 0 0 0 var(--f), 77px 0 0 var(--f), 154px 0 0 var(--f), 231px 0 0 var(--f), 308px 0 0 var(--f), 385px 0 0 var(--f), 445px 0 0 var(--f), 522px 0 0 var(--f), 599px 0 0 var(--f), 676px 0 0 var(--f), 753px 0 0 var(--f), 830px 0 0 var(--f), 890px 0 0 var(--f), 967px 0 0 var(--f), 1044px 0 0 var(--f), 1121px 0 0 var(--f), 1198px 0 0 var(--f), 1258px 0 0 var(--f), 1335px 0 0 var(--f), 1412px 0 0 var(--f), 1489px 0 0 var(--f), 1566px 0 0 var(--f), 1643px 0 0 var(--f), 1703px 0 0 var(--f), 1780px 0 0 var(--f), 1857px 0 0 var(--f), 1934px 0 0 var(--f), 2011px 0 0 var(--f); }
.extra-3::after { left: 18px; bottom: 38px; width: 28px; height: 28px; border-radius: 50%;
  box-shadow: 0px 0 0 var(--f), 231px 0 0 var(--f), 385px 0 0 var(--f), 599px 0 0 var(--f), 830px 0 0 var(--f), 967px 0 0 var(--f), 1198px 0 0 var(--f), 1412px 0 0 var(--f), 1566px 0 0 var(--f), 1780px 0 0 var(--f), 2011px 0 0 var(--f); }
.extra-4::before { left: 19px; bottom: 37px; width: 26px; height: 24px; border-radius: 5px;
  box-shadow: 77px 0 0 var(--f), 308px 0 0 var(--f), 522px 0 0 var(--f), 676px 0 0 var(--f), 890px 0 0 var(--f), 1121px 0 0 var(--f), 1258px 0 0 var(--f), 1489px 0 0 var(--f), 1703px 0 0 var(--f), 1857px 0 0 var(--f); }
.extra-4::after { left: 21px; bottom: 37px; width: 22px; height: 32px; border-radius: 50%;
  box-shadow: 154px 0 0 var(--f), 445px 0 0 var(--f), 753px 0 0 var(--f), 1044px 0 0 var(--f), 1335px 0 0 var(--f), 1643px 0 0 var(--f), 1934px 0 0 var(--f); }

/* ---------------------------------------------------------------- the masthead */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; }
.masthead .brand { display: flex; align-items: center; padding: 6px 12px; border-radius: 8px; background: #f4f1e8; }
.masthead .brand img { display: block; height: 22px; width: auto; }
.site-name { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--text); font-weight: 700; text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 15px; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--cyan); text-decoration: underline; }

/* ---------------------------------------------------------------- panels on the floor */
.title-block, .contents, .chapter, .outfits, .site-foot { position: relative; margin: 26px 0; padding: 28px clamp(18px, 4vw, 40px); border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 0 0 1px rgb(0 0 0 / .4), 0 20px 50px rgb(0 0 0 / .45); }
.title-block { margin-top: 40px; padding-block: 44px; text-align: center; }
.edition { margin: 0; color: var(--gold); font: 700 12px/1.4 Arial, sans-serif; letter-spacing: .3em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: var(--head); font-weight: 1000; font-synthesis: none; }
.title { margin: 16px auto 0; max-width: 11ch; color: var(--pink); font-size: clamp(46px, 8.6vw, 112px); line-height: .95; letter-spacing: -.035em; text-shadow: 0 0 34px color-mix(in oklch, var(--pink) 45%, transparent); }
.subtitle { max-width: 32em; margin: 22px auto 0; color: var(--dim); font-size: 20px; line-height: 1.45; }

.contents-title { margin: 0 0 12px; color: var(--gold); font: 700 13px Arial, sans-serif; letter-spacing: .25em; text-transform: uppercase; }
.contents-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: c; }
.contents-list li { counter-increment: c; }
.contents-list a { gap: 10px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-weight: 700; font-size: 15px; text-decoration: none; }
.contents-list a::before { content: counter(c, decimal-leading-zero); color: var(--cyan); font-variant-numeric: tabular-nums; }
.contents-list a:hover { border-color: var(--cyan); }

.chapter { scroll-margin-top: 20px; }
.chapter-title { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; color: var(--pink); font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -.02em; }
.chapter-num { flex: none; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border: 2px solid var(--cyan); border-radius: 50%; color: var(--cyan); font-size: .55em; }
.chapter-body { max-width: 66ch; }
.chapter-body > :first-child { margin-top: 0; }
.first { font-size: 20px; line-height: 1.5; }
.plate { margin: 26px 0 0; }
.plate img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.plate figcaption { margin-top: 8px; color: var(--dim); font-size: 14px; }
.tools, .rules { padding-left: 0; list-style: none; }
.tools li, .rules li { padding: 10px 0; border-top: 1px solid var(--line); }
.tools b, .rules b, .hazard dt, .glossary dt { color: var(--gold); }
.rules { counter-reset: r; }
.rules li { counter-increment: r; position: relative; padding-left: 2.6em; }
.rules li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; color: var(--cyan); font-weight: 700; }
.note { margin: 22px 0; padding: 16px 20px; border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; background: color-mix(in oklch, var(--gold) 12%, var(--hall)); background: rgb(242 210 122 / .1); }
.note p { margin: 0; }
.saying { margin: 28px 0 0; padding: 20px 24px; border-radius: 14px; background: rgb(0 0 0 / .3); }
.saying p { margin: 0; color: var(--pink); font: 1000 clamp(22px, 2.6vw, 30px)/1.2 var(--head); font-synthesis: none; }
.saying footer { margin-top: 10px; color: var(--dim); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { padding-bottom: 10px; color: var(--dim); text-align: left; }
th, td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { border-top: 0; color: var(--cyan); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.hazards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0; }
.hazard { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgb(0 0 0 / .25); }
.hazard dd { margin: 6px 0 0; font-size: 15px; }
.glossary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; }
.glossary dd { margin: 0; }
.sign-off { margin-top: 24px; font-weight: 700; }

/* ---------------------------------------------------------------- the other outfits */
.outfits-title { color: var(--pink); font-size: clamp(28px, 4vw, 44px); line-height: 1.05; }
.outfits-lede { color: var(--dim); }
.outfit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.outfit { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.outfit-link { color: var(--text); font-size: 16px; font-weight: 700; text-decoration: none; }
.outfit-link:hover { color: var(--cyan); text-decoration: underline; }
.outfit-by, .outfit-note { display: none; }
.outfit-technique { display: block; color: var(--dim); }
#th-floor { border-color: var(--pink); box-shadow: 0 0 24px color-mix(in oklch, var(--pink) 35%, transparent); }
#th-floor .outfit-link { color: var(--pink); }
#th-floor .outfit-link::after { content: " · on the floor"; margin-left: .3em; font-weight: 400; }
#th-floor .outfit-note { display: block; margin-top: 4px; color: var(--dim); }
.site-foot { color: var(--dim); font-size: 14px; }
.site-foot p { margin: 0 0 6px; }

@media (max-width: 700px) {
  .page { padding-inline: 12px; }
  .site-head { padding: 14px 0; }
  .site-nav { gap: 0 16px; }
  .title-block { padding-block: 30px; }
  .chapter-title { gap: 12px; }
  .glossary { grid-template-columns: 1fr; gap: 2px; }
  .glossary dd { margin-bottom: 8px; }
}

/* ---------------------------------------------------------------- the floor moves (never on reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  /* beams sway over eight seconds and drift round the colour wheel over forty: slow, nothing flashes */
  .extra-1 { animation: sway-l 8s ease-in-out infinite alternate, hue-a 40s linear infinite; }
  .extra-2 { animation: sway-r 9s ease-in-out infinite alternate, hue-b 46s linear infinite; }
  /* the crowd bobs on the beat of a 124 bpm set: down on one, up on the and */
  .extra-3, .extra-4 { animation: bob .97s ease-in-out infinite alternate; }
}
@keyframes sway-l { from { transform: rotate(-22deg); } to { transform: rotate(4deg); } }
@keyframes sway-r { from { transform: rotate(22deg); } to { transform: rotate(-6deg); } }
@keyframes hue-a { from { --beam-a: 300; } to { --beam-a: 660; } }
@keyframes hue-b { from { --beam-b: 190; } to { --beam-b: 550; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(8px); } }

@media (forced-colors: active) { .extra { display: none; } .title-block, .contents, .chapter, .outfits, .site-foot { border-color: CanvasText; } }

/* moving between outfits: a cross-document view transition where the browser has them, with the masthead and the
   title carried across; an ordinary page load elsewhere, and under reduced motion */
@view-transition { navigation: auto; }
.masthead { view-transition-name: masthead; }
.title { view-transition-name: manual-title; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* targets: every link outside running text is at least 44 px tall (the accessibility skill). The display has no
   specificity, so the outfit's own wins; the minimum size is made to stick over any outfit rule */
:where(.masthead, .site-nav, .contents-list) :where(a), :where(.outfit-link) { display: inline-flex; align-items: center; justify-content: center; }
:root:root body :is(.masthead, .site-nav, .contents-list) a, :root:root body .outfit-link { min-width: 44px; min-height: 44px; }
