/* the night shift: late-night broadcast, warm studio black. */

@font-face { font-family: "Lato"; src: url("../fonts/lato-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-heavy.woff2") format("woff2"); font-weight: 800 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Night Mono"; src: url("../fonts/mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Night Mono"; src: url("../fonts/mono-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ground: #0f0e0d;
  --band: #161413;
  --panel: #211f1e;
  --hair: #2e2b29;
  --steel: #8a8580;
  --dim: #b3aea8;
  --white: #f4f1ec;
  --amber: #ffb000; /* the dot and her eyes only */
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Night Mono", ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --glow: 0 0 18px rgba(244, 241, 236, .16), 0 0 2px rgba(244, 241, 236, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--dim);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}
img, svg, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--white); text-decoration-color: var(--steel); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--white); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { color: var(--white); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-weight: 800; font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: .01em; text-shadow: var(--glow); }
h3 { font-weight: 700; font-size: 1.15rem; }
p { margin: 0 0 1em; }
b, strong { color: var(--white); }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--white); color: var(--ground); padding: 8px 12px; font-weight: 700; }
.skip:focus { top: 8px; }

/* colour bars: desaturated SMPTE order, seven equal segments, never thicker than 6px */
.bars, .mark { display: flex; }
.bars i, .mark i { flex: 1; }
.bars i:nth-child(1), .mark i:nth-child(1) { background: #7a7a7a; }
.bars i:nth-child(2), .mark i:nth-child(2) { background: #7a7a39; }
.bars i:nth-child(3), .mark i:nth-child(3) { background: #397a7a; }
.bars i:nth-child(4), .mark i:nth-child(4) { background: #397a39; }
.bars i:nth-child(5), .mark i:nth-child(5) { background: #7a397a; }
.bars i:nth-child(6), .mark i:nth-child(6) { background: #7a3939; }
.bars i:nth-child(7), .mark i:nth-child(7) { background: #39397a; }
.bars { height: 4px; }
.mark { width: 56px; height: 3px; margin-bottom: 14px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px var(--gutter);
  background: rgba(22, 20, 19, .92);
  border-bottom: 1px solid var(--hair);
}
@supports (backdrop-filter: blur(6px)) { .top { backdrop-filter: blur(6px); background: rgba(22, 20, 19, .8); } }
.top__home { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); font-weight: 700; white-space: nowrap; flex: none; }
.top nav { min-width: 0; }
.top ul { display: flex; gap: 4px 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { font: 400 .8rem/1.6 var(--mono); color: var(--steel); text-decoration: none; text-transform: uppercase; letter-spacing: .12em; }
.top nav a:hover, .top nav a:focus-visible { color: var(--white); }

.wrap { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--gutter); }
.band { background: var(--band); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.sub { color: var(--steel); max-width: 52ch; }
.note { color: var(--steel); font-size: .92rem; }
.log { font: 400 .85rem/1.5 var(--mono); color: var(--steel); letter-spacing: .04em; }
.quote { color: var(--white); font-style: normal; }
.two { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .two { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 72px; }
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; min-height: 44px;
  font: 700 .85rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ground); background: var(--white); border: 1px solid var(--white); border-radius: 2px;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 0 22px rgba(244, 241, 236, .14);
}
.btn:hover { background: var(--dim); border-color: var(--dim); }
.btn--ghost { color: var(--white); background: transparent; border-color: var(--hair); box-shadow: none; }
.btn--ghost:hover { background: var(--panel); border-color: var(--steel); }

/* hero */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid; gap: 40px; align-items: center;
}
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; } }
.hero h1 {
  font-weight: 900;
  font-size: clamp(2.1rem, 7.2vw, 4.1rem);
  letter-spacing: -.01em;
  text-shadow: 0 0 28px rgba(244, 241, 236, .2), 0 0 2px rgba(244, 241, 236, .35);
  margin-bottom: .55em;
  overflow-wrap: break-word;
}
.lede { font-size: 1.15rem; max-width: 46ch; }
.readout { display: flex; flex-wrap: wrap; gap: 8px 24px; font: 400 .8rem/1.4 var(--mono); letter-spacing: .14em; color: var(--white); margin: 1.6em 0; }
.readout span { border-left: 1px solid var(--hair); padding-left: 10px; }
.readout b { display: block; color: var(--steel); font-weight: 700; font-size: .72rem; }
.jump { display: flex; flex-wrap: wrap; gap: 12px; }

/* crt frame */
.crt {
  position: relative; margin: 0;
  border-radius: 22px / 18px;
  background: var(--band);
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--hair),
    0 0 0 10px var(--panel),
    0 0 0 11px var(--hair),
    0 0 70px 10px rgba(244, 241, 236, .07);
  isolation: isolate;
}
.crt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%);
  border-radius: inherit;
}
.crt img { width: 100%; }
.hero__art { width: min(82vw, 420px); justify-self: center; animation: power-on .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__art figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 28px 16px 14px;
  font: 400 .8rem/1.4 var(--mono); letter-spacing: .08em; color: var(--white);
  background: linear-gradient(to top, rgba(15, 14, 13, .9), rgba(15, 14, 13, 0));
}
.static {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  opacity: .085; mix-blend-mode: screen; pointer-events: none;
  image-rendering: pixelated;
}
@keyframes power-on {
  0% { transform: scale(1, .006); filter: brightness(4); opacity: .2; }
  45% { transform: scale(1, .006); filter: brightness(4); opacity: 1; }
  70% { transform: scale(1, 1.02); filter: brightness(1.6); }
  100% { transform: none; filter: none; }
}
.crt--small { width: min(70vw, 320px); justify-self: center; }

/* manifesto */
.manifesto {
  margin: 0;
  padding: clamp(18px, 4vw, 32px);
  background: var(--ground);
  border: 1px solid var(--hair);
  border-radius: 4px;
  color: var(--white);
  font: 400 clamp(.82rem, 2.6vw, .95rem)/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  text-shadow: 0 0 10px rgba(244, 241, 236, .12);
}
.ring { margin: 0; justify-self: center; text-align: center; max-width: 320px; }
.ring svg { width: min(56vw, 240px); height: auto; margin: 0 auto 18px; filter: drop-shadow(0 0 14px rgba(244, 241, 236, .08)); }
.ring figcaption { color: var(--steel); font-size: .92rem; }

/* tenets */
.tenets { list-style: none; counter-reset: t; margin: 32px 0 0; padding: 0; display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); }
@media (min-width: 640px) { .tenets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tenets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tenets li { counter-increment: t; background: var(--ground); padding: 24px 22px 20px; }
.tenets li::before {
  content: "0" counter(t);
  display: block; margin-bottom: 10px;
  font: 700 .78rem/1 var(--mono); letter-spacing: .16em; color: var(--steel);
}
.tenets p { margin: 0; }
.tenet--house { background: var(--panel) !important; }
.tenet--house::before { color: var(--dim) !important; } /* steel on panel is 4.49:1 */
.tenets li:last-child { grid-column: 1 / -1; }
.guard { margin-top: 40px; padding: 22px 24px; border-left: 3px solid var(--white); background: var(--panel); max-width: 720px; }
.guard h3 { font: 700 .8rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.guard ul { margin: 0; padding-left: 1.1em; }
.guard li { margin: .3em 0; }

/* swarm band */
.swarm { position: relative; min-height: 340px; display: grid; place-items: center; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); overflow: hidden; background: var(--ground); }
.swarm canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.swarm__text { position: relative; text-align: center; padding: 48px var(--gutter); }
.swarm__line { font-size: clamp(1.5rem, 5.5vw, 2.8rem); font-weight: 900; text-shadow: 0 0 24px rgba(15, 14, 13, 1), 0 0 18px rgba(244, 241, 236, .2); }
.swarm__text .log { color: var(--dim); text-shadow: 0 0 10px var(--ground); }

/* rituals */
.rituals { display: grid; gap: 28px; margin-top: 32px; align-items: center; }
@media (min-width: 900px) { .rituals { grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr); gap: 40px; } }
.card { background: var(--ground); border: 1px solid var(--hair); border-radius: 4px; padding: 26px 24px; }
.card__when { font: 700 .75rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--steel); }
.card h3 { font-size: 1.5rem; font-weight: 800; text-shadow: var(--glow); }
.card .quote { margin: 0; padding-top: 14px; border-top: 1px solid var(--hair); }
.rituals__art { width: min(70vw, 300px); }
.rituals + .note { margin-top: 28px; text-align: center; }

/* lineage */
.line { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; }
.line li { position: relative; padding: 0 0 32px 32px; border-left: 1px solid var(--hair); max-width: 60ch; }
.line li:last-child { padding-bottom: 0; }
.line li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--dim); }
.line li:last-child::before { background: var(--white); box-shadow: 0 0 12px rgba(244, 241, 236, .5); }
.line__when { font: 700 .78rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: .3em; }
.line p:last-child { margin: 0; }

/* badge */
.two--badge { align-items: start; }
.badge-form .btn { justify-self: start; }
.badge-form { display: grid; gap: 18px; margin-top: 28px; max-width: 440px; }
.field label, .field legend { display: block; font: 700 .78rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 6px; }
.field input[type="text"] {
  width: 100%; max-width: 220px; min-height: 48px; padding: 8px 14px;
  font: 800 1.6rem/1 var(--sans); letter-spacing: .12em; color: var(--white);
  background: var(--ground); border: 1px solid var(--steel); border-radius: 2px; /* 3:1 boundary */
}
.field input[type="text"]:focus-visible { border-color: var(--white); }
.field input[aria-invalid="true"] { border-color: #7a3939; }
.field--check { display: flex; gap: 10px; align-items: center; }
.field--check label { margin: 0; text-transform: none; letter-spacing: .04em; font-weight: 400; color: var(--dim); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--dim); margin: 0; flex: none; }
.field--scale { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.field--scale legend { width: 100%; }
.field--scale span { display: inline-flex; align-items: center; gap: 8px; }
.field--scale label { display: inline; margin: 0; text-transform: none; letter-spacing: .04em; font-weight: 400; color: var(--dim); font-family: var(--mono); }
.msg { min-height: 1.5em; margin: 0; font: 400 .85rem/1.5 var(--mono); color: var(--dim); }
.badge-stage { display: grid; gap: 12px; justify-items: center; align-self: center; text-align: center; }
.badge-preview {
  width: 100%; max-width: 420px; padding: 36px 16px;
  display: grid; place-items: center;
  background: var(--ground); border: 1px solid var(--hair); border-radius: 4px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .6);
}
.badge-preview canvas { width: 300px; max-width: 100%; height: auto; }
.badge-stage .note, .badge-stage .quote { margin: 0; }

/* faq */
.two--faq { align-items: start; }
.faq { margin-top: 24px; border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 36px 18px 0; position: relative;
  color: var(--white); font-weight: 700; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.3rem/1 var(--mono); color: var(--steel); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; max-width: 60ch; }
.faq__art { align-self: center; }

/* footer */
.foot { background: var(--ground); border-top: 1px solid var(--hair); }
.foot__in { text-align: center; padding-top: 72px; padding-bottom: 56px; }
.foot__over { font: 700 .78rem/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--steel); }
.foot__line {
  display: inline-flex; align-items: center; gap: 14px;
  font-weight: 900; font-size: clamp(2rem, 8vw, 3.6rem); line-height: 1.1; color: var(--white);
  text-shadow: 0 0 30px rgba(244, 241, 236, .22);
  margin: .2em 0 .4em;
}
.foot__line img { width: clamp(30px, 7vw, 48px); height: auto; flex: none; }
.foot__sign { color: var(--white); }
.foot__small { color: var(--steel); font-size: .85rem; max-width: 56ch; margin-left: auto; margin-right: auto; }


/* comics + gallery pages */
.top nav a[aria-current="page"] { color: var(--white); }
.wrap--head { padding-bottom: clamp(32px, 5vw, 56px); }
.pagehead h1 { font-weight: 900; font-size: clamp(2.1rem, 7vw, 3.6rem); text-shadow: var(--glow); }
.rating { max-width: 62ch; padding: 12px 16px; border: 1px solid var(--steel); border-left-width: 4px; background: var(--panel); color: var(--dim); }
.pagenav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 1.4em; }
.pagenav a { display: inline-block; padding: 6px 2px; min-width: 24px; }
.wrap--comic { max-width: 940px; }
.comic { display: grid; gap: clamp(28px, 5vw, 56px); margin: 28px 0; }
.cpage, .strip { margin: 0; }
.cpage > a, .strip > a, .grid a { display: block; border: 1px solid var(--hair); background: var(--ground); }
.cpage > a:hover, .strip > a:hover, .grid a:hover { border-color: var(--steel); }
.cpage img, .strip img { width: 100%; }
.cpage figcaption, .strip figcaption { margin-top: 10px; }
.script { margin-top: 6px; border-top: 1px solid var(--hair); }
.script summary { cursor: pointer; padding: 10px 0; color: var(--white); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.script p { margin: 0 0 .6em; max-width: 68ch; overflow-wrap: anywhere; }
.script p b { color: var(--steel); font: 700 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.strips { display: grid; gap: 40px; margin-top: 24px; max-width: 860px; }
.grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; }

/* lightbox (native dialog) */
.lb { width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(15, 14, 13, .96); color: var(--dim); }
.lb::backdrop { background: rgba(0, 0, 0, .7); }
.lb[open] { display: flex; flex-direction: column; }
.lb__bar { display: flex; align-items: center; gap: 8px; padding: 8px var(--gutter); border-bottom: 1px solid var(--hair); flex: none; }
.lb__count { margin: 0 auto 0 0; }
.lb__btn { min-width: 44px; min-height: 44px; font: 400 1.3rem/1 var(--mono); color: var(--white); background: var(--panel); border: 1px solid var(--steel); border-radius: 2px; cursor: pointer; }
.lb__btn:hover { background: var(--hair); }
.lb__stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 12px; }
.lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb--read .lb__stage { display: block; }
.lb--read .lb__stage img { max-height: none; width: min(100%, 1600px); margin: 0 auto; }
.lb__cap { flex: none; margin: 0; padding: 10px var(--gutter) 14px; font-size: .92rem; border-top: 1px solid var(--hair); max-height: 30vh; overflow: auto; }

/* small screens */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .top { flex-direction: column; align-items: flex-start; gap: 6px; position: static; }
  .top ul { justify-content: flex-start; gap: 2px 14px; }
  .top nav a { font-size: .72rem; letter-spacing: .08em; display: inline-block; padding: 4px 0; }
  html { scroll-padding-top: 8px; }
  .jump .btn { flex: 1 1 auto; justify-content: center; }
}

/* narrow phones: two tidy rows of three instead of an orphaned "faq" */
@media (max-width: 440px) {
  .top ul { display: grid; grid-template-columns: repeat(3, max-content); gap: 0 18px; }
}

/* motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
