:root {
  color-scheme: dark;
  --bg: #0c100f;
  --surface: #121716;
  --surface-raised: #171d1b;
  --surface-soft: #101513;
  --border: #29322f;
  --border-strong: #3a4742;
  --text: #edf2ef;
  --muted: #9aa8a2;
  --quiet: #73817b;
  --green: #65d39e;
  --green-dark: #173a2a;
  --amber: #e2b96c;
  --amber-dark: #3a2c14;
  --red: #e58279;
  --red-dark: #3c1c1a;
  --focus: #b7f4d5;
  --radius: 10px;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

button, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: 8px;
  padding: 9px 12px;
  color: #07110c;
  background: var(--focus);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  min-height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--green);
  font-weight: 750;
}

.brand strong, .brand small { display: block; }
.brand small { margin-top: -2px; color: var(--quiet); font-size: 10px; letter-spacing: .13em; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.environment { color: var(--muted); font-size: 13px; }
.environment span { margin-right: 5px; color: var(--amber); }

.global-alert {
  width: min(calc(100% - 40px), var(--max));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  color: #f2dfb9;
  background: var(--amber-dark);
}

.global-alert[data-tone="ready"] {
  color: #c8f3de;
  border-color: #315d48;
  background: var(--green-dark);
}

.global-alert[data-tone="stop"] {
  color: #f3c6c2;
  border-color: #68403b;
  background: var(--red-dark);
}

main { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 64px;
  align-items: end;
  padding: 72px 0 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

h1, h2, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 18px; font-size: clamp(36px, 5.5vw, 70px); line-height: 1.02; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.015em; }
.hero-copy { max-width: 690px; margin-bottom: 0; color: var(--muted); font-size: 17px; }

.hero-action {
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.action-label { margin-bottom: 11px; color: var(--quiet); font-size: 12px; }
.action-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

.button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 680;
}

.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { width: 100%; color: #06130d; background: var(--green); }
.button-primary:hover:not(:disabled) { background: #7de0b0; }
.button-secondary { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.button-secondary:hover:not(:disabled) { border-color: #5c6d66; background: #1a211f; }

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.status-strip div { min-width: 0; padding: 15px 18px; border-right: 1px solid var(--border); }
.status-strip div:first-child { padding-left: 0; }
.status-strip div:last-child { border-right: 0; }
.status-strip span, .status-strip strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.status-strip span { color: var(--quiet); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.status-strip strong { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 540; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr); gap: 24px; padding: 32px 0 80px; }
.main-column, .side-column { display: grid; align-content: start; gap: 24px; min-width: 0; }

.panel { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sticky-panel { position: sticky; top: 16px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }

.status { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 9px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 12px; }
.status-ready { color: var(--green); border-color: #315d48; background: var(--green-dark); }
.status-warn { color: var(--amber); border-color: #66522d; background: var(--amber-dark); }
.status-stop { color: var(--red); border-color: #68403b; background: var(--red-dark); }
.status-neutral { color: var(--muted); }
.quiet-count { color: var(--muted); font-size: 13px; }

.fact-list { margin: 0; }
.fact-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.fact-list > div:first-child { border-top: 1px solid var(--border); }
.fact-list dt { color: var(--muted); }
.fact-list dd { min-width: 0; margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact-list dd.code-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.fact-list.compact > div { padding: 9px 0; font-size: 13px; }

.inline-action { margin-top: 22px; }
.inline-action label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.inline-controls { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
input { width: 100%; min-height: 42px; padding: 8px 11px; color: var(--text); border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface-soft); }
.supporting { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.session-action { margin-top: 22px; }

.authorization-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.authorization-card { display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-soft); }
.authorization-card h3, .authorization-history h3 { margin: 0; font-size: 15px; }
.authorization-card .action-label, .authorization-card .supporting { margin: 0; }
.authorization-card .button { align-self: end; margin-top: 4px; }
.authorization-history { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.compact-heading { margin-bottom: 0; }

.node-list, .operation-list { display: grid; gap: 14px; }
.node-card { padding: 19px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-soft); }
.node-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.node-card h3 { margin: 0; font-size: 17px; }
.node-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 7px; background: var(--border); }
.node-money div { padding: 11px; background: var(--surface); }
.node-money span, .node-money strong { display: block; }
.node-money span { color: var(--quiet); font-size: 11px; }
.node-money strong { margin-top: 3px; font-variant-numeric: tabular-nums; }
.node-epochs { margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.node-disclaimer { margin: 13px 0; padding: 10px 11px; border-left: 3px solid var(--amber); color: #d9c9aa; background: #1c1912; font-size: 12px; }
.node-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.node-next p { margin: 0; color: var(--muted); font-size: 12px; }
.node-next .button { width: auto; flex: 0 0 auto; }

.notice { margin: 18px 0 0; padding: 12px; border-left: 3px solid var(--amber); color: #d9c9aa; background: #1c1912; font-size: 12px; }
.boundary-list { display: grid; gap: 16px; margin: 18px 0 0; padding: 0; list-style: none; }
.boundary-list li { padding-left: 13px; border-left: 2px solid var(--border-strong); }
.boundary-list strong, .boundary-list span { display: block; }
.boundary-list strong { font-size: 13px; }
.boundary-list span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.verification summary { cursor: pointer; font-weight: 650; }
.verification[open] summary { margin-bottom: 18px; }
.external-link { display: inline-block; margin-top: 15px; color: var(--green); }

.text-button, .icon-button { padding: 3px; color: var(--green); border: 0; cursor: pointer; background: transparent; }
.icon-button { color: var(--muted); font-size: 24px; line-height: 1; }
.empty-state { margin: 0; padding: 18px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 7px; }

.operation { padding: 14px; border: 1px solid var(--border); border-radius: 7px; }
.operation-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.operation p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.operation code { display: block; margin-top: 8px; color: var(--quiet); overflow-wrap: anywhere; }
.operation-recovery { display: flex; gap: 8px; margin-top: 10px; }
.operation-recovery input { min-width: 0; }
.operation-recovery .button { flex: 0 0 auto; }

dialog { width: min(calc(100% - 32px), 620px); padding: 0; color: var(--text); border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 24px 80px #000a; }
dialog::backdrop { background: #050807dc; }
.dialog-card { padding: 24px; }
.transaction-details dd { max-width: 66%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions .button { width: auto; }

footer { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 26px 0 40px; color: var(--quiet); border-top: 1px solid var(--border); font-size: 12px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
  .content-grid { grid-template-columns: 1fr; }
  .sticky-panel { position: static; }
}

@media (max-width: 620px) {
  .site-header, main, footer, .global-alert { width: min(calc(100% - 24px), var(--max)); }
  .site-header { align-items: flex-start; padding: 14px 0; }
  .header-actions { align-items: flex-end; flex-direction: column-reverse; gap: 7px; }
  .environment { font-size: 11px; }
  .hero { padding: 38px 0 32px; }
  h1 { font-size: 38px; }
  .status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-strip div { padding: 12px; border-bottom: 1px solid var(--border); }
  .status-strip div:first-child { padding-left: 12px; }
  .status-strip div:nth-child(2) { border-right: 0; }
  .panel { padding: 18px; }
  .section-heading { align-items: flex-start; }
  .inline-controls { grid-template-columns: 1fr; }
  .authorization-grid { grid-template-columns: 1fr; }
  .node-money { grid-template-columns: 1fr; }
  .node-next { align-items: stretch; flex-direction: column; }
  .node-next .button { width: 100%; }
  .operation-recovery { flex-direction: column; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
}

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