/* OSINTNova MCP lander and connection flow. Tokens mirror styles/chat.css.
   Served under a strict CSP: same-origin styles, scripts and fonts only. */
@font-face {
  font-family: "Neo Tech Std";
  src: url("/styles/Neo%20Tech%20Std%20Regular/Neo%20Tech%20Std%20Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #08070e;
  --panel: #0b0a12;
  --raised: #11101a;
  --raised-2: #171522;
  --border: rgba(232, 226, 242, .13);
  --border-soft: rgba(232, 226, 242, .08);
  --border-strong: rgba(232, 226, 242, .23);
  --text: #f4efe6;
  --muted: #aaa5b0;
  --subtle: #7e7987;
  --accent: #e7e0ef;
  --accent-hover: #f4ead8;
  --ink: #100e17;
  --danger: #e79b91;
  --success: #93d3ab;
  --warn: #e6c787;
  --display: "Neo Tech Std", Inter, system-ui, sans-serif;
  --sans: Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--border-strong); transition: color .15s, text-decoration-color .15s; }
a:hover { text-decoration-color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(231, 224, 239, .25); }
h1, h2, h3 { margin: 0; font-weight: normal; color: var(--text); }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; }
p code, li code, .note code { padding: 1px 6px; border: 1px solid var(--border-soft); border-radius: 6px; background: var(--raised); }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: transparent; color: var(--text); font: 500 14px/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--ease);
}
.btn:hover { background: rgba(244, 239, 230, .06); border-color: rgba(232, 226, 242, .35); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn-sm { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--ink); }
.btn-danger { color: var(--danger); border-color: rgba(231, 155, 145, .3); }
.btn-danger:hover { background: rgba(231, 155, 145, .08); border-color: rgba(231, 155, 145, .55); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #1a0d0b; }
.btn-danger-solid:hover { background: #efb0a7; border-color: #efb0a7; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; opacity: 1; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn:not(.btn-primary):not(.btn-danger-solid).is-loading::after { border-color: var(--text); border-right-color: transparent; }
.btn-copy.is-copied { color: var(--success); border-color: rgba(147, 211, 171, .4); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(8, 7, 14, .9); border-bottom: 1px solid transparent; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: border-color .2s; }
.topbar.is-scrolled, .is-compact .topbar { border-bottom-color: var(--border-soft); }
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 19px/1 var(--display); letter-spacing: .01em; }
.brand-mark { width: 24px; height: 24px; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 14px; text-decoration: none; transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--text); background: rgba(244, 239, 230, .05); }
.topbar-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.link-quiet { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; text-decoration: none; }
.link-quiet:hover { color: var(--text); }
.link-quiet svg { width: 14px; height: 14px; }

/* Hero */
.hero { padding-top: 84px; padding-bottom: 56px; }
.hero h1 { max-width: 900px; font: clamp(36px, 5.4vw, 60px)/1.06 var(--display); letter-spacing: -.01em; }
.hero-lead { max-width: 660px; margin-top: 22px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-connect { display: grid; grid-template-columns: minmax(0, 480px) auto; justify-content: start; align-items: center; gap: 8px 12px; margin-top: 34px; }
.hero-connect .field-label { grid-column: 1 / -1; }
.field-label { display: block; color: var(--subtle); font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.field { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--panel); transition: border-color .15s; }
.field:focus-within { border-color: rgba(232, 226, 242, .4); }
.field-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 14px/1.5 var(--mono); outline: none; text-overflow: ellipsis; }
.field .btn { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.hero-connect .btn-ghost { min-height: 44px; }
.clients { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--border-soft); }
.clients-label { color: var(--subtle); font-size: 13px; }
.client-list { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 0; list-style: none; }
.client-list li { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; font-weight: 500; transition: color .15s; }
.client-list li:hover { color: var(--text); }
.client-list svg { width: 18px; height: 18px; }

/* Demo */
.demo-section { padding-bottom: 8px; }
.demo-tabs, .setup-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-tabs { margin-bottom: 14px; }
.demo-tab, .setup-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--muted); font: 500 13px/1.2 var(--sans); cursor: pointer; transition: color .15s, background-color .15s, border-color .15s;
}
.demo-tab:hover, .setup-tab:hover { color: var(--text); border-color: var(--border-strong); }
.demo-tab.is-active { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.setup-tab svg { width: 15px; height: 15px; }
.window { margin: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); }
.window-bar { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); background: #09080f; }
.window-dots { display: inline-flex; gap: 7px; }
.window-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(232, 226, 242, .14); }
.chat { display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; height: 480px; padding: 28px max(24px, calc((100% - 760px) / 2)); overflow: hidden; }
.msg { max-width: 100%; flex: none; animation: msg-in .35s var(--ease) both; }
.msg p { color: var(--text); font-size: 15px; line-height: 1.6; }
.msg-user { align-self: flex-end; max-width: 78%; padding: 11px 16px; border-radius: 18px; background: var(--raised-2); }
.msg-assistant ul { margin: 8px 0 0; padding-left: 18px; }
.msg-assistant li { margin: 3px 0; padding-left: 2px; font-size: 14.5px; }
.msg-assistant li::marker { color: var(--subtle); }
.msg-assistant .msg-foot { margin-top: 10px; color: var(--muted); font-size: 14px; }
.tool { display: flex; align-items: center; gap: 12px; flex: none; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); font-size: 13.5px; animation: msg-in .3s var(--ease) both; }
.tool-mark { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--bg); border: 1px solid var(--border-soft); }
.tool-mark svg { width: 14px; height: 14px; }
.tool-name { flex: none; color: var(--text); font-weight: 500; }
.tool-args { flex: 1; min-width: 0; color: var(--subtle); font: 12.5px/1.4 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-state { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--muted); font-size: 12.5px; }
.tool-state::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--muted); border-right-color: transparent; animation: spin .8s linear infinite; }
.tool.is-done .tool-state { color: var(--success); }
.tool.is-done .tool-state::before { width: 7px; height: 7px; border: 0; background: var(--success); animation: none; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.composer { display: flex; align-items: center; justify-content: space-between; margin: 0 max(16px, calc((100% - 780px) / 2)) 18px; padding: 12px 12px 12px 18px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--panel); }
.composer-text { color: var(--subtle); font-size: 14px; }
.composer-actions { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); }
.composer-send { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(244, 239, 230, .08); color: var(--subtle); }
.composer-send svg { width: 15px; height: 15px; }
.demo-caption { margin-top: 12px; color: var(--subtle); font-size: 12.5px; text-align: center; }

/* Sections */
.section { padding-top: 104px; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { font: clamp(28px, 3.4vw, 38px)/1.12 var(--display); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.section-head-split { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; max-width: none; }
.section-head-split > div { max-width: 600px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.step { position: relative; padding: 28px 28px 30px; }
.step + .step { border-left: 1px solid var(--border-soft); }
.step-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--text); }
.step-num { position: absolute; top: 30px; right: 28px; color: var(--subtle); font: 12px var(--mono); }
.step h3 { margin-top: 22px; font: 19px/1.3 var(--display); }
.step p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

.legend { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.legend .tag { min-width: 52px; justify-content: center; }
.tag-free { color: var(--success); border-color: rgba(147, 211, 171, .3); }
.tag-credit { color: var(--text); border-color: var(--border-strong); }
.tag-pro { color: var(--warn); border-color: rgba(230, 199, 135, .32); }

.command-group + .command-group { margin-top: 34px; }
.group-title { margin-bottom: 14px; color: var(--subtle); font: 500 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.command-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.command { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--panel); transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.command:hover { border-color: var(--border-strong); background: var(--raised); transform: translateY(-2px); }
.command-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.command-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.command-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--border); border-radius: 10px; background: var(--raised); color: var(--text); }
.command strong { font-size: 14.5px; font-weight: 600; }
code.command-name { display: block; margin-top: 3px; padding: 0; border: 0; background: none; color: var(--subtle); font-size: 12px; }
.command p { margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.note { max-width: 860px; margin-top: 26px; color: var(--muted); font-size: 14px; }

.setup { display: grid; grid-template-columns: 220px minmax(0, 1fr); border: 1px solid var(--border); border-radius: 18px; background: var(--panel); overflow: hidden; }
.setup-tabs { flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 14px; border-right: 1px solid var(--border-soft); }
.setup-tab { justify-content: flex-start; width: 100%; padding: 10px 12px; border-color: transparent; border-radius: 10px; font-size: 14px; }
.setup-tab:hover { border-color: transparent; background: rgba(244, 239, 230, .05); }
.setup-tab.is-active { color: var(--text); background: var(--raised-2); border-color: transparent; }
.setup-panels { min-height: 300px; padding: 30px 34px 34px; }
.setup-panel { animation: msg-in .3s var(--ease) both; }
.setup-panel[hidden] { display: none; }
.setup-panel > p:first-child { margin-bottom: 20px; color: var(--muted); }
.setup-list { margin: 0 0 18px; padding-left: 20px; }
.setup-list li { margin: 0 0 8px; padding-left: 4px; }
.setup-list li::marker { color: var(--subtle); font: 13px var(--mono); }
.setup-panel .field { max-width: 620px; margin-bottom: 20px; }
.code { max-width: 620px; margin: 0; padding: 16px 18px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg); color: var(--text); font: 13px/1.6 var(--mono); overflow-x: auto; }
.btn-copy-block { margin: 10px 0 20px; }
.setup-prompt { max-width: 100%; max-height: 340px; white-space: pre-wrap; overflow-wrap: anywhere; }
.setup-prompt::-webkit-scrollbar { width: 8px; height: 8px; }
.setup-prompt::-webkit-scrollbar-track, .setup-prompt::-webkit-scrollbar-corner { background: var(--bg); }
.setup-prompt::-webkit-scrollbar-thumb { border: 2px solid var(--bg); border-radius: 8px; background: var(--border-strong); }
.setup-prompt::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.setup-prompt::-webkit-scrollbar-button { display: none; }
@supports (-moz-appearance: none) { .setup-prompt { scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--bg); } }
.setup-manual { margin: 4px 0 20px; }
.setup-manual summary { width: fit-content; margin-bottom: 16px; color: var(--text); cursor: pointer; }
.setup-manual[open] summary { margin-bottom: 20px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fact { padding: 26px; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--panel); }
.fact h3 { font: 18px/1.3 var(--display); }
.fact p { margin-top: 10px; color: var(--muted); font-size: 14.5px; }


.panel { padding: 30px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.panel h2 { font: 24px/1.2 var(--display); }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.panel-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 32px; }
.panel-split p { margin-top: 10px; }
.panel-empty { padding: 8px 0 2px; color: var(--muted); }
.connection { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border-soft); transition: opacity .3s; }
.connection.is-leaving { opacity: .35; }
.app-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--text); font: 17px/1 var(--display); }
.connection-meta { flex: 1; min-width: 0; }
.connection-meta strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.connection-meta span { color: var(--muted); font-size: 13px; }
.since:not(:empty)::before { content: "\00B7"; margin: 0 6px; color: var(--subtle); }
.revoke-form { margin: 0; }

.auth-buttons { display: grid; gap: 10px; }
.btn-auth { width: 100%; min-height: 46px; border-radius: 12px; background: var(--raised); border-color: var(--border); font-size: 14.5px; }
.btn-auth:hover { background: var(--raised-2); }
.auth-logo { width: 18px; height: 18px; stroke: none; }
.auth-discord { fill: #8b95ff; }

.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* Footer */
.footer { margin-top: 110px; border-top: 1px solid var(--border-soft); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 26px; padding-bottom: 30px; color: var(--subtle); font-size: 13px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand svg { width: 15px; height: 15px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.is-compact .footer { margin-top: 0; }

/* Compact flow (OAuth popup) */
.compact { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; }
.card { width: 100%; max-width: 460px; padding: 32px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); animation: msg-in .4s var(--ease) both; }
.card h1 { overflow-wrap: anywhere; font: 25px/1.25 var(--display); overflow-wrap: anywhere; }
.card > .muted { margin-top: 10px; }
.card .auth-buttons { margin-top: 26px; }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--text); }
.card-icon svg { width: 20px; height: 20px; }
.card-icon-warn { color: var(--warn); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.card-actions-split { flex-direction: row; }
.card-actions-split .btn { flex: 1; min-height: 44px; }
.pair { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.pair-node { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); color: var(--text); font: 19px/1 var(--display); }
.pair-nova svg { width: 20px; height: 20px; }
.pair-line { position: relative; width: 40px; height: 1px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 4px, transparent 4px 8px); }
.pair-check { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--success); color: #0b1a10; transform: scale(0); transition: transform .35s var(--ease); }
.pair-check svg { width: 12px; height: 12px; stroke-width: 2.6; }
.card-consent.is-connected .pair-line { background: var(--success); }
.card-consent.is-connected .pair-check { transform: scale(1); }
.client-name { overflow-wrap: anywhere; }
.notice { display: flex; gap: 12px; margin-top: 22px; padding: 13px 14px; border: 1px solid rgba(230, 199, 135, .22); border-radius: 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.notice svg { width: 17px; height: 17px; margin-top: 1px; color: var(--warn); }
.details { margin: 20px 0 0; border-top: 1px solid var(--border-soft); }
.details div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.details dt { color: var(--subtle); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.consent-form { margin-top: 22px; }
.check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 14px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { display: grid; place-items: center; width: 18px; height: 18px; flex: none; margin-top: 2px; border: 1.5px solid var(--border-strong); border-radius: 5px; transition: background-color .15s, border-color .15s; }
.check-box svg { width: 12px; height: 12px; stroke-width: 3; color: var(--ink); opacity: 0; transition: opacity .15s; }
.check:hover .check-box { border-color: rgba(232, 226, 242, .45); }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box svg { opacity: 1; }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check.is-attention .check-box { border-color: var(--warn); }
.check.is-attention { animation: nudge .4s var(--ease); }
@keyframes nudge { 25%, 75% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }
.form-status { margin-top: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }
.fine { margin-top: 18px; color: var(--subtle); font-size: 13px; text-align: center; }

/* Dialog */
.dialog { width: min(420px, calc(100vw - 32px)); margin: auto; padding: 26px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--panel); color: var(--text); }
.dialog[open] { animation: msg-in .25s var(--ease) both; }
.dialog.is-closing { opacity: 0; transition: opacity .15s; }
.dialog::backdrop { background: rgba(4, 3, 8, .7); }
.dialog h2 { font: 21px/1.25 var(--display); overflow-wrap: anywhere; }
.dialog p { margin-top: 10px; font-size: 14.5px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* Responsive */
@media (max-width: 1080px) {
  .command-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .command-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head-split { flex-direction: column; align-items: flex-start; }
  .setup { grid-template-columns: 1fr; }
  .setup-tabs { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border-soft); }
  .setup-tab { width: auto; }
}
@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .hero { padding-top: 48px; padding-bottom: 40px; }
  .hero-lead { font-size: 16px; }
  .hero-connect { grid-template-columns: 1fr; }
  .hero-connect .btn-ghost { justify-self: start; }
  .link-quiet { display: none; }
  .steps, .facts { grid-template-columns: 1fr; }
  .step + .step { border-top: 1px solid var(--border-soft); border-left: 0; }
  .command-grid { grid-template-columns: 1fr; }
  .chat { height: 540px; padding: 20px 16px; }
  .msg-user { max-width: 92%; }
  .tool { flex-wrap: wrap; }
  .tool-args { flex-basis: 100%; order: 3; }
  .section { padding-top: 76px; }
  .setup-panels { padding: 22px 20px 24px; }
  .panel { padding: 22px; }
  .panel-split { grid-template-columns: 1fr; gap: 20px; }
  .connection { flex-wrap: wrap; }
  .revoke-form { width: 100%; padding-left: 54px; }
  .card { padding: 26px 22px; }
  .compact { padding: 20px 14px 32px; }
  .footer { margin-top: 80px; }
}

@media (max-width: 480px) {
  .field { flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; border-radius: 16px; }
  .field-input { padding: 6px 8px; }
  .field .btn { width: 100%; border-radius: 12px; }
  .command { padding: 14px 16px; }
  .command-top { margin-bottom: 10px; }
  .command-icon { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

.account-review { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; text-align: left; }
.account-review-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.account-review-heading .field-label { margin: 0; }
.account-review-heading a, .managed-account a { font-size: 13px; color: var(--muted); }
.account-label { display: block; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.account-plan { margin-top: 3px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.account-allowance { margin-top: 12px; font-size: 13px; color: var(--muted); }
.managed-account { margin: 0 0 20px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.managed-account a { display: inline-block; margin-left: 10px; }
@media (max-width: 480px) {
  .details div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .account-review { padding: 16px; }
  .account-review-heading { flex-wrap: wrap; gap: 6px 12px; }
}
