/* ============ LANDING (redesign, see /welcome) ============ */
/* This page owns its own header/footer (js/app.js hides the shared
   index.html chrome on this one route) and uses a warm red/orange/amber
   palette deliberately distinct from the app's own light-cream UI tokens —
   literal hex values throughout, matching the high-fidelity design spec
   pixel for pixel rather than reusing css/tokens.css. */
.landing-page {
  overflow-x: hidden; background: #fffaf5; color: #241c14; font-family: 'DM Sans', sans-serif;
  /* Fallback until js/views/welcome.js measures the header's real rendered
     height and overrides this — see wireHeader()'s syncHeaderHeight(). */
  --landing-header-h: 96px;
}

/* ---- Sticky header ---- */
.landing-header {
  position: sticky; top: 0; z-index: 50; background: transparent; box-shadow: none;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.landing-header.is-scrolled {
  background: linear-gradient(120deg, #b91c1c, #e8590c);
  box-shadow: 0 4px 20px rgba(120, 20, 10, 0.22);
}
.landing-header-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px; padding: 16px 48px; max-width: 1280px; margin: 0 auto;
}
.landing-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; cursor: pointer; }
.landing-brand img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.landing-brand span { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 22px; color: #fff8ee; letter-spacing: -0.01em; }
.landing-nav { display: flex; align-items: center; gap: 32px; }
.landing-nav a { color: rgba(255, 248, 238, 0.85); text-decoration: none; font-size: 15px; font-weight: 500; }
.landing-nav a:hover { color: #fff8ee; }
.landing-header-right { display: flex; align-items: center; gap: 14px; }
.landing-lang-toggle { display: flex; background: rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 3px; }
.landing-lang-opt {
  border: none; cursor: pointer; padding: 6px 13px; border-radius: 999px;
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 12.5px;
  background: transparent; color: rgba(255, 248, 238, 0.75);
}
.landing-lang-opt.active { background: rgba(255, 255, 255, 0.9); color: #b91c1c; }
.landing-signin-btn {
  background: #fff8ee; color: #b91c1c; border: none; padding: 10px 20px; border-radius: 9px;
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 14.5px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); transition: transform 0.2s, box-shadow 0.2s;
}
.landing-signin-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }

/* ---- Hero ---- */
.landing-hero {
  position: relative; overflow: hidden;
  margin-top: calc(-1 * var(--landing-header-h)); padding-top: var(--landing-header-h);
  background: linear-gradient(120deg, #b91c1c, #e8590c, #f2994a, #f7c948, #e8590c, #b91c1c);
  background-size: 300% 300%; animation: gradientDrift 18s ease-in-out infinite;
}
@keyframes gradientDrift {
  0% { background-position: 0% 30%; }
  50% { background-position: 100% 70%; }
  100% { background-position: 0% 30%; }
}
.landing-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.landing-blob-1 {
  top: -120px; left: -100px; width: 420px; height: 420px; filter: blur(10px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  animation: blobFloat1 14s ease-in-out infinite;
}
.landing-blob-2 {
  bottom: -140px; right: -80px; width: 480px; height: 480px; filter: blur(10px);
  background: radial-gradient(circle, rgba(255, 220, 150, 0.3), transparent 70%);
  animation: blobFloat2 16s ease-in-out infinite;
}
.landing-blob-3 {
  top: 30%; right: 15%; width: 220px; height: 220px; filter: blur(6px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  animation: blobFloat3 12s ease-in-out infinite;
}
@keyframes blobFloat1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, -30px) scale(1.15); } }
@keyframes blobFloat2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, 40px) scale(1.1); } }
@keyframes blobFloat3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 30px) scale(0.9); } }

/* overflow:hidden is load-bearing, not cosmetic: sparks are positioned by
   percentage (some at left:88–93%) and their text runs past the layer's right
   edge, so without clipping they spill outside their card entirely. It's also
   what makes the border-radius rules further down actually do anything. */
.landing-sparkles { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; font-family: 'DM Mono', monospace; color: #fff8ee; }
.landing-spark { position: absolute; opacity: 0; animation-name: sparkFloat; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
/* The hero deliberately extends up behind the sticky header (negative
   margin-top + matching padding-top), so a full-height sparkle layer would
   float decorative numbers straight through the transparent header and
   across the logo. Start the layer below the header band instead. */
.landing-hero > .landing-sparkles { top: var(--landing-header-h); }
@keyframes sparkFloat {
  0% { opacity: 0; transform: translateY(14px) scale(0.9); }
  25% { opacity: 0.9; }
  50% { opacity: 0.35; transform: translateY(-10px) scale(1.05); }
  75% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-26px) scale(0.95); }
}

.landing-hero-inner {
  position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 64px 48px 100px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 56px; align-items: center;
}
.landing-hero-copy { min-width: 0; }
.landing-eyebrow {
  display: inline-block; background: rgba(255, 255, 255, 0.18); color: #fff8ee;
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 12.5px; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.landing-hero-copy h1 {
  font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(34px, 4.6vw, 55px);
  line-height: 1.08; color: #fff8ee; max-width: 560px; overflow-wrap: break-word; margin: 0 0 22px;
}
.landing-hero-sub { font-family: 'DM Sans', sans-serif; font-size: 18px; line-height: 1.6; color: rgba(255, 248, 238, 0.9); max-width: 480px; margin: 0 0 34px; }
.landing-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.landing-cta-primary {
  display: inline-flex; align-items: center; gap: 11px; background: #fff8ee; color: #b91c1c; border: none;
  padding: 14px 26px; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 16px;
  cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); transition: transform 0.2s, box-shadow 0.2s;
}
.landing-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22); }
.landing-google-chip {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); flex-shrink: 0;
}
.landing-cta-secondary {
  background: rgba(255, 255, 255, 0.12); color: #fff8ee; border: 1.5px solid rgba(255, 248, 238, 0.5);
  padding: 14px 26px; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 16px;
  cursor: pointer; transition: background 0.2s;
}
.landing-cta-secondary:hover { background: rgba(255, 255, 255, 0.2); }
.landing-hero-reassure { margin-top: 18px; font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 13.5px; color: rgba(255, 248, 238, 0.82); }

/* ---- Live calculator card ---- */
.landing-demo-card {
  background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px; padding: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}
.landing-demo-label {
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 12.5px; color: rgba(255, 248, 238, 0.75);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 18px;
}
.landing-demo-row { margin-bottom: 18px; }
.landing-demo-row:last-of-type { margin-bottom: 24px; }
.landing-demo-row-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.landing-demo-row-head span:first-child { font-size: 14px; color: rgba(255, 248, 238, 0.85); }
.landing-demo-row-head span:last-child { font-family: 'DM Mono', monospace; font-weight: 600; font-size: 14px; color: #fff8ee; }
.landing-demo-card input[type="range"] { width: 100%; accent-color: #fff8ee; }
.landing-demo-results { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.landing-demo-tile { background: rgba(0, 0, 0, 0.12); border-radius: 12px; padding: 16px; }
.landing-demo-tile-label { font-size: 12.5px; color: rgba(255, 248, 238, 0.7); margin-bottom: 6px; }
.landing-demo-tile-val { font-family: 'DM Mono', monospace; font-weight: 700; font-size: 22px; color: #fff8ee; display: inline-block; }
.landing-demo-tile-val.wd-pulse { animation: pulseKpi 0.4s ease; }
@keyframes pulseKpi { 0% { transform: scale(1); } 30% { transform: scale(1.08); } 100% { transform: scale(1); } }
.landing-demo-caption { font-size: 12.5px; color: rgba(255, 248, 238, 0.85); margin-top: 16px; line-height: 1.5; }

/* ---- Product preview band ---- */
.landing-product { scroll-margin-top: calc(var(--landing-header-h, 84px) + 12px); background: #fff3e6; padding: 96px 48px; }
.landing-product-inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.landing-product-inner h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(30px, 3.6vw, 38px); color: #241c14; margin: 0 0 14px; }
.landing-product-inner p { font-family: 'DM Sans', sans-serif; font-size: 17px; line-height: 1.6; color: #6b5f52; max-width: 620px; margin: 0 auto 40px; min-height: 1.6em; }
.landing-product-frame { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid #ecdcc9; box-shadow: 0 30px 70px rgba(120, 50, 10, 0.16); background: #fff; }
.landing-product-titlebar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; background: #fbf4ea; border-bottom: 1px solid #f0e4d6; flex: none; }
.landing-product-dot { width: 11px; height: 11px; border-radius: 50%; }
.landing-product-dot:nth-child(1) { background: #e0736a; }
.landing-product-dot:nth-child(2) { background: #e7b24d; }
.landing-product-dot:nth-child(3) { background: #8fbf7f; }
/* object-fit:contain, not cover — these are screenshots with real numbers
   and axis labels along their edges, not photography, so cropping them to
   fill the frame risks slicing off a KPI value or a chart's y-axis. The
   fill color matches the app surface tone these screenshots already sit
   on, so any letterboxed space reads as more card, not a visible seam. */
.landing-product-frame img { display: block; width: 100%; height: clamp(300px, 34vw, 440px); object-fit: contain; background: #fffaf5; }

/* ---- Product screenshot carousel ---- */
.landing-carousel { position: relative; margin-top: 8px; }
.landing-carousel-viewport { overflow: hidden; outline: none; }
.landing-carousel-viewport:focus-visible { box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.35); border-radius: 18px; }
.landing-carousel-track {
  display: flex; align-items: flex-start; gap: 24px; touch-action: pan-y;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
/* align-items:flex-start (not flex's own default of stretch) matters here:
   with stretch, every slide gets forced to the height of the TALLEST one —
   harmless for the frame itself (its image area has a fixed height, above),
   but it used to blow out .landing-product-frame’s width via its old
   per-slide aspect-ratio. That's gone now, but flex-start is kept since
   there's no reason for slides to stretch to a shared height at all. 90%
   width (up from an earlier, tighter 82%) still peeks the neighbors enough
   to read as "swipe for more" without feeling like a cropped-in close-up. */
.landing-carousel-slide { flex: 0 0 90%; cursor: grab; }
.landing-carousel-slide:active { cursor: grabbing; }
.landing-carousel-arrow {
  position: absolute; top: 40%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ecdcc9;
  background: #fff; color: #241c14; font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(120, 50, 10, 0.14);
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.landing-carousel-arrow:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); box-shadow: 0 10px 24px rgba(120, 50, 10, 0.2); }
.landing-carousel-arrow:disabled { opacity: 0; pointer-events: none; }
.landing-carousel-arrow.prev { left: -22px; }
.landing-carousel-arrow.next { right: -22px; }
.landing-carousel-dots { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }
.landing-carousel-dot { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; background: #ecdcc9; cursor: pointer; transition: background 0.2s, transform 0.2s; }
.landing-carousel-dot.active { background: #e8590c; transform: scale(1.25); }
@media (max-width: 760px) {
  .landing-carousel-slide { flex: 0 0 92%; }
  .landing-carousel-arrow { display: none; } /* swipe is the primary gesture at this width; arrows would just crowd the edges */
}
@media (prefers-reduced-motion: reduce) {
  .landing-carousel-track { transition: none; }
}

/* ---- Worked example (real property, run through the real engine) ---- */
/* No background override, unlike the bands on either side of it — the card
   itself carries enough visual weight (border + shadow) to read as its own
   section without needing another color band, and it keeps the product
   screenshot's #fff3e6 from repeating twice in a row. */
.landing-example { scroll-margin-top: calc(var(--landing-header-h, 84px) + 12px); padding: 100px 48px 96px; }
.landing-example-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.landing-example-eyebrow {
  display: inline-block; font-family: 'DM Mono', monospace; font-weight: 500; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #e8590c;
  background: #fdece0; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.landing-example-head h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(28px, 3.4vw, 36px); color: #241c14; margin: 0 0 14px; line-height: 1.25; }
.landing-example-head p { font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.6; color: #6b5f52; margin: 0; }

.landing-example-card {
  background: #fdfaf5; border: 1px solid #f0e4d6; border-radius: 22px;
  max-width: 1080px; margin: 0 auto; overflow: hidden;
  box-shadow: 0 24px 60px -22px rgba(120, 50, 10, 0.18);
}
/* Same auto-fit/minmax technique .landing-hero-inner already uses, rather
   than a hand-picked breakpoint — it collapses to one column exactly when
   the property side no longer has room to sit next to the output side. */
.landing-example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.landing-example-property {
  padding: 44px 40px; border-right: 1px solid #f0e4d6;
  background: repeating-linear-gradient(135deg, transparent, transparent 26px, rgba(185, 28, 28, 0.025) 26px, rgba(185, 28, 28, 0.025) 52px);
}
.landing-example-output { padding: 44px 40px; }
/* The grid only reflows to a single column below ~640px combined width — at
   that point the left column's right border reads as a stray line above the
   now-stacked output column rather than a divider, so it's dropped there. */
@media (max-width: 680px) {
  .landing-example-property { border-right: none; border-bottom: 1px solid #f0e4d6; }
}

.landing-example-label {
  font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #6b5f52; margin-bottom: 14px;
}
.landing-example-address { font-family: 'DM Serif Display', serif; font-size: 23px; line-height: 1.35; color: #241c14; margin: 0 0 4px; }
.landing-example-address-sub { font-size: 13px; color: #6b5f52; margin-bottom: 26px; }
.landing-example-fact { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px dashed #f0e4d6; font-size: 13.5px; }
.landing-example-fact:last-child { border-bottom: none; }
.landing-example-fact-label { color: #6b5f52; }
.landing-example-fact-value { font-family: 'DM Mono', monospace; font-weight: 500; color: #241c14; text-align: right; }

.landing-example-tier {
  display: inline-flex; align-items: center; gap: 7px; font-family: 'DM Mono', monospace;
  font-weight: 500; font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 18px;
  color: #b45309; background: #fef6e7; border: 1px solid #f3e0b8;
}
.landing-example-tier::before { content: '●'; font-size: 8px; }
.landing-example-verdict { font-family: 'DM Sans', sans-serif; font-size: 14.5px; line-height: 1.75; color: #241c14; margin: 0 0 28px; }
.landing-example-verdict b { font-weight: 600; }

.landing-example-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.landing-example-kpi { background: #fffaf5; border: 1px solid #f0e4d6; border-radius: 14px; padding: 16px 14px; }
.landing-example-kpi-label { font-family: 'DM Mono', monospace; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #6b5f52; margin-bottom: 8px; }
.landing-example-kpi-val { font-family: 'DM Mono', monospace; font-weight: 500; font-size: 20px; color: #241c14; }
.landing-example-kpi-val.neg { color: #dc2626; }
.landing-example-kpi-sub { font-size: 10.5px; color: #6b5f52; margin-top: 4px; }
@media (max-width: 460px) {
  .landing-example-kpis { grid-template-columns: 1fr; }
}

.landing-example-provenance {
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; line-height: 1.65; color: #6b5f52;
  border-top: 1px solid #f0e4d6; padding-top: 20px; margin-bottom: 24px;
}
.landing-example-provenance b { color: #241c14; font-weight: 600; }

.landing-example-cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.landing-example-cta {
  background: linear-gradient(135deg, #b91c1c, #e8590c); color: #fff8ee; border: none;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 14.5px; padding: 13px 24px;
  border-radius: 10px; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(185, 28, 28, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.landing-example-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(185, 28, 28, 0.5); }
.landing-example-cta-note { font-family: 'DM Sans', sans-serif; font-size: 12px; color: #6b5f52; }

/* ---- Features ---- */
.landing-features { scroll-margin-top: calc(var(--landing-header-h, 84px) + 12px); max-width: 1180px; margin: 0 auto; padding: 110px 48px 90px; }
.landing-features-head { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.landing-features-head h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 38px; color: #241c14; margin: 0 0 16px; }
.landing-features-head p { font-family: 'DM Sans', sans-serif; font-size: 17px; line-height: 1.6; color: #6b5f52; margin: 0; }
.landing-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.landing-fcard { background: #fff; border: 1px solid #f0e4d6; border-radius: 16px; padding: 30px; position: relative; }
.landing-fcard-badge {
  position: absolute; top: 20px; right: 20px; background: #fef3e2; color: #b45309;
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 11px; padding: 4px 9px; border-radius: 999px;
}
.landing-ficon {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: #fff;
}
.landing-ficon svg { width: 22px; height: 22px; }
.landing-ficon.icon-bob { animation: iconBob 3s ease-in-out infinite; }
.landing-ficon.icon-pulse { animation: iconPulse 2.8s ease-in-out infinite; }
.landing-ficon.icon-sway { animation: iconSway 3.4s ease-in-out infinite; }
@keyframes iconBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes iconPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.13); } }
@keyframes iconSway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.landing-fcard-label { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 17px; color: #241c14; margin-bottom: 8px; }
.landing-fcard-desc { font-family: 'DM Sans', sans-serif; font-size: 14.5px; line-height: 1.6; color: #6b5f52; }
.landing-fcard-gradient {
  background: linear-gradient(135deg, #b91c1c, #e8590c, #f7c948); border-radius: 16px; padding: 30px;
  display: flex; flex-direction: column; justify-content: center; color: #fff8ee; position: relative; overflow: hidden;
}
.landing-fcard-gradient .landing-sparkles { border-radius: 16px; opacity: 0.45; }
.landing-fcard-gradient-label { position: relative; z-index: 2; font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 22px; margin-bottom: 10px; }
.landing-fcard-gradient-desc { position: relative; z-index: 2; font-family: 'DM Sans', sans-serif; font-size: 14.5px; line-height: 1.6; color: rgba(255, 248, 238, 0.9); }

/* ---- Pricing ---- */
.landing-pricing { scroll-margin-top: calc(var(--landing-header-h, 84px) + 12px); background: #fff; padding: 100px 48px; }
.landing-pricing-head { text-align: center; max-width: 600px; margin: 0 auto 56px; }
.landing-pricing-head h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 38px; color: #241c14; margin: 0 0 16px; }
.landing-pricing-head p { font-family: 'DM Sans', sans-serif; font-size: 17px; line-height: 1.6; color: #6b5f52; margin: 0; }
.landing-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; max-width: 800px; margin: 0 auto; align-items: stretch; }
.landing-plan-card { background: #fdfaf5; border: 1px solid #f0e4d6; border-radius: 18px; padding: 36px; display: flex; flex-direction: column; }
.landing-plan-name { font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 16px; color: #241c14; margin-bottom: 6px; }
.landing-plan-price { font-family: 'DM Mono', monospace; font-weight: 700; font-size: 40px; color: #241c14; margin-bottom: 22px; }
.landing-plan-price span { font-family: 'DM Sans', sans-serif; font-weight: 400; font-size: 15px; opacity: 0.8; }
.landing-plan-bullets { list-style: none; margin: 0 0 0; padding: 0; }
.landing-plan-bullets li {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 14.5px; line-height: 1.5; color: #4a4038;
}
.landing-plan-bullets li::before { content: '✓'; color: #241c14; font-weight: 700; }
.landing-plan-divider { border-top: 1px solid #f0e4d6; margin: 18px 0 14px; }
.landing-plan-excluded-label {
  font-family: 'DM Mono', monospace; font-weight: 600; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.04em; color: #b0a595; margin-bottom: 12px;
}
.landing-plan-excluded { list-style: none; margin: 0; padding: 0; }
.landing-plan-excluded li {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px;
  font-family: 'DM Sans', sans-serif; font-size: 14.5px; line-height: 1.5; color: #b0a595;
}
.landing-plan-excluded li::before { content: '✕'; color: #cbbfae; font-weight: 700; }
.landing-plan-cta {
  margin-top: auto; padding-top: 14px; background: transparent; color: #b91c1c; border: 1.6px solid #e8b9a0;
  padding-left: 20px; padding-right: 20px; padding-bottom: 13px; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.landing-plan-cta:hover { background: #fff3e6; border-color: #b91c1c; }
.landing-plan-card.is-paid {
  background: linear-gradient(160deg, #b91c1c, #e8590c 60%, #f2994a); border-radius: 18px; padding: 36px;
  color: #fff8ee; box-shadow: 0 20px 44px rgba(185, 28, 28, 0.28); position: relative;
}
/* Dimmed relative to the hero's: on a card this small the sparks sit right
   on top of the price and bullet list, and at full strength they read as
   real content rather than background texture. */
.landing-plan-card.is-paid .landing-sparkles { border-radius: 18px; opacity: 0.45; }
/* z-index 2, above the sparkle layer's 1 — these were previously also 1 and
   only won on DOM order, which is too fragile for the card's actual price. */
.landing-plan-card.is-paid .landing-plan-name,
.landing-plan-card.is-paid .landing-plan-price,
.landing-plan-card.is-paid .landing-plan-bullets,
.landing-plan-card.is-paid .landing-plan-cta { position: relative; z-index: 2; }
.landing-plan-card.is-paid .landing-plan-bullets li { color: rgba(255, 248, 238, 0.92); }
.landing-plan-card.is-paid .landing-plan-bullets li::before { color: #fff8ee; }
.landing-plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); z-index: 2;
  background: #241c14; color: #fff8ee; font-family: 'DM Mono', monospace; font-weight: 600; font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.landing-plan-card.is-paid .landing-plan-price { color: #fff8ee; }
.landing-plan-cta.is-paid {
  background: #fff8ee; color: #b91c1c; border: none; padding: 14px 20px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.landing-plan-cta.is-paid:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26); background: #fff8ee; border-color: transparent; }

/* ---- FAQ ---- */
.landing-faq { scroll-margin-top: calc(var(--landing-header-h, 84px) + 12px); background: #fff3e6; padding: 100px 48px 80px; }
.landing-faq-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.landing-faq-head h2 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: clamp(30px, 3.6vw, 38px); color: #241c14; margin: 0 0 14px; }
.landing-faq-head p { font-family: 'DM Sans', sans-serif; font-size: 17px; line-height: 1.6; color: #6b5f52; margin: 0; }
.landing-faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.landing-faq-item { background: #fff; border: 1px solid #f0e4d6; border-radius: 14px; padding: 18px 22px; }
.landing-faq-item summary {
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 16px; color: #241c14; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.landing-faq-item summary::-webkit-details-marker { display: none; }
.landing-faq-marker { color: #e8590c; font-weight: 700; flex-shrink: 0; }
.landing-faq-answer { font-family: 'DM Sans', sans-serif; font-size: 14.5px; line-height: 1.65; color: #6b5f52; margin-top: 12px; }

/* ---- Guides banner ---- */
.landing-guides { scroll-margin-top: calc(var(--landing-header-h, 84px) + 12px); padding: 70px 48px; }
.landing-guides-card {
  max-width: 1080px; margin: 0 auto; background: linear-gradient(100deg, #241c14, #3a2a1c); border-radius: 20px;
  padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.landing-guides-copy { max-width: 560px; }
.landing-guides-copy h3 { font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 26px; color: #fff8ee; margin: 0 0 10px; }
.landing-guides-copy p { font-family: 'DM Sans', sans-serif; font-size: 15px; line-height: 1.6; color: rgba(255, 248, 238, 0.75); margin: 0; }
.landing-guides-cta {
  background: linear-gradient(135deg, #f2994a, #f7c948); color: #241c14; padding: 14px 26px; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s;
}
.landing-guides-cta:hover { transform: translateY(-2px); }

/* ---- Footer ---- */
.landing-footer {
  border-top: 1px solid #f0e4d6; padding: 36px 48px; display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; flex-wrap: wrap; gap: 12px;
}
.landing-footer-copy { font-family: 'DM Sans', sans-serif; font-size: 13.5px; color: #8a7d6d; }
.landing-footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.landing-footer a { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 13.5px; color: #c2410c; text-decoration: none; }
.landing-footer a:hover { color: #9a3412; }

/* ---- Scroll-reveal (shared with welcome.js's wireScrollReveal) ---- */
.reveal-on-scroll {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--reveal-order, 0) * 80ms);
}
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .landing-hero, .landing-blob, .landing-spark, .landing-ficon { animation: none !important; }
  .landing-spark { opacity: 0.4 !important; }
  .landing-demo-tile-val.wd-pulse { animation: none; }
  .reveal-on-scroll { transition: none; opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .landing-header-inner { padding: 12px 16px; }
  .landing-nav { display: none; }
  /* With .landing-nav hidden, only .landing-brand and .landing-header-right
     share the row — at real iPhone widths (~375-390px) their unshrunk
     combined width (~403px) still exceeds the available content width
     (~350px), so .landing-header-inner's flex-wrap dropped the controls to
     a second row below the logo/wordmark instead of fitting alongside it.
     Compacting both sides here keeps everything on one line rather than
     relying on the wrap fallback. */
  .landing-brand { gap: 8px; }
  .landing-brand img { width: 36px; height: 36px; }
  .landing-brand span { font-size: 16px; }
  .landing-header-right { gap: 8px; }
  .landing-lang-opt { padding: 5px 9px; font-size: 11px; }
  .landing-signin-btn { padding: 8px 14px; font-size: 13px; }
  .landing-hero-inner { padding: 48px 20px 72px; gap: 36px; }
  .landing-product, .landing-example, .landing-features, .landing-pricing, .landing-faq, .landing-guides { padding-left: 20px; padding-right: 20px; }
  .landing-example-property, .landing-example-output { padding: 30px 24px; }
  .landing-footer { padding: 28px 20px; }
}

/* ============ DASHBOARD ============ */
.dashboard-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.dashboard-header h2 { font-size: 24px; }
.plan-badge {
  display: inline-block; font-family: 'DM Mono', monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 10px; margin-left: 10px; vertical-align: middle;
}
.plan-badge-paid { color: var(--positive); background: var(--positive-bg); border-color: var(--positive); }
.dashboard-header .sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

.badge-owned {
  display: inline-block; font-family: 'DM Mono', monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--positive); background: var(--positive-bg); border: 1px solid var(--positive);
  border-radius: 999px; padding: 3px 10px; vertical-align: middle; white-space: nowrap;
}

.status-filter {
  display: inline-flex; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px;
}
.status-filter-opt {
  border: none; background: none; cursor: pointer; font-family: 'DM Mono', monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.5px; color: var(--muted);
  padding: 5px 12px; border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.status-filter-opt.active { background: var(--text); color: var(--bg); }
.status-filter-opt:hover:not(.active) { color: var(--text); }

/* ============ PROFILE ============ */
.profile-page { max-width: 560px; margin: 0 auto; }
.upgrade-page { max-width: 560px; margin: 0 auto; }
.feedback-page { max-width: 560px; margin: 0 auto; }

.branding-logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.branding-logo-preview {
  width: 96px; height: 64px; flex-shrink: 0;
  border: 1px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); overflow: hidden;
}
.branding-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.branding-logo-empty { font-size: 10px; color: var(--muted); font-family: 'DM Mono', monospace; text-align: center; padding: 0 6px; }
.branding-logo-actions { display: flex; flex-direction: column; gap: 8px; }
.branding-accent-row { display: flex; align-items: center; gap: 12px; }
.branding-accent-row input[type="color"] {
  width: 44px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.property-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; position: relative; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column; gap: 14px;
}
.property-card:hover { border-color: var(--text); box-shadow: 0 8px 24px rgba(26,25,22,0.06); transform: translateY(-1px); }
/* flex-wrap so the compare checkbox + menu button drop to their own row
   instead of forcing the address column (min-width:0, unbounded shrink)
   and the controls (flex-shrink:0, fixed width) onto one row no matter
   how little space is left — a long address on a narrow card had nowhere
   to go but crowd into/under the compare checkbox. */
.property-card .pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.property-card .pc-top > div:last-child { margin-left: auto; }
.property-card .pc-address-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.property-card .pc-address { font-family: 'DM Serif Display', serif; font-size: 17px; line-height: 1.3; }
.property-card .pc-meta { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); margin-top: 4px; }
.property-card .pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.property-card .pc-stat .pc-stat-label { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-family: 'DM Mono', monospace; margin-bottom: 4px; }
.property-card .pc-stat .pc-stat-val { font-family: 'DM Mono', monospace; font-size: 13.5px; font-weight: 500; }
.property-card .pc-footer { display: flex; justify-content: space-between; align-items: center; font-family: 'DM Mono', monospace; font-size: 10.5px; color: var(--muted); }
.pc-check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.pc-check input[type="checkbox"] { width: 13px; height: 13px; accent-color: var(--text); cursor: pointer; }
.pc-check span { font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); font-family: 'DM Mono', monospace; }

.new-property-card {
  background: var(--surface2); border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 168px; gap: 10px; color: var(--muted); transition: all 0.15s;
}
.new-property-card:hover { border-color: var(--text); color: var(--text); background: var(--surface); }
.new-property-card .plus { font-family: 'DM Serif Display', serif; font-size: 30px; line-height: 1; }
.new-property-card .label { font-size: 12.5px; font-weight: 500; }

.empty-state {
  text-align: center; padding: 8px 20px 60px; max-width: 460px; margin: 0 auto;
}
.empty-state-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 32px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.empty-state-content { position: relative; z-index: 1; }
.empty-state h2 { font-size: 23px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; line-height: 1.65; }
.empty-state-reassure {
  text-align: left; list-style: none; margin: 0 0 28px; padding: 16px 18px;
  background: var(--surface2); border-radius: var(--radius);
}
.empty-state-reassure li {
  position: relative; padding-left: 20px; font-size: 12.5px; color: var(--muted);
  line-height: 1.6; margin-bottom: 8px;
}
.empty-state-reassure li:last-child { margin-bottom: 0; }
.empty-state-reassure li::before { content: '✓'; position: absolute; left: 0; color: var(--accent2); font-weight: 600; }

/* ============ WIZARD ============ */
.wizard-shell { max-width: 640px; margin: 0 auto; }
.wizard-head { text-align: center; margin-bottom: 8px; }
.wizard-head h2 { font-size: 22px; margin-bottom: 6px; }
.wizard-head p { color: var(--muted); font-size: 13px; }
.wizard-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 30px; margin-top: 20px; overflow: hidden; }
.wizard-preview {
  display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap;
}
.wizard-preview .wp-item {
  flex: 1; min-width: 130px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px;
}
.wizard-preview .wp-label { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-family: 'DM Mono', monospace; margin-bottom: 4px; }
.wizard-preview .wp-val { font-family: 'DM Serif Display', serif; font-size: 19px; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.wizard-nav .spacer { flex: 1; }

/* Live estimate panel shown alongside each wizard field step — sticky
   sidebar on desktop, fixed bottom bar on mobile. Not shown on the review
   step, which already has its own full preview. */
.wizard-shell.wizard-shell-with-summary { max-width: 900px; }
.wizard-layout { display: flex; align-items: flex-start; gap: 28px; }
.wizard-layout .wizard-main { flex: 1; min-width: 0; max-width: 640px; }
.wizard-summary {
  width: 220px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; margin-top: 20px;
  position: sticky; top: 24px;
}
.wizard-summary-label { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-family: 'DM Mono', monospace; margin-bottom: 14px; }
.wizard-summary-item { margin-bottom: 14px; }
.wizard-summary-item:last-of-type { margin-bottom: 0; }
.wizard-summary-item-label { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.wizard-summary-item-val { font-family: 'DM Serif Display', serif; font-size: 18px; }
.wizard-summary-note { font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 14px; }

@media (max-width: 860px) {
  .wizard-shell.wizard-shell-with-summary { max-width: 640px; padding-bottom: 88px; }
  .wizard-layout { flex-direction: column; }
  .wizard-summary {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30;
    width: 100%; margin-top: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -6px 16px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: space-around; gap: 8px;
  }
  .wizard-summary-label, .wizard-summary-note { display: none; }
  .wizard-summary-item { margin-bottom: 0; text-align: center; }
  .wizard-summary-item-val { font-size: 15px; }
}

.expose-upload {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; text-align: center;
}
.expose-upload-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 999px;
  padding: 9px 18px; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text); transition: border-color 0.15s, background 0.15s;
}
.expose-upload-btn:hover { border-color: var(--text); background: var(--bg); }
.expose-upload-hint { font-size: 11.5px; color: var(--muted); }
.expose-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text);
}
.expose-chip.parsing { color: var(--muted); }
.expose-chip-remove {
  background: none; border: none; cursor: pointer; color: var(--muted); font-size: 12px;
  padding: 2px 4px; line-height: 1; border-radius: 999px;
}
.expose-chip-remove:hover { color: var(--negative); background: var(--negative-bg); }

/* step transition animation */
@keyframes wizardStepForward { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
@keyframes wizardStepBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: translateX(0); } }
.wizard-card.step-forward { animation: wizardStepForward 0.3s cubic-bezier(.4,0,.2,1); }
.wizard-card.step-back { animation: wizardStepBack 0.3s cubic-bezier(.4,0,.2,1); }
.progress-step { transition: background 0.3s ease; }
@media (prefers-reduced-motion: reduce) {
  .wizard-card.step-forward, .wizard-card.step-back { animation: none; }
}

/* ============ NAV TABS (property detail) ============ */
.pd-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 48px; background: var(--surface); border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
.pd-breadcrumb { display: flex; align-items: center; gap: 8px; font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); cursor: pointer; }
.pd-breadcrumb:hover { color: var(--text); }
.pd-address {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 10px; outline: none; min-width: 200px; cursor: text;
}
.pd-address:focus { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px var(--focus-ring); }

/* Secondary property actions (Exposé / Share / PDF). On desktop they sit
   inline exactly as before; below 720px they'd otherwise stack into three
   full-width buttons that, together with the breadcrumb, address field and
   guest note, fill an entire phone screen before a single number is
   visible — so there they fold into a ⋯ popover instead. Same elements and
   same handlers at both widths; only the presentation changes. */
.pd-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pd-more-btn { display: none; }
@media (max-width: 720px) {
  .pd-more-btn { display: inline-flex; }
  .pd-actions {
    position: absolute; top: calc(100% + 6px); right: 0;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    min-width: 190px; z-index: 50; padding: 6px;
  }
  .pd-actions:not(.open) { display: none; }
  .pd-actions .btn {
    width: 100%; justify-content: flex-start; border-radius: var(--radius-sm);
    background: none; border: none;
  }
  .pd-actions .btn:hover { background: var(--surface2); }
}

/* ============ SHARED REPORT (public /r/:shareId) ============ */
.shared-report-page { max-width: 720px; }
.shared-report-brand {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  padding-bottom: 20px; border-bottom: 2px solid var(--brand-accent, var(--border));
}
.shared-report-brand img { max-height: 48px; max-width: 180px; object-fit: contain; }
.shared-report-brand-name { font-family: 'DM Serif Display', serif; font-size: 19px; color: var(--text); }
.shared-report-brand-contact { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); margin-top: 2px; }
.shared-report-address {
  font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--text);
  margin-bottom: 24px; color: var(--brand-accent, var(--text));
}
.shared-report-cta {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 24px; margin: 32px 0 20px; text-align: center;
}
.shared-report-cta p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.shared-report-disclaimer {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted);
  text-align: center; padding-bottom: 24px;
}

nav.tabnav {
  display: flex; gap: 0; background: var(--surface);
  border-bottom: 1px solid var(--border); padding: 0 48px; overflow-x: auto;
}
nav.tabnav button {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  padding: 14px 20px; border-bottom: 2px solid transparent; transition: all 0.2s;
  letter-spacing: 0.3px; white-space: nowrap;
}
nav.tabnav button:hover { color: var(--text); }
nav.tabnav button.active { color: var(--text); border-bottom-color: var(--text); }

.tab { display: none; }
.tab.active { display: block; }

/* KPI CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  margin-bottom: 24px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.kpi { background: var(--surface); padding: 20px 18px; position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--border); }
.kpi.negative::before { background: var(--negative); }
.kpi.positive::before { background: var(--positive); }
.kpi .kpi-label { font-size: 9px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-family: 'DM Mono', monospace; margin-bottom: 10px; }
.kpi .kpi-value { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--text); line-height: 1; }
.kpi .kpi-value.neg { color: var(--negative); }
.kpi .kpi-value.pos { color: var(--positive); }
.kpi .kpi-sub { font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; margin-top: 6px; }
.kpi .kpi-band { margin-top: 10px; height: 3px; border-radius: 99px; background: var(--border); overflow: hidden; }
.kpi .kpi-band-fill { height: 100%; border-radius: 99px; }

/* CASHFLOW PANEL */
.cf-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.cf-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-family: 'DM Mono', monospace; font-size: 13px; }
.cf-row:last-child { border-bottom: none; font-weight: 500; }
.cf-row .lbl { color: var(--muted); }
.cf-row .lbl.indent { margin-left: 20px; font-size: 12px; }
.cf-row .val.neg { color: var(--negative); }
.cf-row .val.pos { color: var(--positive); }
.cf-row .val.total { color: var(--text); font-size: 14px; font-weight: 600; }

.summary-panel { padding: 22px 24px; }
.summary-tier { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.summary-tier.pos { color: var(--positive); }
.summary-tier.neg { color: var(--negative); }
.summary-text { font-size: 13.5px; line-height: 1.7; color: var(--text); }

/* SENSITIVITY */
.sens-slider-row { margin-bottom: 28px; }
.sens-slider-row:last-child { margin-bottom: 0; }
.sens-slider-label { display: flex; justify-content: space-between; align-items: baseline; font-family: 'DM Mono', monospace; font-size: 12px; margin-bottom: 9px; }
.sens-slider-label .sens-slider-name { color: var(--muted); }
.sens-slider-label .sens-slider-val { color: var(--text); font-weight: 500; font-size: 13px; }
.sens-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 999px; background: var(--border); outline: none; cursor: pointer; display: block;
}
.sens-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text); cursor: pointer; border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.sens-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text); cursor: pointer; border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.sens-slider-track-wrap { position: relative; }
.sens-breakeven-marker {
  position: absolute; top: 50%; width: 2px; height: 14px;
  background: var(--negative); transform: translate(-50%, -50%);
  pointer-events: none;
}
.sens-breakeven-marker::after {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid var(--negative);
}
.sens-breakeven-label {
  position: absolute; top: 100%; margin-top: 5px; transform: translateX(-50%);
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.3px;
  color: var(--negative); white-space: nowrap; cursor: help;
}
.sens-scenario-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.sens-scenario-label { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.sens-scenario-btn { font-size: 11.5px; padding: 6px 12px; }
.sens-note { font-size: 11.5px; color: var(--muted); margin: -10px 0 24px; }

/* Gated preview: the real controls, blurred and inert, with a lock card
   overlaid — shows what's behind the gate instead of just describing it.
   Generic (not paywall-specific): also used for the guest "sign in to use
   branding" preview in profile.js, which isn't a plan gate at all. Host
   element needs position:relative (set per-caller, e.g. #tab-sensitivity below). */
#tab-sensitivity { position: relative; }
.blur-locked {
  filter: blur(4px); opacity: 0.6; pointer-events: none; user-select: none;
}
.lock-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 10;
}
.lock-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  text-align: center; padding: 32px 30px; max-width: 400px;
}
.lock-icon { font-size: 26px; margin-bottom: 10px; }
.lock-card h3 { font-size: 17px; margin-bottom: 10px; }
.lock-card p { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin-bottom: 20px; }

/* CLOSING COSTS */
.cost-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.cost-item { display: flex; justify-content: space-between; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-family: 'DM Mono', monospace; font-size: 12px; }
.cost-item .ci-label { color: var(--muted); }
.cost-item .ci-val { color: var(--text); font-weight: 500; }

/* TABLE */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 32px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-family: 'DM Mono', monospace; font-size: 12px; }
thead tr { background: var(--surface2); }
thead th { padding: 12px 16px; text-align: right; color: var(--muted); font-weight: 400; letter-spacing: 1px; font-size: 10px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
thead th:first-child { text-align: left; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
tbody tr:hover { background: var(--surface2); }
tbody tr:last-child { border-bottom: none; }
td { padding: 10px 16px; text-align: right; color: var(--text); }
td:first-child { text-align: left; color: var(--muted); }
td.neg { color: var(--negative); }
td.pos { color: var(--positive); }
td.acc { color: var(--text); font-weight: 500; }
tbody tr[data-id] { cursor: pointer; }

/* Risk flags. Severity is carried by a dot rather than by colouring the text,
   so a panel with several serious flags still reads as prose instead of a
   wall of red. */
.risk-list { list-style: none; margin: 0; padding: 0; }
.risk-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif; font-size: 13px; line-height: 1.6; color: var(--text);
}
.risk-item:last-child { border-bottom: none; }
.risk-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 7px;
  background: var(--muted);
}
.risk-high .risk-dot { background: var(--negative); }
.risk-medium .risk-dot { background: var(--accent); }
.risk-low .risk-dot { background: var(--muted); }
.risk-low .risk-text { color: var(--muted); }

/* Depreciation-regime optimizer. Reads as a ranked list rather than a table:
   the euro figure on each row is the point, and everything else is the
   qualification attached to it. */
.afa-headline {
  font-family: 'DM Sans', sans-serif; font-size: 14px; line-height: 1.6;
  color: var(--text); margin: 0 0 4px;
}
.afa-baseline {
  font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--muted);
  line-height: 1.6; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.afa-option { padding: 14px 0; border-bottom: 1px solid var(--border); }
.afa-option:last-of-type { border-bottom: none; }
.afa-option-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.afa-option-name { font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 500; color: var(--text); }
.afa-option-citation {
  font-family: 'DM Mono', monospace; font-size: 10.5px; color: var(--muted); letter-spacing: 0.03em;
}
.afa-option-gain {
  font-family: 'DM Mono', monospace; font-size: 15px; color: var(--text);
  text-align: right; white-space: nowrap; flex-shrink: 0;
}
.afa-option-gain.pos { color: var(--positive); }
.afa-option-gain span {
  display: block; font-size: 9.5px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px;
}
.afa-option-detail {
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; color: var(--muted);
  line-height: 1.6; margin-top: 8px;
}
.afa-conditions {
  margin: 8px 0 0; padding-left: 16px;
  font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--muted); line-height: 1.65;
}
.afa-conditions li { margin-bottom: 2px; }
.afa-option.ineligible .afa-option-name, .afa-option.ineligible .afa-option-citation { color: var(--muted); }
.afa-option-reason {
  font-family: 'DM Sans', sans-serif; font-size: 12px; color: var(--muted);
  line-height: 1.6; margin-top: 6px;
}
.afa-ineligible-wrap { margin-top: 6px; border-top: 1px solid var(--border); }
.afa-ineligible-wrap > summary {
  cursor: pointer; list-style: none; padding: 12px 0;
  font-family: 'DM Mono', monospace; font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.afa-ineligible-wrap > summary::-webkit-details-marker { display: none; }
.afa-ineligible-wrap > summary::after { content: ' +'; }
.afa-ineligible-wrap[open] > summary::after { content: ' \2212'; }
@media (max-width: 560px) {
  .afa-option-head { flex-direction: column; gap: 6px; }
  .afa-option-gain { text-align: left; }
  .afa-option-gain span { display: inline; margin-left: 6px; }
}

/* Renovation tax-treatment panel. The left rail carries the verdict: green
   when the spend stays immediately deductible, accent when it has been
   reclassified into the building's cost and now comes back over decades. Not
   red — being capitalised is a timing outcome, not a loss. */
.renovation-panel { border-left: 3px solid var(--positive); }
.renovation-panel.capitalised { border-left-color: var(--accent); }
.renovation-verdict {
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text); line-height: 1.5; margin-bottom: 2px;
}
.renovation-citation {
  font-family: 'DM Mono', monospace; font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.03em; margin-bottom: 14px;
}
.renovation-note {
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; color: var(--muted);
  line-height: 1.65; margin: 14px 0 0; padding-top: 12px;
  border-top: 1px dashed var(--border);
}

/* Zinsbindung-expiry callout. Marked with the accent rather than --negative:
   a rate reset is a risk to plan around, not a loss that has already
   happened, and the red is reserved throughout this app for figures that are
   genuinely bad. */
.proj-refinance {
  display: flex; align-items: baseline; gap: 12px;
  margin: -12px 0 32px; padding: 12px 14px;
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; line-height: 1.6; color: var(--muted);
}
/* Same callout shell as the Zinsbindung note, marked positive instead: the
   speculation period expiring is money the owner stops owing, not a risk. */
.proj-speculation { border-left-color: var(--positive); }
.proj-refinance-year {
  font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text);
  letter-spacing: 0.04em; flex: 0 0 auto;
}
@media (max-width: 640px) {
  .proj-refinance { flex-direction: column; gap: 4px; }
}

/* Per-year accordion cards — swapped in for the projection table below
   640px, since a 9-metric x 15-year table forces horizontal scroll on
   narrow viewports. Hidden on wider screens where the table is usable.
   Scoped to .proj-table-wrapper specifically (not the generic
   .table-wrapper class every other table on the site also uses, e.g. the
   Portfolio page's owned-properties list) — an unscoped rule here hid
   those other tables on mobile with no card fallback to replace them,
   leaving an empty gap where the list should be. */
.proj-cards { display: none; }
@media (max-width: 640px) {
  .proj-table-wrapper { display: none; }
  .proj-cards { display: block; margin-bottom: 32px; }
}
.proj-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 10px; overflow: hidden;
}
.proj-card-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.proj-card-summary::-webkit-details-marker { display: none; }
.proj-card-year { font-family: 'DM Serif Display', serif; font-size: 16px; }
.proj-card-cf { font-family: 'DM Mono', monospace; font-size: 13px; text-align: right; }
.proj-card-cf-label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.proj-card-body { padding: 0 16px 14px; border-top: 1px solid var(--border); }
.proj-card-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.proj-card-row:last-child { border-bottom: none; }
.proj-card-label { color: var(--muted); }
.proj-card-val { font-family: 'DM Mono', monospace; color: var(--text); }
.proj-card-val.neg { color: var(--negative); }
.proj-card-val.pos { color: var(--positive); }
.proj-card-val.acc { font-weight: 500; }

/* CHARTS */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 24px; position: relative; }
.chart-card svg { display: block; width: 100%; height: auto; }
.chart-card .chart-title { font-family: 'DM Serif Display', serif; font-size: 15px; margin-bottom: 14px; }
svg .bar-track { fill: var(--bg); }
svg .bar-fill-pos { fill: var(--positive); }
svg .bar-fill-neg { fill: var(--negative); }
svg .bar-fill-range { fill: var(--accent); opacity: 0.85; }
svg .chart-label { fill: var(--muted); }
svg .chart-value { fill: var(--text); font-weight: 500; }
svg .chart-value.neg { fill: var(--negative); }
svg .chart-value.pos { fill: var(--positive); }
svg .chart-gridline { stroke: var(--border); stroke-width: 1; }

/* Subtle "you're pointing at this row" feedback — the value is already
   shown as static text, this is just an affordance, not a tooltip. */
svg .bar-row { cursor: default; }
svg .bar-row:hover rect { opacity: 0.85; }

/* WEALTH CHART: hover/touch crosshair + tooltip */
svg .wealth-hit-area { cursor: crosshair; }
svg .wealth-crosshair-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3,3; pointer-events: none; }
svg .wealth-crosshair-dot { stroke: var(--surface); stroke-width: 2; pointer-events: none; }
.wealth-tooltip {
  position: absolute; z-index: 20; pointer-events: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 10px 12px; min-width: 150px;
}
.wealth-tooltip-year { font-family: 'DM Serif Display', serif; font-size: 13px; margin-bottom: 6px; }
.wealth-tooltip-row { display: flex; align-items: center; gap: 6px; font-family: 'DM Mono', monospace; font-size: 11px; padding: 2px 0; }
.wealth-tooltip-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.wealth-tooltip-label { color: var(--muted); flex: 1; white-space: nowrap; }
.wealth-tooltip-val { color: var(--text); font-weight: 500; margin-left: 10px; }

/* Chart-to-table sync: hovering a point on the wealth chart highlights the
   matching year's column in the table (th + one td per row) or, on mobile,
   the matching accordion card. */
.year-col-highlight { background: var(--surface2); }
.proj-card.year-col-highlight { border-color: var(--text); }
svg .tornado-row { cursor: help; }

.wealth-chart-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }
.wealth-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.wealth-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
/* Marks the one series drawn as a dashed line — a bar rather than a dot, so
   the legend distinguishes the conditional "if you sold" line from the three
   solid ones without needing a second colour. */
.wealth-legend-dot.dashed { width: 14px; height: 2px; border-radius: 0; }

/* ============ VAULT TAB ============ */
.vault-upload-panel { margin-bottom: 24px; }
.vault-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vault-upload-row select {
  font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px;
}
.vault-doc-rows { display: flex; flex-direction: column; }
.vault-doc-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.vault-doc-row:last-child { border-bottom: none; }
.vault-doc-name {
  flex: 1; min-width: 0; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--text); font-size: 13.5px; text-decoration: underline; text-decoration-color: var(--border);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0;
}
.vault-doc-name:hover { text-decoration-color: var(--text); }
.vault-doc-meta { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); white-space: nowrap; }
.vault-doc-delete { flex-shrink: 0; padding: 4px 8px; }

@media (max-width: 768px) {
  .pd-toolbar, nav.tabnav { padding-left: 20px; padding-right: 20px; }
  .cost-breakdown { grid-template-columns: 1fr; }
  .property-card .pc-stats { grid-template-columns: 1fr 1fr; }
  .vault-doc-meta { display: none; }
}
