/* Asiri — dark redesign. Human, readable, on-brand. */

:root {
  color-scheme: dark;

  /* Surfaces (your palette) */
  --obsidian:       #0b0f19;
  --obsidian-2:     #111827;
  --surface:        #151b28;
  --surface-raised: #1a2333;

  /* Ink (cream scale) */
  --cream:      #fdfbf7;
  --cream-muted:#d9d3c7;
  --cream-dim:  #9f9789;

  /* Brand */
  --terracotta:     #d05a3f;
  --terracotta-deep:#b8492f;
  --indigo:         #2a3c5b;
  --indigo-2:       #4a90e2;
  --indigo-soft:    #6f8aae;

  /* Status */
  --success: #77b89d;
  --warning: #d5a552;
  --gold: #f5c85c;
  --gold-light: #ffe9a6;
  --gold-deep: #c88a26;
  --gold-soft: rgba(245, 200, 92, 0.18);
  --gold-edge: rgba(255, 220, 130, 0.64);

  /* Stack tint */
  --stack-tint: rgba(208, 90, 63, 0.20);
  --stack-tint-strong: rgba(208, 90, 63, 0.30);
  --stack-edge: rgba(208, 90, 63, 0.38);

  /* Lines */
  --rule:        rgba(253, 251, 247, 0.08);
  --rule-strong: rgba(253, 251, 247, 0.16);

  /* Terminal (deliberate darker inset) */
  --term-bg:    #07090f;
  --term-ink:   #f1ece2;
  --term-muted: #98a0ad;
  --term-accent:#e88a6a;

  /* Type */
  --font-sans: "Satoshi", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Measure */
  --measure:    62ch;
  --measure-wide: 78ch;
  --shell:      1140px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--cream-muted);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(208, 90, 63, 0.32); color: var(--cream); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--cream);
  font-weight: 660;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }

/* ---------- Shell & rhythm ---------- */
.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin: 0 auto;
}
.section {
  padding: clamp(64px, 9vw, 128px) 0;
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: 0; }
.tight { padding: clamp(48px, 6vw, 88px) 0; }

/* ---------- Kickers & eyebrows ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--terracotta);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--terracotta);
}
.kicker.muted { color: var(--cream-dim); }
.kicker.muted::before { background: var(--cream-dim); }

/* ---------- Headlines & prose ---------- */
h1 {
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 720;
}
h2 {
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  max-width: 18ch;
}
h3 {
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -0.018em;
  color: var(--cream);
}
.lede {
  color: var(--cream-muted);
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.5;
  max-width: 46ch;
  text-wrap: pretty;
}
.note {
  color: var(--cream-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 52ch;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--cream); font-weight: 660; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand img {
  display: block;
  width: 132px;
  height: auto;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 30px;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--cream-muted);
  font-size: 15px;
  font-weight: 520;
  text-decoration: none;
}
.nav-links a:hover { color: var(--cream); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--cream); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--terracotta);
  border-radius: 2px;
}
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.nav-actions .btn {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: rgba(253, 251, 247, 0.04);
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.btn:hover { text-decoration: none; border-color: var(--cream-dim); background: rgba(253, 251, 247, 0.07); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  border-color: transparent;
  background: var(--terracotta);
  color: #fff8f3;
}
.btn.primary:hover { background: var(--terracotta-deep); }
.btn.ghost { background: transparent; border-color: var(--rule); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(253, 251, 247, 0.04);
  color: var(--cream-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--terracotta); }
.badge.trusted::before { background: var(--success); }
.badge.denied::before  { background: var(--terracotta); }

/* ---------- Code & terminal ---------- */
code, pre, kbd { font-family: var(--font-mono); font-size: 0.92em; }
:not(pre) > code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(253, 251, 247, 0.08);
  color: var(--cream);
  border: 1px solid var(--rule);
  word-break: break-word;
}
.terminal {
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: var(--term-bg);
  color: var(--term-ink);
  box-shadow: 0 24px 60px -28px rgba(3, 7, 18, 0.7), inset 0 1px 0 rgba(255,255,255,0.04);
}
.terminal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: var(--term-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.terminal-bar strong { color: var(--term-accent); font-weight: 600; }
.terminal-body {
  padding: 22px 22px 24px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body p { margin: 0 0 8px; }
.terminal-body p:last-child { margin-bottom: 0; }
.terminal-body .prompt { color: var(--term-accent); margin-right: 8px; }
.terminal-body .ok  { color: var(--success); }
.terminal-body .out { color: var(--term-muted); }

/* ---------- Figure ---------- */
.figure { margin: 0; position: relative; }
.figure img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
}
.figure-cut img { border: 0; border-radius: 0; background: transparent; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 6vw, 88px);
  border-top: 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero-copy { display: grid; gap: 26px; }
.hero-copy h1 { max-width: 13ch; }
.hero-copy .lede { max-width: 40ch; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 4px;
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--terracotta); }

/* ---------- Split (prose + figure/diagram) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.split.reverse .split-copy { order: 2; }
.split-copy { display: grid; gap: 18px; max-width: 48ch; }
.split-copy h2 { max-width: 16ch; }

/* ---------- Feature rows (zig-zag, not equal cards) ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 0.6fr);
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.feature:first-of-type { border-top: 0; }
.feature-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--terracotta);
  letter-spacing: 0.1em;
}
.feature-copy { display: grid; gap: 12px; max-width: 52ch; }
.feature-copy h3 { font-size: clamp(22px, 2.4vw, 30px); }
.feature-copy p { color: var(--cream-muted); max-width: 50ch; }

/* ---------- Steps (numbered vertical list) ---------- */
.steps { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.step-num { font-family: var(--font-mono); font-size: 13px; color: var(--terracotta); letter-spacing: 0.08em; }
.step-title { color: var(--cream); font-size: 19px; font-weight: 640; letter-spacing: -0.01em; }
.step-desc { color: var(--cream-dim); font-size: 16px; line-height: 1.55; max-width: 48ch; }

/* ---------- Definition list (ledger) ---------- */
.ledger { display: grid; border-top: 1px solid var(--rule); }
.ledger > div {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 0.65fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.ledger dt { color: var(--cream); font-weight: 640; letter-spacing: -0.01em; }
.ledger dd { margin: 0; color: var(--cream-muted); max-width: 56ch; }
.ledger dd code { font-size: 0.86em; }

/* ---------- Boundary diagram (hosted | local) ---------- */
.boundary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--surface);
}
.boundary-side {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 3vw, 36px);
}
.boundary-side h3 { font-size: 19px; }
.boundary-side .side-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.boundary-side.local { background: var(--surface); }
.boundary-side.hosted { background: var(--surface-raised); }
.boundary-side ul { display: grid; gap: 9px; }
.boundary-side li {
  position: relative;
  padding-left: 18px;
  color: var(--cream-muted);
  font-size: 15px;
  line-height: 1.5;
}
.boundary-side li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 1px; }
.boundary-side.hosted li::before { background: var(--indigo-2); }
.boundary-side.local  li::before { background: var(--terracotta); }
.boundary-rule {
  position: relative;
  display: grid;
  place-items: center;
  border-inline: 1px dashed var(--rule-strong);
  background: var(--obsidian-2);
  min-width: 92px;
}
.boundary-rule span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--terracotta);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Grant card ---------- */
.grant {
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: var(--surface);
}
.grant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-raised);
}
.grant-head .kicker { color: var(--cream-dim); }
.grant-head .kicker::before { background: var(--cream-dim); }
.grant-head strong { color: var(--cream); font-size: 16px; font-weight: 640; }
.grant dl { display: grid; }
.grant dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.grant dl > div:last-child { border-bottom: 0; }
.grant dt { color: var(--cream-dim); font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.grant dd { margin: 0; color: var(--cream-muted); font-size: 15px; }
.grant dd code { font-size: 0.9em; }
.grant dd span { display: block; color: var(--cream-dim); font-size: 13.5px; margin-top: 3px; }

/* ---------- Audit log ---------- */
.audit {
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  background: var(--surface);
}
.audit-row {
  display: grid;
  grid-template-columns: 92px 200px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  font-size: 14px;
}
.audit-row:last-child { border-bottom: 0; }
.audit-row time { font-family: var(--font-mono); color: var(--cream-dim); font-size: 12.5px; }
.audit-row strong { color: var(--cream); font-weight: 600; font-size: 13.5px; }
.audit-row span { color: var(--cream-dim); font-family: var(--font-mono); font-size: 12.5px; }
.audit-row.deny strong { color: var(--terracotta); }

/* ---------- Route list (use cases) ---------- */
.routes { display: grid; border-top: 1px solid var(--rule); }
.route {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(28px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.route-num { font-family: var(--font-mono); font-size: 13px; color: var(--terracotta); letter-spacing: 0.08em; }
.route-copy { display: grid; gap: 10px; max-width: 48ch; }
.route-copy h3 { font-size: clamp(20px, 2.2vw, 26px); }
.route-copy p { color: var(--cream-muted); }
.route-code { display: grid; align-content: start; gap: 6px; }
.route-code code {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--term-bg);
  color: var(--term-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--rule-strong);
  overflow-x: auto;
}

/* ---------- Comparison table ---------- */
.compare { display: grid; border-top: 1px solid var(--rule); }
.compare > div {
  display: grid;
  grid-template-columns: minmax(200px, 0.4fr) minmax(0, 0.6fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.compare strong { color: var(--cream); font-weight: 640; }
.compare span { color: var(--cream-muted); }

/* ---------- Security surfaces (3-way, rule-separated) ---------- */
.surfaces {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--surface);
}
.surface { padding: clamp(22px, 2.6vw, 32px); border-left: 1px solid var(--rule); }
.surface:first-child { border-left: 0; }
.surface h3 { font-size: 18px; margin-bottom: 16px; }
.surface .side-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.surface ul { display: grid; gap: 10px; }
.surface li {
  position: relative;
  padding-left: 16px;
  color: var(--cream-muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.surface li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 1px; }
.surface.hosted li::before { background: var(--indigo-2); }
.surface.device li::before { background: var(--terracotta); }
.surface.risk   li::before { background: var(--cream-dim); }

/* ---------- Boundary tabs (security, CSS-only) ---------- */
.tabs { display: grid; gap: 18px; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--cream-muted);
  font-size: 13.5px;
  font-weight: 540;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.tab[aria-selected="true"] {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--obsidian);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: grid; gap: 14px; }
.tab-panel .lede { max-width: 60ch; }

/* ---------- Section head ---------- */
.section-head { display: grid; gap: 14px; max-width: 60ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head h2 { max-width: 20ch; }
.section-head p { color: var(--cream-muted); max-width: 56ch; }

/* ---------- Next / CTA ---------- */
.cta {
  display: grid;
  gap: 20px;
  padding: clamp(40px, 5vw, 64px) clamp(28px, 3.5vw, 48px);
  border: 1px solid var(--rule-strong);
  border-radius: 18px;
  background: var(--surface);
}
.cta h2 { max-width: 16ch; }
.cta p { color: var(--cream-muted); max-width: 52ch; }

/* ---------- Legal pages ---------- */
.legal-page { padding-bottom: clamp(72px, 9vw, 128px); }
.legal-header {
  display: grid;
  gap: 18px;
  padding-top: clamp(64px, 8vw, 112px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.legal-header h1 {
  max-width: 14ch;
  font-size: clamp(42px, 6vw, 72px);
}
.legal-header > p:not(.lede):not(.legal-date) {
  max-width: var(--measure);
  color: var(--cream-dim);
  font-size: 16px;
}
.legal-date {
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.legal-jump {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-strong);
}
.legal-jump h2 {
  max-width: none;
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.legal-jump nav { display: grid; gap: 9px; }
.legal-jump nav a { color: var(--cream-muted); font-size: 15px; }
.legal-jump p {
  color: var(--cream-dim);
  font-size: 13px;
  line-height: 1.55;
}
.legal-document {
  max-width: 760px;
  border-top: 1px solid var(--rule-strong);
}
.legal-section {
  display: grid;
  gap: 17px;
  padding: clamp(32px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 96px;
}
.legal-section h2 {
  max-width: none;
  font-size: clamp(23px, 2.6vw, 30px);
  line-height: 1.15;
}
.legal-section h3 {
  margin-top: 8px;
  font-size: 18px;
}
.legal-section p,
.legal-section li {
  color: var(--cream-muted);
  font-size: 17px;
  line-height: 1.7;
}
.legal-section ul { display: grid; gap: 11px; padding-left: 22px; }
.legal-section li { position: relative; list-style: disc; padding-left: 3px; }
.legal-section strong { color: var(--cream); font-weight: 660; }
.legal-section code {
  color: var(--term-accent);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- Footer ---------- */
.footer {
  padding: clamp(56px, 6vw, 88px) 0 clamp(40px, 4vw, 56px);
  border-top: 1px solid var(--rule);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.footer-brand { display: grid; gap: 16px; max-width: 44ch; }
.footer-brand img { width: 132px; height: auto; }
.footer-brand p { color: var(--cream-dim); font-size: 15px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-col h4 {
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col ul { display: grid; gap: 9px; }
.footer-col a { color: var(--cream-muted); font-size: 15px; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: clamp(56px, 7vw, 96px) 0 clamp(32px, 4vw, 48px);
  border-top: 0;
}
.page-header .lede { max-width: 56ch; }

/* ---------- Inline mini-diagram (homepage boundary strip) ---------- */
.flow-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--surface);
}
.flow-step {
  padding: 22px 20px;
  border-left: 1px solid var(--rule);
  display: grid;
  gap: 8px;
  align-content: start;
}
.flow-step:first-child { border-left: 0; }
.flow-step .n { font-family: var(--font-mono); font-size: 11.5px; color: var(--terracotta); letter-spacing: 0.1em; }
.flow-step strong { color: var(--cream); font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.flow-step span { color: var(--cream-dim); font-size: 13px; line-height: 1.5; }

/* ---------- Components page (style guide) ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.swatch {
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.swatch .chip { height: 72px; }
.swatch .meta { padding: 12px 14px; }
.swatch .meta strong { display: block; color: var(--cream); font-size: 14px; }
.swatch .meta span { color: var(--cream-dim); font-family: var(--font-mono); font-size: 12px; }
.type-scale { display: grid; gap: 18px; border-top: 1px solid var(--rule); padding-top: 24px; }
.type-scale .row { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 20px; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 18px; }
.type-scale .row span { color: var(--cream-dim); font-family: var(--font-mono); font-size: 12px; }
.demo { display: grid; gap: 18px; }
.demo-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.muted { color: var(--cream-dim); }
.stack { display: grid; gap: 18px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split, .split.reverse, .feature, .step,
  .ledger > div, .compare > div, .route {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .split.reverse .split-copy { order: 0; }
  .boundary { grid-template-columns: 1fr; }
  .boundary-rule { min-height: 64px; border-inline: 0; border-block: 1px dashed var(--rule-strong); }
  .boundary-rule span { writing-mode: horizontal-tb; transform: none; }
  .surfaces { grid-template-columns: 1fr; }
  .surface { border-left: 0; border-top: 1px solid var(--rule); }
  .surface:first-child { border-top: 0; }
  .flow-strip { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(3) { border-left: 0; border-top: 1px solid var(--rule); }
  .footer-grid { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; gap: 48px; }
  .legal-jump { position: static; }
  .legal-jump nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .legal-document { max-width: none; }
  .audit-row { grid-template-columns: 72px 1fr; }
  .audit-row span { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .nav-links { display: none; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn {
    min-height: 38px;
    padding-inline: 11px;
    font-size: 14px;
  }
  .shell { width: min(var(--shell), calc(100% - 32px)); }
  .brand img { width: 108px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-header { padding-top: 52px; padding-bottom: 40px; }
  .legal-jump nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-section p,
  .legal-section li { font-size: 16px; line-height: 1.65; }
  .grant dl > div { grid-template-columns: 1fr; gap: 4px; }
  .route-code { display: none; }
  .flow-strip { grid-template-columns: 1fr; }
  .flow-step { border-left: 0; border-top: 1px solid var(--rule); }
  .flow-step:first-child { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Sharp edges (deliberate) ---------- */
*, *::before, *::after { border-radius: 0 !important; }

/* ---------- Paper stacks: a second sheet peeking behind each card ---------- */
.terminal,
.grant,
.audit,
.boundary,
.surfaces,
.flow-strip,
.cta,
.figure,
.swatch {
  position: relative;
}
.terminal::after,
.grant::after,
.audit::after,
.boundary::after,
.surfaces::after,
.flow-strip::after,
.cta::after,
.figure::after,
.swatch::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translate(8px, 8px);
  background: var(--stack-tint);
  border: 1px solid var(--stack-edge);
  z-index: -1;
  pointer-events: none;
}
.cta::after { transform: translate(10px, 10px); background: var(--stack-tint-strong); }
.figure::after { background: var(--stack-tint); }

@media (max-width: 640px) {
  .terminal::after,
  .grant::after,
  .audit::after,
  .boundary::after,
  .surfaces::after,
  .flow-strip::after,
  .figure::after,
  .swatch::after { transform: translate(5px, 5px); }
  .cta::after { transform: translate(6px, 6px); }
}

/* ===================================================================
   Asiri dashboards — operational surfaces (user + platform admin)
   Calm, dense, fast, predictable. No decorative paper stacks here.
   =================================================================== */

:root {
  --dash-ok:       var(--success);
  --dash-warn:     var(--warning);
  --dash-bad:      var(--terracotta);
  --dash-bad-deep: var(--terracotta-deep);
  --dash-info:     var(--indigo-2);
  --dash-neutral:  var(--cream-dim);
  --dash-sidebar:  248px;
  --dash-panel:    360px;
  --dash-row-h:    38px;
}

.dash-app {
  display: grid;
  grid-template-columns: var(--dash-sidebar) minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--obsidian);
  color: var(--cream-muted);
}
.dash-app[data-layout="with-panel"] {
  /* main content handles its own panel split */
}
.dash-app[data-auth="true"] {
  display: block;
}

/* ---------- Auth screen ---------- */
.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background: var(--obsidian);
  color: var(--cream-muted);
}
.auth-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 24px;
  padding: 40px 36px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  box-shadow: 0 28px 80px -36px rgba(0, 0, 0, 0.72);
}
.auth-brand {
  display: flex;
  justify-content: center;
}
.auth-brand img {
  width: 192px;
  height: auto;
}
.auth-copy {
  display: grid;
  gap: 10px;
  text-align: center;
}
.auth-copy h1 {
  font-size: 24px;
  font-weight: 660;
  letter-spacing: -0.02em;
  color: var(--cream);
  max-width: none;
}
.auth-copy p {
  color: var(--cream-dim);
  font-size: 14px;
  line-height: 1.55;
  max-width: 34ch;
  margin: 0 auto;
}
.auth-actions {
  display: grid;
  gap: 10px;
}
.auth-provider {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--cream);
  text-decoration: none;
  font-size: 15px;
  font-weight: 540;
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), transform 0.12s var(--ease);
}
.auth-provider:hover {
  border-color: var(--cream-dim);
  background: var(--surface-raised);
  text-decoration: none;
}
.auth-provider:active { transform: translateY(1px); }
.auth-provider.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.auth-provider .provider-glyph {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--cream-muted);
}
.auth-provider .provider-label {
  color: var(--cream);
}
.auth-provider .provider-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  letter-spacing: 0.04em;
}
.auth-footnote {
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
}
}
.auth-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Sidebar ---------- */
.dash-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  border-right: 1px solid var(--rule);
  background: var(--obsidian-2);
}
.dash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
}
.dash-brand img { width: 96px; height: auto; }
.dash-brand .dash-brand-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cream-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dash-btn.dash-mobile-account-trigger { display: none; margin-left: auto; }

.dash-workspace {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
}
.dash-workspace .dash-workspace-slug {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-workspace .dash-workspace-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cream-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}
.dash-workspace .dash-active-workspace[aria-busy="true"] .aw-change {
  width: 14px; height: 14px;
  border: 2px solid var(--cream-dim);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: dash-spin 0.9s linear infinite;
}
@keyframes dash-spin { to { transform: rotate(360deg); } }

.dash-active-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
}
.dash-active-workspace:hover { border-color: var(--terracotta); background: rgba(208, 90, 63, 0.08); }
.dash-active-workspace .aw-name { grid-column: 1; font-size: 14px; font-weight: 600; }
.dash-active-workspace .aw-slug { grid-column: 1; font-family: var(--font-mono); font-size: 11.5px; color: var(--cream-dim); }
.dash-active-workspace .aw-change { grid-row: 1 / 3; grid-column: 2; display: inline-flex; color: var(--cream-dim); transition: transform 0.18s var(--ease); }
.dash-active-workspace:hover .aw-change { transform: translateY(1px); color: var(--cream-muted); }

.dash-workspace-dialog-list { display: grid; gap: 4px; }
.dash-workspace-dialog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  color: var(--cream-muted);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.dash-workspace-dialog-row:hover { border-color: var(--rule-strong); background: rgba(253, 251, 247, 0.04); color: var(--cream); }
.dash-workspace-dialog-row[aria-current="true"] { border-color: var(--terracotta); background: rgba(208, 90, 63, 0.10); color: var(--cream); }
.dash-workspace-dialog-row .wd-name { font-weight: 600; }
.dash-workspace-dialog-row .wd-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--cream-dim); }

.dash-nav {
  padding: 12px 10px 16px;
  display: grid;
  gap: 1px;
  align-content: start;
  overflow-y: auto;
}
.dash-nav-section {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cream-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 10px 6px;
}
.dash-nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--cream-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.dash-nav-item:hover { background: rgba(253, 251, 247, 0.04); color: var(--cream); }
.dash-nav-item[aria-current="true"] {
  background: rgba(208, 90, 63, 0.10);
  color: var(--cream);
  box-shadow: inset 2px 0 0 var(--terracotta);
}
.dash-nav-item .nav-glyph {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-dim);
  line-height: 0;
}
.dash-nav-item .nav-glyph svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-nav-item > span:not(.nav-glyph):not(.nav-count) {
  min-width: 0;
  line-height: 20px;
}
.dash-nav-item[aria-current="true"] .nav-glyph { color: var(--terracotta); }
.dash-nav-item .nav-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  padding: 1px 6px;
  border: 1px solid var(--rule-strong);
}
.dash-nav-item .nav-count[data-tone="warn"] { color: var(--dash-warn); border-color: rgba(213, 165, 82, 0.4); }
.dash-nav-item .nav-count[data-tone="bad"]  { color: var(--dash-bad);  border-color: rgba(208, 90, 63, 0.4); }

.dash-sidebar-foot {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--cream-dim);
}
.dash-account-panel .account-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dash-account-panel .who {
  color: var(--cream);
  font-weight: 600;
  font-size: 13px;
  line-height: 18px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-account-panel .account-line .dash-status {
  flex: 0 0 auto;
  padding-block: 1px;
  font-size: 10.5px;
  line-height: 16px;
}
.dash-account-panel .dash-workspace-slug {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-account-panel .session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.dash-account-panel .account-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.dash-account-panel a {
  color: var(--cream-muted);
  font-size: 12px;
  text-decoration: none;
}
.dash-account-panel a:hover { color: var(--cream); }
.dash-mobile-account-dialog {
  display: grid;
  gap: 8px;
}
.dash-mobile-account-dialog .dash-btn,
.dash-mobile-account-dialog > a {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}
.dash-mobile-account-dialog > a {
  display: flex;
  align-items: center;
  border: 1px solid var(--rule-strong);
}

/* ---------- Main column ---------- */
.dash-main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
}
.dash-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 22px;
  background: rgba(11, 15, 25, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.dash-header .dash-title {
  display: grid;
  gap: 4px;
}
.dash-header .dash-title h1 {
  font-size: 20px;
  font-weight: 660;
  letter-spacing: -0.018em;
  color: var(--cream);
  max-width: none;
}
.dash-header .dash-title .dash-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  letter-spacing: 0.04em;
}
.dash-header .dash-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.dash-content {
  padding: 22px 22px 64px;
  min-width: 0;
  transition: opacity 0.16s var(--ease);
}
.dash-content[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.dash-content-enter {
  opacity: 0;
}
.dash-content:not([data-split="true"]) {
  display: grid;
  gap: 22px;
  align-content: start;
}
.dash-content[data-split="true"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--dash-panel);
  gap: 22px;
  align-items: start;
  padding: 0;
}
.dash-content[data-split="true"] > .dash-list-pane {
  padding: 22px 0 64px 22px;
  min-width: 0;
}
.dash-content[data-split="true"] > .dash-detail-pane {
  position: sticky;
  top: 62px;
  align-self: start;
  padding: 22px 22px 64px 0;
  min-width: 0;
  max-height: calc(100dvh - 62px);
  overflow-y: auto;
}

/* ---------- Search & filters ---------- */
.dash-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.dash-search {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
.dash-search:focus-within { border-color: var(--terracotta); }
.dash-search .dash-search-glyph { color: var(--cream-dim); width: 14px; height: 14px; }
.dash-search input {
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  min-width: 0;
}
.dash-search input::placeholder { color: var(--cream-dim); }

.dash-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.dash-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--cream-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  cursor: pointer;
}
.dash-filter:hover { border-color: var(--cream-dim); color: var(--cream); }
.dash-filter[aria-pressed="true"] {
  background: rgba(208, 90, 63, 0.10);
  border-color: var(--terracotta);
  color: var(--cream);
}
.dash-filter select {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
}
.dash-filter select option { background: var(--obsidian-2); color: var(--cream); }

/* ---------- Summary strip (Home) ---------- */
.dash-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
.dash-summary-cell {
  padding: 16px 18px;
  border-left: 1px solid var(--rule);
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}
.dash-summary-cell:first-child { border-left: 0; }
.dash-summary-cell .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cream-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dash-summary-cell .value {
  font-size: 24px;
  font-weight: 660;
  color: var(--cream);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dash-summary-cell .value.mono { font-family: var(--font-mono); font-size: 20px; }
.dash-summary-cell .sub {
  font-size: 12px;
  color: var(--cream-dim);
}
.dash-summary-cell[data-tone="warn"] .value { color: var(--dash-warn); }
.dash-summary-cell[data-tone="bad"]  .value { color: var(--dash-bad); }
.dash-summary-cell[data-tone="ok"]   .value { color: var(--dash-ok); }
.dash-summary-cell[data-tone="info"] .value { color: var(--dash-info); }

/* ---------- Plan cards (Billing) ---------- */
.dash-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.dash-plan-card {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dash-plan-card[data-current="true"] {
  border-color: rgba(119, 184, 157, 0.45);
}
.dash-plan-card[data-featured="true"] {
  border-color: var(--gold-edge);
  box-shadow: 0 0 0 1px var(--gold-edge), 0 0 44px -14px rgba(255, 220, 130, 0.55);
  background:
    linear-gradient(120deg, rgba(255, 241, 184, 0.16) 0%, rgba(255, 241, 184, 0) 28%),
    linear-gradient(180deg, rgba(245, 200, 92, 0.09), var(--surface) 62%);
}
.dash-plan-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 4px 10px;
}
.dash-plan-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.dash-plan-name {
  font-size: 16px;
  font-weight: 640;
  color: var(--cream);
  letter-spacing: -0.01em;
  min-width: 0;
}
.dash-plan-current-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid rgba(119, 184, 157, 0.4);
  color: var(--dash-ok);
  background: rgba(119, 184, 157, 0.08);
  flex: 0 0 auto;
}
.dash-plan-price {
  font-size: 26px;
  font-weight: 660;
  color: var(--cream);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.dash-plan-price-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  width: 100%;
}
.dash-plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.dash-plan-features li {
  font-size: 13px;
  color: var(--cream-muted);
  padding-left: 16px;
  position: relative;
}
.dash-plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream-dim);
}
.dash-plan-card[data-featured="true"] .dash-plan-features li::before {
  background: var(--gold);
}
.dash-plan-card[data-featured="true"] .dash-btn.primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 52%, var(--gold-deep));
  color: #1b1308;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 8px 24px -18px var(--gold-light);
}
.dash-plan-card[data-featured="true"] .dash-btn.primary:hover {
  background: linear-gradient(180deg, #fff0ad, #ffd46c 52%, #d79b31);
  color: #120d06;
}
.dash-plan-cta { margin-top: auto; }
.dash-plan-cta .dash-btn { width: 100%; justify-content: center; }

/* ---------- Action queue (Home) ---------- */
.dash-action-queue {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
.dash-action-queue-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-raised);
}
.dash-action-queue-head h3 {
  font-size: 13.5px;
  font-weight: 640;
  color: var(--cream);
}
.dash-action-queue-head .count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
}
.dash-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.dash-action-row:last-child { border-bottom: 0; }
.dash-action-row .ar-title {
  color: var(--cream);
  font-size: 14px;
  font-weight: 600;
}
.dash-action-row .ar-meta {
  color: var(--cream-dim);
  font-size: 12px;
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-action-row .ar-meta code { font-size: 11.5px; }
.dash-action-row .ar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.dash-table-wrap {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  overflow-x: auto;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.dash-table thead th {
  position: sticky;
  top: 0;
  text-align: left;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cream-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}
.dash-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--cream-muted);
  vertical-align: middle;
}
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table tbody tr {
  cursor: default;
  transition: background 0.1s var(--ease);
}
.dash-table tbody tr[data-selectable="true"] { cursor: pointer; }
.dash-table tbody tr[data-selectable="true"]:hover { background: rgba(253, 251, 247, 0.03); }
.dash-table tbody tr[aria-selected="true"] { background: rgba(208, 90, 63, 0.08); box-shadow: inset 2px 0 0 var(--terracotta); }
.dash-table .cell-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--cream); }
.dash-table .cell-num { font-variant-numeric: tabular-nums; text-align: right; }
.dash-table .cell-time { font-family: var(--font-mono); font-size: 12px; color: var(--cream-dim); white-space: nowrap; }
.dash-table .cell-actions { text-align: right; white-space: nowrap; }
.dash-table .cell-actions button + button { margin-left: 6px; }
.dash-member-actions { display: inline-flex; gap: 6px; }
.dash-member-actions button + button { margin-left: 0; }
.dash-table .empty-row td {
  text-align: center;
  padding: 36px 14px;
  color: var(--cream-dim);
  font-size: 13px;
}

/* ---------- Buttons (mini) ---------- */
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  background: rgba(253, 251, 247, 0.04);
  color: var(--cream);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.12s var(--ease), border-color 0.12s var(--ease);
}
.dash-btn:hover { background: rgba(253, 251, 247, 0.08); border-color: var(--cream-dim); }
.dash-btn:active { transform: translateY(1px); }
.dash-btn.primary { border-color: transparent; background: var(--terracotta); color: #fff8f3; }
.dash-btn.primary:hover { background: var(--terracotta-deep); }
.dash-btn.danger { border-color: rgba(208, 90, 63, 0.5); color: var(--dash-bad); }
.dash-btn.danger:hover { background: rgba(208, 90, 63, 0.10); }
.dash-btn.ghost { background: transparent; border-color: var(--rule); color: var(--cream-muted); }
.dash-btn.ghost:hover { color: var(--cream); border-color: var(--cream-dim); }
.dash-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.dash-btn[aria-busy="true"] { opacity: 0.72; cursor: progress; }
.dash-btn.sm { padding: 4px 9px; font-size: 11.5px; }

/* ---------- Status pills ---------- */
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 9px 2px 8px;
  border: 1px solid var(--rule-strong);
  background: rgba(253, 251, 247, 0.03);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.dash-status::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--dash-neutral);
  flex: 0 0 auto;
}
.dash-status.ok      { color: var(--dash-ok); border-color: rgba(119, 184, 157, 0.4); }
.dash-status.ok::before     { background: var(--dash-ok); }
.dash-status.warn    { color: var(--dash-warn); border-color: rgba(213, 165, 82, 0.4); }
.dash-status.warn::before   { background: var(--dash-warn); }
.dash-status.bad     { color: var(--dash-bad); border-color: rgba(208, 90, 63, 0.45); }
.dash-status.bad::before    { background: var(--dash-bad); }
.dash-status.info    { color: var(--dash-info); border-color: rgba(74, 144, 226, 0.4); }
.dash-status.info::before   { background: var(--dash-info); }
.dash-status.neutral { color: var(--cream-dim); }
.dash-status.neutral::before { background: var(--cream-dim); }

/* ---------- Detail panel ---------- */
.dash-detail {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  min-width: 0;
  overflow: hidden;
}
.dash-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-raised);
}
.dash-detail-head h3 {
  font-size: 15.5px;
  font-weight: 640;
  color: var(--cream);
  word-break: break-word;
}
.dash-detail-head .sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  margin-top: 4px;
  word-break: break-all;
}
.dash-detail-body { display: grid; min-width: 0; }
.dash-detail-section {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
  overflow: hidden;
}
.dash-detail-section:last-child { border-bottom: 0; }
.dash-detail-section h4 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--cream-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}
.dash-detail-section dl {
  display: grid;
  grid-template-columns: minmax(96px, 0.32fr) minmax(0, 1fr);
  gap: 9px 14px;
}
.dash-detail-section dt {
  color: var(--cream-dim);
  font-size: 12px;
  font-family: var(--font-mono);
}
.dash-detail-section dd {
  margin: 0;
  color: var(--cream);
  font-size: 13px;
  word-break: break-word;
  min-width: 0;
}
.dash-detail-section dd code { font-size: 12px; color: var(--cream); word-break: break-all; }

/* Tables inside detail panels: allow horizontal scroll without blowing out width */
.dash-detail .dash-table { min-width: 280px; }
.dash-detail .dash-table-wrap { max-width: 100%; }
.dash-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--rule);
}

/* ---------- Fingerprint / code block ---------- */
.dash-fingerprint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  background: var(--term-bg);
  color: var(--term-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
}
.dash-fingerprint .fp-label { color: var(--term-muted); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.dash-fingerprint code { color: var(--term-ink); font-size: 12.5px; word-break: break-all; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Timeline (audit) ---------- */
.dash-timeline {
  border-left: 1px solid var(--rule-strong);
  margin-left: 8px;
  display: grid;
}
.dash-timeline-item {
  position: relative;
  padding: 8px 0 18px 18px;
}
.dash-timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 12px;
  width: 9px; height: 9px;
  background: var(--obsidian-2);
  border: 1px solid var(--cream-dim);
}
.dash-timeline-item[data-result="allowed"]::before { border-color: var(--dash-ok); }
.dash-timeline-item[data-result="denied"]::before  { border-color: var(--dash-bad); background: var(--dash-bad); }
.dash-timeline-item[data-result="failed"]::before  { border-color: var(--dash-warn); background: var(--dash-warn); }
.dash-timeline-item .ti-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
}
.dash-member-cell {
  display: grid;
  gap: 3px;
  min-width: 140px;
}
.dash-member-cell span {
  color: var(--cream);
  font-weight: 600;
}
.dash-table .dash-member-cell code {
  color: var(--cream-dim);
  font-size: 11.5px;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.dash-timeline-item .ti-title {
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 2px;
}
.dash-timeline-item .ti-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  margin-top: 4px;
  word-break: break-word;
}

/* ---------- Envelope tree + breadcrumb ---------- */
.dash-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-bottom: 14px;
}
.dash-breadcrumb a, .dash-breadcrumb button {
  color: var(--cream-muted);
  background: transparent;
  border: 0;
  padding: 2px 6px;
  font: inherit;
  font-family: var(--font-mono);
  cursor: pointer;
}
.dash-breadcrumb a:hover, .dash-breadcrumb button:hover { color: var(--cream); background: rgba(253, 251, 247, 0.04); }
.dash-breadcrumb .sep { color: var(--cream-dim); }
.dash-breadcrumb [aria-current="location"] { color: var(--cream); }

.dash-envelope-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.dash-envelope-tree {
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  padding: 8px 6px;
  min-height: 320px;
}
.dash-tree-node {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  font-size: 12.5px;
  color: var(--cream-muted);
  cursor: pointer;
}
.dash-tree-node:hover { background: rgba(253, 251, 247, 0.04); color: var(--cream); }
.dash-tree-node[aria-current="true"] { background: rgba(208, 90, 63, 0.10); color: var(--cream); box-shadow: inset 2px 0 0 var(--terracotta); }
.dash-tree-node .twist { color: var(--cream-dim); font-family: var(--font-mono); font-size: 10px; }
.dash-tree-node .count { font-family: var(--font-mono); font-size: 10.5px; color: var(--cream-dim); }
.dash-tree-node .label { font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tree-children { padding-left: 14px; }

/* ---------- Forms ---------- */
.dash-form { display: grid; gap: 14px; max-width: 520px; }
.dash-form-row { display: grid; gap: 5px; }
.dash-form-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dash-form-row .helper { font-size: 12px; color: var(--cream-dim); }
.dash-form-row .error  { font-size: 12px; color: var(--dash-bad); }
.dash-muted { color: var(--cream-dim); }
.dash-caption { font-size: 12px; color: var(--cream-dim); margin-top: 4px; word-break: break-word; }
.dash-input, .dash-select, .dash-textarea {
  padding: 8px 10px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--cream);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.12s var(--ease);
}
.dash-input:focus, .dash-select:focus, .dash-textarea:focus { border-color: var(--terracotta); }
.dash-input[disabled], .dash-select[disabled], .dash-textarea[disabled] { opacity: 0.55; cursor: not-allowed; }
.dash-input.mono { font-family: var(--font-mono); font-size: 12.5px; }
.dash-textarea { min-height: 84px; resize: vertical; font-family: var(--font-mono); font-size: 12.5px; }
.dash-select option { background: var(--obsidian-2); }
.dash-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-modal .dash-form { max-width: none; }
.dash-share-options {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--rule-strong);
  background: rgba(253, 251, 247, 0.02);
}
.dash-share-options legend {
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dash-share-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  color: var(--cream-muted);
  cursor: pointer;
}
.dash-share-choice:hover { border-color: var(--cream-dim); }
.dash-share-choice:focus-within { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.dash-share-choice:has(input:checked) {
  border-color: var(--terracotta);
  background: rgba(208, 90, 63, 0.08);
}
.dash-share-choice input {
  margin-top: 3px;
  accent-color: var(--terracotta);
}
.dash-share-choice span { display: grid; gap: 3px; }
.dash-share-choice strong { color: var(--cream); font-size: 13px; }
.dash-share-choice small { color: var(--cream-dim); font-size: 12px; line-height: 1.45; }
.dash-share-options > .helper { font-size: 12px; color: var(--cream-dim); }

/* ---------- Sub-navigation (Access tabs) ---------- */
.dash-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
.dash-subnav button {
  padding: 9px 16px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  color: var(--cream-muted);
  font-size: 13px;
  font-weight: 540;
  cursor: pointer;
}
.dash-subnav button:last-child { border-right: 0; }
.dash-subnav button:hover { background: rgba(253, 251, 247, 0.03); color: var(--cream); }
.dash-subnav button[aria-current="true"] {
  background: rgba(208, 90, 63, 0.10);
  color: var(--cream);
  box-shadow: inset 0 -2px 0 var(--terracotta);
}
.dash-subnav .sub-count {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
}

/* ---------- Callouts ---------- */
.dash-callout {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--cream-muted);
}
.dash-callout h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.dash-callout[data-tone="warn"] { border-color: rgba(213, 165, 82, 0.4); background: rgba(213, 165, 82, 0.06); }
.dash-callout[data-tone="warn"] h4 { color: var(--dash-warn); }
.dash-callout[data-tone="bad"]  { border-color: rgba(208, 90, 63, 0.45); background: rgba(208, 90, 63, 0.06); }
.dash-callout[data-tone="bad"] h4 { color: var(--dash-bad); }
.dash-callout[data-tone="info"] { border-color: rgba(74, 144, 226, 0.4); background: rgba(74, 144, 226, 0.06); }
.dash-callout[data-tone="info"] h4 { color: var(--dash-info); }
.dash-callout[data-tone="ok"] { border-color: rgba(119, 184, 157, 0.4); background: rgba(119, 184, 157, 0.06); }
.dash-callout[data-tone="ok"] h4 { color: var(--dash-ok); }
.dash-callout code { font-size: 12.5px; }

/* ---------- Modal ---------- */
.dash-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
}
.dash-modal {
  width: min(540px, 100%);
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  box-shadow: 0 30px 80px -28px rgba(0, 0, 0, 0.6);
}
.dash-modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-raised);
}
.dash-modal-head h3 { font-size: 16px; color: var(--cream); }
.dash-modal-head .sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--cream-dim); margin-top: 4px; word-break: break-all; }
.dash-modal-close {
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--cream-dim);
  width: 28px; height: 28px;
  cursor: pointer;
  display: grid; place-items: center;
}
.dash-modal-close:hover { color: var(--cream); border-color: var(--cream-dim); }
.dash-modal-body { padding: 18px 20px; display: grid; gap: 14px; }
.dash-modal-body p { color: var(--cream-muted); font-size: 13.5px; max-width: none; }
.dash-recovery-steps { display: grid; gap: 12px; counter-reset: recovery-step; }
.dash-recovery-steps li { position: relative; padding-left: 28px; color: var(--cream); }
.dash-recovery-steps li::before {
  content: counter(recovery-step);
  counter-increment: recovery-step;
  position: absolute;
  top: 1px;
  left: 0;
  width: 19px;
  height: 19px;
  border: 1px solid var(--rule-strong);
  color: var(--terracotta);
  font: 500 10px/18px var(--font-mono);
  text-align: center;
}
.dash-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
  background: var(--surface-raised);
}

/* ---------- Toast ---------- */
.dash-toast-stack {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: grid;
  gap: 8px;
  z-index: 120;
  pointer-events: none;
}
.dash-toast {
  border: 1px solid var(--rule-strong);
  background: var(--surface-raised);
  color: var(--cream);
  padding: 10px 14px;
  font-size: 13px;
  min-width: 240px;
  max-width: 360px;
  pointer-events: auto;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.5);
  animation: dash-toast-in 0.22s var(--ease);
}
.dash-toast[data-tone="ok"]   { border-left: 2px solid var(--dash-ok); }
.dash-toast[data-tone="bad"]  { border-left: 2px solid var(--dash-bad); }
.dash-toast[data-tone="info"] { border-left: 2px solid var(--dash-info); }
.dash-toast .toast-title { font-weight: 600; font-size: 13px; }
.dash-toast .toast-body  { color: var(--cream-muted); font-size: 12.5px; margin-top: 3px; }
@keyframes dash-toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Skeleton ---------- */
.dash-skeleton {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.dash-skeleton .skel-row {
  height: 12px;
  background: linear-gradient(90deg, rgba(253, 251, 247, 0.04) 0%, rgba(253, 251, 247, 0.10) 50%, rgba(253, 251, 247, 0.04) 100%);
  background-size: 200% 100%;
  animation: dash-skel 1.4s linear infinite;
}
.dash-skeleton .skel-row.short { width: 60%; }
.dash-skeleton .skel-row.mid   { width: 80%; }
@keyframes dash-skel {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- Empty state ---------- */
.dash-empty {
  display: grid;
  gap: 10px;
  padding: 48px 24px;
  text-align: center;
  align-content: center;
  justify-items: center;
  color: var(--cream-dim);
}
.dash-empty h3 { color: var(--cream); font-size: 15.5px; }
.dash-empty p  { font-size: 13px; max-width: 40ch; }
.dash-empty .dash-empty-glyph {
  width: 28px; height: 28px;
  border: 1px solid var(--rule-strong);
  display: grid; place-items: center;
  color: var(--cream-dim);
}
.dash-member-access-empty {
  width: min(100%, 720px);
  margin: 0 auto;
}
.dash-member-access-empty .dash-actions {
  justify-content: center;
  padding: 0 24px 32px;
}

/* ---------- Inline grid utilities ---------- */
.dash-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-stack  { display: grid; gap: 14px; }
.dash-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}

/* ---------- Device-code approval screen ---------- */
.dash-approval {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}
.dash-approval-intro {
  display: grid;
  gap: 8px;
}
.dash-approval-intro h2 {
  font-size: 22px;
  font-weight: 640;
  color: var(--cream);
  letter-spacing: -0.02em;
}
.dash-approval-intro p {
  color: var(--cream-muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 48ch;
}
.dash-approval-intro code { font-size: 13px; }
.dash-approval-form {
  max-width: none;
  gap: 16px;
}
.dash-code-input {
  font-size: 20px !important;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  padding: 12px 14px !important;
}
.dash-approval-code {
  display: grid;
  place-items: center;
  padding: 32px 24px 28px;
  border: 1px solid var(--rule-strong);
  background: var(--term-bg);
  color: var(--term-ink);
  gap: 6px;
}
.dash-approval-code[data-status="approved"] { border-color: rgba(119, 184, 157, 0.4); }
.dash-approval-code[data-status="denied"] { border-color: rgba(208, 90, 63, 0.45); }
.dash-approval-code[data-status="expired"] { border-color: rgba(213, 165, 82, 0.4); }
.dash-approval-code .code-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--term-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dash-approval-code .code-value {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--term-accent);
}
.dash-approval-code[data-status="approved"] .code-value { color: var(--dash-ok); }
.dash-approval-code[data-status="denied"] .code-value { color: var(--dash-bad); }
.dash-approval-code[data-status="expired"] .code-value { color: var(--dash-warn); }
.dash-approval-code .code-countdown {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--term-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.dash-approval-meta {
  display: grid;
  grid-template-columns: minmax(110px, 0.28fr) minmax(0, 1fr);
  gap: 10px 18px;
  padding: 18px 20px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
}
.dash-approval-meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cream-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dash-approval-meta dd { margin: 0; color: var(--cream); font-size: 13.5px; }
.dash-approval-meta dd code { font-size: 12.5px; word-break: break-all; }
.dash-approval-actions {
  display: grid;
  gap: 12px;
}
.dash-approval-prompt {
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}
.dash-approval-foot {
  padding: 12px 16px;
  border: 1px solid var(--rule);
  background: rgba(253, 251, 247, 0.02);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cream-dim);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dash-content[data-split="true"] { grid-template-columns: minmax(0, 1fr); }
  .dash-content[data-split="true"] > .dash-detail-pane { position: static; max-height: none; padding: 0 22px 64px; }
  .dash-content[data-split="true"] > .dash-list-pane { padding: 22px 22px 0; }
  .dash-envelope-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .dash-app { grid-template-columns: 1fr; }
  .dash-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .dash-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  [data-dashboard-app] .dash-sidebar-foot { display: none; }
  [data-dashboard-app] .dash-mobile-account-trigger {
    display: inline-flex;
    min-height: 44px;
  }
  .dash-header { padding: 12px 16px; }
  .dash-content { padding: 16px 16px 48px; }
  .dash-summary { grid-template-columns: repeat(2, 1fr); }
  .dash-summary-cell { border-left: 0; border-top: 1px solid var(--rule); }
  .dash-summary-cell:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 560px) {
  .dash-summary { grid-template-columns: 1fr; }
  .dash-summary-cell { border-top: 0; }
  .dash-summary-cell + .dash-summary-cell { border-top: 1px solid var(--rule); }
  .dash-approval-meta { grid-template-columns: 1fr; gap: 4px 0; }
  .dash-approval-meta dt { margin-top: 8px; }
  .dash-detail-section dl { grid-template-columns: 1fr; gap: 4px; }
  .dash-detail-section dt { margin-top: 6px; }
  .dash-people-table .dash-table,
  .dash-members-table .dash-table,
  .dash-devices-table .dash-table { min-width: 0; }
  .dash-people-table :is(th, td):nth-child(2),
  .dash-people-table :is(th, td):nth-child(3),
  .dash-people-table :is(th, td):nth-child(4),
  .dash-people-table :is(th, td):nth-child(6),
  .dash-people-table :is(th, td):nth-child(7),
  .dash-members-table :is(th, td):nth-child(2),
  .dash-members-table :is(th, td):nth-child(3),
  .dash-members-table :is(th, td):nth-child(4),
  .dash-devices-table :is(th, td):nth-child(2),
  .dash-devices-table :is(th, td):nth-child(4),
  .dash-devices-table :is(th, td):nth-child(5) { display: none; }
  .dash-table .dash-member-cell { min-width: 0; }
  .dash-table .dash-member-cell code {
    display: block;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash-members-table .dash-member-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-members-table .dash-member-actions button { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .dash-skeleton .skel-row { animation: none; }
  .dash-toast { animation: none; }
  .dash-content { transition: none; }
  .dash-workspace .dash-active-workspace[aria-busy="true"] .aw-change { animation: none; }
}

/* ---------- Checkbox groups ---------- */
.dash-check-group { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.dash-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--cream-muted); cursor: pointer; }
.dash-check input { accent-color: var(--terracotta); }
.dash-check span { font-family: var(--font-mono); font-size: 12.5px; }
.dash-form-row .dash-input + .dash-input { margin-top: 6px; }
.dash-form-row[data-disabled="true"] .dash-input { opacity: 0.55; cursor: not-allowed; }
