:root {
  color-scheme: dark;
  --demo-bg: #06101f;
  --demo-panel: rgba(13, 27, 48, 0.9);
  --demo-panel-2: rgba(18, 37, 63, 0.78);
  --demo-border: rgba(132, 158, 194, 0.2);
  --demo-text: #f7fbff;
  --demo-muted: #a8bbd2;
  --demo-cyan: #52e5f7;
  --demo-blue: #7b8cff;
  --demo-green: #4ee6a4;
  --demo-amber: #ffbd58;
  --demo-red: #ff6b81;
}

body { background: radial-gradient(circle at 10% 0%, #102b48 0, transparent 38%), radial-gradient(circle at 90% 10%, #271e59 0, transparent 35%), var(--demo-bg); color: var(--demo-text); }
.demo-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 40px; }
.demo-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .7fr); gap: 36px; align-items: end; padding: 56px 0 42px; }
.demo-kicker, .demo-label { margin: 0 0 10px; color: var(--demo-cyan); font-size: .75rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.demo-hero h1 { max-width: 780px; margin: 0; font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .94; letter-spacing: -.055em; }
.demo-lead { max-width: 740px; margin: 24px 0 0; color: var(--demo-muted); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.7; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.demo-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; padding: 0 18px; font: inherit; font-weight: 850; text-decoration: none; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.demo-button:hover { transform: translateY(-1px); }
.demo-button:focus-visible { outline: 3px solid rgba(82, 229, 247, .42); outline-offset: 3px; }
.demo-button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.demo-button-primary { background: linear-gradient(135deg, var(--demo-cyan), #75a5ff); color: #03111d; }
.demo-button-secondary { border-color: var(--demo-border); background: rgba(9, 22, 39, .76); color: var(--demo-text); }
.demo-button-danger { border-color: rgba(255,107,129,.55); background: rgba(102,24,45,.55); color: #ffdce3; }
.demo-button-warning { border-color: rgba(255,189,88,.55); background: rgba(105,66,10,.55); color: #ffe9bc; }
.demo-button-approve { border-color: rgba(78,230,164,.55); background: rgba(13,93,65,.62); color: #d8ffed; }
.demo-safety { display: flex; gap: 13px; align-items: flex-start; border: 1px solid rgba(78,230,164,.34); border-radius: 14px; padding: 18px; background: rgba(8, 43, 41, .46); }
.demo-safety strong, .demo-safety span { display: block; }
.demo-safety span { margin-top: 5px; color: #b9d7cf; font-size: .86rem; line-height: 1.5; }
.demo-status-dot { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 6px !important; border-radius: 50%; background: var(--demo-green); box-shadow: 0 0 0 5px rgba(78,230,164,.12); }
.demo-authority-modes { margin: 0 0 28px; border: 1px solid var(--demo-border); border-radius: 18px; padding: clamp(20px, 4vw, 32px); background: rgba(9,22,39,.76); }
.demo-authority-modes-heading { display: grid; grid-template-columns: minmax(180px,.55fr) minmax(0,1.45fr); gap: 28px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--demo-border); }
.demo-authority-modes-heading .demo-label { margin: 0; }
.demo-authority-modes-heading h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2.15rem); line-height: 1.15; }
.demo-authority-modes-heading p:last-child { margin: 10px 0 0; color: var(--demo-muted); line-height: 1.55; }
.demo-step-prompt { display: block; margin-top: 9px; color: var(--demo-text); font-size: .9rem; font-weight: 800; line-height: 1.5; }
.demo-mode-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 18px; }
.demo-mode-card { display: flex; gap: 13px; border: 1px solid var(--demo-border); border-radius: 12px; padding: 16px; color: inherit; background: rgba(14,31,52,.7); font: inherit; text-align: left; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.demo-mode-card:hover { transform: translateY(-2px); border-color: rgba(82,229,247,.42); }
.demo-mode-card:focus-visible { outline: 3px solid rgba(82,229,247,.42); outline-offset: 3px; }
.demo-mode-card.is-demo-route { border-color: rgba(255,189,88,.52); background: rgba(73,48,13,.35); box-shadow: inset 0 0 0 1px rgba(255,189,88,.12); }
.demo-mode-grid h3 { margin: 7px 0; font-size: 1rem; }
.demo-mode-grid p { margin: 0; color: var(--demo-muted); font-size: .82rem; line-height: 1.55; }
.demo-mode-grid strong { display: block; margin-top: 12px; color: var(--demo-text); font-size: .76rem; line-height: 1.45; }
.demo-scenario-number { color: var(--demo-cyan); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.demo-mode-selected { display: none; width: fit-content; margin-top: 12px; border-radius: 999px; padding: 5px 9px; color: #06101f; background: var(--demo-amber); font-size: .65rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.demo-mode-card.is-demo-route .demo-mode-selected { display: block; }
.demo-mode-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-weight: 950; }
.demo-mode-allow { color: var(--demo-green); background: rgba(78,230,164,.12); }
.demo-mode-review { color: var(--demo-amber); background: rgba(255,189,88,.12); }
.demo-mode-block { color: var(--demo-red); background: rgba(255,107,129,.12); }
.demo-selection-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; margin-top: 18px; border: 1px solid rgba(82,229,247,.3); border-radius: 13px; padding: 18px; background: rgba(82,229,247,.06); }
.demo-selection-summary strong, .demo-selection-summary span { display: block; }
.demo-selection-summary strong { font-size: 1.05rem; }
.demo-selection-summary span { margin-top: 6px; color: var(--demo-muted); font-size: .86rem; line-height: 1.5; }
.demo-selection-summary .demo-actions { justify-content: flex-end; margin-top: 0; }
.demo-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.demo-progress li { border: 1px solid var(--demo-border); border-radius: 10px; color: #7890ae; background: rgba(8, 20, 36, .56); font-size: .82rem; font-weight: 800; }
.demo-progress button { display: flex; width: 100%; min-height: 46px; align-items: center; gap: 9px; border: 0; padding: 8px 12px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.demo-progress button:disabled { cursor: not-allowed; opacity: .48; }
.demo-progress button:not(:disabled):hover { color: var(--demo-text); }
.demo-progress button:focus-visible { outline: 3px solid rgba(82,229,247,.42); outline-offset: 2px; border-radius: 8px; }
.demo-progress li span { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #162842; }
.demo-progress li.is-active { border-color: rgba(82,229,247,.5); color: var(--demo-text); background: rgba(27, 61, 86, .7); }
.demo-progress li.is-complete { color: #baf6da; }
.demo-progress li.is-complete span { background: rgba(78,230,164,.2); color: var(--demo-green); }
.demo-stage { min-height: 530px; }
.demo-panel { border: 1px solid var(--demo-border); border-radius: 18px; padding: clamp(20px, 4vw, 34px); background: linear-gradient(145deg, var(--demo-panel), rgba(8, 20, 37, .96)); box-shadow: 0 26px 80px rgba(0,0,0,.24); animation: demo-in .35s ease both; }
.demo-panel.is-hidden { display: none; }
.demo-panel-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--demo-border); }
.demo-panel h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.demo-panel > p { color: var(--demo-muted); line-height: 1.7; }
.demo-pill { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 29px; border: 1px solid var(--demo-border); border-radius: 999px; padding: 0 11px; font-size: .7rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.demo-pill-neutral { color: #b8c9dc; }
.demo-pill-warning { border-color: rgba(255,189,88,.45); color: var(--demo-amber); background: rgba(255,189,88,.07); }
.demo-pill-success { border-color: rgba(78,230,164,.45); color: var(--demo-green); background: rgba(78,230,164,.07); }
.demo-pill-danger { border-color: rgba(255,107,129,.45); color: var(--demo-red); background: rgba(255,107,129,.07); }
.demo-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 0; }
.demo-facts div { min-width: 0; border: 1px solid var(--demo-border); border-radius: 11px; padding: 14px; background: var(--demo-panel-2); }
.demo-facts dt { color: #7f96b3; font-size: .68rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.demo-facts dd { overflow-wrap: anywhere; margin: 7px 0 0; color: var(--demo-text); font-weight: 750; }
.demo-checks { display: grid; gap: 10px; margin-top: 22px; }
.demo-gateway-intro { margin: 20px 0 0; color: var(--demo-muted); line-height: 1.65; }
.demo-check-groups { display: grid; gap: 20px; margin-top: 24px; }
.demo-check-groups section { border: 1px solid var(--demo-border); border-radius: 13px; padding: 16px; background: rgba(8,20,36,.45); }
.demo-check-groups h3 { margin: 0; color: var(--demo-text); font-size: .95rem; letter-spacing: .02em; }
.demo-check-groups .demo-checks { margin-top: 12px; }
.demo-checks div { display: flex; justify-content: space-between; gap: 20px; border: 1px solid var(--demo-border); border-radius: 10px; padding: 14px 16px; color: var(--demo-muted); background: rgba(9,23,41,.65); }
.demo-checks div span { display: grid; gap: 4px; }
.demo-checks div b { color: var(--demo-text); font-size: .9rem; }
.demo-checks div small { max-width: 780px; color: #8da3be; font-size: .76rem; line-height: 1.5; }
.demo-checks div > strong { flex: 0 0 auto; align-self: center; font-size: .76rem; }
.demo-checks div.is-pass { border-color: rgba(78,230,164,.25); }
.demo-checks div.is-pass strong { color: var(--demo-green); }
.demo-checks div.is-gate { border-color: rgba(255,189,88,.32); }
.demo-checks div.is-gate strong { color: var(--demo-amber); }
.demo-checks div.is-fail { border-color: rgba(255,107,129,.38); background: rgba(82,20,36,.38); }
.demo-checks div.is-fail strong { color: var(--demo-red); }
.demo-decision { margin-top: 18px; border: 1px solid rgba(255,189,88,.34); border-radius: 12px; padding: 18px; background: rgba(72,50,17,.42); }
.demo-decision.is-hidden { display: none; }
.demo-decision strong, .demo-decision span { display: block; }
.demo-decision strong { color: var(--demo-amber); font-size: 1.5rem; }
.demo-decision span { margin-top: 7px; color: #e2cfaa; line-height: 1.55; }
.demo-decision-success { border-color: rgba(78,230,164,.34); background: rgba(13,83,60,.36); }
.demo-decision-success strong { color: var(--demo-green); }
.demo-decision-success span { color: #c4ebd9; }
.demo-decision-danger { border-color: rgba(255,107,129,.38); background: rgba(82,20,36,.4); }
.demo-decision-danger strong { color: var(--demo-red); }
.demo-decision-danger span { color: #f1c2cc; }
.demo-authority-summary { margin-top: 22px; border: 1px solid rgba(255,189,88,.3); border-radius: 12px; padding: 18px; background: rgba(255,189,88,.07); }
.demo-authority-summary h3 { margin: 0 0 6px; }
.demo-authority-summary p { margin: 0; color: #e3d1b0; line-height: 1.6; }
.demo-notice { display: grid; gap: 6px; margin-top: 14px; border-left: 3px solid var(--demo-cyan); padding: 12px 15px; background: rgba(82,229,247,.06); }
.demo-notice span { color: var(--demo-muted); font-size: .86rem; }
.demo-approval-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.demo-outcome { margin-top: 22px; color: var(--demo-muted); line-height: 1.7; }
.demo-outcome strong { color: var(--demo-text); }
.demo-history { display: grid; gap: 0; margin: 22px 0; padding: 0; list-style: none; }
.demo-history li { display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; align-items: center; border-top: 1px solid var(--demo-border); padding: 13px 0; }
.demo-history time { color: #7890ae; font-variant-numeric: tabular-nums; font-size: .8rem; }
.demo-history span { color: var(--demo-muted); }
.demo-history strong { color: var(--demo-text); font-size: .82rem; text-transform: uppercase; }
.demo-binding { display: grid; gap: 7px; border: 1px solid rgba(82,229,247,.25); border-radius: 12px; padding: 16px; background: rgba(82,229,247,.05); }
.demo-binding span { color: var(--demo-muted); line-height: 1.55; }
.demo-proof { margin-top: 16px; border: 1px solid rgba(123,140,255,.3); border-radius: 12px; padding: 18px; background: rgba(123,140,255,.07); }
.demo-proof h3 { margin: 0; font-size: 1.15rem; }
.demo-proof p:last-child { margin: 8px 0 0; color: var(--demo-muted); line-height: 1.6; }
.demo-test-lab { display: grid; gap: 16px; margin-top: 16px; border: 1px solid var(--demo-border); border-radius: 12px; padding: 18px; background: rgba(8,20,36,.58); }
.demo-test-lab h3 { margin: 0; }
.demo-test-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-test-result { margin: 0; color: var(--demo-muted); line-height: 1.6; }
.demo-scope-note { margin: 16px 0 0; color: #8096b0; font-size: .78rem; line-height: 1.55; }
.is-hidden { display: none !important; }
.demo-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0; }
.demo-explainer > div { border: 1px solid var(--demo-border); border-radius: 15px; padding: 22px; background: rgba(11,25,44,.72); }
.demo-explainer span { color: var(--demo-cyan); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.demo-explainer h2 { margin: 12px 0 8px; font-size: 1.25rem; }
.demo-explainer p { margin: 0; color: var(--demo-muted); line-height: 1.6; }
.demo-cta { margin: 72px 0 36px; border: 1px solid rgba(123,140,255,.32); border-radius: 20px; padding: clamp(28px, 6vw, 58px); text-align: center; background: linear-gradient(135deg, rgba(25,58,87,.72), rgba(45,31,92,.72)); }
.demo-cta h2 { max-width: 760px; margin: 0 auto; font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.05; }
.demo-cta p:not(.demo-kicker) { max-width: 720px; margin: 18px auto 24px; color: var(--demo-muted); line-height: 1.7; }
@keyframes demo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 760px) {
  .demo-shell { width: min(100% - 22px, 1180px); padding-top: 34px; }
  .demo-hero, .demo-explainer, .demo-mode-grid, .demo-authority-modes-heading, .demo-selection-summary { grid-template-columns: 1fr; }
  .demo-selection-summary .demo-actions { justify-content: flex-start; }
  .demo-progress { grid-template-columns: repeat(2, 1fr); }
  .demo-progress li { font-size: .74rem; }
  .demo-facts { grid-template-columns: 1fr; }
  .demo-panel-heading { display: grid; }
  .demo-stage { min-height: 0; }
  .demo-history li { grid-template-columns: 1fr; gap: 5px; }
  .demo-checks div { display: grid; }
  .demo-checks div > strong { justify-self: start; }
}
