@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Mono:wght@400;600&family=VT323&display=swap");

:root {
  --bg: #f8efcf;
  --bg-2: #f1e3bd;
  --panel: rgba(255, 249, 227, 0.9);
  --panel-2: rgba(250, 241, 212, 0.92);
  --text: #1f1a12;
  --muted: #6c6046;
  --good: #0a9b64;
  --warn: #b96514;
  --accent: #0f7f6f;
  --accent-soft: #2ea792;
  --ink-line: rgba(27, 22, 13, 0.13);
  --crt: rgba(20, 170, 130, 0.08);
  --easing: cubic-bezier(0.2, 0.7, 0.24, 1);
  --dur-fast: 110ms;
  --dur-mid: 180ms;
  --dur-slow: 280ms;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "IBM Plex Mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 11% 18%, #fff7dd 0%, var(--bg) 42%, var(--bg-2) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0));
  overflow-x: hidden;
  line-height: 1.5;
  position: relative;
}

body.mobile-menu-locked {
  overflow: hidden;
  touch-action: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 3px,
      var(--crt) 3px,
      var(--crt) 4px
    );
  opacity: 0.22;
  z-index: -1;
}

button,
a,
.metric,
.watcher,
.referral-box,
.mission,
.feed li,
.statusbar {
  transition:
    transform var(--dur-fast) var(--easing),
    box-shadow var(--dur-mid) var(--easing),
    border-color var(--dur-mid) var(--easing),
    background-color var(--dur-mid) var(--easing),
    opacity var(--dur-mid) var(--easing);
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(14, 123, 103, 0.55);
  outline-offset: 2px;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(6px);
  background: linear-gradient(to right, rgba(255, 251, 236, 0.9), rgba(249, 241, 211, 0.92));
  border: 1px solid var(--ink-line);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(64, 46, 14, 0.09);
}

.brand {
  color: #2a1f0e;
  text-decoration: none;
  font-family: "VT323", monospace;
  font-size: 1.8rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.05em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(130deg, #f3c059, #58b88e);
  color: #2a1f0e;
  border: 1px solid rgba(66, 49, 15, 0.24);
}

.topbar-menu {
  margin-left: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.topbar-menu-toggle {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.56rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.view-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.view-nav a {
  border: 1px solid rgba(34, 73, 58, 0.25);
  border-radius: 999px;
  padding: 0.36rem 0.66rem;
  text-decoration: none;
  color: #2b3e31;
  font-size: 0.8rem;
  background: rgba(255, 252, 241, 0.74);
}

.view-nav a:hover {
  transform: translateY(-0.5px);
  border-color: rgba(23, 100, 82, 0.42);
  box-shadow: 0 4px 10px rgba(24, 92, 75, 0.1);
}

.view-nav a.is-active {
  border-color: rgba(20, 98, 80, 0.45);
  color: #1b5c49;
  background: rgba(228, 248, 238, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.view-group.is-hidden {
  display: none !important;
}

.pill {
  border: 1px solid rgba(46, 76, 58, 0.28);
  border-radius: 999px;
  font-size: 0.84rem;
  padding: 0.45rem 0.8rem;
  color: #2d3022;
  background: rgba(255, 255, 255, 0.5);
}

.topbar button {
  border: 1px solid rgba(22, 109, 91, 0.45);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: linear-gradient(180deg, #f7fff9, #daf4ea);
  color: #1d4d3f;
  font: inherit;
}

.topbar button:hover {
  background: linear-gradient(180deg, #ebfff7, #c9efdf);
  transform: translateY(-0.5px);
  box-shadow: 0 5px 10px rgba(21, 88, 72, 0.12);
}

.hero {
  position: relative;
  border: 1px solid var(--ink-line);
  border-radius: 16px;
  padding: 1.2rem 1.2rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(255, 253, 242, 0.9), rgba(249, 239, 207, 0.86)),
    radial-gradient(circle at 90% 16%, rgba(44, 171, 136, 0.16), transparent 44%);
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(90, 68, 20, 0.08);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 16px;
  border: 1px dashed rgba(38, 33, 23, 0.14);
  pointer-events: none;
}

.hero h1,
.panel h3,
.lounge h3,
.marketing h3 {
  font-family: "Space Grotesk", sans-serif;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  letter-spacing: 0.01em;
  color: #1f2c23;
}

.hero .eyebrow {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-family: "VT323", monospace;
  font-size: 1.4rem;
}

.lead {
  max-width: 78ch;
  color: var(--muted);
  margin-bottom: 1rem;
}

.token-lock {
  white-space: nowrap;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.8rem;
}

.metric {
  border: 1px solid rgba(46, 72, 60, 0.22);
  border-radius: 12px;
  padding: 0.8rem;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.metric:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 6px 12px rgba(85, 64, 22, 0.1);
}

.metric h2 {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric p {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  color: #1c2e25;
}

.money-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-weight: 700;
}

.token-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(20, 88, 71, 0.28);
  border-radius: 999px;
  padding: 0.05rem 0.36rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(228, 248, 238, 0.72);
  color: #1a5948;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1rem;
}

.onboard-entry {
  border: 1px solid rgba(36, 63, 49, 0.2);
  border-radius: 12px;
  padding: 0.72rem 0.78rem;
  background: rgba(255, 252, 240, 0.72);
  margin-bottom: 0.8rem;
  display: block;
}

.onboard-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.onboard-toggle button {
  border: 1px solid rgba(38, 75, 59, 0.26);
  border-radius: 999px;
  padding: 0.36rem 0.74rem;
  background: rgba(255, 255, 255, 0.64);
  color: #2a3f33;
  font: inherit;
  font-size: 0.82rem;
}

.onboard-toggle button.is-active {
  border-color: rgba(22, 96, 79, 0.42);
  color: #175a49;
  background: rgba(228, 248, 238, 0.92);
}

.onboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 0.82rem;
  align-items: start;
}

.onboard-main,
.onboard-side {
  min-width: 0;
  display: grid;
  gap: 0.7rem;
}

.onboard-side {
  align-content: start;
}

.onboard-side-pane {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.onboard-side-pane.is-hidden {
  display: none !important;
}

.onboard-main {
  align-content: start;
  grid-template-columns: 1fr;
}

.onboard-main .watcher {
  margin-bottom: 0;
}

.onboard-pane {
  display: grid;
  gap: 0.75rem;
}

.onboard-agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
}

.onboard-human-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
}

.onboard-pane.is-hidden {
  display: none !important;
}

.advanced-controls {
  border: 1px solid rgba(39, 66, 53, 0.22);
  border-radius: 12px;
  padding: 0.7rem 0.72rem;
  background: rgba(255, 252, 240, 0.72);
}

.advanced-controls > summary {
  cursor: pointer;
  font-weight: 700;
  color: #234a3a;
  list-style: none;
}

.advanced-controls > summary::-webkit-details-marker {
  display: none;
}

.advanced-controls > summary::after {
  content: " +";
  font-weight: 700;
  color: #3f6b57;
}

.advanced-controls[open] > summary::after {
  content: " -";
}

.advanced-controls-stack {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.7rem;
}

.advanced-controls.is-hidden {
  display: none !important;
}

.connect-box {
  border: 1px solid rgba(39, 66, 53, 0.2);
  border-radius: 12px;
  padding: 0.78rem;
  background: rgba(255, 252, 240, 0.72);
}

.connect-box-head h4 {
  margin: 0 0 0.2rem;
  color: #194636;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
}

.connect-box-head .panel-sub {
  margin: 0 0 0.35rem;
}

.onboard-side .human-entry-card {
  padding: 0.72rem 0.74rem;
}

.human-entry-card {
  border: 1px solid rgba(38, 67, 52, 0.22);
  border-radius: 12px;
  padding: 0.78rem;
  background: rgba(255, 252, 240, 0.76);
}

.human-entry-card h4 {
  margin: 0 0 0.45rem;
}

.human-entry-card input[type="email"] {
  width: 100%;
  margin-top: 0.28rem;
  border: 1px solid rgba(37, 74, 58, 0.26);
  border-radius: 8px;
  padding: 0.46rem 0.56rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.8);
}

.human-entry-card button {
  margin-top: 0.55rem;
  border: 1px solid rgba(26, 95, 78, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fff9, #d8f3e8);
  color: #1a5b49;
  padding: 0.46rem 0.76rem;
  font: inherit;
  font-size: 0.82rem;
}

.human-entry-card button:hover {
  background: linear-gradient(180deg, #edfff6, #caecd9);
}

.consent-check {
  margin-top: 0.62rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: #4c503f;
  font-size: 0.74rem;
}

.consent-check input {
  margin-top: 0.18rem;
}

.inline-link {
  display: inline-block;
  margin: 0.1rem 0 0.46rem;
  color: #156a56;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(21, 106, 86, 0.46);
}

.inline-link:hover {
  color: #0f5a49;
  border-bottom-color: rgba(15, 90, 73, 0.7);
}

.guide-panel .panel-sub {
  margin-bottom: 0.8rem;
}

.guide-panel {
  display: grid;
  gap: 0.8rem;
}

.guide-head {
  border: 1px solid rgba(34, 66, 54, 0.22);
  border-radius: 12px;
  padding: 0.78rem 0.82rem;
  background: rgba(255, 252, 240, 0.8);
}

.guide-head .panel-sub {
  margin-bottom: 0.55rem;
}

.guide-audience-note {
  margin: 0.55rem 0 0;
  color: #4f5a47;
  font-size: 0.78rem;
}

.guide-dual-audience {
  margin-top: 0.56rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.guide-audience-chip {
  border: 1px solid rgba(30, 65, 52, 0.18);
  border-radius: 10px;
  padding: 0.52rem 0.56rem;
  background: rgba(255, 255, 255, 0.5);
  min-width: 0;
}

.guide-audience-chip h4 {
  margin: 0 0 0.22rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  color: #2f4036;
}

.guide-audience-chip p {
  margin: 0;
  color: #575344;
  font-size: 0.78rem;
  line-height: 1.42;
}

.guide-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.guide-actions button {
  border: 1px solid rgba(23, 93, 77, 0.42);
  border-radius: 999px;
  background: linear-gradient(180deg, #f4fff8, #d8f3e8);
  color: #1a5b49;
  padding: 0.38rem 0.78rem;
  font: inherit;
  font-size: 0.8rem;
}

.guide-actions button:hover {
  background: linear-gradient(180deg, #ecfff5, #cdeedc);
}

.guide-actions .guide-action-secondary {
  border-color: rgba(35, 69, 57, 0.26);
  background: rgba(255, 255, 255, 0.72);
  color: #30453a;
}

.guide-actions .guide-action-secondary:hover {
  background: rgba(255, 255, 255, 0.84);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
}

.guide-card {
  border: 1px solid rgba(34, 66, 54, 0.22);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255, 252, 240, 0.78);
}

.guide-card-steps,
.guide-card-faq {
  grid-column: span 7;
}

.guide-card-ready,
.guide-card-stack {
  grid-column: span 5;
}

.guide-card h4 {
  margin: 0 0 0.38rem;
}

.guide-card p {
  margin: 0 0 0.35rem;
  color: #5a5747;
  font-size: 0.84rem;
}

.guide-step-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
  display: grid;
  gap: 0.5rem;
}

.guide-step-list li {
  position: relative;
  border: 1px solid rgba(32, 63, 51, 0.14);
  border-radius: 10px;
  padding: 0.52rem 0.56rem 0.52rem 2rem;
  background: rgba(255, 255, 255, 0.52);
  color: #4f4c3e;
  font-size: 0.82rem;
}

.guide-step-list li::before {
  counter-increment: guide-step;
  content: counter(guide-step);
  position: absolute;
  left: 0.56rem;
  top: 0.54rem;
  width: 1.04rem;
  height: 1.04rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(20, 92, 76, 0.38);
  background: rgba(226, 247, 236, 0.86);
  color: #175744;
  font-weight: 700;
  font-size: 0.72rem;
}

.guide-step-list li strong {
  display: block;
  margin-bottom: 0.16rem;
  color: #2f3d35;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.83rem;
}

.guide-check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.42rem;
}

.guide-check-list li {
  position: relative;
  padding-left: 1.16rem;
  color: #504d40;
  font-size: 0.82rem;
}

.guide-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.06rem;
  color: #167a61;
  font-weight: 700;
}

.guide-faq-list {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.guide-faq-list div {
  border: 1px dashed rgba(36, 69, 56, 0.28);
  border-radius: 10px;
  padding: 0.5rem 0.58rem;
  background: rgba(255, 255, 255, 0.42);
}

.guide-faq-list dt {
  margin: 0;
  color: #2f3f36;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.83rem;
}

.guide-faq-list dd {
  margin: 0.22rem 0 0;
  color: #575343;
  font-size: 0.81rem;
  line-height: 1.45;
}

.guide-note {
  margin: 0.5rem 0 0;
  color: #555244;
  font-size: 0.79rem;
}

.guide-faq-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.guide-faq-column {
  border: 1px solid rgba(34, 66, 54, 0.2);
  border-radius: 12px;
  padding: 0.76rem;
  background: rgba(255, 252, 240, 0.78);
  display: grid;
  gap: 0.46rem;
  align-content: start;
  min-width: 0;
}

.guide-faq-column h4 {
  margin: 0 0 0.08rem;
}

.guide-faq-item {
  border: 1px dashed rgba(34, 68, 55, 0.26);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.42);
  padding: 0.44rem 0.5rem;
  min-width: 0;
}

.guide-faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  color: #2f4036;
  padding-right: 1.1rem;
  position: relative;
}

.guide-faq-item summary::-webkit-details-marker {
  display: none;
}

.guide-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: -0.02rem;
  color: #2c5d4b;
  font-weight: 700;
}

.guide-faq-item[open] summary::after {
  content: "-";
}

.guide-faq-item p {
  margin: 0.42rem 0 0;
  color: #545141;
  font-size: 0.8rem;
  line-height: 1.46;
}

.guide-mini-formula {
  margin-top: 0.48rem;
}

.guide-mini-formula code {
  display: block;
  border: 1px solid rgba(30, 63, 51, 0.18);
  border-radius: 8px;
  padding: 0.42rem 0.46rem;
  background: rgba(246, 255, 251, 0.82);
  color: #225243;
  font-size: 0.76rem;
  white-space: normal;
  word-break: break-word;
}

.guide-contract-block {
  margin: 0.44rem 0 0;
  border: 1px solid rgba(27, 61, 49, 0.2);
  border-radius: 8px;
  padding: 0.44rem 0.5rem;
  background: rgba(244, 255, 250, 0.84);
  color: #254e41;
  font-size: 0.75rem;
  line-height: 1.45;
  max-width: 100%;
  overflow-x: auto;
}

.guide-contract-block code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.live-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.82rem;
  align-items: start;
  --panel-list-height: 272px;
}

.live-panel-column {
  min-width: 0;
  border: 1px solid rgba(45, 74, 60, 0.18);
  border-radius: 11px;
  background: rgba(255, 251, 236, 0.78);
  padding: 0.68rem 0.72rem 0.72rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.live-panel-column h3 {
  margin: 0 0 0.52rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(34, 64, 52, 0.14);
  letter-spacing: 0.01em;
}

.rule-health-note {
  margin-bottom: 0.5rem;
  font-size: 0.79rem;
  color: #52644c;
}

.panel,
.lounge,
.marketing {
  border: 1px solid var(--ink-line);
  border-radius: 14px;
  background: var(--panel);
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(76, 58, 20, 0.07);
}

.panel h3,
.lounge h3,
.marketing h3 {
  margin: 0 0 0.4rem;
}

.panel-sub,
p.panel-sub {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.live-intel-shell {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.live-intel-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem 1rem;
  align-items: end;
}

.live-intel-command .panel-sub {
  margin-bottom: 0;
}

.live-intel-command .freshness-row {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.live-intel-stage-grid {
  --live-intel-stage-gap: 1rem;
  --live-intel-stage-row-height: clamp(280px, 36vh, 340px);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.95fr);
  grid-template-rows: repeat(2, minmax(0, var(--live-intel-stage-row-height)));
  gap: var(--live-intel-stage-gap);
  align-items: stretch;
}

.live-intel-tape-card {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  min-height: calc(var(--live-intel-stage-row-height) * 2 + var(--live-intel-stage-gap));
  max-height: calc(var(--live-intel-stage-row-height) * 2 + var(--live-intel-stage-gap));
  align-self: stretch;
}

.live-intel-tape-card .tape-feed {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
}

.live-intel-integrity-card,
.live-intel-spotlight-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.live-intel-integrity-card #integrityIssues {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.live-intel-spotlight-card #p2pSpotlight {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 0.05rem;
}

.live-intel-analysis-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.live-intel-analysis-chapter {
  grid-column: 1 / -1;
  margin: 0;
  color: #2a4a3a;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.live-intel-flow-card {
  grid-column: span 4;
}

.live-intel-round-card {
  grid-column: span 8;
}

.live-intel-rulebook-card {
  grid-column: 1 / -1;
}

.live-intel-heat-card {
  grid-column: 1 / -1;
}

.live-intel-streak-card {
  grid-column: span 4;
}

.live-intel-intent-card {
  grid-column: span 8;
}

.live-intel-round-card .round-stream {
  min-height: 248px;
  max-height: 328px;
  overflow-y: auto;
  padding-right: 0.05rem;
}

.live-intel-rulebook-card #gameRulesBoard {
  min-height: 210px;
}

.rulebook-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.rulebook-visible-meta {
  margin: 0;
  font-size: 0.79rem;
}

.table-heat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.table-heat-visible-meta {
  margin: 0;
  font-size: 0.79rem;
}

.rulebook-toggle-btn {
  border: 1px solid rgba(28, 95, 76, 0.36);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(239, 251, 244, 0.95), rgba(211, 238, 223, 0.98));
  color: #1a4f40;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.58rem;
  white-space: nowrap;
}

.rulebook-toggle-btn:not(:disabled):hover {
  background: linear-gradient(180deg, rgba(234, 248, 240, 0.98), rgba(201, 232, 216, 0.98));
}

.table-heat-toggle-btn {
  border: 1px solid rgba(28, 95, 76, 0.36);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(239, 251, 244, 0.95), rgba(211, 238, 223, 0.98));
  color: #1a4f40;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.28rem 0.58rem;
  white-space: nowrap;
}

.table-heat-toggle-btn:not(:disabled):hover {
  background: linear-gradient(180deg, rgba(234, 248, 240, 0.98), rgba(201, 232, 216, 0.98));
}

.rulebook-toggle-btn:disabled,
.table-heat-toggle-btn:disabled {
  opacity: 0.62;
  cursor: default;
}

.live-intel-heat-card #tableHeat {
  min-height: 0;
  max-height: clamp(220px, 34vh, 320px);
  overflow-y: auto;
  align-content: start;
  padding-right: 0.05rem;
}

.live-intel-streak-card .compact-feed,
.live-intel-intent-card .compact-feed {
  min-height: 236px;
  max-height: 236px;
}

.live-intel-lp-card .flow-grid {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.live-intel-lp-card #lpActionStatus {
  min-height: 1.35rem;
  margin-bottom: 0.45rem;
}

.live-intel-lp-card #lpTopPositions,
.live-intel-lp-card #lpMyPositions,
.live-intel-lp-card #lpEventFeed {
  max-height: 170px;
}

.live-intel-admin-shell {
  margin-top: 0;
}

.live-intel-admin-shell > summary {
  cursor: pointer;
  color: #1f4334;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  user-select: none;
}

.live-intel-admin-shell > summary::marker {
  color: #245c47;
}

.live-intel-admin-shell > .panel-sub {
  margin-top: 0.55rem;
}

.live-intel-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.live-intel-admin-card {
  border: 1px solid rgba(45, 77, 64, 0.22);
  border-radius: 12px;
  background: rgba(252, 246, 223, 0.9);
  padding: 0.86rem;
}

.live-intel-admin-card h3 {
  margin-top: 0;
}

.live-intel-admin-card[hidden] {
  display: none !important;
}

.tape-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.follow-control {
  display: grid;
  gap: 0.24rem;
  font-size: 0.78rem;
  color: #2f3d2f;
}

.follow-control select {
  min-width: 190px;
  border: 1px solid rgba(44, 80, 62, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.92);
  color: #202314;
  padding: 0.36rem 0.52rem;
  font: inherit;
}

.follow-control input {
  min-width: 190px;
  border: 1px solid rgba(44, 80, 62, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.92);
  color: #202314;
  padding: 0.36rem 0.52rem;
  font: inherit;
}

.freshness-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.tape-feed {
  max-height: 236px;
}

.watcher {
  border: 1px solid rgba(48, 76, 61, 0.24);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 0.6rem;
  margin-bottom: 0.8rem;
}

.watcher-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.28rem 0;
  font-size: 0.94rem;
}

.watcher-row span {
  color: var(--muted);
}

.leaderboard {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  min-height: var(--panel-list-height);
  max-height: var(--panel-list-height);
  overflow-y: auto;
}

.leaderboard li {
  border: 1px solid rgba(50, 74, 62, 0.18);
  border-radius: 10px;
  background: rgba(250, 242, 212, 0.82);
  padding: 0.62rem 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.leaderboard li:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 98, 80, 0.36);
  box-shadow: 0 5px 10px rgba(66, 50, 17, 0.09);
}

.leaderboard li .name {
  color: #2a2a1d;
  font-weight: 600;
  line-height: 1.22;
}

.leaderboard li .delta {
  color: var(--good);
  font-family: "VT323", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.feed-split {
  display: grid;
  gap: 0.44rem;
  min-height: var(--panel-list-height);
}

.feed-split-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.feed-split-block h4 {
  margin: 0 0 0.26rem;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f6548;
}

.feed {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 208px;
  overflow: auto;
  display: grid;
  gap: 0.34rem;
}

#activityFeed,
#systemFeed {
  min-height: calc((var(--panel-list-height) - 2rem) / 2);
  max-height: calc((var(--panel-list-height) - 2rem) / 2);
  overflow-y: auto;
  overflow-x: hidden;
}

#activityFeed li {
  background: rgba(255, 250, 234, 0.95);
  border-left-width: 4px;
  padding: 0.28rem 0.48rem;
  font-size: 0.82rem;
  line-height: 1.22;
}

#activityFeed .feed-time {
  color: #60553f;
  font-size: 1.03rem;
}

#activityFeed .feed-msg {
  color: #253328;
}

#systemFeed li {
  background: rgba(246, 245, 237, 0.98);
  border-left-color: rgba(72, 90, 82, 0.35);
  font-size: 0.79rem;
}

#systemFeed .feed-time {
  color: #6b6a5f;
}

#systemFeed .feed-msg {
  color: #3a4338;
}

.feed li {
  background: rgba(255, 248, 226, 0.9);
  border-left: 3px solid var(--accent);
  padding: 0.3rem 0.52rem;
  color: #2d3325;
  font-size: 0.84rem;
  line-height: 1.28;
  border-radius: 6px;
  display: flex;
  align-items: baseline;
  gap: 0.36rem;
  flex-wrap: wrap;
}

.feed-time {
  color: #6b624a;
  font-family: "VT323", monospace;
  font-size: 1rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.feed-msg {
  color: #2d3325;
  word-break: break-word;
  flex: 1 1 auto;
}

.trust-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex-wrap: wrap;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(28, 86, 70, 0.24);
  background: rgba(226, 243, 234, 0.72);
  color: #1f5e4c;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  padding: 0.02rem 0.34rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.55rem;
}

.integrity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.flow-item {
  border: 1px solid rgba(45, 77, 64, 0.2);
  border-radius: 9px;
  background: rgba(252, 246, 223, 0.88);
  padding: 0.5rem 0.58rem;
  display: grid;
  gap: 0.2rem;
}

.flow-item span {
  color: #5f593f;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flow-item strong {
  color: #204236;
  font-size: 0.92rem;
}

.flow-item strong.lp-risk-band {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(50, 84, 68, 0.26);
  padding: 0.06rem 0.45rem;
  letter-spacing: 0.03em;
}

.flow-item strong.lp-risk-band-idle {
  color: #4f5b4d;
  background: rgba(233, 230, 214, 0.92);
  border-color: rgba(92, 101, 84, 0.3);
}

.flow-item strong.lp-risk-band-low {
  color: #175a49;
  background: rgba(220, 246, 234, 0.92);
  border-color: rgba(23, 90, 73, 0.36);
}

.flow-item strong.lp-risk-band-watch {
  color: #8a5f13;
  background: rgba(253, 239, 205, 0.95);
  border-color: rgba(148, 96, 14, 0.36);
}

.flow-item strong.lp-risk-band-high {
  color: #8f3f17;
  background: rgba(255, 225, 209, 0.95);
  border-color: rgba(143, 63, 23, 0.38);
}

.flow-item strong.lp-risk-band-critical {
  color: #fff2ef;
  background: rgba(168, 40, 18, 0.95);
  border-color: rgba(132, 30, 12, 0.7);
}

.spotlight-grid {
  display: grid;
  gap: 0.52rem;
}

.spotlight-card {
  border: 1px solid rgba(45, 77, 64, 0.22);
  border-radius: 9px;
  background: rgba(252, 246, 223, 0.9);
  padding: 0.52rem 0.58rem;
  font-size: 0.82rem;
  color: #2c3729;
}

.spotlight-card strong {
  color: #1f4334;
  display: block;
  margin-bottom: 0.16rem;
}

.spotlight-card p {
  margin: 0.15rem 0;
}

.round-stream {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.62rem;
}

.round-card {
  border: 1px solid rgba(45, 77, 64, 0.22);
  border-radius: 10px;
  background: rgba(252, 246, 223, 0.9);
  padding: 0.58rem;
  display: grid;
  gap: 0.4rem;
}

.round-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.round-head strong {
  font-size: 0.82rem;
  color: #214236;
}

.round-head span {
  font-size: 0.75rem;
  color: #6e644b;
}

.round-label {
  margin: 0;
  font-size: 0.84rem;
  color: #2a3024;
}

.round-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.76rem;
  color: #5f593f;
}

.round-participants {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.round-participants li {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  font-size: 0.76rem;
  color: #2c3326;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.55rem;
}

.heat-card {
  border: 1px solid rgba(45, 77, 64, 0.22);
  border-radius: 9px;
  background: rgba(252, 246, 223, 0.88);
  padding: 0.5rem 0.56rem;
}

.heat-card strong {
  display: block;
  margin-bottom: 0.22rem;
  color: #1f4031;
  font-size: 0.82rem;
}

.heat-card p {
  margin: 0.14rem 0;
  font-size: 0.75rem;
  color: #5e573f;
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
}

.compact-feed {
  max-height: 236px;
}

.rulebook-meta {
  margin-bottom: 0.42rem;
  font-size: 0.8rem;
}

.rulebook-meta a {
  color: #1e5f47;
  text-decoration: underline;
}

.rule-health-inline {
  margin-bottom: 0.62rem;
  padding: 0.38rem 0.52rem;
  border: 1px solid rgba(45, 77, 64, 0.22);
  border-radius: 8px;
  background: rgba(244, 250, 236, 0.76);
  color: #325245;
  font-size: 0.79rem;
}

.streak-badge {
  border-radius: 999px;
  border: 1px solid rgba(46, 86, 69, 0.24);
  padding: 0.03rem 0.38rem;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.streak-badge.hot {
  color: #0f7a52;
  background: rgba(219, 244, 230, 0.8);
}

.streak-badge.cold {
  color: #9a4d22;
  background: rgba(248, 229, 208, 0.82);
}

.streak-badge.flat {
  color: #5e5a49;
  background: rgba(238, 231, 210, 0.82);
}

.intent-pill {
  display: inline-block;
  border: 1px solid rgba(49, 84, 66, 0.22);
  border-radius: 999px;
  padding: 0.02rem 0.34rem;
  font-size: 0.72rem;
  color: #295240;
  background: rgba(230, 245, 236, 0.8);
}

.feed li.feed-enter {
  opacity: 1;
  transform: none;
}

.feed li.feed-enter.is-visible {
  opacity: 1;
  transform: none;
  transition-delay: 0ms;
}

.lounge {
  margin-bottom: 1rem;
}

.panel + .lounge,
.panel + .insight-grid {
  margin-top: 1rem;
}

.live-table-shell {
  display: grid;
  gap: 0.72rem;
}

.live-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem 0.9rem;
  flex-wrap: wrap;
}

.live-table-head .panel-sub {
  margin-bottom: 0;
}

.live-table-head-pills {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.live-table-head-pills .pill {
  padding: 0.32rem 0.62rem;
  font-size: 0.75rem;
}

.live-table-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 0.5rem;
}

.live-table-kpi {
  border: 1px solid rgba(45, 77, 64, 0.2);
  border-radius: 10px;
  background: rgba(250, 244, 220, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  padding: 0.42rem 0.54rem;
  display: grid;
  gap: 0.22rem;
}

.live-table-kpi span {
  color: #5f6546;
  font-size: 0.69rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-table-kpi strong {
  color: #1f4233;
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.live-table-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1.45fr) repeat(3, minmax(130px, 1fr)) auto;
  gap: 0.5rem;
  align-items: end;
}

.live-table-control {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.live-table-control span {
  color: #566249;
  font-size: 0.69rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.live-table-control input,
.live-table-control select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(44, 80, 62, 0.24);
  border-radius: 9px;
  background: rgba(255, 252, 240, 0.94);
  color: #202314;
  padding: 0.42rem 0.52rem;
  font: inherit;
}

.live-table-density-btn {
  border: 1px solid rgba(22, 102, 82, 0.36);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(240, 252, 245, 0.95), rgba(212, 238, 223, 0.98));
  color: #18503f;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: 2rem;
  padding: 0.4rem 0.72rem;
}

.live-table-density-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(223, 246, 234, 0.96), rgba(191, 228, 210, 0.98));
  border-color: rgba(17, 93, 74, 0.44);
}

.live-table-density-btn:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 5px 11px rgba(19, 93, 76, 0.13);
}

.live-table-filter-meta {
  margin: -0.1rem 0 0.08rem;
  font-size: 0.8rem;
}

.live-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.6rem;
  flex-wrap: wrap;
}

.live-table-page-meta {
  margin: 0;
  font-size: 0.79rem;
  color: #546148;
}

.live-table-page-btn {
  border: 1px solid rgba(24, 94, 75, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(240, 252, 245, 0.95), rgba(212, 238, 223, 0.98));
  color: #18503f;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 1.95rem;
  padding: 0.35rem 0.68rem;
  white-space: nowrap;
}

.live-table-page-btn:not(:disabled):hover {
  transform: translateY(-0.5px);
  box-shadow: 0 5px 11px rgba(19, 93, 76, 0.12);
}

.live-table-page-btn:disabled {
  opacity: 0.58;
  cursor: default;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.72rem;
  padding-top: 0.2rem;
  overflow: visible;
  contain: layout style;
}

.agent-card {
  border: 1px solid rgba(32, 64, 52, 0.24);
  border-radius: 10px;
  padding: 0.64rem;
  background: linear-gradient(180deg, #fff7de, #f3e9c3);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-height: 0;
  height: 100%;
  transition:
    transform var(--dur-mid) var(--easing),
    box-shadow var(--dur-mid) var(--easing),
    border-color var(--dur-mid) var(--easing),
    background var(--dur-mid) var(--easing);
}

.agent-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -38%;
  width: 34%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-130%) rotate(8deg);
  transition: transform 760ms var(--easing);
  pointer-events: none;
}

.agent-card:hover {
  transform: translateY(-1.5px);
  border-color: rgba(16, 96, 79, 0.45);
  box-shadow: 0 7px 14px rgba(63, 48, 18, 0.11);
}

.agent-card:hover::before {
  transform: translateX(250%) rotate(8deg);
}

.agent-card.is-fresh {
  animation: cardHighlight 420ms ease-out;
}

.agent-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.agent-card .status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #3f513f;
  font-size: 0.72rem;
  position: relative;
  letter-spacing: 0.02em;
}

.agent-card .status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 0;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.agent-card .status.status-live {
  color: #19765a;
}

.agent-card .status.status-idle {
  color: #7d704b;
}

.agent-card .status.status-retired {
  color: #8b4d4d;
}

.agent-table-chip {
  border: 1px solid rgba(38, 77, 62, 0.2);
  border-radius: 999px;
  background: rgba(250, 248, 239, 0.82);
  color: #435042;
  font-size: 0.67rem;
  line-height: 1.1;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  padding: 0.2rem 0.46rem;
  white-space: nowrap;
}

.agent-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.2rem 0.5rem;
  margin-top: 0.14rem;
}

.agent-kpi-grid .meta {
  margin: 0;
}

.agent-card .agent-detail {
  margin: 0;
}

.table-grid[data-density="compact"] .agent-card .agent-detail,
.table-grid[data-density="compact"] .agent-card .bars {
  display: none;
}

.table-grid[data-density="compact"] .agent-card strong {
  margin-bottom: 0.24rem;
  font-size: 0.84rem;
}

.table-grid[data-density="compact"] .agent-card .meta.small {
  font-size: 0.7rem;
  line-height: 1.22;
}

.agent-card-empty {
  justify-content: center;
  align-items: flex-start;
  gap: 0.26rem;
}

.agent-builder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.52rem;
  margin: 0.55rem 0 0.75rem;
  align-items: stretch;
}

.agent-template-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-builder input,
.agent-advanced input {
  width: 100%;
  border: 1px solid rgba(44, 80, 62, 0.26);
  border-radius: 8px;
  background: rgba(255, 253, 243, 0.92);
  color: #202314;
  padding: 0.5rem 0.62rem;
  font: inherit;
}

.agent-advanced {
  border: 1px solid rgba(46, 74, 61, 0.2);
  border-radius: 10px;
  background: rgba(253, 248, 230, 0.88);
  padding: 0.5rem 0.6rem;
  margin: 0 0 0.65rem;
}

.agent-advanced summary {
  cursor: pointer;
  color: #2a3f31;
  font-size: 0.86rem;
  user-select: none;
}

.agent-advanced .panel-sub {
  margin: 0.55rem 0 0.4rem;
}

.agent-builder button {
  border: 1px solid rgba(16, 115, 95, 0.48);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fff9, #d5f0e3);
  color: #1a4f40;
  width: 100%;
  min-height: 2.3rem;
  padding: 0.52rem 0.72rem;
  white-space: normal;
  font: inherit;
  font-size: 0.81rem;
  line-height: 1.2;
}

.agent-builder button:hover {
  background: linear-gradient(180deg, #effff6, #c5e9d8);
  transform: translateY(-0.5px);
  box-shadow: 0 5px 10px rgba(18, 97, 79, 0.12);
}

.agent-builder button:disabled {
  border-color: rgba(78, 84, 70, 0.3);
  background: linear-gradient(180deg, #f2efe3, #dfdbc8);
  color: #696f5f;
  box-shadow: none;
  transform: none;
}

#createAgentBtn[aria-busy="true"] {
  opacity: 0.84;
}

.retire-agent-hint {
  margin: -0.1rem 0 0.52rem;
  color: #4f5848;
  font-size: 0.78rem;
}

.agent-actions #retireAgentBtn[aria-busy="true"] {
  opacity: 0.84;
}

.agent-prompt-details {
  margin: 0 0 0.8rem;
  border: 1px solid rgba(45, 77, 64, 0.24);
  border-radius: 10px;
  background: rgba(252, 246, 223, 0.92);
  padding: 0.52rem 0.62rem;
}

.agent-prompt-details summary {
  cursor: pointer;
  color: #214438;
  font-size: 0.8rem;
  user-select: none;
}

.connect-flow-hint {
  margin: -0.2rem 0 0.62rem;
  border: 1px solid rgba(22, 114, 90, 0.26);
  border-radius: 8px;
  background: rgba(223, 241, 232, 0.65);
  color: #245040;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.36rem 0.52rem;
}

.agent-prompt {
  margin: 0.48rem 0 0;
  color: #243527;
  border: 0;
  border-radius: 8px;
  background: rgba(248, 242, 219, 0.96);
  padding: 0.62rem;
  font: 0.82rem/1.45 "IBM Plex Mono", monospace;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

.orchestrator-box {
  border: 1px solid rgba(48, 79, 64, 0.24);
  border-radius: 10px;
  background: rgba(252, 246, 223, 0.9);
  padding: 0.7rem;
  margin-bottom: 0.8rem;
}

.orchestrator-box h4 {
  margin: 0 0 0.35rem;
  color: #1f4031;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.99rem;
}

.orchestrator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.orchestrator-field {
  display: grid;
  gap: 0.25rem;
  color: #2e3325;
  font-size: 0.82rem;
}

.orchestrator-field select,
.orchestrator-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(44, 80, 62, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.92);
  color: #202314;
  padding: 0.46rem 0.58rem;
  font: inherit;
}

.orchestrator-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  color: #2a372b;
  font-size: 0.85rem;
}

.orchestrator-toggle input {
  accent-color: #1f8e72;
}

.orchestrator-actions {
  margin-top: 0.62rem;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  flex-wrap: wrap;
}

.orchestrator-actions button {
  border: 1px solid rgba(16, 115, 95, 0.48);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fff9, #d5f0e3);
  color: #1a4f40;
  padding: 0.46rem 0.7rem;
  font: inherit;
}

.orchestrator-actions button:hover {
  background: linear-gradient(180deg, #effff6, #c5e9d8);
}

.orchestrator-actions .panel-sub {
  margin: 0;
}

.safety-box {
  border: 1px solid rgba(48, 79, 64, 0.24);
  border-radius: 10px;
  background: rgba(252, 246, 223, 0.9);
  padding: 0.7rem;
}

.safety-box h4 {
  margin: 0 0 0.35rem;
  color: #1f4031;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.99rem;
}

.safety-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.safety-row label {
  color: #2e3325;
  font-size: 0.82rem;
}

.safety-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(44, 80, 62, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.92);
  color: #202314;
  padding: 0.46rem 0.58rem;
  font: inherit;
}

.safety-row button,
.safety-actions button {
  border: 1px solid rgba(16, 115, 95, 0.48);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fff9, #d5f0e3);
  color: #1a4f40;
  padding: 0.46rem 0.7rem;
  font: inherit;
}

.safety-row button:hover,
.safety-actions button:hover {
  background: linear-gradient(180deg, #effff6, #c5e9d8);
}

.safety-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.runtime-action-box {
  margin-top: 0;
  border: 1px solid rgba(39, 66, 53, 0.2);
  border-radius: 12px;
  padding: 0.62rem 0.72rem 0.7rem;
  background: rgba(255, 252, 240, 0.72);
}

.runtime-action-box h4 {
  margin: 0 0 0.34rem;
  color: #1f4031;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.99rem;
}

.runtime-action-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.lp-controls {
  margin-top: 0.7rem;
  margin-bottom: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

#lpTopPositions,
#lpMyPositions,
#lpEventFeed {
  margin-top: 0.42rem;
}

.runtime-action-field {
  display: grid;
  gap: 0.18rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.runtime-action-field span {
  letter-spacing: 0.03em;
}

.runtime-action-field input,
.runtime-action-field select {
  font: inherit;
  border: 1px solid rgba(25, 78, 62, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 0.4rem 0.5rem;
}

.runtime-action-buttons {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.runtime-action-buttons button {
  flex: 1 1 160px;
  border: 1px solid rgba(20, 102, 81, 0.38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(230, 249, 239, 0.92), rgba(201, 236, 220, 0.96));
  color: #184f3d;
  font: inherit;
  font-weight: 600;
  padding: 0.42rem 0.62rem;
}

.runtime-action-buttons button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 12px rgba(31, 98, 77, 0.16);
}

.runtime-action-feed {
  max-height: 240px;
  overflow-y: auto;
}

.runtime-action-feed li {
  font-size: 0.8rem;
  line-height: 1.24;
}

.agent-card strong {
  display: block;
  margin: 0.14rem 0 0.32rem;
  font-size: 0.88rem;
  line-height: 1.22;
}

.agent-card .meta {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.28;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.agent-card .meta.small {
  font-size: 0.72rem;
}

.bars {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.42rem;
}

.bars .bar {
  position: relative;
  height: 6px;
  border-radius: 20px;
  background: rgba(80, 96, 86, 0.2);
  overflow: hidden;
}

.bars .bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 20px;
  width: var(--fill);
  background: linear-gradient(to right, #1ea47b, #89c76f);
}

.bars .meta {
  color: var(--muted);
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
}

.agent-card .glow {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  right: -38px;
  bottom: -52px;
  background: radial-gradient(circle, rgba(54, 178, 136, 0.2), transparent 70%);
}

.marketing {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

#referralPanel {
  margin-bottom: 1rem;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 1rem;
}

.mission {
  border: 1px solid rgba(45, 77, 64, 0.22);
  border-radius: 10px;
  padding: 0.8rem;
  background: var(--panel-2);
}

.mission:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 108, 90, 0.42);
  box-shadow: 0 6px 12px rgba(66, 51, 19, 0.1);
}

.mission h4 {
  margin: 0 0 0.4rem;
  color: #1f4031;
}

.mission p {
  margin: 0;
  color: #3b4735;
  font-size: 0.91rem;
}

.mission-reward {
  margin-top: 0.5rem !important;
  color: var(--good) !important;
  font-family: "VT323", monospace;
  font-size: 1.25rem;
  font-weight: 400;
}

.mission button {
  border: 1px solid rgba(17, 108, 90, 0.45);
  border-radius: 8px;
  background: linear-gradient(180deg, #f4fff8, #d7f2e5);
  color: #1a4f40;
  padding: 0.45rem 0.65rem;
  font: inherit;
  margin-top: 0.55rem;
}

.mission button:hover {
  background: linear-gradient(180deg, #ebfff6, #c8ead9);
  transform: translateY(-0.5px);
  box-shadow: 0 5px 10px rgba(17, 97, 79, 0.11);
}

.mission button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.referral-box {
  border: 1px solid rgba(48, 81, 65, 0.24);
  border-radius: 10px;
  padding: 0.6rem;
  background: var(--panel-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.referral-box:hover {
  transform: translateY(-0.5px);
  border-color: rgba(14, 103, 86, 0.4);
  box-shadow: 0 5px 10px rgba(70, 53, 20, 0.09);
}

#referralCode {
  color: var(--accent);
  font-family: "VT323", monospace;
  font-size: 1.25rem;
}

#referralCopyBtn {
  border: 1px solid rgba(16, 108, 90, 0.45);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fff9, #d8f1e4);
  color: #1a4f40;
  padding: 0.42rem 0.7rem;
  font: inherit;
  white-space: nowrap;
}

#referralCopyBtn:hover {
  background: linear-gradient(180deg, #eefff6, #c8ead9);
  transform: translateY(-0.5px);
  box-shadow: 0 5px 10px rgba(16, 101, 83, 0.12);
}

.statusbar {
  border: 1px solid rgba(45, 74, 59, 0.25);
  border-radius: 8px;
  background: rgba(255, 249, 232, 0.9);
  padding: 0.45rem 0.55rem;
  color: var(--muted);
  min-height: 1.7rem;
}

.statusbar.status-pulse {
  animation: statusPulse 360ms ease-out;
}

.statusbar.error {
  border-color: rgba(179, 79, 39, 0.5);
  color: #9f3218;
}

.statusbar.success {
  border-color: rgba(40, 137, 92, 0.45);
  color: #1b744b;
}

.mission-status {
  color: var(--warn);
  margin-top: 0.4rem;
  font-size: 0.86rem;
}

.value-pulse {
  animation: valuePulse 260ms ease-out;
}

.ui-reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

.ui-reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
  transition-delay: 0ms;
}

.aurora {
  pointer-events: none;
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.28;
  z-index: -1;
}

.aurora-1 {
  background: #e9cd6f;
  top: -140px;
  left: -110px;
}

.aurora-2 {
  background: #6bc59f;
  right: -80px;
  bottom: -150px;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(53, 45, 30, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(53, 45, 30, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.24;
  z-index: -1;
}

@keyframes valuePulse {
  0% {
    color: inherit;
    opacity: 1;
  }
  50% {
    color: #145e4c;
    opacity: 0.94;
  }
  100% {
    color: inherit;
    opacity: 1;
  }
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 rgba(16, 101, 83, 0);
  }
  45% {
    box-shadow: 0 0 0 6px rgba(16, 101, 83, 0.14);
  }
  100% {
    box-shadow: 0 0 0 rgba(16, 101, 83, 0);
  }
}

@keyframes cardFlash {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  35% {
    transform: translateY(-3px) scale(1.01);
    filter: brightness(1.06);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes cardHighlight {
  0% {
    box-shadow: 0 0 0 rgba(20, 114, 95, 0);
    border-color: rgba(32, 64, 52, 0.24);
  }
  45% {
    box-shadow: 0 0 0 5px rgba(20, 114, 95, 0.12);
    border-color: rgba(17, 108, 90, 0.45);
  }
  100% {
    box-shadow: 0 0 0 rgba(20, 114, 95, 0);
    border-color: rgba(32, 64, 52, 0.24);
  }
}

.site-footer {
  margin-top: 1.2rem;
  border-top: 1px solid rgba(45, 37, 22, 0.18);
  background:
    linear-gradient(180deg, rgba(252, 245, 222, 0.9), rgba(244, 232, 195, 0.95)),
    repeating-linear-gradient(
      to right,
      rgba(37, 31, 20, 0.04) 0px,
      rgba(37, 31, 20, 0.04) 1px,
      transparent 1px,
      transparent 18px
    );
}

.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 1.25rem;
  display: grid;
  gap: 0.7rem;
}

.footer-brand strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  color: #21352b;
}

.footer-brand p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: #2d3529;
  font-size: 0.85rem;
}

.footer-meta strong {
  color: #194e3e;
}

.footer-meta a {
  color: #176452;
  text-decoration-color: rgba(23, 100, 82, 0.35);
}

.footer-meta a:hover {
  text-decoration-color: rgba(23, 100, 82, 0.7);
}

.footer-note {
  color: #5f573f;
  font-size: 0.79rem;
}

.wallet-requests-box {
  margin-top: 0;
  border: 1px solid rgba(39, 66, 53, 0.2);
  border-radius: 12px;
  padding: 0.62rem 0.72rem 0.7rem;
  background: rgba(255, 252, 240, 0.72);
}

.safety-box h4,
.wallet-requests-box h4 {
  margin: 0 0 0.34rem;
}

.wallet-request-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.wallet-request-field {
  display: grid;
  gap: 0.18rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.wallet-request-field span {
  letter-spacing: 0.03em;
}

.wallet-request-field input,
.wallet-request-field select {
  font: inherit;
  border: 1px solid rgba(25, 78, 62, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 0.4rem 0.5rem;
}

.wallet-request-note {
  grid-column: 1 / -1;
}

#submitWalletRequestBtn {
  grid-column: 1 / -1;
  border: 1px solid rgba(20, 102, 81, 0.38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(230, 249, 239, 0.92), rgba(201, 236, 220, 0.96));
  color: #184f3d;
  font: inherit;
  font-weight: 600;
  padding: 0.42rem 0.62rem;
}

#submitWalletRequestBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 12px rgba(31, 98, 77, 0.16);
}

.wallet-request-feed {
  max-height: 310px;
  overflow-y: auto;
}

.wallet-request-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.02rem 0.4rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1px solid rgba(41, 84, 66, 0.24);
  background: rgba(255, 255, 255, 0.72);
  color: #2c4538;
}

.wallet-request-status.pending {
  color: #87611c;
  border-color: rgba(150, 104, 21, 0.36);
  background: rgba(252, 241, 204, 0.66);
}

.wallet-request-status.approved {
  color: #1b6a53;
  border-color: rgba(26, 116, 91, 0.35);
  background: rgba(211, 243, 231, 0.66);
}

.wallet-request-status.rejected {
  color: #8b3b3b;
  border-color: rgba(151, 58, 58, 0.34);
  background: rgba(251, 220, 220, 0.7);
}

.admin-wallet-actions {
  display: inline-flex;
  gap: 0.3rem;
  margin-left: 0.6rem;
}

.admin-wallet-btn {
  border: 1px solid rgba(33, 77, 62, 0.3);
  border-radius: 7px;
  font: inherit;
  font-size: 0.72rem;
  padding: 0.22rem 0.45rem;
  background: rgba(255, 255, 255, 0.76);
  color: #204535;
}

.admin-wallet-btn.approve {
  border-color: rgba(21, 106, 82, 0.36);
  background: rgba(220, 246, 235, 0.78);
  color: #195442;
}

.admin-wallet-btn.reject {
  border-color: rgba(134, 55, 55, 0.34);
  background: rgba(249, 223, 223, 0.78);
  color: #7a3232;
}

.admin-wallet-btn:hover {
  transform: translateY(-1px);
}

.admin-risk-controls {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.35rem;
}

.admin-risk-controls label {
  font-size: 0.75rem;
  color: var(--muted);
}

.admin-risk-controls input {
  font: inherit;
  border: 1px solid rgba(30, 82, 66, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  padding: 0.4rem 0.52rem;
}

.admin-replay-controls {
  margin-top: 0.72rem;
  padding-top: 0.72rem;
  border-top: 1px dashed rgba(45, 77, 64, 0.28);
  display: grid;
  gap: 0.45rem;
}

.admin-replay-controls h4 {
  margin: 0;
  color: #214236;
  font-size: 0.84rem;
}

.admin-replay-controls .panel-sub {
  margin: 0;
}

.admin-replay-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.35fr) minmax(140px, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.admin-replay-form select,
.admin-replay-form input {
  border: 1px solid rgba(44, 80, 62, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.92);
  color: #202314;
  padding: 0.36rem 0.52rem;
  font: inherit;
}

.admin-replay-form button {
  white-space: nowrap;
}

.admin-replay-feed {
  max-height: 182px;
}

@media (hover: none) {
  .agent-card:hover,
  .mission:hover,
  .metric:hover,
  .leaderboard li:hover,
  .referral-box:hover,
  .live-table-density-btn:hover,
  .topbar button:hover,
  .agent-builder button:hover,
  .mission button:hover,
  #referralCopyBtn:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .ui-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

@media (max-width: 1120px) {
  .live-intel-stage-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .live-intel-tape-card {
    grid-row: auto;
    min-height: 0;
    max-height: none;
  }

  .live-intel-tape-card .tape-feed {
    height: auto;
    max-height: clamp(300px, 54vh, 420px);
  }

  .live-intel-integrity-card,
  .live-intel-spotlight-card {
    height: auto;
    overflow: visible;
  }

  .live-intel-integrity-card #integrityIssues {
    min-height: 140px;
    max-height: 180px;
  }

  .live-intel-spotlight-card #p2pSpotlight {
    min-height: 188px;
    max-height: 248px;
  }

  .live-intel-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-intel-analysis-chapter {
    font-size: 0.75rem;
  }

  .live-intel-analysis-grid > .panel {
    grid-column: auto;
  }

  .live-intel-round-card,
  .live-intel-rulebook-card,
  .live-intel-heat-card,
  .live-intel-intent-card {
    grid-column: 1 / -1;
  }

  .live-intel-admin-grid {
    grid-template-columns: 1fr;
  }

  .live-intel-lp-card .flow-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .live-intel-lp-card .runtime-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .live-intel-lp-card .runtime-action-buttons button {
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0.34rem 0.46rem;
    font-size: 0.76rem;
    line-height: 1.15;
  }

  .live-intel-lp-card .runtime-action-buttons button:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }

  .live-panel {
    grid-template-columns: 1fr;
    --panel-list-height: 236px;
  }

  .onboard-grid {
    grid-template-columns: 1fr;
  }

  .onboard-main {
    grid-template-columns: 1fr;
  }

  .onboard-agent-grid,
  .onboard-human-grid {
    grid-template-columns: 1fr;
  }

  .agent-builder {
    grid-template-columns: 1fr;
  }

  .lp-controls {
    grid-template-columns: 1fr;
  }

  .live-panel-column {
    padding: 0.62rem 0.64rem 0.66rem;
  }

  #activityFeed,
  #systemFeed {
    min-height: calc((var(--panel-list-height) - 2rem) / 2);
    max-height: calc((var(--panel-list-height) - 2rem) / 2);
  }

  .topbar {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.62rem 0.68rem;
    margin-bottom: 0.75rem;
  }

  .topbar-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0.34rem 0.66rem;
    font-size: 0.78rem;
    line-height: 1;
    flex: 0 0 auto;
  }

  .topbar-menu-toggle[aria-expanded="true"] {
    background: linear-gradient(180deg, #dff7ec, #c2e8d8);
  }

  .topbar-menu {
    display: none;
    position: absolute;
    margin-left: 0;
    left: 0.58rem;
    right: 0.58rem;
    top: calc(100% + 0.32rem);
    z-index: 24;
    flex-direction: column;
    align-items: stretch;
    gap: 0.34rem;
    padding: 0.44rem;
    border: 1px solid rgba(35, 67, 54, 0.2);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 252, 243, 0.98), rgba(245, 235, 202, 0.96));
    box-shadow: 0 10px 26px rgba(61, 47, 20, 0.18);
    backdrop-filter: blur(8px);
    max-height: min(56vh, 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .topbar.is-menu-open .topbar-menu {
    display: flex;
  }

  .view-nav a {
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 0.74rem;
    padding: 0.3rem 0.58rem;
  }

  .view-nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.08rem;
    gap: 0.34rem;
  }

  .view-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.42rem;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-menu .pill {
    padding: 0.34rem 0.62rem;
    font-size: 0.76rem;
  }

  .brand {
    font-size: 1.38rem;
    gap: 0.45rem;
    min-width: 0;
  }

  .brand-mark {
    width: 1.62rem;
    height: 1.62rem;
  }

  .pill {
    white-space: nowrap;
    font-size: 0.76rem;
    padding: 0.34rem 0.64rem;
  }

  .topbar button {
    padding: 0.36rem 0.68rem;
    font-size: 0.78rem;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .live-intel-command {
    grid-template-columns: 1fr;
  }

  .live-intel-command .follow-control select {
    min-width: 0;
    width: 100%;
  }

  .live-intel-analysis-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .live-intel-analysis-chapter {
    font-size: 0.72rem;
  }

  .live-intel-analysis-grid > .panel {
    grid-column: 1 / -1;
  }

  .live-intel-stage-grid {
    gap: 0.8rem;
  }

  .live-intel-round-card .round-stream {
    min-height: 210px;
    max-height: 274px;
  }

  .live-intel-streak-card .compact-feed,
  .live-intel-intent-card .compact-feed {
    min-height: 196px;
    max-height: 222px;
  }

  .live-intel-lp-card .flow-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .live-table-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-table-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-table-control:first-child {
    grid-column: 1 / -1;
  }

  .live-table-density-btn {
    grid-column: 1 / -1;
  }

  .live-table-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .live-table-page-meta {
    grid-column: 1 / -1;
    order: -1;
  }

  .table-grid {
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  }

  .hero-metrics,
  .mission-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide-card-steps,
  .guide-card-ready,
  .guide-card-faq,
  .guide-card-stack {
    grid-column: 1 / -1;
  }

  .guide-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  .guide-dual-audience {
    grid-template-columns: 1fr;
  }

  .guide-faq-hub {
    grid-template-columns: 1fr;
  }

  .wallet-request-form {
    grid-template-columns: 1fr;
  }

  .runtime-action-form {
    grid-template-columns: 1fr;
  }

  .runtime-action-buttons {
    flex-direction: column;
  }

  .admin-replay-form {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (max-width: 640px) {
  .live-table-head-pills {
    width: 100%;
  }

  .live-table-kpis {
    grid-template-columns: 1fr;
  }

  .live-table-controls {
    grid-template-columns: 1fr;
  }

  .live-table-pagination {
    grid-template-columns: 1fr;
  }

  .live-table-page-btn {
    width: 100%;
  }

  .table-grid {
    grid-template-columns: 1fr;
  }

  .live-intel-lp-card .flow-grid {
    grid-template-columns: 1fr;
  }

  .rulebook-toggle-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
  }

  .table-heat-toggle-btn {
    width: 100%;
    justify-content: center;
    display: inline-flex;
  }

  .live-intel-lp-card .runtime-action-buttons button {
    min-height: 1.92rem;
    font-size: 0.74rem;
  }

  .live-intel-tape-card .tape-feed {
    max-height: clamp(220px, 46vh, 300px);
  }

  .live-intel-admin-shell > summary {
    font-size: 0.88rem;
  }
}
