:root {
  color-scheme: dark;
  --bg: #080a0d;
  --panel: #101318;
  --panel-2: #151a20;
  --line: #252b33;
  --muted: #8d98a6;
  --text: #f5f7f8;
  --acid: #c8ff4a;
  --acid-2: #a5dc2f;
  --danger: #ff6f73;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.nav, .app-nav { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--acid); color: #0c0f09; font-weight: 900; transform: rotate(-6deg); }
.button { appearance: none; border: 1px solid var(--acid); border-radius: 13px; padding: 12px 18px; background: var(--acid); color: #101409; font-weight: 760; cursor: pointer; transition: .18s ease; }
.button:hover { background: #d6ff78; transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: wait; transform: none; }
.button-small { padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button-danger { background: transparent; color: var(--danger); border-color: #4e2a2d; }
.hero { padding: 96px 0 76px; }
.eyebrow, .section-kicker { color: var(--acid); font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 800; }
.eyebrow { display: inline-flex; gap: 9px; align-items: center; padding: 8px 11px; background: #141a13; border: 1px solid #27351e; border-radius: 999px; }
.eyebrow.plain { padding: 0; border: 0; background: none; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 14px var(--acid); }
.hero h1 { margin: 29px 0 22px; font-size: clamp(45px, 7vw, 88px); line-height: .97; letter-spacing: -.065em; max-width: 1080px; }
.hero h1 span { color: var(--muted); }
.hero-copy { max-width: 700px; color: #b8c0ca; font-size: clamp(18px, 2vw, 23px); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 38px; }
.text-link { color: #bbc4ce; border-bottom: 1px solid #3a424c; padding-block: 5px; }
.agent-strip { margin-top: 92px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; display: flex; flex-wrap: wrap; gap: 17px; align-items: center; color: #737e8a; font-size: 13px; font-weight: 650; }
.agent-strip i { width: 3px; height: 3px; border-radius: 50%; background: #47515d; }
.how { padding: 90px 0 120px; }
.section-heading > span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; }
.section-heading h2, .boundary h2 { margin: 18px 0 45px; font-size: clamp(32px, 4.2vw, 55px); line-height: 1.05; letter-spacing: -.045em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step-card { min-height: 280px; padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; }
.step-card.featured { background: var(--acid); color: #101409; border-color: var(--acid); transform: translateY(-13px); }
.step-card b { color: var(--muted); font-size: 13px; }
.step-card.featured b { color: #4b5f1d; }
.step-card h3 { margin: auto 0 12px; font-size: 25px; letter-spacing: -.03em; }
.step-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.step-card.featured p { color: #3d4c1d; }
.boundary { padding: 64px; margin-bottom: 100px; border: 1px solid var(--line); border-radius: 30px; background: radial-gradient(circle at 80% 0, #1a2513, transparent 38%), var(--panel); }
.boundary-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 18px; }
.boundary-flow div { background: #0b0e12; border: 1px solid var(--line); border-radius: 15px; padding: 19px; }
.boundary-flow small { color: var(--acid); display: block; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .12em; }
.boundary-flow span { color: #65717e; }
.footer { border-top: 1px solid var(--line); padding: 28px 0 45px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

.app-body { background: #090b0e; }
.app-nav { padding: 0 max(24px, calc((100vw - 1260px) / 2)); border-bottom: 1px solid var(--line); background: rgba(8, 10, 13, .88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.identity { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); }
.app-shell { width: min(1260px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0 100px; }
.welcome { display: flex; align-items: end; justify-content: space-between; gap: 25px; }
.welcome h1 { margin: 12px 0 0; font-size: clamp(40px, 5vw, 66px); line-height: 1; letter-spacing: -.055em; }
.connect-panel { margin-top: 52px; padding: 30px; border: 1px solid #30401f; border-radius: 24px; background: radial-gradient(circle at 90% -30%, #293b18, transparent 42%), #111610; }
.connect-copy { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: end; }
.connect-copy .section-kicker { grid-column: 1 / -1; }
.connect-copy h2 { margin: 0; font-size: 31px; letter-spacing: -.035em; }
.connect-copy p { margin: 0; color: #aab3a3; line-height: 1.55; }
.mcp-address { margin-top: 26px; background: #090d08; border: 1px solid #314221; border-radius: 13px; padding: 8px 8px 8px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mcp-address code { color: #d8e7cc; overflow: auto; }
.copy-button, .agent-chips button, .icon-button { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; cursor: pointer; }
.copy-button { border-color: #3a4f26; color: var(--acid); }
.agent-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.agent-chips button.active { background: var(--acid); color: #101409; border-color: var(--acid); }
.instruction { margin: 12px 0 0; min-height: 48px; padding: 13px 15px; white-space: pre-wrap; color: #9aa592; background: #0b0e0b; border-radius: 10px; overflow: auto; font-size: 12px; }
.connect-action { display: inline-flex; margin-top: 12px; }
.connect-action[hidden] { display: none; }
.vault-section { margin-top: 68px; }
.section-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-row h2 { margin: 8px 0 0; font-size: 31px; letter-spacing: -.035em; }
.section-row.compact { align-items: center; }
.section-row.compact h2 { margin: 0; font-size: 19px; }
.count, .muted { color: var(--muted); }
.empty-state { text-align: center; padding: 70px 24px; margin-top: 20px; border: 1px dashed #303740; border-radius: var(--radius); color: var(--muted); }
.empty-state[hidden] { display: none; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 17px; border-radius: 15px; background: var(--panel-2); color: var(--acid); font-size: 25px; }
.empty-state h3 { color: var(--text); margin: 0 0 8px; }
.empty-state p { margin: 0; }
.account-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.account-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.account-top { display: flex; gap: 13px; align-items: center; }
.account-avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: #20282d; color: var(--acid); font-weight: 850; }
.account-top h3 { margin: 0 0 4px; font-size: 17px; }
.account-top p { margin: 0; font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.account-meta span { display: flex; flex-direction: column; gap: 5px; color: #c5cbd2; font-size: 13px; }
.account-meta small { color: #65717e; font-size: 9px; letter-spacing: .13em; }
.account-actions { display: flex; gap: 8px; }
.activity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 42px; }
.activity-card { padding: 22px; min-height: 240px; border: 1px solid var(--line); background: var(--panel); border-radius: 18px; }
.live-badge { padding: 4px 7px; border-radius: 99px; background: #172014; color: var(--acid); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.list { margin-top: 18px; }
.list-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid #20262d; }
.list-row div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.list-row .session-trailing { align-items: end; flex: 0 0 auto; }
.list-row strong { font-size: 13px; font-weight: 650; text-transform: capitalize; }
.list-row small, .list-row time { color: var(--muted); font-size: 11px; }
dialog { width: min(540px, calc(100% - 28px)); padding: 0; border: 1px solid #333b44; border-radius: 22px; color: var(--text); background: #111419; box-shadow: 0 40px 100px #000b; }
dialog::backdrop { background: #030405c9; backdrop-filter: blur(7px); }
dialog form { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; }
.dialog-head h2 { margin: 8px 0 0; font-size: 27px; }
.icon-button { font-size: 22px; line-height: 1; }
.dialog-note { padding: 12px; border: 1px solid #2b3821; border-radius: 10px; background: #141a12; color: #aab6a3; font-size: 12px; line-height: 1.45; }
label { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; color: #c6cdd5; font-size: 12px; font-weight: 650; }
input { width: 100%; padding: 12px 13px; border: 1px solid #303740; border-radius: 10px; background: #0b0e12; color: var(--text); outline: none; }
input:focus { border-color: var(--acid-2); box-shadow: 0 0 0 3px #c8ff4a12; }
.form-error { min-height: 19px; margin-top: 10px; color: var(--danger); font-size: 12px; }
.dialog-actions { display: flex; justify-content: end; gap: 9px; margin-top: 14px; }
.setup-steps { margin: 16px 0; padding-left: 22px; color: #c6cdd5; font-size: 13px; line-height: 1.55; }
.setup-steps li + li { margin-top: 7px; }
.setup-link { display: flex; justify-content: center; text-align: center; }
.setup-link[aria-disabled="true"] { opacity: .5; pointer-events: none; cursor: wait; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; max-width: 390px; padding: 13px 16px; background: #172014; color: #dfffb0; border: 1px solid #3a5123; border-radius: 11px; transform: translateY(30px); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast[data-kind="error"] { color: #ffd0d2; background: #251416; border-color: #573035; }
.toast[data-kind="challenge"] { color: #fff0b8; background: #241e10; border-color: #5b4920; }

@media (max-width: 850px) {
  .steps, .account-grid, .activity-grid { grid-template-columns: 1fr; }
  .step-card.featured { transform: none; }
  .boundary { padding: 35px 24px; }
  .boundary-flow { grid-template-columns: 1fr; }
  .boundary-flow > span { transform: rotate(90deg); text-align: center; }
  .connect-copy { grid-template-columns: 1fr; }
  .connect-copy .section-kicker { grid-column: auto; }
}

@media (max-width: 560px) {
  .shell, .app-shell { width: min(100% - 24px, 1260px); }
  .hero { padding-top: 60px; }
  .hero-actions, .welcome, .footer { align-items: stretch; flex-direction: column; }
  .agent-strip { margin-top: 60px; }
  .app-nav { padding-inline: 14px; }
  .identity { max-width: 150px; overflow: hidden; }
  .connect-panel { padding: 20px; }
  .mcp-address { align-items: stretch; flex-direction: column; }
  .copy-button { align-self: end; }
  .account-meta { grid-template-columns: 1fr; }
}
