/* =====================================================================
   ASVA shared stylesheet
   ---------------------------------------------------------------------
   This single file is linked (identically) on every page. Because the
   <head> is then the same everywhere, Turbo Drive has no per-page
   <style> block to leak across navigations.

   GLOBAL rules (reset, theme vars, site nav) are defined once below.
   Every PAGE-SPECIFIC rule is scoped under a unique `body.page-*` class
   so the same class/element name can never collide between pages.
   When adding a new page: give its <body> a unique `page-xxx` class and
   wrap that page's rules in `body.page-xxx { … }`.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600;700&display=swap');

/* ===================== GLOBAL — identical on every page ===================== */
:root{ --ink:#222; --muted:#666; --bg:#f6f6f6; --panel:#fff; --line:#e8e8e8; }
*, *::before, *::after{ box-sizing:border-box; margin:0; padding:0; }
html{ overflow-y:scroll; }
body{ font-family:'DM Sans',system-ui,-apple-system,sans-serif; background:var(--bg); color:var(--ink); min-height:100vh; }

/* ── Site nav (shared, persistent via data-turbo-permanent) ── */
.sitenav{
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:10px 24px;
  display:flex;
  align-items:center;
  gap:20px;
  position:sticky;
  top:0;
  z-index:100;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
}
.sitenav-logo{ height:36px; width:auto; display:block; }
.sitenav-logo-text{ font-weight:900; font-size:20px; }
.sitenav-links{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:13px;
  font-weight:600;
  flex-wrap:wrap;
}
.sitenav-links a{
  color:var(--ink);
  text-decoration:none;
  padding:5px 8px;
  border-radius:6px;
  transition:background .15s;
  white-space:nowrap;
}
.sitenav-links a:hover, .sitenav-links a.active{ background:#CC1133; color:#fff !important; }
.sitenav-sep{ color:#ccc; font-weight:400; }
@media(max-width:700px){
  .sitenav{ flex-wrap:wrap; padding:10px 14px; }
  .sitenav-links{ justify-content:flex-start; font-size:12px; }
}

/* Global keyframes (animation names are global scope) */
@keyframes spin{ to{ transform:rotate(360deg); } }


/* ===================== SCORECARD — index.html (body.page-scorecard) ===================== */
body.page-scorecard{
  --A:#2D5A3D; --B:#4CAF73; --C:#A8D5B0; --Q:#cccccc; --D:#F2A0A0; --E:#D94040; --F:#8B1A1A;

  /* ── Search bar ── */
  .toprow{
    position:sticky;
    top:58px;
    z-index:10;
    background:rgba(246,246,246,.92);
    backdrop-filter:blur(6px);
    padding:32px 14px 14px;
  }
  .bar{
    max-width:calc(900px - 28px);
    margin:0 auto;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:14px;
    padding:10px 16px;
    display:flex;
    align-items:center;
    gap:10px;
    box-shadow:0 6px 18px rgba(0,0,0,.06);
    flex-wrap:wrap;
  }
  .bar label{ font-size:12px; color:var(--muted); margin-right:4px; white-space:nowrap; }
  .search-wrapper{ position:relative; flex:1; }
  input[type="text"]{
    width:100%;
    padding:8px 30px 8px 10px;
    border:1px solid #ddd;
    border-radius:12px;
    font-size:14px;
    font-family:inherit;
    background:#fff;
    color:var(--ink);
  }
  input[type="text"]:focus{ outline:none; border-color:var(--A); box-shadow:0 0 0 3px rgba(46,204,113,.15); }
  .clear-btn{
    position:absolute; right:8px; top:50%; transform:translateY(-50%);
    background:#ddd; border:none; border-radius:50%;
    width:20px; height:20px;
    display:none; align-items:center; justify-content:center;
    cursor:pointer; font-size:14px; color:#666; padding:0;
  }
  .clear-btn:hover{ background:#ccc; }
  .clear-btn.visible{ display:flex; }
  #constituencyDropdown{
    display:none; position:absolute; top:100%; left:0; right:0;
    background:#fff; border:1px solid #ddd; border-radius:8px;
    max-height:300px; overflow-y:auto; margin-top:4px;
    box-shadow:0 4px 12px rgba(0,0,0,.15); z-index:100;
  }
  .dropdown-item{ padding:10px 12px; cursor:pointer; font-size:14px; border-bottom:1px solid #f0f0f0; }
  .dropdown-item:hover{ background:#f8f9fa; }
  .dropdown-item:last-child{ border-bottom:none; }
  .dropdown-item.selected{ background:#e7f3ff; font-weight:600; }
  .badge{
    display:inline-block; padding:5px 10px;
    border:1px solid #e5e5e5; border-radius:999px;
    background:#fff; font-weight:650; font-size:12px;
    color:var(--muted); white-space:nowrap; margin-left:auto;
  }

  /* ── Scorecard sheet ── */
  .app{ max-width:900px; margin:0 auto 40px; padding:0 14px; }
  .sheetWrap{
    margin-top:0;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:16px;
    padding:14px;
    box-shadow:0 6px 18px rgba(0,0,0,.06);
  }
  .sheet{ background:#fff; border:1px solid #eee; border-radius:14px; padding:18px; }
  .header{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
  .titleBlock{ display:flex; flex-direction:column; gap:4px; min-width:0; }
  .constituency{ font-size:26px; font-weight:800; text-decoration:underline; line-height:1.05; word-break:break-word; }
  .subtitle{ font-size:14px; color:var(--muted); font-weight:600; }
  .logo img{ height:56px; width:auto; display:block; object-fit:contain; }
  .logoFallback{ font-weight:900; font-size:22px; letter-spacing:.5px; }

  /* ── Candidate cards ── */
  .cards{ margin-top:6px; }
  .card{
    border-radius:16px;
    border:2px solid #d9d9d9;
    overflow:hidden;
    margin-bottom:12px;
    background:#fafafa;
    cursor:pointer;
    transition:box-shadow .15s;
  }
  .card:hover{ box-shadow:0 4px 14px rgba(0,0,0,.1); }
  .card.grade-q{ border-style:dashed !important; border-color:#bbb !important; }
  .mp-badge-cell{
    width:120px; text-align:center; padding:10px 8px;
    background:#fff; border-left:1px solid #eee;
    color:#1a1a2e; font-weight:700; font-size:12px;
    vertical-align:middle;
  }
  .mp-badge-cell svg{ display:block; margin:0 auto 4px; }
  .card-summary{ display:table; width:100%; border-collapse:collapse; }
  .cell{ display:table-cell; vertical-align:middle; }
  .leftStrip{ width:72px; text-align:center; padding:10px 0; }
  .pill{
    width:50px; height:50px; border-radius:25px;
    display:inline-flex; align-items:center; justify-content:center;
    font-size:20px; font-weight:900; color:#fff;
  }
  .middle{ padding:12px 16px; background:#fff; }
  .name{ font-size:16px; font-weight:800; margin-bottom:6px; }
  ul{ margin:0; padding-left:18px; font-size:14px; line-height:1.3; }
  li{ margin:0 0 4px 0; }
  .right{
    width:160px; text-align:center; padding:10px 12px;
    background:#fff; border-left:1px solid #eee; font-weight:700; font-size:14px;
  }
  .chevron{ font-size:11px; color:var(--muted); margin-top:6px; display:block; transition:transform .2s; }
  .card.open .chevron{ transform:rotate(180deg); }

  /* ── Expanded section ── */
  .card-expanded{
    display:none;
    padding:16px 20px;
    background:#fff;
    border-top:1px solid #eee;
  }
  .card.open .card-expanded{ display:block; }
  .expanded-meta{
    font-size:12px; color:var(--muted); margin-bottom:12px;
    display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px;
  }
  .evidence-list{ margin:0 0 14px; padding-left:18px; }
  .evidence-list li{ font-size:13px; line-height:1.6; margin-bottom:8px; }
  .evidence-list a{ color:#1a73e8; text-decoration:underline; }
  .suggest-link{
    display:inline-block; font-size:12px; color:var(--muted);
    border:1px solid #ddd; border-radius:8px; padding:6px 12px;
    text-decoration:none; transition:background .15s, color .15s;
  }
  .suggest-link:hover{ background:var(--ink); color:#fff; border-color:var(--ink); }

  /* ── States ── */
  .empty{ padding:18px; color:var(--muted); border:1px dashed #ddd; border-radius:12px; background:#fcfcfc; font-size:14px; }
  .loading{ padding:18px; color:var(--muted); text-align:center; font-size:14px; }
  .error{ padding:18px; color:#e74c3c; border:1px solid #e74c3c; border-radius:12px; background:#fef5f5; font-size:14px; }

  @media(max-width:600px){
    .right{ width:110px; font-size:12px; }
    .leftStrip{ width:60px; }
    .pill{ width:44px; height:44px; border-radius:22px; font-size:18px; }
    .constituency{ font-size:20px; }
  }
}


/* ===================== SIGN THE PLEDGE — pledge.html (body.page-pledge) ===================== */
body.page-pledge{
  --A:#2D5A3D; --B:#4CAF73; --C:#A8D5B0; --Q:#282120; --D:#F1C40F; --E:#F39C12; --F:#E4352F;
  --accent:#CC1133; --accent-dark:#a50f27;

  /* ── Layout ── */
  .app{ max-width:900px; margin:32px auto 60px; padding:0 14px; }

  /* ── Hero ── */
  .hero{
    background:var(--panel); border:1px solid var(--line); border-radius:16px;
    padding:28px 24px 22px; box-shadow:0 6px 18px rgba(0,0,0,.06); margin-bottom:14px;
    display:grid; grid-template-columns:1fr 2fr; align-items:center; column-gap:0;
  }
  .hero-text h1{ font-family:'DM Serif Display',serif; font-size:34px; font-weight:400; line-height:1.1; margin-bottom:8px; }
  .hero-text p{ font-size:16px; color:var(--muted); line-height:1.6; padding-right:16px; }
  .hero-logo{ display:flex; align-items:center; justify-content:center; }
  .hero-logo img{ height:190px; width:auto; object-fit:contain; display:block; }
  .hero-logo-fallback{ font-family:'DM Serif Display',serif; font-size:20px; flex-shrink:0; }

  /* ── Pledge card ── */
  .pledge-card{ background:var(--panel); border:2px solid var(--accent); border-radius:26px; overflow:hidden; margin-bottom:14px; box-shadow:0 6px 18px rgba(0,0,0,.06); }
  .pledge-header{ background:var(--accent); padding:16px 22px; display:flex; align-items:center; gap:14px; }
  .pledge-header-text{ color:#fff; }
  .pledge-header-text h2{ font-family:'DM Serif Display',serif; font-size:28px; font-weight:400; }
  .pledge-header-text p{ font-size:22px; opacity:.85; margin-top:2px; }
  .pledge-body{ padding:20px 22px; }
  .pledge-agree{ display:flex; align-items:flex-start; gap:14px; padding:16px 18px; background:#fff5f5; border:2px solid #f0b8c0; border-radius:14px; cursor:pointer; transition:background .15s; }
  .pledge-agree:has(input:checked){ background:#fce4e4; border-color:var(--accent-dark); }
  .pledge-agree input[type="checkbox"]{ width:22px; height:22px; accent-color:var(--accent-dark); flex-shrink:0; margin-top:2px; cursor:pointer; }
  .pledge-agree-label{ font-size:15px; font-weight:700; color:var(--ink); line-height:1.4; }
  .pledge-agree-label span{ display:block; font-weight:400; font-size:13px; color:var(--muted); margin-top:4px; }

  /* ── Form card ── */
  .form-card{ background:var(--panel); border:1px solid var(--line); border-radius:26px; overflow:hidden; margin-bottom:14px; box-shadow:0 6px 18px rgba(0,0,0,.06); }
  .form-section{ padding:20px 22px; border-bottom:1px solid var(--line); }
  .form-section:last-child{ border-bottom:none; }
  .section-label{ font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:14px; }

  /* ── Fields ── */
  .field{ margin-bottom:14px; }
  .field:last-child{ margin-bottom:0; }
  .field label{ display:block; font-size:15px; font-weight:600; color:var(--ink); margin-bottom:6px; }
  .field label .req{ color:var(--F); margin-left:2px; }
  .field label .hint{ font-weight:400; color:var(--muted); font-size:12px; margin-left:4px; }
  .field input[type="text"], .field input[type="email"]{
    width:100%; padding:10px 14px; border:1px solid #ddd; border-radius:12px;
    font-size:15px; font-family:inherit; background:#fff; color:var(--ink);
    transition:border-color .15s, box-shadow .15s; outline:none;
  }
  .field input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px rgba(46,204,113,.15); }
  .field input.error{ border-color:var(--F); box-shadow:0 0 0 3px rgba(228,53,47,.1); }
  .field-row{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  @media(max-width:520px){ .field-row{ grid-template-columns:1fr; } }

  .postcode-wrap{ display:flex; gap:8px; align-items:flex-start; }
  .postcode-wrap input{ flex:1; text-transform:uppercase; }
  .lookup-btn{ padding:10px 14px; background:var(--ink); color:#fff; border:none; border-radius:12px; font-size:13px; font-weight:600; font-family:inherit; cursor:pointer; white-space:nowrap; transition:background .15s; flex-shrink:0; }
  .lookup-btn:hover{ background:#444; }
  .lookup-btn:disabled{ background:#aaa; cursor:not-allowed; }
  .constituency-detected{ margin-top:8px; padding:8px 12px; background:#fff5f5; border:1px solid #f0b8c0; border-radius:10px; font-size:13px; color:#a50f27; font-weight:600; display:none; align-items:center; gap:6px; }
  .constituency-detected.show{ display:flex; }

  /* ── Radio cards ── */
  .radio-group{ display:flex; flex-direction:column; gap:8px; }
  .radio-card{ display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border:2px solid var(--line); border-radius:14px; cursor:pointer; transition:border-color .15s, background .15s; }
  .radio-card:hover{ background:#fff5f5; border-color:#e8a0a8; }
  .radio-card:has(input:checked){ border-color:var(--accent); background:#fce4e4; }
  .radio-card input[type="radio"]{ width:18px; height:18px; accent-color:var(--accent-dark); flex-shrink:0; cursor:pointer; margin-top:2px; }
  .radio-card-text{ flex:1; }
  .radio-card-title{ font-size:16px; font-weight:700; margin-bottom:4px; }
  .radio-card-desc{ font-size:25px; color:var(--muted); line-height:1.6; }
  .radio-card-badge{ font-size:11px; font-weight:700; padding:3px 8px; border-radius:999px; background:var(--accent); color:#fff; flex-shrink:0; margin-top:2px; }

  /* ── Privacy checkbox ── */
  .privacy-label{ display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border:2px solid var(--line); border-radius:14px; cursor:pointer; transition:border-color .15s, background .15s; }
  .privacy-label:has(input:checked){ border-color:var(--accent); background:#fff5f5; }
  .privacy-label input[type="checkbox"]{ width:18px; height:18px; accent-color:var(--accent-dark); flex-shrink:0; cursor:pointer; margin-top:2px; }
  .privacy-label-text{ font-size:14px; line-height:1.5; }
  .privacy-label-text a{ color:var(--accent-dark); font-weight:600; }
  .privacy-label-text a:hover{ text-decoration:underline; }

  /* ── Buttons ── */
  .btn-row{ display:flex; gap:10px; flex-wrap:wrap; }
  .btn-primary{ flex:1; min-width:160px; padding:14px 20px; background:var(--accent); color:#fff; border:none; border-radius:14px; font-size:15px; font-weight:700; font-family:inherit; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:background .15s, transform .1s; }
  .btn-primary:hover{ background:var(--accent-dark); transform:translateY(-1px); }
  .btn-primary:active{ transform:translateY(0); }
  .btn-primary:disabled{ background:#aaa; cursor:not-allowed; transform:none; }
  .btn-secondary{ flex:1; min-width:160px; padding:14px 20px; background:var(--ink); color:#fff; border:none; border-radius:14px; font-size:15px; font-weight:700; font-family:inherit; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; transition:background .15s, transform .1s; }
  .btn-secondary:hover{ background:#444; transform:translateY(-1px); }
  .btn-secondary:active{ transform:translateY(0); }
  .btn-secondary:disabled{ background:#aaa; cursor:not-allowed; transform:none; }

  /* ── Validation / Toast / Spinner / Success ── */
  .field-error{ font-size:12px; color:var(--F); margin-top:4px; display:none; }
  .field-error.show{ display:block; }
  .toast{ position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px); background:var(--ink); color:#fff; padding:14px 22px; border-radius:14px; font-size:14px; font-weight:600; box-shadow:0 8px 24px rgba(0,0,0,.2); z-index:999; transition:transform .3s cubic-bezier(.34,1.56,.64,1); white-space:nowrap; }
  .toast.show{ transform:translateX(-50%) translateY(0); }
  .toast.success{ background:var(--accent-dark); }
  .toast.error-toast{ background:var(--F); }
  .success-screen{ text-align:center; padding:48px 24px; }
  .success-icon{ font-size:56px; margin-bottom:16px; }
  .success-screen h2{ font-family:'DM Serif Display',serif; font-size:28px; font-weight:400; margin-bottom:10px; }
  .success-screen p{ font-size:15px; color:var(--muted); margin-bottom:24px; }
  .spinner{ width:16px; height:16px; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation:spin .6s linear infinite; display:none; }
  .spinner.show{ display:block; }

  @media(max-width:600px){
    .hero{ grid-template-columns:1fr; }
    .hero-logo{ order:-1; margin-bottom:12px; }
    .hero-text p{ padding-right:0; }
    .hero-text h1{ font-size:24px; }
    .btn-row{ flex-direction:column; }
  }

  /* ── Privacy modal ── */
  .modal-overlay{
    display:none; position:fixed; inset:0;
    background:rgba(0,0,0,.55); z-index:200;
    overflow-y:auto; padding:24px 16px;
  }
  .modal-overlay.show{ display:flex; align-items:flex-start; justify-content:center; }
  .modal-box{
    background:#fff; border-radius:16px;
    max-width:660px; width:100%; margin:auto;
    padding:36px 40px; position:relative;
    box-shadow:0 12px 40px rgba(0,0,0,.2);
  }
  .modal-close{
    position:absolute; top:14px; right:18px;
    background:none; border:none; font-size:22px;
    cursor:pointer; color:var(--muted); line-height:1;
  }
  .modal-close:hover{ color:var(--ink); }
  .modal-box h1{ font-family:'DM Serif Display',serif; font-size:24px; font-weight:400; margin-bottom:4px; }
  .modal-box .updated{ font-size:13px; color:var(--muted); margin-bottom:24px; display:block; }
  .modal-box h2{ font-size:14px; font-weight:700; margin:18px 0 6px; }
  .modal-box p{ font-size:13px; line-height:1.7; color:#333; margin-bottom:8px; }
  .modal-box ul{ font-size:13px; line-height:1.7; color:#333; padding-left:18px; margin-bottom:8px; }
  .modal-box li{ margin-bottom:3px; }
  .modal-accept-bar{
    margin-top:28px; padding-top:20px; border-top:1px solid var(--line);
    display:flex; align-items:center; justify-content:space-between;
    gap:14px; flex-wrap:wrap;
  }
  .modal-accept-bar p{ margin:0; font-size:13px; color:var(--muted); }
  .btn-accept{ padding:12px 24px; background:var(--accent); color:#fff; border:none; border-radius:12px; font-size:14px; font-weight:700; font-family:inherit; cursor:pointer; transition:background .15s; white-space:nowrap; }
  .btn-accept:hover{ background:var(--accent-dark); }
  @media(max-width:540px){ .modal-box{ padding:24px 18px; } }
}


/* ===================== CONSTITUENCY MAP — constituency-map.html (body.page-map) ===================== */
body.page-map{
  /* ── Page wrapper ── */
  .page-wrap{
    max-width:900px;
    margin:0 auto;
    padding:32px 14px 48px;
  }
  /* ── Header card ── */
  .page-header{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:16px;
    padding:24px 28px;
    box-shadow:0 6px 18px rgba(0,0,0,.06);
    margin-bottom:14px;
  }
  h1{
    font-family:'DM Serif Display',serif;
    font-size:28px;
    font-weight:400;
    margin-bottom:4px;
  }
  .subtitle{
    color:var(--muted);
    font-size:0.9rem;
    margin-bottom:18px;
  }

  /* ── Controls bar ── */
  .controls{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    margin-bottom:0;
  }
  .toggle-group{
    display:flex;
    border:1px solid #ccc;
    border-radius:6px;
    overflow:hidden;
  }
  .toggle-group button{
    border:none;
    background:#fff;
    padding:7px 16px;
    font-size:0.85rem;
    cursor:pointer;
    color:#444;
    transition:background .15s, color .15s;
  }
  .toggle-group button.active{
    background:#1a1a2e;
    color:#fff;
  }
  .toggle-group button:not(:last-child){
    border-right:1px solid #ccc;
  }
  #search-box{
    flex:1;
    min-width:180px;
    padding:7px 12px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:0.85rem;
  }
  #search-box:focus{ outline:none; border-color:#7c6af7; }

  /* ── Main layout: map + panel ── */
  .map-layout{
    display:flex;
    gap:16px;
    align-items:flex-start;
  }

  /* ── SVG map container ── */
  .map-container{
    flex:1;
    background:var(--panel);
    border-radius:16px;
    border:1px solid var(--line);
    box-shadow:0 6px 18px rgba(0,0,0,.06);
    overflow:hidden;
    position:relative;
  }
  #hex-svg{
    display:block;
    width:100%;
    height:auto;
  }
  #hex-svg polygon{
    cursor:pointer;
    stroke:#fff;
    stroke-width:0.8;
    transition:opacity .12s;
  }
  #hex-svg polygon:hover{ opacity:0.75; stroke-width:1.5; stroke:#fff; }
  #hex-svg polygon.highlighted{ stroke:#ffeb3b !important; stroke-width:2.5 !important; opacity:1 !important; }
  #hex-svg polygon.dimmed{ opacity:0.25; }

  /* ── Info panel ── */
  .info-panel{
    width:280px;
    flex-shrink:0;
  }
  .info-card{
    background:var(--panel);
    border-radius:16px;
    border:1px solid var(--line);
    box-shadow:0 6px 18px rgba(0,0,0,.06);
    padding:20px;
    min-height:200px;
  }
  .info-card .placeholder{
    color:#999;
    font-size:0.9rem;
    text-align:center;
    padding-top:40px;
  }
  .info-card h3{
    font-size:1.15rem;
    font-weight:700;
    margin-bottom:14px;
    color:#1a1a2e;
    line-height:1.3;
  }
  .info-row{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    margin-bottom:12px;
    font-size:1rem;
    gap:8px;
  }
  .info-label{ color:#444; flex-shrink:0; font-weight:600; }
  .info-value{ font-weight:700; text-align:right; }
  .party-dot{
    display:inline-block;
    width:10px;
    height:10px;
    border-radius:50%;
    margin-right:5px;
    vertical-align:middle;
  }
  .grade-badge{
    display:inline-block;
    padding:1px 8px;
    border-radius:4px;
    font-weight:700;
    font-size:0.85rem;
  }
  .info-card .scorecard-link{
    display:block;
    margin-top:14px;
    padding:7px 0;
    text-align:center;
    border:1px solid #7c6af7;
    border-radius:6px;
    color:#7c6af7;
    text-decoration:none;
    font-size:0.82rem;
    font-weight:600;
    transition:background .15s, color .15s;
  }
  .info-card .scorecard-link:hover{
    background:#7c6af7;
    color:#fff;
  }

  /* ── Legend ── */
  .legend{
    background:var(--panel);
    border-radius:16px;
    border:1px solid var(--line);
    box-shadow:0 6px 18px rgba(0,0,0,.06);
    padding:12px 16px;
    margin-bottom:14px;
    font-size:0.78rem;
    color:#555;
  }
  .legend-title{ font-weight:700; margin-bottom:3px; color:#1a1a2e; font-size:1.05rem; text-align:center; }
  .legend-subtitle{ font-size:0.78rem; color:#cc6600; font-style:italic; margin-bottom:12px; text-align:center; }
  .legend-subtitle-muted{ color:var(--muted); }
  .legend-items{ display:flex; flex-direction:column; gap:10px; }
  .legend-item{ display:flex; align-items:center; gap:10px; font-size:0.95rem; font-weight:600; color:#222; }
  .legend-separator{ border:none; border-top:1px solid #ccc; margin:2px 0; }
  .legend-info{ position:relative; margin-top:12px; text-align:center; }
  .legend-info-link{ font-size:0.8rem; text-decoration:underline; cursor:pointer; color:#1a6fc4; user-select:none; }
  .legend-info-popup{
    display:none; position:absolute; bottom:calc(100% + 6px); left:0;
    background:#111; color:#fff; border-radius:8px;
    padding:12px 14px; width:240px; font-size:0.78rem; line-height:1.6;
    box-shadow:0 4px 16px rgba(0,0,0,.35); z-index:50;
  }
  .legend-info-popup p{ margin-bottom:8px; }
  .legend-info-popup p:last-child{ margin-bottom:0; }
  .legend-info:hover .legend-info-popup,
  .legend-info-popup.show{ display:block; }

  /* ── Tooltip ── */
  #tooltip{
    position:fixed;
    background:rgba(20,20,40,0.92);
    color:#fff;
    padding:7px 11px;
    border-radius:7px;
    font-size:0.78rem;
    pointer-events:none;
    display:none;
    z-index:9999;
    max-width:200px;
    line-height:1.5;
  }
  #tooltip strong{ display:block; }

  /* ── Loading / error ── */
  .status-msg{
    text-align:center;
    color:#666;
    padding:60px 20px;
    font-size:0.9rem;
  }

  /* ── Responsive ── */
  @media(max-width:640px){
    .map-layout{ flex-direction:column; }
    .info-panel{ width:100%; }
  }
}


/* ===================== FOUNDING STATEMENT — founding-statement.html (body.page-founding) ===================== */
body.page-founding{
  /* ── Page layout ── */
  .page{ max-width:900px; margin:0 auto; padding:32px 14px 80px; }

  /* ── Hero (logo hard-coded in HTML with reserved height to avoid layout shift) ── */
  .fs-hero{ text-align:center; margin-bottom:48px; }
  .fs-hero-logo-link{ display:block; margin-bottom:24px; }
  .fs-hero-logo{ height:90px; width:auto; display:block; margin:0 auto; mix-blend-mode:multiply; }
  .fs-hero-logo-fallback{ font-weight:900; font-size:48px; }
  .fs-hero h1{ font-family:'DM Serif Display',serif; font-size:38px; font-weight:400; margin-bottom:8px; }
  .fs-hero .org{ font-size:18px; font-weight:600; color:var(--muted); }

  /* ── Charter content ── */
  .charter{ background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:48px 52px; box-shadow:0 6px 18px rgba(0,0,0,.06); }

  .charter h2{
    font-family:'DM Serif Display',serif;
    font-size:26px;
    font-weight:400;
    margin:40px 0 6px;
    padding-bottom:6px;
    border-bottom:2px solid var(--line);
  }
  .charter h2:first-child{ margin-top:0; }

  .charter h3{
    font-size:15px;
    font-weight:700;
    margin:24px 0 6px;
  }

  .charter p{
    font-size:15px;
    line-height:1.75;
    color:#333;
    margin-bottom:14px;
  }

  .charter ul{
    margin:0 0 16px 20px;
    padding:0;
  }
  .charter ul li{
    font-size:15px;
    line-height:1.7;
    color:#333;
    margin-bottom:6px;
  }

  .charter strong{ font-weight:700; }
  .charter em{ font-style:italic; }

  .closing-quote{
    background:#f8f8f8;
    border-left:4px solid #1a1a2e;
    border-radius:0 8px 8px 0;
    padding:20px 24px;
    margin:24px 0;
    font-size:15px;
    line-height:1.75;
    color:#333;
    font-style:italic;
  }

  .pledge-block{
    background:#f0f5ff;
    border:1px solid #c8d8f0;
    border-radius:10px;
    padding:20px 24px;
    margin:20px 0;
  }
  .pledge-block h4{
    font-size:14px;
    font-weight:700;
    margin-bottom:8px;
    color:#1a1a2e;
  }
  .pledge-block p{
    font-size:14px;
    line-height:1.7;
    font-style:italic;
    color:#333;
    margin:0 0 8px;
  }
  .pledge-block p:last-child{ margin-bottom:0; }

  .return-link{
    display:block;
    text-align:center;
    margin-top:40px;
    color:#1a1a2e;
    font-size:14px;
    font-weight:600;
    text-decoration:none;
  }
  .return-link:hover{ text-decoration:underline; }

  @media(max-width:600px){
    .charter{ padding:28px 20px; }
    .fs-hero h1{ font-size:28px; }
  }
}


/* ===================== ABOUT US — about.html (body.page-about) ===================== */
body.page-about{
  .app{ max-width:900px; margin:32px auto 60px; padding:0 14px; text-align:center; }
  .coming-soon{ background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:60px 40px; box-shadow:0 6px 18px rgba(0,0,0,.06); }
  .coming-soon h1{ font-family:'DM Serif Display',serif; font-size:32px; font-weight:400; margin-bottom:12px; }
  .coming-soon p{ color:var(--muted); font-size:15px; line-height:1.6; }
}


/* ===================== DATA PRIVACY — privacy.html (body.page-privacy) ===================== */
body.page-privacy{
  .app{ max-width:900px; margin:32px auto 60px; padding:0 14px; }
  .card{ background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:36px 40px; box-shadow:0 6px 18px rgba(0,0,0,.06); margin-bottom:14px; }
  h1{ font-family:'DM Serif Display',serif; font-size:28px; font-weight:400; margin-bottom:6px; }
  .updated{ font-size:13px; color:var(--muted); margin-bottom:28px; }
  h2{ font-size:15px; font-weight:700; margin:22px 0 8px; }
  p{ font-size:14px; line-height:1.7; color:#333; margin-bottom:10px; }
  ul{ font-size:14px; line-height:1.7; color:#333; padding-left:20px; margin-bottom:10px; }
  li{ margin-bottom:4px; }
  .accept-bar{ background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:24px 40px; box-shadow:0 6px 18px rgba(0,0,0,.06); display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
  .accept-bar p{ margin:0; font-size:14px; color:var(--muted); }
  .btn-accept{ padding:13px 28px; background:#2ECC71; color:#fff; border:none; border-radius:12px; font-size:15px; font-weight:700; font-family:inherit; cursor:pointer; transition:background .15s; white-space:nowrap; }
  .btn-accept:hover{ background:#27ae60; }
  @media(max-width:540px){ .card{ padding:24px 20px; } .accept-bar{ padding:20px; } }
}
