.operator-page,
.operator-page * { letter-spacing: 0; }

.operator-page { --op-rail: 188px; background: #070a08; }
.op-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  min-height: 64px;
  display: grid;
  grid-template-columns: var(--op-rail) minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #080c09;
}
.op-brand {
  min-width: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  text-decoration: none;
}
.op-brand > span:last-child { min-width: 0; }
.op-brand strong,
.op-brand small { display: block; white-space: nowrap; }
.op-brand strong { font: 800 11px/1.2 var(--mono); }
.op-brand small { margin-top: 4px; color: var(--acid); font: 8px/1 var(--mono); }
.op-context,
.op-actions,
.op-mode,
.op-sync { display: flex; align-items: center; }
.op-context { min-width: 0; gap: 9px; padding: 0 14px; }
.op-mode,
.op-chain,
.op-sync {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 9px/1 var(--mono);
  white-space: nowrap;
}
.op-mode { gap: 7px; border-color: #6a5728; color: var(--amber); }
.op-chain { display: inline-flex; align-items: center; border-color: #31533a; color: var(--green); }
.op-sync { min-width: 0; gap: 7px; overflow: hidden; }
.op-sync span { overflow: hidden; text-overflow: ellipsis; }
.op-actions { gap: 7px; padding-right: 14px; }
.op-actions a { text-decoration: none; }

.op-layout { padding-top: 64px; }
.op-rail {
  position: fixed;
  inset: 64px auto 0 0;
  z-index: 30;
  width: var(--op-rail);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: #090d0a;
}
.op-rail nav { padding: 16px 9px; }
.op-rail nav a {
  min-height: 43px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}
.op-rail nav a:hover { color: var(--text); background: var(--surface); }
.op-rail nav a.active { border-left-color: var(--acid); background: var(--surface-2); color: var(--acid); }
.op-rail nav span { color: var(--faint); font: 9px/1 var(--mono); }
.op-rail nav b { min-width: 0; font-size: 11px; overflow-wrap: anywhere; }
.op-rail-state { padding: 15px 16px 19px; border-top: 1px solid var(--line); }
.op-rail-state span,
.op-rail-state strong,
.op-rail-state code { display: block; }
.op-rail-state span { color: var(--faint); font: 8px/1.3 var(--mono); }
.op-rail-state strong { margin-top: 7px; color: var(--green); font: 700 13px/1.2 var(--mono); }
.op-rail-state code { margin-top: 7px; color: var(--red); font: 8px/1.4 var(--mono); overflow-wrap: anywhere; }
.op-rail-state p { margin: 13px 0 0; color: var(--faint); font-size: 9px; line-height: 1.55; }

.op-main { min-width: 0; margin-left: var(--op-rail); padding-bottom: 52px; }
.op-truth {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 7px clamp(15px, 2.3vw, 30px);
  border-bottom: 1px solid #4f292c;
  background: #1b1011;
}
.op-truth > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.op-truth strong { color: var(--red); font: 700 10px/1.2 var(--mono); white-space: nowrap; }
.op-truth span { min-width: 0; color: #d0a2a5; font-size: 10px; overflow-wrap: anywhere; }
.op-truth code { color: #a97579; font: 8px/1.3 var(--mono); white-space: nowrap; }

.op-hero {
  position: relative;
  min-height: 348px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .34fr);
  align-items: stretch;
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
  background-color: #070c08;
  background-image: url("./assets/wse-rwa-signal.png");
  background-position: center;
  background-size: cover;
}
.op-hero::before { content: ""; position: absolute; inset: 0; background: rgb(3 7 4 / 48%); pointer-events: none; }
.op-hero-copy,
.op-hero-state { position: relative; z-index: 1; }
.op-hero-copy { align-self: end; padding: 42px clamp(20px, 4vw, 58px) 35px; }
.op-eyebrow { color: var(--green); font: 8px/1.3 var(--mono); }
.op-hero h1 { margin: 17px 0 0; font: 800 48px/.92 var(--mono); }
.op-hero-copy > p { max-width: 630px; margin: 17px 0 0; color: #bac6be; font-size: 11px; line-height: 1.7; }
.op-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.op-hero-badges span { min-height: 27px; display: inline-flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line-strong); background: rgb(5 10 7 / 76%); }
.op-hero-badges b { font: 600 8px/1 var(--mono); }
.op-hero-state {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px 24px 36px;
  border-left: 1px solid rgb(75 105 84 / 65%);
  background: rgb(5 10 7 / 72%);
}
.op-hero-state > span { color: var(--faint); font: 8px/1 var(--mono); }
.op-hero-state > strong { margin-top: 13px; color: var(--red); font: 800 27px/1 var(--mono); overflow-wrap: anywhere; }
.op-hero-state > strong.ok { color: var(--green); }
.op-hero-state > strong.warning { color: var(--amber); }
.op-hero-state > small { margin-top: 10px; color: var(--muted); font: 9px/1.5 var(--mono); overflow-wrap: anywhere; }

.op-section { max-width: 1500px; margin: 0 auto; padding: 42px clamp(15px, 2.5vw, 34px) 0; scroll-margin-top: 82px; }
.op-section + .op-section { margin-top: 18px; padding-top: 46px; border-top: 1px solid var(--line); }
.op-section-heading { min-height: 55px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.op-section-heading h2 { margin: 7px 0 0; font-size: 20px; }
.op-source { color: var(--faint); font: 8px/1.4 var(--mono); text-align: right; overflow-wrap: anywhere; }
.op-heading-state { display: flex; align-items: center; gap: 9px; color: var(--faint); font: 9px/1.3 var(--mono); }

.op-gate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.op-gate { min-width: 0; min-height: 118px; padding: 15px; background: var(--surface); }
.op-gate > span { display: block; color: var(--faint); font-size: 9px; }
.op-gate > strong { display: block; margin-top: 17px; color: var(--red); font: 700 18px/1 var(--mono); overflow-wrap: anywhere; }
.op-gate > strong.ok { color: var(--green); }
.op-gate > strong.warning { color: var(--amber); }
.op-gate > small { display: block; margin-top: 9px; color: var(--muted); font: 8px/1.45 var(--mono); overflow-wrap: anywhere; }
.op-command-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 12px; margin-top: 12px; }
.op-panel { min-width: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.op-panel-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.op-panel-head h3 { margin: 5px 0 0; font-size: 13px; }
.op-panel-head > b { min-width: 28px; min-height: 25px; display: grid; place-items: center; border: 1px solid #6d3035; color: var(--red); font: 700 10px/1 var(--mono); }
.op-blockers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.op-blocker { min-height: 48px; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 9px; align-items: center; padding: 9px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.op-blocker:nth-child(2n) { border-right: 0; }
.op-blocker code { color: #dfa5a8; font: 8px/1.45 var(--mono); overflow-wrap: anywhere; }
.op-detail-list { margin: 0; }
.op-detail-list > div { min-height: 44px; display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 10px; padding: 8px 13px; border-bottom: 1px solid var(--line); }
.op-detail-list > div:last-child { border-bottom: 0; }
.op-detail-list dt { color: var(--faint); font-size: 9px; }
.op-detail-list dd { min-width: 0; margin: 0; color: var(--text); font: 9px/1.4 var(--mono); text-align: right; overflow-wrap: anywhere; }

.op-table-panel { overflow: hidden; }
.op-table { min-width: 820px; }
.op-table-panel { overflow-x: auto; }
.op-table-row { display: grid; grid-template-columns: 118px minmax(100px, .8fr) 75px minmax(90px, .7fr) minmax(110px, .9fr) minmax(125px, 1fr); align-items: center; }
.op-table-row > span { min-width: 0; min-height: 47px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.op-table-row > span:last-child { border-right: 0; }
.op-table-row b { font: 600 9px/1.35 var(--mono); }
.op-table-row small { color: var(--faint); font: 8px/1.35 var(--mono); }
.op-table-head > span { min-height: 34px; color: var(--faint); font: 8px/1 var(--mono); }
.op-tag { display: inline-flex; width: fit-content; min-height: 22px; align-items: center; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--muted); font: 700 8px/1 var(--mono); }
.op-tag.ok { border-color: #315f3d; color: var(--green); }
.op-tag.warning { border-color: #6a5728; color: var(--amber); }
.op-tag.blocked { border-color: #6d3035; color: var(--red); }
.op-empty { min-height: 84px; display: grid; place-items: center; padding: 18px; color: var(--faint); font: 9px/1.5 var(--mono); text-align: center; }

.op-pnl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--line); gap: 1px; }
.op-pnl-grid article { min-width: 0; min-height: 100px; padding: 14px; background: var(--surface); }
.op-pnl-grid span { display: block; color: var(--faint); font-size: 9px; }
.op-pnl-grid strong { display: block; margin-top: 14px; font: 600 16px/1.2 var(--mono); overflow-wrap: anywhere; }
.op-pnl-grid strong.positive { color: var(--green); }
.op-pnl-grid strong.negative { color: var(--red); }
.op-pnl-grid small { display: block; margin-top: 8px; color: var(--faint); font: 8px/1.3 var(--mono); }
.op-data-lock { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; border: 1px solid var(--line); border-top: 0; background: #0a0f0b; }
.op-data-lock > div { min-width: 0; display: grid; grid-template-columns: 9px auto minmax(0, 1fr); align-items: center; gap: 8px; }
.op-data-lock strong { font-size: 10px; }
.op-data-lock span { color: var(--faint); font-size: 9px; overflow-wrap: anywhere; }
.op-data-lock.unlocked { border-color: #315f3d; }

.op-broadcast-layout { display: grid; grid-template-columns: minmax(300px, .65fr) minmax(0, 1.35fr); gap: 12px; }
.op-broadcast-summary { min-height: 250px; display: flex; flex-direction: column; justify-content: center; padding: 23px; border-top: 2px solid var(--red); }
.op-broadcast-summary > span { color: var(--faint); font: 8px/1 var(--mono); }
.op-broadcast-summary > strong { margin-top: 15px; color: var(--red); font: 800 29px/1 var(--mono); }
.op-broadcast-summary > code { margin-top: 13px; color: #d99fa2; font: 8px/1.45 var(--mono); overflow-wrap: anywhere; }
.op-broadcast-summary > p { max-width: 500px; margin: 19px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.op-broadcast-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.op-matrix-row { min-height: 62px; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.op-matrix-row:nth-child(2n) { border-right: 0; }
.op-matrix-row span { color: var(--muted); font-size: 9px; }
.op-matrix-row b { color: var(--faint); font: 8px/1.3 var(--mono); text-align: right; }

.op-audit-table { min-width: 960px; }
.op-audit-table .op-table-row { grid-template-columns: 122px minmax(95px, .8fr) 62px minmax(105px, .9fr) minmax(130px, 1fr) minmax(115px, .9fr) minmax(130px, 1fr); }
.op-footer { max-width: 1500px; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 50px auto 0; padding: 0 clamp(15px, 2.5vw, 34px); border-top: 1px solid var(--line); color: var(--faint); font: 8px/1.4 var(--mono); }
.op-footer strong { color: var(--muted); font-weight: 500; text-align: right; }

@media (max-width: 1120px) {
  .op-chain { display: none; }
  .op-gate-grid,
  .op-pnl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-command-grid,
  .op-broadcast-layout { grid-template-columns: 1fr; }
  .op-broadcast-summary { min-height: 210px; }
}

@media (max-width: 860px) {
  .operator-page { --op-rail: 0px; }
  .op-topbar { grid-template-columns: minmax(170px, 1fr) auto; }
  .op-brand { border-right: 0; }
  .op-context { display: none; }
  .op-actions { grid-column: 2; }
  .op-rail { position: fixed; inset: 64px 0 auto 0; width: auto; height: 48px; display: block; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .op-rail nav { height: 47px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 5px; }
  .op-rail nav a { min-height: 47px; grid-template-columns: 20px minmax(0, 1fr); padding: 0 6px; border-left: 0; border-bottom: 2px solid transparent; }
  .op-rail nav a.active { border-left: 0; border-bottom-color: var(--acid); }
  .op-rail-state { display: none; }
  .op-main { margin-left: 0; padding-top: 48px; }
  .op-section { scroll-margin-top: 125px; }
  .op-hero { min-height: 330px; }
}

@media (max-width: 640px) {
  .op-topbar { min-height: 58px; }
  .op-brand { height: 58px; padding: 0 9px; }
  .op-brand .brand-mark { width: 34px; height: 27px; }
  .op-brand strong { font-size: 10px; }
  .op-brand small { display: none; }
  .op-actions { gap: 4px; padding-right: 7px; }
  .op-actions .button { min-width: 34px; padding: 0 7px; }
  .op-actions a { font-size: 0; }
  .op-actions a::after { content: "PUB"; font: 700 8px/1 var(--mono); }
  .op-layout { padding-top: 58px; }
  .op-rail { inset: 58px 0 auto 0; }
  .op-rail nav a { display: flex; justify-content: center; padding: 0 4px; }
  .op-rail nav span { display: none; }
  .op-rail nav b { font-size: 9px; text-align: center; }
  .op-main { padding-top: 48px; }
  .op-truth { align-items: flex-start; padding: 9px 12px; }
  .op-truth > div { align-items: flex-start; flex-wrap: wrap; }
  .op-truth span { flex-basis: calc(100% - 18px); margin-left: 16px; }
  .op-truth code { display: none; }
  .op-hero { min-height: 410px; grid-template-columns: 1fr; }
  .op-hero-copy { align-self: end; padding: 32px 16px 24px; }
  .op-hero h1 { font-size: 37px; }
  .op-hero-state { min-height: 108px; padding: 17px 16px; border-left: 0; border-top: 1px solid rgb(75 105 84 / 65%); }
  .op-hero-state > strong { font-size: 20px; }
  .op-section { padding: 31px 12px 0; }
  .op-section + .op-section { margin-top: 16px; padding-top: 36px; }
  .op-section-heading { display: block; }
  .op-section-heading > :last-child { margin-top: 10px; }
  .op-heading-state { justify-content: space-between; }
  .op-gate-grid,
  .op-pnl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-gate { min-height: 108px; padding: 12px; }
  .op-gate > strong { font-size: 15px; }
  .op-blockers,
  .op-broadcast-matrix { grid-template-columns: 1fr; }
  .op-blocker,
  .op-matrix-row { border-right: 0; }
  .op-data-lock { align-items: stretch; flex-direction: column; }
  .op-data-lock > div { grid-template-columns: 9px minmax(0, 1fr); }
  .op-data-lock span { grid-column: 2; }
  .op-data-lock .button { width: 100%; }
  .op-footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .op-footer strong { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .operator-page { scroll-behavior: auto; }
}
