/* ScaleQor component styles — built on scaleqor-tokens.css custom properties only. */

*, *::before, *::after { box-sizing: border-box; }
body { font-size: var(--text-base); }
img { max-width: 100%; }
.scq-container { max-width: 1180px; margin: 0 auto; padding: 0 var(--space-6); }

/* ---------- Buttons ---------- */
.scq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--text-base);
  border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer;
  height: 40px; padding: 0 var(--space-5); line-height: 1; text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-calm), color var(--duration-fast) var(--ease-calm), border-color var(--duration-fast) var(--ease-calm);
  white-space: nowrap;
}
.scq-btn:disabled { opacity: .55; cursor: not-allowed; }
.scq-btn-lg { height: 48px; font-size: var(--text-md); padding: 0 var(--space-6); }
.scq-btn-sm { height: 32px; font-size: var(--text-sm); padding: 0 var(--space-4); }
.scq-btn-block { width: 100%; }
.scq-btn-primary { background: var(--interactive); color: var(--white); }
.scq-btn-primary:hover:not(:disabled) { background: var(--interactive-hover); }
.scq-btn-primary:active:not(:disabled) { background: var(--interactive-active); }
.scq-btn-ondark { background: var(--charcoal-700); color: var(--dark-text-body); border-color: var(--dark-border); }
.scq-btn-ondark:hover:not(:disabled) { background: var(--violet-600); color: var(--white); }
.scq-btn-ghost { background: transparent; color: var(--interactive); border-color: var(--border-strong); }
.scq-btn-ghost:hover:not(:disabled) { background: var(--violet-50); }
.scq-btn-text { background: transparent; color: var(--interactive); height: auto; padding: 0; border: none; font-size: var(--text-sm); }
.scq-btn-text:hover:not(:disabled) { color: var(--interactive-hover); text-decoration: underline; }
.scq-btn-text.scq-btn-danger-text { color: var(--error); }
.scq-btn-danger { background: transparent; color: var(--error); border-color: rgba(226,122,108,.4); }
.scq-btn-danger:hover:not(:disabled) { background: var(--error-bg); }

/* ---------- Cards ---------- */
.scq-card {
  background: var(--surface-card); border: 1px solid var(--border-thin); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: var(--space-6);
}
.scq-card-dark {
  background: var(--dark-surface-card); border: 1px solid var(--dark-border); border-radius: var(--radius-lg);
  padding: var(--space-6); color: var(--dark-text-body);
}
.scq-card-dark h2, .scq-card-dark h3 { color: var(--white); }

/* ---------- Forms ---------- */
.scq-field { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-4); }
.scq-label { font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--text-sm); color: var(--text-body); }
.scq-card-dark .scq-label { color: var(--dark-text-body); }
.scq-input, .scq-select {
  font-family: var(--font-body); font-size: var(--text-base); color: var(--text-body);
  background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  height: 44px; padding: 0 var(--space-4); width: 100%;
}
.scq-input:focus, .scq-select:focus { outline: none; box-shadow: var(--shadow-focus); border-color: var(--interactive); }
.scq-input.is-invalid { border-color: var(--error); }
@media (max-width: 767.98px) {
/* PR #752 forms on a phone */
/* One column. !important because Settings and ProfileForm set their grid inline. */
.scq-form-grid { grid-template-columns: 1fr !important; }
.scq-form-grid > .scq-field { min-width: 0; }
div.scq-row-2 { grid-template-columns: 1fr; }
.scq-form-add { flex-direction: column; }
.scq-form-save { width: 100%; justify-content: center; }
/* end PR #752 */
}
.scq-card-dark .scq-input, .scq-card-dark .scq-select {
  background: var(--charcoal-900); border-color: var(--dark-border); color: var(--dark-text-body);
}
.scq-select-ondark, .scq-input-ondark {
  background: var(--charcoal-900); border-color: var(--dark-border); color: var(--dark-text-body);
}
.scq-password-wrap { position: relative; }
.scq-password-wrap .scq-input { padding-right: 44px; }
.scq-password-toggle {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0; cursor: pointer; color: var(--text-muted);
}
.scq-password-toggle:hover { color: var(--text-body); }
/* PR #318. The Account page's change-password fields sit on a dark card, where the light-theme greys vanish. */
.scq-card-dark .scq-password-toggle { color: var(--dark-text-muted); }
.scq-card-dark .scq-password-toggle:hover { color: var(--dark-text-body); }
.scq-password-toggle .scq-eye-closed { display: none; }
.scq-password-toggle.is-visible .scq-eye-open { display: none; }
.scq-password-toggle.is-visible .scq-eye-closed { display: block; }
.scq-hint { font-size: var(--text-xs); color: var(--text-muted); }
.scq-hint.is-invalid { color: var(--error); }
.scq-card-dark .scq-hint { color: var(--dark-text-muted); }
.scq-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.scq-checkbox-row { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.scq-checkbox-row input { margin-top: 3px; }

.scq-switch { position: relative; display: inline-flex; align-items: center; width: 40px; height: 22px; flex: none; }
.scq-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.scq-switch-track { position: absolute; inset: 0; background: var(--border-strong); border-radius: var(--radius-full); transition: background var(--duration-fast) var(--ease-calm); }
.scq-switch-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform var(--duration-fast) var(--ease-calm); }
.scq-switch input:checked ~ .scq-switch-track { background: var(--interactive); }
.scq-switch input:checked ~ .scq-switch-thumb { transform: translateX(18px); }
.scq-card-dark .scq-switch-track { background: var(--charcoal-700); }

/* ---------- Badges / pills ---------- */
.scq-pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-full);
  font-family: var(--font-display); font-weight: var(--weight-medium); font-size: 11px;
  padding: 3px 10px; border: 1px solid transparent; line-height: 1.4; white-space: nowrap;
}
.scq-pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.scq-badge-fact { color: var(--claim-fact); background: rgba(82,199,147,.13); border-color: rgba(82,199,147,.35); }
.scq-badge-infer { color: var(--claim-infer); background: rgba(141,160,236,.13); border-color: rgba(141,160,236,.35); }
.scq-badge-rec { color: var(--claim-rec); background: rgba(232,197,99,.13); border-color: rgba(232,197,99,.35); }
.scq-badge-ask { color: var(--claim-ask); background: rgba(227,185,79,.13); border-color: rgba(227,185,79,.35); }
.scq-badge-miss { color: var(--claim-miss); background: rgba(226,122,108,.13); border-color: rgba(226,122,108,.35); }
.scq-badge-neutral { color: var(--dark-text-muted); background: var(--charcoal-700); border-color: var(--dark-border); }
.scq-badge-verified { color: var(--claim-fact); background: rgba(82,199,147,.13); border-color: rgba(82,199,147,.35); }
.scq-badge-unverified { color: var(--claim-ask); background: rgba(227,185,79,.13); border-color: rgba(227,185,79,.35); }

/* ---------- Auth pages (Static SSR, light) ---------- */
.scq-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-6); background: var(--canvas); }
.scq-auth-shell { width: 100%; max-width: 460px; }
/* PR #612. The onboarding wizard's list and pick steps need the width of the Profile form. */
.scq-auth-shell:has(.scq-wizard-wide) { max-width: 760px; }
.scq-auth-logo { display: flex; justify-content: center; margin-bottom: var(--space-5); }
.scq-auth-logo img { height: 32px; }
.scq-auth-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: var(--space-7) var(--space-6); }
.scq-auth-card-center { text-align: center; }
.scq-auth-card h1 { font-size: var(--text-xl); margin: 0 0 var(--space-2); }
.scq-auth-sub { color: var(--text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-5); }
.scq-auth-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--violet-50); color: var(--violet-600); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-4); }
.scq-auth-footer { text-align: center; font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-5); }
.scq-auth-divider { border: none; border-top: 1px solid var(--border-thin); margin: var(--space-5) 0; }
.scq-callout { background: var(--violet-50); border: 1px solid var(--violet-100); border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-4); }
.scq-callout-row { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }

/* ---------- Marketing / public ---------- */
.scq-nav { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--border-thin); height: 64px; display: flex; align-items: center; }
.scq-nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.scq-nav-links { display: flex; align-items: center; gap: var(--space-6); }
.scq-nav-links a:not(.scq-btn) { color: var(--text-body); text-decoration: none; font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--text-sm); }
/* PR #755 public pages on a phone */
.scq-nav-menu { display: none; }
@media (max-width: 767.98px) {
  .scq-nav-links { gap: var(--space-3); }
  .scq-nav-links > a:not(.scq-btn) { display: none; }
  .scq-nav-links > .scq-btn { min-height: 44px; }
  .scq-nav-menu { display: block; position: relative; }
  .scq-nav-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 var(--space-3); border: 1px solid var(--border-thin); border-radius: var(--radius-md); font-family: var(--font-display); font-weight: var(--weight-medium); font-size: var(--text-sm); color: var(--text-body); }
  .scq-nav-menu > summary::-webkit-details-marker { display: none; }
  .scq-nav-menu-sheet { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border-thin); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: var(--space-2) 0; }
  .scq-nav-menu-sheet a { display: flex; align-items: center; min-height: 44px; padding: 0 var(--space-4); }
  .scq-public-footer a, .scq-nav-home { min-height: 44px; display: inline-flex; align-items: center; }
  .scq-public-cols { grid-template-columns: minmax(0, 1fr) !important; }
  .scq-hero h1 { font-size: var(--text-3xl) !important; }
  .scq-hero .scq-btn-lg, .scq-public-cta .scq-btn-lg { white-space: normal; height: auto; min-height: 48px; padding-top: var(--space-2); padding-bottom: var(--space-2); text-align: center; line-height: 1.3; }
}
/* end PR #755 */
.scq-hero { padding: var(--space-9) 0; }
.scq-eyebrow { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--violet-600); }

/* ---------- App shell (Interactive Server: Portal + Admin) ---------- */
.scq-shell { display: flex; min-height: 100vh; background: var(--dark-surface-page); color: var(--dark-text-body); }
.scq-rail { width: 76px; flex: none; background: var(--dark-surface-page); border-right: 1px solid var(--dark-border); display: flex; flex-direction: column; align-items: center; padding: var(--space-4) 0; position: sticky; top: 0; height: 100vh; }
.scq-rail-logo { width: 36px; height: 36px; margin-bottom: var(--space-6); }
.scq-rail-btn {
  width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  color: var(--dark-text-muted); background: transparent; border: none; text-decoration: none; margin-bottom: var(--space-2); cursor: pointer; position: relative;
}
.scq-rail-btn:hover { color: var(--white); }
/* The rail is thirteen unlabelled icons, and the founder who commissioned it could not find the
   endpoint-health page in it. The native title tooltip arrives about a second late and sits where
   the cursor is; this names the destination immediately, beside the icon it belongs to. */
.scq-rail-btn::after {
  content: attr(title); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--dark-surface-raised, #1c1c24); color: var(--white); border: 1px solid var(--dark-border);
  border-radius: var(--radius-md); padding: 6px 10px; font-size: var(--text-xs); line-height: 1.2;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .08s ease; z-index: 40;
}
.scq-rail-btn:hover::after, .scq-rail-btn:focus-visible::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .scq-rail-btn::after { transition: none; } }
/* PR #297. The tooltip above needs a hover, which a phone or tablet never delivers - there the rail was a
   column of unlabelled icons. Where there is no hover (or the screen is narrow) the same title text
   becomes a caption under each icon instead. */
@media (max-width: 768px), (hover: none) {
  .scq-rail { overflow-y: auto; }
  .scq-rail-btn { width: 64px; height: auto; min-height: 44px; padding: 6px 2px; flex-direction: column; gap: 2px; }
  .scq-rail-btn::after {
    position: static; transform: none; opacity: 1; background: none; border: none; padding: 0;
    font-size: 10px; line-height: 1.15; white-space: normal; text-align: center; overflow-wrap: anywhere;
  }
}
.scq-rail-btn.active { background: var(--violet-600); color: var(--white); }
.scq-rail-btn[disabled] { opacity: .4; cursor: default; }
.scq-rail-spacer { margin-top: auto; }
/* Second-level admin nav. The rail carries five sections; these are the pages inside one. */
.scq-section-tabs { display: flex; gap: var(--space-4); flex-wrap: wrap; border-bottom: 1px solid var(--dark-border); margin-bottom: var(--space-5); }
.scq-section-tab {
  padding: 0 0 var(--space-3); color: var(--dark-text-muted); text-decoration: none; font-size: var(--text-sm);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.scq-section-tab:hover { color: var(--white); }
.scq-section-tab.active { color: var(--white); border-bottom-color: var(--violet-600); }
.scq-rail-dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }

.scq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.scq-topbar { height: 60px; flex: none; border-bottom: 1px solid var(--dark-border); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-6); }
.scq-topbar-left { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: var(--weight-semibold); }
.scq-topbar-sub { color: var(--dark-text-muted); font-weight: var(--weight-regular); font-size: var(--text-sm); }
.scq-topbar-right { display: flex; align-items: center; gap: var(--space-4); font-size: var(--text-sm); color: var(--dark-text-muted); position: relative; }
.scq-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--violet-600); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-sm);
  border: none; cursor: pointer;
}
/* The avatar menu is a <details>, not a Blazor toggle: layouts render statically, so a click handler in one
   never fired and the menu could not be opened. <summary> is the avatar; the browser owns open/closed. */
.scq-avatar-menu { position: relative; }
.scq-avatar-menu > summary { list-style: none; }
.scq-avatar-menu > summary::-webkit-details-marker { display: none; }
.scq-user-menu { position: absolute; top: 48px; right: 0; width: 230px; background: var(--dark-surface-card); border: 1px solid var(--dark-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-2); z-index: 30; }
.scq-user-menu-header { padding: var(--space-3); border-bottom: 1px solid var(--dark-border); margin-bottom: var(--space-2); }
.scq-user-menu a, .scq-user-menu button { display: block; width: 100%; text-align: left; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--dark-text-body); text-decoration: none; background: none; border: none; font-size: var(--text-sm); cursor: pointer; }
.scq-user-menu a:hover, .scq-user-menu button:hover { background: var(--charcoal-700); }
.scq-admin-pill { background: var(--gold-100); color: var(--gold-600); }

.scq-profile-tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--dark-border); margin-bottom: var(--space-5); }
.scq-profile-tab {
  display: inline-block; padding: 0 0 var(--space-3); font-weight: var(--weight-medium); font-size: var(--text-sm);
  color: var(--dark-text-muted); text-decoration: none; border-bottom: 2px solid transparent; cursor: pointer;
}
.scq-profile-tab:hover { color: var(--dark-text-body); }
.scq-profile-tab.active { color: var(--gold-500); border-bottom-color: var(--gold-500); }
.scq-profile-tab.is-locked { color: var(--dark-text-muted); opacity: .6; cursor: default; }
/* PR #297. Why a tab is locked was a title tooltip only, which a touch screen never shows. The greyed tab
   now says so in words; opacity went from .45 to .6 so those words stay legible. */
.scq-tab-note { margin-left: var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-regular); }

/* PR #748 tab strips scroll on a phone. The Leads strip is 461px of tabs; 7 of them were unreachable at 375px.
   One scroller, no wrapping, momentum, no scrollbar, a fade at the right cut edge (the padding keeps the last
   tab clear of the fade when scrolled to the end), tabs 44px tall. scripts: wwwroot/js/scq-tabs.js. */
@media (max-width: 767.98px) {
  .scq-profile-tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain;
    padding-right: var(--space-6);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .scq-profile-tabs::-webkit-scrollbar { display: none; }
  .scq-profile-tab {
    display: inline-flex; align-items: center; flex: none; white-space: nowrap; min-height: 44px;
  }
}


.scq-body { flex: 1; padding: var(--space-6); overflow-x: hidden; }
/* No outer cap. A fixed 1100px left roughly 300px of a 1500px screen empty while the leads table
   scrolled horizontally INSIDE it — the widest content on the page fighting for room next to blank
   space. Tables, charts and card grids should use the screen.

   Prose still needs a measure, so paragraphs get one here rather than the whole page being narrowed
   to suit them. This is a stylesheet rule, so a page that sets its own inline max-width still wins —
   several already do (66ch, 64ch, 640px) and those choices are preserved. Anything wider than a
   paragraph — table, grid, card row — is untouched and fills the width.

   72ch is around 90 characters at this size: wider than the classic 66 because this is dense admin
   copy read in short bursts, not long-form text. */
.scq-body-inner { max-width: none; }
.scq-body-inner p { max-width: 72ch; }

.scq-support-banner { background: #3A2E12; color: #E3B94F; padding: var(--space-3) var(--space-6); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }

/* PR #742 phone shell */
/* Portal only (.scq-portal on PortalLayout's shell; the admin console keeps its rail). Below 768px the rail gives way
   to a bottom bar and the content takes the full width. The installed app (display-mode: standalone) also gets a
   back control. Light-theme colours for the bar are with the rail's, in the light theme block. */
.scq-phone-nav, .scq-phone-back { display: none; }
@media (max-width: 767.98px) {
  .scq-portal .scq-rail { display: none; }
  .scq-portal .scq-topbar { height: auto; min-height: 60px; padding: var(--space-2) var(--space-4); }
  .scq-portal .scq-topbar-left { flex-wrap: wrap; min-width: 0; }
  .scq-portal .scq-toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .scq-portal .scq-body { padding: var(--space-4); padding-bottom: calc(72px + var(--space-4) + env(safe-area-inset-bottom)); }
  .scq-support-banner { padding: var(--space-3) var(--space-4); flex-wrap: wrap; }
  .scq-phone-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--dark-surface-page); border-top: 1px solid var(--dark-border); padding-bottom: env(safe-area-inset-bottom);
  }
  .scq-phone-nav > a, .scq-phone-more > summary {
    flex: 1; min-width: 44px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 11px; line-height: 1.15; color: var(--dark-text-muted); text-decoration: none; list-style: none; cursor: pointer;
  }
  .scq-phone-more > summary::-webkit-details-marker { display: none; }
  .scq-phone-nav > a.active { color: var(--white); box-shadow: inset 0 2px 0 var(--violet-600); }
  .scq-phone-more { flex: 1; display: flex; }
  .scq-phone-more > summary { width: 100%; }
  .scq-phone-more[open] > summary { color: var(--white); }
  .scq-phone-sheet {
    position: absolute; left: 0; right: 0; bottom: 100%; background: var(--dark-surface-card); border-top: 1px solid var(--dark-border);
    box-shadow: var(--shadow-lg); padding: var(--space-2) var(--space-3);
  }
  .scq-phone-sheet a, .scq-phone-sheet button {
    display: block; width: 100%; text-align: left; min-height: 44px; padding: var(--space-3); border-radius: var(--radius-sm);
    color: var(--dark-text-body); text-decoration: none; background: none; border: none; font-size: var(--text-sm); cursor: pointer;
  }
  .scq-phone-sheet a:hover, .scq-phone-sheet button:hover { background: var(--charcoal-700); }
  /* The feedback button sat bottom-right over content; here it is smaller and above the bar. */
  .scq-portal ~ .scq-feedback-fab {
    width: 44px; height: 44px; right: var(--space-3); bottom: calc(68px + env(safe-area-inset-bottom));
  }
  body:has(.scq-phone-more[open]) .scq-feedback-fab { display: none; } /* progressive: where :has is missing the button just overlaps the sheet */
}
@media (max-width: 767.98px) and (display-mode: standalone) {
  .scq-phone-back {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: calc(var(--space-2) * -1);
    background: none; border: none; color: var(--dark-text-body); font-size: 28px; line-height: 1; cursor: pointer;
  }
}
/* end PR #742 phone shell */

/* ---------- Dashboard layout ---------- */
.scq-dash-grid { display: grid; grid-template-columns: 1fr 316px; gap: var(--space-6); align-items: start; }
@media (max-width: 900px) { .scq-dash-grid { grid-template-columns: 1fr; } }
.scq-section-card { margin-bottom: var(--space-5); }
.scq-section-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: var(--space-3); margin-bottom: var(--space-2); border-bottom: 1px solid var(--dark-border); }
.scq-section-head h2 { margin: 0; font-size: var(--text-md); color: var(--white); }
.scq-section-source { font-size: var(--text-xs); color: var(--dark-text-muted); }

/* PR #728: the Virtual Employee approvals card on a phone. minmax(0, 1fr) stops the column growing to the textarea's intrinsic width;
   .scq-input's fixed 44px height is replaced so the email box shows at least its eight lines and grows with the text (field-sizing
   where supported, rows="8" elsewhere). Under 16px iOS zooms the page when the box is focused. */
.scq-ve-emails { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); max-width: 78ch; }
.scq-ve-emails .scq-field { overflow-wrap: anywhere; }
.scq-ve-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.scq-ve-draft { height: auto; min-height: calc(8 * 1.5em + 2 * var(--space-2)); max-height: 70vh; field-sizing: content; padding: var(--space-2) var(--space-4); line-height: 1.5; resize: vertical; }
@media (max-width: 768px) { .scq-ve-draft { font-size: max(16px, var(--text-base)); } }

/* ---------- Claim rows ---------- */
.scq-claim-row { display: flex; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--dark-border); align-items: flex-start; }
.scq-claim-row:last-child { border-bottom: none; }
.scq-claim-main { flex: 1; min-width: 0; }
.scq-claim-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.scq-claim-label { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 13.5px; color: var(--white); }
.scq-claim-value { font-size: var(--text-base); color: var(--dark-text-body); margin: 2px 0 4px; }
.scq-claim-value.is-struck { text-decoration: line-through; color: var(--dark-text-muted); }
.scq-claim-source { font-size: var(--text-xs); color: var(--dark-text-muted); }
.scq-claim-actions { flex: none; display: flex; align-items: center; gap: var(--space-3); }
.scq-resolved-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: var(--weight-medium); }
.scq-resolved-tag.good { color: var(--claim-fact); }
.scq-resolved-tag.muted { color: var(--dark-text-muted); }

/* ---------- Sidebar ---------- */
.scq-sidebar { position: sticky; top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.scq-progress-track { height: 8px; background: var(--charcoal-700); border-radius: var(--radius-full); overflow: hidden; }
.scq-progress-fill { height: 100%; background: var(--violet-500); border-radius: var(--radius-full); transition: width var(--duration-slow) var(--ease-calm); }
.scq-progress-label { font-size: var(--text-sm); color: var(--dark-text-muted); margin-top: var(--space-2); }
/* PR #612. A scan reports no percentage, so a running one moves rather than claiming a figure. */
.scq-progress-fill.is-running { animation: scq-progress-run 1.6s ease-in-out infinite; }
@keyframes scq-progress-run { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .scq-progress-fill.is-running { animation: none; } }
.scq-progress-open { display: flex; align-items: center; gap: 8px; margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--dark-border); font-size: var(--text-sm); }
.scq-gold-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); flex: none; }

/* ---------- Table (admin) ---------- */

/* Real <table> elements on the dark consoles. Three pages carried class="scq-table" while no
   such rule existed, so all three rendered as unstyled browser default: no header rule, no row
   separators, columns touching. Only visible by looking at the pages. */
.scq-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); color: var(--dark-text-body); font-variant-numeric: tabular-nums; }
.scq-table th {
  text-align: left; font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-label); color: var(--dark-text-muted); font-weight: var(--weight-medium);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--dark-border); white-space: nowrap;
}
.scq-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--dark-border); }
.scq-table tbody tr:last-child td { border-bottom: none; }
.scq-table tbody tr:hover td { background: var(--charcoal-900); }
.scq-table-scroll { overflow-x: auto; }
.scq-table th.num, .scq-table td.num { text-align: right; white-space: nowrap; }
.scq-toolbar { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; margin-bottom: var(--space-5); color: var(--dark-text-body); }
.scq-sub { color: var(--dark-text-muted); margin-bottom: var(--space-4); }
.scq-sub strong { color: var(--white); }
/* PR #298. Used by pages but defined nowhere, so they fell back to the browser default (dark heading text on
   the dark shell). scq-h1 matches the inline style the other admin pages give their <h1>; scq-h2 is the
   section heading under it; scq-notice is a neutral status line in the gold-edged card style of "Needs your
   attention" (NeedsReview shows both confirmations and errors in it, so it carries no success/error colour). */
.scq-h1 { color: var(--white); margin-bottom: 4px; }
.scq-h2 { color: var(--white); font-size: var(--text-md); margin: var(--space-5) 0 var(--space-2); }
.scq-notice {
  background: var(--dark-surface-card); border: 1px solid var(--dark-border); border-left: 3px solid var(--gold-500);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); color: var(--dark-text-body);
}
.scq-table-card { padding: 0; overflow: hidden; }
.scq-table-head, .scq-table-row {
  display: grid; grid-template-columns: 2.1fr 1fr 1.1fr 1.5fr 1fr 150px; gap: var(--space-3);
  padding: var(--space-4) var(--space-5); align-items: center;
}
.scq-table-head { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--dark-text-muted); border-bottom: 1px solid var(--dark-border); }
.scq-sort { background: transparent; border: none; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; }
.scq-sort:hover { color: var(--white); }
.scq-sort-arrow { opacity: .6; }
.scq-table-row { border-bottom: 1px solid var(--dark-border); }
.scq-table-row:last-child { border-bottom: none; }
@media (max-width: 767.98px) {
  /* PR #753 generator and ICP tables on a phone */
  .scq-phone-stack { display: block; min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
  .scq-phone-stack thead, .scq-phone-stack .scq-table-head { display: none; }
  .scq-phone-stack tbody { display: block; }
  .scq-phone-stack tr, .scq-phone-stack .scq-table-row { display: block; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--dark-border); }
  .scq-phone-stack tr:last-child, .scq-phone-stack .scq-table-row:last-child { border-bottom: none; }
  .scq-phone-stack td, .scq-phone-stack th, .scq-phone-stack .scq-table-row > span { display: block; padding: 2px 0; border-bottom: none; text-align: left; width: auto !important; overflow-wrap: anywhere; }
  .scq-phone-stack td.num { text-align: left; white-space: normal; }
  .scq-phone-stack td:empty { display: none; }
  .scq-phone-stack [data-label]::before { content: attr(data-label) ": "; color: var(--dark-text-muted); font-size: var(--text-xs); }
  .scq-phone-stack [data-cell="title"] { font-weight: 600; }
  .scq-phone-stack tr:has(> td > input[type="checkbox"]) { display: flex; flex-wrap: wrap; align-items: center; padding: 0 var(--space-4); }
  .scq-phone-stack td:has(> input[type="checkbox"]) { flex: 0 0 44px; width: 44px !important; height: 44px; display: flex; align-items: center; justify-content: center; }
  .scq-phone-stack td:has(> input[type="checkbox"]) + td { flex: 1 1 0; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 11px 0; }
  .scq-phone-stack td:has(> input[type="checkbox"]) + td ~ td { flex: 1 1 100%; padding-left: 44px; }
  .scq-phone-stack td[colspan] > div { min-height: 44px; }
  .scq-phone-stack .scq-btn-text { min-height: 44px; }
  /* end PR #753 */
}
.scq-table-owner { font-size: var(--text-xs); color: var(--dark-text-muted); }
.scq-table-actions { display: flex; gap: var(--space-3); }
.scq-stage-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.scq-stage-queued { background: var(--dark-text-muted); }
.scq-stage-crawling { background: var(--claim-infer); }
.scq-stage-draft { background: var(--claim-rec); }
.scq-stage-validation { background: var(--violet-500); }
.scq-stage-validated { background: var(--claim-fact); }
.scq-bar-track { width: 110px; height: 6px; background: var(--charcoal-700); border-radius: var(--radius-full); overflow: hidden; }
.scq-bar-fill { height: 100%; background: var(--violet-500); }
/* PR #750 list rows as cards on a phone */
/* Leads and Competitors rows (.scq-cards) were 989px/1041px grids clipped at 375px (#743 audit). Below the phone
   breakpoint the header row is hidden and each row becomes a compact card: name first and bold, selects side by side,
   the other cells as "label: value" lines (label from data-label), actions last at 44px, the select box in a 44px
   corner. The header's sort buttons are replaced by the "Sort by" select (.scq-sort-by). Inline grid-template-columns
   and min-width on the rows need !important to lose. Desktop is untouched. */
.scq-sort-by, .scq-select-all { display: none; }
@media (max-width: 767.98px) {
  .scq-cards .scq-select-all {
    display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3);
    font-size: var(--text-sm); color: var(--dark-text-body);
  }
  .scq-cards .scq-select-all input { width: 44px; height: 44px; margin: 0 0 0 -12px; accent-color: var(--gold-500); }
  .scq-cards { overflow-x: visible !important; }
  .scq-cards .scq-table-head { display: none; }
  .scq-cards .scq-sort-by {
    display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-3) 0;
    font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--dark-text-muted);
  }
  .scq-cards .scq-table-row {
    display: flex !important; flex-wrap: wrap; align-items: stretch; gap: 2px var(--space-3); position: relative; font-size: var(--text-sm);
    grid-template-columns: none !important; min-width: 0 !important; padding: var(--space-2) var(--space-3);
  }
  .scq-cards .scq-table-row > * { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
  .scq-cards .scq-table-row > [data-label]::before {
    content: attr(data-label) ":"; margin-right: 4px; font-size: var(--text-xs);
    text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--dark-text-muted);
  }
  .scq-cards .scq-table-row > [data-label="Contact"]::before { content: none; }
  .scq-cards .scq-table-row > [data-label="Contact"] > div { display: inline; margin-right: var(--space-3); }
  .scq-cards .scq-table-row > [data-label="Right customer?"], .scq-cards .scq-table-row > [data-label="Status"] { flex: 1 1 calc(50% - 8px); }
  .scq-cards .scq-table-row > [data-label="Right customer?"]::before, .scq-cards .scq-table-row > [data-label="Status"]::before { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .scq-cards .scq-table-row > [data-label="Phone"] { flex: 0 1 auto; }
  .scq-cards .scq-table-row > [data-label="Address"] { flex: 1 1 auto; }
  .scq-cards .scq-table-row > [data-label] { overflow: visible !important; }
  .scq-cards [data-cell="name"] > [data-cell="chips"] { display: inline-block; vertical-align: middle; margin-right: var(--space-3); }
  .scq-cards [data-cell="name"] { order: -1; font-weight: 600; padding-right: 48px; }
  .scq-cards [data-cell="name"] > div:first-child { font-size: var(--text-base); }
  .scq-cards [data-cell="select"] {
    order: -2; position: absolute; top: 0; right: 0; width: 44px; height: 44px; flex: none;
    display: flex; align-items: center; justify-content: center;
  }
  .scq-cards [data-cell="select"] input {
    appearance: none; -webkit-appearance: none; width: 44px; height: 44px; margin: 0; background: transparent;
    display: grid; place-content: center;
  }
  .scq-cards [data-cell="select"] input::before {
    content: ""; width: 22px; height: 22px; box-sizing: border-box; border: 2px solid var(--dark-text-muted); border-radius: 6px;
  }
  .scq-cards [data-cell="select"] input:checked::before {
    background: var(--gold-500); border-color: var(--gold-500); box-shadow: inset 0 0 0 3px var(--charcoal-900);
  }
  .scq-cards [data-cell="actions"] { order: 99; display: flex; gap: var(--space-3); }
  .scq-cards button, .scq-cards select { min-height: 44px; }
  .scq-cards [data-cell="actions"] button { flex: 1; }
  .scq-cards .scq-table-row a {
    display: inline-flex; align-items: center; justify-content: center; margin: 0;
    min-height: 44px !important; min-width: 44px !important; height: auto !important;
  }
}
/* end PR #750 */
.scq-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-5); }
@media (max-width: 900px) { .scq-kpi-grid { grid-template-columns: 1fr 1fr; } }
.scq-kpi-card { padding: var(--space-5); }
.scq-kpi-card.highlight { border-color: var(--gold-500); }
.scq-kpi-value { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: var(--weight-semibold); color: var(--white); }
.scq-kpi-label { font-size: var(--text-sm); color: var(--dark-text-muted); }
.scq-kpi-delta { font-size: var(--text-xs); color: var(--dark-text-muted); margin-top: var(--space-1); }

/* ---------- Competitor changes (PR #364) ---------- */
.scq-change-row { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--space-3); align-items: baseline; padding: var(--space-3) 0; border-bottom: 1px solid var(--dark-border); }
.scq-change-row:last-child { border-bottom: none; }
.scq-change-text { font-size: var(--text-sm); margin: 4px 0 0; overflow-wrap: anywhere; }

/* ---------- Field lock rows ---------- */
.scq-lock-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--dark-border); }
.scq-lock-row:last-child { border-bottom: none; }
.scq-lock-main { flex: 1; min-width: 0; }
.scq-lock-label { font-weight: var(--weight-semibold); color: var(--white); font-size: var(--text-sm); }
.scq-lock-value { font-size: var(--text-sm); color: var(--dark-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scq-lock-status { font-size: var(--text-xs); color: var(--dark-text-muted); width: 170px; text-align: right; }
.scq-lock-icon { color: var(--gold-500); }
.scq-onboard-locked { border: 1px dashed var(--violet-200); background: var(--violet-50); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: flex; align-items: center; gap: var(--space-2); color: var(--ink-600); font-size: var(--text-sm); }

/* ---------- Confidence ring ---------- */
.scq-ring {
  --pct: 0;
  width: 104px; height: 104px; border-radius: 50%; position: relative; flex: none;
  background: conic-gradient(var(--violet-500) calc(var(--pct) * 3.6deg), var(--charcoal-700) 0deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}
.scq-ring-spin {
  background: conic-gradient(var(--violet-600) 100deg, var(--violet-100) 0deg);
  animation: scq-spin 1.1s linear infinite;
}
@keyframes scq-spin { to { transform: rotate(360deg); } }
.scq-ring-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
.scq-ring-value { position: absolute; font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: var(--text-lg); color: var(--white); }

/* ---------- Pipeline stage list ---------- */
.scq-stage-list { display: flex; flex-direction: column; gap: var(--space-4); }
.scq-stage-item { display: flex; align-items: center; gap: var(--space-3); }
.scq-stage-circle { width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; border: 2px solid var(--dark-border); color: var(--dark-text-muted); }
.scq-stage-circle.done { background: var(--violet-600); border-color: var(--violet-600); color: var(--white); }
.scq-stage-circle.active { border-color: var(--violet-500); animation: scq-pulse 1.4s ease-in-out infinite; }
@keyframes scq-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(90,86,167,.4); } 50% { box-shadow: 0 0 0 6px rgba(90,86,167,0); } }
.scq-joblog { background: var(--charcoal-900); border-radius: var(--radius-md); padding: var(--space-4); font-family: 'Consolas', 'SFMono-Regular', monospace; font-size: var(--text-xs); color: var(--dark-text-muted); line-height: 1.8; white-space: pre-wrap; }

/* ---------- Toast ---------- */
.scq-toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--charcoal-800); color: var(--white); padding: var(--space-3) var(--space-5); border-radius: var(--radius-full); box-shadow: var(--shadow-lg); font-size: var(--text-sm); z-index: 100; animation: scq-up .25s var(--ease-calm); }
@keyframes scq-up { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Dialog ---------- */
.scq-dialog-backdrop { position: fixed; inset: 0; background: rgba(18,17,36,.55); display: flex; align-items: center; justify-content: center; z-index: 90; padding: var(--space-4); }
.scq-dialog { background: var(--dark-surface-card); border: 1px solid var(--dark-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-6); width: 100%; max-width: 440px; color: var(--dark-text-body); }
.scq-dialog h3 { color: var(--white); margin-top: 0; }
.scq-dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-5); }

/* ---------- Feedback FAB ---------- */
.scq-feedback-fab { position: fixed; bottom: var(--space-6); right: var(--space-6); width: 56px; height: 56px; border-radius: 50%; background: var(--violet-600); color: var(--white); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 80; transition: background-color var(--duration-fast) var(--ease-calm); }
.scq-feedback-fab:hover { background: var(--interactive-hover); }

/* ---------- Misc ---------- */
.scq-empty { text-align: center; color: var(--dark-text-muted); padding: var(--space-7) 0; }
.scq-danger-zone { border: 1px solid rgba(226,122,108,.4); border-radius: var(--radius-lg); padding: var(--space-5); background: rgba(226,122,108,.06); }
.scq-danger-zone h3 { color: var(--error); margin-top: 0; }
.scq-link-muted { color: var(--dark-text-muted); font-size: var(--text-sm); text-decoration: none; }
.scq-link-muted:hover { color: var(--white); }

/* ---------- Investor report (PR #363) ---------- */
.scq-investor { display: flex; flex-direction: column; gap: var(--space-5); font-variant-numeric: tabular-nums; }
.scq-investor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
/* Value and Breadth: both panes are rendered, so a print carries both; the tab only hides one on screen. */
.scq-investor-pane { display: flex; flex-direction: column; gap: var(--space-5); }
.scq-investor-pane.is-hidden { display: none; }
.scq-investor-tab { background: none; border-width: 0 0 2px; font-family: inherit; }
.scq-investor-pane .scq-kpi-grid { margin-bottom: 0; }
.scq-investor-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-5); }
.scq-investor-row > .scq-card-dark, .scq-investor-breadth > .scq-card-dark { display: flex; flex-direction: column; gap: var(--space-3); }
.scq-investor-note { margin: 0; font-size: var(--text-sm); line-height: 1.55; color: var(--dark-text-muted); }
/* "Not enough data yet" and its kind: gold, so a missing measurement never reads as a measured zero. */
.scq-investor-placeholder { font-size: var(--text-sm); color: var(--claim-ask); }
.scq-investor-figure { font-family: var(--font-display); font-weight: var(--weight-semibold); color: var(--white); white-space: nowrap; }
.scq-investor-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--dark-border); font-size: var(--text-sm); }
.scq-investor-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3); }
.scq-investor-tile { background: var(--charcoal-900); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.scq-investor-tile-value { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-semibold); color: var(--white); }
.scq-investor-panel-title { margin: 0; font-size: var(--text-md); }
.scq-investor-bar-row { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) minmax(56px, auto); gap: var(--space-4); align-items: center; font-size: var(--text-sm); }
.scq-investor-bar-row .scq-investor-figure { text-align: right; }
.scq-investor-bar { height: 18px; background: var(--charcoal-900); border-radius: var(--radius-sm); overflow: hidden; }
.scq-investor-bar-fill { height: 100%; background: var(--violet-500); }
.scq-investor-weeks { display: flex; align-items: flex-end; gap: var(--space-3); border-bottom: 1px solid var(--dark-border); padding-top: var(--space-4); }
.scq-investor-week { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding-bottom: var(--space-2); text-align: center; }
.scq-investor-weeks-flush { gap: 0; padding-top: 0; }
/* PR #489: the running-total line sits over the same equal columns as the figures under it (no gap, so each point is over its figure). */
.scq-investor-line-chart { position: relative; height: 140px; }
.scq-investor-line-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scq-investor-line-chart polyline { fill: none; stroke: var(--gold-500); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.scq-investor-line-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--gold-500); }
.scq-investor-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.scq-investor-breadth { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.scq-investor-foot { display: flex; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; border-top: 1px solid var(--dark-border); padding-top: var(--space-4); font-size: var(--text-xs); color: var(--dark-text-muted); }
/* Printed (or saved as PDF from the print dialog) on white paper: the console chrome goes, the dark cards turn
   light, and the bars keep their colour. Scoped to pages holding the report, so no other page's print changes. */
@media print {
  body:has(.scq-investor) .scq-rail, body:has(.scq-investor) .scq-topbar, body:has(.scq-investor) .scq-section-tabs,
  body:has(.scq-investor) .scq-feedback-fab, .scq-no-print { display: none !important; }
  body:has(.scq-investor), body:has(.scq-investor) .scq-shell, body:has(.scq-investor) .scq-body { background: #fff; min-height: 0; padding: 0; }
  .scq-investor, .scq-investor * { color: #111 !important; }
  .scq-investor .scq-card-dark, .scq-investor .scq-investor-tile { background: #fff; border: 1px solid #ccc; break-inside: avoid; }
  .scq-investor-bar, .scq-investor-bar-fill, .scq-investor-line-dot { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .scq-investor-pane.is-hidden { display: flex; }
  .scq-investor-row { grid-template-columns: 1fr 1fr; }
}

/* PR #749 tap and text sizes on a phone */
/* Width, not (pointer: coarse): the portal is judged at phone width (CLAUDE.md "Every portal page works on a phone"),
   a desktop browser narrowed to a phone still gets it, and a touch laptop at 1280 keeps today's look. !important
   appears only where a Razor page sets the size inline (style="height:32px;font-size:...") which a class cannot beat. */
@media (max-width: 767.98px) {
  /* Smallest text: never under 12px (the "small" text-size choice is floored inside the PR #574 block below). */
  .scq-pill { font-size: 12px; }

  /* Buttons, button-styled links, icon buttons and the avatar: 44px minimum tap height. */
  .scq-btn, .scq-btn-sm, .scq-btn-lg { min-height: 44px; min-width: 44px; }
  .scq-btn-text { min-height: 44px; min-width: 44px; padding: 0 var(--space-2); }
  .scq-sort { min-height: 44px; }
  .scq-avatar { min-width: 44px; min-height: 44px; width: 44px; height: 44px; }
  .scq-password-toggle { min-width: 44px; min-height: 44px; }
  .scq-user-menu a, .scq-user-menu button { min-height: 44px; display: flex; align-items: center; }
  .scq-table-row a, .scq-table-row button { min-height: 44px; display: inline-flex; align-items: center; }

  /* Form fields: 16px, or iOS zooms the page when one is focused. Height 44px for the ones a page shrank to 32px. */
  input, select, textarea { font-size: 16px !important; }
  .scq-input, .scq-select { min-height: 44px; height: auto !important; }
  textarea.scq-input { min-height: 88px; }

  /* Social icon links (SocialLinkIcons.razor sets 20px and 10px inline). */
  .scq-social-link { min-width: 44px !important; height: 44px !important; font-size: 12px !important; }

  /* Checkboxes and radios: a bigger box, and a label that is a full 44px row. Not the switch control: its hidden input fills
     the 40x22 switch, and the switch is itself a label. */
  input[type="checkbox"]:not(.scq-switch input), input[type="radio"] { width: 24px; height: 24px; }
  label:not(.scq-switch):has(> input[type="checkbox"]), label:has(> input[type="radio"]) { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; }
}
/* end PR #749 */

/* ---------- PR #574: each person's appearance (Account page) ----------
   PortalLayout and AdminLayout put data-theme / data-text-weight / data-text-size on .scq-shell only when the person
   chose something; with none, nothing below applies and the dark shell is exactly as before. The light theme re-points
   the shell's dark tokens (redefined here, on the shell, because aliases on :root resolve there); the icon rail stays
   Midnight Violet, the brand anchor from the founder's mockup (2026-10-15). */
/* PR #615: the onboarding wizard's steps 3-6 sit on the white auth card like steps 1-2 (founder 2026-11-07), and their
   pills, progress bars and buttons read the same light tokens. */
.scq-shell[data-theme="light"], .scq-auth-card.scq-wizard-wide {
  color-scheme: light;
  --charcoal-900: #F8F9FC; --charcoal-800: #FFFFFF; --charcoal-700: #E4E3F2;
  --dark-surface-page: #F8F9FC; --dark-surface-card: #FFFFFF; --dark-surface-raised: #F1F1F8; --dark-border: #E4E3F2;
  --dark-text-body: #25243A; --dark-text-muted: #5D5C72; --ui-text-strong: #25243A;
  --claim-fact: #15803D; --claim-infer: #3B5BDB; --claim-rec: #7A5F12; --claim-ask: #7A5F12; --claim-miss: #B3402F;
  /* Champagne gold is text on a dark surface; on white it fails contrast (active tabs, scores), so it deepens here. */
  --gold-500: #846611; --gold-600: #6E5714;
  --ui-ok-text: #15803D; --ui-warn-text: #8A6410; --ui-bad-text: #B91C1C; --ui-callout-bg: #FDF3E1; --ui-callout-text: #6E5714;
}
.scq-shell[data-theme="light"] .scq-rail { background: #2C2A63; border-right-color: #2C2A63; }
.scq-shell[data-theme="light"] .scq-rail-btn { color: #C9C8E4; }
.scq-shell[data-theme="light"] .scq-rail-btn:hover { color: #FFFFFF; }
.scq-shell[data-theme="light"] .scq-rail-btn::after { background: #2C2A63; color: #FFFFFF; border-color: #2C2A63; }
@media (max-width: 768px), (hover: none) { .scq-shell[data-theme="light"] .scq-rail-btn::after { background: none; color: #C9C8E4; } }
/* PR #742: the phone bar is the rail's phone form, so it takes the rail's Midnight Violet in the light theme. */
.scq-shell[data-theme="light"] .scq-phone-nav { background: #2C2A63; border-top-color: #2C2A63; }
.scq-shell[data-theme="light"] .scq-phone-nav > a, .scq-shell[data-theme="light"] .scq-phone-more > summary { color: #C9C8E4; }
.scq-shell[data-theme="light"] .scq-phone-nav > a.active, .scq-shell[data-theme="light"] .scq-phone-more[open] > summary { color: #FFFFFF; }
/* Text the shell's rules make white for a dark surface. */
.scq-shell[data-theme="light"] :is(.scq-card-dark h2, .scq-card-dark h3, .scq-section-tab:hover, .scq-section-tab.active,
  .scq-section-head h2, .scq-claim-label, .scq-sub strong, .scq-h1, .scq-h2, .scq-sort:hover, .scq-kpi-value, .scq-lock-label,
  .scq-ring-value, .scq-dialog h3, .scq-link-muted:hover, .scq-investor-figure, .scq-investor-tile-value, .scq-toast) { color: var(--ui-text-strong); }
.scq-shell[data-theme="light"] .scq-btn-ondark, .scq-auth-card.scq-wizard-wide .scq-btn-ondark { color: #403D88; border-color: #C9C8E4; }
.scq-shell[data-theme="light"] .scq-btn-ondark:hover:not(:disabled), .scq-auth-card.scq-wizard-wide .scq-btn-ondark:hover:not(:disabled) { color: #FFFFFF; }

/* Text weight: how heavy and how dark the words are. Regular (or no choice) is today's look. */
.scq-shell[data-text-weight="light"] { font-weight: 300; --weight-regular: 300; }
.scq-shell[data-text-weight="bold"] { font-weight: 700; --weight-regular: 700; --weight-medium: 700; --weight-semibold: 700; }
.scq-shell[data-theme="light"][data-text-weight="light"] { --dark-text-body: #4A4960; --dark-text-muted: #6B6A80; --ui-text-strong: #3A3950; }
.scq-shell[data-theme="light"][data-text-weight="bold"] { --dark-text-body: #000000; --dark-text-muted: #2B2A3A; --ui-text-strong: #000000; }
.scq-shell:not([data-theme="light"])[data-text-weight="light"] { --dark-text-body: #B9B8CC; --dark-text-muted: #8C8BA6; }
.scq-shell:not([data-theme="light"])[data-text-weight="bold"] { --dark-text-body: #FFFFFF; --dark-text-muted: #C9C8E4; }

/* Text size: the type scale, one step down or up. Medium (or no choice) is today's size. */
.scq-shell[data-text-size="small"] { font-size: 14px; --text-xs: 11px; --text-sm: 12px; --text-base: 14px; --text-md: 16px; --text-lg: 18px; --text-xl: 22px; --text-2xl: 27px; --text-3xl: 34px; }
.scq-shell[data-text-size="large"] { font-size: 17px; --text-xs: 14px; --text-sm: 15px; --text-base: 17px; --text-md: 19px; --text-lg: 23px; --text-xl: 27px; --text-2xl: 34px; --text-3xl: 42px; }

/* PR #749: on a phone the "small" text-size choice never goes under 12px. Inside the PR #574 block because it is an
   appearance rule (it must follow the choice's own sizes above to win). */
@media (max-width: 767.98px) {
  .scq-shell[data-text-size="small"] { --text-xs: 12px; --text-sm: 13px; }
}
