:root {
  --bg: #080b11;
  --surface: #0e131c;
  --surface-2: #131a25;
  --surface-3: #18202d;
  --border: #1e2735;
  --border-soft: #171f2b;
  --text: #e7eef8;
  --muted: #8a9ab2;
  --dim: #5f6e85;
  --accent: #4c8dff;
  --accent-soft: rgba(76, 141, 255, 0.12);
  --green: #2fd39b;
  --green-soft: rgba(47, 211, 155, 0.12);
  --amber: #f5b544;
  --amber-soft: rgba(245, 181, 68, 0.12);
  --red: #f97070;
  --red-soft: rgba(249, 112, 112, 0.12);
  --purple: #a78bfa;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 12px 32px -18px rgba(0,0,0,0.9);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(76,141,255,0.10), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(167,139,250,0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; }

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

/* ---------------- sidebar ---------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(14,19,28,0.9), rgba(8,11,17,0.9));
  backdrop-filter: blur(8px);
  padding: 18px 12px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #4c8dff, #2f6be0);
  box-shadow: 0 6px 18px -6px rgba(76,141,255,0.8);
  color: #fff;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 13.5px; letter-spacing: -0.01em; }
.brand-text span { font-size: 11px; color: var(--dim); letter-spacing: 0.02em; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  padding: 14px 10px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: #cfe0ff; }
.nav-item.active svg { stroke: var(--accent); }

.sidebar-foot { border-top: 1px solid var(--border-soft); padding-top: 12px; display: grid; gap: 10px; }
.quota { padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-soft); }
.quota-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.quota-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.quota-bar { height: 4px; border-radius: 3px; background: #1a2231; overflow: hidden; }
.quota-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--amber)); transition: width .4s; }
.quota-sub { display: block; margin-top: 6px; font-size: 10px; color: var(--dim); }

.conn { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); padding: 4px 10px; }
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 3px rgba(95,110,133,0.15); }
.conn.ok .dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.conn.bad .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* ---------------- main ---------------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(8,11,17,0.82);
  backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; font-size: 19px; letter-spacing: -0.02em; font-weight: 650; }
.topbar p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.property-select { display: flex; align-items: center; gap: 8px; }
.property-select label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); font-weight: 600; }
select, input, textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
select { min-width: 210px; cursor: pointer; }
select:focus, input:focus, textarea:focus { border-color: rgba(76,141,255,0.6); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { width: 100%; resize: vertical; line-height: 1.6; font-family: var(--mono); font-size: 12.5px; }

.view { padding: 24px 28px 60px; max-width: 1400px; width: 100%; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: linear-gradient(180deg, #5595ff, #3c7cf0); border-color: #4c8dff; color: #fff; box-shadow: 0 8px 20px -12px rgba(76,141,255,0.9); }
.btn-primary:hover { background: linear-gradient(180deg, #64a0ff, #4685f5); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 8px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-danger { border-color: rgba(249,112,112,0.3); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

/* ---------------- cards & grid ---------------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span2 { grid-column: span 2; }

.card {
  background: linear-gradient(180deg, var(--surface), rgba(14,19,28,0.72));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 13.5px; font-weight: 620; letter-spacing: -0.01em; }
.card-head .sub { font-size: 11.5px; color: var(--dim); }
.card-tools { display: flex; gap: 8px; align-items: center; }

/* KPI */
.kpi { position: relative; overflow: hidden; }
.kpi .kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 550; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi .kpi-value { font-size: 27px; font-weight: 660; letter-spacing: -0.03em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .kpi-delta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; }
.kpi .kpi-compare { color: var(--dim); font-size: 11.5px; margin-left: 4px; font-weight: 400; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--dim); }
.kpi-spark { position: absolute; right: 0; bottom: 0; opacity: 0.5; }

/* ---------------- table ---------------- */
.table-wrap { overflow: auto; border-radius: 10px; border: 1px solid var(--border-soft); max-height: 620px; }
table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  z-index: 2;
}
thead th.num, tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text); }
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(76,141,255,0.045); }
td .url-cell { max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
td a.url-cell:hover { color: var(--accent); }
.mono { font-family: var(--mono); font-size: 12px; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge.ok { background: var(--green-soft); color: var(--green); border-color: rgba(47,211,155,0.22); }
.badge.warn { background: var(--amber-soft); color: var(--amber); border-color: rgba(245,181,68,0.22); }
.badge.bad { background: var(--red-soft); color: var(--red); border-color: rgba(249,112,112,0.22); }
.badge.info { background: var(--accent-soft); color: #8fbaff; border-color: rgba(76,141,255,0.22); }
.badge.neutral { background: var(--surface-3); color: var(--muted); border-color: var(--border); }

/* ---------------- forms ---------------- */
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.field .hint { font-size: 11px; color: var(--dim); line-height: 1.5; }
.field input, .field select, .field textarea { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1; min-width: 130px; margin-bottom: 0; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 550;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: #2b3444; }
.chip.on { background: var(--accent-soft); border-color: rgba(76,141,255,0.45); color: #a9c8ff; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ---------------- misc ---------------- */
.empty { text-align: center; padding: 46px 20px; color: var(--dim); }
.empty h3 { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.empty p { margin: 0 auto 16px; max-width: 420px; font-size: 12.5px; line-height: 1.6; }
.empty svg { width: 34px; height: 34px; stroke: var(--dim); fill: none; stroke-width: 1.5; margin-bottom: 10px; }

.progress { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--purple)); transition: width .3s; }

.stat-line { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.stat-line b { color: var(--text); font-variant-numeric: tabular-nums; }

.notice {
  display: flex; gap: 11px; padding: 12px 14px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.6;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.notice svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }
.notice.warn { background: var(--amber-soft); border-color: rgba(245,181,68,0.25); color: #f0cd8a; }
.notice.info { background: var(--accent-soft); border-color: rgba(76,141,255,0.25); color: #a8c6ff; }
.notice.ok { background: var(--green-soft); border-color: rgba(47,211,155,0.25); color: #8ee3c4; }
.notice strong { color: var(--text); }
.notice a { text-decoration: underline; text-underline-offset: 2px; }

.chart-box { width: 100%; height: 240px; position: relative; }
canvas { display: block; width: 100%; height: 100%; }

.kv { display: grid; grid-template-columns: 168px 1fr; gap: 9px 14px; font-size: 12.8px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.tab { padding: 8px 14px; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 550; }
.tab:hover { color: var(--text); }
.tab.on { color: #cfe0ff; border-bottom-color: var(--accent); }

.demo-banner {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 28px;
  background: rgba(245,181,68,0.07);
  border-bottom: 1px solid rgba(245,181,68,0.18);
  font-size: 12.5px; color: #e8c78a;
}
.demo-banner.hidden { display: none; }
.demo-banner .btn { margin-left: auto; }

/* login gate (hosted build) */
.login-overlay {
  position: fixed; inset: 0; z-index: 500;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(76,141,255,0.16), transparent 60%),
    var(--bg);
  display: grid; place-items: center; padding: 24px;
}
.login-card {
  width: min(380px, 100%);
  background: linear-gradient(180deg, var(--surface), rgba(14,19,28,0.9));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 0 40px 90px -40px #000;
  text-align: center;
}
.login-card .brand-mark { margin: 0 auto; }
.login-card h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 18px; color: var(--muted); font-size: 12.8px; line-height: 1.65; }
.login-card input { width: 100%; text-align: center; padding: 11px 12px; }
.login-error { color: var(--red); font-size: 12px; margin-top: 10px; min-height: 16px; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,6,10,0.72);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 24px;
}
.modal-backdrop.hidden { display: none; }
.modal {
  width: min(760px, 100%); max-height: 82vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px -30px #000;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.modal-head h3 { margin: 0; font-size: 14.5px; }
.modal-body { padding: 18px; overflow: auto; }

/* toasts */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: grid; gap: 9px; }
.toast {
  min-width: 260px; max-width: 420px;
  padding: 11px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.8px; color: var(--text);
  box-shadow: 0 18px 40px -20px #000;
  animation: slideIn .22s ease;
  display: flex; gap: 9px; align-items: flex-start;
}
.toast.err { border-color: rgba(249,112,112,0.4); }
.toast.ok { border-color: rgba(47,211,155,0.4); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* guide */
.guide { max-width: 860px; line-height: 1.75; font-size: 13.5px; }
.guide h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.02em; }
.guide h2 { font-size: 16px; margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid var(--border-soft); letter-spacing: -0.01em; }
.guide h3 { font-size: 13.5px; margin: 20px 0 8px; color: #cfe0ff; }
.guide p { color: var(--muted); margin: 9px 0; }
.guide li { color: var(--muted); margin: 5px 0; }
.guide strong { color: var(--text); }
.guide code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; color: #a9c8ff; }
.guide pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 13px 15px; overflow: auto; }
.guide pre code { background: none; padding: 0; color: var(--text); }
.guide a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.guide hr { border: none; border-top: 1px solid var(--border-soft); margin: 22px 0; }
.guide table { margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.guide th { background: var(--surface-2); }

.step { display: flex; gap: 14px; margin-bottom: 20px; }
.step-num {
  flex: 0 0 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); color: #9cc0ff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(76,141,255,0.3);
}
.step-body h4 { margin: 3px 0 6px; font-size: 13.5px; font-weight: 620; }
.step-body p { margin: 0 0 6px; font-size: 12.8px; color: var(--muted); line-height: 1.65; }

.split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }

@media (max-width: 1150px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px; }
  .nav { flex-direction: row; gap: 4px; }
  .nav-label, .sidebar-foot { display: none; }
  .brand { padding: 0 8px 0 0; }
  .brand-text { display: none; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .view, .topbar { padding-left: 16px; padding-right: 16px; }
  .property-select label { display: none; }
  select { min-width: 150px; }
}

/* ---------------- landing page ---------------- */
.landing { max-width: 1080px; margin: 0 auto; padding: 0 24px 60px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; flex-wrap: wrap; }
.landing-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 14.5px; letter-spacing: -0.01em; }
.landing-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.landing-brand .brand-mark svg { width: 17px; height: 17px; }
.landing-links { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.landing-links a:hover { color: var(--text); }
.landing-hero { padding: 54px 0 40px; max-width: 800px; }
.landing-pill {
  display: inline-block; padding: 5px 12px; border-radius: 99px;
  background: var(--accent-soft); border: 1px solid rgba(76,141,255,0.28);
  color: #a9c8ff; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 20px;
}
.landing h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.035em; margin: 0 0 18px; font-weight: 660; }
.landing .hero-sub { font-size: 21px; line-height: 1.35; color: #cfe0ff; margin: -6px 0 18px; letter-spacing: -0.015em; }
.landing .lede { font-size: 15.5px; line-height: 1.75; color: var(--muted); max-width: 660px; margin: 0 0 26px; }
.landing-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.landing-note { font-size: 12.5px; color: var(--dim); line-height: 1.7; }
.landing-note a { color: var(--accent); }
.landing-section { padding: 34px 0 10px; border-top: 1px solid var(--border-soft); margin-top: 30px; }
.landing-section h2 { font-size: 20px; letter-spacing: -0.02em; margin: 0 0 18px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature h3 { margin: 0 0 7px; font-size: 13.5px; }
.feature p { margin: 0; font-size: 12.8px; line-height: 1.65; color: var(--muted); }
.landing-footer {
  margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--border-soft);
  display: grid; gap: 12px; font-size: 12.5px; color: var(--muted);
}
.landing-footer > div { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.landing-legal { font-size: 11.5px; color: var(--dim); line-height: 1.7; margin: 0; max-width: 720px; }

/* ---------------- legal pages ---------------- */
.legal { max-width: 820px; margin: 0 auto; padding: 0 24px 70px; }
.legal h1 { font-size: 32px; letter-spacing: -0.03em; margin: 30px 0 6px; }
.legal-meta { color: var(--dim); font-size: 12px; margin: 0 0 26px; }
.legal h2 { font-size: 15.5px; margin: 30px 0 10px; color: var(--text); }
.legal p, .legal li { color: var(--muted); font-size: 13.4px; line-height: 1.8; }
.legal ul { padding-left: 20px; margin: 10px 0; }
.legal li { margin: 5px 0; }
.legal p a, .legal li a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal .btn, .legal .landing-links a { text-decoration: none; }
.legal .btn-primary { color: #fff; }
.legal .landing-links a { color: var(--muted); }
.landing-links a.btn-primary, .legal .landing-links a.btn-primary { color: #fff; text-decoration: none; }
.legal .landing-links a:hover { color: var(--text); }
.legal code { font-family: var(--mono); font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; color: #a9c8ff; }
.legal strong { color: var(--text); }

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .landing h1 { font-size: 32px; }
  .landing-nav { padding: 16px 0; }
  .legal h1 { font-size: 26px; }
}

/* connection mode chooser */
.connect-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.connect-card {
  text-align: left; padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-soft);
  color: inherit; font: inherit; cursor: pointer;
  display: grid; gap: 6px; align-content: start;
  transition: border-color .15s, background .15s;
}
.connect-card:hover { border-color: #2b3444; background: var(--surface-2); }
.connect-card.on { border-color: rgba(76,141,255,0.5); background: var(--accent-soft); }
.connect-card h3 { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.connect-card p { margin: 0; font-size: 11.8px; color: var(--muted); line-height: 1.55; }
@media (max-width: 860px) { .connect-options { grid-template-columns: 1fr; } }
