 :root {
    --sage: #4a6741;
    --sage-light: #6b8f5e;
    --sage-pale: #e8f0e3;
    --earth: #8b5e3c;
    --earth-light: #c4956a;
    --cream: #f7f3ec;
    --cream-dark: #ede7da;
    --ink: #1a1f15;
    --ink-mid: #3d4636;
    --ink-soft: #6b7463;
    --sky: #d4e4f0;
    --berry: #6b3a6e;
    --berry-light: #9b6b9e;
    --berry-pale: #f0e8f0;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(26,31,21,0.08);
    --shadow-lg: 0 12px 48px rgba(26,31,21,0.14);
  }

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

  html { scroll-behavior: smooth; }

  body {
    font-family: 'Instrument Sans', sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    min-height: 100vh;
  }

  /* ─── NAV ─── */
  nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(247,243,236,0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cream-dark);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2.5rem;
    height: 60px;
  }
  .nav-logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.4rem;
    color: var(--sage);
    text-decoration: none;
    letter-spacing: -0.01em;
  }
  .nav-logo span { color: var(--earth-light); font-style: italic; }
  .nav-links { display: flex; gap: 2rem; list-style: none; }
  .nav-links a {
    font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--ink-soft);
    text-decoration: none; transition: color 0.2s;
  }
  .nav-links a:hover { color: var(--sage); }
  .nav-pill {
    background: var(--sage); color: var(--white);
    padding: 7px 18px; border-radius: 100px; font-size: 0.82rem;
    font-weight: 600; text-decoration: none; letter-spacing: 0.02em;
    transition: background 0.2s;
  }
  .nav-pill:hover { background: var(--sage-light); }

  /* ─── HERO ─── */
  .hero {
    display: grid; grid-template-columns: 1fr 1fr;
    min-height: 88vh; overflow: hidden;
  }
  .hero-left {
    padding: 4rem 4rem 4rem;
    display: flex; flex-direction: column; justify-content: center;
    background: var(--cream);
    position: relative;
  }
  .hero-left::after {
    content: ''; position: absolute; right: 0; top: 10%; bottom: 10%;
    width: 1px; background: var(--cream-dark);
  }
  .hero-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    line-height: 1.1; letter-spacing: -0.02em;
    color: var(--ink); margin-bottom: 1.5rem;
  }
  .hero-title em { color: var(--sage); font-style: italic; }
  .hero-sub {
    font-size: 1.05rem; color: var(--ink-soft);
    max-width: 420px; line-height: 1.7; margin-bottom: 2.5rem;
  }
  .hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--ink); color: var(--cream);
    padding: 14px 28px; border-radius: 100px;
    font-weight: 600; font-size: 0.95rem;
    text-decoration: none; transition: all 0.2s;
    width: fit-content;
  }
  .hero-cta:hover { background: var(--sage); transform: translateY(-1px); }
  .hero-cta svg { width: 18px; height: 18px; }
  .hero-stats {
    display: flex; gap: 2.5rem; margin-top: 3rem;
    padding-top: 2rem; border-top: 1px solid var(--cream-dark);
  }
  .hero-stat-val {
    font-family: 'DM Serif Display', serif; font-size: 2rem;
    color: var(--sage); line-height: 1;
  }
  .hero-stat-label { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }

  /* ─── HERO SLIDESHOW ─── */
  .hero-right {
    position: relative; overflow: hidden;
    background: var(--ink);
  }
  .slideshow {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  }
  .slide {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.2s ease-in-out;
  }
  .slide.active { opacity: 1; }
  .slide::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(26,31,21,0.55) 0%, rgba(74,103,65,0.25) 100%);
  }
  .slide-caption { display: none !important; } .slide-caption-hidden {
    position: absolute; bottom: 1.5rem; left: 1.5rem; z-index: 10;
    font-size: 0.72rem; font-family: 'DM Mono', monospace;
    letter-spacing: 0.08em; color: rgba(247,243,236,0.65);
    text-transform: uppercase;
  }
  .slide-dots {
    position: absolute; bottom: 1.5rem; right: 1.5rem; z-index: 10;
    display: flex; gap: 6px;
  }
  .slide-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(247,243,236,0.3); cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    border: none; padding: 0;
  }
  .slide-dot.active { background: rgba(247,243,236,0.9); transform: scale(1.3); }
  .hero-badge {
    position: absolute; top: 2rem; right: 2rem; z-index: 10;
    background: rgba(247,243,236,0.12); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid rgba(247,243,236,0.2);
    border-radius: var(--radius); padding: 14px 18px;
    color: var(--cream); font-size: 0.82rem;
  }
  .hero-badge strong { display: block; font-family: 'DM Mono', monospace; font-size: 1.2rem; margin-bottom: 2px; }

  /* ─── SECTION TITLES ─── */
  .section-label {
    font-family: 'DM Mono', monospace; font-size: 0.7rem;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--sage); margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 8px;
  }
  .section-label::before { content: '—'; }
  .section-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15; letter-spacing: -0.02em; color: var(--ink);
  }
  .section-title em { color: var(--sage); font-style: italic; }

  /* ─── TOOL SECTION ─── */
  #tool {
    padding: 5rem 2.5rem;
    max-width: 1300px; margin: 0 auto;
  }
  .tool-header { margin-bottom: 2rem; }
  .tool-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; align-items: start; }

  /* Map */
  .map-card {
    background: var(--white); border-radius: 16px;
    box-shadow: var(--shadow); overflow: visible;
    border: 1px solid var(--cream-dark);
    position: relative;
  }
  .map-card-header {
    padding: 14px 18px; background: var(--ink);
    display: flex; align-items: center; gap: 10px;
  }
  .map-card-header span {
    font-family: 'DM Mono', monospace; font-size: 0.75rem;
    color: rgba(247,243,236,0.7); letter-spacing: 0.06em;
  }
  .map-card-header .dot { width:8px;height:8px;border-radius:50%; }
  .dot-red{background:#ff5f57;} .dot-yellow{background:#febc2e;} .dot-green{background:#28c840;}
  #map { width: 100%; height: 440px; cursor: crosshair; }

  @keyframes pulse-cta {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50%       { opacity: 0.85; transform: translateX(-50%) scale(1.03); }
  }
  @keyframes bounce-pin {
    0%, 100% { transform: translateY(0); }
    40%       { transform: translateY(-5px); }
    60%       { transform: translateY(-3px); }
  }

  /* Pulsing ring on the map card when no data loaded yet */
  .map-card.awaiting-click {
    box-shadow: 0 0 0 3px var(--sage), var(--shadow);
    animation: map-ring 2.5s ease-in-out infinite;
  }
  @keyframes map-ring {
    0%, 100% { box-shadow: 0 0 0 3px rgba(74,103,65,0.7), var(--shadow); }
    50%       { box-shadow: 0 0 0 6px rgba(74,103,65,0.2), var(--shadow); }
  }

  .map-hint {
    padding: 10px 18px; background: var(--cream);
    font-size: 0.78rem; color: var(--ink-soft);
    display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--cream-dark);
  }

  /* Model selector */
  .controls-card {
    background: var(--white); border-radius: 16px;
    box-shadow: var(--shadow); padding: 1.5rem;
    border: 1px solid var(--cream-dark);
    margin-bottom: 1.5rem;
  }
  .controls-card h3 {
    font-family: 'DM Serif Display', serif; font-size: 1.1rem;
    color: var(--ink); margin-bottom: 1rem;
  }
  .model-options { display: flex; flex-direction: column; gap: 8px; }
  .model-opt {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    border: 1.5px solid var(--cream-dark);
    cursor: pointer; transition: all 0.18s; background: var(--cream);
  }
  .model-opt:hover { border-color: var(--sage-light); background: var(--sage-pale); }
  .model-opt.active { border-color: var(--sage); background: var(--sage-pale); }
  .model-opt input { accent-color: var(--sage); -webkit-accent-color: var(--sage); margin-top: 2px; flex-shrink: 0; }
  .model-opt-title { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
  .model-opt-desc { font-size: 0.75rem; color: var(--ink-soft); line-height: 1.4; }

  /* Results panel */
  .results-card {
    background: var(--white); border-radius: 16px;
    box-shadow: var(--shadow); padding: 1.5rem;
    border: 1px solid var(--cream-dark);
  }
  .results-card h3 {
    font-family: 'DM Serif Display', serif; font-size: 1.1rem;
    color: var(--ink); margin-bottom: 1rem;
  }
  #results-placeholder {
    text-align: center; padding: 2rem 1rem;
    color: var(--ink-soft); font-size: 0.85rem; line-height: 1.7;
  }
  #results-placeholder .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
  #results-content { display: none; }

  .loc-info {
    background: var(--sage-pale); border-radius: 8px;
    padding: 10px 14px; margin-bottom: 1rem;
    font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--sage);
  }
  .loc-info strong { display: block; font-size: 0.85rem; color: var(--ink); font-family: 'Instrument Sans', sans-serif; }
  .src-tag { font-size: 0.7rem; color: var(--ink-soft); margin-top: 2px; }

  .metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1rem; }
  .metric {
    background: var(--cream); border-radius: 8px; padding: 10px 12px;
    border: 1px solid var(--cream-dark);
  }
  .metric-label { font-size: 0.7rem; color: var(--ink-soft); margin-bottom: 2px; }
  .metric-val { font-size: 1.3rem; font-weight: 600; color: var(--ink); font-family: 'DM Mono', monospace; }
  .metric-val.highlight { color: var(--sage); }

  .chart-container { margin-top: 1rem; }
  #statusMsg {
    font-size: 0.82rem; color: var(--ink-soft);
    text-align: center; padding: 1rem;
    font-family: 'DM Mono', monospace;
    display: none;
  }
  #errorMsg {
    font-size: 0.82rem; color: #c0392b; text-align: center;
    padding: 0.75rem; background: #fdf0ef; border-radius: 8px;
    display: none; margin-bottom: 0.75rem;
  }

  /* ─── BLUEBERRY VARIETIES SECTION ─── */
  #varieties {
    background: var(--ink); padding: 5rem 2.5rem;
    position: relative; overflow: hidden;
  }
  #varieties::before {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: radial-gradient(ellipse at 20% 80%, rgba(74,103,65,0.25) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 10%, rgba(107,58,110,0.2) 0%, transparent 50%);
    pointer-events: none;
  }
  .varieties-inner { max-width: 1300px; margin: 0 auto; position: relative; }
  #varieties .section-label { color: var(--berry-light); }
  #varieties .section-title { color: var(--cream); }
  #varieties .section-title em { color: var(--earth-light); }

  /* ── VARIETY CARDS v2 — compact name-first + expandable detail ── */
  .varieties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px; margin-top: 2rem;
  }
  .variety-card {
    background: rgba(247,243,236,0.06); border: 1px solid rgba(247,243,236,0.12);
    border-radius: 12px; overflow: hidden;
    transition: border-color 0.2s; position: relative;
  }
  .variety-card:hover { border-color: rgba(247,243,236,0.25); }
  .variety-card-accent { height: 3px; background: linear-gradient(90deg, var(--berry-light), var(--sage-light)); }

  /* always-visible name row */
  .vc-header {
    display: flex; align-items: center; gap: 10px;
    padding: 0.85rem 1.1rem; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .vc-rank {
    font-family: 'DM Mono', monospace; font-size: 0.65rem;
    color: rgba(247,243,236,0.3); width: 1.6rem; flex-shrink: 0; text-align: center;
  }
  .vc-name-block { flex: 1; min-width: 0; overflow: visible; }
  .vc-name {
    font-family: 'DM Serif Display', serif; font-size: 1.05rem;
    color: var(--cream); line-height: 1.2;
    white-space: normal; word-break: keep-all; overflow: visible;
  }
  .vc-type {
    font-size: 0.62rem; color: var(--berry-light); font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
  }
  .vc-pills { display: flex; gap: 5px; flex-wrap: nowrap; align-items: center; flex-shrink: 0; }
  .vc-pill {
    font-size: 0.62rem; font-family: 'DM Mono', monospace;
    padding: 2px 7px; border-radius: 100px;
    background: rgba(0,0,0,0.3); color: rgba(247,243,236,0.5); white-space: nowrap;
  }
  .vc-match {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em;
    padding: 2px 8px; border-radius: 100px; text-transform: uppercase; flex-shrink: 0;
  }
  .match-excellent { background: rgba(74,103,65,0.45); color: #8fcc7a; }
  .match-good      { background: rgba(107,58,110,0.35); color: var(--berry-light); }
  .match-marginal  { background: rgba(139,94,60,0.35); color: var(--earth-light); }
  .vc-toggle {
    flex-shrink: 0; width: 22px; height: 22px;
    border-radius: 50%; background: rgba(247,243,236,0.08);
    border: 1px solid rgba(247,243,236,0.14);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; color: rgba(247,243,236,0.45);
    transition: all 0.25s; cursor: pointer;
  }
  .variety-card.expanded .vc-toggle { transform: rotate(180deg); background: rgba(247,243,236,0.15); }

  /* expandable detail drawer */
  .vc-detail {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1),
                border-top-color 0.3s;
    border-top: 1px solid transparent;
  }
  .variety-card.expanded .vc-detail {
    max-height: 700px;
    border-top-color: rgba(247,243,236,0.07);
  }
  .vc-detail-inner { padding: 1rem 1.1rem 1.1rem; }
  .vc-desc { font-size: 0.77rem; color: rgba(247,243,236,0.52); line-height: 1.6; margin-bottom: 0.9rem; }
  .vc-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 0.8rem; }
  .vc-spec { background: rgba(0,0,0,0.22); border-radius: 7px; padding: 6px 9px; }
  .vc-spec-label { font-size: 0.58rem; color: rgba(247,243,236,0.35); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
  .vc-spec-val { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--earth-light); font-weight: 500; }
  .vc-spec-val.sv-good { color: #8fcc7a; }
  .vc-spec-val.sv-mid  { color: var(--earth-light); }
  .vc-harvest-row { font-size: 0.76rem; color: rgba(247,243,236,0.5); display: flex; gap: 6px; align-items: center; padding-top: 0.6rem; border-top: 1px solid rgba(247,243,236,0.07); }
  .vc-harvest-row strong { color: var(--cream); }
  .vc-source { font-size: 0.62rem; font-family: 'DM Mono', monospace; color: rgba(247,243,236,0.25); margin-top: 0.5rem; }

  /* locked cards */
  .varieties-grid > div[style*="margin-bottom:1rem"] {
    grid-column: 1 / -1;
  }
  .variety-card.locked .vc-name { -webkit-filter: blur(5px); filter: blur(5px); user-select: none; pointer-events: none; }
  .variety-card.locked .vc-type { opacity: 0.4; }
  .variety-card.locked .vc-toggle { display: none; }
  .vc-lock-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 0 1.1rem 0.85rem; flex-wrap: wrap;
  }
  .vc-lock-text { font-size: 0.72rem; color: rgba(247,243,236,0.4); }
  .vc-lock-btn {
    font-size: 0.72rem; font-weight: 600; padding: 5px 14px;
    border-radius: 100px; background: var(--berry);
    color: var(--cream); border: none; cursor: pointer;
    transition: background 0.18s; white-space: nowrap;
  }
  .vc-lock-btn:hover { background: var(--berry-light); }

  #varieties-placeholder {
    text-align: center; padding: 3rem;
    color: rgba(247,243,236,0.4); font-size: 0.9rem; line-height: 1.8;
  }

  /* ─── HOW IT WORKS ─── */
  #how {
    padding: 5rem 2.5rem;
    max-width: 1300px; margin: 0 auto;
  }
  .steps {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem;
    margin-top: 3rem;
  }
  .step {
    padding: 2rem; border-radius: 16px;
    background: var(--white); border: 1px solid var(--cream-dark);
    position: relative;
  }
  .step-num {
    font-family: 'DM Serif Display', serif; font-size: 3.5rem;
    color: var(--cream-dark); position: absolute; top: 1rem; right: 1.5rem;
    line-height: 1; pointer-events: none;
  }
  .step-icon { font-size: 2rem; margin-bottom: 1rem; }
  .step h3 {
    font-family: 'DM Serif Display', serif; font-size: 1.15rem;
    color: var(--ink); margin-bottom: 0.5rem;
  }
  .step p { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; }

  /* ─── DYNAMIC MODEL EXPLAINER ─── */
  #science {
    background: var(--sage-pale); padding: 5rem 2.5rem;
    border-top: 1px solid rgba(74,103,65,0.15);
    border-bottom: 1px solid rgba(74,103,65,0.15);
  }
  .science-inner { max-width: 1300px; margin: 0 auto; }
  .science-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-top: 2.5rem; }
  .science-text p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.8; margin-bottom: 1rem; }
  .science-text strong { color: var(--ink); }
  .formula-box {
    background: var(--white); border-radius: 14px; padding: 1.5rem;
    border: 1px solid rgba(74,103,65,0.2); font-family: 'DM Mono', monospace;
    font-size: 0.78rem; color: var(--ink-mid); line-height: 2;
  }
  .formula-box .comment { color: var(--sage); }
  .formula-box .kw { color: var(--berry); }
  .formula-box .val { color: var(--earth); }

  /* ─── FOOTER ─── */
  footer {
    background: var(--ink); padding: 3rem 2.5rem;
    text-align: center; color: rgba(247,243,236,0.4);
    font-size: 0.82rem;
  }
  footer a { color: var(--sage-light); text-decoration: none; }
  .footer-logo {
    font-family: 'DM Serif Display', serif; font-size: 1.6rem;
    color: var(--cream); margin-bottom: 0.5rem;
  }
  .footer-logo span { color: var(--earth-light); font-style: italic; }

  /* ─── PAYWALL STYLES ─── */
  .variety-card.locked {
    position: relative; cursor: pointer;
    filter: blur(0);
    transition: all 0.2s;
  }
  .variety-card.locked:hover { transform: translateY(-2px); border-color: rgba(247,243,236,0.25); }
  .variety-card-inner { position: relative; }
  .variety-lock-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(26,31,21,0.05) 0%, rgba(26,31,21,0.85) 45%);
    border-radius: 13px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    padding: 1.2rem;
    z-index: 2;
  }
  .variety-lock-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
  .variety-lock-text { font-size: 0.78rem; color: rgba(247,243,236,0.85); text-align: center; line-height: 1.4; margin-bottom: 0.75rem; }
  .variety-unlock-btn {
    background: var(--earth-light); color: var(--white);
    border: none; border-radius: 100px; padding: 8px 18px;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    font-family: 'Instrument Sans', sans-serif;
    letter-spacing: 0.03em; transition: background 0.2s;
    width: 100%;
  }
  .variety-unlock-btn:hover { background: var(--earth); }
  .variety-card-blurred-content { filter: blur(5px); pointer-events: none; user-select: none; }

  /* Variety detail rows */
  .variety-specs { margin-top: 0.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .variety-spec { font-size: 0.72rem; color: rgba(247,243,236,0.55); }
  .variety-spec strong { color: rgba(247,243,236,0.85); display: block; font-size: 0.7rem; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 1px; }

  /* ─── PAYWALL MODAL ─── */
  .paywall-overlay {
    display: none; position: fixed; inset: 0; z-index: 9000;
    background: rgba(26,31,21,0.7); backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
  }
  .paywall-overlay.active { display: flex; }
  .paywall-modal {
    background: var(--cream); border-radius: 20px; padding: 2.5rem;
    max-width: 440px; width: 90%; position: relative;
    box-shadow: 0 24px 80px rgba(26,31,21,0.25);
  }
  .paywall-close {
    position: absolute; top: 1rem; right: 1rem; background: none;
    border: none; font-size: 1.3rem; cursor: pointer; color: var(--ink-soft);
    line-height: 1; padding: 4px 8px; border-radius: 6px;
    transition: background 0.15s;
  }
  .paywall-close:hover { background: var(--cream-dark); }
  .paywall-icon { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; }
  .paywall-title {
    font-family: 'DM Serif Display', serif; font-size: 1.6rem;
    color: var(--ink); text-align: center; margin-bottom: 0.5rem; line-height: 1.2;
  }
  .paywall-sub { font-size: 0.88rem; color: var(--ink-soft); text-align: center; line-height: 1.6; margin-bottom: 1.5rem; }
  .paywall-features { list-style: none; margin-bottom: 1.5rem; }
  .paywall-features li {
    font-size: 0.84rem; color: var(--ink-mid); padding: 6px 0;
    border-bottom: 1px solid var(--cream-dark); display: flex; align-items: center; gap: 8px;
  }
  .paywall-features li:last-child { border-bottom: none; }
  .paywall-feature-icon { color: var(--sage); font-size: 1rem; }
  .paywall-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 1.25rem; }
  .paywall-plan {
    border: 2px solid var(--cream-dark); border-radius: 12px; padding: 14px 12px;
    text-align: center; cursor: pointer; transition: all 0.18s; position: relative;
  }
  .paywall-plan:hover { border-color: var(--sage); background: var(--sage-pale); }
  .paywall-plan.selected { border-color: var(--sage); background: var(--sage-pale); }
  .paywall-plan-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: var(--sage); color: var(--white); font-size: 0.65rem;
    font-weight: 700; letter-spacing: 0.06em; padding: 2px 10px; border-radius: 100px;
    text-transform: uppercase; white-space: nowrap;
  }
  .paywall-plan-name { font-weight: 600; font-size: 0.85rem; color: var(--ink); margin-bottom: 4px; }
  .paywall-plan-price { font-family: 'DM Serif Display', serif; font-size: 1.5rem; color: var(--sage); }
  .paywall-plan-period { font-size: 0.72rem; color: var(--ink-soft); }
  .paywall-cta {
    width: 100%; background: var(--ink); color: var(--cream);
    border: none; border-radius: 100px; padding: 14px;
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    font-family: 'Instrument Sans', sans-serif;
    transition: background 0.2s; margin-bottom: 0.75rem;
  }
  .paywall-cta:hover { background: var(--sage); }
  .paywall-or { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.75rem; }
  .paywall-signin {
    width: 100%; background: transparent; color: var(--ink);
    border: 1.5px solid var(--cream-dark); border-radius: 100px; padding: 12px;
    font-size: 0.88rem; font-weight: 500; cursor: pointer;
    font-family: 'Instrument Sans', sans-serif; transition: all 0.2s;
  }
  .paywall-signin:hover { border-color: var(--sage); color: var(--sage); }
  .paywall-legal { font-size: 0.72rem; color: var(--ink-soft); text-align: center; margin-top: 0.75rem; line-height: 1.5; }
  .spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid var(--cream-dark); border-top-color: var(--sage);
    border-radius: 50%; animation: spin 0.8s linear infinite;
    vertical-align: middle; margin-right: 6px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ─── HAMBURGER MENU ─── */
  .nav-hamburger {
    display: none; flex-direction: column; justify-content: center;
    gap: 5px; width: 36px; height: 36px; cursor: pointer;
    background: none; border: none; padding: 4px; border-radius: 6px;
    transition: background 0.2s;
  }
  .nav-hamburger:hover { background: var(--cream-dark); }
  .nav-hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--ink); border-radius: 2px;
    transition: all 0.25s;
  }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .mobile-menu {
    display: none; position: fixed; top: 60px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--cream-dark);
    z-index: 999; padding: 1rem 1.5rem 1.5rem;
    box-shadow: 0 8px 24px rgba(26,31,21,0.12);
  }
  .mobile-menu.open { display: block; }
  .mobile-menu a {
    display: block; padding: 12px 0;
    font-size: 1rem; font-weight: 500; color: var(--ink);
    text-decoration: none; border-bottom: 1px solid var(--cream-dark);
    transition: color 0.2s;
  }
  .mobile-menu a:last-child { border-bottom: none; }
  .mobile-menu a:hover { color: var(--sage); }
  .mobile-menu-cta {
    display: block; margin-top: 1rem;
    background: var(--sage); color: var(--white) !important;
    border: none !important; border-radius: 100px !important;
    text-align: center; padding: 12px !important;
    font-weight: 600 !important;
  }

  /* ─── RESPONSIVE — Tablet ─── */
  @media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-left::after { display: none; }
    .hero-right { min-height: 260px; }
    .tool-layout { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .science-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-stats { gap: 1.5rem; }
    #tool { padding: 3rem 2rem; }
  }

  /* ─── RESPONSIVE — Mobile ─── */
  @media (max-width: 640px) {
    /* Nav */
    nav { padding: 0 1.1rem; }
    .nav-links { display: none; }
    .nav-pill  { display: none; }
    .nav-hamburger { display: flex; }

    /* Hero */
    .hero { grid-template-columns: 1fr; }
    .hero-left { padding: 2.5rem 1.25rem 2rem; }
    .hero-title { font-size: 2.2rem; margin-bottom: 1rem; }
    .hero-sub { font-size: 0.92rem; margin-bottom: 1.75rem; }
    .hero-right { min-height: 220px; order: -1; }
    .hero-badge { top: 1rem; right: 1rem; padding: 10px 14px; font-size: 0.72rem; }
    .hero-badge strong { font-size: 1rem; }
    .hero-stats { gap: 1.25rem; margin-top: 2rem; padding-top: 1.5rem; flex-wrap: wrap; }
    .hero-stat-val { font-size: 1.6rem; }

    /* Sections */
    #tool { padding: 2.5rem 1.1rem; }
    #how  { padding: 2.5rem 1.1rem; }
    #science { padding: 2.5rem 1.1rem; }
    #varieties { padding: 2.5rem 1.1rem; }
    #site-analysis-section { padding: 2.5rem 1.1rem; }
    #production-section { padding: 2.5rem 1.1rem; }

    /* Section titles */
    .section-title { font-size: 1.6rem; }

    /* Map */
    #map { height: 280px; }

    /* Steps */
    .steps { grid-template-columns: 1fr; gap: 1rem; }
    .step { padding: 1.25rem; }
    .step-num { font-size: 2.5rem; }

    /* Metrics grid */
    .metrics { grid-template-columns: 1fr 1fr; }

    /* Varieties grid */
    .varieties-grid { grid-template-columns: 1fr; }
    .vc-pills { display: none; }
    .vc-specs-grid { grid-template-columns: 1fr 1fr; }

    /* Model options */
    .model-opt { padding: 9px 10px; }
    .model-opt-title { font-size: 0.82rem; }
    .model-opt-desc  { font-size: 0.72rem; }

    /* Controls + results card */
    .controls-card { padding: 1.1rem; }
    .results-card  { padding: 1.1rem; }

    /* Chart card */
    #chart-card { padding: 1rem; }

    /* Science formula */
    .formula-box { font-size: 0.68rem; overflow-x: auto; }

    /* Paywall modal */
    .paywall-modal { padding: 1.5rem; }
    .paywall-plans { grid-template-columns: 1fr; }

    /* Production section tables */
    #production-info-content table { font-size: 0.65rem; }
    #production-info-content table td,
    #production-info-content table th { padding: 5px 6px; }

    /* Cost/profit 2-col grid → 1 col */
    #production-info-content > div > div[style*="grid-template-columns:1fr 1fr"] {
      display: block !important;
    }

    /* Site analysis zone badge */
    #site-analysis-zone > div { flex-direction: column; }

    /* Footer */
    footer { padding: 2rem 1.25rem; font-size: 0.76rem; }
  }

  /* ─── RESPONSIVE — Small mobile ─── */
  @media (max-width: 380px) {
    .hero-title { font-size: 1.9rem; }
    #map { height: 240px; }
    .vc-header { gap: 7px; padding: 0.75rem 0.9rem; }
    .metrics { grid-template-columns: 1fr; }
  }
  /* ─── TIER BADGES ─── */
  .tier-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; padding: 3px 10px; border-radius: 100px;
    font-family: 'DM Mono', monospace;
  }
  .tier-free    { background: rgba(107,116,99,0.18); color: rgba(247,243,236,0.55); border: 1px solid rgba(107,116,99,0.3); }
  .tier-basic   { background: rgba(52,152,219,0.18); color: #74b9d4;                border: 1px solid rgba(52,152,219,0.35); }
  .tier-pro     { background: rgba(196,149,106,0.22); color: var(--earth-light);   border: 1px solid rgba(196,149,106,0.45); }
  .tier-locked  { opacity: 0.45; cursor: pointer; }

  /* ─── SAVED SITES PANEL ─── */
  #saved-sites-bar {
    background: var(--ink); border-top: 1px solid rgba(247,243,236,0.08);
    padding: 0.75rem 0;
  }
  .saved-sites-inner {
    max-width: 1300px; margin: 0 auto; padding: 0 2.5rem;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .saved-site-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(247,243,236,0.07); border: 1px solid rgba(247,243,236,0.14);
    border-radius: 100px; padding: 5px 12px; cursor: pointer;
    font-size: 0.75rem; color: rgba(247,243,236,0.7);
    font-family: 'DM Mono', monospace; transition: all 0.18s;
    max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .saved-site-chip:hover { background: rgba(247,243,236,0.13); border-color: rgba(247,243,236,0.25); }
  .saved-site-chip .del-btn {
    flex-shrink: 0; font-size: 0.7rem; opacity: 0.45; transition: opacity 0.15s;
    background: none; border: none; color: inherit; cursor: pointer; padding: 0;
  }
  .saved-site-chip .del-btn:hover { opacity: 1; }
  .save-site-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(74,103,65,0.25); border: 1px solid rgba(74,103,65,0.45);
    border-radius: 100px; padding: 5px 14px; cursor: pointer;
    font-size: 0.75rem; color: var(--sage-light);
    font-family: 'Instrument Sans', sans-serif; font-weight: 600;
    transition: all 0.18s; white-space: nowrap;
  }
  .save-site-btn:hover { background: rgba(74,103,65,0.4); }
  .compare-btn {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(107,58,110,0.25); border: 1px solid rgba(107,58,110,0.45);
    border-radius: 100px; padding: 5px 14px; cursor: pointer;
    font-size: 0.75rem; color: var(--berry-light);
    font-family: 'Instrument Sans', sans-serif; font-weight: 600;
    transition: all 0.18s; white-space: nowrap;
  }
  .compare-btn:hover { background: rgba(107,58,110,0.4); }

  /* ─── COMPARE MODAL ─── */
  #compare-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,31,21,0.9); z-index: 8500;
    align-items: flex-start; justify-content: center;
    padding: 1rem; overflow-y: auto;
  }
  .compare-modal {
    background: var(--ink); border: 1px solid rgba(247,243,236,0.1);
    border-radius: 20px; width: 100%; max-width: 1100px;
    margin: auto; box-shadow: 0 24px 64px rgba(0,0,0,0.4);
    overflow: hidden;
  }
  .compare-header {
    padding: 1.25rem 1.75rem; border-bottom: 1px solid rgba(247,243,236,0.08);
    display: flex; align-items: center; justify-content: space-between;
  }

  /* ─── PRICING MODAL ─── */
  #pricing-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,31,21,0.88); z-index: 9500;
    align-items: center; justify-content: center; padding: 1rem; overflow-y: auto;
  }
  .pricing-modal {
    background: var(--cream); border-radius: 24px;
    width: 100%; max-width: 860px; margin: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,0.35); overflow: hidden;
  }
  .pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  }
  .pricing-col {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--cream-dark);
  }
  .pricing-col:last-child { border-right: none; }
  .pricing-col.highlighted {
    background: var(--ink); color: var(--cream);
  }
  .pricing-tier-name { font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem; }
  .pricing-price { font-family: 'DM Serif Display', serif; font-size: 2.2rem; line-height: 1; margin-bottom: 0.25rem; }
  .pricing-period { font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 1.25rem; }
  .pricing-highlighted-period { font-size: 0.75rem; color: rgba(247,243,236,0.55); margin-bottom: 1.25rem; }
  .pricing-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }
  .pricing-features li { font-size: 0.78rem; padding: 5px 0; border-bottom: 1px solid var(--cream-dark); display: flex; gap: 8px; align-items: flex-start; }
  .pricing-features.dark li { border-bottom-color: rgba(247,243,236,0.07); color: rgba(247,243,236,0.75); }
  .pricing-cta {
    width: 100%; padding: 11px; border-radius: 10px; font-size: 0.9rem; font-weight: 600;
    font-family: 'Instrument Sans', sans-serif; cursor: pointer; border: none; transition: all 0.18s;
  }
  .pricing-cta-free    { background: var(--cream-dark); color: var(--ink); }
  .pricing-cta-basic   { background: #3498db; color: #fff; }
  .pricing-cta-pro     { background: var(--earth-light); color: #fff; }
  .pricing-cta-free:hover  { background: #d5cfc6; }
  .pricing-cta-basic:hover { background: #2980b9; }
  .pricing-cta-pro:hover   { background: var(--earth); }

  @media (max-width: 640px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-col  { border-right: none; border-bottom: 1px solid var(--cream-dark); }
    .pricing-col:last-child { border-bottom: none; }
    .compare-modal { border-radius: 14px; }
  }