/* =========================================================
   RealityDesynced — MONOLITH
   Obsidian ground, monumental wide type, one infrared slit.
   ========================================================= */

:root {
  --ink: #0B0B0C;
  --ink-2: #111112;
  --ink-3: #141416;
  --ink-4: #18181A;
  --line: #1F2023;
  --line-2: #2C2D31;
  --bone: #F4F4F2;
  --titanium: #B9BBC0;
  --steel: #8C8E94;      /* 4.9:1 on ink */
  --dim: #6E7076;        /* large numbers only (3.9:1) */
  --ir: #FF2A1F;         /* the slit */
  --ir-text: #FF4A3D;    /* red text, 5.6:1 on ink */
  --ok: #7FD1A8;
  --wrap: 1400px;
  --gutter: clamp(16px, 3vw, 40px);
  --slit-glow: 0 0 30px 6px rgba(255, 42, 31, .55), 0 0 120px 20px rgba(255, 42, 31, .2);
  /* theme tokens added for light/dark */
  --bar: #08080A;
  --glass: rgba(14,14,16,.96);
  --scrim: rgba(5,5,6,.72);
  --shadow: rgba(0,0,0,.8);
  --grid: rgba(244,244,242,.09);
  --sheen: rgba(244,244,242,.06);
  --scanline: rgba(255,255,255,.018);
  --body-2: #DADBDD;
  --rule: #1A1B1E;
  --edge: #3A3B40;
  --slab-hi: #26272B;
  --stage-top: #141418;
  --cut-line: #2C2D31;
  --grain: .07;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--bone); text-decoration: none; }
a:hover { color: var(--ir-text); }
:focus-visible { outline: 2px solid var(--ir); outline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ir); color: var(--ink); }

/* ---------- type ---------- */
.wide { font-stretch: 125%; font-variation-settings: 'wdth' 125; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; line-height: .9; }
.cap  { font-stretch: 110%; font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--steel); line-height: 1.4; }
.ti   { color: var(--titanium); }
.red  { color: var(--ir-text); }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; max-width: 46ch; }
.display-xl { font-size: clamp(64px, 12.4vw, 178px); line-height: .86; margin: 0; }
.display-lg { font-size: clamp(54px, 8.4vw, 120px); line-height: .85; margin: 0; }
.display-md { font-size: clamp(40px, 5.3vw, 76px); line-height: .92; margin: 0; }
.h2 { font-size: clamp(30px, 3.2vw, 44px); margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--bone); color: var(--ink); padding: 12px 16px; }
.skip:focus { top: 12px; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.pad-top { padding-top: clamp(40px, 6vw, 70px); }
.pad-bottom { padding-bottom: clamp(50px, 7vw, 90px); }
.section { padding-top: clamp(56px, 8vw, 100px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---------- the slit ---------- */
.slit { position: absolute; top: 0; bottom: 0; left: 63%; width: 3px; background: var(--ir); box-shadow: var(--slit-glow); pointer-events: none; }
.slit-host { position: relative; }
.slit-short { bottom: auto; height: 160px; }
@media (prefers-reduced-motion: no-preference) {
  .slit { animation: hum 6s ease-in-out infinite; }
  @keyframes hum { 0%, 100% { opacity: 1; } 48% { opacity: .82; } 50% { opacity: .55; } 52% { opacity: .9; } }
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; cursor: pointer;
  background: var(--bone); color: var(--ink);
  font-weight: 700; font-stretch: 115%; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ir); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: wait; }
.btn-block { width: 100%; }
.lnk {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 6px;
  font-weight: 600; font-stretch: 115%; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-2);
}
.f {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px; background: transparent; cursor: pointer;
  border: 1px solid var(--line-2); color: var(--titanium);
  font-stretch: 110%; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.f:hover { color: var(--bone); border-color: var(--steel); }
.f.on, .f[aria-pressed="true"] { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.f.is-off { opacity: .35; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- header ---------- */
.site-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 24px; padding-bottom: 24px; position: relative; z-index: 20; }
.brand { font-size: 16px; letter-spacing: .02em; }
.site-nav { display: flex; gap: clamp(18px, 2.6vw, 36px); flex-wrap: wrap; }
.site-nav a { color: var(--titanium); padding: 14px 0; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--bone); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ir); }
.head-tools { display: flex; align-items: center; gap: 10px; }
.head-search input {
  width: 190px; min-height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--line-2); color: var(--bone);
  font-stretch: 110%; font-size: 12px; letter-spacing: .12em;
}
.head-search input::placeholder { color: var(--steel); text-transform: uppercase; }
.head-search input:focus { border-color: var(--bone); outline: none; }
.menu-btn { display: none; width: 46px; height: 46px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--bone); transition: transform .2s; }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 26px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 980px) {
  .menu-btn { display: block; }
  .head-search { display: none; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px;
    background: var(--ink); border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; }
}

/* ---------- flash ---------- */
.flash { border-left: 3px solid var(--ir); background: var(--ink-3); padding: 16px 20px; margin: 8px 0 0; }
.flash.ok { border-color: var(--ok); }

/* ---------- home hero ---------- */
.hero { position: relative; height: clamp(520px, 62vw, 680px); overflow: hidden; margin-top: -10px; }
/* The headline box is exactly as wide as the words, so the cut and the slit always meet at 63% of the text. */
.hero-type {
  position: absolute; top: clamp(60px, 9vw, 120px);
  left: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  width: max-content;
}
.hero-type .display-xl { white-space: nowrap; font-variation-settings: 'wdth' 125; }
.hero-left  { position: relative; clip-path: inset(-20px 37% -20px -20px); }
.hero-right { position: absolute; left: 0; top: 0; clip-path: inset(-20px -20px -20px 63%); transform: translate(10px, 16px); color: var(--titanium); }
.hero-type .slit { top: -600px; bottom: -900px; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: clamp(30px, 5vw, 50px); display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.hero-foot p { margin: 0; }
.hero-actions { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.stats { display: flex; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; margin-top: 20px; }
.stat b { display: block; font-stretch: 125%; font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }

@media (max-width: 700px) {
  .hero { height: auto; padding-bottom: 30px; }
  .hero-type { position: relative; left: var(--gutter); top: 0; margin-top: 50px; }
  .hero-right { transform: translate(6px, 10px); }
  .hero .display-xl { font-size: 13.5vw; }
  .hero-type .slit { top: -80px; bottom: -40px; }
  .hero-foot { position: relative; bottom: 0; margin-top: 60px; }
}

/* ---------- latest list ---------- */
.rows { border-bottom: 1px solid var(--line); }
.row {
  position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr) 190px 150px 70px; gap: 20px; align-items: center;
  min-height: 84px; border-top: 1px solid var(--line); padding: 10px 0;
}
.row:hover { background: var(--ink-3); color: var(--bone); }
.row-no { font-stretch: 125%; font-weight: 800; font-size: 22px; color: var(--dim); }
.row:hover .row-no, .row-no.red { color: var(--ir-text); }
.row-title { font-stretch: 105%; font-weight: 600; font-size: clamp(18px, 1.8vw, 24px); letter-spacing: -0.01em; line-height: 1.2; }
@media (max-width: 900px) {
  .row { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 16px 0; }
  .row-no { font-size: 17px; grid-row: span 2; align-self: start; padding-top: 3px; }
  .row .cap:nth-of-type(n+2) { display: none; }
  .row .row-meta { grid-column: 2; }
}

/* ---------- collections ---------- */
.slabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.slab {
  background: linear-gradient(var(--ink-4), var(--ink-2)); border: 1px solid var(--line);
  min-height: 360px; padding: 30px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; transition: border-color .2s;
}
.slab:hover { border-color: var(--line-2); color: var(--bone); }
.slab:hover .slab-num { color: var(--slab-hi); }
.slab-num { font-stretch: 125%; font-weight: 900; font-size: 120px; line-height: .8; color: var(--line); transition: color .2s; }
.slab h3 { font-size: 34px; margin: 10px 0 8px; }
.slab p { margin: 0; line-height: 1.6; }
.slab-count { position: absolute; right: 30px; top: 30px; }

.rule { text-align: center; }
.rule p { margin: 18px auto 0; font-size: clamp(28px, 3.3vw, 46px); line-height: 1.1; max-width: 1100px; }

/* ---------- record (index) ---------- */
.record-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; position: relative; }
.record-head .slit { height: 160px; bottom: auto; }
.record-search { max-width: 380px; width: 100%; }
.record-search p { margin: 0 0 14px; line-height: 1.6; }
.input {
  width: 100%; min-height: 52px; padding: 0 16px;
  background: var(--ink-3); border: 1px solid var(--line-2); color: var(--bone); font-size: 15px;
}
.input:focus { border-color: var(--bone); outline: none; }
textarea.input { padding: 14px 16px; line-height: 1.6; min-height: 140px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--titanium) 50%), linear-gradient(135deg, var(--titanium) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .spacer { flex: 1; }
.filters select.f { appearance: none; padding-right: 18px; background: var(--ink); }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { min-width: 920px; }
.th, .tr { display: grid; grid-template-columns: 90px minmax(0, 1fr) 200px 170px 110px 90px 70px; gap: 20px; align-items: center; }
.th { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.tr { min-height: 70px; border-bottom: 1px solid var(--rule); padding: 10px 0; }
.tr:hover { background: var(--ink-3); color: var(--bone); }
.tr-no { font-stretch: 125%; font-weight: 800; font-size: 18px; color: var(--steel); }
.tr:hover .tr-no { color: var(--ir-text); }
.tr-title { font-stretch: 105%; font-weight: 600; font-size: 19px; line-height: 1.25; }
.st { display: inline-flex; align-items: center; gap: 8px; }
.sq { width: 8px; height: 8px; background: var(--ir); box-shadow: 0 0 10px var(--ir); flex: none; }
.sq.closed { background: var(--dim); box-shadow: none; }
.empty { padding: 60px 0; border-bottom: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 26px; }
.pager-btns { display: flex; gap: 10px; }

@media (max-width: 760px) {
  .table { min-width: 0; }
  .th { display: none; }
  .tr { grid-template-columns: 56px minmax(0, 1fr); gap: 4px 12px; padding: 16px 0; }
  .tr > :nth-child(n+3) { grid-column: 2; }
  .tr > .cap:nth-child(3), .tr > .cap:nth-child(6), .tr > .cap:nth-child(7) { display: none; }
  .tr > :nth-child(4), .tr > :nth-child(5) { display: inline-flex; }
  .tr-no { grid-row: span 3; align-self: start; font-size: 15px; padding-top: 3px; }
}

/* ---------- entry ---------- */
.entry-head { position: relative; }
.entry-ghost { position: absolute; right: 0; top: -20px; font-size: clamp(100px, 16vw, 230px); color: var(--ink-4); pointer-events: none; user-select: none; }
.entry-head > *:not(.entry-ghost) { position: relative; }
.entry-head h1 { margin-top: 18px; max-width: 1000px; }
.stage {
  position: relative; background: linear-gradient(var(--stage-top), var(--ink)); border: 1px solid var(--line);
  overflow: hidden; aspect-ratio: 13 / 4.4;
}
@media (max-width: 760px) { .stage { aspect-ratio: 4 / 3; } }
.stage > img, .stage > video, .stage > svg { width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage > svg { object-fit: cover; }
.stage-cap { position: absolute; left: 24px; bottom: 22px; color: var(--bone); background: rgba(11,11,12,.7); padding: 8px 10px; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb {
  flex: none; width: 120px; height: 76px; border: 1px solid var(--line-2); background: var(--ink-3); cursor: pointer; padding: 0;
  position: relative; overflow: hidden;
}
.thumb[aria-pressed="true"] { border-color: var(--ir); box-shadow: 0 0 0 1px var(--ir); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .cap { position: absolute; inset: auto 6px 6px auto; color: var(--bone); letter-spacing: .14em; font-size: 10px; }
.audio-player { width: 100%; margin-top: 10px; }

.entry-grid { display: flex; gap: clamp(30px, 5vw, 60px); flex-wrap: wrap; }
.entry-body { flex: 999 1 560px; min-width: 0; max-width: 720px; }
.entry-body .first { font-size: clamp(20px, 2vw, 24px); line-height: 1.5; font-weight: 500; margin: 0 0 24px; }
.entry-body p { line-height: 1.8; margin: 0 0 20px; }
.entry-body p:not(.first) { color: var(--titanium); }
.entry-side { flex: 1 1 300px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv span:last-child { text-align: right; }
.addendum { border-left: 3px solid var(--ir); padding: 4px 0 4px 20px; margin-bottom: 18px; }
.addendum p { margin: 8px 0 0; color: var(--titanium); line-height: 1.7; }
.share-row { display: flex; gap: 10px; margin-top: 14px; }

.rels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rel { border: 1px solid var(--line); background: var(--ink-2); padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 150px; justify-content: space-between; }
.rel:hover { border-color: var(--line-2); color: var(--bone); }
.rel .wide { font-size: 26px; color: var(--dim); }
.rel span:last-child { font-weight: 600; font-size: 18px; line-height: 1.3; }

/* ---------- comments ---------- */
.comments { max-width: 860px; }
.c-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.c-item { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
.c-av { width: 44px; height: 44px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-stretch: 125%; font-weight: 800; font-size: 14px; color: var(--titanium); }
.c-item.witness .c-av { border-color: var(--ir); color: var(--ir-text); }
.c-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.c-name { font-weight: 700; }
.c-badge { color: var(--ir-text); border: 1px solid rgba(255, 74, 61, .5); padding: 3px 8px; letter-spacing: .18em; }
.c-body { margin: 10px 0 0; line-height: 1.7; color: var(--body-2); overflow-wrap: anywhere; }
.c-body p { margin: 0 0 10px; }
.c-actions { margin-top: 8px; }
.c-actions button { background: none; border: 0; padding: 10px 0; color: var(--steel); cursor: pointer; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-stretch: 110%; font-weight: 600; min-height: 44px; }
.c-actions button:hover { color: var(--ir-text); }
.c-form { margin-top: 30px; display: grid; gap: 16px; }
.c-form .row2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding-top: 10px; cursor: pointer; line-height: 1.5; }
.check input { width: 20px; height: 20px; accent-color: var(--ir); flex: none; margin: 1px 0 0; }
.counter { text-align: right; }
@media (max-width: 600px) { .c-form .row2 { grid-template-columns: 1fr; } }

/* ---------- forms (submit) ---------- */
.form-grid { display: flex; gap: clamp(30px, 5vw, 60px); flex-wrap: wrap; }
.form-side { flex: 1 1 260px; }
.form-main { flex: 999 1 600px; min-width: 0; display: grid; gap: 26px; }
.field label, .field .label { display: block; margin-bottom: 10px; }
.hint, .field .hint { margin: 8px 0 0; color: var(--steel); font-size: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.choice label {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line-2); cursor: pointer; margin: 0;
}
.choice label:has(input:checked) { border-color: var(--bone); background: var(--ink-3); }
.choice input { accent-color: var(--ir); width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.choice b { display: block; font-stretch: 115%; letter-spacing: .04em; text-transform: uppercase; font-size: 15px; }
.choice small { display: block; color: var(--titanium); font-size: 14px; margin-top: 4px; line-height: 1.5; }
.drop {
  position: relative; border: 1px dashed var(--edge); background: var(--ink-2); min-height: 220px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 30px; cursor: pointer;
}
.field .drop { display: flex; margin: 0; }
.drop.drag, .drop:focus-within { border-color: var(--ir); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .wide { font-size: 24px; }
.files { display: grid; gap: 8px; }
.file-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 1px solid var(--line); background: var(--ink-2); padding: 10px; }
.file-item img, .file-item .ph { width: 64px; height: 48px; object-fit: cover; background: var(--ink-4); display: flex; align-items: center; justify-content: center; }
.file-item button { background: none; border: 1px solid var(--line-2); color: var(--titanium); min-width: 44px; min-height: 44px; cursor: pointer; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 4px; background: var(--line); margin-top: 8px; display: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--ir); transition: width .2s; }
.uploading .progress { display: block; }
.errors { border-left: 3px solid var(--ir); background: var(--ink-3); padding: 16px 20px; }
.errors ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.7; }
.steps { counter-reset: s; margin-top: 30px; }
.steps div { counter-increment: s; display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); color: var(--titanium); line-height: 1.5; }
.steps div::before { content: counter(s, decimal-leading-zero); font-stretch: 125%; font-weight: 800; color: var(--ir-text); flex: none; width: 30px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; justify-content: flex-end; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- prose pages ---------- */
.prose { max-width: 760px; }
.prose h2 { font-stretch: 120%; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; font-size: 22px; margin: 44px 0 12px; }
.prose p, .prose li { color: var(--titanium); line-height: 1.8; }
.prose ul { padding-left: 20px; }

/* ---------- moderation ---------- */
.mod-item { border: 1px solid var(--line); background: var(--ink-2); padding: 22px; display: grid; gap: 14px; margin-bottom: 14px; }
.mod-media { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-media img, .mod-media video { width: 160px; height: 110px; object-fit: cover; background: #000; }
.mod-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mod-actions .f.danger:hover { border-color: var(--ir); color: var(--ir-text); }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

/* ---------- footer ---------- */
.site-foot { margin-top: clamp(70px, 9vw, 110px); padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: center; }
.foot-mark { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.foot-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-nav a { color: var(--titanium); padding: 12px 0; }
.foot-rule { grid-column: 1 / -1; margin: 0; }
@media (max-width: 700px) { .site-foot { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =========================================================
   Futuristic layer — telemetry, console, ledger, HUD, signal
   ========================================================= */
.mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; text-transform: none; }

/* film grain + faint scanlines over everything (pure CSS, no images) */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background:
    repeating-linear-gradient(0deg, var(--scanline) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: var(--grain); mix-blend-mode: overlay;
}

/* ---------- telemetry bar ---------- */
.telemetry { border-bottom: 1px solid var(--line); background: var(--bar); font-size: 11.5px; color: var(--steel); }
.telemetry-in { display: flex; gap: 22px; align-items: center; min-height: 34px; overflow: hidden; white-space: nowrap; }
.telemetry a { color: var(--steel); }
.telemetry a:hover { color: var(--bone); }
.tm-live { display: inline-flex; align-items: center; gap: 8px; color: var(--titanium); }
.tm-item { position: relative; padding-left: 22px; }
.tm-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: var(--line-2); }
.tm-chain { margin-left: auto; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ir); box-shadow: 0 0 0 0 rgba(255,42,31,.6); }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,42,31,.6); } 70% { box-shadow: 0 0 0 8px rgba(255,42,31,0); } 100% { box-shadow: 0 0 0 0 rgba(255,42,31,0); } }
}
@media (max-width: 980px) { .tm-wide { display: none; } }
@media (max-width: 620px) { .tm-chain { display: none; } .telemetry-in { gap: 16px; } }
@media (max-width: 480px) { .tm-clock-item { display: none; } }

/* ---------- console button ---------- */
.console-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 14px; border: 1px solid var(--line-2); color: var(--titanium); }
.console-btn:hover { color: var(--bone); border-color: var(--steel); }
.console-btn kbd, .console kbd { font-size: 10.5px; color: var(--steel); border: 1px solid var(--line-2); padding: 3px 6px; }
@media (max-width: 980px) { .console-btn .cap, .console-btn kbd { display: none; } .console-btn { width: 46px; justify-content: center; padding: 0; } }

/* ---------- console (Ctrl+K) ---------- */
.console {
  width: min(720px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 80px)); margin: 10vh auto auto;
  padding: 0; border: 1px solid var(--line-2); background: var(--glass); color: var(--bone);
  box-shadow: 0 40px 120px var(--shadow), 0 0 0 1px rgba(255,42,31,.08); overflow: hidden;
}
.console[open] { display: flex; flex-direction: column; }
.console::backdrop { background: var(--scrim); backdrop-filter: blur(6px); }
.console-bar { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line-2); position: relative; }
.console-bar::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 30%; background: linear-gradient(90deg, transparent, var(--ir), transparent); }
@media (prefers-reduced-motion: no-preference) { .console-bar::after { animation: sweep 2.4s linear infinite; } @keyframes sweep { from { left: -30%; } to { left: 100%; } } }
.console-prompt { color: var(--ir-text); font-size: 15px; }
.console-bar input { flex: 1; min-height: 62px; background: transparent; border: 0; outline: none; color: var(--bone); font-size: 18px; }
.console-bar input::-webkit-search-cancel-button { display: none; }
.console-meta { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; font-size: 11px; color: var(--steel); border-bottom: 1px solid var(--line); }
.console-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.console-list a { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; color: var(--bone); }
.console-list [aria-selected="true"] a, .console-list a:hover { background: var(--ink-4); box-shadow: inset 2px 0 0 var(--ir); }
.cl-no { font-stretch: 125%; font-variation-settings: 'wdth' 125; font-weight: 800; color: var(--dim); }
[aria-selected="true"] .cl-no { color: var(--ir-text); }
.cl-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-meta { font-size: 11.5px; color: var(--steel); }
.cl-empty { padding: 30px 12px; color: var(--steel); }
.console-foot { display: flex; gap: 20px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12px; flex-wrap: wrap; }
.console-foot a { color: var(--steel); }
.console-foot a:hover { color: var(--bone); }

/* ---------- hero extras ---------- */
.slit-read { position: absolute; left: calc(63% + 14px); top: -18px; font-size: 10.5px; color: var(--ir-text); letter-spacing: .12em; white-space: nowrap; }
.scanbeam { position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,42,31,.06) 70%, rgba(255,74,61,.35) 99%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .scanbeam { animation: beam 7s cubic-bezier(.5,0,.5,1) infinite; }
  @keyframes beam { 0% { top: -120px; } 60%, 100% { top: 105%; } }
  .hero-right { animation: desync 9s steps(1) infinite; }
  @keyframes desync {
    0%, 100% { transform: translate(10px, 16px); }
    91% { transform: translate(18px, 12px); clip-path: inset(-20px -20px 55% 63%); }
    92% { transform: translate(4px, 20px); clip-path: inset(40% -20px -20px 63%); }
    93% { transform: translate(10px, 16px); clip-path: inset(-20px -20px -20px 63%); }
  }
}
@media (max-width: 700px) { .slit-read { display: none; } }

/* ---------- decode effect ---------- */
[data-decode].decoding { color: var(--titanium); }

/* ---------- HUD frame on media ---------- */
.hud-c { position: absolute; width: 22px; height: 22px; border: 0 solid var(--bone); opacity: .75; pointer-events: none; }
.hud-c.hud-tl { left: 14px; top: 14px; border-left-width: 2px; border-top-width: 2px; }
.hud-c.hud-tr { right: 14px; top: 14px; border-right-width: 2px; border-top-width: 2px; }
.hud-c.hud-bl { left: 14px; bottom: 14px; border-left-width: 2px; border-bottom-width: 2px; }
.hud-c.hud-br { right: 14px; bottom: 14px; border-right-width: 2px; border-bottom-width: 2px; }
.hud-tag { position: absolute; right: 44px; top: 18px; font-size: 11px; color: var(--bone); background: rgba(11,11,12,.6); padding: 4px 8px; pointer-events: none; }
.hud-tag::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ir); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 600px) { .hud-tag { right: 40px; top: 16px; font-size: 10px; } }

/* ---------- signal analysis ---------- */
.signal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--ink-2); }
.sig { padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); min-width: 0; color: var(--bone); }
.sig:last-child { border-right: 0; }
.sig b { font-size: 26px; font-weight: 500; line-height: 1.1; }
.sig b small { font-size: 13px; color: var(--steel); }
.sig-note { font-size: 12px; color: var(--titanium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 4px; background: var(--line); display: block; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--titanium), var(--ir)); }
.sig-seal b { color: var(--ok); }
.sig-seal.bad b { color: var(--ir-text); }
a.sig:hover { background: var(--ink-3); color: var(--bone); }
.glyph { width: 100%; height: 26px; display: block; }
.glyph rect { fill: var(--line-2); }
.glyph rect.hot { fill: var(--ir); }
@media (max-width: 900px) { .signal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sig:nth-child(2) { border-right: 0; } .sig:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 420px) { .sig { padding: 16px; } .sig b { font-size: 21px; } }

/* ---------- systems (home) ---------- */
.systems { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.sys { border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 340px; color: var(--bone); position: relative; overflow: hidden; }
a.sys:hover { border-color: var(--line-2); color: var(--bone); }
.sys h3 { font-size: 26px; margin: 0; }
.sys p { margin: 0; line-height: 1.65; flex: 1; }
.sys .glyph { height: 34px; }
.sys-read { font-size: 12px; color: var(--steel); border-top: 1px solid var(--line); padding-top: 12px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 34px; }
.bars i { flex: 1; background: var(--line-2); }
.bars i:nth-child(6) { background: var(--ir); }
.pipe { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--titanium); height: 34px; }
.pipe i { flex: 1; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .pipe i::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 1px; background: var(--ir); animation: flow 1.8s linear infinite; }
  .pipe i:nth-of-type(2)::after { animation-delay: .6s; } .pipe i:nth-of-type(3)::after { animation-delay: 1.2s; }
  @keyframes flow { to { left: 100%; } }
}

/* ---------- ledger page ---------- */
.verify-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: center; border: 1px solid var(--line-2); padding: 22px 24px; background: var(--ink-2); }
.verify-banner.is-ok { box-shadow: inset 3px 0 0 var(--ok); }
.verify-banner.is-bad { box-shadow: inset 3px 0 0 var(--ir); }
.vb-icon { width: 44px; height: 44px; border: 1px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.is-ok .vb-icon { color: var(--ok); } .is-bad .vb-icon { color: var(--ir-text); }
.head-hash { font-size: 12px; color: var(--steel); overflow-wrap: anywhere; text-align: right; }
@media (max-width: 760px) { .verify-banner { grid-template-columns: auto minmax(0, 1fr); } .head-hash { grid-column: 1 / -1; text-align: left; } }
.chain { list-style: none; margin: 0; padding: 0; position: relative; }
.chain::before { content: ""; position: absolute; left: 44px; top: 0; bottom: 0; width: 1px; background: linear-gradient(var(--ir), var(--line-2) 30%); }
.block { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1fr) 200px 110px; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.block-no { font-size: 20px; color: var(--dim); background: var(--ink); position: relative; z-index: 1; text-align: center; padding: 6px 0; }
.block:hover .block-no { color: var(--ir-text); }
.block-title { font-weight: 600; font-size: 18px; color: var(--bone); }
.block-hash { font-size: 11.5px; color: var(--titanium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.block-hash .cap { font-size: 9.5px; margin-right: 6px; }
.block.bad { background: rgba(255,42,31,.05); }
.genesis .block-no { color: var(--steel); }
.sq.ok { background: var(--ok); box-shadow: 0 0 10px rgba(127,209,168,.6); }
@media (max-width: 760px) { .block { grid-template-columns: 64px minmax(0, 1fr); } .block-glyph, .block > .st { grid-column: 2; } .chain::before { left: 31px; } }
.how { margin-top: 30px; border: 1px solid var(--line); padding: 16px 20px; font-size: 13px; color: var(--titanium); line-height: 1.7; }
.how summary { cursor: pointer; min-height: 30px; display: flex; align-items: center; }

/* =========================================================
   Round 3 — point-cloud monolith, boot sequence, cut panels,
   pointer glow, section codes, analysis crosshair
   ========================================================= */
:root { --cut: 16px; --cyan: #7FE3FF; }

/* ---------- hero point field ---------- */
.pointfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero > *:not(.pointfield):not(.floor):not(.scanbeam) { z-index: 2; }
.hero-type { z-index: 2; }
.floor {
  position: absolute; left: -30%; right: -30%; bottom: -10px; height: 46%; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 64px);
  transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 90%); mask-image: linear-gradient(to top, #000 10%, transparent 90%);
}
@media (prefers-reduced-motion: no-preference) {
  .floor { animation: floor 4s linear infinite; }
  @keyframes floor { to { background-position: 0 64px, 0 64px; } }
}
.hero-hud { position: absolute; right: var(--gutter); top: 26px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 10.5px; color: var(--steel); letter-spacing: .1em; z-index: 2; }
.hero-hud span:first-child { color: var(--titanium); }
@media (max-width: 700px) { .hero-hud { display: none; } .pointfield { opacity: .35; } }

/* ---------- chamfered panels ---------- */
.cut { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); position: relative; }
.cut::before, .cut::after { content: ""; position: absolute; width: calc(var(--cut) * 1.42); height: 1px; background: var(--cut-line); pointer-events: none; z-index: 3; }
.cut::before { left: -2px; top: calc(var(--cut) / 2); transform: rotate(-45deg); }
.cut::after { right: -2px; bottom: calc(var(--cut) / 2); transform: rotate(-45deg); background: var(--ir); box-shadow: 0 0 8px var(--ir); }
.stage { clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }

/* ---------- pointer glow on panels ---------- */
.glow { --mx: 50%; --my: 50%; }
.glow > *:not(.glow-fx):not(.slab-count) { position: relative; z-index: 1; }
.glow > .slab-count { z-index: 1; }
.glow .glow-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,42,31,.12), transparent 60%),
              radial-gradient(160px circle at var(--mx) var(--my), var(--sheen), transparent 70%); }
.glow:hover .glow-fx { opacity: 1; }
.glow:hover { border-color: var(--edge); }

/* ---------- section codes + ruler ---------- */
.section-head { position: relative; padding-bottom: 14px; }
.section-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 12px); opacity: .7;
  -webkit-mask-image: linear-gradient(90deg, #000 60%, transparent); mask-image: linear-gradient(90deg, #000 60%, transparent); }
.code { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 500; color: var(--ir-text); border: 1px solid rgba(255,74,61,.45); padding: 4px 7px; margin-right: 16px; letter-spacing: .08em; transform: translateY(-4px); }

/* ---------- record rows: scan sweep on hover ---------- */
.row, .tr { overflow: hidden; }
.row::after, .tr::after { content: ""; position: absolute; top: 0; bottom: 0; left: -30%; width: 30%; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,42,31,.10), transparent); }
.tr { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .row:hover::after, .tr:hover::after { opacity: 1; animation: rowsweep .9s ease-out; }
  @keyframes rowsweep { from { left: -30%; } to { left: 110%; } }
}
.row:hover .row-no::before, .tr:hover .tr-no::before { content: "▸ "; color: var(--ir-text); }

/* ---------- analysis crosshair on media ---------- */
.xh { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .2s; }
.stage:hover .xh { opacity: 1; }
.xh-v, .xh-h { position: absolute; background: rgba(127,227,255,.55); }
.xh-v { top: 0; bottom: 0; width: 1px; left: var(--x, 50%); }
.xh-h { left: 0; right: 0; height: 1px; top: var(--y, 50%); }
.xh-box { position: absolute; width: 44px; height: 44px; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, -50%); border: 1px solid var(--cyan); box-shadow: 0 0 12px rgba(127,227,255,.35); }
.xh-read { position: absolute; left: calc(var(--x, 50%) + 30px); top: calc(var(--y, 50%) + 26px); font-size: 10.5px; color: var(--cyan); background: rgba(11,11,12,.75); padding: 3px 6px; white-space: nowrap; }
@media (hover: none) { .xh { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .stage::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(127,227,255,.6), transparent); animation: stagescan 5s linear infinite; }
  @keyframes stagescan { from { top: 0; } to { top: 100%; } }
}

/* ---------- boot sequence ---------- */
.boot { position: fixed; inset: 0; z-index: 200; background: #050506; display: flex; align-items: center; justify-content: center; transition: opacity .45s, visibility .45s; }
.boot.done { opacity: 0; visibility: hidden; }
.boot-in { width: min(560px, calc(100vw - 40px)); font-size: 13px; color: var(--titanium); line-height: 2; }
.boot-log div::before { content: "› "; color: var(--ir-text); }
.boot-log div:last-child { color: var(--bone); }
.boot-log .ok { color: var(--ok); }
.boot-bar { height: 2px; background: var(--line); margin-top: 18px; }
.boot-bar i { display: block; height: 100%; width: 0; background: var(--ir); box-shadow: 0 0 12px var(--ir); transition: width .15s linear; }
.boot-skip { display: block; margin-top: 12px; font-size: 10.5px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }

/* small polish */
.btn { clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.console { clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }


/* =========================================================
   Light / dark themes
   Dark is the original MONOLITH. Light is "bone": pale stone, black type, the same red slit.
   The theme follows the device setting until the visitor picks one (saved in their browser).
   Evidence viewers and the start-up screen stay dark in both themes.
   ========================================================= */
:root { --pt: 214,216,220; --pt-dust: 244,244,242; }
:root[data-theme="light"] {
  --ink: #F3F2EE; --ink-2: #ECEBE6; --ink-3: #E6E5DF; --ink-4: #DFDED8;
  --line: #D6D5CE; --line-2: #C2C1B9;
  --bone: #0E0E10; --titanium: #3E4046; --steel: #5C5E64; --dim: #7F8187;
  --ir: #FF2A1F; --ir-text: #C4170D; --ok: #1D7A4B;
  --slit-glow: 0 0 22px 4px rgba(255, 42, 31, .35), 0 0 90px 14px rgba(255, 42, 31, .12);
  --bar: #EAE9E3; --glass: rgba(247,246,242,.97); --scrim: rgba(30,30,34,.35); --shadow: rgba(20,20,24,.22);
  --grid: rgba(14,14,16,.11); --sheen: rgba(255,255,255,.55); --scanline: rgba(0,0,0,.022);
  --body-2: #26272B; --rule: #E0DFD8; --edge: #A9A8A0; --slab-hi: #CFCEC7; --cut-line: #B5B4AC;
  --grain: .045; --pt: 30,31,35; --pt-dust: 14,14,16;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
  --ink: #F3F2EE; --ink-2: #ECEBE6; --ink-3: #E6E5DF; --ink-4: #DFDED8;
  --line: #D6D5CE; --line-2: #C2C1B9;
  --bone: #0E0E10; --titanium: #3E4046; --steel: #5C5E64; --dim: #7F8187;
  --ir: #FF2A1F; --ir-text: #C4170D; --ok: #1D7A4B;
  --slit-glow: 0 0 22px 4px rgba(255, 42, 31, .35), 0 0 90px 14px rgba(255, 42, 31, .12);
  --bar: #EAE9E3; --glass: rgba(247,246,242,.97); --scrim: rgba(30,30,34,.35); --shadow: rgba(20,20,24,.22);
  --grid: rgba(14,14,16,.11); --sheen: rgba(255,255,255,.55); --scanline: rgba(0,0,0,.022);
  --body-2: #26272B; --rule: #E0DFD8; --edge: #A9A8A0; --slab-hi: #CFCEC7; --cut-line: #B5B4AC;
  --grain: .045; --pt: 30,31,35; --pt-dust: 14,14,16;
  color-scheme: light;
  }
}
:root[data-theme="light"] :is(.stage, .boot, .thumb, .mod-media) {
  --ink: #0B0B0C; --ink-2: #111112; --ink-3: #141416; --ink-4: #18181A;
  --line: #1F2023; --line-2: #2C2D31; --bone: #F4F4F2; --titanium: #B9BBC0; --steel: #8C8E94; --dim: #6E7076;
  --ir-text: #FF4A3D; --edge: #3A3B40; --cut-line: #2C2D31;
  color-scheme: dark; color: var(--bone);
}
:root[data-theme="light"] .btn:hover { color: #0B0B0C; }
:root[data-theme="light"] .hero-right { color: #75777D; }
:root[data-theme="light"] .slab-num { color: var(--ink-4); }
:root[data-theme="light"] .slab { background: linear-gradient(var(--ink-2), var(--ink)); }
:root[data-theme="light"] .sys { background: linear-gradient(180deg, #FFFFFF, var(--ink-2)); }
:root[data-theme="light"] .scanbeam { background: linear-gradient(180deg, transparent, rgba(255,42,31,.03) 70%, rgba(255,42,31,.16) 99%, transparent); }
:root[data-theme="light"] .glow .glow-fx { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,42,31,.09), transparent 60%), radial-gradient(160px circle at var(--mx) var(--my), var(--sheen), transparent 70%); }
:root[data-theme="light"] body::after { mix-blend-mode: multiply; }
:root[data-theme="light"] .console::backdrop { backdrop-filter: blur(8px) saturate(.8); }
:root[data-theme="light"] .flash, :root[data-theme="light"] .errors { background: #FFFFFF; }
:root[data-theme="light"] .input, :root[data-theme="light"] .drop, :root[data-theme="light"] .file-item { background: #FFFFFF; }
:root[data-theme="light"] .signal, :root[data-theme="light"] .verify-banner, :root[data-theme="light"] .rel, :root[data-theme="light"] .mod-item { background: #FFFFFF; }
:root[data-theme="light"] .block-no { background: var(--ink); }

/* theme switch button */
.theme-btn { position: relative; width: 46px; height: 46px; border: 1px solid var(--line-2); background: transparent; color: var(--titanium); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.theme-btn:hover { color: var(--bone); border-color: var(--steel); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }
html.theme-anim, html.theme-anim * { transition: background-color .35s, color .35s, border-color .35s !important; }
:root[data-theme="light"] .pointfield { opacity: .8; }
@media (max-width: 700px) { :root[data-theme="light"] .pointfield { opacity: .22; } }

/* =========================================================
   The Slit Cube logo — colours per theme
   Dark: stone cube, red core. Light: graphite cube so it holds up on pale stone.
   --cube-cut is the page colour, so the R and D read as cuts through the cube.
   ========================================================= */
:root {
  --cube-top-1: #F4F4F2; --cube-top-2: #D3D5D9;
  --cube-left-1: #C9CBD0; --cube-left-2: #9A9CA2;
  --cube-right-1: #7E8086; --cube-right-2: #4B4D52;
  --cube-core: #FF2A1F; --cube-accent: #B9BBC0; --cube-cut: var(--ink);
}
:root[data-theme="light"] {
  --cube-top-1: #4A4C52; --cube-top-2: #2A2B2F;
  --cube-left-1: #222326; --cube-left-2: #0E0E10;
  --cube-right-1: #5E6066; --cube-right-2: #3A3B40;
  --cube-accent: #7F8187;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --cube-top-1: #4A4C52; --cube-top-2: #2A2B2F; --cube-left-1: #222326; --cube-left-2: #0E0E10;
    --cube-right-1: #5E6066; --cube-right-2: #3A3B40; --cube-accent: #7F8187;
  }
}
/* the start-up screen is always dark */
.boot { --cube-top-1: #F4F4F2; --cube-top-2: #D3D5D9; --cube-left-1: #C9CBD0; --cube-left-2: #9A9CA2; --cube-right-1: #7E8086; --cube-right-2: #4B4D52; --cube-accent: #B9BBC0; --cube-cut: #050506; }

.rd-cube { display: block; flex: none; overflow: visible; }
.rd-cube-glow { filter: blur(1.2px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--bone); }
.brand:hover { color: var(--bone); }
.brand-word { display: flex; flex-direction: column; font-size: 13px; line-height: 1.02; letter-spacing: .01em; }
.brand-cut { display: inline-block; color: var(--titanium); border-left: 2px solid var(--ir); padding-left: 2px; margin-left: 1px; transform: translateY(2px); }
@media (prefers-reduced-motion: no-preference) {
  .brand:hover .rd-cube g[transform^="translate"] { transform: translate(0, 9px); }
  .rd-cube g[transform^="translate"] { transform: translate(0, 5px); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
}
@media (max-width: 1180px) and (min-width: 981px) { .site-head .brand-word { display: none; } }
@media (max-width: 420px) { .site-head .brand-word { font-size: 11px; } }
.foot-brand .brand-word { font-size: 12px; }
.boot-logo { margin-bottom: 22px; }

/* =========================================================
   Round 5 — sample labels, row thumbnails, map, fingerprints
   ========================================================= */
.sample-tag {
  display: inline-flex; align-items: center; vertical-align: middle; margin-left: 10px;
  font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: #1A1100; background: #F2C14E; padding: 2px 7px; line-height: 1.4; white-space: nowrap;
  transform: translateY(-2px);
}
.sample-banner { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 14px 18px; border: 1px dashed #F2C14E; background: rgba(242,193,78,.07); }
.sample-banner .sample-tag { margin-left: 0; transform: none; }
.sample-banner p { margin: 0; line-height: 1.55; color: var(--titanium); }
.sample-banner b { color: var(--bone); }
:root[data-theme="light"] .sample-banner { background: #FFF8E6; border-color: #C9951C; }

/* row thumbnails */
.row-thumb { position: relative; display: block; width: 72px; height: 48px; overflow: hidden; background: #111113; border: 1px solid var(--line-2); flex: none; }
.row-thumb img, .row-thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-thumb:not(.is-real) svg { opacity: .8; }
.row-play { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(11,11,12,.75); }
.row-play::after { content: ""; position: absolute; left: 8px; top: 6px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #F4F4F2; }
.row:hover .row-thumb, .tr:hover .row-thumb { border-color: var(--ir); }
.row { grid-template-columns: 96px 72px minmax(0, 1fr) 190px 150px 60px; }
.th, .tr { grid-template-columns: 76px 72px minmax(0, 1fr) 190px 160px 100px 70px 56px; }
.table { min-width: 1000px; }
@media (max-width: 900px) {
  .row { grid-template-columns: 56px 72px minmax(0, 1fr); align-items: center; }
  .row-no { grid-row: auto; }
  .row .row-meta { grid-column: 3; display: block; }
  .row > .cap:not(.row-meta) { display: none; }
  .row .row-thumb { grid-row: span 2; }
}
@media (max-width: 760px) {
  .table { min-width: 0; }
  .tr { grid-template-columns: 48px 72px minmax(0, 1fr); }
  .tr > :nth-child(2) { grid-row: span 3; grid-column: 2; }
  .tr > :nth-child(n+3) { grid-column: 3; }
  .tr > .cap:nth-child(4), .tr > .cap:nth-child(7), .tr > .cap:nth-child(8) { display: none; }
  .tr > .cap:nth-child(6) { display: inline-flex; }
  .tr-no { grid-row: span 3; }
}

/* ---------- map page ---------- */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.map-stage { position: relative; height: min(72vh, 680px); min-height: 420px; border: 1px solid var(--line-2); background: #0D0D0F; }
.rd-map { position: absolute; inset: 0; background: #0D0D0F; }
:root[data-theme="light"] .rd-map, :root[data-theme="light"] .map-stage { background: #E9E8E2; }
.map-stage .hud-c { z-index: 500; }
.map-hud { position: absolute; left: 16px; bottom: 14px; z-index: 500; display: flex; gap: 14px; font-size: 11px; color: var(--titanium); background: var(--glass); padding: 5px 9px; pointer-events: none; }
.map-fallback { padding: 30px; color: var(--titanium); line-height: 1.6; }
.map-side { border: 1px solid var(--line); background: var(--ink-2); display: flex; flex-direction: column; min-height: 0; max-height: min(72vh, 680px); }
.map-side-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.map-side-head h2 { margin: 0; }
.map-side-head .mono { font-size: 12px; }
.map-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.map-item a { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 12px; color: var(--bone); }
.map-item a:hover { background: var(--ink-4); box-shadow: inset 2px 0 0 var(--ir); color: var(--bone); }
.map-no { font-size: 15px; color: var(--dim); padding-top: 2px; }
.map-item a:hover .map-no { color: var(--ir-text); }
.map-title { display: block; font-weight: 600; line-height: 1.3; }
.map-meta { display: block; font-size: 11.5px; color: var(--steel); margin-top: 4px; }
.map-empty { padding: 20px 12px; color: var(--steel); font-size: 12px; line-height: 1.6; }
.map-note { font-size: 10.5px; color: var(--steel); padding: 12px 18px; margin: 0; border-top: 1px solid var(--line); line-height: 1.6; }
.map-filters .f[disabled] { opacity: .6; }
@media (max-width: 960px) { .map-wrap { grid-template-columns: 1fr; } .map-side { max-height: 420px; } .map-stage { height: 60vh; } }

/* markers: red signal, grey when explained, gold ring on samples */
.rd-pin { background: none; border: 0; }
.rd-pin i { position: absolute; left: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ir); box-shadow: 0 0 0 2px rgba(11,11,12,.85), 0 0 14px rgba(255,42,31,.9); }
.rd-pin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,42,31,.7); }
.rd-pin.is-closed i { background: #8C8E94; box-shadow: 0 0 0 2px rgba(11,11,12,.85); }
.rd-pin.is-closed::after { border-color: rgba(140,142,148,.6); }
.rd-pin.is-sample::after { border-color: #F2C14E; border-style: dashed; }
@media (prefers-reduced-motion: no-preference) {
  .rd-pin:not(.is-closed)::after { animation: pinpulse 2.4s ease-out infinite; }
  @keyframes pinpulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
}
/* Leaflet chrome restyled to match */
.leaflet-container { font-family: 'Archivo', sans-serif; background: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--glass); color: var(--bone); border-radius: 0; box-shadow: 0 20px 50px var(--shadow); border: 1px solid var(--line-2); }
.leaflet-popup-content { margin: 14px 16px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--steel); }
.pop-no { font-size: 10.5px; color: var(--ir-text); letter-spacing: .08em; }
.pop-title { display: block; font-weight: 700; font-size: 15px; margin: 6px 0 4px; color: var(--bone) !important; line-height: 1.3; }
.pop-meta { font-size: 11px; color: var(--steel); }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--glass); color: var(--bone); border-color: var(--line-2); }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--steel); font-size: 10px; }
.leaflet-control-attribution a { color: var(--titanium); }

/* entry page mini map */
.mini-map-wrap { margin-top: 18px; }
.mini-map { height: 180px; border: 1px solid var(--line-2); background: #0D0D0F; }
:root[data-theme="light"] .mini-map { background: #E9E8E2; }
.mini-map-link { display: inline-block; margin-top: 10px; color: var(--titanium); }
.kv.fp code { font-size: 12px; color: var(--titanium); }

/* submit: pin picker, fingerprints, receipt */
.pin-picker { border: 1px solid var(--line-2); background: var(--ink-2); }
.pin-map { height: 280px; background: #0D0D0F; }
:root[data-theme="light"] .pin-map { background: #E9E8E2; }
.pin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--line); }
.pin-bar .mono { font-size: 12px; }
.pin-actions { display: flex; gap: 8px; }
.file-item code.fp { display: block; font-size: 11px; color: var(--ok); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt { margin-top: 26px; border: 1px solid var(--line-2); background: var(--ink-2); padding: 18px 20px; max-width: 900px; }
.receipt-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.receipt-row code { font-size: 12px; color: var(--ok); overflow-wrap: anywhere; }
@media (max-width: 600px) { .receipt-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- lighter motion on phones and low-power devices ----------
   Set by a tiny script in the page head (small screens, data saver, or low-core touch devices).
   The 3D monolith draws one still frame; scanning loops and the grain layer switch off. */
.lite-motion body::after { display: none; }
.lite-motion .scanbeam, .lite-motion .stage::before, .lite-motion .console-bar::after { display: none; animation: none; }
.lite-motion .floor, .lite-motion .slit, .lite-motion .hero-right, .lite-motion .pulse,
.lite-motion .pipe i::after, .lite-motion .rd-pin::after { animation: none !important; }
.lite-motion .hero-right { transform: translate(6px, 10px); }
.lite-motion .glow .glow-fx { display: none; }
.boot[hidden] { display: none !important; }
.sample-banner { margin-bottom: 26px; position: relative; z-index: 1; }

/* =========================================================
   Round 6 — host check, alerts, explanations & votes
   ========================================================= */
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.check-card { border: 1px solid var(--line-2); background: var(--ink-2); padding: 20px 22px; }
.check-card h2 { margin: 0 0 10px; }
.check-card ul { list-style: none; margin: 0; padding: 0; }
.check-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.check-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--steel); }
.is-ok .check-dot { background: var(--ok); }
.is-warn .check-dot { background: #F2C14E; }
.is-fail .check-dot { background: var(--ir); box-shadow: 0 0 8px var(--ir); }
.check-name { font-weight: 600; }
.check-detail { font-size: 12px; color: var(--titanium); margin-top: 3px; overflow-wrap: anywhere; }
.check-fix { font-size: 13px; color: var(--steel); margin-top: 4px; line-height: 1.5; }

/* alerts page */
.alerts-grid { display: flex; gap: clamp(24px, 4vw, 48px); flex-wrap: wrap; margin-top: 10px; }
.alerts-main { flex: 999 1 560px; min-width: 0; display: grid; gap: 28px; }
.alerts-side { flex: 1 1 320px; }
.alert-box { border: 1px solid var(--line-2); background: var(--ink-2); padding: 22px; }
.feed-url { display: block; font-size: 12px; color: var(--titanium); background: var(--ink); border: 1px solid var(--line); padding: 10px 12px; overflow-wrap: anywhere; }
.notice { border: 1px solid var(--line-2); background: var(--ink-2); padding: 26px; margin-bottom: 30px; max-width: 860px; }
.notice h2 { margin: 10px 0 10px; }
.notice p { line-height: 1.6; }
:root[data-theme="light"] .alert-box, :root[data-theme="light"] .notice, :root[data-theme="light"] .check-card { background: #FFFFFF; }
[hidden] { display: none !important; }

/* explanations & votes */
.c-item.explain .c-av { border-color: #7FE3FF; color: #7FE3FF; }
:root[data-theme="light"] .c-item.explain .c-av { border-color: #1A6E8C; color: #1A6E8C; }
.c-lead { color: var(--ok); border-color: currentColor; }
.c-actions { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.c-actions form { margin: 0; }
.vote-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px !important; border: 1px solid var(--line-2) !important; background: transparent; color: var(--titanium) !important; cursor: pointer; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-stretch: 110%; font-weight: 600; }
.vote-btn:hover { border-color: var(--steel) !important; color: var(--bone) !important; }
.vote-btn[aria-pressed="true"] { border-color: var(--ok) !important; color: var(--ok) !important; background: rgba(127,209,168,.08); }
.vote-btn b { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0; font-size: 13px; color: var(--bone); }
.vote-btn[aria-pressed="true"] b { color: var(--ok); }
.kind-pick .choice label { padding: 14px 16px; }
.mod-lead { border-top: 1px dashed var(--line-2); padding-top: 12px; }
.mod-ready { box-shadow: inset 3px 0 0 var(--ok); }
