:root {
  color-scheme: dark;
  --bg: #090d12;
  --panel: #111821;
  --panel-soft: #151e29;
  --line: rgba(171, 190, 210, 0.14);
  --line-faint: rgba(171, 190, 210, 0.09);
  --text: #e5edf6;
  --muted: #91a2b5;
  --muted-strong: #b9c6d6;
  --green: #72d28a;
  --blue: #8fb7ff;
  --amber: #d7ad4d;
  --red: #ee7a8f;
  --font-sans: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================================
   PUBLIC DUAL OBSERVER
   ========================================================================= */

.public-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  padding: 8px 12px;
  overflow: hidden;
  background: #05080c;
}

.public-topbar {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, auto);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1a222c;
  padding: 0 8px 7px;
}

.brand-lockup,
.public-clock,
.asset-head,
.public-state,
.public-regime-strip,
.phase-stack,
.public-tape,
.public-metrics {
  font-family: var(--font-mono);
}

.brand-lockup {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  letter-spacing: 0.08em;
}

.brand-lockup strong {
  color: #fff;
  font-size: 0.96rem;
}

.brand-lockup span,
.public-clock,
.asset-head span,
.public-state span,
.public-state em,
.public-regime-strip span,
.phase-stack,
.tape-meta,
.tape-time {
  color: #8b99a8;
}

.public-clock {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-size: 0.76rem;
}

.live-state,
.asset-live {
  min-width: 48px;
  padding: 3px 6px;
  border: 1px solid #263244;
  color: #8fb7ff;
  font-size: 0.66rem;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0.08em;
}

.public-topbar .live-state {
  min-width: 54px;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 0.66rem;
}

.live-state:not(.stale),
.asset-live.is-live {
  border-color: #0f62fe;
  color: #8fb7ff;
  background: rgba(15, 98, 254, 0.11);
}

.asset-live.is-stale,
.live-state.stale {
  color: #d7ad4d;
  border-color: rgba(215, 173, 77, 0.45);
  background: rgba(215, 173, 77, 0.08);
}

.presence-code {
  min-width: 58px;
  color: #7f8fa3;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}

.public-topbar .presence-code {
  position: static;
  right: auto;
  bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  min-width: 48px;
  border: 1px solid rgba(171, 190, 210, 0.18);
  background: rgba(143, 183, 255, 0.045);
  font-size: 0.58rem;
}

.public-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  gap: 8px;
  margin-top: 8px;
}

.asset-surface {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 34px 24px 26px 30px 24px minmax(0, 1fr) 22px;
  border: 1px solid #1a222c;
  background: #090d12;
  overflow: hidden;
}

.asset-surface.is-loading {
  padding: 24px;
}

.asset-head {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 10px;
  border-bottom: 1px solid #1a222c;
  background: rgba(171, 190, 210, 0.022);
}

.asset-head strong {
  display: block;
  color: #fff;
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  letter-spacing: 0.02em;
}

.asset-head-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.asset-intensity {
  min-width: 98px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 8px;
  color: #aab8ca;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.asset-intensity span {
  color: #8b99a8;
  letter-spacing: 0.12em;
}

.asset-intensity strong {
  margin: 0;
  color: #f6f8fb;
  font-size: 0.78rem;
}

.asset-intensity i {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: 3px;
  background: #1a222c;
}

.asset-intensity b {
  display: block;
  height: 100%;
  background: #0f62fe;
}

.public-regime-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.85fr 1fr 1.15fr;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #1a222c;
  color: #8b99a8;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-regime-strip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-regime-strip strong {
  color: #f6f8fb;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0;
  text-transform: none;
}

.public-state span {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #8b99a8;
  text-overflow: ellipsis;
  text-transform: uppercase;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.public-state em {
  display: none;
  margin-top: 2px;
  overflow: hidden;
  font-style: normal;
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-live-read {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 10px;
  border-bottom: 1px solid #1a222c;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.asset-live-read span {
  flex-shrink: 0;
  padding: 1px 5px;
  border: 1px solid rgba(15, 98, 254, 0.28);
  background: rgba(15, 98, 254, 0.09);
  color: #0f62fe;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.asset-live-read strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.76rem;
  text-overflow: ellipsis;
}

.asset-live-read em {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #a4b2c0;
  font-size: 0.66rem;
  font-style: normal;
  text-overflow: ellipsis;
}

.asset-live-read b {
  flex-shrink: 0;
  padding: 1px 4px;
  border: 1px solid rgba(171, 190, 210, 0.15);
  background: rgba(171, 190, 210, 0.05);
  color: #c8d4e2;
  font-size: 0.6rem;
  font-weight: 600;
}

.phase-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  font-size: 0.72rem;
}

.phase-stack strong {
  color: #e0e6ed;
}

.public-state-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;
  overflow: hidden;
  padding: 3px 8px;
  border-bottom: 1px solid #1a222c;
}

.public-state {
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid #1d2936;
  background: linear-gradient(to bottom, #0f1622, #0b1219);
  box-shadow: inset 0 1px 0 rgba(171, 190, 210, 0.04);
}

.public-state strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f6f8fb;
  font-size: 0.63rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-state.is-good {
  border-color: rgba(114, 210, 138, 0.44);
  background: linear-gradient(to bottom, rgba(114, 210, 138, 0.1), rgba(114, 210, 138, 0.05));
  box-shadow: inset 0 1px 0 rgba(114, 210, 138, 0.15);
}

.public-state.is-warm {
  border-color: rgba(215, 173, 77, 0.48);
  background: linear-gradient(to bottom, rgba(215, 173, 77, 0.1), rgba(215, 173, 77, 0.05));
  box-shadow: inset 0 1px 0 rgba(215, 173, 77, 0.15);
}

.public-state.is-bad {
  border-color: rgba(238, 122, 143, 0.48);
  background: linear-gradient(to bottom, rgba(238, 122, 143, 0.1), rgba(238, 122, 143, 0.05));
  box-shadow: inset 0 1px 0 rgba(238, 122, 143, 0.15);
}

.ref-chain {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(96px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 3px 10px;
  border-bottom: 1px solid #1a222c;
  border-left: 3px solid rgba(143, 183, 255, 0.2);
  background: rgba(143, 183, 255, 0.035);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.ref-chain span {
  color: #8fb7ff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ref-chain strong,
.ref-chain em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-chain strong {
  color: #f6f8fb;
  font-size: 0.62rem;
  font-weight: 700;
}

.ref-chain em {
  color: #aab8ca;
  font-size: 0.6rem;
  font-style: normal;
}

.ref-chain.is-active,
.ref-chain.is-candidate {
  border-left-color: rgba(111, 191, 210, 0.72);
  background: linear-gradient(to right, rgba(111, 191, 210, 0.12), rgba(111, 191, 210, 0.025));
}

.ref-chain.is-reset {
  border-left-color: rgba(215, 173, 77, 0.72);
  background: linear-gradient(to right, rgba(215, 173, 77, 0.12), rgba(215, 173, 77, 0.025));
}

.ref-chain.is-quiet {
  opacity: 0.58;
}

.public-intensity .intensity-track {
  display: block;
  width: 100%;
  height: 4px;
  margin-top: 10px;
  background: #1a222c;
}

.public-intensity .intensity-track i {
  display: block;
  height: 100%;
  background: #0f62fe;
}

.asset-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 204px;
  min-height: 0;
  overflow: hidden;
}

.asset-body .chart-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: none;
  border-right: 1px solid #1a222c;
  background: #101720;
}

.asset-body canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.public-tape {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 183, 255, 0.28) transparent;
  background: #0b1118;
}

.public-tape::-webkit-scrollbar {
  width: 6px;
}

.public-tape::-webkit-scrollbar-thumb {
  background: rgba(143, 183, 255, 0.24);
}

.public-tape-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-bottom: 1px solid #1a222c;
  background: #0b1118;
  color: #8b99a8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6rem;
}

.public-tape-head strong {
  color: #d7ad4d;
}

.tape-row {
  display: grid;
  grid-template-columns: 39px 18px minmax(52px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(171, 190, 210, 0.08);
  font-size: 0.68rem;
}

.tape-row strong {
  overflow: hidden;
  color: #e0e6ed;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tape-code {
  color: #d7ad4d;
  font-weight: 700;
}

.tape-row.is-cool .tape-code,
.tape-row.is-kind-edge-pressure .tape-code {
  color: #6fbfd2;
  text-shadow: 0 0 7px rgba(111, 191, 210, 0.24);
}

.tape-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tape-empty {
  padding: 16px;
  color: #8b99a8;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.public-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #1a222c;
}

.public-metrics .metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 3px 9px;
  border-right: 1px solid #1a222c;
  font-family: var(--font-mono);
}

.public-metrics .metric:last-child {
  border-right: none;
}

.public-metrics span {
  display: inline;
  min-width: 0;
  color: #8b99a8;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-metrics strong {
  display: inline;
  flex: 0 0 auto;
  color: #f6f8fb;
  font-size: 0.72rem;
}

/* =========================================================================
   LANDING PAGE (PUBLIC SITE) - LAB VARIANT (SOFTENED)
   ========================================================================= */

.lab-body {
  background-color: #05080c; /* Soft dark background */
  color: #e0e6ed;
  font-family: 'IBM Plex Serif', serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  height: auto;
  overflow: auto;
  padding: clamp(0.75rem, 2vh, 1.5rem);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.lab-container {
  width: 100%;
  max-width: 1280px;
  border: 1px solid #1a222c; /* Softer border */
  background: #090d12;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Grid Layout */
.lab-grid-row {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid #1a222c;
}
.lab-grid-row:last-child {
  border-bottom: none;
}

.lab-grid-col {
  padding: clamp(1.25rem, 2.8vw, 2.65rem);
  border-right: 1px solid #1a222c;
  flex: 1;
  min-width: 320px;
}
.lab-grid-col:last-child {
  border-right: none;
}

.col-main {
  flex: 2;
}
.col-span-full {
  flex: 1 1 100%;
}

/* Typography */
.lab-body h1 {
  font-family: 'IBM Plex Serif', serif;
  font-size: clamp(2.35rem, 4.25vw, 3.45rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
  margin: 0 0 1rem;
  color: #ffffff;
}

.lab-body h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8b99a8;
  margin: 0 0 1.1rem;
  border-bottom: 1px solid #1a222c;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.lab-body p {
  margin: 0;
  font-size: 1.04rem;
  color: #a4b2c0;
}

.lab-lead {
  font-size: 1.18rem !important;
  color: #e0e6ed !important;
  max-width: 800px;
}

.lab-primary-link {
  width: fit-content;
  min-height: 48px;
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid rgba(114, 210, 138, 0.72);
  border-radius: 4px;
  background: #72d28a;
  color: #061008;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(114, 210, 138, 0.18), 0 18px 42px rgba(114, 210, 138, 0.16);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.lab-primary-link:hover {
  transform: translateY(-1px);
  background: #8be6a1;
  box-shadow: 0 0 0 1px rgba(114, 210, 138, 0.25), 0 22px 54px rgba(114, 210, 138, 0.24);
}

.lab-primary-link:focus-visible {
  outline: 2px solid #e0e6ed;
  outline-offset: 3px;
}

.mono-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem !important;
  color: #8b99a8 !important;
}

/* Components */
.lab-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1.25rem, 2.8vw, 2.65rem);
  border-bottom: 1px solid #1a222c;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.01);
}

.lab-brand {
  font-weight: 600;
  color: #ffffff;
}

.lab-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #0f62fe; /* IBM Blue Accent */
  font-weight: 600;
}
.lab-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #0f62fe;
  box-shadow: 0 0 10px rgba(15, 98, 254, 0.5);
  border-radius: 50%;
  animation: labPulse 2s infinite;
}

@keyframes labPulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

.vector-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.vector-item {
  display: flex;
  gap: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  color: #a4b2c0;
}
.vector-item::before {
  content: '—';
  color: #1a222c;
}

/* Contact Form */
.contact-block {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.contact-details {
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
}

.contact-summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  cursor: pointer;
  list-style: none;
}

.contact-summary::-webkit-details-marker {
  display: none;
}

.contact-title {
  display: block;
  width: fit-content;
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #1a222c;
  color: #8b99a8;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-toggle {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #263244;
  color: #e0e6ed;
  background: rgba(255, 255, 255, 0.02);
}

.contact-toggle::before {
  content: '+';
}

.contact-details[open] .contact-toggle::before {
  content: '-';
}

.lab-form {
  width: min(100%, 680px);
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lab-form input,
.lab-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1a222c;
  color: #e0e6ed;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  padding: 0.9rem 1rem;
  transition: all 0.2s ease;
}

.lab-form input:focus,
.lab-form textarea:focus {
  outline: none;
  border-color: #0f62fe;
  background: rgba(15, 98, 254, 0.03);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lab-form button {
  background: #e0e6ed;
  color: #05080c;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lab-form button:hover {
  background: #0f62fe;
  color: #ffffff;
}

.form-trap {
  display: none !important;
}

#messageStatus {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: #0f62fe;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .lab-body {
    padding: 0;
  }
  .lab-container {
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none;
  }
  .lab-grid-col {
    border-right: none;
    border-bottom: 1px solid #1a222c;
  }
  .lab-grid-col:last-child {
    border-bottom: none;
  }
}



.sim-shell {
  min-height: 100vh;
  padding: 12px;
}

.sim-topbar,
.regime-projection,
.live-read,
.panel,
.metrics-strip {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
}

.regime-projection {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(230px, 1.15fr) minmax(220px, 1fr) minmax(220px, 1fr) minmax(280px, 1.35fr);
}

.projection-cell {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 7px 13px;
  border-right: 1px solid var(--line-faint);
  font-family: var(--font-mono);
}

.projection-cell:last-child {
  border-right: 0;
}

.projection-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.projection-cell strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.2;
}

.projection-regime strong,
.projection-behavior strong {
  font-size: 0.9rem;
}

.projection-note {
  color: var(--muted-strong);
  font-size: 0.7rem;
}

.sim-topbar {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-lockup strong { font-size: 1rem; }
.brand-lockup span { color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.top-spacer {
  flex: 1;
  min-height: 44px;
  border-right: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 0 18px;
}

.top-tagline {
  margin: 0;
  display: grid;
  gap: 2px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.top-tagline span:first-child {
  color: #d9e3f3;
  text-shadow: 0 0 12px rgba(96, 132, 255, 0.22);
}

.market-read {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--font-mono);
}

.market-read strong {
  color: var(--green);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.live-state {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-state.live {
  color: var(--green);
  background: rgba(114, 210, 138, 0.10);
  border-color: rgba(114, 210, 138, 0.28);
}

.live-state.stale {
  color: var(--amber);
}

.live-read {
  min-height: 94px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 420px) minmax(210px, 310px);
  gap: 14px;
  align-items: center;
  padding: 11px 16px;
}

.kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.22rem, 1.65vw, 1.55rem);
  line-height: 1.1;
}

.summary {
  margin: 7px 0 0;
  color: #d8e3f1;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.read-controls {
  display: grid;
  gap: 7px;
  font-family: var(--font-mono);
}

.chip-row,
.phase-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tiny-chip,
.phase-row span:first-child {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 4px 9px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phase-row strong {
  color: var(--text);
}

.arrow,
.mono-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.intensity-read {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(100px, 1fr);
  gap: 10px;
  align-items: center;
  font-family: var(--font-mono);
}

.intensity-read span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.intensity-read strong {
  font-size: 1.3rem;
}

.intensity-track {
  height: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0c121a;
  overflow: hidden;
}

.presence-code {
  position: absolute;
  right: 6px;
  bottom: 3px;
  color: #526071;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.intensity-track span {
  display: block;
  height: 100%;
  background: #9daabe;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 10px;
  margin-top: 8px;
}

.left-rail {
  min-width: 0;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.chart-panel {
  padding: 10px 12px 14px;
}

.chart-head,
.tape-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.marker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.marker-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 19px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line-faint);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marker-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.marker-chip.is-attempt { color: #7c8cff; }
.marker-chip.is-state { color: #4d9dff; }
.marker-chip.is-open { color: #72d28a; }
.marker-chip.is-close { color: #8e9aab; }
.marker-chip.is-coherence { color: #d9931f; }
.marker-chip.is-reset,
.marker-chip.is-fade { color: #c78618; }

canvas {
  display: block;
  width: 100%;
  height: clamp(430px, 58vh, 660px);
  background: #0c121a;
  border: 1px solid var(--line-faint);
  border-radius: 4px;
}

.metrics-strip {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 12px;
  border-right: 1px solid var(--line-faint);
  font-family: var(--font-mono);
}

.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; }
.metric strong { justify-self: end; font-size: 1rem; }

.tape-panel {
  max-height: calc(100vh - 162px);
  display: flex;
  flex-direction: column;
}

.tape-head {
  padding: 12px 14px 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sequence-read {
  color: var(--amber);
  font-weight: 800;
}

.surface-fingerprint {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 7px;
  background:
    linear-gradient(90deg, rgba(90, 110, 190, 0.13), rgba(14, 20, 29, 0.0) 56%),
    rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 1px 0 rgba(186, 203, 255, 0.08);
}

.surface-token {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #d3a24f;
  letter-spacing: 0.1em;
}

.surface-cells {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  overflow: hidden;
}

.fp-cell,
.tape-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(176, 193, 224, 0.22);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 42%),
    rgba(255, 255, 255, 0.075);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: #d8e1f2;
  box-shadow:
    0 0 10px rgba(116, 143, 255, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.fp-cell.is-warm,
.tape-token.is-warm {
  color: #ffd06f;
  border-color: rgba(255, 208, 111, 0.5);
  box-shadow: 0 0 12px rgba(255, 177, 49, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.fp-cell.is-good,
.fp-cell.is-support,
.tape-token.is-good,
.tape-token.is-support {
  color: #a8f3b8;
  border-color: rgba(135, 239, 158, 0.48);
  box-shadow: 0 0 12px rgba(96, 221, 128, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.fp-cell.is-cool,
.tape-token.is-cool {
  color: #bcd1ff;
  border-color: rgba(143, 179, 255, 0.5);
  box-shadow: 0 0 12px rgba(98, 128, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.fp-cell.is-alert,
.tape-token.is-alert {
  color: #ffb38d;
  border-color: rgba(255, 179, 141, 0.48);
  box-shadow: 0 0 12px rgba(255, 135, 74, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.fp-cell.is-soft,
.tape-token.is-soft {
  color: #d9e4f7;
  border-color: rgba(205, 221, 246, 0.36);
  box-shadow: 0 0 10px rgba(180, 203, 245, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.tape-fingerprint {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px 7px;
  overflow: hidden;
}

.tape-fingerprint[hidden] {
  display: none !important;
}

.tape {
  flex: 1;
  overflow: auto;
  padding: 0 8px 10px;
}

.tape[hidden] {
  display: none !important;
}

.tape-row {
  position: relative;
  min-height: 34px;
  display: grid;
  grid-template-columns: 48px 24px minmax(82px, 1fr) minmax(76px, 1fr) auto;
  gap: 7px;
  align-items: center;
  margin-bottom: 4px;
  padding: 7px 9px;
  border-left: 2px solid transparent;
  background: rgba(255, 255, 255, 0.035);
  color: #dce6f4;
  font-family: var(--font-mono);
  font-size: 0.73rem;
}

.tape-row.is-warm,
.tape-row.is-reset,
.tape-row.is-fade { border-left-color: #c78618; }
.tape-row.is-good,
.tape-row.is-open { border-left-color: #72d28a; }
.tape-row.is-cool,
.tape-row.is-state { border-left-color: #8fb7ff; }
.tape-row.is-attempt { border-left-color: #7c8cff; }
.tape-row.is-neutral,
.tape-row.is-close { border-left-color: #7b8698; }

.tape-time,
.tape-meta {
  color: var(--muted);
}

.tape-code {
  color: var(--amber);
  font-weight: 800;
}

.tape-count {
  min-width: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .live-read,
  .regime-projection,
  .main-grid,
  .landing-hero,
  .landing-notes,
  .landing-message,
  .message-form {
    grid-template-columns: 1fr;
  }

  .landing-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .landing-copy {
    padding: 42px 22px;
  }

  .projection-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line-faint);
  }

  .projection-cell:last-child {
    border-bottom: 0;
  }

  .top-spacer {
    display: none;
  }

  .sim-topbar,
  .market-read {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tape-panel {
    max-height: none;
  }
}

.public-tape .tape-row {
  display: grid;
  grid-template-columns: 36px 16px minmax(46px, 0.38fr) minmax(0, 1fr);
  gap: 4px;
  min-height: 26px;
  margin: 0;
  padding: 3px 8px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(171, 190, 210, 0.08);
  background: rgba(255, 255, 255, 0.026);
  font-size: 0.62rem;
}

@media (max-width: 1280px) {
  .public-dual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .public-topbar,
  .asset-live-read,
  .asset-body {
    grid-template-columns: 1fr;
  }

  .public-clock {
    justify-content: flex-start;
  }

  .public-regime-strip,
  .public-state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-body .chart-panel {
    border-right: none;
  }
}

@media (max-width: 560px) {
  .public-shell {
    padding: 8px;
  }

  .public-regime-strip,
  .public-state-grid,
  .public-metrics {
    grid-template-columns: 1fr;
  }

  .public-metrics .metric {
    border-right: none;
    border-bottom: 1px solid #1a222c;
  }

  .public-metrics .metric:last-child {
    border-bottom: none;
  }

  .public-tape .tape-row {
    grid-template-columns: 42px 22px minmax(0, 1fr);
  }

  .public-tape .tape-meta {
    grid-column: 3;
  }
}
