:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f7f7f5;
  font-synthesis: none;
  --line: rgba(23, 23, 23, .12);
  --muted: #6b6b67;
  --surface: #fff;
  --accent: #171717;
  --danger: #9b2c2c;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding-bottom: 80px; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #171717; color: #fff; font-size: 10px; letter-spacing: -.03em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.account-email, .hint, .fine-print { color: var(--muted); font-size: 13px; }
.auth-view { max-width: 700px; padding: 112px 0; }
.auth-view h1, .hero-row h1, .pairing-banner h1 { margin: 8px 0 16px; letter-spacing: -.045em; line-height: 1.02; }
.auth-view h1 { font-size: clamp(42px, 7vw, 72px); }
.auth-view p { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 640px; }
.auth-view .fine-print { margin-top: 24px; font-size: 13px; }
.auth-options { display: grid; gap: 10px; width: min(100%, 360px); margin-top: 24px; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hero-row { padding: 72px 0 40px; display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.hero-row h1 { font-size: clamp(32px, 5vw, 54px); max-width: 720px; }
.hero-row p, .section-heading p, .pairing-banner p { margin: 0; color: var(--muted); line-height: 1.5; }
.button, .ghost, .text-button, .icon-button, .tab { border: 0; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 10px; padding: 0 16px; text-decoration: none; font-weight: 650; }
.button.primary { background: var(--accent); color: #fff; }
.button.secondary { background: #ececea; color: #171717; }
.button.ghost, .ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
.button.large { min-height: 50px; padding-inline: 20px; }
.button.compact { min-height: 34px; padding-inline: 12px; font-size: 13px; }
button:disabled { opacity: .48; cursor: not-allowed; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: transparent; color: var(--muted); padding: 14px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: inherit; border-bottom-color: currentColor; }
.tab-panel { padding-top: 32px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; margin-bottom: 40px; }
.metrics div { padding: 24px; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics span { display: block; font-size: 32px; font-weight: 700; letter-spacing: -.04em; }
.metrics small { color: var(--muted); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 12px; }
.section-heading h2 { margin: 0 0 4px; font-size: 18px; }
.rows { border-top: 1px solid var(--line); }
.row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding: 14px 4px; }
.row-primary { min-width: 0; display: flex; align-items: center; gap: 12px; }
.row-primary strong, .row-primary small { display: block; }
.row-primary strong { overflow-wrap: anywhere; }
.row-primary small, .row-meta small { margin-top: 4px; color: var(--muted); }
.row-meta { display: flex; align-items: center; gap: 12px; text-align: right; color: var(--muted); font-size: 13px; }
.presence { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #b8b8b3; }
.presence.online { background: #248246; box-shadow: 0 0 0 3px rgba(36,130,70,.12); }
.empty-state { padding: 40px 4px; color: var(--muted); border-top: 1px solid var(--line); }
.muted { opacity: .55; }
.text-button { padding: 4px 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.danger-text { color: var(--danger); }
.metric-grid-six { grid-template-columns: repeat(3, minmax(0,1fr)); }
.metric-grid-six div:nth-child(3) { border-right: 0; }
.metric-grid-six div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.setup-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow-wrap: anywhere; }
.setup-card h3 { margin: 8px 0 18px; }
.setup-card p { color: var(--muted); line-height: 1.55; }
.pairing-banner { margin-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; background: #fff5d7; border: 1px solid #e9dba8; border-radius: 16px; }
.pairing-banner h1 { font-size: 26px; }
.pairing-actions { display: flex; gap: 8px; flex: none; }
.approval-copy { margin: 10px 0 0; font-size: 14px; color: #3f3f3b; }
.approval-actions { display: flex; gap: 10px; align-items: center; }
dialog { width: min(560px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--surface); color: inherit; box-shadow: 0 24px 80px rgba(0,0,0,.18); }
dialog::backdrop { background: rgba(0,0,0,.28); backdrop-filter: blur(2px); }
.dialog-body { padding: 24px; display: grid; gap: 18px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.dialog-head h2 { margin: 4px 0 0; font-size: 24px; }
.icon-button { width: 34px; height: 34px; border-radius: 9px; background: #eee; font-size: 22px; }
label, legend { font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { margin-bottom: 6px; }
.preset { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.preset input { width: auto; margin: 2px 0 0; }
.preset strong, .preset small { display: block; }
.preset small { margin-top: 3px; color: var(--muted); font-weight: 400; line-height: 1.35; }
.danger-preset strong { color: var(--danger); }
.inline-choice { display: flex; align-items: center; gap: 8px; }
.inline-choice input { width: auto; margin: 0; }
.warning, .error { margin: 0; border-radius: 10px; padding: 11px 12px; font-size: 13px; }
.warning { background: #fff2e6; color: #7c3e08; }
.error { background: #fdecec; color: #8e2020; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.connection-hint { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.connection-hint code { color: inherit; overflow-wrap: anywhere; }
.secret-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.secret-box code { min-width: 0; overflow-wrap: anywhere; background: #f0f0ee; padding: 12px; border-radius: 10px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: #171717; color: #fff; border-radius: 10px; padding: 11px 14px; font-size: 13px; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

@media (max-width: 700px) {
  .shell { width: min(100% - 28px, 1120px); }
  .topbar { height: 64px; }
  .account-email { display: none; }
  .auth-view { padding: 72px 0; }
  .hero-row { padding-top: 48px; align-items: stretch; flex-direction: column; }
  .hero-row .button { align-self: flex-start; }
  .metrics { grid-template-columns: 1fr; }
  .metrics div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics div:last-child { border-bottom: 0; }
  .metric-grid-six div { border-right: 0; border-bottom: 1px solid var(--line); }
  .setup-grid { grid-template-columns: 1fr; }
  .section-heading, .row, .pairing-banner { align-items: stretch; flex-direction: column; }
  .row-meta { justify-content: space-between; text-align: left; }
  .pairing-actions { flex-wrap: wrap; }
  .task-row .row-meta { align-items: flex-start; }
}

@media (prefers-color-scheme: dark) {
  :root { color: #f3f3f1; background: #111210; --line: rgba(255,255,255,.13); --muted: #a2a29c; --surface: #171815; --accent: #f4f4f0; }
  .button.primary { color: #111; }
  .brand-mark { background: #f4f4f0; color: #111; }
  .button.secondary, .icon-button { background: #242520; color: #f3f3f1; }
  .pairing-banner { background: #2d2717; border-color: #554825; }
  .approval-copy { color: #d6d6cf; }
  .secret-box code { background: #22231f; }
  .warning { background: #322316; color: #f0b779; }
  .error { background: #341c1c; color: #f0aaaa; }
}
