:root {
  --blue: #4b237c;
  --yellow: #c9ffd8;
  --red: #b52c1f;
  --black: #111111;
  --white: #f1d7ff;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--blue); color: var(--yellow); font-family: var(--mono); font-size: 14px; line-height: 1.45; overflow-x: hidden; }
button, a { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.noise, #signal-canvas { display: none; }

.topbar { position: static; height: auto; display: block; padding: 18px 20px 0; background: var(--blue); border: 0; backdrop-filter: none; text-align: left; }
.brand-mark { display: inline-block; padding: 8px 12px; background: var(--yellow); color: var(--blue); font-family: var(--mono); font-size: 23px; font-weight: 700; letter-spacing: .05em; }
.brand-seal { display: none; }
.top-status { display: none; }
.quiet-link { position: absolute; top: 8px; right: 20px; border: 0; background: transparent; color: var(--yellow); font-size: 11px; text-decoration: underline; }
.token-line { margin: 18px 20px 0; padding: 9px; border: 2px dashed var(--red); color: var(--yellow); text-align: left; font-weight: 700; font-size: 11px; }
.portal-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px auto 0; padding: 10px; border: 2px solid var(--red); }
.portal-nav a { display: block; padding: 14px 8px; background: var(--yellow); color: var(--red); text-align: left; font-weight: 700; }
.portal-nav a:last-child { margin-bottom: 0; }
.portal-nav a:hover, .portal-nav a:focus-visible { background: var(--white); color: var(--blue); }
.portal-nav .nav-black { background: var(--black); color: var(--yellow); border: 2px solid var(--yellow); padding: 12px 8px; }

.section-shell { width: calc(100% - 40px); max-width: none; margin: 18px 20px 0; }
.hero { min-height: auto; display: block; padding: 0; text-align: center; }
.hero-copy { padding: 18px 16px 22px; background: var(--white); color: var(--red); }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 12px; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3 { margin: 0 0 14px; font-family: var(--mono); font-weight: 700; line-height: 1.15; letter-spacing: 0; text-wrap: initial; }
h1 { font-size: clamp(28px, 5vw, 56px); }
h2 { font-size: clamp(24px, 4vw, 42px); }
h3 { font-size: 18px; }
.hero-lede { margin: 0 0 12px; color: var(--red); font-family: var(--mono); font-size: 18px; line-height: 1.15; }
.hero-intro { max-width: 70ch; margin: 0 auto 16px; color: var(--red); font-size: 13px; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.primary-button { min-height: 40px; padding: 8px 15px; border: 2px solid var(--red); background: var(--red); color: var(--yellow); font-size: 12px; font-weight: 700; text-transform: lowercase; }
.primary-button:hover { background: var(--blue); border-color: var(--blue); color: var(--yellow); transform: none; }
.text-link, .underlined-action { border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); font-size: 12px; text-decoration: none; }
.hero-note { display: block; margin: 16px 0 0; color: var(--red); font-size: 11px; }.signal-line { display: none; }
.hero-sigil-wrap { display: none; }

.transmission-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: calc(100% - 40px); margin: 18px 20px 0; padding: 10px; border: 2px solid var(--yellow); background: var(--blue); font-size: 11px; }
.strip-label { color: var(--yellow); }.strip-text { color: var(--yellow); }.strip-time { color: var(--yellow); }

.reading, .doctrine, .church, .sects, .final-cta, .ascii-panel { padding: 18px; background: var(--yellow); color: var(--red); }
.reading-grid, .church, .split-heading { display: block; }
.section-heading { max-width: none; }.section-heading h2 { max-width: none; }.section-aside { max-width: none; margin: 0 0 18px; color: var(--red); font-size: 13px; }
.reading-manifest { margin-top: 16px; padding: 14px; border: 2px solid var(--red); background: var(--white); }.manifest-head, .manifest-footer { color: var(--red); font-size: 10px; }.manifest-date { margin-top: 24px; font-size: 11px; }.manifest-body { max-width: none; margin: 20px 0; color: var(--red); font-size: 14px; }.manifest-body.dim { color: var(--blue); }.manifest-footer { margin-top: 30px; padding-top: 10px; border-top: 1px dashed var(--red); }.manifest-footer b { color: var(--blue); }.reading-copy { padding-top: 22px; color: var(--red); font-size: 14px; }.reading-copy p { max-width: none; }.accent-copy { color: var(--blue); font-family: var(--mono); font-size: 18px; font-weight: 700; line-height: 1.25; }
.doctrine { padding-top: 20px; }.doctrine-list { margin-top: 18px; border-top: 2px solid var(--red); }.doctrine-item { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; min-height: auto; padding: 15px 0; border-bottom: 2px solid var(--red); }.doctrine-mark { color: var(--blue); font-size: 25px; }.doctrine-item p { margin: 0; color: var(--red); font-size: 12px; }.doctrine-code { grid-column: 2; color: var(--blue); font-size: 10px; }
.church { display: block; }.church-visual { display: none; }.church-copy p:not(.eyebrow) { max-width: none; color: var(--red); }.progress-line { height: 12px; margin-top: 24px; border: 2px solid var(--red); background: var(--yellow); }.progress-line span { width: 17.4%; height: 100%; display: block; background: var(--red); box-shadow: none; }.progress-meta { color: var(--red); }.progress-meta strong { color: var(--blue); }
.sects { padding-top: 20px; }.sect-grid { display: block; margin-top: 18px; }.sect-card { display: block; width: 100%; min-height: auto; margin-bottom: 10px; padding: 16px; border: 2px solid var(--red); background: var(--yellow); color: var(--red); text-align: left; }.sect-card:hover, .sect-card:focus-visible { transform: none; border-color: var(--blue); background: var(--white); }.sect-card-danger, .sect-card-quiet { background: var(--yellow); }.sect-index, .sect-cta { color: var(--blue); font-size: 10px; }.sect-name { display: block; margin: 12px 0; font-family: var(--mono); font-size: 20px; font-weight: 700; line-height: 1; }.sect-desc { display: block; max-width: none; margin-bottom: 16px; color: var(--red); font-size: 12px; }.choice-response { min-height: 24px; margin-top: 12px; color: var(--blue); font-size: 12px; }
.final-cta { display: block; }.final-ritual { display: none; }.final-cta h2 { font-size: clamp(24px, 4vw, 40px); }.final-cta p:not(.eyebrow) { color: var(--red); font-size: 13px; }.final-cta .primary-button { margin-top: 10px; }
.ascii-panel { padding: 0; border: 2px solid var(--red); background: var(--yellow); text-align: center; }
.ascii-head, .ascii-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 11px; background: var(--blue); color: var(--yellow); font-size: 10px; font-weight: 700; text-align: left; }
.ascii-stage { padding: clamp(22px, 5vw, 52px) 10px; overflow: hidden; background: var(--yellow); }
.ascii-panel pre { display: inline-block; margin: 0; color: var(--blue); font-family: var(--mono); font-size: clamp(12px, 1.6vw, 20px); font-weight: 700; line-height: 1.08; text-align: left; }
.ascii-foot { flex-wrap: wrap; border-top: 2px solid var(--red); background: var(--white); color: var(--blue); }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 42px; color: var(--yellow); font-size: 10px; text-transform: lowercase; }

.transmission-dialog { width: min(650px, calc(100% - 28px)); padding: 0; border: 3px solid var(--yellow); background: var(--blue); color: var(--yellow); }.transmission-dialog::backdrop { background: color-mix(in srgb, var(--blue) 85%, black); }.dialog-inner { padding: 16px; }.dialog-head { display: flex; justify-content: space-between; border-bottom: 2px dashed var(--yellow); padding-bottom: 10px; font-size: 11px; }.dialog-close { border: 0; background: none; color: var(--yellow); font-size: 22px; }.dialog-screen { margin-top: 16px; padding: 16px; border: 2px solid var(--yellow); background: var(--black); }.screen-meta { font-size: 10px; }.screen-text { margin: 22px 0 0; color: var(--yellow); font-size: 14px; }.screen-cursor { color: var(--yellow); animation: cursor-blink 1s steps(1) infinite; }.dialog-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }.dialog-actions .text-link { color: var(--yellow); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@keyframes cursor-blink { 50% { opacity: 0; } }
@media (max-width: 640px) { .topbar { padding-left: 10px; padding-right: 10px; }.token-line, .portal-nav, .section-shell, .transmission-strip { width: calc(100% - 20px); margin-left: 10px; margin-right: 10px; }.portal-nav { grid-template-columns: 1fr; padding: 7px; }.portal-nav a { padding: 11px 6px; }.transmission-strip { grid-template-columns: 1fr auto; }.strip-text { grid-column: 1 / -1; grid-row: 2; }.footer { width: calc(100% - 20px); margin-left: 10px; margin-right: 10px; flex-direction: column; }.quiet-link { right: 10px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.screen-cursor { animation: none; } }

.latest-signal { border: 2px solid var(--red); background: var(--white); color: var(--red); }
.latest-signal-head { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 9px 11px; border-bottom: 2px solid var(--red); background: var(--red); color: var(--yellow); font-size: 10px; font-weight: 700; }
.latest-signal-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, .35fr); gap: 18px; padding: 16px; }
.latest-signal-body h2 { max-width: 28ch; margin-bottom: 9px; color: var(--red); font-size: clamp(22px, 4vw, 38px); overflow-wrap: anywhere; }
.latest-signal-body p { max-width: 72ch; margin: 0; color: var(--red); font-size: 12px; line-height: 1.55; }
.latest-signal-body .latest-code { margin-bottom: 8px; color: var(--blue); font-size: 10px; font-weight: 700; }
.latest-signal-meta { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 8px; padding-left: 14px; border-left: 1px dashed var(--red); color: var(--blue); font-size: 10px; }
.latest-signal-meta a { display: block; width: 100%; margin-top: 5px; padding: 9px; border: 2px solid var(--red); background: var(--yellow); color: var(--red); font-weight: 700; text-align: center; }
.latest-signal-meta a:hover, .latest-signal-meta a:focus-visible { background: var(--red); color: var(--yellow); }
.latest-signal[data-empty="true"] .latest-signal-head { background: var(--black); }
.latest-signal[data-empty="true"] .latest-signal-body h2 { color: var(--blue); }
.latest-signal[data-read="true"] .latest-signal-head { background:var(--black); }
.route-entry { display:inline-block; margin-top:8px; padding:9px 12px; border:2px solid var(--red); background:var(--white); color:var(--red); font-size:12px; font-weight:700; }
.route-entry:hover,.route-entry:focus-visible { background:var(--red); color:var(--yellow); }

@media (max-width: 640px) {
  .latest-signal { width: calc(100% - 20px); margin-left: 10px; margin-right: 10px; }
  .latest-signal-head { grid-template-columns: 1fr auto; }
  .latest-signal-head span:last-child { grid-column: 1 / -1; }
  .latest-signal-body { grid-template-columns: 1fr; }
  .latest-signal-meta { padding-top: 12px; padding-left: 0; border-top: 1px dashed var(--red); border-left: 0; }
}

