:root {
  --bg: #060b0e;
  --bg-raised: #0a1217;
  --panel: rgba(12, 23, 29, 0.92);
  --panel-2: #0d1920;
  --line: #1c3740;
  --line-bright: #315965;
  --text: #d7e4e7;
  --muted: #82979d;
  --cyan: #70e2ed;
  --cyan-soft: #9ceef5;
  --red: #d35d62;
  --amber: #d7b16b;
  --green: #67c59b;
  --shadow: 0 24px 70px rgba(0, 0, 0, .36);
  --max: 1220px;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(59, 150, 164, .09), transparent 28rem),
    linear-gradient(rgba(5, 11, 14, .96), rgba(5, 11, 14, .99)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(112, 226, 237, .025) 80px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.013) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.009) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  z-index: -1;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .11;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,.16) 4px);
  mix-blend-mode: multiply;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(112, 226, 237, .12);
  background: rgba(5, 10, 13, .92);
  backdrop-filter: blur(18px);
}

.network-strip {
  min-height: 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 5px max(18px, calc((100vw - var(--max)) / 2));
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .17em;
  color: #738a91;
  border-bottom: 1px solid rgba(112, 226, 237, .08);
  background: #05090b;
}

.network-strip > :last-child { justify-self: end; }
.network-status { color: #aac2c7; }
.network-status i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.nav-shell {
  width: min(var(--max), calc(100% - 36px));
  margin: auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 210px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font: 900 12px/1 ui-monospace, monospace;
  letter-spacing: .12em;
  clip-path: polygon(0 0, 83% 0, 100% 17%, 100% 100%, 17% 100%, 0 83%);
  background: rgba(112, 226, 237, .05);
}
.brand strong { display: block; font-size: 16px; letter-spacing: .22em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; letter-spacing: .17em; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav > a, .nav-group > button {
  border: 0;
  background: transparent;
  text-decoration: none;
  color: #a9bcc1;
  padding: 11px 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.site-nav > a:hover, .nav-group > button:hover, .site-nav > a.active { color: var(--cyan-soft); }
.site-nav .nav-play {
  margin-left: 5px;
  border: 1px solid rgba(112, 226, 237, .52);
  color: var(--cyan-soft);
  padding-inline: 13px;
  background: rgba(112, 226, 237, .06);
}

.nav-group { position: relative; }
.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  padding: 8px;
  background: #091116;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav-group:hover .nav-menu, .nav-group:focus-within .nav-menu { display: grid; }
.nav-menu a { text-decoration: none; padding: 10px 11px; color: #9cb0b5; font-size: 12px; }
.nav-menu a:hover { background: rgba(112, 226, 237, .06); color: var(--cyan-soft); }

.account-slot { margin-left: 4px; }
.account-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-bright);
  text-decoration: none;
  background: #0c171c;
  overflow: hidden;
  color: var(--cyan);
  font-weight: 800;
  font-size: 11px;
}
.account-link img { width: 100%; height: 100%; object-fit: cover; }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: transparent; padding: 8px 10px; font: 700 11px ui-monospace, monospace; }

main { min-height: calc(100vh - 230px); }
.page { width: min(var(--max), calc(100% - 36px)); margin: 0 auto; padding: 58px 0 92px; }
.page-narrow { width: min(880px, calc(100% - 36px)); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font: 800 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .22em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; font-family: "Arial Narrow", "Roboto Condensed", ui-sans-serif, system-ui, sans-serif; text-transform: uppercase; }
h1 { margin-bottom: 18px; font-size: clamp(48px, 8vw, 104px); line-height: .89; letter-spacing: -.045em; }
h2 { font-size: clamp(28px, 4vw, 46px); letter-spacing: -.025em; }
h3 { letter-spacing: .03em; }
p { color: #aebfc3; line-height: 1.72; }
.lead { max-width: 760px; color: #c9d8db; font-size: clamp(17px, 2vw, 21px); line-height: 1.6; }
.muted { color: var(--muted); }

.hero {
  width: min(var(--max), calc(100% - 36px));
  margin: auto;
  padding: clamp(72px, 11vw, 150px) 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr);
  gap: 64px;
  align-items: end;
}
.hero h1 span { display: block; color: var(--cyan); }
.hero-copy { max-width: 770px; }
.hero-copy > p:not(.eyebrow) { max-width: 670px; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--line-bright);
  background: #0b151a;
  color: #c8d7da;
  text-decoration: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan-soft); transform: translateY(-1px); }
.btn-primary { color: #061013; background: var(--cyan); border-color: var(--cyan); }
.btn-primary:hover { color: #02080a; background: var(--cyan-soft); }
.btn-danger { border-color: rgba(211,93,98,.55); color: #f1a5a8; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 10px; }

.notice-panel {
  position: relative;
  padding: 27px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(145deg, rgba(14,30,37,.94), rgba(8,16,20,.96));
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}
.notice-panel::before { content: "PUBLIC NOTICE"; display: block; margin-bottom: 22px; color: var(--red); font: 800 10px ui-monospace, monospace; letter-spacing: .22em; }
.notice-panel strong { display: block; font-size: 23px; line-height: 1.18; text-transform: uppercase; }
.notice-panel p { margin-bottom: 0; font: 12px/1.7 ui-monospace, monospace; color: #8da2a7; }

.status-band {
  border-block: 1px solid var(--line);
  background: rgba(9, 18, 23, .78);
}
.status-band-inner {
  width: min(var(--max), calc(100% - 36px));
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.status-item { padding: 20px 24px; border-left: 1px solid var(--line); }
.status-item:last-child { border-right: 1px solid var(--line); }
.status-item small { display: block; margin-bottom: 6px; color: var(--muted); font: 700 9px ui-monospace, monospace; letter-spacing: .16em; }
.status-item strong { font-size: 14px; color: #d3e1e4; }
.status-item .online { color: var(--green); }

.section { margin-top: 82px; }
.section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 28px; }
.section-head p { max-width: 600px; margin-bottom: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.info-card, .system-card, .archetype-card {
  padding: 25px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(12,23,29,.88), rgba(7,14,18,.92));
}
.info-card:hover, .system-card:hover, .archetype-card:hover { border-color: var(--line-bright); }
.card-code { color: #5f7a82; font: 700 9px ui-monospace, monospace; letter-spacing: .17em; }
.info-card h3, .system-card h3, .archetype-card h3 { margin: 38px 0 11px; font-size: 21px; }
.info-card p, .system-card p, .archetype-card p { margin: 0; font-size: 14px; }

.page-header { max-width: 880px; margin-bottom: 55px; }
.page-header h1 { font-size: clamp(46px, 7vw, 82px); }

.prose-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 62px; align-items: start; }
.prose-nav { position: sticky; top: 128px; border-left: 1px solid var(--line); padding-left: 20px; }
.prose-nav a { display: block; padding: 8px 0; text-decoration: none; color: var(--muted); font-size: 12px; }
.prose-nav a:hover { color: var(--cyan); }
.prose section { scroll-margin-top: 130px; margin-bottom: 62px; }
.prose section h2 { margin-bottom: 15px; }
.prose section p { max-width: 760px; }

.cortex-hero {
  padding: 48px;
  border: 1px solid #314a51;
  background: linear-gradient(115deg, rgba(29,43,48,.78), rgba(9,17,21,.96));
  position: relative;
  overflow: hidden;
}
.cortex-hero::after {
  content: "CORTEX";
  position: absolute;
  right: -15px;
  bottom: -32px;
  color: rgba(255,255,255,.025);
  font-weight: 950;
  font-size: 130px;
  letter-spacing: -.06em;
}
.cortex-seal {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 2px solid #afc0c3;
  border-radius: 50%;
  color: #afc0c3;
  font: 900 17px ui-monospace, monospace;
  box-shadow: inset 0 0 0 7px rgba(175,192,195,.05);
}
.redaction { background: #020304; color: #020304; padding: 0 5px; user-select: none; }
.redaction:hover { color: #8c9ca0; }

.command-box {
  margin: 18px 0;
  padding: 18px 20px;
  border-left: 2px solid var(--cyan);
  background: #050a0d;
  color: #94f0f7;
  font: 13px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px 180px auto;
  gap: 10px;
  margin: 26px 0;
}
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #071015;
  color: #d9e5e7;
  border-radius: 0;
  padding: 12px 13px;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(112,226,237,.08); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
label { display: block; margin-bottom: 7px; color: #a7babf; font-size: 12px; font-weight: 750; }
.field-help { margin: 6px 0 0; color: #657b82; font-size: 11px; }

.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.character-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  border: 1px solid var(--line);
  background: #091217;
  transition: .15s ease;
}
.character-card:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 20px 45px rgba(0,0,0,.26); }
.character-portrait { aspect-ratio: 4 / 5; position: relative; overflow: hidden; background: linear-gradient(135deg, #102129, #091217); }
.character-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.84) contrast(1.03); }
.portrait-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #27414a; font: 900 clamp(38px, 8vw, 72px) ui-monospace, monospace; }
.character-portrait::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -90px 80px -70px rgba(0,0,0,.75); pointer-events: none; }
.character-status { position: absolute; top: 11px; right: 11px; z-index: 2; padding: 5px 7px; background: rgba(4,10,12,.8); border: 1px solid #28434b; color: #b5c5c8; font: 700 9px ui-monospace, monospace; text-transform: uppercase; }
.character-card-body { padding: 18px; }
.character-card-body h3 { margin: 0 0 5px; font-size: 21px; }
.character-meta { color: var(--cyan); font: 700 10px ui-monospace, monospace; letter-spacing: .07em; text-transform: uppercase; }
.character-quote { margin: 13px 0 0; color: #8fa2a7; font-size: 12px; font-style: italic; line-height: 1.5; }

.character-detail {
  display: grid;
  grid-template-columns: minmax(270px, 380px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.character-detail .character-portrait { border: 1px solid var(--line-bright); position: sticky; top: 128px; }
.character-title { margin-bottom: 25px; }
.character-title h1 { font-size: clamp(50px, 7vw, 88px); margin-bottom: 12px; }
.character-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag { padding: 6px 8px; border: 1px solid var(--line); color: #8fa5aa; font: 700 10px ui-monospace, monospace; text-transform: uppercase; }
.wiki-section { padding: 27px 0; border-top: 1px solid var(--line); }
.wiki-section h2 { margin-bottom: 12px; font-size: 24px; }
.wiki-copy { color: #adbec2; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.character-tools { display: flex; gap: 9px; margin: 22px 0 4px; }

.form-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.form-panel { padding: 28px; border: 1px solid var(--line); background: rgba(10,18,23,.82); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-field.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; padding-top: 23px; border-top: 1px solid var(--line); margin-top: 24px; }
.portrait-uploader { position: sticky; top: 128px; }
.portrait-preview { aspect-ratio: 4/5; border: 1px dashed #31505a; background: #081116; overflow: hidden; display: grid; place-items: center; margin-bottom: 13px; }
.portrait-preview img { width: 100%; height: 100%; object-fit: cover; }
.portrait-preview span { color: #456069; font: 750 11px ui-monospace, monospace; text-align: center; padding: 20px; }
.file-input { width: 100%; color: #8da2a8; font-size: 11px; }
.file-input::file-selector-button { margin-right: 10px; border: 1px solid var(--line-bright); color: #c1d1d4; background: #0a151a; padding: 9px 10px; cursor: pointer; }

.empty-state { border: 1px dashed #28444d; padding: 54px 28px; text-align: center; color: #82979d; }
.empty-state h3 { color: #c0d0d3; }

.callout { padding: 22px; border-left: 2px solid var(--amber); background: rgba(215,177,107,.055); }
.callout strong { color: #e1c48e; }
.callout p:last-child { margin-bottom: 0; }

.timeline { border-left: 1px solid var(--line-bright); margin-left: 5px; padding-left: 28px; }
.timeline-item { position: relative; margin: 0 0 30px; }
.timeline-item::before { content:""; position:absolute; left:-34px; top:5px; width:10px; height:10px; background:var(--bg); border:2px solid var(--cyan); border-radius:50%; }
.timeline-item small { color: var(--cyan); font: 700 10px ui-monospace, monospace; }
.timeline-item h3 { margin: 7px 0; }

.play-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 30px; }
.connection-card { padding: 30px; border: 1px solid var(--line-bright); background: #081116; }
.connection-value { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 15px; background: #03080a; color: var(--cyan); font: 700 14px ui-monospace, monospace; }
.copy-btn { border: 0; color: #8da4aa; background: transparent; cursor: pointer; font: 700 10px ui-monospace, monospace; }
.copy-btn:hover { color: white; }

.site-footer {
  width: min(var(--max), calc(100% - 36px));
  margin: auto;
  padding: 33px 0 50px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 30px;
  color: #71878d;
  font-size: 11px;
}
.site-footer strong { color: #b6c8cc; letter-spacing: .18em; margin-right: 12px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--cyan); }
.site-footer small { grid-column: 1 / -1; font: 700 9px ui-monospace, monospace; letter-spacing: .18em; color: #435960; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: 360px; padding: 12px 15px; border: 1px solid var(--line-bright); background: #081216; color: #c9d7da; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .16s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.loading { min-height: 280px; display: grid; place-items: center; color: #6d848b; font: 700 11px ui-monospace, monospace; letter-spacing: .14em; }


.page-wide { width: min(calc(var(--max) + 60px), calc(100% - 36px)); }
.page-tight-top { padding-top: 0; }
.hero-rich { padding-bottom: 34px; }
.hero-image-band { padding-bottom: 24px; }
.immersive-image {
  position: relative;
  border: 1px solid rgba(112, 226, 237, .18);
  background: #091116;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.immersive-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 8, 10, .18), transparent 35%), linear-gradient(to right, rgba(5, 11, 14, .12), transparent 35%, transparent 65%, rgba(5, 11, 14, .12));
  pointer-events: none;
}
.immersive-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.immersive-image-hero img { min-height: clamp(360px, 42vw, 620px); }
.section-head-stack { display: block; }
.section-head-stack p:last-child { max-width: 920px; margin-top: 14px; }
.section-headless-gap { margin-top: 0; }
.feature-strip { margin-top: 24px; }
.story-stack { display: grid; gap: 18px; }
.story-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .95fr);
  gap: 22px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(9, 17, 22, .84);
  box-shadow: var(--shadow);
}
.story-panel-reverse { grid-template-columns: minmax(330px, .95fr) minmax(0, 1fr); }
.story-panel-reverse .story-copy { order: 2; }
.story-panel-reverse .story-image { order: 1; }
.story-copy { align-self: center; }
.story-copy h3 { font-size: clamp(26px, 3vw, 40px); margin-bottom: 12px; }
.story-copy p:last-child { margin-bottom: 0; }
.story-image {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid rgba(112, 226, 237, .14);
  background: #081116;
}
.story-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 9, 11, .12), transparent 34%);
  pointer-events: none;
}
.story-image img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: block;
  object-fit: cover;
}
.statement-banner {
  padding: 28px;
  border: 1px solid rgba(112, 226, 237, .18);
  background: linear-gradient(160deg, rgba(11, 22, 28, .95), rgba(7, 13, 17, .98));
}
.statement-banner blockquote {
  margin: 14px 0 16px;
  color: var(--cyan-soft);
  font: 800 clamp(24px, 3.3vw, 44px)/1.08 "Arial Narrow", "Roboto Condensed", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.prose-grid-rich { align-items: start; }
.prose-image-block {
  margin: 32px 0;
  border: 1px solid rgba(112, 226, 237, .15);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.prose-image-block img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.cortex-hero-rich {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr);
  gap: 24px;
  align-items: stretch;
}
.cortex-copy {
  padding: 42px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(150deg, rgba(12, 25, 31, .95), rgba(6, 12, 15, .98));
}
.cortex-image-card {
  overflow: hidden;
  border: 1px solid rgba(112, 226, 237, .17);
  background: #081116;
  box-shadow: var(--shadow);
}
.cortex-image-card img { width: 100%; height: 100%; min-height: 100%; display: block; object-fit: cover; }
.world-statements { margin-top: 54px; }

@media (max-width: 1050px) {
  .site-nav { display: none; position: absolute; top: 100%; left: 18px; right: 18px; padding: 12px; border: 1px solid var(--line); background: #071015; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav > a, .nav-group > button { text-align: left; width: 100%; }
  .nav-menu { position: static; display: grid; box-shadow: none; border: 0; border-left: 1px solid var(--line); margin-left: 11px; background: transparent; }
  .nav-toggle { display: block; }
  .account-slot { order: 3; }
  .hero { grid-template-columns: 1fr; }
  .notice-panel { max-width: 560px; }
  .story-panel, .story-panel-reverse, .cortex-hero-rich { grid-template-columns: 1fr; }
  .story-panel-reverse .story-copy, .story-panel-reverse .story-image { order: initial; }
  .cortex-copy { padding: 30px; }
  .character-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .network-strip { grid-template-columns: 1fr auto; }
  .network-code { display: none; }
  .nav-shell { height: 64px; }
  .brand { min-width: 0; }
  .brand small { display: none; }
  .brand strong { font-size: 13px; }
  .hero { padding-top: 70px; gap: 36px; }
  .status-band-inner { grid-template-columns: 1fr 1fr; }
  .status-item:nth-child(3) { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .status-item:nth-child(4) { border-top: 1px solid var(--line); }
  .grid-3, .grid-2, .play-panel, .form-shell, .character-detail, .prose-grid { grid-template-columns: 1fr; }
  .story-panel { padding: 18px; }
  .story-image img { min-height: 260px; }
  .page-wide { width: min(var(--max), calc(100% - 36px)); }
  .prose-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px 15px; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 18px; }
  .character-grid { grid-template-columns: repeat(2, 1fr); }
  .character-detail .character-portrait, .portrait-uploader { position: static; max-width: 420px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .input { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .section-head { display: block; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
}

@media (max-width: 470px) {
  .network-strip { display: none; }
  .page, .hero { width: min(100% - 24px, var(--max)); }
  h1 { font-size: 48px; }
  .character-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .input { grid-column: auto; }
  .status-band-inner { width: calc(100% - 24px); }
  .status-item { padding: 16px 12px; }
  .cortex-hero { padding: 30px 22px; }
}

/* Forum */
.discord-signin { border-color: rgba(112, 226, 237, .72); }

.forum-hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 22px;
  align-items: stretch;
  margin: 28px 0 58px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(9, 17, 22, .86);
  box-shadow: var(--shadow);
}
.forum-hero-strip img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(112,226,237,.14);
}
.forum-hero-strip > div {
  align-self: center;
  padding: 22px;
}
.forum-hero-strip h2 { margin-bottom: 12px; }

.forum-category-list,
.forum-thread-list,
.forum-post-list {
  display: grid;
  gap: 10px;
}

.forum-category-row {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) 82px 82px minmax(150px, 210px);
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 14px 18px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(8, 16, 20, .88);
  transition: .15s ease;
}
.forum-category-row:hover,
.forum-thread-row:hover {
  border-color: var(--line-bright);
  background: rgba(12, 25, 31, .94);
  transform: translateY(-1px);
}
.forum-category-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  color: var(--cyan);
  font: 900 10px ui-monospace, monospace;
  letter-spacing: .08em;
  background: rgba(112,226,237,.04);
}
.forum-category-title {
  color: #d7e4e7;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.forum-category-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.forum-category-stats,
.forum-category-activity {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.forum-category-stats strong {
  display: block;
  color: #d2e0e3;
  font: 800 18px ui-monospace, monospace;
}
.forum-category-stats small,
.forum-category-activity small,
.forum-thread-stat small,
.forum-thread-time small {
  display: block;
  color: #627a81;
  font: 700 8px ui-monospace, monospace;
  letter-spacing: .12em;
}
.forum-category-activity span,
.forum-thread-time span {
  display: block;
  margin-top: 5px;
  color: #91a6ab;
  font-size: 10px;
  line-height: 1.4;
}

.forum-breadcrumbs {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 34px;
  color: #71878d;
  font: 700 10px ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.forum-breadcrumbs a { color: var(--cyan); text-decoration: none; }
.forum-breadcrumbs strong { color: #a9bcc1; }

.forum-thread-row {
  display: grid;
  grid-template-columns: 120px minmax(0,1fr) 82px minmax(150px, 210px);
  gap: 14px;
  align-items: center;
  min-height: 84px;
  padding: 15px 18px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(8, 16, 20, .88);
  transition: .15s ease;
}
.forum-thread-state { display: flex; gap: 6px; flex-wrap: wrap; }
.forum-thread-copy h3 {
  margin: 0 0 5px;
  font-size: 17px;
  text-transform: none;
  letter-spacing: .01em;
}
.forum-thread-copy p { margin: 0; font-size: 11px; color: #71878d; line-height: 1.4; }
.forum-thread-stat,
.forum-thread-time { border-left: 1px solid var(--line); padding-left: 14px; }
.forum-thread-stat strong { display: block; font: 800 18px ui-monospace, monospace; color: #d2e0e3; }

.forum-thread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 28px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.forum-thread-header h1 {
  margin-bottom: 12px;
  max-width: 920px;
  font-size: clamp(38px, 6vw, 72px);
  text-transform: none;
  line-height: 1;
}
.forum-mod-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.forum-post {
  display: grid;
  grid-template-columns: 190px minmax(0,1fr);
  border: 1px solid var(--line);
  background: rgba(8, 16, 20, .86);
}
.forum-post-staff { border-color: rgba(112,226,237,.30); }
.forum-post-author {
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(5, 11, 14, .48);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.forum-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: #0b151a;
  color: var(--cyan);
  font: 900 12px ui-monospace, monospace;
}
.forum-avatar img { width: 100%; height: 100%; object-fit: cover; }
.forum-post-author strong { color: #d7e4e7; overflow-wrap: anywhere; }
.forum-post-author small { color: #60767c; font: 700 8px ui-monospace, monospace; letter-spacing: .10em; }
.forum-post-content { min-width: 0; }
.forum-post-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: #61777d;
  font: 700 9px ui-monospace, monospace;
  letter-spacing: .07em;
}
.forum-post-body {
  min-height: 135px;
  padding: 24px;
  color: #b8c7ca;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.forum-reply-shell { margin-top: 34px; }
.forum-compose { margin-top: 24px; }
.forum-textarea { min-height: 230px; }

@media (max-width: 960px) {
  .forum-hero-strip { grid-template-columns: 1fr; }
  .forum-category-row { grid-template-columns: 48px minmax(0,1fr) 70px 70px; }
  .forum-category-activity { display: none; }
  .forum-thread-row { grid-template-columns: 100px minmax(0,1fr) 70px; }
  .forum-thread-time { display: none; }
  .forum-thread-header { display: block; }
  .forum-mod-tools { justify-content: flex-start; margin-top: 20px; }
}

@media (max-width: 680px) {
  .forum-category-row { grid-template-columns: 44px minmax(0,1fr); }
  .forum-category-stats { display: none; }
  .forum-thread-row { grid-template-columns: 1fr; }
  .forum-thread-state { order: 2; }
  .forum-thread-stat { display: none; }
  .forum-post { grid-template-columns: 1fr; }
  .forum-post-author {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
  }
  .forum-post-author small { margin-left: auto; }
}
