/* ==========================================================================
   DisclosureIQ - Elegant real estate aesthetic
   Cream + deep navy + subtle gold accents. Editorial typography.
   ========================================================================== */

:root {
  /* Sticky-bar height var so the DisclosureIQ nav can offset itself
     below the brokerage bar without overlap on scroll. */
  --brokerage-bar-h: 48px;

  --bg-cream: #FAF7F1;
  --bg-card: #FFFFFF;
  --bg-card-soft: #F5F1EA;
  --bg-deep: #0F2A3F;

  --border: #E6DFD2;
  --border-strong: #D6CDBC;
  --border-deep: rgba(15, 42, 63, 0.12);

  --text-primary: #1F2A33;
  --text-secondary: #4F5A66;
  --text-tertiary: #6F6864;
  --text-on-deep: #FAF7F1;

  --accent-navy: #0F2A3F;
  --accent-navy-mid: #1E5378;
  --accent-teal: #2E8AA8;
  --accent-gold: #B8860B;
  --accent-gold-soft: #D4A84B;
  --accent-emerald: #2A7D3F;
  --accent-emerald-soft: #3AA856;
  --accent-coral: #C2553A;
  --accent-coral-soft: #E8734A;
  --accent-amber: #C2853A;
  --accent-amber-soft: #E8A23A;

  --gradient-navy: linear-gradient(135deg, #0F2A3F 0%, #1E5378 50%, #2E8AA8 100%);
  --gradient-cream: linear-gradient(180deg, #FAF7F1 0%, #F5F1EA 100%);

  --shadow-soft: 0 1px 3px rgba(15, 42, 63, 0.04), 0 4px 16px rgba(15, 42, 63, 0.04);
  --shadow-card: 0 2px 6px rgba(15, 42, 63, 0.05), 0 12px 32px -16px rgba(15, 42, 63, 0.12);
  --shadow-deep: 0 8px 24px -8px rgba(15, 42, 63, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --container: 1180px;
  --container-narrow: 880px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg-cream);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* Accessibility: visible focus indicator for keyboard users */
:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: var(--accent-navy);
}

/* Skip-to-main link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent-navy);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 16px; }

/* Touch target minimum 44x44 on mobile per Apple HIG and WCAG */
@media (max-width: 720px) {
  .btn-ghost,
  .btn-primary,
  .chip,
  .toolkit-btn,
  .step,
  .ds-toggle {
    min-height: 44px;
  }
}

/* Print styles for the embedded report iframe and the report download */
@media print {
  .nav, .api-key-bar, .api-key-panel, #library-panel,
  .step-bar, .step-actions, .toolkit-bar, .footer,
  .modal-overlay { display: none !important; }
  .container, .wizard, .app, .app-inner { all: unset; display: block; padding: 0; margin: 0; }
  .report-frame-wrap { border: 0; box-shadow: none; height: auto; min-height: 0; }
  body { background: white; }
}

/* Display typography for headlines */
.serif { font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif; letter-spacing: -0.015em; }

/* ==========================================================================
   BACKGROUND - subtle, editorial, no neon blobs
   ========================================================================== */

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at top right, rgba(184, 134, 11, 0.04), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(46, 138, 168, 0.04), transparent 60%),
    var(--bg-cream);
}
.bg-blob, .bg-grid { display: none; }

/* ==========================================================================
   BROKERAGE BAR - high-tech editorial nav strip
   Refined Linear / Vercel-style, not gamer-neon. Animated gold gradient
   line at the bottom, pulse dot on the monogram, hairline borders that
   glow on hover, mono-font uppercase labels, micro-icons.
   ========================================================================== */

.brokerage-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  color: white;
  background:
    radial-gradient(ellipse at 12% 50%, rgba(184,134,11,0.18), transparent 55%),
    radial-gradient(ellipse at 88% 50%, rgba(46,138,168,0.15), transparent 60%),
    linear-gradient(180deg, #0F2A3F 0%, #0B1F30 100%);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  isolation: isolate;
}
.brokerage-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), transparent 70%);
  z-index: -1;
}
.brokerage-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(46,138,168,0.45) 22%,
    rgba(212,168,75,0.85) 50%,
    rgba(46,138,168,0.45) 78%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: brokerage-shimmer 8s linear infinite;
  pointer-events: none;
}
@keyframes brokerage-shimmer {
  0%   { background-position: 0% 50%; opacity: 0.85; }
  50%  { opacity: 1; }
  100% { background-position: 200% 50%; opacity: 0.85; }
}

.brokerage-bar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

/* Monogram + name on the left */
.brokerage-home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.brokerage-home:hover { transform: translateY(-1px); }
.brokerage-home:hover .bb-mark { box-shadow: 0 0 0 4px rgba(212,168,75,0.18), 0 6px 18px -6px rgba(212,168,75,0.55); }

.bb-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #F4CD78, var(--accent-gold) 70%);
  color: var(--accent-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 12px -4px rgba(184,134,11,0.45);
  transition: box-shadow 0.25s ease;
}
.bb-mark::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(212,168,75,0.5);
  animation: bb-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes bb-pulse {
  0%   { transform: scale(0.85); opacity: 0.9; }
  70%  { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}
.bb-title {
  white-space: nowrap;
  background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 60%, #F4CD78 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Link cluster on the right */
.brokerage-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
.brokerage-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.78);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.brokerage-links a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212,168,75,0.55);
  box-shadow: 0 0 0 0 rgba(212,168,75,0);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  flex-shrink: 0;
}
.brokerage-links a:hover {
  color: white;
  border-color: rgba(212,168,75,0.45);
  background: linear-gradient(180deg, rgba(212,168,75,0.10), rgba(46,138,168,0.06));
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(212,168,75,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}
.brokerage-links a:hover::before {
  background: var(--accent-gold-soft);
  box-shadow: 0 0 8px rgba(212,168,75,0.85);
  transform: scale(1.15);
}
.brokerage-links a:focus-visible {
  outline: 2px solid var(--accent-gold-soft);
  outline-offset: 2px;
}

@media (max-width: 880px) {
  .brokerage-bar-inner {
    padding: 9px 18px;
    gap: 8px;
  }
  .brokerage-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }
  .brokerage-links::-webkit-scrollbar { display: none; }
  .brokerage-links a {
    flex-shrink: 0;
    font-size: 10.5px;
    padding: 6px 10px;
    letter-spacing: 0.06em;
  }
}
@media (max-width: 720px) {
  .bb-title { display: none; }
}

/* ==========================================================================
   NAV
   ========================================================================== */

/* The DisclosureIQ nav sticks BELOW the brokerage bar so they stack cleanly.
   The brokerage bar above sticks at top:0 with z-index:60.
   The nav below sticks at top:var(--brokerage-bar-h) with z-index:50.
   Both stay visible together while scrolling. */
.nav {
  position: sticky;
  top: var(--brokerage-bar-h, 48px);
  z-index: 50;
  padding: 18px 0;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) {
  :root { --brokerage-bar-h: 42px; }
  .nav {
    padding: 12px 0;
  }
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 720px) { .nav-inner { padding: 0 20px; } }

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { width: 30px; height: 30px; }
.logo-mark.small { width: 24px; height: 24px; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-mark svg path { stroke: var(--accent-navy); }
.logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-navy);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.nav-links a:not(.btn-primary):not(.btn-ghost) { transition: color 0.2s ease; }
.nav-links a:not(.btn-primary):not(.btn-ghost):hover { color: var(--accent-navy); }
@media (max-width: 720px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.btn-primary):not(.btn-ghost) { display: none; }
}

/* Hamburger menu */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: -8px;
}
.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--accent-navy);
  border-radius: 1px;
  transition: all 0.3s ease;
  display: block;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 880px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(250, 247, 241, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 32px;
    gap: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links a:not(.btn-primary):not(.btn-ghost) {
    display: block;
  }
  .nav.nav-open .nav-links {
    max-height: 300px;
  }
  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ==========================================================================
   BUTTONS - elegant, restrained
   ========================================================================== */

.btn-primary {
  background: var(--accent-navy);
  color: var(--text-on-deep);
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  letter-spacing: 0;
  transition: background 0.2s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover {
  background: var(--accent-navy-mid);
  transform: translateY(-1px);
}
.btn-primary.big {
  padding: 16px 32px;
  font-size: 15px;
  border-radius: 10px;
  letter-spacing: 0.01em;
}
.btn-primary.full { width: 100%; padding: 14px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--accent-navy);
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 13.5px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-ghost:hover {
  background: var(--bg-card-soft);
  border-color: var(--accent-navy);
}
.btn-ghost.big { padding: 16px 32px; font-size: 15px; border-radius: 10px; }
.btn-ghost.full { width: 100%; padding: 14px; }

/* ==========================================================================
   HERO - editorial, magazine-style
   ========================================================================== */

.hero {
  padding: 100px 32px 80px;
  position: relative;
}
@media (max-width: 720px) { .hero { padding: 60px 20px 50px; } }

.hero-inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  background: rgba(184, 134, 11, 0.06);
  border: 1px solid rgba(184, 134, 11, 0.18);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(40px, 6.5vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--accent-navy);
  margin-bottom: 28px;
}
.gradient-text {
  font-style: italic;
  color: var(--accent-teal);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  text-align: center;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-navy);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); padding: 24px 0; }
  .stat { padding: 16px 12px; border-right: none; border-bottom: 1px solid var(--border); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
}

.reports-counter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  margin-top: 24px;
  margin-bottom: 40px;
  background: rgba(184, 134, 11, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.25);
  border-radius: 100px;
}

.rc-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-navy);
  letter-spacing: -0.02em;
  line-height: 1;
}

.rc-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: 12px;
}
.rc-num + .rc-label,
.rc-num + * {
  margin-left: 12px;
}

/* ==========================================================================
   TRUST STRIP - editorial running header style
   ========================================================================== */

.trust {
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card-soft);
}
.trust-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}
.trust-logos {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

/* ==========================================================================
   APP / WIZARD - clean, refined
   ========================================================================== */

/* API KEY BAR */

.api-key-bar {
  max-width: var(--container);
  margin: 0 auto 14px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}
.key-status { display: flex; align-items: center; gap: 10px; flex: 1; }
.key-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-coral-soft);
}
.key-dot.ok { background: var(--accent-emerald-soft); }
#key-text { color: var(--text-secondary); }

.api-key-panel {
  max-width: var(--container);
  margin: 0 auto 18px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.key-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.key-input-row .input-pretty { flex: 1; min-width: 240px; }

.error-box {
  background: #FFF6F2;
  border: 1px solid rgba(194, 85, 58, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--accent-coral);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.error-box strong { color: #8B3A20; }

/* APP SECTION */

.app {
  padding: 100px 32px;
  position: relative;
}
@media (max-width: 720px) { .app { padding: 60px 20px; } }

.app-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.app-header {
  text-align: center;
  margin-bottom: 56px;
}
.app-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.app-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--accent-navy);
  margin-bottom: 16px;
}
.app-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

.wizard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-card);
  position: relative;
}
@media (max-width: 720px) { .wizard { padding: 28px; } }

/* Step bar */

.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}
.step.active {
  background: rgba(15, 42, 63, 0.05);
  border-color: var(--accent-navy);
}
.step.complete {
  background: rgba(42, 125, 63, 0.06);
  border-color: rgba(42, 125, 63, 0.25);
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.step.active .step-num {
  background: var(--accent-navy);
  color: var(--text-on-deep);
  border-color: var(--accent-navy);
}
.step.complete .step-num {
  background: var(--accent-emerald);
  color: white;
  border-color: var(--accent-emerald);
}
.step-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.step:not(.active):not(.complete) .step-label { color: var(--text-tertiary); }
.step-divider { width: 28px; height: 1px; background: var(--border); }

@media (max-width: 720px) {
  .step-divider { display: none; }
  .step-bar { gap: 8px; }
}

.step-pane { display: none; animation: fadeIn 0.4s ease; }
.step-pane.active { display: block; }

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

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.step-actions:has(:only-child) { justify-content: flex-end; }
.step-actions > :only-child { margin-left: auto; }

/* STEP 1: UPLOAD */

.upload-zone {
  background: var(--bg-card-soft);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin-bottom: 28px;
}
.upload-zone:hover, .upload-zone.dragging {
  background: rgba(15, 42, 63, 0.03);
  border-color: var(--accent-navy);
}
.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  color: var(--accent-navy);
  opacity: 0.6;
}
.upload-icon svg { width: 100%; height: 100%; }
.upload-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent-navy);
}
.upload-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 22px;
}

.property-fields {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
@media (max-width: 640px) { .property-fields { grid-template-columns: 1fr; } }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field input,
.input-pretty {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.15s ease;
}
.field input:focus,
.input-pretty:focus,
.select-pretty:focus {
  outline: none;
  border-color: var(--accent-navy);
  background: var(--bg-card);
}
.field input::placeholder,
.input-pretty::placeholder { color: var(--text-tertiary); }

/* STEP 2: CONFIGURE */

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 720px) { .config-grid { grid-template-columns: 1fr; } }

.config-card {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.config-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--accent-navy);
}
.config-card-help {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  line-height: 1.55;
}

.select-pretty {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%230F2A3F' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.radio-stack { display: flex; flex-direction: column; gap: 8px; }
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.radio-card:hover { background: var(--bg-card-soft); border-color: var(--border-strong); }
.radio-card.selected,
.radio-card:has(input:checked) {
  background: rgba(15, 42, 63, 0.04);
  border-color: var(--accent-navy);
}
.radio-card input { margin-top: 3px; accent-color: var(--accent-navy); }
.radio-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text-primary);
}
.radio-card-sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.recommended {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-gold);
  color: white;
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 8px;
  vertical-align: middle;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.chip:hover { background: var(--bg-card-soft); color: var(--accent-navy); }
.chip.selected {
  background: var(--accent-navy);
  border-color: var(--accent-navy);
  color: white;
}

.focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.focus-chip {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
}
.focus-chip:hover {
  background: var(--bg-card-soft);
  border-color: var(--accent-navy);
  color: var(--accent-navy);
}
.focus-chip.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: white;
}
#focus-areas-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 64px;
  transition: all 0.15s ease;
}
#focus-areas-input:focus {
  outline: none;
  border-color: var(--accent-navy);
  box-shadow: 0 0 0 3px rgba(46,138,168,0.12);
}
#focus-areas-input::placeholder {
  color: var(--text-muted);
}

.mls-uploader {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(184,134,11,0.05);
  border: 1px dashed rgba(184,134,11,0.35);
  border-radius: 12px;
}
.mls-uploader-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.mls-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.mls-optional {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8B6914;
  background: rgba(184,134,11,0.15);
  padding: 2px 8px;
  border-radius: 100px;
  margin-left: 6px;
  vertical-align: middle;
}
.mls-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 420px;
}
.mls-browse-btn {
  flex-shrink: 0;
  font-size: 12px;
  padding: 9px 16px;
}
.mls-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mls-list:empty {
  display: none;
}
.mls-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-primary);
}
.mls-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mls-item-status {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 8px;
}
.mls-item-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 6px;
}
.mls-item-remove:hover {
  color: #C2553A;
}

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent-navy);
  background: var(--bg-card);
}
.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-hint {
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-tertiary);
  letter-spacing: 0;
}

/* STEP 3: DATA SOURCES */

.ds-intro { margin-bottom: 28px; text-align: center; }
.ds-intro-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent-navy);
}
.ds-intro-sub {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

.ds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 720px) { .ds-grid { grid-template-columns: 1fr; } }

.ds-group {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.ds-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.ds-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.ds-toggle:last-child { border-bottom: none; }
.ds-toggle:hover { opacity: 0.85; }
.ds-toggle input {
  margin-top: 3px;
  accent-color: var(--accent-navy);
  width: 16px;
  height: 16px;
}
.ds-name {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}
.ds-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* STEP 4: GENERATE */

.generate-stage {
  text-align: center;
  padding: 16px 0;
}

.gen-spinner {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  animation: spin 2.5s linear infinite;
}
.gen-spinner svg path,
.gen-spinner svg circle:nth-child(2) { stroke: var(--accent-navy); }
.gen-spinner svg defs linearGradient stop:first-child { stop-color: var(--accent-navy); }
.gen-spinner svg defs linearGradient stop:last-child { stop-color: var(--accent-teal); }
@keyframes spin { to { transform: rotate(360deg); } }

.gen-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
  color: var(--accent-navy);
}
.gen-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.gen-checklist {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  text-align: left;
  max-width: 560px;
  margin: 0 auto 22px;
}
.gen-check {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
}
.gen-check.done { color: var(--text-primary); }
.gen-check.active { color: var(--accent-navy); font-weight: 500; }
.gen-check-mark {
  width: 22px;
  height: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-tertiary);
}
.gen-check.done .gen-check-mark {
  background: var(--accent-emerald);
  color: white;
  border-color: var(--accent-emerald);
}
.gen-check.active .gen-check-mark {
  background: var(--accent-navy);
  color: white;
  border-color: var(--accent-navy);
}
.gen-check-mark.spinning { animation: spin 1.5s linear infinite; }

.gen-meta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 12px;
}
.gen-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--bg-card-soft);
}
.gen-meta-row:last-child { border-bottom: none; }
.gen-meta-row span:first-child { color: var(--text-tertiary); }
.gen-meta-row span:last-child { font-weight: 600; color: var(--accent-navy); }

/* ==========================================================================
   REPORT VIEWER (STEP 5)
   ========================================================================== */

.report-header { margin-bottom: 22px; }
.report-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.report-actions { display: flex; gap: 10px; }

.report-frame-wrap {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 75vh;
  min-height: 640px;
  box-shadow: var(--shadow-deep);
}
.report-frame { width: 100%; height: 100%; border: 0; background: white; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 63, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px -20px rgba(15, 42, 63, 0.5);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 12px;
  gap: 16px;
}
.modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-navy);
  margin-bottom: 4px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.modal-close:hover { background: var(--accent-navy); color: white; border-color: var(--accent-navy); }
.modal-body { padding: 12px 28px 24px; }
.modal-actions {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
}
.modal-tip {
  background: rgba(184, 134, 11, 0.06);
  border: 1px solid rgba(184, 134, 11, 0.18);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 14px;
  line-height: 1.55;
}
.modal-tip strong { color: var(--accent-gold); }

.email-services {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 540px) {
  .email-services { grid-template-columns: repeat(3, 1fr); }
}
.email-service-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.15s ease;
  cursor: pointer;
}
.email-service-btn:hover {
  background: white;
  border-color: var(--accent-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.es-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #EA4335;
  color: white;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SETTINGS TABS */
.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.settings-tab {
  padding: 12px 20px;
  background: transparent;
  border: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
}
.settings-tab:hover { color: var(--accent-navy); }
.settings-tab.active {
  color: var(--accent-navy);
  border-bottom-color: var(--accent-navy);
}
.settings-pane { display: none; }
.settings-pane.active { display: block; }

/* ==========================================================================
   ANNOTATED HIGHLIGHT MODE (#2)
   ========================================================================== */
.diq-pdf-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 63, 0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.diq-pdf-modal.open { display: flex; }
.diq-pdf-modal-inner {
  background: #1a1a1a;
  border-radius: 14px;
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.diq-pdf-header {
  padding: 14px 20px;
  background: #0F2A3F;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.diq-pdf-header strong {
  font-size: 14px;
}
.diq-pdf-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.diq-pdf-nav button {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.diq-pdf-nav button:hover {
  background: rgba(255, 255, 255, 0.25);
}
.diq-pdf-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.diq-pdf-nav input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-radius: 4px;
  text-align: center;
}
.diq-pdf-close {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
.diq-pdf-canvas-wrap {
  flex: 1;
  overflow: auto;
  padding: 20px;
  background: #2a2a2a;
  display: flex;
  justify-content: center;
}
.diq-pdf-canvas-wrap canvas {
  background: white;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  height: auto;
}
.diq-pdf-highlight {
  position: absolute;
  background: rgba(255, 210, 122, 0.4);
  border: 2px solid #FFD27A;
  border-radius: 4px;
  pointer-events: none;
}

/* TOOLKIT BAR */
.toolkit-bar {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.toolkit-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}
.toolkit-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 720px) {
  .toolkit-buttons { grid-template-columns: repeat(2, 1fr); }
}
.toolkit-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.toolkit-btn:hover {
  background: white;
  border-color: var(--accent-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.toolkit-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.toolkit-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-navy);
  margin-bottom: 2px;
}
.toolkit-sub {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.toolkit-output {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  max-height: 60vh;
  overflow-y: auto;
}
.toolkit-output:empty::before {
  content: 'Generating...';
  color: var(--text-tertiary);
  font-style: italic;
}

/* LIBRARY */
.library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.library-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13.5px;
  background: var(--bg-card-soft);
  border-radius: 10px;
}
.library-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.library-row:hover {
  border-color: var(--accent-navy);
  transform: translateX(2px);
}
.library-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.library-addr {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-navy);
}
.library-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
}
.library-actions {
  display: flex;
  gap: 6px;
}
.library-pill {
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-card-soft);
  color: var(--text-secondary);
  font-weight: 600;
}
.library-delete {
  background: none;
  border: 0;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}
.library-delete:hover { background: rgba(194,85,58,0.1); color: var(--accent-coral); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--accent-navy);
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 660px;
  line-height: 1.7;
  margin-bottom: 40px;
}

/* SAMPLE REPORTS */
.samples {
  padding: 100px 32px;
  border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .samples { padding: 60px 20px; } }
.samples-inner { max-width: var(--container); margin: 0 auto; }

.samples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
}
@media (min-width: 1100px) { .samples-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .samples-grid { grid-template-columns: 1fr; } }

.sample-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}
.sample-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.sample-img {
  height: 140px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.sample-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.sample-info { padding: 22px 24px 24px; }
.sample-addr {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-navy);
  margin-bottom: 4px;
}
.sample-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.sample-tldr {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.sample-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 0.01em;
}
.sample-card:hover .sample-cta { color: var(--accent-navy); }

/* HOW IT WORKS */

.how {
  padding: 100px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-soft);
}
@media (max-width: 720px) { .how { padding: 60px 20px; } }
.how-inner { max-width: var(--container); margin: 0 auto; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}
@media (max-width: 900px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .how-grid { grid-template-columns: 1fr; } }

.how-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.25s ease;
}
.how-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.how-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent-gold);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}
.how-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  color: var(--accent-navy);
}
.how-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* DATA SOURCES SHOWCASE */

.ds-showcase {
  padding: 100px 32px;
  border-top: 1px solid var(--border);
}
@media (max-width: 720px) { .ds-showcase { padding: 60px 20px; } }
.ds-showcase-inner { max-width: var(--container); margin: 0 auto; }

.ds-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.ds-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-navy);
}
.ds-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent-gold);
}
.dot.blue { background: var(--accent-teal); }
.dot.violet, .dot.purple { background: var(--accent-navy-mid); }
.dot.pink { background: var(--accent-coral); }
.dot.green { background: var(--accent-emerald); }
.dot.amber, .dot.yellow { background: var(--accent-gold); }
.dot.red { background: var(--accent-coral); }
.dot.orange { background: var(--accent-amber-soft); }
.dot.teal { background: var(--accent-teal); }

/* PRICING */

.pricing {
  padding: 100px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-soft);
}
@media (max-width: 720px) { .pricing { padding: 60px 20px; } }
.pricing-inner { max-width: var(--container); margin: 0 auto; text-align: center; }
.pricing-inner .section-sub { margin-left: auto; margin-right: auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 40px;
  text-align: left;
  align-items: stretch;
}
@media (max-width: 1180px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 720px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; }
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 22px;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  background: var(--bg-card);
  border: 2px solid var(--accent-navy);
  transform: scale(1.02);
  box-shadow: var(--shadow-deep);
}
.price-banner {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-navy);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 100px;
}
.price-tier {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.price-amount {
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.price-amount .amt {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent-navy);
  line-height: 1;
}
.price-amount .period {
  color: var(--text-tertiary);
  font-size: 14px;
}
.price-tag {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
  line-height: 1.5;
}
.beta-tag {
  display: inline-block;
  background: rgba(184, 134, 11, 0.08);
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid rgba(184, 134, 11, 0.25);
  margin-right: 6px;
}
.price-features {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.price-card .btn-primary,
.price-card .btn-ghost {
  margin-top: auto;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.price-features .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(42, 125, 63, 0.1);
  color: var(--accent-emerald);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.price-perk {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--accent-gold);
  text-align: left;
  margin: -2px 0 8px 0;
  letter-spacing: 0.01em;
  opacity: 0.9;
  line-height: 1.3;
}

/* ==========================================================================
   QUICK LOOK PITCH SECTION - address-only mode highlight
   ========================================================================== */

.quicklook-pitch {
  padding: 100px 32px;
  background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-card-soft) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) { .quicklook-pitch { padding: 60px 20px; } }

.quicklook-pitch-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.quicklook-pitch-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 960px) {
  .quicklook-pitch-grid { grid-template-columns: 1fr; gap: 40px; }
}

.quicklook-pitch-copy .section-eyebrow {
  text-align: left;
  margin-bottom: 14px;
}
.quicklook-pitch-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--accent-navy);
  margin: 0 0 18px 0;
}
.quicklook-pitch-sub {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 26px 0;
}

.quicklook-pitch-list {
  list-style: none;
  margin: 0 0 30px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.quicklook-pitch-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.quicklook-pitch-list li strong { color: var(--accent-navy); font-weight: 600; }
.ql-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.12);
}

.quicklook-pitch-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.quicklook-pitch-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Sample card preview on the right */
.quicklook-pitch-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 24px 48px -24px rgba(15, 42, 63, 0.18),
              0 0 0 1px rgba(184, 134, 11, 0.06);
  position: relative;
}
.quicklook-pitch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.04), transparent 60%);
  pointer-events: none;
}
.qlpc-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
}
.qlpc-address {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--accent-navy);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.qlpc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.qlpc-row:last-of-type { border-bottom: none; }
.qlpc-label { color: var(--text-secondary); }
.qlpc-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-navy);
  letter-spacing: 0.02em;
}
.qlpc-value.qlpc-good { color: var(--accent-emerald); }
.qlpc-value.qlpc-warn { color: var(--accent-amber); }
.qlpc-value.qlpc-alert { color: var(--accent-coral); }
.qlpc-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-style: italic;
  line-height: 1.5;
}

/* ==========================================================================
   ONBOARDING TOUR - first-time visitor walkthrough
   Dismissable, dark overlay with spotlight on target, tooltip card,
   Next/Skip/Done buttons, progress dots. Stored in localStorage.
   ========================================================================== */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.tour-overlay.active { opacity: 1; pointer-events: auto; }

.tour-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(15, 42, 63, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.tour-spotlight {
  position: absolute;
  border-radius: 16px;
  box-shadow:
    0 0 0 9999px rgba(15, 42, 63, 0.72),
    0 0 0 4px rgba(212, 168, 75, 0.85),
    0 0 24px rgba(212, 168, 75, 0.55);
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.tour-spotlight::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 22px;
  border: 1px solid rgba(212, 168, 75, 0.4);
  animation: tour-pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes tour-pulse {
  0%   { transform: scale(0.96); opacity: 0.85; }
  60%  { transform: scale(1.02); opacity: 0; }
  100% { transform: scale(1.02); opacity: 0; }
}

.tour-tooltip {
  position: absolute;
  background: white;
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(15, 42, 63, 0.45),
              0 0 0 1px rgba(184, 134, 11, 0.15);
  padding: 20px 22px;
  width: 320px;
  max-width: calc(100vw - 32px);
  z-index: 9100;
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
  font-family: 'Inter', -apple-system, sans-serif;
}
.tour-tooltip-step {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.tour-tooltip-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--accent-navy);
  margin-bottom: 8px;
  line-height: 1.25;
}
.tour-tooltip-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.tour-tooltip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-tooltip-progress {
  display: flex;
  gap: 5px;
}
.tour-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(15, 42, 63, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}
.tour-progress-dot.active {
  background: var(--accent-gold);
  transform: scale(1.35);
}
.tour-tooltip-actions {
  display: flex;
  gap: 6px;
}
.tour-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.tour-btn-skip {
  background: transparent;
  color: var(--text-tertiary);
}
.tour-btn-skip:hover { color: var(--accent-navy); }
.tour-btn-next {
  background: var(--accent-navy);
  color: white;
}
.tour-btn-next:hover { background: var(--accent-navy-mid); }

/* Tooltip arrow (caret pointing toward target) */
.tour-tooltip::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  transform: rotate(45deg);
  z-index: -1;
}
.tour-tooltip[data-pos="below"]::before {
  top: -7px;
  left: 28px;
}
.tour-tooltip[data-pos="above"]::before {
  bottom: -7px;
  left: 28px;
}
.tour-tooltip[data-pos="right"]::before {
  left: -7px;
  top: 24px;
}
.tour-tooltip[data-pos="left"]::before {
  right: -7px;
  top: 24px;
}

@media (max-width: 720px) {
  .tour-tooltip {
    width: calc(100vw - 32px);
    left: 16px !important;
    right: 16px;
  }
  .tour-tooltip-title { font-size: 17px; }
  .tour-tooltip-body { font-size: 13px; }
}

/* FOOTER */

.footer {
  border-top: 1px solid var(--border);
  padding: 70px 32px 36px;
  background: var(--accent-navy);
  color: var(--text-on-deep);
}
@media (max-width: 720px) { .footer { padding: 48px 20px 28px; } }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
  margin-bottom: 40px;
}
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo .logo-text { color: var(--text-on-deep); }
.footer-brand .logo-mark svg path { stroke: var(--accent-gold-soft); }
.footer-tagline {
  font-size: 14px;
  color: rgba(250, 247, 241, 0.7);
  line-height: 1.6;
  max-width: 320px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 600px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold-soft);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(250, 247, 241, 0.75);
  padding: 5px 0;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--text-on-deep); }

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid rgba(250, 247, 241, 0.12);
  font-size: 12px;
  color: rgba(250, 247, 241, 0.55);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-legal {
  font-style: italic;
  line-height: 1.6;
  max-width: 760px;
}

/* ==========================================================================
   MOBILE RESPONSIVE ENHANCEMENTS (375px+)
   ========================================================================== */

@media (max-width: 600px) {
  /* Increase tap targets to 44px+ minimum */
  .btn-primary,
  .btn-ghost,
  .chip,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  /* Upload zone - finger-friendly */
  .upload-zone {
    padding: 40px 20px;
  }

  /* Chip groups - wrap nicely on mobile */
  .chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .chip {
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Settings tabs - horizontal scroll if needed */
  .settings-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 8px;
  }

  .settings-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Hero stats - stack on mobile */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat {
    font-size: 13px;
  }

  .stat-num {
    font-size: 20px;
  }

  /* Configuration grid - single column on small screens */
  .config-grid {
    grid-template-columns: 1fr;
  }

  /* Focus chips - wrap properly */
  .focus-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .focus-chip {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Data sources grid - single column */
  .ds-grid {
    grid-template-columns: 1fr;
  }

  /* Input fields - full width on mobile */
  .input-pretty,
  .select-pretty,
  .form-input {
    font-size: 16px;
    padding: 12px 14px;
  }

  /* Ensure text fields don't zoom on focus (iOS) */
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px;
  }

  /* Safe area inset for notch support */
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  /* Wizard responsive */
  .wizard {
    padding: 20px;
  }

  .step-bar {
    gap: 12px;
    margin-bottom: 28px;
  }

  .step {
    padding: 10px;
    min-width: auto;
  }

  .step-label {
    display: none;
  }

  /* Report actions - stack vertically on very small screens */
  .report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .report-actions button {
    flex: 1 1 auto;
    min-width: 100px;
  }

  /* Toolkit buttons - scroll horizontally if needed */
  .toolkit-buttons {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 8px;
  }

  .toolkit-btn {
    flex-shrink: 0;
    min-width: 140px;
  }

  /* Modal - full height on mobile */
  .modal-box {
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-body {
    max-height: calc(90vh - 180px);
    overflow-y: auto;
  }

  /* Property fields grid */
  .property-fields {
    grid-template-columns: 1fr;
  }

  /* MLS uploader - responsive */
  .mls-uploader-head {
    flex-direction: column;
  }

  .mls-browse-btn {
    width: 100%;
  }

  /* Prevent horizontal scroll on small screens */
  body, html {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

@media (max-width: 375px) {
  /* Extra small screen adjustments */
  .hero-title {
    font-size: clamp(28px, 5vw, 40px);
  }

  .gen-title {
    font-size: 20px;
  }

  .config-card-label {
    font-size: 12px;
  }

  .chip {
    padding: 8px 12px;
    font-size: 12px;
  }

  .btn-primary.big,
  .btn-ghost.big {
    padding: 14px 20px;
    font-size: 14px;
  }

  /* Ensure pricing grid stacks */
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  /* Samples grid - single column */
  .samples-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   COMPARISON MODE UI
   ========================================================================== */

#compare-mode > div:nth-child(2) {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  #compare-mode > div:nth-child(2) {
    grid-template-columns: 1fr;
  }
  #compare-mode > div:nth-child(2) > div:nth-child(2) {
    display: none;
  }
}

/* ==========================================================================
   COMPARISON RESULT RENDERING
   ========================================================================== */

.compare-result {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.compare-decision-matrix {
  background: var(--gradient-navy);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--text-on-deep);
  box-shadow: 0 10px 28px -12px rgba(15, 42, 63, 0.45);
}

.compare-matrix-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-on-deep);
  letter-spacing: -0.015em;
}

.compare-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 960px) {
  .compare-matrix-grid {
    grid-template-columns: 1fr;
  }
}

.compare-metric {
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.compare-metric-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 10px;
}

.compare-metric-values {
  display: flex;
  gap: 12px;
}

.compare-metric-value {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.compare-metric-value.strong {
  background: rgba(212, 168, 75, 0.25);
}

.compare-frame-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 960px) {
  .compare-frame-wrap {
    grid-template-columns: 1fr;
  }
}

.compare-frame-container {
  display: flex;
  flex-direction: column;
}

.compare-frame-label {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-navy);
  margin-bottom: 10px;
  padding: 0 4px;
}

.compare-frame-label-addr {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.compare-report-iframe {
  width: 100%;
  height: 700px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  background: white;
}

.compare-shared-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
}

@media (max-width: 960px) {
  .compare-report-iframe {
    height: 600px;
  }

  .compare-matrix-title {
    font-size: 20px;
  }

  .compare-metric {
    padding: 14px;
  }
}

/* ==========================================================================
   PROPERTY LOCATION MAP - for generated reports
   ========================================================================== */

.property-map {
  margin-bottom: 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(15, 42, 63, 0.18);
  box-shadow: 0 4px 16px rgba(15, 42, 63, 0.08);
}

.property-map-container {
  height: 220px;
  width: 100%;
  position: relative;
}

@media (min-width: 768px) {
  .property-map-container {
    height: 280px;
  }
}

/* Leaflet map default styles */
.leaflet-container {
  font-family: 'Inter', sans-serif;
  background: #f0f0f0;
}

.leaflet-marker-icon {
  border-radius: 50%;
}

.leaflet-control-attribution {
  font-size: 11px;
}

/* Agent photo handling in prepared-by and agent-card */
.pb-mark img,
.agent-card-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* MOBILE + A11Y SWEEP - appended */

/* ========================================================================== */
/* BROKERAGE BAR MOBILE FIX */
/* ========================================================================== */

@media (max-width: 360px) {
  .brokerage-links a::before {
    display: none;
  }
  .brokerage-links a {
    font-size: 9.5px;
    padding: 6px 8px;
    letter-spacing: 0.04em;
  }
}

/* Add focus ring to brokerage home */
.brokerage-home:focus-visible {
  outline: 2px solid var(--accent-gold-soft);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Disable brokerage shimmer on reduced motion */
@media (prefers-reduced-motion: reduce) {
  .brokerage-bar::after {
    animation: none;
    opacity: 0.6;
  }
}

/* ========================================================================== */
/* HERO SECTION MOBILE FIXES */
/* ========================================================================== */

@media (max-width: 375px) {
  .hero-badge {
    font-size: 11px;
    padding: 6px 14px;
  }

  .reports-counter {
    padding: 10px 18px;
    font-size: 14px;
    gap: 10px;
  }

  .rc-num {
    font-size: 24px;
  }

  .rc-label {
    font-size: 11px;
  }
}

/* Counter pill doesn't break on mobile */
@media (max-width: 414px) {
  .reports-counter {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========================================================================== */
/* PRICING CARDS MOBILE FIX */
/* ========================================================================== */

@media (max-width: 720px) and (min-width: 641px) {
  .pricing-grid {
    max-width: 600px;
    gap: 16px;
  }

  .price-card {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .price-card {
    padding: 24px 18px;
  }

  .price-amount .amt {
    font-size: 36px;
  }

  .price-features li {
    font-size: 12.5px;
  }
}

/* Focus ring for price card buttons */
.price-card .btn-primary:focus-visible,
.price-card .btn-ghost:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* ========================================================================== */
/* QUICK LOOK PITCH SECTION */
/* ========================================================================== */

/* Sample preview card readable on phone */
@media (max-width: 600px) {
  .quicklook-pitch-card {
    padding: 20px 18px;
    border-radius: 14px;
  }

  .qlpc-address {
    font-size: 17px;
  }

  .qlpc-row {
    font-size: 12px;
    padding: 6px 0;
  }

  .qlpc-value {
    font-size: 11.5px;
  }

  .qlpc-foot {
    font-size: 10.5px;
  }
}

/* Ensure quicklook pitch time has sufficient contrast */
.quicklook-pitch-time {
  color: var(--text-secondary);
}

/* Focus ring for quicklook pitch CTA links */
.quicklook-pitch-cta a:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* ========================================================================== */
/* SAMPLE GALLERY WRAPPING */
/* ========================================================================== */

@media (max-width: 768px) {
  .samples-grid {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .sample-card {
    border-radius: 12px;
  }

  .sample-info {
    padding: 16px 18px;
  }

  .sample-addr {
    font-size: 18px;
  }
}

/* Focus ring for sample cards */
.sample-card:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* ========================================================================== */
/* WIZARD / APP SECTION FOCUS AND MOBILE */
/* ========================================================================== */

/* Focus chips minimum touch target */
.focus-chip {
  min-height: 36px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
}

.focus-chip:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* Upload zone responsive padding */
@media (max-width: 480px) {
  .upload-zone {
    padding: 40px 16px;
  }

  .upload-icon {
    width: 48px;
    height: 48px;
  }
}

/* Config cards on very small screens */
@media (max-width: 360px) {
  .config-card {
    padding: 18px;
  }
}

/* Chip focus rings */
.chip:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* Focus visible on radio cards */
.radio-card:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* ========================================================================== */
/* DASHBOARD STAT CARDS */
/* ========================================================================== */

/* Hero stats on 375px */
@media (max-width: 375px) {
  .hero-stats {
    padding: 18px 0;
  }

  .stat-num {
    font-size: 22px;
  }

  .stat-label {
    font-size: 10px;
  }
}

/* Stat card focus */
.stat:focus-within {
  background: var(--bg-card-soft);
}

/* ========================================================================== */
/* FOOTER WRAPPING AND MOBILE */
/* ========================================================================== */

@media (max-width: 600px) {
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 40px 16px 24px;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col-title {
    font-size: 10px;
    margin-bottom: 12px;
  }

  .footer-col a {
    font-size: 13px;
    padding: 4px 0;
  }
}

/* Footer link focus rings */
.footer-col a:focus-visible {
  outline: 2px solid var(--accent-gold-soft);
  outline-offset: 2px;
  border-radius: 3px;
}

.footer-brand a:focus-visible {
  outline: 2px solid var(--accent-gold-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========================================================================== */
/* TOUR TOOLTIP MOBILE AND REDUCED MOTION */
/* ========================================================================== */

/* Disable tour pulse on reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tour-spotlight::after {
    animation: none;
    opacity: 0.4;
  }
}

/* Tour tooltip focus management */
.tour-tooltip:focus-visible {
  outline: 2px solid var(--accent-gold-soft);
  outline-offset: 2px;
}

/* Tour button focus rings */
.tour-btn:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* ========================================================================== */
/* OVERALL INTERACTIVE ELEMENTS FOCUS RINGS */
/* ========================================================================== */

/* Ensure all text inputs have visible focus */
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
input[type="url"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
  border-color: var(--accent-navy);
}

/* Toolkit button focus */
.toolkit-btn:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* Library row focus */
.library-row:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* Email service button focus */
.email-service-btn:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* Settings tab focus */
.settings-tab:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: -2px;
  border-radius: 4px;
}

/* Modal close button focus */
.modal-close:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* Library delete button focus */
.library-delete:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* MLS item remove button focus */
.mls-item-remove:focus-visible {
  outline: 2px solid var(--accent-navy);
  outline-offset: 2px;
}

/* ========================================================================== */
/* REDUCED MOTION - Disable all animations */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  /* Disable all transitions globally */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Specific animation disables */
  .pulse,
  .hero-badge .dot {
    animation: none;
  }

  .bb-pulse,
  .bb-mark::after {
    animation: none;
  }

  .tour-pulse,
  .tour-spotlight::after {
    animation: none;
  }

  /* Keep scrolling smooth */
  html {
    scroll-behavior: auto;
  }
}

/* ========================================================================== */
/* IPHONE SE (375px) SPECIFIC FIXES */
/* ========================================================================== */

@media (max-width: 375px) {
  /* Tighter nav on SE */
  .nav-inner {
    padding: 0 16px;
  }

  .brokerage-bar-inner {
    padding: 8px 14px;
  }

  /* Hero section padding */
  .hero {
    padding: 50px 16px 40px;
  }

  /* App section padding */
  .app {
    padding: 50px 16px;
  }

  /* Pricing and sections */
  .pricing,
  .samples,
  .how,
  .ds-showcase {
    padding: 50px 16px;
  }

  /* Quicklook pitch */
  .quicklook-pitch {
    padding: 50px 16px;
  }
}

/* ========================================================================== */
/* IPHONE 14 PRO (390px) and ANDROID (412px) FIXES */
/* ========================================================================== */

@media (max-width: 414px) {
  /* Slightly tighter gaps in grids */
  .samples-grid,
  .how-grid,
  .pricing-grid {
    gap: 16px;
  }

  .how-card {
    padding: 24px;
  }
}

/* ========================================================================== */
/* IPAD PORTRAIT (768px) FIXES */
/* ========================================================================== */

@media (max-width: 768px) {
  /* Ensure good spacing on iPad */
  .pricing-grid {
    max-width: 100%;
    gap: 20px;
  }

  .quicklook-pitch-grid {
    gap: 40px;
  }

  .how-grid {
    gap: 20px;
  }

  /* Property map on iPad */
  .property-map-container {
    height: 300px;
  }
}

/* ========================================================================== */
/* TOUCH TARGET VERIFICATION (min 44px per WCAG) */
/* ========================================================================== */

@media (max-width: 768px) {
  /* Buttons already 44px */
  .btn-primary,
  .btn-ghost {
    min-height: 44px;
    min-width: 44px;
  }

  /* Chips and interactive elements */
  .chip,
  .focus-chip {
    min-height: 44px;
  }

  /* Radio cards */
  .radio-card {
    min-height: 44px;
    padding: 10px 14px;
  }

  /* Settings tabs */
  .settings-tab {
    min-height: 44px;
    padding: 12px 18px;
  }

  /* Footer links */
  .footer-col a {
    padding: 8px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Tour buttons */
  .tour-btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  /* Modal close button */
  .modal-close {
    min-height: 44px;
    min-width: 44px;
    width: 44px;
    height: 44px;
  }
}

/* ========================================================================== */
/* COLOR CONTRAST ADJUSTMENTS */
/* ========================================================================== */

/* Quicklook pitch time text contrast boost */
.quicklook-pitch-time {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Footer text contrast check and boost if needed */
.footer-tagline {
  color: rgba(250, 247, 241, 0.85);
  line-height: 1.65;
}

.footer-col a {
  color: rgba(250, 247, 241, 0.85);
}

/* Stat tertiary text boost */
.stat-label,
.text-tertiary {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========================================================================== */
/* MEDIA QUERY STACKING FOR RESPONSIVE IFRAMES */
/* ========================================================================== */

@media (max-width: 768px) {
  .report-frame-wrap {
    height: auto;
    min-height: 500px;
  }

  .compare-report-iframe {
    height: 500px;
  }
}

@media (max-width: 480px) {
  .report-frame-wrap {
    min-height: 400px;
  }

  .compare-report-iframe {
    height: 400px;
  }
}

/* ========================================================================== */
/* TESTIMONIALS - appended */
/* ========================================================================== */

.testimonials {
  padding: 100px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-card-soft);
}

@media (max-width: 720px) {
  .testimonials {
    padding: 60px 20px;
  }
}

.testimonials-inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}

.testimonials-inner .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 960px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 720px;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 16px;
  }
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
}

.testimonial-quote-mark {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: 72px;
  line-height: 1;
  color: var(--accent-gold);
  margin-bottom: 16px;
  font-weight: 400;
}

.testimonial-quote {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 20px;
  flex-grow: 1;
}

.testimonial-attribution {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.testimonial-name {
  color: var(--accent-gold);
  font-weight: 600;
}

.testimonial-dot {
  color: var(--accent-gold);
}

.testimonial-firm {
  color: var(--text-secondary);
  font-weight: 500;
}

.testimonial-disclaimer {
  font-size: 11px;
  font-style: italic;
  color: rgba(15, 42, 63, 0.55);
}

@media (max-width: 640px) {
  .testimonial-card {
    padding: 20px;
  }

  .testimonial-quote-mark {
    font-size: 56px;
    margin-bottom: 12px;
  }

  .testimonial-quote {
    font-size: 15px;
    line-height: 1.6;
  }

  .testimonial-attribution {
    font-size: 10px;
  }

  .testimonial-disclaimer {
    font-size: 10px;
  }
}

/* === BROKERAGE LIBRARY === */

.library-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 20px;
  min-height: 100vh;
  background: var(--bg-cream);
}

.library-header {
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.library-header h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.library-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.library-locked-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.library-locked-inner h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.library-locked-inner p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.library-locked-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.library-search-bar {
  margin-bottom: 24px;
}

.library-search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.library-search-input:focus {
  outline: none;
  border-color: var(--accent-navy);
  box-shadow: 0 0 0 3px rgba(15, 42, 63, 0.08);
}

.library-filters {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.library-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.library-filter-group label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.library-filter-input {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.library-filter-input:focus {
  outline: none;
  border-color: var(--accent-navy);
}

.library-reset-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.library-reset-btn:hover {
  border-color: var(--accent-navy);
  color: var(--text-primary);
  background: var(--bg-card-soft);
}

.library-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-soft);
}

.library-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.library-table thead {
  background: var(--bg-card-soft);
  border-bottom: 1px solid var(--border);
}

.library-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.library-table tbody tr {
  border-bottom: 1px solid var(--border-deep);
  transition: background-color 0.15s ease;
}

.library-table tbody tr:hover {
  background: var(--bg-card-soft);
}

.library-table tbody tr.library-loading {
  pointer-events: none;
}

.library-cell {
  padding: 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.library-address {
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-risk-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.library-risk-badge.risk-0,
.library-risk-badge.risk-1 {
  background: var(--accent-emerald-soft);
  color: white;
}

.library-risk-badge.risk-2,
.library-risk-badge.risk-3 {
  background: var(--accent-amber-soft);
  color: white;
}

.library-risk-badge.risk-4,
.library-risk-badge.risk-5 {
  background: var(--accent-coral-soft);
  color: white;
}

.library-action {
  text-align: right;
  padding: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-ghost.btn-sm {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--accent-navy);
}

.btn-ghost.btn-sm:hover {
  background: var(--bg-card-soft);
  border-color: var(--accent-navy);
}

.library-empty {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-secondary);
  font-size: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .library-container {
    padding: 32px 16px;
  }

  .library-header h1 {
    font-size: 28px;
  }

  .library-filters {
    flex-direction: column;
  }

  .library-filter-group {
    width: 100%;
  }

  .library-filter-input {
    width: 100%;
  }

  .library-reset-btn {
    width: 100%;
  }

  .library-table {
    font-size: 13px;
  }

  .library-table th,
  .library-cell {
    padding: 12px;
  }

  .library-address {
    max-width: 140px;
  }

  .library-locked-panel {
    padding: 32px 16px;
  }

  .library-locked-inner h2 {
    font-size: 20px;
  }
}

/* === BROKER DASHBOARD === */

.broker-dash-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px;
}

.broker-dash-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  margin-bottom: 48px;
  align-items: start;
}

.broker-dash-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.broker-dash-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.broker-dash-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.broker-dash-actions {
  display: flex;
  gap: 12px;
}

.broker-dash-invite-btn {
  padding: 12px 24px;
  background: var(--accent-navy);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s ease;
}

.broker-dash-invite-btn:hover {
  background: var(--accent-navy-mid);
}

.broker-dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.broker-dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.broker-dash-stat-card.loading {
  background: linear-gradient(90deg, var(--bg-card-soft) 25%, transparent 25%, transparent 50%, var(--bg-card-soft) 50%, var(--bg-card-soft) 75%, transparent 75%, transparent);
  background-size: 200% 100%;
  animation: skeleton-load 1.5s infinite;
}

@keyframes skeleton-load {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.broker-dash-stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.broker-dash-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.broker-dash-stat-sub {
  font-size: 13px;
  color: var(--text-tertiary);
}

.broker-dash-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  margin-top: 48px;
}

.broker-dash-heatmap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-soft);
}

.broker-dash-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.broker-dash-report-tile {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  padding: 8px;
}

.broker-dash-report-tile:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-deep);
}

.broker-dash-report-tile.risk-low {
  background: var(--accent-emerald-soft);
}

.broker-dash-report-tile.risk-medium {
  background: var(--accent-amber-soft);
}

.broker-dash-report-tile.risk-high {
  background: var(--accent-coral-soft);
}

.broker-dash-activity {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-soft);
}

.broker-dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.broker-dash-activity-item {
  padding: 12px;
  border-left: 3px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card-soft);
}

.broker-dash-activity-action {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.broker-dash-activity-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.broker-dash-members {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.broker-dash-members-table {
  width: 100%;
  border-collapse: collapse;
}

.broker-dash-members-table thead tr {
  border-bottom: 1px solid var(--border);
}

.broker-dash-members-table th {
  text-align: left;
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: var(--bg-card-soft);
}

.broker-dash-members-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-primary);
}

.broker-dash-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card-soft);
  color: var(--text-secondary);
}

.broker-dash-status-badge.active {
  background: var(--accent-emerald-soft);
  color: white;
}

.broker-dash-status-badge.pending {
  background: var(--accent-amber-soft);
  color: white;
}

.broker-dash-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 63, 0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.broker-dash-modal-overlay.open {
  display: flex;
}

.broker-dash-modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  box-shadow: var(--shadow-deep);
  animation: modal-slide-up 0.3s ease;
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.broker-dash-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.broker-dash-modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  margin-top: 0;
  clear: both;
}

.broker-dash-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.broker-dash-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.broker-dash-form-group label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.broker-dash-form-group input,
.broker-dash-form-group select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--bg-card-soft);
}

.broker-dash-form-group input:focus,
.broker-dash-form-group select:focus {
  outline: 2px solid var(--accent-navy);
  outline-offset: -1px;
  background: var(--bg-card);
}

.broker-dash-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.broker-dash-modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.broker-dash-modal-btn.primary {
  background: var(--accent-navy);
  color: white;
}

.broker-dash-modal-btn.primary:hover {
  background: var(--accent-navy-mid);
}

.broker-dash-modal-btn.secondary {
  background: var(--bg-card-soft);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.broker-dash-modal-btn.secondary:hover {
  background: var(--border);
}

.broker-dash-modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .broker-dash-header {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .broker-dash-title h1 {
    font-size: 24px;
  }

  .broker-dash-stats {
    grid-template-columns: 1fr;
  }

  .broker-dash-heatmap-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }

  .broker-dash-modal {
    margin: 20px;
    max-width: calc(100% - 40px);
  }
}

/* === BROKERAGE WORKFLOW === */

.workflow-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 20px;
}

.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.workflow-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-navy);
}

.workflow-user-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.workflow-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.workflow-tab {
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.workflow-tab.active {
  color: var(--accent-navy);
  border-bottom-color: var(--accent-navy);
}

.workflow-tab:hover:not(.active) {
  color: var(--text-primary);
}

.workflow-tab-content {
  display: none;
}

.workflow-tab-content.active {
  display: block;
}

.workflow-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workflow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.workflow-row:hover {
  border-color: var(--accent-navy);
  box-shadow: var(--shadow-soft);
}

.workflow-row-content {
  flex: 1;
}

.workflow-row-content h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.workflow-row-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

.workflow-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.workflow-empty p {
  font-size: 16px;
}

.workflow-status-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.workflow-status-pending {
  background: #FEF3C7;
  color: #92400E;
}

.workflow-status-in_progress {
  background: #DBEAFE;
  color: #0C4A6E;
}

.workflow-status-signed_off {
  background: #D1FAE5;
  color: #065F46;
}

.workflow-status-sent_back {
  background: #FEE2E2;
  color: #7F1D1D;
}

.workflow-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.workflow-modal.active {
  display: flex;
}

.workflow-modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  width: 90%;
}

.workflow-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card-soft);
  color: var(--text-primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1001;
}

.workflow-modal-close:hover {
  background: var(--border);
}

.workflow-modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.workflow-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
}

.workflow-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workflow-modal-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workflow-modal-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.workflow-modal-section ul {
  list-style: disc;
  padding-left: 20px;
}

.workflow-modal-section li {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.workflow-comments {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workflow-comment {
  padding: 12px;
  background: var(--bg-card-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.workflow-comment strong {
  display: block;
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.workflow-comment p {
  color: var(--text-secondary);
  line-height: 1.5;
}

.workflow-comment small {
  display: block;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-size: 11px;
}

.workflow-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workflow-comment-form textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
}

.workflow-comment-form textarea:focus {
  outline: none;
  border-color: var(--accent-navy);
  background: var(--bg-card);
}

.workflow-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.workflow-btn-primary,
.workflow-btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.workflow-btn-primary {
  background: var(--accent-navy);
  color: white;
}

.workflow-btn-primary:hover {
  background: var(--accent-navy-mid);
}

.workflow-btn-secondary {
  background: var(--bg-card-soft);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.workflow-btn-secondary:hover {
  background: var(--border);
}

@media (max-width: 720px) {
  .workflow-container {
    padding: 20px;
  }

  .workflow-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .workflow-modal-content {
    width: calc(100% - 20px);
    max-height: 90vh;
  }

  .workflow-modal-header {
    flex-direction: column;
  }

  .workflow-modal-footer {
    flex-direction: column;
  }

  .workflow-btn-primary,
  .workflow-btn-secondary {
    width: 100%;
  }
}

/* DISCLOSURE CONFIDENCE SCORE BADGE */
.confidence-score {
  background: linear-gradient(135deg, rgba(15, 42, 63, 0.95), rgba(30, 83, 120, 0.9));
  border: 2px solid var(--accent-gold);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 24px -8px rgba(15, 42, 63, 0.25);
}

.conf-num {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
}

.conf-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: white;
  opacity: 0.95;
}

.conf-rationale {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  font-style: italic;
  font-weight: 400;
}

.conf-high {
  border-color: var(--accent-emerald-soft);
  background: linear-gradient(135deg, rgba(42, 125, 63, 0.92), rgba(58, 168, 86, 0.88));
}

.conf-high .conf-label {
  color: #E8F5EC;
}

.conf-moderate {
  border-color: var(--accent-amber-soft);
  background: linear-gradient(135deg, rgba(194, 133, 58, 0.92), rgba(232, 162, 58, 0.88));
}

.conf-moderate .conf-label {
  color: #FFF7E0;
}

.conf-low {
  border-color: var(--accent-coral-soft);
  background: linear-gradient(135deg, rgba(194, 85, 58, 0.92), rgba(232, 115, 74, 0.88));
}

.conf-low .conf-label {
  color: #FFEDE6;
}

@media (max-width: 480px) {
  .confidence-score {
    padding: 18px 16px;
    gap: 10px;
  }

  .conf-num {
    font-size: 48px;
    margin-bottom: 2px;
  }

  .conf-label {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .conf-rationale {
    font-size: 13px;
  }
}

/* TASK 1: HERO CAPTION */
.hero-caption {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* TASK 2: QUICK LOOK DATA SOURCES STRIP */
.quicklook-sources-strip {
  background: rgba(184, 134, 11, 0.03);
  border-top: 1px solid rgba(184, 134, 11, 0.1);
  border-bottom: 1px solid rgba(184, 134, 11, 0.1);
  padding: 32px 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.quicklook-sources-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
}

.qs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(184, 134, 11, 0.12);
  border-radius: var(--radius-md);
  min-width: 110px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.qs-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(184, 134, 11, 0.25);
  box-shadow: var(--shadow-soft);
}

.qs-icon {
  font-size: 24px;
  line-height: 1;
}

.qs-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.3px;
}

.quicklook-sources-footer {
  max-width: var(--container);
  margin: 16px auto 0;
  padding: 0 24px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  font-weight: 500;
}

@media (max-width: 768px) {
  .quicklook-sources-strip {
    padding: 24px 0;
  }

  .quicklook-sources-inner {
    gap: 12px;
  }

  .qs-card {
    padding: 12px 16px;
    min-width: 95px;
  }

  .qs-icon {
    font-size: 20px;
  }

  .qs-label {
    font-size: 10px;
  }
}

/* TASK 3: REPORT STYLE TOGGLE */
.report-style-toggle {
  margin-top: 20px;
  padding: 16px;
  background: rgba(30, 83, 120, 0.04);
  border: 1px solid rgba(184, 134, 11, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rst-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.rst-buttons {
  display: flex;
  gap: 8px;
}

.rst-btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(15, 42, 63, 0.2);
  border-radius: 6px;
  background: white;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.rst-btn:hover {
  border-color: rgba(15, 42, 63, 0.35);
  background: rgba(15, 42, 63, 0.02);
}

.rst-btn.active {
  background: var(--accent-navy);
  color: white;
  border-color: var(--accent-navy);
}

.rst-btn[data-style="agent"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.rst-btn[data-style="agent"]:hover {
  opacity: 0.6;
  border-color: rgba(15, 42, 63, 0.2);
  background: white;
  color: var(--text-secondary);
}

.rst-coming-soon {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  opacity: 0.75;
}

@media (max-width: 480px) {
  .report-style-toggle {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .rst-buttons {
    width: 100%;
  }

  .rst-btn {
    flex: 1;
    text-align: center;
  }
}

/* ==========================================================================
   HERO ADDRESS SEARCH BAR (the standalone search at the top of the hero)
   ========================================================================== */
.hero-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 720px;
  margin: 28px auto 0;
  background: var(--bg-card);
  border: 1.5px solid rgba(11, 31, 51, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(11, 31, 51, 0.10), 0 2px 6px rgba(11, 31, 51, 0.06);
  transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.hero-search:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 12px 44px rgba(11, 31, 51, 0.14), 0 0 0 4px rgba(196, 161, 90, 0.18);
  transform: translateY(-1px);
}
.hero-search-input {
  flex: 1;
  min-width: 0;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 500;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}
.hero-search-input::placeholder {
  color: rgba(11, 31, 51, 0.62);
  font-weight: 400;
}
.hero-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.hero-search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid rgba(11, 31, 51, 0.10);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(11, 31, 51, 0.18), 0 2px 8px rgba(11, 31, 51, 0.06);
  padding: 6px;
  z-index: 50;
  max-height: min(320px, 50vh);
  overflow-y: auto;
}
.hero-search-suggest[hidden] { display: none !important; }
.hss-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  transition: background 120ms ease;
}
.hss-item.active,
.hss-item:hover {
  background: rgba(196, 161, 90, 0.12);
}
.hss-pin {
  font-size: 14px;
  width: 22px;
  text-align: center;
  flex: 0 0 auto;
}
.hss-label-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hss-searching {
  cursor: default;
  background: rgba(11, 31, 51, 0.04);
  color: var(--text-tertiary);
  font-style: italic;
}
.hss-searching:hover {
  background: rgba(11, 31, 51, 0.04);
}
.hss-searching .hss-pin {
  animation: hss-spin 1.4s ease-in-out infinite;
}
@keyframes hss-spin {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.hero-search-input-shake {
  animation: hero-search-input-shake 0.42s cubic-bezier(.36, .07, .19, .97);
}
@keyframes hero-search-input-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* ==========================================================================
   TWO-CARD HERO LAYOUT (Quick Look + Upload, side by side)
   ========================================================================== */
.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1080px;
  margin: 36px auto 0;
  text-align: left;
}
.hero-cards-split {
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  /* Break out of the centered hero-content container and stretch to viewport edges */
  max-width: none;
  width: auto;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 0 40px;
  align-items: stretch;
  overflow: visible;
  box-sizing: border-box;
}
.hero-cards-split > .hcard {
  margin: 0 32px;
}
.hero-route-pretitle {
  text-align: center;
  margin-top: 30px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-tertiary);
}

/* Vertical OR divider between the two route cards */
.hcards-or {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  position: relative;
}
.hcards-or-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(11,31,51,0.18) 30%, rgba(11,31,51,0.18) 70%, transparent 100%);
  min-height: 40px;
}
.hcards-or-text {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-cream);
  padding: 8px 6px;
  border-radius: 999px;
}

/* Ambient floating highlight chips around Quick Look card */
.hcard-quicklook { overflow: visible; }
.amb {
  position: absolute;
  font-size: 11px;
  font-style: italic;
  font-weight: 500;
  color: var(--accent-navy);
  background: var(--bg-cream);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(11,31,51,0.06);
  border: 1px solid rgba(196,161,90,0.30);
  z-index: 2;
  pointer-events: none;
  opacity: 0.95;
  transition: opacity 200ms ease, transform 200ms ease;
}
.hcard-quicklook:hover .amb {
  opacity: 1;
  transform: translateY(-1px);
}
.amb-tl { top: -12px; left: 24px; }
.amb-tr { top: -12px; right: 24px; }
.amb-bl { bottom: -12px; left: 28px; }
.amb-br { bottom: -12px; right: 28px; }

/* MLS-coming-soon line inside Quick Look card */
.qls-mls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 14px;
  background: rgba(196,161,90,0.06);
  border: 1px dashed rgba(196,161,90,0.35);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.qls-mls em {
  font-style: italic;
  color: var(--accent-navy);
  font-weight: 600;
}
.qls-mls-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(196,161,90,0.18);
  animation: qls-pulse 2.4s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes qls-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196,161,90,0.18); }
  50% { box-shadow: 0 0 0 6px rgba(196,161,90,0.06); }
}
.qls-mls-sep {
  color: var(--text-tertiary);
}
.qls-mls-tag {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* Quiet facts list inside Upload card */
.hcard-quietfacts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  padding-top: 4px;
  border-top: 1px solid rgba(11,31,51,0.06);
  margin-top: 4px;
  padding-top: 12px;
}
.hcard-quietfacts span {
  position: relative;
  padding-left: 14px;
}
.hcard-quietfacts span::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 12px;
}

/* Mobile: collapse split layout to single column with horizontal OR */
@media (max-width: 880px) {
  .hero-cards-split {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 16px;
    gap: 0;
  }
  .hero-cards-split > .hcard {
    margin: 0 0 14px;
  }
  .hcards-or {
    flex-direction: row;
    padding: 12px 0;
  }
  .hcards-or-line {
    flex: 1;
    width: auto;
    height: 1px;
    min-height: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(11,31,51,0.18) 30%, rgba(11,31,51,0.18) 70%, transparent 100%);
  }
  .hcards-or-text {
    margin: 0 12px;
    background: var(--bg-cream);
  }
  .amb-tl, .amb-tr { top: -10px; }
  .amb-bl, .amb-br { bottom: -10px; }
  .amb { font-size: 10.5px; padding: 3px 8px; }
}
@media (max-width: 600px) {
  /* Hide ambient floating chips at small widths so the card stays clean */
  .amb { display: none; }
}

/* ==========================================================================
   QUIET PRICING (beta-mode tone-down: numbers visible but de-emphasized)
   ========================================================================== */
.pricing-quiet {
  padding: 36px 0 40px;
  background: linear-gradient(180deg, transparent 0%, rgba(11,31,51,0.02) 100%);
}
.pricing-quiet .pricing-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.section-title-quiet {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  color: var(--text-primary);
  margin: 6px 0 14px;
  line-height: 1.2;
}

.pp-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(196, 161, 90, 0.08);
  border: 1px solid rgba(196, 161, 90, 0.32);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: left;
}
.pp-banner strong {
  color: var(--accent-navy);
  font-weight: 700;
}
.pp-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(196, 161, 90, 0.20);
  animation: qls-pulse 2.4s ease-in-out infinite;
  flex: 0 0 auto;
}

.pricing-preview-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 auto;
}
.pricing-preview-row-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.pp-tier {
  padding: 14px 14px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(11, 31, 51, 0.08);
  border-radius: 10px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease;
}
.pp-tier:hover {
  border-color: rgba(11, 31, 51, 0.18);
  background: #fdfbf7;
}
.pp-tier-feature {
  border-color: rgba(196, 161, 90, 0.40);
  background: linear-gradient(180deg, rgba(196, 161, 90, 0.04) 0%, transparent 100%);
}
.pp-tier-feature:hover {
  border-color: var(--accent-gold);
}
.pp-tier-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.pp-tier-price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}
.pp-tier-period {
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}
.pp-tier-desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.pp-footer {
  margin-top: 26px;
  text-align: center;
}
.pp-link {
  font-size: 13px;
  color: var(--accent-navy);
  text-decoration: none;
  border-bottom: 1px dashed rgba(11, 31, 51, 0.30);
  transition: color 140ms ease, border-color 140ms ease;
}
.pp-link:hover {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

@media (max-width: 1100px) {
  .pricing-preview-row-5 {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}
@media (max-width: 720px) {
  .pricing-preview-row,
  .pricing-preview-row-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
@media (max-width: 480px) {
  .pricing-preview-row,
  .pricing-preview-row-5 {
    grid-template-columns: 1fr;
  }
  .pp-banner {
    font-size: 12.5px;
    padding: 10px 14px;
    border-radius: 14px;
  }
}

/* ==========================================================================
   SEND TO CLIENT button (gold primary on report results)
   ========================================================================== */
.btn-send-client {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  background: var(--accent-gold);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(196, 161, 90, 0.30);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn-send-client:hover {
  background: #b8924d;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 161, 90, 0.38);
}
.btn-send-client:active {
  transform: translateY(0);
}
.btn-send-client:disabled {
  background: #c9bfa9;
  cursor: not-allowed;
  box-shadow: none;
}

/* Text-to-Client button: SMS-green so it's visually distinct from Send (gold) */
.btn-text-client {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  background: #25a567;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(37, 165, 103, 0.28);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn-text-client:hover {
  background: #1f8e58;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 165, 103, 0.36);
}
.btn-text-client:active { transform: translateY(0); }
.btn-text-client:disabled {
  background: #a9c9b5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Phone input inside the Send-to-Client modal */
.stc-phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.stc-phone-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(11, 31, 51, 0.16);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fdfbf7;
  color: var(--text-primary);
}
.stc-phone-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(196, 161, 90, 0.16);
}

/* Send-to-client confirmation modal */
.stc-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.stc-modal[hidden] { display: none !important; }
.stc-box {
  background: var(--bg-card);
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  padding: 28px 28px 22px;
  box-shadow: 0 30px 80px rgba(11, 31, 51, 0.30);
}
.stc-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.stc-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 18px;
  line-height: 1.5;
}
.stc-section {
  margin-bottom: 16px;
}
.stc-section-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.stc-link-box {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.stc-link-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(11, 31, 51, 0.16);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: #fdfbf7;
  color: var(--text-primary);
}
.stc-msg-box {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(11, 31, 51, 0.16);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  font-family: inherit;
  background: #fdfbf7;
  color: var(--text-primary);
  resize: vertical;
  min-height: 90px;
}
.stc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
  border-top: 1px solid rgba(11, 31, 51, 0.06);
  padding-top: 16px;
}
.stc-action {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid rgba(11, 31, 51, 0.14);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: background 140ms ease, border-color 140ms ease;
}
.stc-action:hover {
  background: rgba(196, 161, 90, 0.08);
  border-color: rgba(196, 161, 90, 0.40);
}
.stc-action-primary {
  background: var(--accent-gold);
  color: #fff;
  border-color: var(--accent-gold);
}
.stc-action-primary:hover {
  background: #b8924d;
  border-color: #b8924d;
}
.stc-close {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: 13px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-family: inherit;
}
.stc-close:hover {
  color: var(--accent-navy);
}

/* Subtle Matt branding footer injected into rendered reports */
.matt-brand-footer {
  margin-top: 36px;
  padding: 22px 26px;
  background: linear-gradient(180deg, transparent 0%, rgba(196, 161, 90, 0.06) 100%);
  border-top: 1px solid rgba(196, 161, 90, 0.30);
  text-align: center;
  font-size: 13px;
  color: #555;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
}
.matt-brand-footer .mbf-line {
  margin: 0 0 4px;
}
.matt-brand-footer a.mbf-url {
  font-weight: 700;
  font-size: 14.5px;
  color: #0B1F33;
  text-decoration: none;
  letter-spacing: 0.01em;
  border-bottom: 2px solid #C4A15A;
  padding-bottom: 1px;
}
.matt-brand-footer a.mbf-url:hover {
  color: #C4A15A;
}
.matt-brand-footer .mbf-meta {
  font-size: 11.5px;
  color: #888;
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.hcard {
  background: var(--bg-card);
  border: 1.5px solid rgba(11, 31, 51, 0.10);
  border-radius: 18px;
  padding: 28px 26px 26px;
  box-shadow: 0 14px 50px rgba(11, 31, 51, 0.10), 0 2px 8px rgba(11, 31, 51, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.hcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 60px rgba(11, 31, 51, 0.13), 0 3px 10px rgba(11, 31, 51, 0.07);
}
.hcard-quicklook {
  border-color: rgba(196, 161, 90, 0.42);
  box-shadow: 0 14px 50px rgba(196, 161, 90, 0.18), 0 2px 8px rgba(11, 31, 51, 0.06);
  background:
    linear-gradient(180deg, rgba(196, 161, 90, 0.04) 0%, rgba(196, 161, 90, 0) 35%),
    var(--bg-card);
}
.hcard-quicklook:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 20px 70px rgba(196, 161, 90, 0.24), 0 3px 10px rgba(11, 31, 51, 0.08);
}
.hcard-quicklook::before {
  content: '';
  position: absolute;
  top: -1.5px;
  left: 22px;
  right: 22px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, #d4b674 50%, var(--accent-gold) 100%);
  border-radius: 0 0 3px 3px;
  opacity: 0.85;
}

.hcard-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hcard-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.hcard-badge-gold {
  background: var(--accent-gold);
  color: #fff;
}
.hcard-badge-navy {
  background: rgba(11, 31, 51, 0.10);
  color: var(--accent-navy);
  border: 1px solid rgba(11, 31, 51, 0.14);
}
.hcard-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0;
}
.hcard-pitch {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.hcard-quicklook .hero-search {
  margin: 6px 0 4px;
  max-width: none;
}
.hcard-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px;
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent-navy);
  color: var(--text-on-deep);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}
.hcard-cta:hover {
  background: #082238;
  transform: translateY(-1px);
}
.hcard-cta-helper {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: -6px;
  margin-bottom: 2px;
}

.hcard-list-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-top: 6px;
}
.hcard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.hcard-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.hcl-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1.4;
  width: 22px;
  text-align: center;
}

.hcard-tertiary-link {
  margin-top: 4px;
  font-size: 13px;
  color: var(--accent-navy);
  text-decoration: none;
  border-bottom: 1px dashed rgba(11, 31, 51, 0.30);
  align-self: flex-start;
  transition: color 140ms ease, border-color 140ms ease;
}
.hcard-tertiary-link:hover {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

@media (max-width: 880px) {
  .hero-cards {
    grid-template-columns: 1fr;
    max-width: 560px;
    gap: 16px;
    margin-top: 26px;
  }
  .hcard {
    padding: 24px 22px 22px;
  }
  .hcard-title {
    font-size: 22px;
  }
}
@media (max-width: 480px) {
  .hcard {
    padding: 22px 18px 20px;
    border-radius: 14px;
  }
  .hcard-list li {
    font-size: 13.5px;
  }
}
.hero-search-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 26px;
  font-size: 16px;
  font-weight: 600;
  background: var(--accent-navy);
  color: var(--text-on-deep);
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: background 160ms ease;
  white-space: nowrap;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}
.hero-search-submit:hover {
  background: #082238;
}
.hero-search-submit:active {
  background: #061c2e;
}
.hero-search-submit:disabled {
  background: #6f7a85;
  cursor: not-allowed;
}
.hss-arrow {
  font-size: 18px;
  transition: transform 180ms ease;
}
.hero-search-submit:hover .hss-arrow {
  transform: translateX(3px);
}

.hero-search-helper {
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.hero-quicklook-preview {
  margin: 22px auto 0;
  max-width: 760px;
  text-align: center;
}
.hqp-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.hqp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hqp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(196, 161, 90, 0.08);
  border: 1px solid rgba(196, 161, 90, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: background 160ms ease, transform 160ms ease;
}
.hqp-pill:hover {
  background: rgba(196, 161, 90, 0.14);
  transform: translateY(-1px);
}
.hqp-icon {
  font-size: 14px;
  line-height: 1;
}
.hqp-pill-more {
  background: var(--accent-navy);
  color: var(--text-on-deep);
  border-color: var(--accent-navy);
  font-weight: 600;
}
.hqp-pill-more:hover {
  background: #082238;
}

.hero-secondary-actions {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}
.hero-secondary-link {
  color: var(--accent-navy);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed rgba(11, 31, 51, 0.3);
  transition: color 140ms ease, border-color 140ms ease;
}
.hero-secondary-link:hover {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.hero-secondary-divider {
  margin: 0 12px;
  color: rgba(11, 31, 51, 0.3);
}

@media (max-width: 720px) {
  .hero-search {
    flex-direction: column;
    border-radius: 12px;
    margin-top: 22px;
  }
  .hero-search-input {
    padding: 16px 18px;
    font-size: 16px;
    border-bottom: 1px solid rgba(11, 31, 51, 0.08);
  }
  .hero-search-submit {
    padding: 14px 18px;
    justify-content: center;
    width: 100%;
    min-height: 48px;
  }
  .hqp-pills {
    gap: 6px;
  }
  .hqp-pill {
    padding: 6px 11px;
    font-size: 12px;
  }
  .hero-secondary-actions {
    line-height: 1.7;
  }
  .hero-secondary-divider {
    display: none;
  }
  .hero-secondary-link {
    display: inline-block;
    margin: 4px 0;
  }
}
@media (max-width: 480px) {
  .hero-search-input {
    padding: 14px 16px;
    font-size: 15px;
  }
  .hss-label {
    font-size: 15px;
  }
}

/* ==========================================================================
   HERO QUICK LOOK RUNNING STATE (in-place card transformation)
   ========================================================================== */
.hqr-running {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 6px 4px;
}
.hqr-running .hcard-badge {
  align-self: flex-start;
}
.hqr-stages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.hqr-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(11, 31, 51, 0.04);
  border: 1px solid rgba(11, 31, 51, 0.06);
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.55;
  transition: opacity 200ms ease, background 200ms ease, color 200ms ease;
}
.hqr-stage.active {
  opacity: 1;
  background: rgba(196, 161, 90, 0.10);
  border-color: rgba(196, 161, 90, 0.32);
  color: var(--text-primary);
  font-weight: 500;
}
.hqr-stage.done {
  opacity: 0.85;
  background: rgba(58, 168, 86, 0.06);
  border-color: rgba(58, 168, 86, 0.28);
  color: var(--text-primary);
}
.hqr-stage.done .hqr-dot {
  background: #3AA856;
  box-shadow: 0 0 0 3px rgba(58, 168, 86, 0.18);
  animation: none;
}
.hqr-stage.done .hqr-dot::before {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #fff;
  font-weight: 800;
}
.hqr-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(11, 31, 51, 0.20);
  flex: 0 0 auto;
}
.hqr-stage.active .hqr-dot {
  background: var(--accent-gold);
  animation: hqr-pulse 1.4s ease-in-out infinite;
}
@keyframes hqr-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 161, 90, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(196, 161, 90, 0.12); }
}
.hqr-helper {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  text-align: center;
  font-style: italic;
}
.hqr-error {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ==========================================================================
   FULL-SCREEN REPORT MODAL (opens from hero Quick Look completion)
   ========================================================================== */
.hqr-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: stretch;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
  box-sizing: border-box;
}
.hqr-modal.open {
  display: flex;
  animation: hqr-modal-fade 200ms ease;
}
@keyframes hqr-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hqr-modal-frame {
  background: var(--bg-card);
  border-radius: 16px;
  width: 100%;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(11, 31, 51, 0.45);
}
.hqr-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--accent-navy);
  color: var(--text-on-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.hqr-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 200px;
}
.hqr-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hqr-modal-action {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 140ms ease, transform 140ms ease;
}
.hqr-modal-send {
  background: var(--accent-gold);
  color: #fff;
}
.hqr-modal-send:hover {
  background: #b8924d;
  transform: translateY(-1px);
}
.hqr-modal-text {
  background: #25a567;
  color: #fff;
}
.hqr-modal-text:hover {
  background: #1f8e58;
  transform: translateY(-1px);
}
.hqr-modal-print {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
}
.hqr-modal-print:hover {
  background: rgba(255, 255, 255, 0.18);
}
.hqr-modal-close {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  transition: background 140ms ease;
}
.hqr-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.hqr-modal-iframe {
  flex: 1 1 auto;
  width: 100%;
  border: none;
  background: var(--bg-cream);
  min-height: 70vh;
}

/* ==========================================================================
   LOGO BETA PILL + FOR TEAMS DROPDOWN (clean topnav refresh)
   ========================================================================== */
.logo-beta {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4b674 100%);
  color: #fff;
  border-radius: 4px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  box-shadow: 0 1px 4px rgba(196, 161, 90, 0.30);
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 6px;
  transition: background 140ms ease, color 140ms ease;
}
.nav-dropdown-toggle:hover,
.nav-dropdown[data-open="true"] .nav-dropdown-toggle {
  background: rgba(11, 31, 51, 0.06);
  color: var(--accent-navy);
}
.ndd-caret {
  transition: transform 180ms ease;
  opacity: 0.7;
}
.nav-dropdown[data-open="true"] .ndd-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid rgba(11, 31, 51, 0.10);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(11, 31, 51, 0.16), 0 2px 6px rgba(11, 31, 51, 0.06);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: var(--bg-card);
  border-top: 1px solid rgba(11, 31, 51, 0.10);
  border-left: 1px solid rgba(11, 31, 51, 0.10);
  transform: rotate(45deg);
}
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
  display: flex;
  animation: ndd-pop 160ms ease;
}
@keyframes ndd-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 140ms ease;
}
.nav-dropdown-menu a:hover {
  background: rgba(196, 161, 90, 0.10);
}
.ndm-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 161, 90, 0.10);
  border-radius: 8px;
  flex: 0 0 auto;
}
.ndm-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.ndm-sub {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

@media (max-width: 880px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    width: 100%;
    min-width: 0;
    background: transparent;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown[data-open="true"] .nav-dropdown-menu {
    animation: none;
  }
  .nav-dropdown-menu a {
    padding: 12px 8px;
  }
}

@media (max-width: 720px) {
  .hqr-modal {
    padding: 0;
  }
  .hqr-modal-frame {
    border-radius: 0;
    max-width: none;
  }
  .hqr-modal-bar {
    padding: 12px 14px;
  }
  .hqr-modal-title {
    font-size: 15px;
    min-width: 0;
    flex: 1 1 100%;
    margin-bottom: 6px;
  }
  .hqr-modal-actions {
    width: 100%;
    justify-content: stretch;
  }
  .hqr-modal-action {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 12.5px;
  }
}
