/* NeuralYogi / Rage Industries — plate lock. Not LT-1 Palette A.
   Primary: black, paper, gray. Secondary: steel, mist. Highlight: red only. */
:root {
  --chassis: #0D0D0D;
  --paper: #F2F0EA;
  --silk: #F2F0EA;
  --white: #FFFFFF;
  --red: #E10600;
  --ink: #0D0D0D;
  --steel: #3A3A3A;
  --gray: #6B6B6B;
  --mute: #6B6B6B;
  --mist: #C5C5C0;
  --font-sans: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --rule: 2px solid var(--ink);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--steel); }
button, input, textarea, select { font: inherit; color: inherit; background: transparent; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-cond); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--silk);
  background: var(--chassis);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* silk-screen grain — no drop shadows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.11;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

body.theme-paper {
  color: var(--ink);
  background: var(--silk);
  color-scheme: light;
}
body.theme-paper::before { mix-blend-mode: multiply; opacity: 0.14; }

.wrap {
  width: min(var(--max), calc(100% - 2.4rem));
  margin: 0 auto;
  padding-bottom: 4.5rem;
}

/* —— nav —— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: var(--rule);
  background: var(--chassis);
  color: var(--silk);
}
body.theme-paper .site-nav {
  background: var(--silk);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: none;
}
.wordmark {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark:hover { color: inherit; }
.wordmark .ri {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  background: var(--red);
  color: var(--silk);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a { text-decoration: none; color: var(--gray); }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--mist); }

/* —— chrome plates / ofuda —— */
.plate {
  position: relative;
  background: var(--silk);
  color: var(--ink);
  border-radius: 3px;
  padding: 2.1rem 1.7rem 1.8rem;
  margin: 1.6rem 0;
}
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.09;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23p)'/></svg>");
}
.screw {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background:
    linear-gradient(var(--chassis), var(--chassis)) center / 8px 1.4px no-repeat,
    linear-gradient(var(--chassis), var(--chassis)) center / 1.4px 8px no-repeat,
    var(--steel);
}
.screw.tl { top: 11px; left: 11px; }
.screw.tr { top: 11px; right: 11px; }
.screw.bl { bottom: 11px; left: 11px; }
.screw.br { bottom: 11px; right: 11px; }

.ofuda {
  position: relative;
  background: var(--silk);
  color: var(--ink);
  margin: 1.8rem 0 2.4rem;
  padding: 2.2rem 1.6rem 2rem;
  border: 2px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.hero-art {
  margin: 1.5rem 0 0;
}
.hero-art img,
.plate img,
.ofuda img { width: 100%; }

.kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.85rem;
}
.field-head {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.9rem;
}
.byline, .bench, .mono {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
}
.lede { margin-top: 0.85rem; max-width: 42em; }
.lede + .lede, .stack > * + * { margin-top: 0.85rem; }

.status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-top: 1.35rem;
  color: var(--ink);
}
.status .dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--red);
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: 1px;
}

.rule {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 1.4rem 0 1.15rem;
  position: relative;
}
.rule.dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: var(--red);
  border-radius: 50%;
}

/* —— lanes / tables —— */
.lanes {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: 0.6rem;
}
.lanes th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gray);
  padding: 0.45rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid var(--ink);
}
.lanes td {
  padding: 0.75rem 0.7rem 0.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  vertical-align: top;
}
.lanes td:first-child {
  font-family: var(--font-cond);
  font-weight: 700;
  white-space: nowrap;
  padding-right: 1.4rem;
  width: 8.5rem;
}
.lanes a { text-decoration: none; }
.lanes a:hover { color: var(--steel); }

.close {
  margin-top: 1.4rem;
  max-width: 46em;
}

/* —— four cells (how we work) —— */
.cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--silk);
  margin: 1.4rem 0;
}
.cell {
  padding: 1.15rem 1rem 1.05rem;
  border-right: 1px solid color-mix(in srgb, var(--silk) 35%, transparent);
  background: var(--steel);
  color: var(--silk);
  min-height: 11.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.cell:last-child { border-right: 0; }
.cell .num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--mist);
}
.cell h3 {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cell p { font-size: 0.88rem; color: var(--mist); }
.cell.support {
  background: var(--red);
  color: var(--white);
  border-right: 0;
}
.cell.support .num,
.cell.support p,
.cell.support h3 { color: var(--white); }

.how-copy { display: grid; gap: 1.1rem; margin-top: 0.4rem; }
.how-copy article h3 { margin-bottom: 0.25rem; }
.how-copy .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray);
}

.hanko {
  width: min(280px, 70%);
  margin: 1.6rem auto 0;
}

/* —— essays cards —— */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
  align-items: stretch;
}
.card {
  display: grid;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.card:hover { color: inherit; }
.card h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.card .go { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gray); }
.card-only {
  padding: 1.4rem 0.2rem 0.4rem;
}
.card-only h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); }

/* —— forms —— */
form {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.1rem;
  max-width: 34rem;
}
label {
  display: grid;
  gap: 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
input, textarea, select {
  border: 1px solid var(--ink);
  padding: 0.55rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0;
}
textarea { min-height: 7.5rem; resize: vertical; }
.btn {
  justify-self: start;
  border: 0;
  background: var(--ink);
  color: var(--silk);
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.62rem 1.15rem;
  letter-spacing: 0.01em;
}
.btn:hover { background: var(--steel); color: var(--silk); }
.note-local {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-top: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--ink);
}
.intent {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 0.85rem 0 0.2rem;
}
.bullets {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}
.bullets li { margin: 0.25rem 0; }
.repo {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 1.1rem;
}

/* —— footer —— */
.site-foot {
  margin-top: 2.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--gray);
}
.site-foot .brand { color: inherit; }
.esc { letter-spacing: 0.12em; }

.stamp-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
}
.stamp {
  width: 2.1rem;
  height: 2.1rem;
  background: var(--red);
  color: var(--silk);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  flex: 0 0 auto;
}

.pair {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.1rem;
}

@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cells { grid-template-columns: 1fr 1fr; }
  .cell:nth-child(2) { border-right: 0; }
  .cell:nth-child(1), .cell:nth-child(2) { border-bottom: 1px solid color-mix(in srgb, var(--silk) 35%, transparent); }
  .nav-links { font-size: 0.64rem; gap: 0.2rem 0.75rem; }
  .lanes td:first-child { white-space: normal; width: auto; }
}
@media (max-width: 520px) {
  .cells { grid-template-columns: 1fr; }
  .cell { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--silk) 35%, transparent); }
  .cell:last-child { border-bottom: 0; }
}

/* Un-notched hinomaru + small red rectangle accent */
.hinomaru {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  flex-shrink: 0;
}
.wordmark { gap: 0.6rem; }
.rect {
  display: inline-block;
  width: 28px;
  height: 7px;
  background: var(--red);
  vertical-align: middle;
}
.site-foot .esc::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 6px;
  background: var(--red);
  margin-right: 10px;
  vertical-align: middle;
}
body { font-size: 17px; }
.hero-art.strip { min-height: 0; display: grid; align-content: center; }
.doors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 1.05rem;
}
.doors .btn { text-decoration: none; }
.first-screen { margin-top: 1.4rem; }
.first-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 1fr);
  gap: 1.2rem 1.6rem;
  align-items: center;
}
.first-grid picture,
.first-grid img { width: 100%; }
.first-copy h1 { font-size: clamp(1.7rem, 3.6vw, 2.55rem); }
.cards.one { grid-template-columns: minmax(0, 26rem); }
.how-more {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin: 0.2rem 0 1.4rem;
}
@media (max-width: 800px) {
  .first-grid { grid-template-columns: 1fr; }
}
.go {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 0.45rem;
}
.cell.live .go,
.cell.support .go { color: var(--white); }

/* —— three cells (work strip). Red fill is a stamp: Matrix, SEND. Mute cells are steel. —— */
.cells-3 { grid-template-columns: repeat(3, 1fr); }
.cell.live {
  background: var(--red);
  color: var(--white);
}
.cell.live .num,
.cell.live p,
.cell.live h3 { color: var(--white); }
@media (max-width: 760px) {
  .cells-3 { grid-template-columns: 1fr 1fr; }
  .cells-3 .cell:nth-child(2) { border-right: 0; }
}
@media (max-width: 520px) {
  .cells-3 { grid-template-columns: 1fr; }
}

a.cell {
  text-decoration: none;
  color: inherit;
}
a.cell:hover { color: inherit; }
a.cell.live:hover h3 { text-decoration: underline; text-underline-offset: 3px; }

/* Recompose wells — ofuda, not a dashboard. Red only when that well actually updated. */
.wells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 1.4rem 0 0.2rem;
  border: 2px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.well {
  background: var(--silk);
  color: var(--ink);
  padding: 1.05rem 0.95rem 1rem;
  min-height: 7.5rem;
  border-right: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  user-select: none;
}
.well:last-child { border-right: 0; }
.well .value {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.well.hole .reason {
  font-size: 0.88rem;
  color: var(--gray);
}
.well.hole .value { display: none; }
.well.fresh {
  background: var(--red);
  color: var(--white);
  border-right-color: transparent;
}
.well.fresh .field-head,
.well.fresh .value,
.well.fresh .reason { color: var(--white); }
@media (max-width: 760px) {
  .wells { grid-template-columns: 1fr; }
  .well { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); min-height: 5.5rem; }
  .well:last-child { border-bottom: 0; }
}

.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.1rem;
  border: 1px solid var(--ink);
}
.key {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--steel);
  color: var(--silk);
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  padding: 0.85rem 0.7rem 0.8rem;
  cursor: pointer;
  text-align: left;
}
.key:last-child { border-right: 0; }
.key .num { display: block; color: var(--mist); margin-bottom: 0.25rem; }
.key.live { background: var(--red); color: var(--white); }
.key.live .num { color: var(--white); }
.essay-well {
  margin-top: 1.2rem;
  padding: 1.2rem 1rem 1.1rem;
  border: 2px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.essay-well .go { margin-top: 0.7rem; }
.well a { color: inherit; }
.well.fresh a { color: inherit; }
@media (max-width: 760px) {
  .keys { grid-template-columns: 1fr; }
  .key { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); }
  .key:last-child { border-bottom: 0; }
}

.gallery {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 1.1rem;
}
.gallery .key {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  border-right: 0;
  padding: 0.9rem 0.35rem;
  letter-spacing: 0.14em;
}
.gallery-well {
  min-width: 0;
  border: 2px solid var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  padding: 1rem 1rem 1.05rem;
}
.gallery-well .card { display: none; }
.gallery-well .card.is-on { display: grid; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-well { grid-column: 1 / -1; order: -1; }
  .gallery .key { writing-mode: horizontal-tb; transform: none; }
}

.how-more.mute,
.how-more.mute a,
.site-foot .brand a {
  color: var(--gray);
}

.home-body {
  margin: 1.15rem 0 0;
  max-width: 46em;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
a.key { text-decoration: none; color: inherit; }
a.key:hover { color: inherit; }
.supply-send {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.75rem;
  writing-mode: horizontal-tb;
  transform: none;
  letter-spacing: 0.22em;
}

.supply-so {
  margin: 0 0 1rem;
  max-width: 46em;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
