:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #f1f5f3;
  --surface-strong: #e8f0ec;
  --line: #d9e2de;
  --line-strong: #bdcbc5;
  --text: #18211d;
  --text-strong: #0d1713;
  --muted: #64716b;
  --brand: #087052;
  --brand-hover: #065c43;
  --brand-soft: #e8f5ef;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --warning: #9a6700;
  --shadow-sm: 0 1px 2px rgba(15, 35, 27, .05), 0 8px 24px rgba(15, 35, 27, .04);
  --shadow-md: 0 18px 48px rgba(15, 35, 27, .09);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: #cce9dc; color: var(--text-strong); }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 3px solid rgba(8, 112, 82, .25);
  outline-offset: 2px;
}

.shell { display: flex; min-height: 100vh; flex-direction: column; }
.site-header, .topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(217, 226, 222, .9); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.topbar-inner { width: min(1180px, 100%); min-height: 72px; margin: auto; padding: 0 28px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text-strong); font-size: 1rem; font-weight: 780; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark, .brand-dot { display: inline-grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 850; box-shadow: 0 1px 2px rgba(8, 112, 82, .25); }
.brand-dot { width: 13px; height: 13px; flex-basis: 13px; border-radius: 4px; }
.preview-badge { padding: 3px 7px; border: 1px solid #c7d8d0; border-radius: 999px; background: var(--surface-soft); color: #5b6a63; font-size: .65rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a, .nav button { min-height: 44px; display: inline-flex; align-items: center; border: 0; border-radius: 9px; background: transparent; color: #52615a; padding: 10px 13px; font-weight: 620; cursor: pointer; }
.nav a:hover, .nav button:hover, .nav a.active { background: var(--surface-soft); color: var(--text-strong); text-decoration: none; }
.nav a.active { box-shadow: inset 0 -2px var(--brand); }
.nav a.nav-cta { margin-left: 3px; background: var(--brand); color: #fff; }
.nav a.nav-cta:hover, .nav a.nav-cta.active { background: var(--brand-hover); color: #fff; }
.button.menu-button { display: none; width: auto; margin: 0 0 0 auto; }

.main { width: min(1180px, 100%); flex: 1; margin: 0 auto; padding: 54px 28px 88px; }
.page { display: none; min-width: 0; }
.page.active { display: block; animation: page-enter .18s ease-out; }
@keyframes page-enter { from { opacity: 0; transform: translateY(4px); } }
.page-shell { gap: 28px; }
.page.page-shell.active { display: grid; }
.page-shell > :is(.page-header, .section-head) { margin-bottom: 0; }
.page-header, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.page-header-copy { max-width: 720px; }
.page-header :is(h1, h2, p), .section-head :is(h1, h2, p) { margin-bottom: 0; }
.page-header h1 { font-size: clamp(2.35rem, 5vw, 4rem); }
.page-actions { flex: 0 0 auto; }

.eyebrow, .hero-kicker { margin: 0 0 10px; color: var(--brand); font-size: .76rem; line-height: 1.35; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { color: var(--text-strong); text-wrap: balance; }
h1 { margin: 0 0 20px; font-size: clamp(2.65rem, 6vw, 5rem); line-height: .98; letter-spacing: -.058em; }
h2 { margin: 0 0 10px; font-size: clamp(1.85rem, 3vw, 2.7rem); line-height: 1.08; letter-spacing: -.04em; }
h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.35; letter-spacing: -.015em; }
p { margin: 0 0 16px; color: var(--muted); line-height: 1.68; }
.lede { max-width: 670px; color: #4f5f58; font-size: 1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.fine { font-size: .78rem; }

.landing-page { padding-top: 0; }
.hero { padding: 32px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: clamp(44px, 7vw, 88px); align-items: center; }
.hero-copy { max-width: 680px; }
.hero-title { max-width: 760px; font-size: clamp(2.8rem, 4.4vw, 4.25rem); line-height: 1.07; }
.hero-copy > p { max-width: 620px; font-size: clamp(1.03rem, 1.8vw, 1.18rem); }
.hero-actions, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-note { margin-top: 18px; color: #718079; font-size: .84rem; }
.hero-copy > .hero-note { color: var(--muted); font-size: .84rem; }
.hero-code { min-width: 0; }
.code-window { overflow: hidden; border: 1px solid #263e35; border-radius: var(--radius-lg); background: #10211a; box-shadow: var(--shadow-md); }
.code-window-head { min-height: 48px; padding: 0 18px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid #294238; color: #aebdb7; font-size: .78rem; }
.code-dot { width: 8px; height: 8px; border-radius: 50%; background: #6f857c; }
.code-caption { margin-left: 8px; }
.code-window pre { margin: 0; min-height: 220px; border: 0; border-radius: 0; padding: 24px; background: transparent; color: #dcebe5; box-shadow: none; white-space: pre-wrap; overflow-wrap: anywhere; }

.section-block { padding: clamp(54px, 8vw, 88px) 0; border-top: 1px solid var(--line); }
.section-intro { max-width: 680px; margin-bottom: 30px; }
.section-intro p { max-width: 620px; }
.step-grid, .feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step-card, .feature-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.step-number { width: 34px; height: 34px; margin-bottom: 22px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: .82rem; font-weight: 800; }
.step-card p, .feature-card p { margin-bottom: 0; }
.faq-list { max-width: 820px; display: grid; gap: 10px; }
.faq-list details { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.faq-list summary { min-height: 54px; padding: 15px 18px; display: flex; align-items: center; }
.faq-list details > :not(summary) { margin: 0; padding: 0 18px 18px; }
.final-cta { padding: clamp(34px, 6vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 32px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.final-cta :is(h2, p) { max-width: 700px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.divider { height: 1px; margin: 30px 0; background: var(--line); }
.card, .section-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.card > :last-child, .section-card > :last-child { margin-bottom: 0; }

.button { appearance: none; min-height: 44px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text-strong); font-weight: 720; line-height: 1.2; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
.button:hover { border-color: #91a49b; background: var(--surface-soft); text-decoration: none; }
.button:active { transform: translateY(1px); }
.button.primary { min-height: 46px; border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(8, 112, 82, .2); }
.button.primary:hover { border-color: var(--brand-hover); background: var(--brand-hover); }
.button.danger { border-color: #efc5c1; background: var(--danger-soft); color: var(--danger); }
.button.small { min-height: 40px; padding: 8px 12px; font-size: .82rem; }
.button.small.primary { min-height: 44px; }
.button:disabled { opacity: .52; cursor: wait; transform: none; }

.field { min-width: 0; display: grid; gap: 7px; }
.field label, .label { color: #33413b; font-size: .8rem; font-weight: 750; }
input, textarea, select { width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: var(--surface); color: var(--text); padding: 10px 12px; transition: border-color .15s ease, box-shadow .15s ease; }
input::placeholder, textarea::placeholder { color: #89958f; }
input:hover, textarea:hover, select:hover { border-color: #9aada4; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(8, 112, 82, .12); }
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.55; }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--brand); }
input[type="file"] { padding: 9px; color: var(--muted); }
.form { display: grid; gap: 16px; }
.form > .button:last-of-type { width: 100%; }
.hint { margin: 0; color: #718079; font-size: .78rem; line-height: 1.55; }
.notice { min-height: 1.25em; margin: 10px 0 0; color: var(--muted); font-size: .84rem; }
.notice.error { color: var(--danger); }
.notice.success { color: var(--brand); }

.auth-layout { min-height: min(680px, calc(100vh - 214px)); display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, .7fr); gap: clamp(44px, 8vw, 100px); align-items: center; }
.auth-intro { max-width: 580px; }
.auth-intro h1 { font-size: clamp(2.5rem, 5vw, 4.3rem); }
.auth-points { margin: 30px 0 0; padding: 0; display: grid; gap: 12px; list-style: none; }
.auth-points li { position: relative; padding-left: 26px; color: #47564f; }
.auth-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 800; }
.auth-card, .auth-form-card { width: 100%; max-width: 510px; margin-left: auto; padding: clamp(24px, 4vw, 38px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.auth-layout-register { align-items: start; }
.auth-layout-register .auth-intro { position: sticky; top: 112px; padding-top: 30px; }
.auth-wrap { max-width: 540px; margin: 18px auto 0; }
.auth-card > .small:last-child, .auth-form-card > .small:last-child { margin: 20px 0 0; text-align: center; }

.account-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.summary-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary-value { display: block; color: var(--text-strong); font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 780; letter-spacing: -.035em; }
.summary-label { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.add-account-card { padding: clamp(22px, 4vw, 30px); display: grid; grid-template-columns: minmax(220px, .62fr) minmax(320px, 1fr); gap: 32px; align-items: end; }
.add-account-copy p { margin: 0; }
#accounts-notice:empty { display: none; }
.add-account-form { display: flex; align-items: end; gap: 10px; }
.add-account-form .field { flex: 1 1 260px; }
.account-list { display: grid; gap: 14px; }
.account-card { padding: clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.account-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.account-identity { min-width: 0; }
.account-email { color: var(--text-strong); font-size: 1.02rem; font-weight: 780; overflow-wrap: anywhere; }
.account-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: .79rem; }
.account-state { flex: 0 0 auto; }
.account-primary-actions, .account-actions { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.account-manage { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.status { min-height: 28px; padding: 5px 9px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: #52615a; font-size: .72rem; font-weight: 780; text-transform: capitalize; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.status.connected { border-color: #b8ddcc; background: var(--brand-soft); color: var(--brand-hover); }
.status.connected::before { background: var(--brand); }
.otp-box, .key-box { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.key-value, pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.key-value { display: block; margin: 8px 0; color: var(--brand-hover); overflow-wrap: anywhere; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-card { min-width: 0; padding: clamp(22px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.settings-card-head p { margin: 0; }
.settings-security { border-top: 3px solid #9dcfbb; }
.settings-vpn { border-top: 3px solid #9fb9ad; }
.advanced-card { margin-top: 18px; }
.advanced-card details, details.advanced-card { border: 0; padding: 0; }
details { border-top: 1px solid var(--line); padding-top: 18px; }
summary { min-height: 44px; color: #33413b; font-weight: 730; cursor: pointer; }
.danger-zone { border-color: #edc8c4; background: #fffafa; }

pre { max-width: 100%; margin: 12px 0 0; padding: 16px; overflow: auto; border: 1px solid #263e35; border-radius: 11px; background: #10211a; color: #dcebe5; font-size: .78rem; line-height: 1.58; white-space: pre; }
:not(pre) > code { padding: .14em .38em; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); color: #244138; font-size: .88em; overflow-wrap: anywhere; }
.api-docs-toc { position: sticky; top: 81px; z-index: 10; margin: 0 0 22px; padding: 10px; display: flex; gap: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); scrollbar-width: thin; }
.api-docs-toc a { min-height: 38px; padding: 8px 10px; display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 8px; color: #52615a; font-size: .78rem; font-weight: 670; white-space: nowrap; }
.api-docs-toc a:hover { background: var(--surface-soft); color: var(--brand-hover); text-decoration: none; }
.page[data-route="/api-docs"] article[id] { scroll-margin-top: 142px; }
.page[data-route="/api-docs"] .stack { gap: 18px; }
.page[data-route="/api-docs"] article.card { padding: clamp(22px, 4vw, 34px); }
.page[data-route="/api-docs"] article.card > h3 { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 1.2rem; }
.page[data-route="/api-docs"] ol, .page[data-route="/api-docs"] ul { padding-left: 22px; color: #47564f; }
.page[data-route="/api-docs"] li { margin: 7px 0; }
.api-reference { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.api-reference table { width: 100%; min-width: 650px; border-collapse: collapse; background: var(--surface); }
.api-reference th, .api-reference td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.api-reference tr:last-child td { border-bottom: 0; }
.api-reference th { background: var(--surface-soft); color: #33413b; font-size: .76rem; letter-spacing: .02em; }
.api-reference td { color: #52615a; font-size: .86rem; }
.api-example { margin-top: 14px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.api-example summary { padding: 11px 14px; }
.api-example .button { margin: 0 14px 4px; }
.api-example pre { margin: 10px 14px 14px; }
.response-toolbar { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.empty { padding: 38px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, .55); color: var(--muted); text-align: center; }
.empty strong { display: block; margin-bottom: 5px; color: var(--text-strong); font-size: 1rem; }
.empty p { max-width: 520px; margin: 0 auto; }
.log { max-height: 250px; margin-top: 12px; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #f2f5f3; color: #596861; font: .74rem/1.6 ui-monospace, monospace; white-space: pre-wrap; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(380px, calc(100vw - 32px)); padding: 13px 16px; border: 1px solid #a8cdbd; border-radius: 11px; background: #f1faf6; color: #174a38; box-shadow: var(--shadow-md); }
.toast.error { border-color: #e5b7b2; background: var(--danger-soft); color: var(--danger); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { width: min(1180px, 100%); min-height: 84px; margin: auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .82rem; }
.footer-inner p { margin: 0; font-size: inherit; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: #52615a; }

.portal-sidebar, .workspace-topbar { display: none; }
.portal-shell { padding-left: 248px; }
.portal-shell > .site-header, .portal-shell > .site-footer { display: none; }
.portal-shell .portal-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 248px; padding: 27px 18px 16px; display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar-brand-row { min-height: 32px; margin: 0 8px 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-label { margin: 0 12px 12px; color: #88938d; font-size: .65rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav a { min-height: 46px; padding: 11px 13px; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 9px; color: #596760; font-size: .88rem; font-weight: 650; }
.sidebar-nav svg { width: 20px; height: 20px; flex: 0 0 20px; }
.sidebar-nav a:hover { background: var(--surface-soft); color: var(--text-strong); text-decoration: none; }
.sidebar-nav a.active { border-color: #d1e8dd; background: var(--brand-soft); color: var(--brand-hover); }
.sidebar-nav a.active::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--brand); }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.sidebar-guide { margin: 0 3px 24px; padding: 16px; border: 1px solid #e0e9e4; border-radius: 11px; background: #f7faf8; }
.sidebar-guide strong { font-size: .8rem; }
.sidebar-guide p { margin: 6px 0 12px; font-size: .75rem; line-height: 1.6; }
.sidebar-guide a { display: flex; align-items: center; justify-content: space-between; font-size: .76rem; font-weight: 720; }
.sidebar-profile { min-height: 64px; padding: 13px 8px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); color: var(--text); }
.sidebar-profile:hover { text-decoration: none; }
.profile-avatar { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border: 1px solid #d7e2dc; border-radius: 50%; background: var(--surface-soft); color: var(--brand-hover); font-size: .73rem; font-weight: 750; }
.profile-copy { min-width: 0; display: grid; gap: 2px; }
.profile-copy strong, .profile-copy > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.profile-copy strong { font-size: .78rem; }
.profile-copy > span { color: var(--muted); font-size: .69rem; }
.sidebar-signout { width: 100%; min-height: 44px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .77rem; font-weight: 600; cursor: pointer; }
.sidebar-signout:hover { background: var(--surface-soft); color: var(--text-strong); }
.portal-shell .workspace-topbar { position: sticky; top: 0; z-index: 25; min-height: 68px; padding: 0 38px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.workspace-breadcrumb { display: flex; align-items: center; gap: 14px; font-size: .78rem; }
.workspace-breadcrumb > span { color: #849089; }
.workspace-breadcrumb strong { color: #45534b; font-weight: 650; }
.workspace-topbar > .preview-badge { margin-left: auto; }
.sidebar-toggle, .sidebar-close { display: none; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.sidebar-toggle svg { width: 21px; height: 21px; }
.sidebar-close { font-size: 1.55rem; line-height: 1; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 45; width: 100%; border: 0; background: rgba(16, 33, 26, .35); cursor: pointer; }
.portal-shell .main { width: min(1280px, 100%); padding: 38px 38px 64px; }
.portal-shell .page-shell { gap: 24px; }
.portal-shell .page-header, .portal-shell .section-head { gap: 24px; }
.portal-shell .page-header h1, .portal-shell .section-head h2 { margin-bottom: 10px; font-size: 2rem; line-height: 1.15; letter-spacing: -.04em; }
.portal-shell .eyebrow { margin-bottom: 10px; font-size: .65rem; letter-spacing: .1em; }
.portal-shell .page-header p, .portal-shell .section-head p { max-width: 700px; font-size: .88rem; }
.portal-shell .summary-card { padding: 22px 24px; border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 35, 27, .025); }
.portal-shell .summary-value { font-size: 1.8rem; }
.portal-shell .summary-label { font-size: .75rem; font-weight: 500; }
.portal-shell .add-account-card { grid-template-columns: minmax(220px, .8fr) minmax(320px, 1fr); align-items: center; padding: 26px; }
.portal-shell .add-account-copy h2 { font-size: 1.18rem; line-height: 1.35; letter-spacing: -.02em; }
.portal-shell .add-account-copy p { max-width: 430px; font-size: .82rem; }
.portal-shell .account-card { padding: 24px 26px; }
.portal-shell .account-email { font-size: .93rem; }
.portal-shell .settings-card { padding: 24px; }
.portal-shell .settings-card-head h2 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
.portal-shell .settings-card-head p { font-size: .8rem; }
.portal-shell .settings-security, .portal-shell .settings-vpn { border-top: 1px solid var(--line); }
.portal-shell .api-docs-toc { top: 80px; margin-bottom: 0; }

@media (min-width: 961px) and (max-width: 1200px) {
  .portal-shell { padding-left: 228px; }
  .portal-shell .portal-sidebar { width: 228px; padding-inline: 14px; }
  .portal-shell .main { padding-inline: 28px; }
  .portal-shell .workspace-topbar { padding-inline: 28px; }
  .portal-shell .add-account-card, .portal-shell .settings-grid { grid-template-columns: 1fr; }
  .portal-shell .add-account-card { gap: 20px; }
}

@media (max-width: 960px) {
  .portal-shell { padding-left: 0; }
  .portal-shell .portal-sidebar { width: 272px; max-width: calc(100vw - 48px); visibility: hidden; transform: translateX(-100%); transition: transform .18s ease, visibility .18s; }
  .portal-shell.sidebar-open .portal-sidebar { visibility: visible; transform: translateX(0); }
  .portal-shell.sidebar-open { height: 100dvh; overflow: hidden; }
  .portal-shell .workspace-topbar { min-height: 64px; padding-inline: 20px; gap: 12px; }
  .sidebar-toggle, .sidebar-close { display: inline-flex; }
  .sidebar-brand-row { margin-inline: 4px; margin-bottom: 32px; }
  .portal-shell .main { padding: 30px 24px 54px; }
  .portal-shell .add-account-card { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  .hero-grid, .auth-layout { grid-template-columns: 1fr; }
  .hero-copy, .auth-intro { max-width: 720px; }
  .hero-code { max-width: 700px; }
  .auth-layout { min-height: 0; gap: 36px; }
  .auth-layout-register .auth-intro { position: static; padding-top: 0; }
  .auth-card, .auth-form-card { max-width: 680px; margin: 0; }
  .step-grid, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .add-account-card { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 720px) {
  .auth-points { display: none; }
  .settings-card-head { flex-direction: column; gap: 8px; }
  .topbar-inner { min-height: 64px; padding: 0 18px; flex-wrap: wrap; gap: 12px; }
  .button.menu-button { display: inline-flex; min-height: 44px; }
  .nav { display: none; order: 3; width: 100%; margin: -2px 0 12px; padding: 6px; align-items: stretch; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
  .nav.open { display: flex; }
  .nav a, .nav button { width: 100%; justify-content: flex-start; text-align: left; }
  .nav a.active { box-shadow: inset 3px 0 var(--brand); }
  .main { padding: 36px 18px 64px; }
  .page-header, .section-head, .final-cta { align-items: flex-start; flex-direction: column; gap: 18px; }
  .page-actions { width: 100%; }
  .page-actions .button { width: 100%; }
  .hero { padding-top: 42px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 38px; }
  .hero-actions .button { flex: 1 1 180px; }
  .step-grid, .feature-grid, .grid, .grid.two, .settings-grid { grid-template-columns: 1fr; }
  .account-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-card-head { flex-direction: column; gap: 12px; }
  .account-state { align-self: flex-start; }
  .add-account-form { align-items: stretch; flex-direction: column; }
  .add-account-form .button { width: 100%; }
  .footer-inner { padding-inline: 18px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .api-docs-toc { top: 72px; margin-inline: -4px; }
  .api-reference { margin-inline: -4px; }
  .api-reference table { min-width: 560px; }
  .portal-shell .main { padding: 28px 18px 48px; }
  .portal-shell .page-header h1, .portal-shell .section-head h2 { font-size: 1.8rem; }
  .portal-shell .page-actions { width: auto; }
  .portal-shell .page-shell { gap: 20px; }
  .portal-shell .workspace-topbar { padding-inline: 14px; }
  .workspace-breadcrumb { gap: 9px; }
  .portal-shell .api-docs-toc { top: 72px; }
}

@media (max-width: 460px) {
  .topbar-inner, .main, .footer-inner { padding-inline: 15px; }
  .main { padding-top: 30px; }
  h1 { font-size: clamp(2.25rem, 13vw, 3.15rem); }
  h2 { font-size: 1.75rem; }
  .hero { padding-block: 34px 54px; }
  .section-block { padding-block: 46px; }
  .card, .section-card, .account-card, .settings-card, .auth-card, .auth-form-card { padding: 20px; }
  .account-summary { grid-template-columns: 1fr; }
  .summary-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .summary-label { margin: 0; text-align: right; }
  .account-primary-actions .button, .account-actions .button { flex: 1 1 140px; min-height: 44px; }
  .code-window pre { min-height: 0; padding: 18px; font-size: .72rem; }
  .toast { right: 16px; bottom: 16px; }
  .portal-shell .main { padding-inline: 16px; }
  .portal-shell .card, .portal-shell .account-card, .portal-shell .settings-card { padding: 20px; }
  .portal-shell .summary-card { padding: 17px 20px; }
  .portal-shell .summary-value { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
