@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ── App Token System ───────────────────────────────────────────────────
   The authoritative design-token foundation lives in
   `/brand/colors_and_type.css` (loaded BEFORE this sheet). That file is the
   single source of truth for the brand colors, the ink-alpha neutral scale,
   the type families + `--fs-*`/`--lh-*`/`--tr-*` scale, `--space-*`,
   `--radius-*`, shadows, and motion.

   This `:root` block holds ONLY app-specific tokens — semantic status colors,
   accents, interaction surfaces, layout metrics — plus the "legacy aliases"
   that existing components consume, repointed at the brand tokens. It must NOT
   redefine any value the brand file owns (that was the old silent-override bug,
   most visibly swapping the deliberate typeface).
   ──────────────────────────────────────────────────────────────────────── */
:root {
  /* Accent (Mountain) — app interaction surfaces derived from the brand color */
  --accent: var(--color-mountain);
  --accent-fg: var(--color-paper);
  --accent-soft: rgba(25, 10, 219, .09);
  --accent-line: rgba(25, 10, 219, .22);

  /* Semantic status colors — owned by the app; the brand file has no equivalent */
  --good: #1b7a4f;
  --good-soft: rgba(27, 122, 79, .11);
  --bad: #bb3b2c;
  --bad-soft: rgba(187, 59, 44, .11);
  --bad-border: rgba(187, 59, 44, .35);
  --warn: #b07410;
  --warn-soft: rgba(176, 116, 16, .13);

  /* Interaction surfaces */
  --chip-bg: rgba(28, 28, 30, .055);
  --hover-bg: rgba(28, 28, 30, .05);
  --track: rgba(28, 28, 30, .12);

  /* Legacy aliases used by components — repointed at brand tokens */
  --surface: var(--bg-elev);
  --surface2: var(--chip-bg);
  --text: var(--fg);
  --muted: var(--fg-muted);
  --subtle: var(--fg-subtle);
  --green: var(--good);
  --green-soft: var(--good-soft);
  --red: var(--bad);
  --red-soft: var(--bad-soft);
  --yellow: var(--warn);
  --yellow-soft: var(--warn-soft);
  --ink: var(--fg);
  --paper: var(--bg);
  --mountain: var(--accent);
  --font: var(--font-ui);
  --radius: var(--radius-lg);

  /* Layout — app-specific metrics */
  --row-pad: 14px;
  --screen-pad: 18px;
  --nav-h: 56px;
}

/* ── Base Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  min-height: 100dvh;
}

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

input, button, select, textarea {
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

details > summary {
  cursor: pointer;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* ── Nav ────────────────────────────────────────────────────────────── */
/* App nav (used by Nav.tsx via .header.app-header) */
.header,
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--screen-pad);
  gap: 16px;
  z-index: 100;
}

.header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.header-sub {
  font-size: 0.72rem;
  color: var(--fg-muted);
  font-weight: 500;
  margin-top: 1px;
}

/* Brand group */
.brand-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  text-decoration: none;
  color: var(--fg);
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: block;
}

.brand-word {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
}

/* Slim-header back affordance (AppShell `back` prop). */
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
}

.app-back:hover { color: var(--accent); }

.app-header-user {
  max-width: 45vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Nav actions */
.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-link {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--dur-quick), color var(--dur-quick), background var(--dur-quick);
}

.header-link:hover,
.header-link.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.button-link {
  font-family: var(--font-ui);
}

.user-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
}

/* Nav semantic classes from design spec */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--screen-pad);
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.nav-role-chip {
  display: inline-flex;
  align-items: center;
  background: var(--chip-bg);
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color var(--dur-quick), color var(--dur-quick);
}

.nav-btn:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

/* ── Page Layout ────────────────────────────────────────────────────── */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 20px) var(--screen-pad) 100px;
}

.wide-page {
  max-width: 980px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 20px) var(--screen-pad) 100px;
}

.dash-main {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 16px) var(--screen-pad) 100px;
}

/* Page-level title on migrated detail surfaces (Item, etc.). Type comes from
   the `.t-h1` brand class; this only sets the surface spacing. */
.item-title {
  margin-bottom: 12px;
}

/* Demoted destinations surfaced as plain links (Settings → Tools). */
.settings-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.settings-link:hover {
  text-decoration: underline;
}

/* ── Back Button ────────────────────────────────────────────────────── */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-quick), border-color var(--dur-quick), box-shadow var(--dur-quick);
}

.back-btn:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-1);
}

/* ── Cards / Sections ───────────────────────────────────────────────── */
.form-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-1);
}

.section-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 12px;
}

/* ── Forms ──────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}

/* Mobile-first: single column on phones; two columns from the tablet width up. */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 760px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 5px;
  font-family: var(--font-ui);
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=url],
select,
textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font-ui);
  color: var(--fg);
  outline: none;
  transition: border-color var(--dur-quick), box-shadow var(--dur-quick);
}

textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--fg-subtle);
}

select option {
  background: var(--bg-elev);
  color: var(--fg);
}

input[type=range] {
  accent-color: var(--accent);
  height: 4px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

input[type=checkbox] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  box-shadow: none;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-quick);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elev);
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  box-shadow: var(--shadow-1);
  border-color: var(--fg);
}

.btn-danger {
  background: transparent;
  color: var(--bad);
  border-color: var(--bad-border);
}

.btn-danger:hover:not(:disabled) {
  background: var(--bad);
  color: white;
}

.btn-success {
  background: var(--good);
  color: white;
  border-color: transparent;
}

.btn-success:hover:not(:disabled) {
  box-shadow: var(--shadow-2);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  gap: 10px;
}

/* ── Tabs ───────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--dur-quick), background var(--dur-quick);
}

.tab:hover {
  color: var(--fg);
  background: var(--hover-bg);
}

.tab.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.tab-count {
  background: var(--chip-bg);
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.tab.active .tab-count {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Dashboard Header ───────────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.025em;
  color: var(--fg);
}

/* ── Stats Row ──────────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-pill {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-1);
}

.stat-num {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.stat-num.accent { color: var(--accent); }
.stat-num.green  { color: var(--good); }
.stat-num.yellow { color: var(--warn); }

.stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Legacy stats (used in portal view) */
.stats-bar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  background: var(--bg-elev);
  padding: 16px 10px;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-subtle);
  margin-top: 2px;
  font-weight: 700;
}

.stat-value.green  { color: var(--good); }
.stat-value.yellow { color: var(--warn); }
.stat-value.accent { color: var(--accent); }

/* ── Item Grid ──────────────────────────────────────────────────────── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 0 24px;
}

@media (min-width: 500px) {
  .item-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Item Card ──────────────────────────────────────────────────────── */
.item-card {
  display: block;
  text-decoration: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-base);
  box-shadow: var(--shadow-1);
  position: relative;
  color: inherit;
}

.item-card:hover {
  box-shadow: var(--shadow-2);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.item-thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--chip-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  opacity: 0.5;
}

.item-status-dot {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
}

.item-body {
  padding: 10px;
}

.item-title {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--fg);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.item-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.item-profit {
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.item-profit.green { color: var(--good); }
.item-profit.red   { color: var(--bad); }

.item-list-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.item-cost-label {
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: 500;
}

.item-roi {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

/* Legacy item card classes */
.item-prices {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.item-price { color: var(--fg); font-weight: 600; }
.item-cost  { color: var(--fg-muted); }

/* ── Empty State ────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 60px var(--screen-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--fg-muted);
}

.empty-icon {
  font-size: 2.5rem;
}

.empty p {
  font-size: 14px;
  color: var(--fg-muted);
}

/* ── Badge / Status ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-ui);
  background: var(--chip-bg);
  color: var(--fg-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-ui);
}

.status-draft   { background: var(--chip-bg);  color: var(--fg-muted); }
.status-listed  { background: var(--accent-soft); color: var(--accent); }
.status-sold    { background: var(--good-soft); color: var(--good); }
.status-pulled  { background: var(--bad-soft);  color: var(--bad); }

/* ── Detail Rows ────────────────────────────────────────────────────── */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 12.5px;
  color: var(--fg-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.detail-value {
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 600;
  text-align: right;
}

.profit-value {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.detail-value.green { color: var(--good); }

/* ── Status Buttons ─────────────────────────────────────────────────── */
.status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--dur-quick);
}

.status-btn:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.status-btn.active-listed {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
}

.status-btn.active-sold {
  background: var(--good-soft);
  border-color: rgba(27, 122, 79, .3);
  color: var(--good);
}

.status-btn.active-draft {
  background: var(--chip-bg);
  border-color: var(--border-strong);
  color: var(--fg);
}

.status-btn.active-pulled {
  background: var(--bad-soft);
  border-color: var(--bad-border);
  color: var(--bad);
}

/* ── Photo Rail ─────────────────────────────────────────────────────── */
.photo-section {
  margin-bottom: 16px;
}

.photo-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
  align-items: stretch;
}

.photo-rail::-webkit-scrollbar {
  display: none;
}

.photo-rail-item {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--dur-quick);
  background: var(--chip-bg);
}

.photo-rail-item:hover {
  border-color: var(--bad);
}

.photo-rail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-rail-add {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-strong);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  font-family: var(--font-ui);
  transition: all var(--dur-quick);
}

.photo-rail-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ── Photo Dropzone + Grid (add-item form) ─────────────────────────── */
.photo-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: border-color 0.15s, background 0.15s;
  min-height: 100px;
}
.photo-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft, rgba(25, 10, 219, 0.04));
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.photo-grid-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: var(--chip-bg);
}
.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-grid-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.12s;
}
.photo-grid-item:hover .photo-grid-remove {
  opacity: 1;
}
/* Always visible on touch devices */
@media (hover: none) {
  .photo-grid-remove { opacity: 1; }
}

.photo-grid-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
}

.photo-actions {
  display: flex;
  gap: 10px;
}

.photo-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}
.photo-action-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft, rgba(25, 10, 219, 0.04));
}
.photo-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.photo-action-camera {
  border-color: var(--accent);
  color: var(--accent);
}

.photo-hint-empty {
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-align: center;
  margin: 10px 0 0;
  line-height: 1.5;
  white-space: pre-line;
}

/* Legacy compat */
.photo-zone { display: none; }
.photo-slot { display: none; }
.photo-hint { font-size: 11px; color: var(--fg-muted); }

/* ── Stepper ───────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 20px;
  padding: 0 8px;
}
.stepper-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 48px;
}
.stepper-n {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fg-muted);
  background: var(--chip-bg);
  transition: all 0.2s;
}
.stepper-dot.active .stepper-n {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.stepper-dot.done .stepper-n {
  border-color: var(--green, #16a34a);
  background: var(--green, #16a34a);
  color: #fff;
  font-size: 0.7rem;
}
.stepper-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stepper-dot.active .stepper-label {
  color: var(--fg);
}
.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--border-strong);
  margin: 0 6px;
  margin-bottom: 18px;
  transition: background 0.2s;
}
.stepper-line.done {
  background: var(--green, #16a34a);
}

/* ── Step page styles ──────────────────────────────────────────────── */
.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.2;
}
.step-sub {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 16px;
  line-height: 1.4;
}
.step-cta {
  width: 100%;
  margin-top: 8px;
  font-size: 1rem;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.step-nav {
  display: flex;
  gap: 10px;
}

/* ── AI value card ─────────────────────────────────────────────────── */
.ai-value-card {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-value-label {
  font-size: 0.7rem;
  color: #15803d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ai-value-range {
  font-size: 1.3rem;
  font-weight: 700;
  color: #166534;
  margin-top: 2px;
}
.ai-value-tag {
  background: #dcfce7;
  color: #166534;
  font-size: 0.66rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* ── Comp valuation card ───────────────────────────────────────────── */
.comp-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.comp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.comp-card-head .comp-card-label {
  margin-bottom: 0;
}
.comp-card-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.comp-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.comp-tag {
  font-size: 0.72rem;
  color: var(--fg-muted);
  display: block;
  margin-bottom: 2px;
}
.comp-val {
  font-weight: 700;
  font-size: 0.95rem;
}
.comp-val-hero {
  font-size: 1.2rem;
  color: var(--green, #16a34a);
}

/* ── Processing card ───────────────────────────────────────────────── */
.processing-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  margin-top: 12px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  animation: pulse-bg 2s ease-in-out infinite;
}
@keyframes pulse-bg {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Spinner ───────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Platform Grid ──────────────────────────────────────────────────── */
/* Mobile-first: stacked checkboxes on phones; two-up from the tablet width. */
.platform-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 760px) {
  .platform-grid { grid-template-columns: 1fr 1fr; }
}

.platform-check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color var(--dur-quick), background var(--dur-quick);
}

.platform-check input {
  width: auto;
}

.platform-check:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Comp Section ───────────────────────────────────────────────────── */
.comp-fetch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.comp-search-link {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  transition: background var(--dur-quick);
}

.comp-search-link:hover {
  background: var(--accent-line);
}

.comp-search-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.comp-list {
  margin: 12px 0;
}

.comp-empty {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin: 8px 0;
}

.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.comp-table th {
  text-align: left;
  font-weight: 600;
  color: var(--fg-subtle);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.comp-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: middle;
}

.comp-table tr:last-child td {
  border-bottom: none;
}

.comp-table .comp-del,
.comp-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg-subtle);
  font-size: 14px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: color var(--dur-quick), background var(--dur-quick);
}

.comp-table .comp-del:hover,
.comp-delete-btn:hover {
  color: var(--bad);
  background: var(--bad-soft);
}

.comp-title-cell {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Add comp form — mobile-first: two-up on phones, full row from 480px. */
.add-comp-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

@media (min-width: 480px) {
  .add-comp-form { grid-template-columns: 1fr 1fr 1fr auto; }
}

/* Mobile-first: single column on phones, two-up from 480px. */
.comp-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

@media (min-width: 480px) {
  .comp-form-grid { grid-template-columns: 1fr 1fr; }
}

.comp-form-grid label,
.add-comp-form > div > label {
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 3px;
}

.comp-form-grid input,
.add-comp-form > div > input {
  width: 100%;
}

/* ── Valuation Panel ────────────────────────────────────────────────── */
.valuation-panel {
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.val-price {
  font-weight: 800;
  font-size: 28px;
  color: var(--accent);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.val-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.val-band {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--fg-muted);
}

.val-comps {
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-top: 6px;
}

/* Valuation stat grid — mobile-first: two-up on phones, four across from 480px. */
.valuation-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}

@media (min-width: 480px) {
  .valuation-stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.valuation-stat {
  background: var(--chip-bg);
  padding: 10px 8px;
  text-align: center;
}

.valuation-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.valuation-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.valuation-stat-value.accent { color: var(--accent); }
.valuation-stat-value.green  { color: var(--good); }
.valuation-stat-value.yellow { color: var(--warn); }

/* Confidence bar */
.valuation-confidence-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.valuation-conf-label {
  font-size: 11px;
  color: var(--fg-muted);
  white-space: nowrap;
  min-width: 72px;
}

.valuation-conf-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--track);
  border-radius: 3px;
  overflow: hidden;
}

.valuation-conf-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.valuation-conf-pct {
  font-size: 11px;
  color: var(--fg-muted);
  min-width: 32px;
  text-align: right;
}

/* Risk flags */
.valuation-risk-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.valuation-risk-flag {
  font-size: 11px;
  background: var(--bad-soft);
  color: var(--bad);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  text-transform: capitalize;
  font-weight: 600;
}

/* ID & Valuation Engine — price surface by market (spec §2, WS-2) */
.valuation-market-surface {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.valuation-market-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-sm);
}

.valuation-market-name {
  font-weight: 600;
  font-size: 13px;
}

.valuation-market-band {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
}

.valuation-band-mid {
  color: var(--accent);
  font-weight: 700;
}

.valuation-market-conf {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.valuation-condition-grade {
  margin-top: 8px;
}

.valuation-grade-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* Valuation summary toggle */
.valuation-summary-toggle {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.valuation-summary-toggle::after {
  content: ' ▸';
  color: var(--fg-muted);
  font-size: 0.7rem;
}

details[open] .valuation-summary-toggle::after {
  content: ' ▾';
}

/* ── Confidence + Pricing-State System (PRD §6 "honesty over false precision") ── */

/* Row holding the two confidence signals (identification + pricing). */
.valuation-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

/* Two-signal confidence badge (identification + pricing), shared visual tiers. */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}

.confidence-badge .cb-label {
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.confidence-badge .cb-pct {
  font-weight: 700;
}

.confidence-badge .cb-dot {
  font-size: 10px;
  line-height: 1;
}

.cb-high {
  background: var(--good-soft, #f0fdf4);
  color: var(--good, #1b7a4f);
  border-color: var(--good-border, #bbf7d0);
}

.cb-med {
  background: var(--warn-soft, #fffbeb);
  color: var(--warn, #b07410);
  border-color: var(--warn-border, #fde68a);
}

.cb-low {
  background: var(--bad-soft, #fff1f2);
  color: var(--bad, #bb3b2c);
  border-color: var(--bad-border, #fecdd3);
}

/* Pricing-state block — exactly one of Comped / Thin data / No comps. */
.pricing-state {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border);
  background: var(--surface, #fff);
}

.pricing-state-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
}

.pricing-state-detail {
  font-size: 12px;
  color: var(--fg-muted);
}

.pricing-state-comped {
  border-color: var(--good-border, #bbf7d0);
  background: var(--good-soft, #f0fdf4);
}

.pricing-state-comped .pricing-state-head {
  color: var(--good, #1b7a4f);
}

.pricing-state-thin {
  border-color: var(--warn-border, #fde68a);
  background: var(--warn-soft, #fffbeb);
}

.pricing-state-thin .pricing-state-head {
  color: var(--warn, #b07410);
}

.pricing-state-none {
  border-color: var(--border);
  background: var(--surface, #fff);
}

.pricing-state-none .pricing-state-head {
  color: var(--fg, var(--text));
}

.pricing-state-estimate {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ── Toast ──────────────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 340px;
  background: var(--fg);
  color: var(--bg-elev);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: toast-in 200ms var(--ease-out);
}

.toast.success { background: var(--good); }
.toast.error   { background: var(--bad); }
.toast.info    { background: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── FAB (removed) ──────────────────────────────────────────────────────
   The floating "add" button was replaced in Phase 2 by the persistent
   capture action in the bottom-tab nav (phone) and the left sidebar
   (desktop). Its rules are removed here now that no markup renders `.fab`
   and the FAB↔bottom-nav max-width swap is gone. */

/* ── Auth Pages ─────────────────────────────────────────────────────── */
.auth-wrap,
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: var(--screen-pad);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-3);
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  margin-bottom: 28px;
}

.auth-logo-word {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.auth-title,
.auth-heading {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: 6px;
  text-align: center;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--fg-muted);
  text-align: center;
  margin-bottom: 24px;
}

.auth-hint {
  font-size: 12.5px;
  color: var(--fg-muted);
  text-align: center;
  margin-top: 16px;
  margin-bottom: 0;
}

.auth-hint a {
  color: var(--accent);
  font-weight: 600;
}

.auth-mode-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.auth-mode-tab {
  flex: 1;
  height: 36px;
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-muted);
  cursor: pointer;
  transition: background var(--dur-quick), color var(--dur-quick);
}

.auth-mode-tab.active {
  background: var(--accent);
  color: var(--accent-fg);
}

/* Google button */
.auth-google-btn {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--ink-20);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--fg);
  cursor: pointer;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}

.auth-google-btn:hover:not(:disabled) {
  border-color: var(--ink-40);
  box-shadow: var(--shadow-2);
}

.auth-google-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* OR divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--fg-subtle);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ink-12);
}

/* Error */
.auth-error {
  background: var(--bad-soft);
  border: 1px solid var(--bad-border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--bad);
  margin-bottom: 16px;
}

/* Auth field */
.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-60);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--ink-20);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

.auth-field input:disabled {
  opacity: .6;
}

.auth-field input::placeholder {
  color: var(--ink-40);
}

.auth-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.auth-field-label-row label {
  margin-bottom: 0;
}

.auth-forgot {
  font-size: 12px;
  color: var(--fg-muted);
  text-decoration: none;
  display: block;
  text-align: right;
  margin-top: 6px;
}

.auth-forgot:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Auth buttons */
.auth-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: box-shadow var(--dur-base), transform var(--dur-quick);
}

.auth-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.auth-btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.auth-btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-3);
}

.auth-btn-primary:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-btn-secondary {
  width: 100%;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-muted);
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-quick), color var(--dur-quick);
}

.auth-btn-secondary:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Footer notes */
.auth-footer-note {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--fg-muted);
  margin: 20px 0 0;
}

.auth-footer-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-note a:hover {
  text-decoration: underline;
}

.auth-terms {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-40);
  margin: 12px 0 0;
  line-height: 1.5;
}

.auth-terms a {
  color: var(--ink-60);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Spinners */
.auth-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink-12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

.auth-spinner-sm {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: auth-spin .6s linear infinite;
  opacity: .7;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
}

/* ── AI Classification ──────────────────────────────────────────────── */
.ai-classify-bar {
  margin-bottom: 12px;
}

.ai-classify-btn {
  font-size: 13px;
  padding: 6px 14px;
}

.ai-suggestion-panel {
  margin-top: 10px;
  background: var(--bg-elev);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ai-suggestion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-line);
}

.ai-suggestion-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex: 1;
}

.ai-confidence {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--fg-muted);
}

.ai-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--fg-muted);
  padding: 0 2px;
  line-height: 1;
}

.ai-suggestion-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ai-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ai-label {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--fg-muted);
  min-width: 64px;
  flex-shrink: 0;
}

.ai-value {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg);
}

.ai-value.green { color: var(--good); }

.ai-keywords-row {
  align-items: flex-start;
}

.ai-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ai-keyword {
  background: var(--chip-bg);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 11px;
  color: var(--fg-muted);
}

.ai-apply-btn {
  width: 100%;
  border-radius: 0;
  border-top: 1px solid var(--accent-line);
  font-size: 13px;
  padding: 10px;
  height: auto;
}

/* ── Admin Data Collection ──────────────────────────────────────────── */
.dc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.dc-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dc-stat-n {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.dc-stat-l {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dc-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.dc-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chip-bg);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
}

.dc-cat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
}

.dc-cat-n {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.crawl-job-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.crawl-job-info {
  flex: 1;
  min-width: 0;
}

.crawl-job-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg);
}

.crawl-job-url {
  font-size: 11.5px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.crawl-job-meta {
  font-size: 12px;
  color: var(--fg-subtle);
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── User Table ─────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.user-table th {
  text-align: left;
  font-weight: 600;
  font-size: 10.5px;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.user-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}

.user-table tr:last-child td {
  border-bottom: none;
}

.user-table tr:hover td {
  background: var(--hover-bg);
}

/* ── Spinner ────────────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Gallery / Image ────────────────────────────────────────────────── */
.gallery-section {
  margin-top: 0;
}

.gallery-section > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  padding: 4px 0 8px;
  user-select: none;
}

.gallery-section > summary::-webkit-details-marker {
  color: var(--fg-muted);
}

/* Mobile-first: two-up thumbnails on phones, four across from 480px. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}

@media (min-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-grid a {
  display: block;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--chip-bg);
  transition: opacity var(--dur-quick);
}

.gallery-grid img:hover {
  opacity: 0.85;
}

/* Detail photos */
.detail-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.detail-photo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border);
}

.detail-photo.placeholder {
  background: var(--chip-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--fg-muted);
}

/* ── Checklist Panel ────────────────────────────────────────────────── */
.checklist-toggle {
  margin-top: 8px;
  background: var(--chip-bg);
  border-color: var(--border);
  color: var(--fg);
}

.field-checklist {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--chip-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.field-checklist.open {
  display: block;
}

.field-checklist-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.field-checklist-list {
  list-style: none;
  margin-bottom: 8px;
}

.field-checklist-list li {
  padding: 4px 0;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.field-checklist-list li:last-child {
  border-bottom: none;
}

.field-checklist-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  width: 100%;
}

.field-checklist-list input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
  width: auto;
}

.field-checklist-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 6px;
}

.field-checklist-prices strong {
  color: var(--fg);
}

/* ── Review Queue Page (rq-*) ───────────────────────────────────────── */
.rq-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 16px) var(--screen-pad) 100px;
}

.rq-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.rq-header-stat {
  text-align: center;
}

.rq-header-stat-val {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.rq-header-stat-lbl {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-subtle);
  margin-top: 2px;
}

.rq-header-stat-val.green { color: var(--good); }

.rq-image-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}

.rq-image-viewer {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--chip-bg);
  max-height: 360px;
}

.rq-image-viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rq-image-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  pointer-events: none;
}

.rq-image-nav-btn {
  pointer-events: all;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 250, 248, .9);
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

.rq-image-meta {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.rq-image-count {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 500;
}

.rq-source-link {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rq-ai-panel {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}

.rq-ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rq-ai-title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 1;
}

.rq-conf-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rq-conf-segments {
  display: flex;
  gap: 3px;
}

.rq-conf-seg {
  width: 18px;
  height: 6px;
  border-radius: 2px;
  background: var(--track);
}

.rq-conf-seg.fill-good { background: var(--good); }
.rq-conf-seg.fill-warn { background: var(--warn); }
.rq-conf-seg.fill-bad  { background: var(--bad); }

.rq-failure-reason {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--bad-soft);
  color: var(--bad);
  border-radius: var(--radius-sm);
}

.rq-ai-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.rq-ai-field {
  font-size: 12px;
  color: var(--fg);
}

.rq-ai-field-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1px;
}

.rq-ai-field-val {
  font-weight: 600;
  color: var(--fg);
}

.rq-form {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rq-form-title {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 4px;
}

.rq-cond-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rq-cond-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--dur-quick);
}

.rq-cond-btn.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-fg);
}

.rq-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rq-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px var(--screen-pad);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  z-index: 50;
}

.rq-actions .btn-primary {
  flex: 1;
}

.rq-flash {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--good);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-3);
  z-index: 999;
  animation: toast-in 200ms var(--ease-out);
}

/* ── Review Dashboard (rd-*) ────────────────────────────────────────── */
.rd-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 20px) var(--screen-pad) 100px;
}

.rd-accuracy-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  background: var(--chip-bg);
  border: 4px solid var(--accent);
}

.rd-accuracy-pct {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.rd-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.rd-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.rd-stat-val {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.rd-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.rd-stat-val.green { color: var(--good); }

/* ── Portal / Landing styles ─────────────────────────────────────────── */
/* Reset body when auth/landing is active */
body:has(.auth-shell) {
  padding-bottom: 0;
  background: var(--bg);
}

body:has(.auth-shell)::before {
  display: none;
}

/* Portal main layout (wide) */
.portal-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 16px) clamp(14px, 4vw, 26px) 80px;
}

.hero-card {
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, .88) 78%);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2);
  padding: clamp(16px, 3.5vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-card h2 {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  color: var(--fg);
  margin: 6px 0 8px;
}

.hero-card p {
  color: var(--fg-muted);
  line-height: 1.5;
  max-width: 670px;
  font-size: .96rem;
}

.quick-actions {
  display: grid;
  gap: 10px;
}

.quick-action {
  min-height: 96px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--fg);
  text-decoration: none;
  padding: 14px;
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 1fr 1fr;
  column-gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-quick), box-shadow var(--dur-quick), border-color var(--dur-quick);
}

.quick-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent-line);
}

.quick-action span {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
}

.quick-action strong {
  align-self: end;
  font-size: .98rem;
}

.quick-action small {
  color: var(--fg-muted);
  font-weight: 600;
}

.quick-action.primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
}

.quick-action.primary span {
  background: rgba(255, 255, 255, .18);
  color: var(--accent-fg);
}

.quick-action.primary small {
  color: rgba(255, 250, 248, .82);
}

.inventory-section {
  margin-top: 4px;
}

.inventory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 10px;
}

.inventory-head h2 {
  font-size: 1.05rem;
  letter-spacing: -.015em;
}

/* ── Source / Scout page ────────────────────────────────────────────── */
.source-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* Mobile-first: stack the summary head on phones, lay it out in a row from
   the tablet width up. */
.source-summary-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

@media (min-width: 760px) {
  .source-summary-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.source-summary-head h2 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.muted-line {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin-top: 3px;
}

/* Outcome Capture one-tap confirm card (spec §6, WS-6). */
.sale-confirm-row {
  display: flex;
  gap: 12px;
  margin: 10px 0;
}
.sale-confirm-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

/* Listing Automation & Routing (spec §4, WS-4). */
.channel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 14px;
}
.channel-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  text-transform: capitalize;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  cursor: pointer;
}
.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.listing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.listing-channel {
  text-transform: capitalize;
  font-weight: 700;
  min-width: 84px;
}
.listing-price {
  font-weight: 700;
  color: var(--accent);
}

.source-photo-count {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.verdict-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--good-soft);
  border: 1px solid rgba(27, 122, 79, .28);
  color: var(--good);
  font-size: 0.9rem;
  font-weight: 700;
}

.source-terms {
  color: var(--fg-muted);
  font-size: 0.8rem;
  margin-top: 10px;
}

.candidate-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.source-list-title {
  margin: 6px 2px 0;
}

.source-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-fg);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.scout-hero {
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, .94) 78%);
  border-color: var(--accent-line);
}

.candidate-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

/* Mobile-first: stack the candidate head on phones, row layout from tablet up. */
.candidate-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

@media (min-width: 760px) {
  .candidate-head {
    flex-direction: row;
    justify-content: space-between;
  }
}

.candidate-head h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.candidate-card p {
  color: var(--fg-muted);
  line-height: 1.45;
}

.brand-signal {
  color: var(--warn);
  font-size: 0.8rem;
  font-weight: 700;
}

.target-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Mobile-first: two-up on phones; the full four-column band from the tablet width. */
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

@media (min-width: 760px) {
  .price-grid { grid-template-columns: repeat(4, 1fr); }
}

.price-grid div {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
}

.price-grid strong {
  display: block;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.price-grid span {
  color: var(--fg-subtle);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.risk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.risk-tags span {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid rgba(176, 116, 16, .28);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.candidate-card details {
  margin-bottom: 12px;
  color: var(--fg-muted);
  font-size: 0.85rem;
}

.candidate-card summary {
  cursor: pointer;
  color: var(--fg);
  margin-bottom: 8px;
  font-weight: 700;
}

.candidate-card ul {
  margin-left: 18px;
}

/* ── Bottom Nav (phone, mobile-first base) ──────────────────────────── */
/* The phone's always-visible primary navigation. Shown by default; hidden at
   the desktop breakpoint where the left sidebar (.side-nav) takes over. */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  /* iOS home-indicator clearance. */
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  max-width: calc(100vw - 24px);
}

.bn-tab {
  flex: 1 1 0;
  min-width: 60px;
  min-height: 44px;
  padding: 4px 6px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--fg-muted);
  text-align: center;
}

.bn-tab .bn-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.bn-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Raised, centered capture action ("Value item"). */
.bn-capture {
  min-width: 56px;
  flex: 0 0 auto;
  margin-top: -24px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 18px rgba(25, 10, 219, .28);
}

.bn-capture.active {
  background: var(--accent);
  color: var(--accent-fg);
}

.bn-capture .bn-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.bn-capture .bn-label {
  font-size: 10px;
}

/* ── Side Nav (desktop left sidebar) ────────────────────────────────── */
/* Hidden on phone; revealed at the desktop breakpoint below. */
.side-nav {
  display: none;
}

.app-shell {
  /* The shell column offset is applied to header/page at the desktop
     breakpoint; the phone base needs nothing here. */
}

/* ── Adaptive nav: desktop sidebar enhancement ──────────────────────── */
/* min-width query swaps the phone bottom bar for a persistent left sidebar
   and offsets the header + page column to clear it. */
:root {
  --side-nav-w: 220px;
}

@media (min-width: 760px) {
  .bottom-nav { display: none; }

  .side-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--side-nav-w);
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 14px;
    background: var(--bg-elev);
    border-right: 1px solid var(--border);
  }

  .sn-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 14px;
    text-decoration: none;
    color: var(--fg);
  }

  .sn-brand-mark { width: 28px; height: 28px; flex: 0 0 auto; display: block; }

  .sn-brand-word { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }

  .sn-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .sn-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--fg-muted);
  }

  .sn-link .sn-label { font-size: 14px; font-weight: 600; }

  .sn-link:hover {
    background: var(--hover-bg, var(--accent-soft));
    color: var(--fg);
  }

  .sn-link.active {
    background: var(--accent-soft);
    color: var(--accent);
  }

  /* Capture action emphasized. */
  .sn-capture {
    margin: 8px 0;
    background: var(--accent);
    color: var(--accent-fg);
    box-shadow: 0 6px 14px rgba(25, 10, 219, .24);
  }

  .sn-capture .sn-label { font-weight: 700; }
  .sn-capture .sn-icon { font-size: 1.05rem; line-height: 1; }

  .sn-capture:hover,
  .sn-capture.active {
    background: var(--accent);
    color: var(--accent-fg);
  }

  /* Account + sign-out pinned to the bottom. */
  .sn-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 8px 4px;
    border-top: 1px solid var(--border);
  }

  .sn-user {
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sn-logout {
    align-self: flex-start;
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-muted);
    cursor: pointer;
  }

  .sn-logout:hover { color: var(--accent); }

  /* On desktop the slim top header sits beside the sidebar; the brand/account
     identity move into the sidebar, so the top header carries back/page
     context only. Offset both header and page by the sidebar width. */
  .app-shell .app-header {
    left: var(--side-nav-w);
  }

  .app-shell .app-header .app-header-user { display: none; }

  .app-shell .page {
    margin-left: var(--side-nav-w);
    /* re-center the content column within the remaining viewport */
    max-width: 680px;
    margin-right: auto;
  }

  .app-shell .page.page-wide {
    max-width: 980px;
  }

  body.is-impersonating .side-nav { top: 36px; }
}

/* ── Utility classes ────────────────────────────────────────────────── */
.green  { color: var(--good); }
.red    { color: var(--bad); }
.yellow { color: var(--warn); }
.accent { color: var(--accent); }

.fade-in {
  animation: fadeIn 180ms var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Landing Page ───────────────────────────────────────────────────── */
body:has(.landing-page) {
  padding-bottom: 0;
  background: var(--bg);
}

.landing-page {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;

  /* Three-color discipline: Mountain / Paper / Ink. On the dark (Ink) hero and
     CTA surfaces, Mountain reads too dark for small labels, so we use a single
     named lightened-Mountain token instead of scattering a raw hex. This is the
     only permitted derivative — no fourth brand hue is introduced. */
  --lp-accent-onink: #7E8CFF;
}

.landing-page a { color: inherit; text-decoration: none; }
.landing-page ::selection { background: rgb(25 10 219 / .14); }
.landing-page .wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

.landing-page .eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.landing-page .eyebrow.muted { color: var(--ink-40); }

.landing-page .eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
  display: inline-block;
}

.landing-page h1,
.landing-page h2,
.landing-page h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.landing-page p { margin: 0; }

.landing-page .lede {
  font-family: var(--font-text);
  /* upper bound anchored on the brand subhead step (--fs-subhead: 20px) */
  font-size: clamp(17px, 1.5vw, var(--fs-subhead));
  line-height: 1.6;
  color: var(--ink-60);
}

/* Landing buttons */
.landing-page .btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-quick), background var(--dur-base);
  white-space: nowrap;
  text-decoration: none;
}

.landing-page .btn svg { width: 18px; height: 18px; }

.landing-page .btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.landing-page .btn-primary:hover { box-shadow: var(--shadow-3); }
.landing-page .btn-primary:active { transform: translateY(1px); box-shadow: var(--shadow-1); }

.landing-page .btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.landing-page .btn-ghost:hover { box-shadow: var(--shadow-2); background: #fff; }
.landing-page .btn-sm { height: 42px; padding:0 18px; font-size: 14px; }

.landing-page .btn-on-ink {
  background: var(--bg);
  color: var(--fg);
}

.landing-page .btn-on-ink:hover { box-shadow: 0 12px 32px rgb(0 0 0 / .35); }

/* Landing nav */
.landing-page .l-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 250 248 / .82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.landing-page .nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.landing-page .l-brand { display: inline-flex; align-items: center; gap: 11px; }
/* Brand mark uses the Mountain token via CSS (var() is inert in SVG fill
   attributes); a stylesheet rule wins over the root svg `fill="none"`. */
.landing-page .l-brand svg rect,
.landing-page .l-brand svg path { fill: var(--color-mountain); }
.landing-page .l-brand .word { font-family: var(--font-ui); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.landing-page .nav-links { display: flex; align-items: center; gap: 28px; margin-left: 14px; }
.landing-page .nav-links a { font-family: var(--font-ui); font-weight: 500; font-size: 14.5px; color: var(--ink-60); transition: color var(--dur-base); text-decoration: none; }
.landing-page .nav-links a:hover { color: var(--fg); }
.landing-page .nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.landing-page .nav-signin { font-family: var(--font-ui); font-weight: 600; font-size: 14.5px; color: var(--fg); text-decoration: none; }

/* Landing hero */
.landing-page .hero { position: relative; padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.landing-page .hero-ghost { position: absolute; top: -120px; right: -160px; width: 620px; height: 620px; color: var(--fg); opacity: 0.035; pointer-events: none; z-index: 0; }
.landing-page .hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.landing-page .hero h1 { font-size: clamp(38px, 6.2vw, 70px); line-height: 1.04; letter-spacing: -0.025em; margin: 22px 0 0; text-wrap: balance; }
.landing-page .hero h1 .accent { color: var(--accent); }
.landing-page .hero .lede { margin-top: 24px; max-width: 30em; }
.landing-page .hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.landing-page .hero-trust { margin-top: 20px; display: flex; align-items: center; gap: 16px; font-family: var(--font-ui); font-size: 13.5px; color: var(--ink-40); flex-wrap: wrap; }
.landing-page .hero-trust .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-20); }
.landing-page .hero-trust b { color: var(--ink-60); font-weight: 600; }

/* Appraisal card */
.landing-page .hero-visual { position: relative; min-height: 510px; }
.landing-page .l-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.landing-page .appraisal { position: relative; z-index: 2; width: min(420px, 100%); margin-left: auto; padding: 22px; box-shadow: var(--shadow-3); }
.landing-page .ap-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.landing-page .ap-tag { font-family: var(--font-ui); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-40); display: inline-flex; align-items: center; gap: 8px; }
.landing-page .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: lp-pulse 2s var(--ease-out) infinite; display: inline-block; }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 rgb(25 10 219 / .35); } 70% { box-shadow: 0 0 0 7px rgb(25 10 219 / 0); } 100% { box-shadow: 0 0 0 0 rgb(25 10 219 / 0); } }
.landing-page .ap-item { display: flex; gap: 14px; align-items: center; }
.landing-page .ph { flex-shrink: 0; border-radius: var(--radius-md); border: 1px solid var(--border); background: linear-gradient(135deg, #ECE7E2, #D7CFC7); position: relative; overflow: hidden; width: 64px; height: 64px; }
.landing-page .ph::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 75% 12%, rgb(255 255 255 / .55), transparent 55%); }
.landing-page .ph svg { position: absolute; inset: 0; margin: auto; width: 30%; height: 30%; color: rgb(28 28 30 / .3); }
.landing-page .ph-photo { background: #3B5998; }
.landing-page .ph-photo::after { display: none; }
.landing-page .ph-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.landing-page .ap-title { font-family: var(--font-ui); font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--fg); }
.landing-page .ap-sub { font-family: var(--font-ui); font-size: 12px; color: var(--ink-40); margin-top: 4px; }
.landing-page .ap-verdict { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: space-between; }
.landing-page .verdict-tag { font-family: var(--font-ui); font-weight: 800; font-size: 13px; letter-spacing: 0.06em; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }
.landing-page .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.landing-page .pay { font-family: var(--font-ui); font-weight: 700; font-size: 34px; letter-spacing: -0.02em; color: var(--fg); margin-top: 6px; }
.landing-page .pay-label { font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-40); }
.landing-page .resell { text-align: right; }
.landing-page .resell .r-val { font-family: var(--font-ui); font-weight: 700; font-size: 21px; color: var(--fg); margin-top: 5px; }
.landing-page .resell .r-profit { font-family: var(--font-ui); font-weight: 600; font-size: 12.5px; color: var(--accent); margin-top: 3px; }
.landing-page .band { margin-top: 18px; }
.landing-page .band-bar { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(28 28 30 / .1), rgb(25 10 219 / .18)); }
.landing-page .band-med { position: absolute; top: -3px; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); display: block; }
.landing-page .band-cost { position: absolute; top: -2px; width: 2px; height: 12px; border-radius: 2px; background: var(--fg); opacity: .5; display: block; }
.landing-page .band-row { display: flex; justify-content: space-between; margin-top: 7px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 600; color: var(--ink-40); }
.landing-page .band-row .num { color: var(--ink-60); }
.landing-page .band-row .med { color: var(--accent); }

/* Crosspost card */
.landing-page .crosspost { position: absolute; left: 0; bottom: 0; z-index: 3; width: 248px; padding: 15px 16px; box-shadow: var(--shadow-3); }
.landing-page .cp-h { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--fg); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.landing-page .cp-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.landing-page .cp-row + .cp-row { border-top: 1px solid var(--border); }
.landing-page .cp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.landing-page .cp-name { font-family: var(--font-ui); font-weight: 500; font-size: 13px; color: var(--fg); flex: 1; }
.landing-page .cp-live { font-family: var(--font-ui); font-weight: 600; font-size: 11px; color: var(--accent); }

/* Marketplace strip */
.landing-page .strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.landing-page .strip-inner { display: flex; align-items: center; gap: clamp(20px, 4vw, 52px); padding: 22px 0; flex-wrap: wrap; }
.landing-page .strip-label { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-40); white-space: nowrap; }
.landing-page .strip-mkts { display: flex; align-items: center; gap: clamp(18px, 3.5vw, 40px); flex-wrap: wrap; }
.landing-page .strip-mkt { font-family: var(--font-ui); font-weight: 600; font-size: 16px; color: var(--ink-60); display: inline-flex; align-items: center; gap: 9px; }
.landing-page .strip-mkt .cp-dot { width: 9px; height: 9px; }

/* Sections */
.landing-page section.block { padding: clamp(64px, 9vw, 116px) 0; }
.landing-page .sec-head { max-width: 720px; }
.landing-page .sec-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin-top: 18px; text-wrap: balance; }
.landing-page .sec-head .lede { margin-top: 18px; }

/* Problem cards */
.landing-page .prob-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 52px; }
.landing-page .prob { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; position: relative; }
.landing-page .prob-ic { width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.landing-page .prob-ic svg { width: 23px; height: 23px; }
.landing-page .prob h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 22px 0 0; }
.landing-page .prob p { font-family: var(--font-text); font-size: 15.5px; line-height: 1.6; color: var(--ink-60); margin-top: 11px; }
.landing-page .prob .idx { position: absolute; top: 22px; right: 26px; font-family: var(--font-ui); font-weight: 700; font-size: 13px; color: var(--ink-20); }

/* How it works */
.landing-page .how { background: var(--fg); color: var(--bg); position: relative; overflow: hidden; }
.landing-page .how .stripes { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(45deg, rgb(255 255 255 / .028) 0 2px, transparent 2px 22px); }
.landing-page .how .wrap { position: relative; z-index: 1; }
.landing-page .how .eyebrow { color: var(--lp-accent-onink); }
.landing-page .how .eyebrow::before { background: var(--lp-accent-onink); }
.landing-page .how .sec-head h2 { color: var(--bg); }
.landing-page .how .sec-head .lede { color: rgb(255 250 248 / .72); }
.landing-page .steps { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgb(255 255 255 / .14); }
.landing-page .step { padding: 36px 30px 36px 0; border-right: 1px solid rgb(255 255 255 / .14); }
.landing-page .step:last-child { border-right: none; padding-right: 0; }
.landing-page .step:not(:first-child) { padding-left: 30px; }
.landing-page .step-n { font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; color: var(--lp-accent-onink); }
.landing-page .step-ic { width: 44px; height: 44px; border-radius: var(--radius-md); border: 1px solid rgb(255 255 255 / .18); display: grid; place-items: center; margin: 20px 0 0; color: var(--bg); }
.landing-page .step-ic svg { width: 22px; height: 22px; }
.landing-page .step h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--bg); letter-spacing: -0.01em; margin: 22px 0 0; }
.landing-page .step p { font-family: var(--font-text); font-size: 15.5px; line-height: 1.62; color: rgb(255 250 248 / .68); margin-top: 12px; }

/* Feature split */
.landing-page .split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 84px); align-items: center; }
.landing-page .split-head { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -0.02em; margin-top: 18px; }
.landing-page .split-lede { margin-top: 18px; }
.landing-page .split-list { margin-top: 30px; display: flex; flex-direction: column; gap: 4px; }
.landing-page .split-item { display: flex; gap: 15px; padding: 18px 0; border-top: 1px solid var(--border); }
.landing-page .split-item:last-child { border-bottom: 1px solid var(--border); }
.landing-page .split-item .si-ic { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-top: 1px; }
.landing-page .split-item .si-ic svg { width: 15px; height: 15px; }
.landing-page .split-item h4 { font-family: var(--font-ui); font-weight: 700; font-size: 16px; margin: 0 0 4px; color: var(--fg); }
.landing-page .split-item p { font-family: var(--font-text); font-size: 14.5px; line-height: 1.55; color: var(--ink-60); }

/* Dashboard mini card */
.landing-page .dash { padding: 24px; box-shadow: var(--shadow-2); }
.landing-page .dash-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.landing-page .d-title { font-family: var(--font-ui); font-weight: 700; font-size: 15px; }
.landing-page .dash-kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; margin-top: 18px; }
.landing-page .dash-kpi { background: #fff; padding: 15px 14px; }
.landing-page .dash-kpi .k-l { font-family: var(--font-ui); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-40); }
.landing-page .dash-kpi .k-v { font-family: var(--font-ui); font-weight: 700; font-size: 19px; color: var(--fg); margin-top: 6px; }
.landing-page .dash-kpi .k-v.up { color: var(--accent); }
.landing-page .dash-chart { margin-top: 18px; display: flex; align-items: flex-end; gap: 6px; height: 84px; }
.landing-page .bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--accent-soft); }
.landing-page .bar.hot { background: var(--accent); }

/* CTA dark section */
.landing-page .cta-section { background: var(--fg); color: var(--bg); position: relative; overflow: hidden; }
.landing-page .cta-section .stripes { position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, rgb(255 255 255 / .03) 0 2px, transparent 2px 24px); pointer-events: none; }
.landing-page .cta-ghost { position: absolute; left: -120px; bottom: -180px; width: 520px; height: 520px; color: #fff; opacity: 0.05; pointer-events: none; }
.landing-page .cta-section .wrap { position: relative; z-index: 1; text-align: center; padding: clamp(72px, 10vw, 130px) 0; }
.landing-page .cta-section h2 { font-size: clamp(32px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.025em; color: var(--bg); text-wrap: balance; margin-top: 18px; }
.landing-page .cta-section p { font-family: var(--font-text); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; color: rgb(255 250 248 / .74); margin: 22px auto 0; max-width: 32em; }
.landing-page .cta-btns { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.landing-page .cta-foot { margin-top: 26px; font-family: var(--font-ui); font-size: 13px; color: rgb(255 250 248 / .5); display: inline-flex; align-items: center; gap: 8px; }

/* Footer */
.landing-page .l-ft { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0 40px; }
.landing-page .ft-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.landing-page .ft-brand .word { font-family: var(--font-ui); font-weight: 700; font-size: 18px; }
.landing-page .ft-tag { font-family: var(--font-text); font-size: 14.5px; line-height: 1.55; color: var(--ink-60); margin-top: 14px; max-width: 26em; }
.landing-page .ft-col h5 { font-family: var(--font-ui); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-40); margin: 0 0 14px; }
.landing-page .ft-col a { display: block; font-family: var(--font-ui); font-size: 14.5px; color: var(--ink-60); padding: 6px 0; transition: color var(--dur-base); text-decoration: none; }
.landing-page .ft-col a:hover { color: var(--fg); }
.landing-page .ft-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); font-family: var(--font-ui); font-size: 13px; color: var(--ink-40); flex-wrap: wrap; gap: 12px; }

/* Reveal animation */
.landing-page .reveal { opacity: 1; transform: translateY(14px); transition: transform .6s var(--ease-out); }
.landing-page .reveal.in { transform: none; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat + .stat { border-left: none; }
  .stat:nth-child(2), .stat:nth-child(4) { border-left: 1px solid var(--border); }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .hero-card { grid-template-columns: 1fr; }
  .auth-actions { width: 100%; justify-content: flex-end; overflow-x: auto; padding-bottom: 2px; }
  .header-link { font-size: 12px; padding: 0 9px; }
  .dc-stats { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .header { align-items: flex-start; gap: 8px; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .rq-ai-fields { grid-template-columns: 1fr; }
}

@media (max-width: 940px) {
  .landing-page .hero-grid { grid-template-columns: 1fr; }
  .landing-page .hero-visual { min-height: 0; margin-top: 12px; }
  .landing-page .appraisal { margin: 0 auto; }
  .landing-page .crosspost { display: none; }
  .landing-page .prob-grid { grid-template-columns: 1fr; }
  .landing-page .steps { grid-template-columns: 1fr; }
  .landing-page .step { border-right: none; border-bottom: 1px solid rgb(255 255 255 / .14); padding: 30px 0; }
  .landing-page .step:not(:first-child) { padding-left: 0; }
  .landing-page .step:last-child { border-bottom: none; }
  .landing-page .split { grid-template-columns: 1fr; }
  .landing-page .nav-links { display: none; }
  .landing-page .ft-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .landing-page .ft-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .landing-page .ft-grid { grid-template-columns: 1fr; }
  .landing-page .hero-trust { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page .reveal { transform: none; transition: none; }
  .landing-page .live-dot { animation: none; }

  /* Cross-cutting a11y safety net (Phase 6): honor the OS "reduce motion"
     preference app-wide, not just on the landing page. Decorative transitions
     and pulse/fade animations are neutralized; loading spinners keep an
     imperceptible rotation so they still read as "working" without motion
     sickness. Scoped to *: intentional and standard for this preference. */
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Impersonation Banner ── */
.impersonation-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 36px;
  background: var(--warn, #d97706);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 var(--screen-pad);
}
.impersonation-banner-info {
  opacity: 0.92;
}
.impersonation-banner-stop {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-sm);
  color: white;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  cursor: pointer;
  transition: background var(--dur-quick);
}
.impersonation-banner-stop:hover {
  background: rgba(255,255,255,0.32);
}
/* When banner is active, push nav and page content down */
body.is-impersonating .nav {
  top: 36px;
}
body.is-impersonating .page,
body.is-impersonating .dash-main {
  padding-top: calc(var(--nav-h) + 36px + 20px);
}
/* Shell's slim top header sits below the impersonation banner. */
body.is-impersonating .app-shell .app-header {
  top: 36px;
}

/* ── Camera Capture Modal ── */
.camera-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.camera-modal {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.camera-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.camera-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.camera-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.camera-close:hover {
  background: var(--hover-bg);
}

.camera-device-select {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.camera-device-select label {
  color: var(--fg-muted);
  font-weight: 500;
}

.camera-device-select select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--bg);
}

.camera-preview {
  position: relative;
  background: #000;
  aspect-ratio: 4 / 3;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.camera-loading .spinner {
  width: 32px;
  height: 32px;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

.camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: white;
  font-size: 0.9rem;
  line-height: 1.5;
}

.camera-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.camera-actions .btn {
  flex: 1;
}

.camera-capture-btn {
  flex: 2 !important;
}

.camera-hint {
  padding: 0 18px 14px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-align: center;
}

/* Photo suggestions */
.photo-suggestions {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 12px;
}

.photo-suggestions-title {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 6px;
}

.photo-suggestions-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: var(--fg);
  line-height: 1.6;
}

.photo-suggestions-list li {
  margin-bottom: 2px;
}

.photo-count-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.photo-count-bar {
  flex: 1;
  height: 4px;
  background: var(--track);
  border-radius: 2px;
  overflow: hidden;
}

.photo-count-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.2s ease;
}

.photo-count-fill.good {
  background: var(--good);
}

.photo-count-text {
  font-size: 0.72rem;
  color: var(--fg-muted);
  white-space: nowrap;
}

/* ── Settings — Connected Accounts (WS-0) ─────────────────────────────────── */
.connection-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--row-pad);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.connection-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.connection-label {
  font-weight: 600;
}
.connection-status {
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.connection-status.status-connected {
  color: var(--good);
}
.connection-status.status-error {
  color: var(--bad);
}

/* ── Coordination / Sales Concierge — Inbox (spec §5, WS-5) ─────────────────── */
/* Mobile-first: the thread list stacks above the detail on phones; the two-pane
   layout appears from the tablet width up. */
.inbox-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4, 16px);
  margin-top: var(--space-4, 16px);
}
@media (min-width: 760px) {
  .inbox-layout { grid-template-columns: 280px 1fr; }
}
.inbox-threads {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-thread-row {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(28,28,30,0.12));
  border-radius: var(--radius-md, 10px);
  background: var(--surface, #fff);
  cursor: pointer;
}
.inbox-thread-row.is-selected {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.inbox-thread-buyer { font-weight: 600; }
.inbox-intent { font-size: var(--fs-small, 11px); font-weight: 600; }
.inbox-channel { font-size: var(--fs-small, 11px); color: var(--muted, #6b6b70); }
.inbox-flag { font-size: var(--fs-small, 11px); color: var(--warn); font-weight: 600; }
.inbox-detail { min-width: 0; }
.inbox-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: var(--space-3, 12px) 0;
}
.inbox-msg { max-width: 80%; padding: 8px 12px; border-radius: var(--radius-md, 10px); }
.inbox-msg-inbound { align-self: flex-start; background: var(--chip, rgba(28,28,30,0.06)); }
.inbox-msg-outbound { align-self: flex-end; background: var(--accent-soft, rgba(25,10,219,0.08)); }
.inbox-msg-meta { font-size: var(--fs-small, 11px); color: var(--muted, #6b6b70); margin-top: 2px; }
.inbox-reply { display: flex; flex-direction: column; gap: 8px; }
.inbox-reply textarea { width: 100%; min-height: 64px; resize: vertical; }
/* ── Approval Gates (HITL gate #1 price · gate #2 pickup) ───────────────── */
/* One reusable visual language for the two "sacred" one-tap approval gates.
   Both gates read as the same deliberate decision: a tinted, accented card with
   a clear title, the value being approved, and an explicit confirm action. */
.approval-gate {
  border: 1px solid var(--accent-border, var(--accent));
  border-left-width: 3px;
  border-radius: var(--radius-md, 10px);
  background: var(--accent-soft, rgba(25, 10, 219, 0.06));
  padding: var(--space-3, 12px) var(--space-4, 16px);
  margin: var(--space-3, 12px) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
/* gate #1 (price): accent. gate #2 (pickup): warn — sharing an address is the
   weightier "are you sure" decision. */
.approval-gate.gate-price {
  border-color: var(--accent-border, var(--accent));
  background: var(--accent-soft, rgba(25, 10, 219, 0.06));
}
.approval-gate.gate-pickup {
  border-color: var(--warn-border, var(--warn));
  background: var(--warn-soft, rgba(176, 116, 16, 0.13));
}
.approval-gate .gate-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
}
.approval-gate .gate-title { font-weight: 600; }
.approval-gate .gate-value { font-weight: 700; }
.approval-gate.gate-pickup .gate-value { font-size: var(--fs-body, 1rem); }
.approval-gate .gate-desc { margin: 0; }
.approval-gate .gate-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.approval-gate .gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 8px);
}
/* Pickup-gate controls: slot radios + address-share toggle. */
.gate-slots {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}
.gate-slot {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--border, rgba(28, 28, 30, 0.12));
  border-radius: var(--radius-md, 10px);
  background: var(--surface, #fff);
  cursor: pointer;
}
.gate-slot.is-selected {
  border-color: var(--warn-border, var(--warn));
  box-shadow: var(--shadow-focus);
}
.gate-share {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  min-height: 44px;
  cursor: pointer;
}
.gate-address { width: 100%; }

