/* Straata Screen — public surface.
   Palette: void black, membrane ice, synthetic violet, operator gold. */

:root {
  --void: #04060a;
  --panel: #080c13;
  --panel-2: #0b1019;
  --ink: #e8eef7;
  --muted: #8fa0b5;
  --faint: #5f6f83;
  --line: #17202c;
  --line-2: #223042;
  --ice: #7de3ff;
  --violet: #b08bff;
  --mint: #7cf5d4;
  --gold: #e7c88b;
  --warn: #f0c96e;
  --bad: #ff8390;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 16px;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 16px/1.62 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 10% -8%, rgba(125, 227, 255, 0.09), transparent 66%),
    radial-gradient(820px 620px at 94% 10%, rgba(176, 139, 255, 0.075), transparent 64%),
    radial-gradient(760px 720px at 50% 108%, rgba(124, 245, 212, 0.045), transparent 62%);
}

.wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}

h1, h2, h3, h4 { letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }
a { color: inherit; }
code, pre, .mono { font-family: var(--mono); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: #000;
  padding: 10px 14px;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(4, 6, 10, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(125, 227, 255, 0.55);
  border-radius: 7px;
  transform: rotate(45deg);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(176, 139, 255, 0.7);
  border-radius: 4px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--ice), var(--violet));
}

.brand-text {
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand-text strong {
  display: block;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
  font-size: 15px;
}
.brand-text sup { color: var(--gold); font-size: 9px; }

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 13.5px;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--ink); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(124, 245, 212, 0.12);
}

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(46px, 7vw, 92px) 0 clamp(34px, 5vw, 62px); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: center;
}

.eyebrow,
.kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice);
  margin: 0 0 14px;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 4.6vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 680;
}
h1 em { font-style: normal; color: var(--ice); }

@supports (-webkit-background-clip: text) or (background-clip: text) {
  h1 em {
    background: linear-gradient(100deg, var(--ice), var(--violet) 82%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.lede {
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: #c8d5e4;
}
.lede strong { color: var(--ink); font-weight: 650; }

.lede-sub {
  max-width: 60ch;
  color: var(--muted);
  font-size: 0.97rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(100deg, var(--ice), #a9d9ff 55%, var(--violet));
  color: #061018;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: #33465c; background: rgba(255, 255, 255, 0.04); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.hero-stats dt {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}
.hero-stats dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hero-note {
  margin: 0;
  font-size: 12px;
  color: var(--faint);
  max-width: 58ch;
}

/* ----------------------------------------------------------------- stage */

.stage {
  position: relative;
  min-height: 400px;
  aspect-ratio: 5 / 4.1;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(120% 100% at 50% 0%, #0a1420, #04060a 72%);
  box-shadow: var(--shadow);
}
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.65);
}
#membrane-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.stage-read {
  position: absolute;
  top: 22px;
  left: 24px;
  right: 24px;
  z-index: 1;
}
.stage-read span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}
.stage-read p {
  margin: 9px 0 0;
  max-width: 16ch;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: rgba(232, 238, 247, 0.74);
}

.stage-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.66);
  backdrop-filter: blur(8px);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.stage-caption strong {
  color: var(--ice);
  font-weight: 650;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.stage[data-state="black"] .stage-caption strong,
.stage[data-state="regen"] .stage-caption strong { color: var(--violet); }
.stage[data-state="black"] .stage-caption .status-dot,
.stage[data-state="regen"] .stage-caption .status-dot {
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(176, 139, 255, 0.16);
}
.stage[data-state="watch"] .stage-caption strong { color: var(--warn); }
.stage[data-state="watch"] .stage-caption .status-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(240, 201, 110, 0.14);
}
.stage-note {
  position: absolute;
  right: 18px;
  bottom: 20px;
  z-index: 1;
  margin: 0;
  max-width: 44%;
  text-align: right;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--faint);
}

/* --------------------------------------------------------------- section */

.section {
  padding: clamp(58px, 8vw, 100px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 88px;
}
h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.1vw, 2.7rem);
  line-height: 1.1;
  font-weight: 660;
}
.section-lede {
  max-width: 74ch;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 1.01rem;
}
h3 { font-size: 1rem; margin: 0 0 8px; font-weight: 650; }
.aside {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--faint);
  max-width: 88ch;
}

/* ---------------------------------------------------------------- console */

.console {
  border: 1px solid var(--line-2);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0f18, #06090e 70%);
  box-shadow: var(--shadow);
}

.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.console-id {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.rec {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(255, 131, 144, 0.1);
}
.micro-badge {
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 8px;
}

.console-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.action-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 3px;
}
.probe {
  appearance: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #cfdaE8;
  font: inherit;
  font-size: 12px;
  padding: 7px 12px;
  cursor: pointer;
}
.probe:hover {
  border-color: rgba(125, 227, 255, 0.45);
  color: #fff;
  background: rgba(125, 227, 255, 0.07);
}
.probe-quiet { color: var(--muted); }
.probe:active { transform: translateY(1px); }

.panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.pane {
  position: relative;
  padding: 20px;
  min-width: 0;
}
.origin { border-right: 1px solid var(--line); }
.observer { transition: background-color 240ms ease; }
.observer[data-mode="watch"] {
  background: linear-gradient(180deg, rgba(240, 201, 110, 0.035), transparent 60%);
}
.observer[data-mode="synthetic"] {
  background: linear-gradient(180deg, rgba(176, 139, 255, 0.085), rgba(8, 11, 17, 0.4));
}
.observer[data-mode="synthetic"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: repeating-linear-gradient(0deg, rgba(176, 139, 255, 0.07) 0 1px, transparent 1px 3px);
  animation: screenScan 7s linear infinite;
}

@keyframes screenScan {
  from { background-position: 0 0; }
  to { background-position: 0 42px; }
}

.pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.pane-head h3 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 2px;
}
.pane-head p {
  margin: 0;
  font-size: 11.5px;
  color: var(--faint);
}
.pane-tag {
  flex: none;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 3px 6px;
}
.observer[data-mode="synthetic"] .pane-tag {
  color: var(--violet);
  border-color: rgba(176, 139, 255, 0.45);
}

.asset-list { display: grid; gap: 8px; }

.asset {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}
.asset[data-synthetic="true"] {
  border-color: rgba(176, 139, 255, 0.26);
  background: rgba(176, 139, 255, 0.045);
}
.asset-ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(125, 227, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(125, 227, 255, 0.22), rgba(176, 139, 255, 0.16));
  position: relative;
}
.asset-ico::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 2px;
  border: 1px solid rgba(232, 238, 247, 0.55);
}
.asset[data-synthetic="true"] .asset-ico {
  border-color: rgba(176, 139, 255, 0.45);
  background: linear-gradient(135deg, rgba(176, 139, 255, 0.3), rgba(125, 227, 255, 0.08));
}
.asset-body { display: flex; flex-direction: column; min-width: 0; }
.asset-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.asset-detail {
  font-size: 10.5px;
  color: var(--faint);
  font-family: var(--mono);
  overflow-wrap: anywhere;
}
.asset-state {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint);
}
.synth-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--violet);
  border: 1px solid rgba(176, 139, 255, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.pane-foot {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--faint);
}

/* ---------------------------------------------------------------- readout */

.readout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.meter-card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.015);
  min-width: 0;
}
.meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.chip[data-state="clear"] {
  color: var(--mint);
  border-color: rgba(124, 245, 212, 0.32);
  background: rgba(124, 245, 212, 0.07);
}
.chip[data-state="watch"] {
  color: var(--warn);
  border-color: rgba(240, 201, 110, 0.35);
  background: rgba(240, 201, 110, 0.07);
}
.chip[data-state="black"] {
  color: var(--violet);
  border-color: rgba(176, 139, 255, 0.45);
  background: rgba(176, 139, 255, 0.09);
}
.chip[data-state="regen"] {
  color: var(--ice);
  border-color: rgba(125, 227, 255, 0.4);
  border-style: dashed;
  background: rgba(125, 227, 255, 0.06);
}
.sus {
  font-family: var(--mono);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.track {
  height: 6px;
  margin: 14px 0 0;
  border-radius: 999px;
  background: #131c28;
  overflow: hidden;
}
.track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--warn) 48%, var(--violet));
  transition: width 260ms ease;
}
.thresholds {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
}
.journal {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  min-height: 3.1em;
}

.feature-card h3 {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.feature-list { display: grid; gap: 8px; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(50px, 1.6fr) 34px;
  align-items: center;
  gap: 9px;
}
.f-label { font-size: 10.5px; color: var(--muted); }
.f-track {
  height: 4px;
  border-radius: 999px;
  background: #131c28;
  overflow: hidden;
}
.f-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(125, 227, 255, 0.65), var(--violet));
  transition: width 220ms ease;
}
.f-val {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.feature-note {
  margin: 12px 0 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--faint);
}

/* ----------------------------------------------------------------- tables */

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
  padding: 0 18px 18px;
}
.table-card,
.log-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.015);
  min-width: 0;
}
.table-card h3,
.log-card h3 {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.table-scroll { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; }
.sessions { font-size: 12px; min-width: 500px; }
.sessions th {
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--line);
}
.sessions td {
  padding: 9px 10px 9px 0;
  border-bottom: 1px solid rgba(23, 32, 44, 0.65);
  vertical-align: middle;
}
.sessions tr:last-child td { border-bottom: 0; }
.sessions tr.is-active td { background: rgba(125, 227, 255, 0.035); }
.sessions tr.is-active td:first-child { box-shadow: inset 2px 0 0 var(--ice); }
.s-name { display: block; font-weight: 600; }
.s-id {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--faint);
}
.s-class { color: var(--muted); font-size: 11px; }
.s-score {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
}
.s-action { color: var(--muted); font-size: 10.5px; }
.mini-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  white-space: nowrap;
}
.mini-chip[data-state="clear"] { color: var(--mint); border-color: rgba(124, 245, 212, 0.28); }
.mini-chip[data-state="watch"] { color: var(--warn); border-color: rgba(240, 201, 110, 0.3); }
.mini-chip[data-state="black"] { color: var(--violet); border-color: rgba(176, 139, 255, 0.4); }
.mini-chip[data-state="regen"] { color: var(--ice); border-color: rgba(125, 227, 255, 0.35); }

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 208px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 10.5px;
}
.log li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(23, 32, 44, 0.55);
  color: var(--muted);
}
.log li:last-child { border-bottom: 0; }
.log-empty { display: block; color: var(--faint); padding: 6px 0; }
.log-time { color: var(--faint); }
.log-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-path code { color: #c4d3e4; }
.log-verdict {
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--line-2);
}
.log-verdict[data-state="clear"] { color: var(--mint); border-color: rgba(124, 245, 212, 0.28); }
.log-verdict[data-state="watch"] { color: var(--warn); border-color: rgba(240, 201, 110, 0.3); }
.log-verdict[data-state="black"] { color: var(--violet); border-color: rgba(176, 139, 255, 0.4); }

.notice {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 2px solid var(--warn);
  background: rgba(240, 201, 110, 0.06);
  color: #d8c7a3;
  font-size: 13px;
}

/* ------------------------------------------------------------- comparison */

.compare-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.012);
}
.compare-table { min-width: 640px; font-size: 13.5px; }
.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare-table thead th {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}
.compare-table thead th:nth-child(3) { color: var(--ice); }
.compare-table tbody th {
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.compare-table td { color: #c3d0df; }
.compare-table td:last-child { color: var(--ink); }
.compare-table tr:last-child th,
.compare-table tr:last-child td { border-bottom: 0; }

/* ----------------------------------------------------------- state cards */

.state-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.state-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 70%);
  overflow: hidden;
}
.state-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--tone, var(--ice)), transparent);
}
.state-card[data-tone="clear"] { --tone: var(--mint); }
.state-card[data-tone="watch"] { --tone: var(--warn); }
.state-card[data-tone="black"] { --tone: var(--violet); }
.state-card[data-tone="regen"] { --tone: var(--ice); }
.state-index {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--tone, var(--ice));
}
.state-card h3 { margin: 10px 0 8px; font-size: 1.2rem; }
.state-card p { color: var(--muted); font-size: 13px; }
.state-card ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--faint);
}
.state-card li { position: relative; padding-left: 13px; margin: 5px 0; }
.state-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tone, var(--ice));
  opacity: 0.7;
}

/* ---------------------------------------------------------------- algo */

.pipeline {
  margin: 0 0 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(125, 227, 255, 0.025);
  color: #b8c9dc;
  font-size: 11.5px;
  line-height: 1.85;
  overflow-x: auto;
}

.algo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}
.formula-card,
.feature-table-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  background: rgba(255, 255, 255, 0.014);
  min-width: 0;
}
.formula-card h3 {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.formula {
  margin: 0;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #05080d;
  color: #b9d8e8;
  font-size: 11.5px;
  line-height: 1.8;
  overflow-x: auto;
}
.params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 16px 0 0;
}
.params div { border-top: 1px solid var(--line); padding-top: 8px; }
.params dt {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.params dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
}
.formula-note {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--faint);
}
.feature-table-card .feature-table { min-width: 430px; font-size: 11.5px; }
.feature-table th {
  text-align: left;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  padding: 0 10px 8px 0;
  border-bottom: 1px solid var(--line);
}
.feature-table td {
  padding: 9px 10px 9px 0;
  border-bottom: 1px solid rgba(23, 32, 44, 0.6);
  color: var(--muted);
  vertical-align: top;
}
.feature-table td:first-child {
  font-family: var(--mono);
  color: var(--ice);
  white-space: nowrap;
}
.feature-table td:last-child { text-align: right; color: var(--ink); }
.feature-table tr:last-child td { border-bottom: 0; }

/* ------------------------------------------------------------- synthetic */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: start;
}

.property-list { list-style: none; margin: 0; padding: 0; }
.property-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.property-list li:first-child { padding-top: 0; }
.property-list li:last-child { border-bottom: 0; }
.property-list strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 2px;
}
.property-list span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

.world-card {
  border: 1px solid rgba(176, 139, 255, 0.28);
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(176, 139, 255, 0.08), rgba(6, 9, 14, 0.4)),
    var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.world-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--violet);
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(176, 139, 255, 0.22);
}
.world-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 16px 0;
}
.world-grid div { min-width: 0; }
.world-grid dt {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.world-grid dd {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: #d9c9f5;
  overflow-wrap: anywhere;
}
.world-token {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(176, 139, 255, 0.22);
}
.world-token span {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.world-token code {
  font-size: 11.5px;
  color: var(--violet);
  overflow-wrap: anywhere;
}
.world-note {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--faint);
}

/* ---------------------------------------------------------------- deploy */

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.deploy-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  background: rgba(255, 255, 255, 0.014);
}
.deploy-card h3 {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ice);
  margin-bottom: 6px;
}
.deploy-card p { margin: 0; font-size: 12.5px; color: var(--muted); }

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--line);
}
.metrics div {
  background: var(--panel);
  padding: 16px 18px;
}
.metrics span {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- limits */

.limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 34px;
  border-top: 1px solid var(--line);
}
.limit {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.limit h3 { font-size: 12.5px; color: var(--gold); margin-bottom: 4px; }
.limit p { margin: 0; font-size: 12.5px; color: var(--muted); }

.closing {
  margin-top: clamp(44px, 6vw, 72px);
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(125, 227, 255, 0.08), transparent 58%),
    radial-gradient(120% 130% at 100% 100%, rgba(176, 139, 255, 0.09), transparent 58%),
    var(--panel);
}
.closing h2 { max-width: 20ch; }
.closing p { max-width: 62ch; color: var(--muted); font-size: 14.5px; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--line);
  /* Bottom room for the fixed Straata Shadow badge. */
  padding: 34px 0 72px;
}
.foot-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand strong { display: block; font-size: 13px; }
.foot-brand span { display: block; font-size: 11.5px; color: var(--faint); }
.foot-links { display: flex; gap: 18px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-legal {
  width: 100%;
  margin: 8px 0 0;
  font-size: 10.5px;
  color: #465568;
}

/* ----------------------------------------------------------------- admin */

.notfound-title { font-size: clamp(2rem, 5vw, 3.4rem); }

.admin-main {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 80px) clamp(18px, 4vw, 40px) 72px;
}
.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.admin-head h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 6px 0 8px;
  line-height: 1.1;
}
.admin-head p { color: var(--muted); font-size: 13px; margin: 0; max-width: 62ch; }
.operator-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(231, 200, 139, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  background: rgba(255, 255, 255, 0.014);
}
.admin-card h2 {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.admin-card dl { margin: 0; display: grid; gap: 9px; }
.admin-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(23, 32, 44, 0.7);
  padding-bottom: 7px;
}
.admin-card dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-card dt { font-size: 11.5px; color: var(--faint); }
.admin-card dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.admin-card p { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.admin-card p:last-child { margin-bottom: 0; }
.admin-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.admin-list li { margin: 6px 0; }
.admin-note {
  padding: 16px 18px;
  border-left: 2px solid var(--gold);
  background: rgba(231, 200, 139, 0.05);
  color: #d8c9ad;
  font-size: 12px;
  line-height: 1.6;
}
.admin-back { margin-top: 24px; font-size: 12px; }
.admin-back a { color: var(--ice); text-decoration: none; }

/* ----------------------------------------------------------- responsive */

@media (max-width: 1040px) {
  .site-nav { display: none; }
  .status-pill { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .stage { order: 2; width: 100%; aspect-ratio: auto; height: clamp(300px, 38vw, 400px); min-height: 0; max-height: none; }
}

@media (max-width: 980px) {
  .algo-grid,
  .split { grid-template-columns: 1fr; }
  .console-grid { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .stage-note { display: none; }
}

@media (max-width: 860px) {
  .panes { grid-template-columns: 1fr; }
  .origin {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .head-inner { min-height: 64px; gap: 14px; }
  .stage { min-height: 300px; }
  .stage-read { top: 18px; left: 18px; }
  .stage-read p { font-size: 1.3rem; }
  .status-pill { font-size: 10px; padding: 5px 9px; }
  .brand-text { font-size: 11px; }
  .brand-text strong { font-size: 13px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero { padding-top: 36px; }
  .console-actions { width: 100%; }
  .action-label { width: 100%; margin-bottom: 2px; }
  .probe { font-size: 11px; padding: 6px 10px; }
  .state-cards { grid-template-columns: 1fr; }
  .world-grid { grid-template-columns: 1fr; }
  .foot-inner { flex-direction: column; }
  .foot-links { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .observer[data-mode="synthetic"]::after { display: none; }
}

/* Straata Shadow status — fixed to the lower-left of the public page. */
.shadow-badge {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(124, 245, 212, 0.26);
  border-radius: 999px;
  background: rgba(6, 10, 14, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #d8e1ea;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.shadow-badge span { color: #8fa3b8; }
.shadow-badge strong { color: #7cf5d4; font-weight: 600; }
.shadow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7cf5d4;
  box-shadow: 0 0 0 3px rgba(124, 245, 212, 0.12);
  animation: shadowPulse 2.8s ease-in-out infinite;
}
@keyframes shadowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (max-width: 520px) {
  .shadow-badge { font-size: 10.5px; padding: 7px 11px; }
}

/* Narrow screens: the chip follows the footer in flow, so it never covers the
 * hero microcopy or the legal line at any scroll position. */
@media (max-width: 620px) {
  .site-foot { padding-bottom: 36px; }
  .shadow-badge { position: static; margin: 0 0 22px 16px; }
}
