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

:root {
  --bg: #0a0a0c;
  --surface: #141418;
  --surface-elevated: #1a1a1f;
  --border: #2a2a30;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #a78bfa;
  --accent-muted: rgba(167, 139, 250, 0.45);
  --accent-soft: rgba(167, 139, 250, 0.12);
  --error: #f87171;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --section-max: 1200px;
  --hero-headline: clamp(2rem, 5vw, 3.25rem);
  --section-headline: clamp(1.5rem, 3vw, 2.25rem);
  --eyebrow: 0.75rem;
}
html.theme-light {
  --bg: #f8f9fa;
  --surface: #fff;
  --surface-elevated: #fff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #7c3aed;
  --accent-muted: rgba(124, 58, 237, 0.4);
  --accent-soft: rgba(124, 58, 237, 0.08);
  --error: #dc2626;
}
html.theme-light .message.loading { background: rgba(124, 58, 237, 0.12); color: var(--accent); }
html.theme-light .message.error { background: rgba(220, 38, 38, 0.12); color: var(--error); }
html.theme-light tr.target-row td { background: rgba(124, 58, 237, 0.04); }
html.theme-light .candidate-item .candidate-row:hover { background: rgba(124, 58, 237, 0.06); }
html.theme-light .candidate-item.highlight-from-map .candidate-row { background: rgba(124, 58, 237, 0.12); }
html.theme-light .candidate-item.highlight-from-map .candidate-details { background: rgba(124, 58, 237, 0.06); }
html.theme-light .photo-lightbox { background: rgba(0,0,0,0.85); }
html.theme-light .confirm-modal { box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
* { box-sizing: border-box; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: auto;
}
.container { width: 100%; min-width: 1080px; max-width: 1080px; margin: 0 auto; padding: 1.25rem 1.5rem 2rem; }
/* Allow full-width pricing gate and about view to extend past container */
.container:has(.pricing-gate.visible),
.container:has(#how-to-use-view.visible) {
  overflow-x: visible;
}
.page-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* Site header — Anima-style full-width bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
html.theme-light .site-header { background: rgba(255, 255, 255, 0.9); }
.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.site-logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}
.site-nav { justify-self: center; }
.header-actions { justify-self: end; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav-product-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.site-nav.product-group-visible .site-nav-product-group {
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0;
  border: 1px solid var(--border);
}
.site-nav.product-group-visible .site-nav-product-group a {
  border-radius: 0;
  background: transparent;
  padding: 0.5rem 0.85rem;
  color: var(--muted);
}
.site-nav.product-group-visible .site-nav-product-group a:first-of-type {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.site-nav.product-group-visible .site-nav-product-group a:last-of-type {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.site-nav.product-group-visible .site-nav-product-group a:hover {
  background: var(--accent-soft);
  color: var(--text);
}
.site-nav.product-group-visible .site-nav-product-group a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-nav a.active { color: var(--accent); }
.site-logo:hover { color: var(--text); opacity: 0.9; }
.site-logo svg { flex-shrink: 0; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-actions .theme-toggle { margin: 0; }
.auth-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.auth-user-email {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-btn.auth-login,
.auth-btn.auth-logout {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}
.header-cta {
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  background: var(--accent);
  color: var(--bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.05s ease;
}
.header-cta:hover { opacity: 0.95; }
.header-cta:focus { outline: none; box-shadow: 0 0 0 2px var(--accent-muted); }
h1 { font-size: 1.5rem; margin-bottom: 0.25rem; font-weight: 700; letter-spacing: -0.02em; font-family: var(--font-sans); }
.subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.form-row { display: flex; gap: 0.6rem; align-items: flex-end; margin-bottom: 0.875rem; }
.input-wrap { flex: 1; }
.input-wrap label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.25rem; }
input[type="text"] { width: 100%; padding: 0.6rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; font-family: var(--font-sans); }
button { padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-size: 0.95rem; cursor: pointer; border: none; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease; font-family: var(--font-sans); }
#search-btn, .primary { background: var(--accent); color: var(--bg); }
.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
button:hover:not(:disabled) { opacity: 0.9; }
.icon-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.icon-btn .btn-icon { flex-shrink: 0; display: block; width: 18px; height: 18px; }
.finish-btn, .start-new-comp-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.finish-btn .finish-btn-icon, .start-new-comp-btn .trash-icon { flex-shrink: 0; display: block; width: 18px; height: 18px; }
.secondary:hover:not(:disabled) { background: var(--border); border-color: var(--muted); }
#load-candidates-btn:hover:not(:disabled) { background: rgba(167, 139, 250, 0.2) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
html.theme-light #load-candidates-btn:hover:not(:disabled) { background: rgba(124, 58, 237, 0.15) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
.candidates-section-intro { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.candidates-options-card {
  margin-bottom: 1.25rem;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
html.theme-light .candidates-options-card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.candidates-options-card-header {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
html.theme-light .candidates-options-card-header { background: var(--surface); }
.candidates-options-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2.5rem;
  padding: 1rem 1.25rem 1.25rem;
}
.candidates-options-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}
.candidates-options-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.candidates-options-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 8rem;
  width: 8rem;
}
.candidates-options-input-wrap input { min-width: 5ch; }
#candidates-search-days { min-width: 5ch; width: 100%; }
.candidates-options-input-wrap input {
  width: 100%;
  min-width: 5ch;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.candidates-options-input-wrap input:hover { border-color: var(--muted); }
.candidates-options-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
html.theme-light .candidates-options-input-wrap input:focus { box-shadow: 0 0 0 2px var(--accent-muted); }
.candidates-options-unit {
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
}
/* Custom rank dropdown */
.rank-select-wrap { position: relative; width: 100%; max-width: 20rem; }
.rank-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 11rem;
  padding: 0.5rem 0.75rem 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.rank-select-trigger:hover { border-color: var(--muted); }
.rank-select-wrap.open .rank-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
html.theme-light .rank-select-wrap.open .rank-select-trigger { box-shadow: 0 0 0 2px var(--accent-muted); }
.rank-select-value { display: flex; align-items: center; gap: 0.35rem; }
.rank-select-chevron { flex-shrink: 0; color: var(--muted); transition: transform 0.2s ease; }
.rank-select-wrap.open .rank-select-chevron { transform: rotate(180deg); }
.rank-diamond-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-muted);
}
.rank-diamond-icon svg { display: block; }
.rank-select-value .rank-diamond-icon { color: var(--accent); }
.rank-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 22rem;
  margin-top: 2px;
  padding: 0.35rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 110;
  display: none;
  overflow: visible;
}
html.theme-light .rank-select-dropdown { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.rank-select-wrap.open .rank-select-dropdown { display: block; }
.rank-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.rank-option:hover { background: rgba(167, 139, 250, 0.08); }
html.theme-light .rank-option:hover { background: rgba(124, 58, 237, 0.06); }
.rank-option-smart {
  background: rgba(167, 139, 250, 0.06);
}
.rank-option-smart:hover {
  background: rgba(167, 139, 250, 0.1);
}
html.theme-light .rank-option-smart {
  background: rgba(124, 58, 237, 0.04);
}
html.theme-light .rank-option-smart:hover {
  background: rgba(124, 58, 237, 0.08);
}
.rank-option-smart .rank-diamond-icon {
  color: var(--accent);
}
html.theme-light .rank-option-smart .rank-diamond-icon { color: var(--accent); }
.rank-option:not(.rank-option-smart) .rank-diamond-icon { display: none; }
.load-candidates-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.25rem; }
.load-candidates-btn { margin-top: 0; }
.extra-filters-wrap {
  padding: 0.75rem 1rem 1rem;
  margin-top: -0.25rem;
}
.extra-filters-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease, background-color 0.15s ease;
}
.extra-filters-trigger:hover { color: var(--accent); }
.extra-filters-trigger .extra-filters-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  opacity: 0.8;
}
.extra-filters-trigger[aria-expanded="true"] {
  color: var(--accent);
}
.extra-filters-trigger[aria-expanded="true"] .extra-filters-chevron { transform: rotate(180deg); }
.extra-filters-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.extra-filters-panel.is-open {
  grid-template-rows: 1fr;
}
.extra-filters-panel > .extra-filters-panel-inner {
  overflow: hidden;
}
.extra-filters-panel[hidden] { display: none !important; }
.extra-filters-panel { padding: 0; }
.extra-filters-panel .extra-filters-panel-inner { padding: 0.6rem 0 0; }
.extra-filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem 1.5rem; }
.extra-filters-group { display: flex; flex-direction: column; gap: 0.25rem; }
.extra-filters-group label { font-size: 0.8rem; color: var(--muted); }
.extra-filters-range { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.extra-filters-range input { width: 4.5rem; padding: 0.4rem 0.5rem; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.extra-filters-range input:focus { outline: none; border-color: var(--accent); }
.extra-filters-range span { color: var(--muted); font-size: 0.9rem; }
.extra-filters-group select { padding: 0.4rem 0.5rem; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); min-width: 5rem; max-width: 8rem; }
.extra-filters-group select:focus { outline: none; border-color: var(--accent); }
.smart-select-comps-btn { margin-top: 0; background: var(--surface); border-color: var(--border); color: var(--accent); }
.smart-select-comps-btn .rank-diamond-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; color: var(--accent); }
.smart-select-comps-btn:hover:not(:disabled) { background: rgba(167, 139, 250, 0.08) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
html.theme-light .smart-select-comps-btn { background: var(--surface); border-color: var(--border); }
html.theme-light .smart-select-comps-btn:hover:not(:disabled) { background: rgba(124, 58, 237, 0.06) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
.finish-btn:hover:not(:disabled) { background: rgba(167, 139, 250, 0.12) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
html.theme-light .finish-btn:hover:not(:disabled) { background: rgba(124, 58, 237, 0.08) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
.start-new-comp-btn:hover:not(:disabled) { background: rgba(220, 38, 38, 0.15) !important; border-color: #dc2626 !important; color: #dc2626 !important; }
.start-new-comp-btn:hover:not(:disabled) .trash-icon { stroke: #dc2626; }
button:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: var(--muted);
  background: var(--border) !important;
  border-color: var(--border) !important;
}
#search-btn:disabled { color: var(--bg); background: var(--muted) !important; }
.message { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.message.message-toast { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: calc(100% - 2rem); margin-bottom: 0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.message.message-toast.loading { background: rgba(196, 181, 253, 0.95); color: #fff; }
html.theme-light .message.message-toast.loading { background: rgba(196, 181, 253, 0.95); color: #5b21b6; }
.message.message-by-load-buttons { position: fixed; top: 5rem; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: calc(100% - 2rem); margin-bottom: 0; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.message.message-by-load-buttons.loading { background: rgba(196, 181, 253, 0.95); color: #fff; }
html.theme-light .message.message-by-load-buttons.loading { background: rgba(196, 181, 253, 0.95); color: #5b21b6; }
.message.loading { background: rgba(167, 139, 250, 0.15); color: var(--accent); }
html.theme-light .message.loading { background: rgba(124, 58, 237, 0.12); color: var(--accent); }
.message.error { background: rgba(248, 113, 113, 0.15); color: var(--error); }
#after-search { margin-top: 1.5rem; }
.main-how-it-works { margin-top: 2rem; }
.main-how-it-works.hidden { display: none !important; }
.main-how-section { margin-bottom: 0; }
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.65rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); scrollbar-color: var(--border) var(--surface); scrollbar-width: thin; }
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: var(--surface); border-radius: 0 0 10px 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--muted); }
table { width: 100%; border-collapse: collapse; font-family: inherit; font-size: inherit; }
th, td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; font-family: inherit; font-size: 1rem; }
tr:last-child td { border-bottom: none; }
tr.target-row td { background: rgba(167, 139, 250, 0.05); }
td.numeric { font-family: inherit; font-size: inherit; }
.target-edit-hint { font-size: 0.85rem; color: var(--muted); margin-top: -0.5rem; margin-bottom: 0.75rem; }
/* Subject property: fully stylized card */
.target-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
html.theme-light .target-card { box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.target-card-header {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(167, 139, 250, 0.04);
}
html.theme-light .target-card-header { background: rgba(124, 58, 237, 0.03); }
.target-card-body { padding: 1.25rem; }
.target-photos-wrap { width: 100%; box-sizing: border-box; }
.target-block { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem 1.25rem; padding: 0; width: 100%; box-sizing: border-box; }
.target-field { display: flex; flex-direction: column; gap: 0.35rem; }
#target-table { width: 100%; }
.target-field-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.target-field-value { font-size: 1rem; color: var(--text); }
/* Only style text/number inputs and selects — not the condition range input */
.target-field-value input:not([type="range"]),
.target-field-value select {
  width: 100%;
  max-width: 12rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.target-field-value input:not([type="range"]):hover,
.target-field-value select:hover { border-color: var(--muted); }
.target-field-value input:not([type="range"]):focus,
.target-field-value select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.target-block .condition-slider-wrap { min-width: 10rem; max-width: 12rem; width: 100%; background: transparent; border: none; box-shadow: none; padding: 0; outline: none; box-sizing: border-box; --track-h: 8px; --thumb-size: 16px; }
.target-block .target-field-value .condition-slider-wrap { background: transparent; border: none; }
/* Subject block: no input-like box around condition; value stays within slider width; no focus ring */
.target-block .target-field-value:has(> .condition-slider-wrap) {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 12rem;
  box-shadow: none;
  outline: none;
}
.target-block .condition-slider-wrap input[type="range"] { height: 20px; }
.target-block .condition-slider-wrap .condition-labels { font-size: 0.65rem; }
.target-block .condition-slider-wrap .condition-value { font-size: 0.75rem; }
.target-block .condition-slider-wrap input[type="range"]:focus {
  outline: none;
  box-shadow: none;
}
.target-block .condition-slider-wrap .condition-value {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  text-align: center;
  box-sizing: border-box;
}
.target-block .condition-slider-wrap .condition-labels {
  min-width: 0;
  overflow: hidden;
}
.target-photos-wrap { padding: 1.25rem; border-bottom: 1px solid var(--border); }
#target-table .target-edit-cell { padding: 0.4rem 0.6rem; vertical-align: middle; }
#target-table .target-edit-input { width: 100%; min-width: 5ch; max-width: 10rem; padding: 0.4rem 0.5rem; font-size: 0.95rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
#target-table .target-edit-input:focus { outline: none; border-color: var(--accent); }
#target-table .target-edit-select { padding: 0.4rem 0.5rem; font-size: 0.95rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); min-width: 5rem; }
#target-table .target-edit-select:focus { outline: none; border-color: var(--accent); }
#target-table .target-condition-wrap { min-width: 10rem; max-width: 12rem; --track-h: 8px; --thumb-size: 16px; background: transparent; border: none; box-shadow: none; outline: none; }
#target-table .target-edit-cell.condition-cell .condition-slider-wrap input[type="range"] { height: 20px; }
#target-table .target-edit-cell.condition-cell .condition-slider-wrap .condition-labels { font-size: 0.65rem; }
#target-table .target-edit-cell.condition-cell .condition-slider-wrap .condition-value { font-size: 0.75rem; }
#target-table .target-edit-cell.condition-cell .condition-slider-wrap .condition-value { display: block; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-align: center; }
#target-table .target-edit-cell.condition-cell .condition-slider-wrap input[type="range"]:focus { outline: none; box-shadow: none; }
#target-table td:nth-child(2), .suitable-comps-box td:nth-child(2), #final-table td:nth-child(2) { white-space: nowrap; min-width: 10ch; }
.feature-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.feature-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0.45rem 0.75rem; font-size: 0.9rem; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.feature-btn:hover { background: rgba(167, 139, 250, 0.08); border-color: var(--accent-muted); color: var(--accent); }
html.theme-light .feature-btn:hover { background: rgba(124, 58, 237, 0.06); border-color: var(--accent-muted); color: var(--accent); }
.candidates-area-row { display: flex; flex-direction: row; gap: 1rem; align-items: flex-start; transition: flex-direction 0.4s ease; }
.candidates-residual-chart-wrap { margin-top: 1rem; margin-bottom: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.candidates-residual-chart-wrap .section-title { margin: 0 0 0.25rem; }
.residual-chart-caption { font-size: 0.85rem; color: var(--muted); margin: 0 0 0.75rem; }
.candidates-residual-chart { width: 100%; max-width: 100%; height: 320px; border-radius: 8px; overflow: hidden; }
.candidates-residual-chart svg { display: block; width: 100%; height: 100%; }
.candidates-list-col { flex: 0 0 60%; min-width: 0; transition: flex 0.4s ease; }
.candidates-map-col { flex: 0 0 40%; min-width: 0; position: sticky; top: 1.5rem; transition: width 0.4s ease, flex 0.4s ease; }
.candidates-area-row.map-expanded { flex-direction: column; align-items: stretch; }
.candidates-area-row.map-expanded .candidates-list-col { flex: 0 0 auto; position: static; min-width: 0; }
.candidates-area-row.map-expanded .candidates-map-col { flex: 0 0 auto; position: static; order: -1; width: 100%; transition: width 0.4s ease, flex 0.4s ease; }
.candidates-area-row.map-expanded .candidates-map-wrap { width: 100%; transition: width 0.4s ease; }
.candidates-area-row.map-expanded .candidates-map { min-height: 48vh; aspect-ratio: auto; height: 48vh; transition: height 0.4s ease, min-height 0.4s ease; }
.candidates-list { margin-top: 0; }
.candidates-map-wrap { display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch; transition: width 0.4s ease; }
.candidates-map { width: 100%; min-width: 0; height: 260px; min-height: 200px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); transition: height 0.4s ease, min-height 0.4s ease; }
.candidates-map .leaflet-tile-pane { filter: hue-rotate(275deg) saturate(0.7) brightness(0.82) contrast(1.05); }
html.theme-light .candidates-map .leaflet-tile-pane { filter: hue-rotate(280deg) saturate(0.92) brightness(0.98); }
.candidates-map .candidates-map-zone-rect { stroke-linejoin: round; stroke-linecap: round; stroke-width: 3; }
.candidates-map-sidebar { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.candidates-map-controls { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.candidates-map-controls label { font-size: 0.9rem; color: var(--muted); }
.candidates-map-controls input[type="number"] { width: auto; min-width: 3.5rem; max-width: 4rem; padding: 0.35rem 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 0.9rem; }
.candidates-map-tool-btn { width: 100%; justify-content: center; }
.candidates-map-tool-btn.active { background: rgba(167, 139, 250, 0.12); border-color: var(--accent); color: var(--accent); }
html.theme-light .candidates-map-tool-btn.active { background: rgba(124, 58, 237, 0.1); border-color: var(--accent); color: var(--accent); }
.map-marker { position: relative; border: 2px solid var(--surface); border-radius: 50%; font-weight: 600; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.3); box-sizing: border-box; }
.map-marker span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; line-height: 1; }
.map-marker-subject { width: 24px; height: 24px; background: var(--accent); color: var(--bg); }
.map-marker-subject span { font-size: 0.65rem; }
.map-marker-candidate { width: 22px; height: 22px; background: var(--text); color: var(--bg); }
.map-marker-candidate span { font-size: 0.7rem; }
.map-marker-candidate:hover { transform: scale(1.15); }
.map-marker-candidate:hover span { transform: translate(-50%, -50%); }
.candidate-item { margin-bottom: 0.5rem; }
.candidate-item .candidate-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.85rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; transition: background-color 0.35s ease; }
.candidate-item .candidate-row:hover { background: rgba(167, 139, 250, 0.06); }
.candidate-item.highlight-from-map .candidate-row { background: rgba(167, 139, 250, 0.15); }
.candidate-item.highlight-from-map .candidate-details { background: rgba(167, 139, 250, 0.06); transition: background-color 0.35s ease, max-height 0.35s; }
.candidate-item .candidate-row .address { font-weight: 500; margin-bottom: 0.2rem; }
.candidate-item .candidate-row .attrs { font-size: 0.8rem; color: var(--muted); }
.candidate-details { max-height: 0; overflow: hidden; transition: max-height 0.35s, background-color 0.35s ease; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; }
.candidate-item.expanded .candidate-details { max-height: 5000px; overflow: visible; }
.candidate-details-inner { padding: 1.25rem; }
.comp-photos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; max-height: 480px; overflow-y: auto; }
.comp-photos img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; pointer-events: auto; transition: opacity 0.2s ease; }
.comp-photos img:hover { opacity: 0.9; }
.comp-photo-thumb { display: block; }
.suitable-comps-box .comp-photo-cell { width: 64px; padding: 0.4rem; vertical-align: middle; overflow: hidden; }
.suitable-comps-box .comp-photo-cell-inner { position: relative; display: inline-block; transition: transform 0.2s ease; transform-origin: center center; cursor: pointer; }
.suitable-comps-box .comp-photo-cell-inner .comp-photo-cell-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; background: rgba(0,0,0,0.45); border-radius: 4px; pointer-events: none; }
.suitable-comps-box .comp-photo-cell-inner img { display: block; }
.suitable-comps-box .comp-photo-cell-inner:hover { transform: scale(1.05); }
.suitable-comps-box .comp-photo-cell-inner img { width: 54px; height: 42px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); cursor: pointer; transition: filter 0.2s ease; vertical-align: top; }
.suitable-comps-box .comp-photo-cell-inner:hover img { filter: brightness(0.92); }
.suitable-comps-box .condition-cell { min-width: 10rem; max-width: 12rem; padding: 0.5rem 0.75rem; vertical-align: middle; }
.suitable-comps-box .condition-cell .condition-slider-wrap { --track-h: 8px; --thumb-size: 16px; min-width: 10rem; max-width: 12rem; }
.suitable-comps-box .condition-cell .condition-slider-wrap input[type="range"] { height: 20px; }
.suitable-comps-box .condition-cell .condition-slider-wrap .condition-labels { font-size: 0.65rem; }
.suitable-comps-box .condition-cell .condition-slider-wrap .condition-value { font-size: 0.75rem; }
.condition-slider-wrap { width: 100%; min-width: 160px; max-width: 100%; display: flex; flex-direction: column; gap: 0.3rem; --track-h: 12px; --thumb-size: 20px; }
.condition-slider-wrap input[type="range"] { width: 100%; height: 24px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.condition-slider-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: var(--track-h);
  background: linear-gradient(to right, var(--condition-fill) 0%, var(--condition-fill) var(--condition-pct, 40%), var(--border) var(--condition-pct, 40%), var(--border) 100%);
  border-radius: 6px;
}
.condition-slider-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: var(--condition-fill);
  cursor: pointer;
  margin-top: calc((var(--track-h) - var(--thumb-size)) / 2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  border: 2px solid var(--surface);
  transition: transform 0.12s ease;
}
.condition-slider-wrap input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.06); }
.condition-slider-wrap input[type="range"]::-moz-range-track {
  height: var(--track-h);
  background: linear-gradient(to right, var(--condition-fill) 0%, var(--condition-fill) var(--condition-pct, 40%), var(--border) var(--condition-pct, 40%), var(--border) 100%);
  border-radius: 6px;
}
.condition-slider-wrap input[type="range"]::-moz-range-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: var(--condition-fill);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  border: 2px solid var(--surface);
  transition: transform 0.12s ease;
}
.condition-slider-wrap input[type="range"]::-moz-range-thumb:hover { transform: scale(1.06); }
.condition-slider-wrap .condition-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; }
.condition-slider-wrap .condition-value { font-size: 0.8125rem; font-weight: 600; text-align: center; transition: color 0.2s ease; }
.condition-slider-wrap .condition-desc { font-size: 0.75rem; color: var(--muted); text-align: center; margin-top: 0.1rem; transition: color 0.2s ease; }
/* Toned-down semantic colors for condition scale (C1 good → C6 poor) */
.condition-slider-wrap.condition-1 { --condition-fill: #5a9f6e; --condition-pct: 0%; } .condition-slider-wrap.condition-1 .condition-value, .condition-slider-wrap.condition-1 .condition-desc { color: #6bb87a; }
.condition-slider-wrap.condition-2 { --condition-fill: #6b9b6e; --condition-pct: 20%; } .condition-slider-wrap.condition-2 .condition-value, .condition-slider-wrap.condition-2 .condition-desc { color: #7dab7e; }
.condition-slider-wrap.condition-3 { --condition-fill: #8a9a5c; --condition-pct: 40%; } .condition-slider-wrap.condition-3 .condition-value, .condition-slider-wrap.condition-3 .condition-desc { color: #9aaa6e; }
.condition-slider-wrap.condition-4 { --condition-fill: #b8a03e; --condition-pct: 60%; } .condition-slider-wrap.condition-4 .condition-value, .condition-slider-wrap.condition-4 .condition-desc { color: #c4b04e; }
.condition-slider-wrap.condition-5 { --condition-fill: #c07d52; --condition-pct: 80%; } .condition-slider-wrap.condition-5 .condition-value, .condition-slider-wrap.condition-5 .condition-desc { color: #d0906a; }
.condition-slider-wrap.condition-6 { --condition-fill: #c75c5c; --condition-pct: 100%; } .condition-slider-wrap.condition-6 .condition-value, .condition-slider-wrap.condition-6 .condition-desc { color: #d97070; }
html.theme-light .condition-slider-wrap.condition-1 .condition-value, html.theme-light .condition-slider-wrap.condition-1 .condition-desc { color: #2d7a45; }
html.theme-light .condition-slider-wrap.condition-2 .condition-value, html.theme-light .condition-slider-wrap.condition-2 .condition-desc { color: #3d8b4e; }
html.theme-light .condition-slider-wrap.condition-3 .condition-value, html.theme-light .condition-slider-wrap.condition-3 .condition-desc { color: #6b7a2e; }
html.theme-light .condition-slider-wrap.condition-4 .condition-value, html.theme-light .condition-slider-wrap.condition-4 .condition-desc { color: #9a8220; }
html.theme-light .condition-slider-wrap.condition-5 .condition-value, html.theme-light .condition-slider-wrap.condition-5 .condition-desc { color: #b85c28; }
html.theme-light .condition-slider-wrap.condition-6 .condition-value, html.theme-light .condition-slider-wrap.condition-6 .condition-desc { color: #c53030; }
.candidate-condition-wrap { margin-top: 0.75rem; margin-bottom: 1rem; width: 100%; max-width: 320px; }
.condition-slider-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.target-photos-wrap { margin-bottom: 1rem; padding: 1.25rem; }
.target-photos-wrap:empty { display: none; margin: 0; padding: 0; }
.target-photos-wrap .comp-photos { margin-bottom: 0; }
.target-photos-wrap .comp-photos img { flex: 1 1 120px; min-width: 120px; max-width: 160px; width: 100%; height: auto; aspect-ratio: 4/3; }
.photo-lightbox { display: none; position: fixed; inset: 0; z-index: 1200; background: rgba(0,0,0,0.9); flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.photo-lightbox.show { display: flex; }
.photo-lightbox .lightbox-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 3rem 4rem 0; }
.photo-lightbox .lightbox-main img { max-width: 95vw; max-height: 60vh; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
.photo-lightbox .lightbox-close { position: absolute; top: 1rem; right: 1rem; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 0.25rem 0.5rem; z-index: 2; }
.photo-lightbox .lightbox-prev,
.photo-lightbox .lightbox-next { position: absolute; left: 1rem; right: auto; top: 0; bottom: 140px; margin: auto 0; height: 48px; width: 48px; color: #fff; font-size: 2.5rem; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); border: none; border-radius: 8px; cursor: pointer; z-index: 2; transition: background 0.2s ease; line-height: 1; padding: 0; }
.photo-lightbox .lightbox-arrow-symbol { display: block; line-height: 1; text-align: center; transform: translateY(-0.12em); }
.photo-lightbox .lightbox-prev:hover,
.photo-lightbox .lightbox-next:hover { background: rgba(0,0,0,0.65); }
.photo-lightbox .lightbox-prev { left: 1rem; right: auto; }
.photo-lightbox .lightbox-next { left: auto; right: 1rem; }
.photo-lightbox .lightbox-thumbs { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1rem 4rem 1.25rem; max-width: 100%; max-height: 140px; overflow-y: auto; justify-content: center; align-content: flex-start; min-height: 72px; }
.photo-lightbox .lightbox-thumbs:empty { display: none; }
.photo-lightbox .lightbox-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; opacity: 0.7; transition: opacity 0.2s ease, border-color 0.2s ease; }
.photo-lightbox .lightbox-thumb:hover { opacity: 1; }
.photo-lightbox .lightbox-thumb.active { border-color: #fff; opacity: 1; }
.confirm-modal-overlay { display: none; position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; padding: 1rem; }
.confirm-modal-overlay.show { display: flex; }
.confirm-modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 480px; width: 100%; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.confirm-modal h3 { margin: 0 0 0.75rem; font-size: 1.1rem; color: var(--text); }
.confirm-modal p { margin: 0 0 1.25rem; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.confirm-modal-actions { display: flex; flex-direction: column; gap: 0.75rem; align-items: stretch; }
.confirm-modal-actions button { min-width: 11rem; white-space: nowrap; }
.confirm-modal-actions .confirm-modal-secondary-btn { width: 100%; max-width: 100%; justify-self: center; }
/* Comps full table modal */
.comps-table-modal-overlay { display: none; position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,0.55); align-items: center; justify-content: center; padding: 1rem; }
.comps-table-modal-overlay.show { display: flex; }
.comps-table-modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); max-width: 96vw; max-height: 90vh; width: 100%; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
html.theme-light .comps-table-modal { box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.comps-table-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.comps-table-modal-title { margin: 0; font-size: 1rem; font-weight: 600; }
.comps-table-modal-close { background: none; border: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.25rem 0.5rem; border-radius: 6px; }
.comps-table-modal-close:hover { color: var(--text); background: var(--border); }
.comps-table-modal-body { overflow: auto; padding: 1rem; flex: 1; min-height: 0; }
.comps-table-modal-body .table-wrap { margin: 0; max-width: 100%; }
/* Smaller photos in comps popup table — same structure as summary, View on hover */
.comps-table-modal-body .comp-photo-cell { width: 56px; padding: 0.4rem; vertical-align: middle; }
.comps-table-modal-body .comp-summary-photo-wrap { position: relative; width: 56px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: var(--border); border-radius: 6px; overflow: hidden; cursor: pointer; }
.comps-table-modal-body .comp-summary-photo-wrap .comp-summary-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.comps-table-modal-body .comp-summary-photo-view { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.comps-table-modal-body .comp-summary-photo-wrap:hover .comp-summary-photo-view { opacity: 1; }
/* Comps modal: condition slider same compact size as subject */
.comps-table-modal-body .condition-cell .condition-slider-wrap { --track-h: 8px; --thumb-size: 16px; min-width: 10rem; max-width: 12rem; }
.comps-table-modal-body .condition-cell .condition-slider-wrap input[type="range"] { height: 20px; }
.comps-table-modal-body .condition-cell .condition-slider-wrap .condition-labels { font-size: 0.65rem; }
.comps-table-modal-body .condition-cell .condition-slider-wrap .condition-value { font-size: 0.75rem; }
.crunch-overlay { display: none; position: fixed; inset: 0; z-index: 1050; background: var(--bg); align-items: center; justify-content: center; flex-direction: column; gap: 1.25rem; }
.crunch-overlay.show { display: flex; }
.crunch-overlay .crunch-spinner { width: 48px; height: 48px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: crunch-spin 0.9s linear infinite; }
.crunch-overlay .crunch-text { font-size: 1.1rem; color: var(--muted); }
.crunch-progress-wrap { width: 280px; max-width: 90vw; }
.crunch-progress-bar { height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; }
.crunch-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent) 0%, rgba(167, 139, 250, 0.9) 100%); border-radius: 7px; width: 0%; transition: width 0.25s ease; }
.crunch-overlay.show .crunch-progress-fill { animation: crunch-progress-pulse 1.2s ease-in-out infinite; }
.crunch-progress-label { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; margin-bottom: 0; }
@keyframes crunch-progress-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
@keyframes crunch-spin { to { transform: rotate(360deg); } }
.candidate-details .details-table { width: 100%; font-family: system-ui, sans-serif; font-size: 1rem; margin-bottom: 1rem; }
.candidate-details .details-table th { text-align: left; padding: 0.5rem 0.75rem; color: var(--muted); font-size: 0.875rem; font-family: system-ui, sans-serif; width: 40%; }
.candidate-details .details-table td,
.candidate-details .details-table td.numeric { font-family: system-ui, sans-serif; font-size: 1rem; }
.candidate-details .details-table tr:last-child td { border-bottom: 1px solid var(--border); }
.add-comp-btn { margin-top: 0.25rem; display: inline-flex; align-items: center; gap: 0.4rem; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.add-comp-btn:hover:not(:disabled) { background: rgba(167, 139, 250, 0.08) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
html.theme-light .add-comp-btn:hover:not(:disabled) { background: rgba(124, 58, 237, 0.06) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
.suitable-comps-box { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface); overflow-x: auto; scrollbar-color: var(--border) var(--surface); scrollbar-width: thin; }
.suitable-comps-box::-webkit-scrollbar { height: 10px; }
.suitable-comps-box::-webkit-scrollbar-track { background: var(--surface); border-radius: 0 0 10px 10px; }
.suitable-comps-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
.suitable-comps-box::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.suitable-comps-box.empty { color: var(--muted); font-size: 0.9rem; }
/* Comp list: view-details button top right (grid/expand icon), then summary list */
.suitable-comps-summary-wrap { display: flex; flex-direction: column; gap: 0.75rem; }
.suitable-comps-summary-wrap .suitable-comps-toggle { display: block; width: 100%; text-align: center; padding: 0.65rem 1rem; font-size: 0.9rem; font-weight: 500; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease; }
.suitable-comps-summary-wrap .suitable-comps-toggle:hover { background: rgba(167, 139, 250, 0.08); border-color: var(--accent-muted); color: var(--accent); }
html.theme-light .suitable-comps-summary-wrap .suitable-comps-toggle:hover { background: rgba(124, 58, 237, 0.06); border-color: var(--accent-muted); color: var(--accent); }
.suitable-comps-summary-wrap .suitable-comps-toggle .btn-icon { display: none; }
.suitable-comps-summary { list-style: none; padding: 0; margin: 0; }
.suitable-comps-summary li { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.suitable-comps-summary li:last-child { border-bottom: none; }
.suitable-comps-summary .comp-summary-photo-wrap { position: relative; width: 56px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--border); border-radius: 6px; overflow: hidden; cursor: pointer; }
.suitable-comps-summary .comp-summary-photo-wrap:empty { background: var(--surface); }
.suitable-comps-summary .comp-summary-photo-wrap .comp-summary-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: none; display: block; }
.suitable-comps-summary .comp-summary-photo-view { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #fff; background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.suitable-comps-summary .comp-summary-photo-wrap:hover .comp-summary-photo-view { opacity: 1; }
.suitable-comps-summary .comp-summary-addr { font-weight: 500; font-size: 0.95rem; flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suitable-comps-summary .comp-summary-meta { font-size: 0.9rem; color: var(--muted); }
.suitable-comps-summary .comp-summary-remove { flex-shrink: 0; }
.suitable-comps-box tbody tr { transition: background-color 0.5s ease; }
.suitable-comps-box tbody tr.highlight-new { background: rgba(167, 139, 250, 0.12); }
html.theme-light .suitable-comps-box tbody tr.highlight-new { background: rgba(124, 58, 237, 0.1); }
.suitable-comps-box .remove-comp-btn { padding: 0.35rem 0.6rem; font-size: 0.8rem; background: transparent; color: var(--muted); border: 1px solid var(--border); }
.pagination { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }
.finish-row { margin-top: 1.5rem; }
.beta-section { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.mre-ci-block { margin-bottom: 1rem; padding: 0.75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; color: var(--muted); }
.mre-ci-block.loading { color: var(--muted); }
.mre-ci-block .mre-ci-value { font-weight: 600; color: var(--text); }
html.theme-light .mre-ci-block .mre-ci-value { color: var(--text); }
.adjusted-comp-grid-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.adjusted-comp-grid-section .section-title { margin-bottom: 0.25rem; }
#final-section .table-wrap { max-width: 100%; overflow-x: auto; }
#final-section .beta-section .table-wrap { max-width: 100%; overflow-x: auto; }
#final-section table { table-layout: fixed; width: 100%; }
#final-section th, #final-section td { font-size: 0.875rem; padding: 0.5rem 0.55rem; word-break: break-word; white-space: normal; }
.adjusted-comp-grid-section .table-wrap { max-width: 100%; overflow-x: auto; }
.adjusted-comp-grid-section table { table-layout: fixed; width: 100%; }
.adjusted-comp-grid-section th, .adjusted-comp-grid-section td { font-size: 0.8125rem; padding: 0.45rem 0.5rem; min-width: 0; white-space: normal; }
#final-section .beta-section table { table-layout: fixed; width: 100%; }
#final-section .beta-section th, #final-section .beta-section td { font-size: 0.875rem; padding: 0.5rem 0.55rem; }
.other-adj-cell { vertical-align: middle; }
.other-adj-input { width: 5.5rem; padding: 0.25rem 0.4rem; font-size: inherit; text-align: right; border: 1px solid var(--border); border-radius: 4px; }
.other-adj-input:focus { outline: none; border-color: var(--accent); }
.prior-assumptions-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.advanced-settings-section .beta-description { margin-bottom: 1rem; }
.advanced-settings-section .section-title { margin: 0 0 0.5rem 0; }
.prior-assumptions-list { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.prior-assumption-row { display: grid; grid-template-columns: minmax(9rem, auto) minmax(260px, 280px) auto; align-items: center; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); justify-items: start; }
.prior-assumption-row:last-child { border-bottom: none; }
@media (max-width: 760px) { .prior-assumption-row { grid-template-columns: 1fr; } }
.prior-assumption-label { font-weight: 600; font-size: 0.9rem; }
.prior-range-block { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; width: 100%; max-width: 280px; justify-self: start; }
.prior-range-slider-wrap { position: relative; height: 32px; width: 100%; }
.prior-range-track { position: absolute; left: 0; right: 0; top: 50%; margin-top: -4px; height: 8px; background: var(--border); border-radius: 4px; pointer-events: none; }
.prior-range-fill { position: absolute; top: 50%; margin-top: -4px; height: 8px; border-radius: 4px; background: var(--accent); opacity: 0.35; pointer-events: none; }
.prior-range-input-wrap { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }
.prior-range-input-wrap input { position: absolute; left: 0; right: 0; top: 0; bottom: 0; width: 100%; margin: 0; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none; }
.prior-range-input-wrap input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: grab; pointer-events: auto; }
.prior-range-input-wrap input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: grab; pointer-events: auto; }
.prior-range-input-wrap input::-webkit-slider-runnable-track, .prior-range-input-wrap input::-moz-range-track { background: transparent; height: 8px; }
.prior-range-low-wrap { z-index: 1; pointer-events: none; }
.prior-range-high-wrap { z-index: 2; pointer-events: none; }
.prior-range-low-wrap input, .prior-range-high-wrap input { pointer-events: auto; }
.prior-assumption-row-single .prior-range-input-wrap input { pointer-events: auto; }
.prior-range-ticks { position: relative; width: 100%; margin-top: 2px; padding: 0 2px; }
.prior-range-tick { position: absolute; transform: translateX(-50%); font-size: 0.7rem; color: var(--muted); white-space: nowrap; }
.prior-range-labels { font-size: 0.85rem; font-weight: 500; color: var(--text); min-width: 8rem; }
.adjusted-comp-grid-msg { color: var(--muted); font-size: 0.95rem; margin-top: 0.5rem; }
.predicted-subject-row { font-weight: 600; background: var(--surface-elevated, rgba(0,0,0,.03)); }
.predicted-subject-row .predicted-subject-value { font-weight: 700; }
.beta-description { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
#beta-table { font-family: inherit; font-size: 1rem; }
.effect-edit-cell { white-space: nowrap; vertical-align: middle; }
.effect-display-wrap { display: inline-flex; align-items: center; gap: 0.25rem; }
.effect-display-value { font-variant-numeric: tabular-nums; }
.effect-edit-cell .icon-btn-plain { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: none; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; transition: color 0.15s ease, background-color 0.15s ease; }
.effect-edit-cell .icon-btn-plain:hover { color: var(--accent); background: var(--surface); }
.effect-edit-cell .icon-btn-plain:focus { outline: none; }
.effect-edit-cell .icon-btn-plain:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.effect-icon { flex-shrink: 0; display: block; }
.effect-input-wrap { display: inline-flex; align-items: center; gap: 0.2rem; }
.effect-edit-input { width: 3.25rem; min-width: 3rem; text-align: right; font-family: inherit; font-size: 0.9rem; padding: 0.2rem 0.35rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); box-sizing: border-box; }
.effect-edit-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-muted); }
.effect-edit-unit { color: var(--muted); font-size: 0.9em; }
.beta-desc { font-size: 0.8rem; color: var(--muted); font-weight: normal; }
.nav { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 0.35rem 0.75rem; border-radius: 6px; display: inline-flex; align-items: center; gap: 0.5rem; transition: color 0.2s ease, background-color 0.2s ease; font-family: var(--font-sans); }
.nav-logo { width: 28px; height: 28px; flex-shrink: 0; color: inherit; }
.nav a:hover { color: var(--accent); background: var(--surface); }
.nav a.active { color: var(--accent); font-weight: 600; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; flex-wrap: wrap; }
.header-row .nav { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.theme-toggle { font-size: 0.85rem; padding: 0.4rem 0.75rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.theme-toggle .btn-icon { display: block; width: 18px; height: 18px; }
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: block; }
html.theme-light .theme-toggle .theme-icon-sun { display: block; }
html.theme-light .theme-toggle .theme-icon-moon { display: none; }
#search-btn:hover:not(:disabled) { background: #8b5cf6 !important; color: #fff !important; }
.theme-toggle:hover { background: rgba(167, 139, 250, 0.1) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
html.theme-light .theme-toggle:hover { background: rgba(124, 58, 237, 0.08) !important; border-color: var(--accent-muted) !important; color: var(--accent) !important; }
#settings-view { display: none; }
#settings-view.visible { display: block; }
#main-view.hidden { display: none; }
.pricing-gate {
  display: none;
  padding: 0;
  margin: 0;
  max-width: none;
  box-sizing: border-box;
}
/* Prevent horizontal scroll when pricing gate is full width */
body:has(.pricing-gate.visible) {
  overflow-x: hidden;
}
.pricing-gate.visible {
  display: block;
}
/* Full-width band (same as FAQ): every gray section uses this breakout */
.pricing-gate .pricing-gate-plans-band,
.pricing-gate .pricing-gate-code-band,
.pricing-gate .pricing-gate-included-band,
.pricing-gate .about-faq-section,
#how-to-use-view .about-band,
#how-to-use-view .about-band-alt {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
}
/* Steps (1,2,3 cards) stay contained, not full width */
#how-to-use-view .landing-steps.about-band {
  position: static !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: min(var(--section-max), 960px) !important;
  margin-left: auto;
  margin-right: auto;
}
.pricing-gate-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
/* Spacing between full-width bands */
.pricing-gate .pricing-gate-code-band,
.pricing-gate .pricing-gate-included-band,
.pricing-gate .about-faq-section {
  margin-top: 2rem;
}
/* Pricing gate uses same band layout as about page */
.pricing-gate .about-band,
.pricing-gate .about-band-alt {
  margin-left: 0;
  margin-right: 0;
}
.pricing-gate .about-section-inner {
  max-width: 720px;
}
.pricing-gate .about-faq-section .about-section-inner {
  max-width: 640px;
}
.pricing-gate-code-band .about-section-inner {
  max-width: 640px;
}
.pricing-gate-code-band .pricing-gate-access-code {
  margin-top: 1.5rem;
  margin-bottom: 0;
  text-align: center;
}
.pricing-gate-plans-band {
  padding: 4rem 1.5rem 4.5rem;
  background: var(--bg);
}
.pricing-gate-plans-band .pricing-gate-inner {
  text-align: center;
}
.pricing-gate-plans-band .pricing-gate-signup {
  margin-top: 1.5rem;
  margin-bottom: 0;
}
.pricing-gate-included-band {
  padding: 4rem 1.5rem;
  background: var(--bg);
}
.pricing-gate-included-band .pricing-gate-included {
  margin-left: auto;
  margin-right: auto;
}
.pricing-gate-headline {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  margin: 0 0 0.5rem;
}
.pricing-gate-sub {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.pricing-gate-promo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.75rem;
}
.pricing-gate-benefits {
  text-align: left;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.pricing-gate-benefits-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 1rem;
}
.pricing-gate-benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.pricing-gate-benefits-list li {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.4;
}
.pricing-gate-benefits-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-muted);
}
.pricing-gate-benefits-list li:last-child {
  margin-bottom: 0;
}
.pricing-gate-access-code {
  margin-top: 2.5rem;
  margin-bottom: 0;
  text-align: center;
}
.pricing-gate-access-code-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.pricing-gate-access-code-signin-hint {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.pricing-gate-access-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pricing-gate-access-code-input {
  width: 100%;
  min-width: 280px;
  max-width: 420px;
  padding: 0.55rem 0.85rem;
  font-size: 1rem;
  font-family: monospace;
  letter-spacing: 0.02em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: monospace;
}
.pricing-gate-access-code-input:focus {
  outline: none;
  border-color: var(--accent-muted);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.pricing-gate-access-code-submit {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  white-space: nowrap;
}
.pricing-gate-access-code-msg {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  min-height: 1.4em;
}
.pricing-gate-access-code-msg:not(:empty) {
  color: var(--accent);
}
.pricing-gate-access-code-msg.error {
  color: var(--error);
}
.pricing-gate-included {
  text-align: left;
  max-width: 720px;
  margin: 0 auto 2.5rem;
  padding: 2rem 2rem 2.25rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.pricing-gate-included-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 1.5rem;
  text-align: center;
}
.pricing-gate-included-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 2.5rem;
}
@media (max-width: 560px) {
  .pricing-gate-included-grid { grid-template-columns: 1fr; }
}
.pricing-gate-included-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.pricing-gate-included-item:last-child,
.pricing-gate-included-item:nth-last-child(2) {
  border-bottom: none;
}
.pricing-gate-included-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.pricing-gate-included-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
  align-items: start;
}
@media (max-width: 620px) {
  .pricing-cards { grid-template-columns: 1fr; }
}
.pricing-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  min-height: 0;
  max-width: 340px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  color: var(--text);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  width: 100%;
}
.pricing-card-period-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 1rem;
}
.pricing-card-features {
  margin: 0 0 1.25rem;
  padding: 0 0 0 1rem;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
  text-align: left;
}
.pricing-card-features li {
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pricing-card-features li:last-child {
  margin-bottom: 0;
}
.pricing-card-features strong {
  color: var(--accent);
  font-weight: 600;
}
.pricing-card:hover {
  border-color: var(--accent-muted);
  border-left-color: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-soft);
}
.pricing-card-featured {
  border-left-width: 3px;
  border-left-color: var(--accent-muted);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.pricing-card-featured:hover {
  border-color: var(--accent-muted);
  border-left-color: var(--accent);
  transform: translate(-2px, -2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-soft);
}
html.theme-light .pricing-card,
html.theme-light .pricing-card-featured {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-muted);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
html.theme-light .pricing-card:hover,
html.theme-light .pricing-card-featured:hover {
  border-color: var(--accent-muted);
  border-left-color: var(--accent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--accent-soft);
}
html.theme-light .pricing-card-period,
html.theme-light .pricing-card-period-note,
html.theme-light .pricing-card-desc { color: var(--muted); }
.pricing-card-badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  z-index: 2;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--surface);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px var(--surface);
}
.pricing-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text, #e2e8f0);
}
.pricing-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent, #a78bfa);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.pricing-card-period {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}
.pricing-card-desc {
  font-size: 0.9375rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.55;
  margin: 0 0 1.25rem;
}
.pricing-card-cta {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-block;
}
.pricing-gate-signup {
  font-size: 0.9375rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.pricing-signup-link {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.pricing-signup-link:hover {
  color: var(--accent-hover, #a78bfa);
}
#how-to-use-view { display: none; padding: 0; max-width: 100%; }
#how-to-use-view.visible { display: block; }
#how-to-use-view .about-page {
  width: 100%;
  max-width: 100%;
}
/* Ensure section content stays centered inside full-width bands */
#how-to-use-view .about-section-inner,
#how-to-use-view .landing-section-block {
  margin-left: auto;
  margin-right: auto;
}
body:has(#how-to-use-view.visible) {
  overflow-x: hidden;
}
body.show-how-to-use #main-view { display: none !important; }
body.show-how-to-use #settings-view { display: none !important; }
body.show-how-to-use #how-to-use-view { display: block !important; }
body.show-settings #main-view { display: none !important; }
body.show-settings #how-to-use-view { display: none !important; }
body.show-settings #settings-view { display: block !important; }
body.show-landing #main-view { display: none !important; }
body.show-landing .landing-view { display: block; }
.landing-view { display: none; padding: 0 1.5rem 3rem; }
body:not(.show-landing) .landing-view { display: none !important; }

/* About / Landing — Anima-style */
.about-page { max-width: 100%; margin: 0; padding: 0; position: relative; }
/* Alternating section backgrounds — no grid, only hero has grid */
.about-band {
  padding: 4rem 1.5rem;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}
/* Steps band: extra vertical padding so cards don't touch adjacent sections */
.landing-steps.about-band {
  padding: 5rem 1.5rem 6rem;
}
.about-band-alt {
  padding: 4rem 1.5rem;
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
/* How it works: extra vertical padding for the background */
.about-band-alt.about-band-alt--how-it-works {
  padding: 5.5rem 1.5rem;
}
html.theme-light .about-band-alt {
  background: rgba(0, 0, 0, 0.02);
}

.about-hero {
  text-align: center;
  padding: 4.5rem 2rem 5.5rem;
  margin: 0 auto 3rem;
  max-width: min(920px, 94vw);
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
html.theme-light .about-hero {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border);
}
/* Gradient layer (no tilt) */
.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 100% at 50% -30%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 50%, rgba(167, 139, 250, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse 60% 80% at 10% 70%, rgba(167, 139, 250, 0.06) 0%, transparent 45%);
  pointer-events: none;
}
html.theme-light .about-hero::before {
  background:
    radial-gradient(ellipse 120% 100% at 50% -30%, rgba(124, 58, 237, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 90% 50%, rgba(124, 58, 237, 0.06) 0%, transparent 45%),
    radial-gradient(ellipse 60% 80% at 10% 70%, rgba(124, 58, 237, 0.05) 0%, transparent 45%);
}
/* Grid layer — tilts with cursor (see .about-hero-grid-tilt) */
.about-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  opacity: 0;
}
/* Grid layer — tilts with cursor (more extreme); transform on grid only */
.about-hero .about-hero-grid-tilt {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(800px) rotateX(var(--hero-tilt-y, 0deg)) rotateY(var(--hero-tilt-x, 0deg));
  transition: transform 0.15s ease-out;
  will-change: transform;
}
html.theme-light .about-hero .about-hero-grid-tilt {
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.1) 1px, transparent 1px);
}
.about-hero-content { position: relative; z-index: 1; }
.about-hero-accent { display: none; }
.about-hero-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: block;
}
html:not(.theme-light) .about-hero-logo { filter: invert(1); opacity: 0.95; }
.about-hero-title {
  font-size: var(--hero-headline);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 1rem;
}
.about-hero-tagline {
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 auto 2rem;
  max-width: 560px;
}
.about-hero-cta {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
}

/* Section block — eyebrow + headline + body (Anima pattern) */
.landing-section-block {
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.landing-section-block:not(.about-band-alt) { margin-bottom: 2.5rem; }
.landing-section-block.alt { text-align: left; }
.landing-section-block .section-body { margin-left: auto; margin-right: auto; }
.landing-section-block.alt .section-body { margin-left: 0; margin-right: 0; }
.section-eyebrow {
  font-size: var(--eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}
.section-headline {
  font-size: var(--section-headline);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 1.25rem;
}
.section-body {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 640px;
}

/* Trust bar */
.landing-trust-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  max-width: var(--section-max);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
  padding: 2.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
}
.landing-trust-item {
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}
.landing-trust-divider { width: 1px; height: 1rem; background: var(--border); }
@media (max-width: 520px) { .landing-trust-divider { display: none; } }

/* Feature steps — 3 columns */
.landing-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--section-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 800px) { .landing-steps { grid-template-columns: 1fr; } }
.landing-step-card {
  padding: 2.25rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform 0.15s ease-out, border-color 0.2s ease, box-shadow 0.2s ease;
  transform: perspective(800px) rotateX(var(--card-tilt-y, 0deg)) rotateY(var(--card-tilt-x, 0deg));
  will-change: transform;
}
.landing-step-card:hover {
  border-color: var(--accent-muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
html.theme-light .landing-step-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.landing-step-num {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}
.landing-step-card h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.6rem; color: var(--text); }
.landing-step-card p { font-size: 0.9375rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* Unified About / Mission / Values / Why sections — same style, less dense */
.about-section {
  max-width: var(--section-max);
  margin: 0 auto;
  text-align: center;
}
.about-section-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}
.about-section .section-eyebrow { margin-bottom: 0.5rem; }
.about-section .section-headline { margin-bottom: 1.5rem; }
.about-section-body {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 1.25rem;
  text-align: center;
}
.about-section-body:last-child { margin-bottom: 0; }
.about-values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
  text-align: center;
}
@media (max-width: 700px) { .about-values-grid { grid-template-columns: 1fr; } }
.about-value-card {
  padding: 2rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.15s ease-out, border-color 0.2s ease, background-color 0.2s ease;
  transform: perspective(800px) rotateX(var(--card-tilt-y, 0deg)) rotateY(var(--card-tilt-x, 0deg));
  will-change: transform;
}
.about-band-alt .about-value-card { background: var(--surface-elevated); }
html.theme-light .about-value-card { background: rgba(0, 0, 0, 0.04); }
.about-band-alt .about-value-card:hover,
.about-value-card:hover {
  border-color: var(--accent-muted);
}
.about-value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  margin: 0 auto 1.25rem;
}
.about-value-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
  font-family: var(--font-sans);
}
.about-value-desc {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  font-family: var(--font-sans);
}
.about-why-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 0.75rem;
  margin-top: 1.5rem;
}
.about-why-pill {
  font-size: 0.9375rem;
  color: var(--muted);
  padding: 0.6rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s ease, color 0.2s ease;
  font-family: var(--font-sans);
}
.about-band .about-why-pill { background: var(--surface); }
.about-why-pill:hover {
  border-color: var(--accent-muted);
  color: var(--text);
}

/* FAQ — expandable Q&A */
.about-faq-section .about-section-inner { max-width: 640px; }
.about-faq { display: flex; flex-direction: column; gap: 0; margin-top: 1.5rem; text-align: left; }
.about-faq-item {
  border-bottom: 1px solid var(--border);
}
.about-faq-item:first-child { border-top: 1px solid var(--border); }
.about-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}
.about-faq-q:hover { color: var(--accent); }
.about-faq-q span:first-child { flex: 1; padding-right: 1rem; }
.about-faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  border-radius: 4px;
  background: var(--border);
  transition: transform 0.25s ease, background-color 0.2s ease;
}
.about-faq-icon::before,
.about-faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--muted);
  transform: translate(-50%, -50%);
  transition: background 0.2s ease;
}
.about-faq-icon::after {
  width: 2px;
  height: 10px;
  transform: translate(-50%, -50%) rotate(90deg);
}
.about-faq-item.is-open .about-faq-icon {
  transform: rotate(180deg);
  background: var(--accent-soft);
}
.about-faq-item.is-open .about-faq-icon::before,
.about-faq-item.is-open .about-faq-icon::after { background: var(--accent); }
.about-faq-a {
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.about-faq-item.is-open .about-faq-a { grid-template-rows: 1fr; }
.about-faq-a > p {
  min-height: 0;
  overflow: hidden;
}
.about-faq-a p {
  margin: 0 0 1.25rem;
  padding: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
}
.about-faq-a p:last-child { margin-bottom: 0; padding-bottom: 0; }

/* Footer */
.landing-footer {
  margin-top: 0;
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.landing-footer-inner { width: 100%; display: flex; justify-content: center; align-items: center; }
.landing-footer-block { text-align: center; }
.landing-footer-block h4 { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 0.35rem; font-family: var(--font-sans); }
.landing-footer-block p { font-size: 0.875rem; margin: 0; line-height: 1.5; color: var(--text); font-family: var(--font-sans); }
.landing-footer-block a { color: var(--accent); text-decoration: none; }
.landing-footer-block a:hover { text-decoration: underline; }

/* In-app “How it works” section */
.landing-section { max-width: 100%; margin-left: auto; margin-right: auto; margin-bottom: 1.75rem; }
.landing-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
}
.landing-section-title::before {
  content: "";
  width: 3px;
  height: 1em;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.8;
}
.landing-features { display: grid; gap: 1rem; }
.landing-feature {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.landing-feature-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
}
.landing-feature h4 { font-size: 0.9rem; font-weight: 600; margin: 0 0 0.2rem; font-family: var(--font-sans); }
.landing-feature p { font-size: 0.875rem; color: var(--muted); margin: 0; line-height: 1.5; font-family: var(--font-sans); }
.settings-section { margin-bottom: 2rem; }
.settings-section h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--text); }
.settings-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.6rem; flex-wrap: wrap; }
.settings-row label { min-width: 12rem; font-size: 0.9rem; color: var(--muted); }
.settings-row input[type="number"] { width: 8rem; padding: 0.4rem 0.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
