/* ALT/FNDATA unified user portal — app.altfndata.com */

:root {
  --bg: #f4f6fa;
  --surface: #fff;
  --border: #e3e7ef;
  --text: #1a1d29;
  --muted: #868ca0;
  --accent: #0049ff;
  --accent-soft: rgba(0, 73, 255, 0.1);
  --accent2: #f477f6;
  --pink: #fce3fd;
  --periwinkle: #e5ecff;
  --good: #10b981;
  --warn: #f59e0b;
  --sidebar-w: 240px;
  --rail-w: 68px;
  --header-h: 56px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; }

/* ── Login screen ── */
.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-soft), transparent 70%), var(--bg);
}
.login-screen .portal-logo--login {
  margin-bottom: 20px;
}
.login-screen .portal-logo--login .portal-logo-img {
  height: 40px;
  width: auto;
  display: block;
  margin: 0 auto;
}
.portal-sidebar .portal-logo--sidebar {
  display: block;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.portal-sidebar .portal-logo--sidebar .portal-logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.portal-logo-img { object-fit: contain; }
.login-screen h1 { font-size: clamp(24px, 5vw, 36px); margin: 16px 0 8px; }
.login-screen p { color: var(--muted); max-width: 420px; margin-bottom: 24px; }
.login-screen .btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── Layout ── */
.portal-app { display: flex; min-height: 100vh; }
.portal-sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 20;
  transition: width .18s ease;
}
.portal-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
/* Scoped under .portal-nav so these out-specify dashboards/css/dashboard.css,
   which is also loaded on this page and defines its own bare `.nav-item`
   (display:block, padding 8px 12px, and box-shadow: inset 2px 0 0 accent — the
   stray blue left bar). Bare selectors here tie on specificity and LOSE to the
   later-loaded dashboard.css; the .portal-nav prefix wins regardless of order. */
.portal-nav .nav-item {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;          /* normalize so <button> group headers match <a> rows */
  box-sizing: border-box;
  text-decoration: none;
  margin-bottom: 2px;
  box-shadow: none;           /* kill dashboard.css inset blue bar */
}
.portal-nav .nav-item:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; box-shadow: none; }
.portal-nav .nav-item.active { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.portal-nav .nav-item.locked { opacity: 0.55; }
/* Active/selected items are shown by the tinted background + accent text only —
   no border, bar, or focus ring. */
.portal-nav .nav-item, .portal-nav .nav-group-header { border: 0; }
.portal-nav .nav-item:focus, .portal-nav .nav-item:focus-visible,
.portal-nav .nav-group-header:focus, .portal-nav .nav-group-header:focus-visible { outline: none; box-shadow: none; }
.portal-nav .nav-icon {
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.portal-nav .nav-icon svg { display: block; width: 18px; height: 18px; }
.portal-nav .nav-label { flex: 1; min-width: 0; line-height: 1.25; white-space: nowrap; }
.portal-nav .nav-lock { margin-left: auto; font-size: 12px; flex-shrink: 0; }

.portal-guide-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.portal-guide-link:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.portal-guide-link .portal-guide-ico { display: flex; flex-shrink: 0; }
.portal-guide-link .portal-guide-ico svg { display: block; }
.portal-guide-link > span:nth-child(2) { flex: 1; min-width: 0; }
.portal-guide-link .portal-guide-ext { display: flex; flex-shrink: 0; margin-left: auto; opacity: 0.6; }
.portal-guide-link .portal-guide-ext svg { display: block; }
.portal-guide-link:hover .portal-guide-ext { opacity: 0.9; }

.portal-user {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.portal-user .email { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.portal-user .plan { color: var(--muted); text-transform: capitalize; }

.portal-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left .18s ease;
}
.portal-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.portal-header h1 { font-size: 18px; font-weight: 700; }
.portal-header .header-link { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.portal-header .header-link:hover { text-decoration: underline; }

/* Market Alerts feed */
.alert-intro { margin-bottom: 14px; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.alert-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: border-color .15s, background .15s; }
.alert-chip:hover { border-color: var(--accent); }
.alert-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-row { display: flex; align-items: flex-start; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.alert-ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.alert-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.alert-head { font-weight: 700; font-size: 14.5px; color: var(--text); line-height: 1.35; }
.alert-detail { font-size: 13px; color: var(--muted); line-height: 1.4; }
.alert-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.alert-tag { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700; border-radius: 5px; padding: 1px 7px; font-size: 11px; }

/* Account — plan comparison */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.plan-head h3 { font-size: 18px; font-weight: 800; }
.plan-toggle { display: inline-flex; background: #eef1f6; border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.plan-toggle button { border: 0; background: transparent; color: var(--text); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.plan-toggle button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.plan-card { position: relative; border: 1px solid var(--border); border-radius: 14px; padding: 22px 20px; background: var(--surface); }
.plan-card.hot { border: 2px solid var(--accent); }
.plan-badge { position: absolute; top: -10px; left: 20px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 10px; border-radius: 20px; }
.plan-badge.current { background: var(--text); }
.plan-name { font-size: 19px; font-weight: 800; margin: 2px 0 4px; }
.plan-desc { font-size: 13px; color: var(--muted); margin: 0 0 14px; min-height: 34px; }
.plan-price { margin: 0; }
.plan-price strong { font-size: 30px; font-weight: 800; }
.plan-per { font-size: 12px; color: var(--muted); }
.plan-subprice { font-size: 12px; color: var(--muted); margin: 2px 0 16px; }
.plan-cta { width: 100%; justify-content: center; margin-bottom: 18px; }
.plan-cta[disabled] { opacity: .55; cursor: default; }
.plan-base { font-size: 12px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.plan-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.plan-features li { display: flex; gap: 9px; font-size: 13px; color: var(--text); line-height: 1.35; }
.plan-chk { flex: 0 0 15px; width: 15px; height: 15px; color: var(--accent); margin-top: 2px; }
.plan-msg { font-size: 13px; color: var(--muted); margin-top: 14px; }
.plan-fine { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ── Account (hero + collapsible sections) ── */
.acct-hero { display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--periwinkle), var(--surface) 62%);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.acct-avatar { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 24px; box-shadow: 0 6px 16px var(--accent-soft); }
.acct-hero-main { min-width: 0; flex: 1 1 auto; }
.acct-hero-email { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-hero-sub { font-size: 13px; color: var(--muted); text-transform: capitalize; margin-top: 2px; }
.acct-plan-pill { flex: 0 0 auto; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.acct-plan-pill.is-paid { background: var(--accent); color: #fff; border-color: var(--accent); }

.acct-section { border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; transition: box-shadow .15s ease; }
.acct-section[open] { box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 14px 34px rgba(16,24,40,.08); }
.acct-section > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; user-select: none; transition: background .12s ease; }
.acct-section > summary::-webkit-details-marker { display: none; }
.acct-section > summary:hover { background: var(--bg); }
.acct-sec-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; }
.acct-sec-ic svg { width: 19px; height: 19px; }
.acct-sec-txt { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.acct-sec-tt { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--text); letter-spacing: -0.01em; }
.acct-sec-desc { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.acct-sec-hint { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.acct-chev { flex: 0 0 auto; color: var(--muted); font-size: 22px; line-height: 1; transition: transform .2s ease; }
.acct-section[open] .acct-chev { transform: rotate(90deg); }
.acct-sec-body { padding: 18px 20px 22px; border-top: 1px solid var(--border); }
.acct-sec-body .alert-chips { margin-bottom: 6px; }

.acct-features { list-style: none; padding: 0; margin: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.acct-features li { display: flex; gap: 9px; font-size: 13.5px; color: var(--text); line-height: 1.35; align-items: flex-start; }
.acct-features .plan-chk { flex: 0 0 15px; width: 15px; height: 15px; margin-top: 2px; }
.acct-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.acct-field-lbl { display: block; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.acct-select { max-width: 300px; margin-bottom: 4px; }
.acct-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.acct-inline-msg { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) {
  .acct-sec-desc { display: none; }
  .acct-sec-hint { display: none; }
}

/* Price movers by category widget */
.mv-widget { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; }
.mv-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mv-name { font-weight: 700; font-size: 14px; color: var(--text); min-width: 96px; }
.mv-pct { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.mv-pct.up { color: #1baf7a; }
.mv-pct.down { color: #e34948; }
.mv-pct.flat { color: var(--muted); }
.mv-meta { font-size: 12px; color: var(--muted); margin-left: auto; }
.mv-note { font-size: 11.5px; color: var(--muted); margin: 12px 0 0; font-style: italic; }

/* Market activity by category widget */
.act-widget { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.act-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.act-head h3 { font-size: 16px; font-weight: 700; }
.act-sub { font-size: 12px; color: var(--muted); }
.act-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 24px; }

/* ── Personal price-alerts inbox (Market Alerts) ── */
.pa-inbox { margin-bottom: 26px; }
.pa-list { display: flex; flex-direction: column; gap: 10px; }
.pa-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.pa-row:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(16,24,40,.08); transform: translateY(-1px); text-decoration: none; }
.pa-row.is-new { border-left: 3px solid var(--accent); }
.pa-badge { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: #0a8f5b; background: #eafaf3; border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.pa-badge-sold { color: var(--accent); background: var(--accent-soft); }
.pa-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.pa-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-meta { font-size: 12.5px; color: var(--muted); }
.pa-open { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.pa-empty { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 18px; }
.pa-empty-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pa-empty-t { font-weight: 700; font-size: 14.5px; }
.pa-empty-d { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Watch (price-alert) toggle on saved comps ── */
.pc-hist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pc-bell { width: 15px; height: 15px; flex: 0 0 auto; }
.pc-watch-quota { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.pc-watch { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; transition: border-color .15s, color .15s, background .15s; }
.pc-watch:hover { border-color: var(--accent); color: var(--accent); }
.pc-watch.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pc-watch[disabled] { opacity: .55; cursor: default; }
.pc-save { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 2px; }
.pc-save-btn { display: inline-flex; align-items: center; gap: 7px; }
.pc-save-btn .pc-bell { width: 15px; height: 15px; }
.pc-save-btn.on { background: var(--good); border-color: var(--good); cursor: default; }
.pc-save-note { font-size: 12.5px; color: var(--muted); }
.act-row { display: flex; flex-direction: column; gap: 5px; }
.act-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.act-name { font-weight: 700; font-size: 14px; color: var(--text); }
.act-val { font-weight: 700; font-size: 14px; color: var(--accent); font-variant-numeric: tabular-nums; }
.act-bar { height: 7px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.act-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.act-meta { font-size: 12px; color: var(--muted); }
.portal-content { flex: 1; padding: 24px; width: 100%; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0039cc; text-decoration: none; color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: #c9cfdb; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s, transform .1s;
}
.card-link:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.card-link h3 { font-size: 16px; margin-bottom: 6px; }
.card-link p { font-size: 13px; color: var(--muted); }

/* ── Onboarding ── */
.onboard-list { list-style: none; }
.onboard-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.onboard-list li.done { color: var(--muted); }
.onboard-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}
.onboard-list li.done .onboard-check {
  background: var(--good);
  border-color: var(--good);
  color: #fff;
}
.step-label { flex: 1; min-width: 0; }
.onboard-list li.done .step-label { text-decoration: line-through; text-decoration-color: var(--border); }
.step-label a { color: inherit; }
.step-note {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--muted);
  background: var(--border); border-radius: 999px; padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

/* Completion animation — plays once, when a step flips to done. `just-done` is
   set by home.js by diffing against the steps already ticked this session. */
@keyframes stepTick {
  0%   { transform: scale(.3); opacity: 0; }
  55%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes stepGlow {
  0%   { background: transparent; }
  25%  { background: var(--accent-soft); }
  100% { background: transparent; }
}
@keyframes stepRipple {
  0%   { box-shadow: 0 0 0 0 rgba(27,175,122,.45); }
  100% { box-shadow: 0 0 0 12px rgba(27,175,122,0); }
}
.onboard-list li.just-done { animation: stepGlow 1.4s ease both; }
.onboard-list li.just-done .onboard-check {
  animation: stepTick .5s cubic-bezier(.2,.8,.2,1) both, stepRipple .9s ease-out .1s both;
}

/* ── "Achieve the Next Level" ── */
.card.level-up { border-color: var(--accent); }
.level-badge {
  display: inline-block; margin-bottom: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--good); background: #eafaf3; border-radius: 999px; padding: 3px 9px;
}

@media (prefers-reduced-motion: reduce) {
  .onboard-list li.just-done,
  .onboard-list li.just-done .onboard-check { animation: none; }
}

/* ── Loading / gate ── */
.portal-loading, .portal-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  text-align: center;
  gap: 12px;
}
.portal-gate h2 { font-size: 22px; }
.portal-gate p { color: var(--muted); max-width: 400px; }
.portal-gate-actions { display: flex; gap: 10px; margin-top: 8px; }
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ── */
.field {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 6px 6px 6px 14px;
}
.field input, .field select {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 0;
  min-width: 0;
}
.field input:focus { outline: none; }

/* ── Search results table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th { background: var(--bg); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.data-table tr:last-child td { border-bottom: 0; }

/* ── Dashboard embed ── */
.dashboard-embed .section-loading { min-height: 200px; }
.dashboard-embed .catalog-toolbar,
.dashboard-container .catalog-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dashboard-embed .catalog-filter,
.dashboard-container .catalog-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dashboard-embed .catalog-filter-label,
.dashboard-container .catalog-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.dashboard-embed .catalog-filter-select,
.dashboard-container .catalog-filter-select {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  min-width: 200px;
  cursor: pointer;
}
.dashboard-embed .catalog-empty,
.dashboard-container .catalog-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}
.dashboard-embed .catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.dashboard-embed .catalog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.dashboard-embed .catalog-card:hover { border-color: var(--accent); }
.dashboard-embed .card-category { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.dashboard-embed .card-title { font-weight: 700; margin: 6px 0 4px; }
.dashboard-embed .card-desc { font-size: 13px; color: var(--muted); }

/* ── Price check result ── */
.pc-result {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pc-verdict {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 14px;
}
.pc-verdict.good { background: rgba(16,185,129,.1); color: #047857; }
.pc-verdict.warn { background: rgba(245,158,11,.12); color: #b45309; }
.pc-verdict.neutral { background: var(--bg); color: var(--muted); }
.pc-range {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  text-align: center;
}
.pc-range .md { font-family: var(--font-display); font-size: 32px; font-weight: 800; }
.pc-range .pc-lbl { font-size: 13px; color: var(--muted); }

/* Price Check form: category select + input row */
.pc-form { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.pc-cat { flex: 0 0 auto; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); font-family: inherit; font-size: 14px; font-weight: 600; padding: 0 12px; color: var(--text); cursor: pointer; }
.pc-field { flex: 1; min-width: 260px; }
.pc-head { padding: 16px; border-bottom: 1px solid var(--border); }
.pc-brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pc-title { font-weight: 700; margin-top: 2px; }
.pc-meta { padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.pc-comps { border-top: 1px solid var(--border); }
.pc-comps-h { padding: 12px 16px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.pc-comp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); }
.pc-comp-main { min-width: 0; }
.pc-comp-t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-comp-m { font-size: 12px; color: var(--muted); }
.pc-comp-p { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc-locked { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; font-size: 12.5px; color: var(--muted); background: var(--bg); border-top: 1px solid var(--border); }
.pc-locked .btn { flex-shrink: 0; }

/* Blurred premium teaser: locked full comp set behind a purple upgrade CTA */
.pc-premium { position: relative; border-top: 1px solid var(--border); overflow: hidden; }
.pc-blur { filter: blur(5px); opacity: .55; pointer-events: none; user-select: none; padding-bottom: 10px; }
.pc-lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 16px;
  background: linear-gradient(to bottom, rgba(255,255,255,.35) 0%, rgba(255,255,255,.72) 55%, rgba(255,255,255,.82) 100%);
}
.pc-lock-msg { font-size: 13.5px; font-weight: 700; color: var(--text); max-width: 30ch; }
.pc-upgrade-btn { background: var(--accent2); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(244,119,246,.42); }
.pc-upgrade-btn:hover { filter: brightness(.96); color: #fff; text-decoration: none; }
/* Price-history chart (inline SVG) */
.phc { width: 100%; height: auto; display: block; padding: 2px 12px 4px; }
.phc-area { fill: var(--accent2); opacity: .13; }
.phc-line { fill: none; stroke: var(--accent2); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.phc-dot { fill: var(--accent2); }
.phc-x { fill: var(--muted); font-size: 11px; font-family: inherit; }
/* Price distribution bar (median within low–high, IQR band) */
.pc-dist { padding: 4px 16px 8px; }
.pc-dist-track { position: relative; height: 8px; border-radius: 999px; background: var(--border); }
.pc-dist-iqr { position: absolute; top: 0; bottom: 0; background: rgba(244,119,246,.35); border-radius: 999px; }
.pc-dist-median { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: var(--accent2); transform: translateX(-1.5px); }
.pc-dist-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Per-house breakdown */
.pc-breakdown { padding: 2px 0 4px; }
.pc-brk { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 7px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.pc-brk-h { font-weight: 600; }
.pc-brk-n { color: var(--muted); font-size: 12px; }
.pc-brk-p { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Locked CSV export button */
.pc-csv { padding: 12px 16px; border-top: 1px solid var(--border); }
.pc-csv-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); width: 100%; }
/* Overlay sub-line listing what's included */
.pc-lock-sub { font-size: 12px; color: var(--muted); max-width: 34ch; }

/* ── Home: two-column layout ──
   "Getting started" leads on the left; the desk card, category strip, reports
   card and module tiles fill the wider right column. DOM order already places
   Getting started first, so the single-column stack below 900px keeps it at the
   top with no reordering. minmax(0,1fr) — not plain 1fr — so the right column
   can actually shrink below its content's min-content width. */
/* Home row grid. Rows: [Getting started 1/3 | Chart slider 2/3],
   [Recent activity 1/2 | Categories 1/2], [Price movers 1/2 | My Reports 1/2].
   minmax(0,…) so cells can shrink below content min-width. A row with one cell
   (empty partner) collapses to full width. Stacks at 900px. Cells own no bottom
   margin — the row gap handles spacing. */
.home-row { display: grid; gap: 24px; align-items: start; margin-bottom: 28px; }
.home-row--13 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.home-row--12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-row--single { grid-template-columns: minmax(0, 1fr); }
.home-cell { min-width: 0; }
.home-cell > .card,
.home-cell > .mv-widget,
.home-cell > .act-widget,
.home-cell > .cat-strip,
.home-cell > .chart-slider { margin-bottom: 0; }
@media (max-width: 900px) {
  .home-row--13, .home-row--12 { grid-template-columns: 1fr; }
}

/* Market chart slider on Home. The track lays all slides in a row and slides
   via translateX — no display:none, so every canvas keeps real width and
   Chart.js sizes correctly. Controls are click-only (no scroll handlers). */
.chart-slider { padding: 18px 20px; }
.chart-slider-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chart-slider-head h3 { font-size: 16px; font-weight: 700; }
.chart-viewport { overflow: hidden; width: 100%; }
.chart-track { display: flex; width: 100%; transition: transform .32s cubic-bezier(.4,.0,.2,1); }
.chart-slide { flex: 0 0 100%; min-width: 0; padding: 0 2px; }
.chart-slide-title { font-size: 14.5px; font-weight: 700; margin-bottom: 2px; }
.chart-slide-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.chart-slide-canvas { position: relative; height: 260px; }
.chart-slide-canvas canvas { max-width: 100%; }
.chart-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.chart-arrow {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: border-color .15s, background .15s;
}
.chart-arrow:hover { border-color: var(--accent); color: var(--accent); }
.chart-dots { display: flex; gap: 8px; }
.chart-dot {
  width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--border); transition: background .15s, transform .15s;
}
.chart-dot.on { background: var(--accent); transform: scale(1.25); }
@media (max-width: 640px) { .chart-slide-canvas { height: 220px; } }

/* Market Alerts widgets on Home (price movers + recent activity) — laid out via
   the shared .home-row grid; these are just the widget-internal tweaks. */
.act-link { text-decoration: none; font-weight: 600; }
.act-link:hover { color: var(--accent); }
.alert-list--compact { gap: 8px; }

/* Scoped under .portal-header for the same reason as .portal-nav .nav-item:
   dashboards/css/dashboard.css is loaded after this file and defines a bare
   `.nav-toggle { display: inline-flex }`. A bare selector here ties on
   specificity and LOSES to the later sheet, which made the hamburger show on
   desktop — where clicking it did nothing, because the only rule that reacts to
   body.nav-open lives in the mobile query below.
   This base rule MUST stay above that query: both selectors now have equal
   specificity, so the one declared later wins. */
.portal-header .nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .portal-sidebar {
    transform: translateX(-100%);
    transition: transform .2s;
  }
  body.nav-open .portal-sidebar { transform: translateX(0); }
  .portal-main { margin-left: 0; }
  .portal-header .nav-toggle { display: inline-flex; }
}

/* ── Embedded standalone apps (Search, Data Sandbox) ── */
.portal-content:has(.embed-wrap) { max-width: none; }
.embed-wrap { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 48px); }
.embed-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.embed-note { font-size: 13px; color: var(--muted); }
.embed-stage { position: relative; flex: 1; min-height: 320px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.embed-frame { width: 100%; height: 100%; border: 0; display: block; }
.embed-loading { position: absolute; inset: 0; margin: 0; background: var(--surface); }

/* Expand/collapse toggle: the embed fills the whole portal window (covering the
   sidebar + header) when expanded. Toggling only restyles the wrapper, so the
   iframe keeps its state. Applies at all widths. */
.embed-toggle { display: inline-flex; align-items: center; gap: 6px; }
.embed-toggle .embed-ico { display: inline-flex; }
.embed-toggle .embed-ico-collapse { display: none; }
.embed-wrap.embed-full { position: fixed; inset: 0; z-index: 2000; height: 100vh; margin: 0; padding: 12px 16px 16px; background: var(--bg, #fff); }
.embed-wrap.embed-full .embed-ico-expand { display: none; }
.embed-wrap.embed-full .embed-ico-collapse { display: inline-flex; }

/* Sidebar collapse toggle button. Hidden by default (mobile uses the hamburger);
   shown only on desktop below. */
.sidebar-toggle {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); cursor: pointer; transition: border-color .15s, color .15s;
}
.sidebar-toggle:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-toggle svg { display: block; }

/* Desktop only: the collapse toggle + the icons-only rail. On mobile the
   hamburger handles the full slide-in menu, so neither of these applies. */
@media (min-width: 901px) {
  .sidebar-toggle { display: inline-flex; }
  body.sidebar-collapsed .portal-sidebar { width: var(--rail-w); }
  body.sidebar-collapsed .portal-main { margin-left: var(--rail-w); }
  body.sidebar-collapsed .portal-nav { padding: 12px 8px; }
  body.sidebar-collapsed .portal-nav .nav-item,
  body.sidebar-collapsed .portal-nav .nav-group-header { justify-content: center; padding-left: 0; padding-right: 0; }
  body.sidebar-collapsed .portal-nav .nav-label,
  body.sidebar-collapsed .portal-nav .nav-lock,
  body.sidebar-collapsed .portal-nav .nav-caret,
  body.sidebar-collapsed .portal-nav .nav-children,
  body.sidebar-collapsed .portal-guide-link > span:not(.portal-guide-ico),
  body.sidebar-collapsed .portal-user,
  body.sidebar-collapsed .portal-logo--sidebar { display: none; }
  body.sidebar-collapsed .portal-guide-link { justify-content: center; padding-left: 0; padding-right: 0; }
}

/* Collapsible sidebar nav group (Data Sandbox) */
.nav-group { display: flex; flex-direction: column; }
.nav-group-header { width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.nav-group-header .nav-caret { margin-left: auto; font-size: 10px; color: var(--muted); transition: transform .2s; }
.nav-group.open .nav-group-header .nav-caret { transform: rotate(180deg); }
.nav-children { display: none; flex-direction: column; margin: 2px 0 2px 30px; gap: 1px; }
.nav-group.open .nav-children { display: flex; }
.nav-subitem { display: block; padding: 7px 10px; font-size: 13px; color: var(--muted); border-radius: 7px; text-decoration: none; }
.nav-subitem:hover { color: var(--text); background: var(--bg); }
.nav-subitem.active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }

/* Data Sandbox entry card in the dashboards catalog */
.dash-sandbox-card { border-left: 3px solid var(--accent); }
.dash-sandbox-card h3 { color: var(--accent); }

/* Data Sandbox — native views */
.sbx-head { margin-bottom: 18px; }
.sbx-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent2); margin-bottom: 3px; }
.sbx-head h2 { font-size: 22px; margin-bottom: 4px; }
.sbx-head p { color: var(--muted); font-size: 14px; }
.sbx-card h3 { font-size: 16px; margin-bottom: 10px; }
.sbx-statrow { display: flex; gap: 18px; }
.sbx-statrow > div { display: flex; flex-direction: column; }
.sbx-statrow strong { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--text); }
.sbx-statrow span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sbx-since { margin-top: 10px; font-size: 12px; color: var(--muted); }
.sbx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.sbx-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.sbx-tile strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.sbx-tile span { font-size: 12px; color: var(--muted); }
.sbx-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.sbx-chart h4 { font-size: 15px; margin-bottom: 2px; font-family: var(--font-display); }
.sbx-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.sbx-canvas { position: relative; height: 280px; }
.sbx-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sbx-search { flex: 1; min-width: 200px; max-width: 380px; }
.sbx-select { font-family: inherit; font-size: 14px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); }
.sbx-tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; max-height: 70vh; }
.sbx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sbx-table th { text-align: left; padding: 10px 14px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0; z-index: 1; }
.sbx-table th.num, .sbx-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sbx-table td { padding: 9px 14px; border-top: 1px solid var(--border); }
.sbx-table tbody tr:hover { background: var(--bg); }
.sbx-table code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.sbx-where { color: var(--muted); max-width: 320px; }
.sbx-count { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* Header "Take a tour" button — always-available launcher for the portal tour. */
.portal-tour-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px;
  padding: 6px 13px; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.portal-tour-btn:hover { border-color: var(--accent); }
.portal-tour-btn svg { display: block; }
@media (max-width: 560px) { .portal-tour-btn .portal-tour-label { display: none; } }

/* ── Guided product tour (driver.js), branded via popoverClass="altfn-tour" ── */
.driver-popover.altfn-tour { border-radius: 12px; box-shadow: 0 12px 40px rgba(0,73,255,.18), 0 2px 8px rgba(0,0,0,.08); font-family: var(--font); }
.driver-popover.altfn-tour .driver-popover-title { font-size: 15px; font-weight: 700; color: var(--accent); font-family: var(--font-display); }
.driver-popover.altfn-tour .driver-popover-description { font-size: 13px; color: var(--text); line-height: 1.5; }
.driver-popover.altfn-tour .driver-popover-progress-text { font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.driver-popover.altfn-tour .driver-popover-footer button { border-radius: 8px; font-weight: 600; font-size: 12.5px; padding: 7px 15px; text-shadow: none; transition: background .15s, border-color .15s; }
.driver-popover.altfn-tour .driver-popover-next-btn { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.driver-popover.altfn-tour .driver-popover-next-btn:hover { background: #0039cc; border-color: #0039cc; }
.driver-popover.altfn-tour .driver-popover-prev-btn { background: transparent; color: var(--accent); border: 1px solid transparent; }
.driver-popover.altfn-tour .driver-popover-prev-btn:hover { background: var(--accent-soft); }
.driver-popover.altfn-tour .driver-popover-close-btn { color: var(--muted); font-size: 18px; line-height: 1; width: 24px; height: 24px; border-radius: 6px; }
.driver-popover.altfn-tour .driver-popover-close-btn:hover { background: var(--bg); color: var(--text); }
.driver-popover.altfn-tour .driver-popover-arrow { border-color: #fff; }
.driver-active-element, .driver-active-element:focus { box-shadow: 0 0 0 4px rgba(0,73,255,.35) !important; border-radius: 8px; }

.dash-tour-btn {
  position: fixed; bottom: 22px; right: 22px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; border-radius: 99px;
  padding: 11px 18px; font-family: var(--font); font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,73,255,.28);
}
.dash-tour-btn:hover { background: #0039cc; }
.dash-tour-btn span { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.25); font-weight: 800; font-size: 12px; }

/* ── Claude Connector (MCP) ── */
.code-block { position: relative; background: #0f1424; color: #e7ecf7; border-radius: 10px; padding: 14px 16px; padding-right: 74px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; overflow-x: auto; }
.code-block code, .code-block pre { font-family: inherit; white-space: pre; margin: 0; color: inherit; background: none; padding: 0; }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 7px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: var(--font); }
.code-block .copy-btn:hover { background: rgba(255,255,255,.24); }
.code-block .copy-btn.ok { background: var(--good); }
.mcp-step { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.mcp-num { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-family: var(--font-display); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.mcp-body { flex: 1; min-width: 0; }
.mcp-body h4 { font-size: 15px; margin-bottom: 8px; font-family: var(--font-display); }
.mcp-hint { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.mcp-hint code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.mcp-prompts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mcp-prompts li { font-size: 14px; color: var(--text); padding: 10px 14px; background: var(--bg); border-radius: 9px; }
/* API key management + upgrade */
.mcp-keycard h4 { font-family: var(--font-display); margin-bottom: 12px; }
.mcp-keyrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mcp-key { flex: 1; min-width: 240px; background: #0f1424; color: #e7ecf7; border-radius: 10px; padding: 11px 14px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.mcp-keynote { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.mcp-keymsg { font-size: 12.5px; margin-top: 8px; min-height: 16px; }
.mcp-keymsg.ok { color: var(--good); } .mcp-keymsg.err { color: #e5484d; } .mcp-keymsg.busy { color: var(--accent); }
.mcp-upsell { border: 1.5px solid var(--accent); }

/* Data API usage panel (Claude-style meters) */
.mcp-usage { margin-bottom: 16px; }
.usage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.usage-head h4 { font-family: var(--font-display); margin: 0; }
.usage-tier { font-size: 12px; font-weight: 600; color: var(--accent2); background: var(--pink); padding: 3px 10px; border-radius: 999px; }
.usage-row { display: grid; grid-template-columns: minmax(130px, 210px) 1fr auto; align-items: center; gap: 16px; padding: 11px 0; }
.usage-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.usage-name { font-weight: 600; font-size: 14px; }
.usage-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.usage-bar .ub { display: block; height: 100%; border-radius: 999px; background: var(--accent2); transition: width .45s ease; }
.usage-bar .ub.warn { background: var(--warn); }
.usage-bar .ub.hot { background: #ef4444; }
.usage-pct { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.usage-unl { font-size: 12.5px; font-weight: 600; color: var(--good); text-align: center; }
.usage-meta { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
/* Not-yet-upgraded states: locked key + Professional allowance preview */
.mcp-key.mcp-key-locked { flex: 1; min-width: 240px; background: var(--bg); color: var(--muted); border: 1px dashed var(--border); white-space: nowrap; }
.usage-tier.locked { color: var(--muted); background: var(--bg); border: 1px solid var(--border); }
.mcp-usage-locked .usage-bar { opacity: .6; }
.mcp-usage-locked .usage-meta a { color: var(--accent2); font-weight: 600; text-decoration: none; }

/* Connector two-column layout: main content + collapsible use-case rail */
.mcp-layout { display: grid; grid-template-columns: minmax(0, 820px) 320px; gap: 26px; align-items: start; justify-content: start; }
.mcp-main { min-width: 0; }
.mcp-aside { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
@media (max-width: 1180px) {
  .mcp-layout { grid-template-columns: 1fr; }
  .mcp-aside { position: static; max-height: none; }
}
.uc-head { margin-bottom: 12px; }
.uc-head h4 { font-family: var(--font-display); margin: 0 0 2px; }
.uc-head p { font-size: 12.5px; color: var(--muted); margin: 0; }
.uc-group { border: 1px solid var(--border); border-radius: 10px; background: var(--card, #fff); margin-bottom: 8px; overflow: hidden; }
.uc-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; font-weight: 600; font-size: 13.5px; user-select: none; }
.uc-group > summary::-webkit-details-marker { display: none; }
.uc-group > summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 16px; transition: transform .2s ease; }
.uc-group[open] > summary::after { transform: rotate(90deg); }
.uc-group[open] > summary { border-bottom: 1px solid var(--border); }
.uc-count { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 8px; }
.uc-list { list-style: none; margin: 0; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 12px; }
.uc-list li { display: flex; flex-direction: column; gap: 3px; }
.uc-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.uc-q { font-size: 12px; color: var(--muted); font-style: italic; border-left: 2px solid var(--pink); padding-left: 8px; line-height: 1.45; }
@media (max-width: 640px) {
  .usage-row { grid-template-columns: 1fr auto; }
  .usage-bar { grid-column: 1 / -1; order: 3; }
}
.mcp-tag { display: inline-block; background: var(--accent2); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; margin-bottom: 12px; }
.mcp-price { margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.mcp-price strong { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--text); }
.mcp-benefits { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 10px; }
.mcp-benefits li { display: flex; gap: 9px; font-size: 14px; color: var(--text); }
.mcp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* Upgrade modal + gate */
.upgrade-modal-overlay { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(18,22,38,.5); backdrop-filter: blur(4px); animation: onbFade .2s ease both; }
.upgrade-modal { position: relative; background: var(--surface); border-radius: 18px; padding: 30px 28px; width: min(440px, 100%); box-shadow: 0 24px 70px rgba(10,16,40,.35); text-align: center; animation: onbRise .3s cubic-bezier(.2,.7,.2,1) both; }
.upgrade-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.upgrade-close:hover { color: var(--text); }
.upgrade-modal h3 { font-size: 20px; margin: 12px 0 8px; }
.upgrade-modal-body { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.upgrade-price { margin-bottom: 20px; color: var(--muted); font-size: 14px; }
.upgrade-price strong { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text); }
.upgrade-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.upgrade-modal-actions .btn { width: 100%; }
.upgrade-msg { font-size: 12.5px; margin-top: 10px; min-height: 14px; }
.upgrade-msg.busy { color: var(--accent); }
.upgrade-msg.err { color: #e5484d; }
.upgrade-gate .mcp-tag { margin-bottom: 12px; }
.upgrade-gate h2 { font-size: 24px; margin-bottom: 8px; }

/* ══════════════════════════════════════════════════════════
   Redesigned auth / login screen
   ══════════════════════════════════════════════════════════ */
.login-screen {
  gap: 6px;
}
.login-screen .login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(16,24,48,.05), 0 24px 60px rgba(16,24,48,.10);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  animation: onbRise .5s cubic-bezier(.2,.7,.2,1) both;
}
.login-card .login-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.login-card h1 { font-size: clamp(24px, 4vw, 30px); margin: 0 0 8px; }
.login-card p.lead { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
.login-card .btn-row { flex-direction: column; gap: 10px; }
.login-card .btn { width: 100%; padding: 13px 18px; }
.login-trust {
  display: flex; justify-content: center; gap: 22px; margin: 22px 0 4px;
}
.login-trust div { text-align: center; }
.login-trust strong {
  display: block; font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--text);
}
.login-trust span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.login-card .fineprint { font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ══════════════════════════════════════════════════════════
   Onboarding — full-page overlay, white with pastel accents
   ══════════════════════════════════════════════════════════ */
body.onb-open { overflow: hidden; }
.onb-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: #fff; overflow-y: auto;
  animation: onbFade .28s ease both;
}
.onb-overlay.onb-out { animation: onbFadeOut .24s ease both; }
.onb-overlay::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(680px circle at 8% 4%, var(--periwinkle), transparent 60%),
    radial-gradient(720px circle at 92% 96%, var(--pink), transparent 60%);
  opacity: .5;
}

.onb-page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.onb-nav { display: flex; align-items: center; justify-content: space-between; padding: 24px 34px; }
.onb-logo { height: 22px; width: auto; display: block; }
.onb-skip { background: none; border: 0; cursor: pointer; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; }
.onb-skip:hover { color: var(--text); }

.onb-inner {
  flex: 1; width: 100%; max-width: 760px; margin: 0 auto;
  padding: 40px 24px 48px; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; text-align: center;
}
.onb-progress { display: flex; gap: 6px; width: min(340px, 100%); margin-bottom: 34px; }
.onb-seg { height: 5px; flex: 1; border-radius: 99px; background: var(--border); transition: background .35s ease; }
.onb-seg.done { background: var(--accent2); }
.onb-seg.active { background: rgba(244,119,246,.45); }

.onb-step { width: 100%; animation: onbSlide .34s cubic-bezier(.2,.7,.2,1) both; display: flex; flex-direction: column; align-items: center; }
.onb-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.onb-title { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; margin-bottom: 8px; text-wrap: balance; }
.onb-sub { color: var(--muted); font-size: 15px; margin-bottom: 32px; max-width: 460px; }

/* The 3-column grid's min-content is ~970px (the card labels are nowrap and the
   items keep min-width:auto), which exceeds .onb-inner's 712px content box. With
   `width:100%` the grid overflowed to the RIGHT and read as off-centre against
   the centred heading. Giving it its own width lets .onb-step's align-items:center
   centre it properly, overflowing evenly on both sides. Don't switch the columns
   to minmax(0,1fr) instead — that fits, but clips every card subtitle. */
.onb-options { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 72px; gap: 12px; width: min(992px, calc(100vw - 48px)); min-height: 156px; align-content: start; }
.onb-opt {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 15px; height: 72px;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
  animation: onbPop .34s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0ms);
}
.onb-opt:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,73,255,.08); }
.onb-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.onb-opt-ic { flex: 0 0 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.onb-opt-ic svg { width: 21px; height: 21px; }
.onb-opt.sel .onb-opt-ic { background: var(--accent); color: #fff; }
.onb-opt-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow: hidden; }
.onb-opt-txt strong { font-size: 14.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-opt-txt em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-opt-check { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.6); transition: all .18s ease; }
.onb-opt-check svg { width: 12px; height: 12px; }
.onb-opt.sel .onb-opt-check { opacity: 1; transform: scale(1); background: var(--accent); border-color: var(--accent); }

/* Stacked steps (pains & goals): full-width vertical list */
.onb-options.stack { grid-template-columns: 1fr; grid-auto-rows: auto; min-height: 0; max-width: 540px; margin: 0 auto; gap: 10px; }
.onb-options.stack .onb-opt { height: auto; min-height: 58px; }
.onb-options.stack .onb-opt-txt strong { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
.onb-hint { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 14px; transition: color .2s; }
.onb-hint.full { color: var(--accent2); }
.onb-hint.flash { color: #e5484d; }

/* Actions & buttons */
.onb-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; gap: 12px; width: 100%; max-width: 520px; }
.onb-actions.center { justify-content: center; gap: 20px; }
.onb-btn { font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border-radius: 11px; padding: 12px 30px; border: 1.5px solid transparent; transition: background .15s, border-color .15s, opacity .15s, transform .1s; }
.onb-btn:active { transform: translateY(1px); }
.onb-btn.primary { background: var(--accent); color: #fff; }
.onb-btn.primary:hover { background: #0039cc; }
.onb-btn.primary:disabled { opacity: .4; cursor: not-allowed; }
.onb-btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.onb-btn.ghost:hover { border-color: #c9cfdb; }
.onb-btn.outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.onb-btn.outline:hover { background: var(--accent-soft); }
.onb-btn.link { background: none; border: 0; color: var(--muted); padding: 12px 8px; }
.onb-btn.link:hover { color: var(--accent); }
.onb-btn.full { width: 100%; margin-top: 4px; }

/* Name field */
.onb-input { flex: 1; min-width: 0; font-family: inherit; font-size: 14px; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); outline: none; transition: border-color .15s; }
.onb-input:focus { border-color: var(--accent); }
.onb-input.bad { border-color: #e5484d; }
.onb-name-field { width: 100%; max-width: 400px; margin: 2px auto 0; }
.onb-name-input { text-align: center; font-size: 18px; font-weight: 600; padding: 15px 18px; }
.onb-name-input::placeholder { font-weight: 500; color: var(--muted); }

/* Greeting */
.onb-greet { text-align: center; display: flex; flex-direction: column; align-items: center; }
.onb-greet-mark { width: 74px; height: 74px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-bottom: 24px; box-shadow: 0 12px 34px rgba(244,119,246,.32); animation: greetPop .5s cubic-bezier(.2,.8,.2,1) both; }
.onb-greet-mark svg { width: 34px; height: 34px; }
.onb-greet-title { font-size: clamp(28px, 5vw, 40px); line-height: 1.12; margin-bottom: 10px; text-wrap: balance; animation: greetUp .5s .08s cubic-bezier(.2,.7,.2,1) both; }
.onb-greet-sub { font-size: 16px; color: var(--muted); margin-bottom: 30px; animation: greetUp .5s .16s cubic-bezier(.2,.7,.2,1) both; }
.onb-greet .onb-btn { animation: greetUp .5s .24s cubic-bezier(.2,.7,.2,1) both; }

/* Invite team panel */
.onb-invite { width: 100%; max-width: 520px; margin: 20px auto 0; text-align: left; animation: onbPop .3s cubic-bezier(.2,.7,.2,1) both; }
.onb-invite[hidden] { display: none; }
.onb-invite-label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 9px; }
.onb-invite-label span { font-weight: 500; color: var(--muted); }
.onb-invite-row { display: flex; gap: 8px; }
.onb-add { padding: 11px 20px; white-space: nowrap; }
.onb-invite-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.onb-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px 9px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 13.5px; color: var(--text); animation: onbPop .22s ease both; }
.onb-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.onb-chip button:hover { color: #e5484d; }
.onb-invite-empty { font-size: 12.5px; color: var(--muted); margin-top: 9px; }

/* Plans */
.onb-billing { display: inline-flex; gap: 4px; background: #eef0f6; padding: 4px; border-radius: 11px; margin-bottom: 22px; }
.onb-billing button { border: 0; background: transparent; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 16px; border-radius: 8px; display: inline-flex; align-items: center; gap: 8px; }
.onb-billing button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.onb-save { font-size: 10.5px; font-weight: 700; color: var(--accent2); background: rgba(244,119,246,.14); padding: 2px 7px; border-radius: 99px; }
.onb-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 660px; align-items: stretch; }
.onb-plan { position: relative; border: 1.5px solid var(--border); border-radius: 16px; padding: 22px 20px; display: flex; flex-direction: column; text-align: left; background: var(--surface); animation: onbPop .34s cubic-bezier(.2,.7,.2,1) both; }
.onb-plan.hot { border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,73,255,.12); }
.onb-plan.rec { border-color: var(--accent); }
.onb-plan-badge { position: absolute; top: -11px; left: 20px; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.onb-plan-badge.muted { background: #eef0f6; color: var(--muted); }
.onb-plan h3 { font-size: 18px; margin-bottom: 2px; }
.onb-plan-price { margin-bottom: 2px; color: var(--muted); font-size: 13px; }
.onb-plan-price strong { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--text); }
.onb-plan-subprice { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.onb-plan-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.onb-plan-plus { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.onb-plan ul { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.onb-plan li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text); }
.onb-plan li svg { width: 15px; height: 15px; color: var(--good); flex-shrink: 0; margin-top: 2px; }
.onb-plan-enterprise { font-size: 12.5px; color: var(--muted); margin-top: 16px; }
.onb-fineprint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 20px; }
.onb-fineprint.busy { color: var(--accent); }

/* Aha moment (replaces the Team step) */
.onb-statbig { font-family: var(--font-display); font-size: clamp(46px, 9vw, 66px); font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; margin: 4px 0 6px; }
.onb-statlabel { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; max-width: 460px; }
.onb-ahaquote { font-size: 18px; font-style: italic; font-weight: 650; line-height: 1.42; color: var(--text); border-left: 3px solid var(--accent); padding: 2px 0 2px 15px; margin: 0 auto 20px; max-width: 470px; text-align: left; }
.onb-solved { width: 100%; max-width: 470px; text-align: left; margin: 0 auto 18px; }
.onb-solved-k, .onb-prodbox-k, .onb-benefits-k { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.onb-solved ul, .onb-benefits-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.onb-solved li, .onb-benefits-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text); }
.onb-solved li svg, .onb-benefits-list li svg { width: 15px; height: 15px; color: var(--good); flex-shrink: 0; margin-top: 2px; }
.onb-prodbox { width: 100%; max-width: 470px; text-align: left; background: var(--accent-soft); border-radius: 10px; padding: 13px 16px; margin: 0 auto; font-size: 14px; color: var(--text); }
.onb-prodbox b { color: var(--text); font-weight: 700; }

/* Plan split: recommended plan + aha benefits */
.onb-splitwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 680px; align-items: stretch; text-align: left; }
.onb-benefits { border: 1.5px solid var(--border); border-radius: 16px; padding: 22px 20px; background: #fbfcff; display: flex; flex-direction: column; }
.onb-benefits-quote { font-size: 15px; font-style: italic; font-weight: 600; line-height: 1.4; color: var(--text); margin-bottom: 14px; }
.onb-benefits-sub { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 9px; }
.onb-benefits-list { margin-bottom: 16px; }
.onb-benefits .onb-prodbox { max-width: none; margin: auto 0 0; }
@media (max-width: 720px) { .onb-splitwrap { grid-template-columns: 1fr; } }

/* Proof + completion */
.onb-proof { position: relative; z-index: 1; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; padding: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.onb-proof b { color: var(--text); font-family: var(--font-display); font-weight: 800; }
.onb-proof span { white-space: nowrap; }
.onb-done { text-align: center; display: flex; flex-direction: column; align-items: center; }
.onb-done .tick { width: 64px; height: 64px; margin-bottom: 18px; border-radius: 50%; background: var(--good); color: #fff; display: flex; align-items: center; justify-content: center; animation: onbPop .4s cubic-bezier(.2,.7,.2,1) both; }
.onb-done .tick svg { width: 32px; height: 32px; }
.onb-done h1 { font-size: clamp(24px,4vw,32px); margin-bottom: 8px; }
.onb-done p { color: var(--muted); font-size: 15px; margin-bottom: 22px; max-width: 420px; }

/* Animations */
@keyframes onbFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes onbFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes onbSlide { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes onbPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes greetPop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes greetUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .onb-nav { padding: 20px; }
  .onb-inner { padding: 28px 20px 40px; }
  .onb-options { grid-template-columns: 1fr; width: 100%; }
  /* Single column: the card's min-content (~361px, the longest nowrap label) is
     wider than a phone viewport, which pushed the page into horizontal scroll.
     Full-width cards have room to ellipsize, so let the items shrink here. */
  .onb-opt { min-width: 0; }
  .onb-plans { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .onb-overlay, .onb-step, .onb-opt, .onb-plan, .onb-greet-mark, .onb-greet-title, .onb-greet-sub, .onb-greet .onb-btn, .tick, .login-card { animation: none !important; }
}

/* ── My Reports ── */
.mnr-status { }
.mnr-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.mnr-badge-member { background: #eafaf3; color: #0a8f5b; }
.mnr-meter { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.mnr-meter-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s ease; }
.mnr-list { display: flex; flex-direction: column; gap: 10px; }
.mnr-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--bg-card, #fff); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.mnr-item:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(16,24,40,.08); transform: translateY(-1px); text-decoration: none; }
.mnr-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.mnr-thumb { flex: 0 0 auto; width: 88px; height: 62px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, var(--periwinkle), var(--pink)); border: 1px solid var(--border); }
.mnr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 560px) { .mnr-thumb { width: 64px; height: 48px; } }
.mnr-item-title { font-weight: 600; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.mnr-item-meta { font-size: 12.5px; color: var(--muted); }
.mnr-kind { font-weight: 700; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.mnr-kind.is-report { background: #eaf0ff; color: var(--accent); }
.mnr-kind.is-article { background: #fdeafe; color: #b5179e; }
.mnr-open { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.mnr-home-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
