:root {
  color-scheme: dark;
  --navy-950: #06111d;
  --navy-900: #081827;
  --navy-800: #0d2235;
  --navy-700: #12314a;
  --horizon: #bcecff;
  --cyan: #42d7ff;
  --teal: #22c7b8;
  --white: #f6fbff;
  --silver: #9fb7c8;
  --muted: #5f788f;
  --line: rgba(188, 236, 255, 0.18);
  --panel: rgba(9, 26, 42, 0.92);
  --danger: #ff6b7a;
  --warning: #ffd166;
  --success: #54e3a5;
  --font-ui:
    "Space Grotesk", Aptos, "Segoe UI Variable", "Segoe UI", ui-sans-serif,
    system-ui, sans-serif;
  --font-mono:
    "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(66, 215, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(66, 215, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 70% 0%, rgba(188, 236, 255, 0.14), transparent 35%),
    var(--navy-950);
  background-size: 56px 56px, 56px 56px, auto, auto;
  color: var(--white);
  font-weight: 430;
  animation: pageReveal 520ms ease-out both;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(188, 236, 255, 0.7);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 38%, var(--horizon) 39%, var(--horizon) 44%, transparent 45%),
    linear-gradient(225deg, transparent 48%, var(--cyan) 49%, var(--cyan) 54%, transparent 55%),
    rgba(66, 215, 255, 0.06);
  box-shadow: 0 0 30px rgba(66, 215, 255, 0.2);
  flex: 0 0 auto;
}

.brand strong,
.panel-heading h2,
.section-heading h2,
.topbar h1,
.hero-copy h1,
.section-intro h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand strong {
  font-weight: 650;
}

.eyebrow,
.label {
  display: block;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.danger-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  padding: 0 16px;
  color: var(--navy-950);
  background: var(--horizon);
  text-decoration: none;
  font-weight: 620;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.primary-button:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.secondary-button:hover,
.danger-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--white);
  background: rgba(66, 215, 255, 0.1);
  border-color: rgba(66, 215, 255, 0.42);
}

.danger-button {
  color: var(--white);
  background: rgba(255, 107, 122, 0.1);
  border-color: rgba(255, 107, 122, 0.52);
}

.small-button {
  min-height: 34px;
  color: var(--horizon);
  background: transparent;
  border-color: var(--line);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.small-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.55;
  transform: none;
}

.wide {
  width: 100%;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 17, 29, 0.84);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.site-nav a,
.nav a {
  color: var(--silver);
  text-decoration: none;
  padding: 12px 14px;
  font-size: 0.94rem;
  font-weight: 520;
}

.site-nav a.active,
.site-nav a:hover,
.nav a.active,
.nav a:hover {
  color: var(--white);
  background: rgba(66, 215, 255, 0.08);
}

.landing-hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  grid-template-columns: minmax(300px, 760px) minmax(280px, 420px);
  align-items: end;
  gap: 48px;
  padding: 132px 6vw 8vh;
  overflow: hidden;
}

#settlementCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-copy,
.hero-terminal {
  position: relative;
  z-index: 1;
}

.hero-copy {
  z-index: 2;
  max-width: 760px;
}

.hero-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -24px -34px -28px -34px;
  background: linear-gradient(90deg, rgba(6, 17, 29, 0.92) 0%, rgba(6, 17, 29, 0.72) 72%, transparent 100%);
}

.hero-copy h1 {
  margin-top: 12px;
  font-size: clamp(3.5rem, 11vw, 8.5rem);
  font-weight: 560;
  line-height: 0.86;
  max-width: 760px;
}

.hero-copy p {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--silver);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.top-actions,
.button-row,
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 32px;
}

.hero-terminal {
  align-self: center;
  padding: 22px;
  border: 1px solid rgba(188, 236, 255, 0.28);
  background: rgba(6, 17, 29, 0.74);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.terminal-line {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(188, 236, 255, 0.12);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
}

.terminal-line span {
  color: var(--cyan);
}

.terminal-line.ok {
  color: var(--success);
  border-bottom: 0;
}

.explain-band,
.flow-band {
  padding: 72px 6vw;
  border-top: 1px solid var(--line);
}

.section-intro {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-intro h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 560;
  line-height: 0.96;
  margin-top: 10px;
}

.section-intro p,
.feature-card p,
.flow-step p,
.page-lede,
.narrative-panel p {
  color: var(--silver);
  line-height: 1.55;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.flow-step {
  border: 1px solid var(--line);
  background: rgba(9, 26, 42, 0.72);
  padding: 24px;
}

.feature-card span,
.step-index {
  color: var(--cyan);
  font-family: var(--font-mono);
}

.feature-card h3 {
  margin: 14px 0 8px;
  font-size: 1.4rem;
  font-weight: 620;
}

.flow-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.flow-step {
  background: var(--navy-900);
}

.flow-step strong {
  display: block;
  margin-top: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(6, 17, 29, 0.86);
}

.nav {
  display: grid;
  gap: 8px;
  margin: 40px 0 24px;
}

.nav a {
  border-left: 2px solid transparent;
}

.nav a.active,
.nav a:hover {
  border-left-color: var(--cyan);
}

.network-panel {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(13, 34, 53, 0.72);
  color: var(--silver);
}

.vault-switcher {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(9, 26, 42, 0.58);
}

.switcher-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vault-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.vault-tab {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(188, 236, 255, 0.14);
  color: var(--silver);
  background: rgba(6, 17, 29, 0.5);
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.vault-tab:hover {
  transform: translateX(2px);
}

.vault-tab strong {
  color: var(--white);
  font-weight: 620;
}

.vault-tab span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.vault-tab.active {
  border-color: rgba(66, 215, 255, 0.62);
  background: rgba(66, 215, 255, 0.1);
}

.network-panel strong {
  color: var(--white);
}

.network-status {
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.network-advanced {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.network-advanced summary {
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.network-advanced[open] {
  padding-top: 10px;
  border-top: 1px solid rgba(188, 236, 255, 0.12);
}

.network-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.network-field input {
  min-height: 34px;
  padding: 8px 9px;
  border-color: rgba(188, 236, 255, 0.16);
  font-size: 0.78rem;
  text-transform: none;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.workspace > * {
  animation: sectionRise 500ms ease-out both;
}

.workspace > *:nth-child(2) {
  animation-delay: 50ms;
}

.workspace > *:nth-child(3) {
  animation-delay: 90ms;
}

.workspace > *:nth-child(4) {
  animation-delay: 130ms;
}

.workspace > *:nth-child(5) {
  animation-delay: 170ms;
}

.topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.topbar h1 {
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 560;
  line-height: 0.94;
  max-width: 860px;
}

.page-lede {
  max-width: 680px;
  margin: 14px 0 0;
  font-size: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(84, 227, 165, 0.4);
  color: var(--success);
  background: rgba(84, 227, 165, 0.08);
  white-space: nowrap;
  box-shadow: 0 0 28px rgba(84, 227, 165, 0.08);
}

.hero-band,
.payments-band,
.approval-band,
.trail-band,
.content-grid,
.explain-strip,
.role-strip,
.workspace-strip {
  margin-bottom: 24px;
}

.workspace-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.workspace-strip div {
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 16px;
  background: rgba(9, 26, 42, 0.9);
}

.workspace-strip strong {
  overflow: hidden;
  color: var(--white);
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.role-strip div {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  background: rgba(9, 26, 42, 0.86);
}

.role-strip strong {
  overflow: hidden;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-strip p {
  margin: 0;
  color: var(--silver);
  font-size: 0.88rem;
  line-height: 1.42;
}

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 420px);
  min-height: 330px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(7, 21, 36, 0.98), rgba(15, 46, 70, 0.84));
  overflow: hidden;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: auto -20% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(188, 236, 255, 0.7), transparent);
  animation: scanLine 4.8s linear infinite;
}

.vault-visual {
  position: relative;
  min-height: 330px;
}

.vault-visual::before {
  content: "";
  position: absolute;
  inset: 42px 5% 42px 10%;
  border-top: 1px solid rgba(188, 236, 255, 0.45);
  border-right: 1px solid rgba(66, 215, 255, 0.32);
  transform: skewX(-18deg);
}

.arc-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.line-a {
  width: 72%;
  left: 10%;
  top: 42%;
  transform: rotate(-9deg);
}

.line-b {
  width: 54%;
  left: 20%;
  top: 62%;
  transform: rotate(13deg);
}

.arc-node {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--horizon);
  background: var(--navy-950);
  animation: nodePulse 2.8s ease-in-out infinite;
}

.node-a {
  left: 16%;
  top: 38%;
}

.node-b {
  left: 54%;
  top: 30%;
}

.node-c {
  left: 76%;
  top: 68%;
}

.flow-label {
  position: absolute;
  padding: 6px 8px;
  border: 1px solid rgba(188, 236, 255, 0.32);
  color: var(--horizon);
  background: rgba(6, 17, 29, 0.82);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.flow-a {
  left: 21%;
  top: 22%;
}

.flow-b {
  left: 48%;
  top: 48%;
}

.flow-c {
  left: 70%;
  top: 22%;
}

.vault-summary {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: 36px;
  background: rgba(6, 17, 29, 0.54);
  border-left: 1px solid var(--line);
}

.balance-row {
  display: flex;
  align-items: end;
  gap: 12px;
}

.balance-row strong {
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-family: var(--font-mono);
  font-weight: 520;
  line-height: 0.9;
}

.balance-row span {
  color: var(--silver);
  padding-bottom: 12px;
}

.metric-grid,
.rule-stack {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid div,
.rule-stack div {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 14px;
  background: rgba(8, 24, 39, 0.94);
}

.metric-grid span,
.rule-stack span {
  color: var(--silver);
  font-size: 0.84rem;
}

.content-grid {
  display: grid;
  gap: 24px;
}

.content-grid.two,
.payments-band {
  grid-template-columns: minmax(300px, 480px) minmax(0, 1fr);
}

.content-grid.three {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.panel,
.payment-form,
.decision-panel,
.approval-band,
.trail-band {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.panel:hover,
.payment-form:hover,
.decision-panel:hover,
.approval-band:hover,
.trail-band:hover {
  border-color: rgba(188, 236, 255, 0.32);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.18);
}

.narrative-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading p {
  margin: 10px 0 0;
  color: var(--silver);
  line-height: 1.5;
  max-width: 620px;
}

.approved-services {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(188, 236, 255, 0.14);
}

.danger-zone {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 107, 122, 0.26);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 14px;
}

.treasury-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(188, 236, 255, 0.14);
  background: rgba(6, 17, 29, 0.48);
}

.treasury-balance span {
  color: var(--silver);
}

.treasury-balance strong {
  font-family: var(--font-mono);
  font-weight: 520;
}

.danger-zone p {
  margin: 0;
  color: var(--silver);
  line-height: 1.45;
}

.recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recipient-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid rgba(188, 236, 255, 0.22);
  color: var(--horizon);
  background: rgba(66, 215, 255, 0.07);
}

.recipient-chip span {
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient-chip button {
  align-self: stretch;
  width: 34px;
  border: 0;
  border-left: 1px solid rgba(188, 236, 255, 0.18);
  color: var(--silver);
  background: transparent;
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
}

.activity-item .empty-state {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--silver);
  font-size: 0.92rem;
  font-weight: 520;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(188, 236, 255, 0.22);
  color: var(--white);
  background: rgba(6, 17, 29, 0.7);
  padding: 0 12px;
  outline: none;
  font-weight: 450;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(66, 215, 255, 0.12);
}

.tour-launcher {
  position: fixed;
  z-index: 20;
  right: 22px;
  bottom: 22px;
  min-height: 42px;
  border: 1px solid rgba(188, 236, 255, 0.32);
  color: var(--horizon);
  background: rgba(6, 17, 29, 0.86);
  padding: 0 16px;
  font: inherit;
  font-weight: 620;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.tour-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tour-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.tour-spotlight {
  position: fixed;
  z-index: 51;
  border: 1px solid rgba(188, 236, 255, 0.86);
  background: rgba(188, 236, 255, 0.04);
  box-shadow:
    0 0 0 9999px rgba(3, 9, 16, 0.74),
    0 0 42px rgba(66, 215, 255, 0.22);
  pointer-events: none;
  transition:
    left 220ms ease,
    top 220ms ease,
    width 220ms ease,
    height 220ms ease;
}

.tour-card {
  position: fixed;
  z-index: 52;
  width: min(420px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(188, 236, 255, 0.32);
  background: rgba(7, 21, 36, 0.96);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.42);
  transition:
    left 220ms ease,
    top 220ms ease,
    transform 180ms ease;
}

.tour-card h2 {
  margin: 8px 0 10px;
  font-size: 1.45rem;
}

.tour-card p {
  margin: 0;
  color: var(--silver);
  line-height: 1.5;
}

.tour-progress {
  display: grid;
  grid-template-columns: repeat(var(--tour-steps, 6), minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0;
}

.tour-progress span {
  height: 3px;
  background: rgba(188, 236, 255, 0.18);
}

.tour-progress span.active {
  background: var(--cyan);
}

.tour-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
}

.confirm-overlay {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 9, 16, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.confirm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid rgba(188, 236, 255, 0.28);
  background: rgba(7, 21, 36, 0.98);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.48);
}

.confirm-dialog h2 {
  margin: 8px 0 10px;
}

.confirm-dialog p {
  margin: 0 0 20px;
  color: var(--silver);
  line-height: 1.5;
}

@keyframes pageReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sectionRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scanLine {
  from {
    transform: translateX(-20%);
  }
  to {
    transform: translateX(20%);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(188, 236, 255, 0);
  }
  50% {
    box-shadow: 0 0 26px rgba(188, 236, 255, 0.28);
  }
}

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

.payments-band {
  display: grid;
  gap: 24px;
}

.decision-panel p {
  min-height: 48px;
  margin: 0 0 20px;
  color: var(--silver);
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-copy {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--silver);
  line-height: 1.5;
}

.approval-queue {
  display: grid;
  gap: 10px;
}

.approval-row {
  display: grid;
  grid-template-columns: minmax(88px, 120px) minmax(180px, 1fr) minmax(140px, 180px) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(188, 236, 255, 0.14);
  background: rgba(6, 17, 29, 0.64);
}

.approval-row strong,
.approval-row span {
  min-width: 0;
}

.approval-id,
.approval-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.approval-main {
  display: grid;
  gap: 5px;
}

.approval-main strong {
  color: var(--white);
}

.approval-main span {
  color: var(--silver);
  overflow-wrap: anywhere;
}

.approval-amount {
  display: grid;
  gap: 5px;
}

.approval-amount strong {
  color: var(--horizon);
  font-family: var(--font-mono);
  font-weight: 520;
}

.approval-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.activity-log {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.activity-log.compact-hidden {
  display: none;
}

.activity-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(188, 236, 255, 0.13);
  background: rgba(6, 17, 29, 0.64);
}

.activity-time,
.activity-hash {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.activity-title {
  display: block;
  color: var(--white);
  margin-bottom: 4px;
}

.activity-detail {
  color: var(--silver);
  font-size: 0.9rem;
}

.full-activity-log {
  display: grid;
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.full-log-row {
  display: grid;
  grid-template-columns: 120px minmax(160px, 220px) minmax(0, 1fr) minmax(120px, 180px);
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: rgba(6, 17, 29, 0.78);
}

.full-log-row strong,
.full-log-row span {
  min-width: 0;
}

.full-log-row .log-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.empty-log-row {
  grid-template-columns: 1fr;
}

.log-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  color: var(--silver);
}

.log-pagination span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.state-ok {
  color: var(--success);
}

.state-warn {
  color: var(--warning);
}

.state-risk {
  color: var(--danger);
}

.explain-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.explain-strip div {
  padding: 22px;
  background: rgba(9, 26, 42, 0.88);
}

@media (max-width: 1040px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: start;
    overflow-x: auto;
  }

  .landing-hero,
  .feature-grid,
  .flow-band,
  .app-shell,
  .hero-band,
  .content-grid.two,
  .content-grid.three,
  .payments-band,
  .explain-strip,
  .role-strip,
  .workspace-strip {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding-top: 60px;
  }

  .rail {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px 0;
  }

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

@media (max-width: 640px) {
  .workspace,
  .rail,
  .site-header {
    padding: 18px;
  }

  .landing-hero,
  .explain-band,
  .flow-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar,
  .top-actions,
  .section-heading,
  .button-row,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .activity-item {
    grid-template-columns: 1fr;
  }

  .approval-row {
    grid-template-columns: 1fr;
  }

  .approval-actions {
    justify-content: stretch;
  }

  .approval-actions button {
    flex: 1;
  }

  .full-log-row {
    grid-template-columns: 1fr;
  }
}
