:root {
  color-scheme: dark;
  --bg: #111a21;
  --bg-elevated: #16232c;
  --surface: #1b2832;
  --surface-2: #22333f;
  --surface-soft: rgba(27, 40, 50, .74);
  --text: #f1eee7;
  --muted: #93a1aa;
  --muted-strong: #b9c1c5;
  --line: rgba(241, 238, 231, .12);
  --line-strong: rgba(241, 238, 231, .22);
  --accent: #d66b3d;
  --accent-strong: #ec8353;
  --accent-soft: rgba(214, 107, 61, .14);
  --steel: #698873;
  --success: #77b97f;
  --warning: #e0a85c;
  --danger: #e06f6f;
  --info: #7fa6bd;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --max: 1180px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f3ec;
  --bg-elevated: #eee8de;
  --surface: #fffdfa;
  --surface-2: #e9e2d8;
  --surface-soft: rgba(255, 253, 250, .83);
  --text: #182128;
  --muted: #65727a;
  --muted-strong: #48545b;
  --line: rgba(24, 33, 40, .13);
  --line-strong: rgba(24, 33, 40, .22);
  --accent: #b94f27;
  --accent-strong: #973b1a;
  --accent-soft: rgba(185, 79, 39, .11);
  --steel: #4d715a;
  --success: #3d7f49;
  --warning: #9b651b;
  --danger: #b64040;
  --info: #436f88;
  --shadow: 0 24px 70px rgba(48, 37, 27, .11);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font-family: var(--sans); line-height: 1.55; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
code, pre, kbd, .mono { font-family: var(--mono); }
::selection { color: var(--text); background: rgba(214, 107, 61, .35); }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-160%); padding: 9px 12px; color: #fff; background: #000; border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--accent-strong); font: 700 12px/1.2 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.eyebrow::before { width: 22px; height: 1px; content: ""; background: currentColor; }
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 430px); gap: 40px; align-items: end; margin-bottom: 42px; }
.section-head h2, .page-title { margin: 0; font-size: clamp(32px, 5vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.section-head p, .lede { margin: 0; color: var(--muted-strong); font-size: 17px; }
.kicker { color: var(--accent); font: 700 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }

.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px); }
.header-inner { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 780; letter-spacing: -.02em; text-decoration: none; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; color: var(--accent); border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 4px var(--accent-soft); font: 800 13px/1 var(--mono); }
.header-nav { display: flex; align-items: center; gap: 5px; }
.header-nav a { padding: 8px 10px; color: var(--muted-strong); border-radius: 7px; font-size: 14px; font-weight: 650; text-decoration: none; }
.header-nav a:hover, .header-nav a:focus-visible { color: var(--text); background: var(--surface); outline: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { display: inline-grid; width: 38px; height: 38px; place-items: center; color: var(--muted-strong); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun, html[data-theme="light"] .theme-toggle .moon { display: none; }
html[data-theme="light"] .theme-toggle .sun { display: block; }

.btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; color: var(--text); border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); font-size: 14px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn-primary { color: #fff8f2; border-color: var(--accent); background: var(--accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 34px; padding: 7px 11px; font-size: 12px; }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.icon-btn { display: inline-grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }

.card { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.02); }
.card h3 { margin: 0 0 9px; font-size: 17px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent); }
.status-dot.operational, .status-dot.up, .status-dot.ready { color: var(--success); background: var(--success); }
.status-dot.degraded { color: var(--warning); background: var(--warning); }
.status-dot.down, .status-dot.error { color: var(--danger); background: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; color: var(--muted-strong); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 650 11px/1 var(--mono); text-transform: uppercase; }
.badge.success { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); background: color-mix(in srgb, var(--success) 9%, transparent); }
.badge.warning { color: var(--warning); }
.badge.danger { color: var(--danger); }

/* Landing */
.landing-hero { min-height: clamp(680px, calc(100vh - 68px), 860px); display: grid; align-items: stretch; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, .92fr); align-items: stretch; gap: 34px; }
.hero-copy { position: relative; z-index: 2; display: grid; align-content: center; padding: 72px 0; }
.hero-title { max-width: 760px; margin: 0; font-size: clamp(58px, 5.5vw, 82px); line-height: .91; letter-spacing: -.065em; }
.hero-title span { color: var(--accent); }
.hero-lede { max-width: 620px; margin: 26px 0 0; color: var(--muted-strong); font-size: clamp(17px, 2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-art { position: relative; align-self: center; width: 100%; aspect-ratio: 4 / 3; max-height: 720px; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background-color: var(--surface); background-image: radial-gradient(circle at 82% 12%, var(--accent-soft), transparent 34%), linear-gradient(135deg, transparent 0 49.8%, var(--line) 50%, transparent 50.2%); box-shadow: var(--shadow); }
html[data-theme="dark"] .hero-art { background-color: #101a21; }
.gateway-window { position: absolute; inset: 20px; display: grid; grid-template-rows: 46px minmax(0, 1fr) 42px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); box-shadow: 0 20px 54px rgba(0, 0, 0, .18); }
.gateway-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); font: 600 9px/1 var(--mono); letter-spacing: .04em; }
.window-lights { display: flex; gap: 5px; }
.window-lights i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.window-lights i:first-child { background: var(--accent); }
.window-lights i:nth-child(2) { background: var(--warning); }
.gateway-address { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.gateway-address b { color: var(--text); font-weight: 750; }
.gateway-live { display: inline-flex; align-items: center; gap: 6px; color: var(--success); text-transform: uppercase; }
.gateway-live i, .gateway-footer i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px color-mix(in srgb, var(--success) 65%, transparent); }
.gateway-flow { display: grid; grid-template-columns: minmax(0, .92fr) 28px minmax(0, 1.14fr) 28px minmax(0, .92fr); align-items: stretch; gap: 6px; padding: 20px 16px; }
.gateway-block { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 13px 11px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface) 86%, transparent); }
.flow-label { margin-bottom: 13px; color: var(--accent); font: 700 8px/1 var(--mono); letter-spacing: .1em; }
.agent-glyph { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 13px; color: #fff8f2; border-radius: 9px; background: var(--accent); box-shadow: 0 10px 28px var(--accent-soft); font: 800 12px/1 var(--mono); }
.gateway-block > strong { overflow: hidden; font-size: 12px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.gateway-block code { overflow: hidden; margin-top: 7px; color: var(--muted-strong); font: 600 8px/1.4 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.gateway-block > small { margin-top: 6px; color: var(--muted); font: 500 8px/1.3 var(--mono); }
.flow-arrow { position: relative; align-self: center; height: 1px; background: var(--line-strong); }
.flow-arrow::after { position: absolute; top: -3px; right: -1px; width: 6px; height: 6px; content: ""; border-top: 1px solid var(--accent); border-right: 1px solid var(--accent); transform: rotate(45deg); }
.flow-arrow i { position: absolute; top: -3px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: gateway-travel 2.8s ease-in-out infinite; }
.flow-arrow:nth-child(4) i { animation-delay: 1.4s; }
.gate-block { justify-content: flex-start; gap: 7px; }
.gate-block .flow-label { margin-bottom: 2px; }
.gate-step { display: grid; grid-template-columns: 18px minmax(0, 1fr) 14px; align-items: center; gap: 6px; padding: 7px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.gate-step > span { color: var(--muted); font: 650 7px/1 var(--mono); }
.gate-step div { min-width: 0; }
.gate-step strong, .gate-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-step strong { font-size: 9px; line-height: 1.25; }
.gate-step small { margin-top: 2px; color: var(--muted); font: 500 7px/1.2 var(--mono); }
.gate-step > i { display: grid; width: 14px; height: 14px; place-items: center; color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 38%, transparent); border-radius: 50%; font: normal 700 8px/1 var(--mono); }
.response-code { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; margin-bottom: 16px; padding: 6px 7px; color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 28%, var(--line)); border-radius: 6px; background: color-mix(in srgb, var(--success) 8%, transparent); font: 700 8px/1 var(--mono); }
.response-code i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.gateway-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface-soft); font: 600 8px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.gateway-footer span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
@keyframes gateway-travel { 0%, 100% { left: 0; opacity: 0; } 15% { opacity: 1; } 80% { left: calc(100% - 7px); opacity: 1; } }
.account-action { max-width: 190px; }
.account-action.signed-in { color: var(--success); border-color: color-mix(in srgb, var(--success) 32%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.account-avatar { display: grid; width: 20px; height: 20px; place-items: center; color: var(--text); border-radius: 50%; background: var(--surface-2); font: 750 10px/1 var(--mono); }
.account-avatar[hidden] { display: none; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 42px; color: var(--muted); font: 600 12px/1.2 var(--mono); }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof span::before { width: 5px; height: 5px; content: ""; border-radius: 50%; background: var(--success); }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.service-card { min-height: 188px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.service-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.service-index { color: var(--accent); font: 650 11px/1 var(--mono); }
.service-card h3 { margin: 24px 0 7px; font-size: 16px; }
.service-card p { margin: 0; color: var(--muted); font-size: 13px; }
.service-state { display: flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--muted-strong); font: 600 11px/1 var(--mono); }
.workflow { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.workflow-step { min-height: 220px; padding: 28px; background: var(--surface); }
.workflow-step::before { counter-increment: step; content: "0" counter(step); color: var(--accent); font: 700 12px/1 var(--mono); }
.workflow-step h3 { margin: 54px 0 10px; font-size: 22px; }
.workflow-step p { margin: 0; color: var(--muted); }
.quick-connect { display: grid; grid-template-columns: minmax(0, .75fr) minmax(420px, 1.25fr); gap: 42px; align-items: center; }
.code-panel { overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #0b1217; color: #dbe3e7; box-shadow: var(--shadow); }
.code-panel pre { margin: 0; font-size: 12px; white-space: pre-wrap; }
.site-footer { padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; }

/* Console shell overrides */
.console-page { min-height: 100vh; overflow-x: hidden; background: var(--bg); }
.console-page .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.console-page .sidebar { position: sticky; top: 0; width: auto; height: 100vh; padding: 18px 14px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-elevated); }
.console-page .brand { display: flex; padding: 8px 8px 18px; }
.console-page .nav-group { margin: 20px 8px 7px; color: var(--muted); font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.console-page .nav { display: grid; gap: 3px; }
.console-page .nav button { display: flex; width: 100%; align-items: center; justify-content: flex-start; padding: 9px 10px; color: var(--muted-strong); border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 650; text-align: left; }
.console-page .nav button:hover { color: var(--text); background: var(--surface); }
.console-page .nav button.active { color: var(--text); border-color: var(--line); background: var(--surface); box-shadow: inset 2px 0 var(--accent); }
.console-page .sidebar-footer { margin-top: 28px; padding: 14px 8px; border-top: 1px solid var(--line); }
.console-page .main { min-width: 0; padding: 0 32px 60px; }
.console-page .topbar { position: sticky; z-index: 30; top: 0; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 18px; margin: 0 -32px 28px; padding: 0 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(15px); }
.console-page .topbar h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.console-page .topbar > div { display: flex; align-items: center; gap: 9px; }
.console-page .panel { max-width: 1260px; margin-inline: auto; }
.console-page .panel-header { margin-bottom: 22px; }
.console-page .metric { margin: 12px 0 9px; padding: 0; color: var(--text); font: 760 30px/1 var(--mono); letter-spacing: -.04em; }
.console-page [data-panel-view="overview"] .metric { font-size: clamp(52px, 5vw, 74px); font-weight: 820; line-height: .9; letter-spacing: -.08em; }
.console-page .metric strong { display: block; margin-top: 6px; font: inherit; }
.console-page .card { border-color: var(--line); background: var(--surface); box-shadow: none; }
.console-page .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.console-page .metric { padding: 19px; }
.console-page .metric strong { display: block; margin-top: 6px; font: 760 26px/1.1 var(--mono); }
.console-page .table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.console-page table { width: 100%; border-collapse: collapse; }
.console-page th, .console-page td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.console-page th { color: var(--muted); font: 700 10px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.console-page tr:last-child td { border-bottom: 0; }
.console-page input, .console-page select, .console-page textarea, .form-control { width: 100%; padding: 10px 11px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; outline: none; background: var(--bg); }
.console-page input:focus, .console-page select:focus, .console-page textarea:focus, .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.console-page label { display: grid; gap: 6px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.console-page .field { display: grid; gap: 6px; }
.console-page .button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; padding: 8px 12px; color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 750; cursor: pointer; }
.console-page .button:hover { border-color: var(--accent); }
.console-page .button.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.console-page .button.secondary { background: transparent; }
.console-page .empty { padding: 30px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 10px; text-align: center; }
.console-page pre { color: var(--muted-strong); }
.console-page .toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 420px; padding: 12px 15px; color: var(--text); border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2); box-shadow: var(--shadow); }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 18px; }
.token-field { display: flex; gap: 8px; }
.token-field input { font-family: var(--mono); }
.warning-box { padding: 14px; color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 32%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--warning) 8%, transparent); font-size: 13px; }
.autonomy-control { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
.switch input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface-2); cursor: pointer; transition: border-color .18s, background .18s, opacity .18s; }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; content: ""; border-radius: 50%; background: var(--muted-strong); transition: transform .18s, background .18s; }
.switch input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.switch input:checked + span::after { background: var(--accent); transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch input:disabled { cursor: wait; }
.switch input:disabled + span { cursor: wait; opacity: .58; }


/* Console primitives */
.console-page .sidebar-footer { color: var(--muted); font-size: 12px; }
.console-page .identity { display: flex; align-items: center; gap: 12px; }
.console-page .avatar { display: grid; width: 36px; height: 36px; place-items: center; color: var(--text); border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-weight: 800; }
.console-page .content { max-width: 1500px; padding: 6px 0 0; }
.console-page .panel { display: none; }
.console-page .panel.active { display: block; }
.console-page .nav button .pill { margin-left: auto; }
.console-page .button-icon { display: inline-grid; flex: 0 0 auto; width: 16px; height: 16px; place-items: center; }
.console-page .button-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.console-page .nav button .button-icon { margin-right: 2px; color: var(--muted); }
.console-page .nav button.active .button-icon { color: var(--accent); }
.prompt-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.prompt-card { display: grid; min-height: 620px; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; }
.prompt-card h2 { margin: 14px 0 8px; }
.prompt-card .code-panel { max-height: 440px; overflow: auto; }
.prompt-card .button { justify-self: start; }
.console-page .title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.console-page .title-row h1 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 52px); line-height: .95; letter-spacing: -.055em; }
.console-page .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.console-page .button.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 42%, transparent); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.console-page .button:disabled { cursor: not-allowed; opacity: .52; }
.console-page .mobile-nav { display: none; }
.console-page .pill { display: inline-flex; padding: 3px 8px; color: var(--muted-strong); border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 750; }
.console-page .pill.ok { color: var(--success); background: color-mix(in srgb, var(--success) 11%, var(--surface)); }
.console-page .pill.warn { color: var(--warning); background: color-mix(in srgb, var(--warning) 11%, var(--surface)); }
.console-page .pill.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
.console-page .approval { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.console-page .memory-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr); gap: 16px; }
.console-page .memory-layout > * { min-width: 0; }
.console-page .memory-list { display: grid; max-height: 680px; overflow: auto; gap: 8px; }
.console-page .memory-item { min-width: 0; padding: 12px; overflow: hidden; color: var(--text); border: 1px solid var(--line); border-radius: 9px; background: var(--surface); text-align: left; }
.console-page button.memory-item { cursor: pointer; }
.console-page .memory-item:hover, .console-page .memory-item.active { border-color: var(--info); box-shadow: 0 0 0 2px color-mix(in srgb, var(--info) 13%, transparent); }
.console-page .memory-item p { margin: 7px 0 0; overflow: hidden; color: var(--muted-strong); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.console-page .meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 11px; }
.console-page .meta span { overflow-wrap: anywhere; word-break: break-word; }
.console-page #memory-graph { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 10px; background: #0b1217; }
.console-page .tabs { display: flex; gap: 5px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.console-page .tabs button { padding: 9px 12px; color: var(--muted-strong); border: 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; }
.console-page .tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 750; }
.console-page .subview { display: none; }
.console-page .subview.active { display: block; }
.console-page .danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.console-page .schema-fields { display: grid; gap: 10px; margin: 15px 0; }
.console-page .code { min-height: 80px; padding: 15px; overflow: auto; color: #dbe3e7; border: 1px solid var(--line); border-radius: 10px; background: #0b1217; white-space: pre-wrap; word-break: break-word; font: 12px/1.55 var(--mono); }
/* Status */
.status-page main { min-height: 70vh; }
.status-hero { padding: 72px 0 50px; border-bottom: 1px solid var(--line); }
.overall-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 34px; padding: 20px 22px; border: 1px solid var(--line); border-left: 3px solid var(--success); border-radius: 10px; background: var(--surface); }
.overall-banner.degraded { border-left-color: var(--warning); }
.overall-banner.down { border-left-color: var(--danger); }
.overall-banner strong { display: block; font-size: 18px; }
.overall-banner span { color: var(--muted); font: 600 11px/1 var(--mono); }
.status-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding: 42px 0 90px; }
.status-list { display: grid; gap: 10px; }
.status-service { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.status-service-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-service-name { display: flex; align-items: center; gap: 10px; }
.status-service-name strong { font-size: 14px; }
.status-service-meta { display: flex; gap: 14px; color: var(--muted); font: 600 10px/1 var(--mono); }
.status-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 26px; align-items: end; margin-top: 15px; }
.status-bar i { display: block; min-width: 2px; height: 100%; border-radius: 2px; background: var(--success); opacity: .8; }
.status-bar i.degraded { background: var(--warning); }
.status-bar i.down { background: var(--danger); }
.status-bar i.unknown { background: var(--surface-2); }
.layer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 13px; }
.layer { padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font: 600 10px/1.3 var(--mono); }
.layer b { display: block; margin-bottom: 4px; color: var(--muted-strong); }
.status-sidebar { display: grid; align-content: start; gap: 14px; }
.incident { padding: 16px; border-left: 2px solid var(--warning); }
.incident.resolved { border-left-color: var(--success); }
.incident h3 { margin: 0 0 7px; font-size: 14px; }
.incident p { margin: 0; color: var(--muted); font-size: 12px; }
.subscribe-form { display: grid; gap: 10px; }
.subscribe-form input, .subscribe-form select { width: 100%; padding: 9px 10px; color: var(--text); border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, .88fr); }
  .hero-copy { max-width: 760px; }
  .service-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .status-layout { grid-template-columns: 1fr; }
  .status-sidebar { grid-template-columns: repeat(2, 1fr); }
  .console-page .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .header-nav { display: none; }
  .section { padding: 68px 0; }
  .section-head, .quick-connect, .setup-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(46px, 15vw, 72px); }
  .hero-art { position: absolute; inset: 68px 0 auto 24%; z-index: 0; width: auto; min-height: 650px; border-radius: 0; opacity: .28; }
  .workflow, .grid-2, .grid-3, .console-page .grid-3 { grid-template-columns: 1fr; }
  .console-page .shell { grid-template-columns: 1fr; }
  .console-page .sidebar { position: sticky; z-index: 40; height: auto; padding: 9px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .console-page .sidebar .brand, .console-page .sidebar-footer, .console-page .nav-group { display: none; }
  .console-page .nav { display: flex; overflow-x: auto; }
  .console-page .nav button { width: auto; flex: 0 0 auto; }
  .console-page .main { padding: 0 16px 50px; }
  .console-page .topbar { margin: 0 -16px 24px; padding: 0 16px; }
  .status-sidebar { grid-template-columns: 1fr; }
  .layer-grid { grid-template-columns: repeat(2, 1fr); }
  .prompt-choice-grid { grid-template-columns: 1fr; }
  .prompt-card { min-height: 0; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .console-page .title-row { align-items: flex-start; flex-direction: column; }
  .console-page .title-row h1 { font-size: 40px; }
  .console-page .memory-layout { grid-template-columns: 1fr; }
  .console-page .mobile-nav { display: block; max-width: 180px; }
  .console-page .identity > div:not(.avatar) { display: none; }
  .token-field { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .header-actions .btn { display: none; }
  .service-grid, .grid-4 { grid-template-columns: 1fr; }
  .hero-copy { padding: 74px 0; }
  .hero-proof { display: none; }
  .overall-banner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
