/* GREATNESS LEVEL 4: cinematic. Live data/HTML over reusable visual assets. */
body[data-theme="unhinged"]{--page:#061827;--ink:#0b203a;--muted:#607087;--header:#061522;--header-ink:#fff;--hero:#061827;--hero-ink:#fff;--hero-copy:#f0f3f5;--accent:#ef211c;--muted-accent:#fff;--line:#b8c5d0;--input-bg:#fff;--input-line:#98a7b7;--card:#f8fbfd;--impact-border:#5579a9;--impact-number:#061f42;--projection:#ef312d;--projection-number:#b80e0a;--tag-bg:#dfe8f0;--section-alt:#09192a;--vote-yes:#126a3c;--vote-no:#c31a14;--footer:#071624;--footer-ink:#fff;--shadow:0 18px 50px rgba(0,0,0,.38);--card-shadow:0 8px 20px rgba(0,0,0,.28)}
body[data-theme="unhinged"] .site-header{position:absolute;inset:0 0 auto;background:linear-gradient(#03101ad9,transparent);border:0}body[data-theme="unhinged"] .header-inner{min-height:64px}body[data-theme="unhinged"] .brand-mark{display:none}body[data-theme="unhinged"] .brand strong{text-transform:uppercase;letter-spacing:.16em;font-size:.78rem}body[data-theme="unhinged"] .brand small{text-transform:uppercase;letter-spacing:.13em;color:#fff;opacity:.92}body[data-theme="unhinged"] .top-nav a{text-shadow:0 2px 5px #000}
body[data-theme="unhinged"] .hero{min-height:610px;background:#061827}body[data-theme="unhinged"] .hero-art{background-image:linear-gradient(90deg,rgba(1,9,17,.04),rgba(2,13,24,.12) 28%,rgba(2,13,24,.58) 49%,rgba(2,13,24,.05) 76%),url('../assets/theme-unhinged/hero-scenery-v07.webp');background-size:cover;background-position:center top;opacity:1}body[data-theme="unhinged"] .hero-content{padding:100px 0 28px;z-index:2}.money-burst{display:none!important}
body[data-theme="unhinged"] .eyebrow{color:#fff;text-shadow:0 2px 6px #000}body[data-theme="unhinged"] .hero h1{max-width:830px;font-size:clamp(3.5rem,7.2vw,7.2rem);font-family:Impact,Haettenschweiler,"Arial Narrow Bold",sans-serif;letter-spacing:-.02em;line-height:.78;text-transform:uppercase;text-shadow:0 5px 0 #02070b,0 9px 22px #000;margin-top:6px}body[data-theme="unhinged"] .hero h1 span{display:inline-block;background:linear-gradient(#fff 0 39%,#f5221c 42% 100%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 4px 0 #9d0705);font-size:1.46em}body[data-theme="unhinged"] .hero-copy{max-width:630px;text-shadow:0 2px 5px #000;font-weight:600}
body[data-theme="unhinged"] .hero-finder{background:linear-gradient(90deg,rgba(6,29,49,.97),rgba(6,35,59,.94));color:#fff;border:1px solid #49677d;margin-top:28px;box-shadow:0 12px 34px #0009;padding:16px 18px}body[data-theme="unhinged"] .finder-result{border-color:#8da0b0}body[data-theme="unhinged"] .finder-result span{color:#fff}body[data-theme="unhinged"] .finder-control select{box-shadow:inset 0 1px 0 #fff}
body[data-theme="unhinged"] .impact-section{background:linear-gradient(#061827,#071a2c);padding:10px 0 26px}body[data-theme="unhinged"] .impact-shell{position:relative;overflow:hidden;border:1px solid #48647b;border-radius:16px;padding:22px 18px 16px;background:#171829;box-shadow:0 14px 36px #0009}body[data-theme="unhinged"] .impact-shell:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(101,4,12,.78),rgba(30,14,27,.78) 45%,rgba(7,29,50,.82)),url('../assets/theme-unhinged/impact-texture.webp') center/cover;opacity:.92}body[data-theme="unhinged"] .impact-shell>*{position:relative;z-index:1}body[data-theme="unhinged"] .impact-intro{color:#fff}body[data-theme="unhinged"] .impact-intro .section-kicker{color:#fff}body[data-theme="unhinged"] .impact-intro h2{font-weight:950;font-size:clamp(2.3rem,4.25vw,3.9rem);max-width:760px}body[data-theme="unhinged"] .impact-callout{color:#fff;background:radial-gradient(ellipse at center,#d91419 0 43%,transparent 72%);padding:16px 22px;max-width:390px}body[data-theme="unhinged"] .cash-icon{display:grid;place-items:center;border:3px solid #fff;width:52px;height:40px;color:#fff;transform:rotate(-8deg)}
body[data-theme="unhinged"] .impact-card{border:0;border-radius:9px;background:linear-gradient(145deg,#fff,#e8f3fa);box-shadow:0 5px 15px #0009;padding:16px}body[data-theme="unhinged"] .impact-card.projection{background:linear-gradient(145deg,#fff,#ffe1e1)}body[data-theme="unhinged"] .impact-card.hot{background:linear-gradient(145deg,#fff4f4,#ffcaca)}body[data-theme="unhinged"] .impact-card>strong{font-size:clamp(2.5rem,4vw,4.25rem);font-weight:950}
body[data-theme="unhinged"] .legislator-section{color:#fff;background:#0c1822;padding:30px 0 34px;border-top:1px solid #6d7880}body[data-theme="unhinged"] .accountability-art{position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,12,18,.36),rgba(5,13,20,.76)),url('../assets/theme-unhinged/accountability-architecture.webp') center/cover;opacity:.95}body[data-theme="unhinged"] .legislator-section .section-kicker{color:#fff}body[data-theme="unhinged"] .section-heading-row p{color:#fff;text-shadow:0 2px 5px #000}body[data-theme="unhinged"] .legislator-section h2{text-shadow:0 3px 8px #000;font-weight:950}body[data-theme="unhinged"] .legislator-card{color:#0b203a;background:linear-gradient(#fff,#edf5fa);border:0;box-shadow:0 8px 20px #000b}body[data-theme="unhinged"] .portrait-wrap{width:74px;height:74px;flex-basis:74px;border-color:#d7e0e6;box-shadow:0 3px 8px #0005}body[data-theme="unhinged"] .vote-tile{background:#f6f9fb;border-color:#ccd7df}body[data-theme="unhinged"] .vote-tile strong{font-size:1.15rem}
body[data-theme="unhinged"] .details-section{background:#081c2f;color:#fff;padding:10px 0 12px}body[data-theme="unhinged"] details{background:#091e31;border-color:#334e65}body[data-theme="unhinged"] details div{color:#cbd7e1}body[data-theme="unhinged"] footer{border-top:1px solid #29465e}
@media(max-width:900px){body[data-theme="unhinged"] .hero{min-height:auto}body[data-theme="unhinged"] .hero-art{background-position:36% top}body[data-theme="unhinged"] .impact-shell{border-radius:0}.impact-section .shell{width:100%}body[data-theme="unhinged"] .impact-shell{padding-left:20px;padding-right:20px}}
@media(max-width:600px){body[data-theme="unhinged"] .site-header{position:relative;background:#061522}body[data-theme="unhinged"] .hero-content{padding-top:34px}body[data-theme="unhinged"] .hero-art{background-position:27% top;filter:brightness(.62)}body[data-theme="unhinged"] .hero h1{font-size:clamp(3rem,16vw,5rem)}body[data-theme="unhinged"] .impact-shell{border-left:0;border-right:0}.votes{grid-template-columns:1fr}.vote-tile{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;text-align:left}.vote-tile strong{grid-column:2;grid-row:1/3;align-self:center;font-size:1.35rem}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* v0.6: scenery-only visual layer. All communication stays live HTML. */
body[data-theme="unhinged"] .hero-art{
  background-image:
    linear-gradient(90deg,
      rgba(2,12,23,.18) 0%,
      rgba(2,12,23,.78) 23%,
      rgba(2,12,23,.97) 43%,
      rgba(2,12,23,.82) 55%,
      rgba(2,12,23,.12) 74%,
      rgba(2,12,23,.02) 100%),
    url('../assets/theme-unhinged/hero-scenery-v07.webp');
  background-position:center center;
  background-size:cover;
}
body[data-theme="unhinged"] .hero-content{max-width:1180px}
body[data-theme="unhinged"] .hero h1{
  max-width:760px;
  line-height:.80;
  text-wrap:balance;
}
body[data-theme="unhinged"] .hero h1 span{
  display:block;
  width:max-content;
  max-width:100%;
  color:#f0181e;
  background:
    linear-gradient(180deg,#ff4146 0%,#ef171d 52%,#bd080d 100%);
  -webkit-background-clip:text;
  background-clip:text;
  filter:none;
  text-shadow:
    0 3px 0 #7d0509,
    0 7px 0 rgba(0,0,0,.48),
    0 15px 30px rgba(0,0,0,.82);
}
body[data-theme="unhinged"] .hero h1 span::after{
  content:"";
  position:absolute;
}
body[data-theme="unhinged"] .hero-copy{max-width:600px}
body[data-theme="unhinged"] .hero-finder{max-width:1100px}
body[data-theme="unhinged"] .accountability-art{
  background-image:
    linear-gradient(180deg,rgba(4,11,18,.38),rgba(4,12,20,.82)),
    url('../assets/theme-unhinged/accountability-architecture.webp');
  background-position:center;
  background-size:cover;
}
body[data-theme="unhinged"] .legislator-section{overflow:hidden}
@media(max-width:900px){
  body[data-theme="unhinged"] .hero-art{
    background-position:58% center;
    background-image:
      linear-gradient(90deg,rgba(2,12,23,.90) 0%,rgba(2,12,23,.90) 52%,rgba(2,12,23,.30) 100%),
      url('../assets/theme-unhinged/hero-scenery-v07.webp');
  }
}
@media(max-width:600px){
  body[data-theme="unhinged"] .hero-art{
    background-position:67% center;
    filter:none;
    background-image:
      linear-gradient(180deg,rgba(2,12,23,.84),rgba(2,12,23,.94)),
      url('../assets/theme-unhinged/hero-scenery-v07.webp');
  }
  body[data-theme="unhinged"] .hero h1 span{width:auto}
}


/* v0.7: data integrity first. Theme may decorate, never clip the data. */
body[data-theme="unhinged"] .hero-art{
  background-image:
    linear-gradient(90deg,
      rgba(2,12,23,.12) 0%,
      rgba(2,12,23,.58) 22%,
      rgba(2,12,23,.98) 37%,
      rgba(2,12,23,.98) 58%,
      rgba(2,12,23,.48) 72%,
      rgba(2,12,23,.06) 100%),
    url('../assets/theme-unhinged/hero-scenery-v07.webp');
  background-position:center center;
  background-size:cover;
}

/* Four scenarios must always remain inside the impact shell. */
body[data-theme="unhinged"] .impact-shell{
  width:100%;
  max-width:100%;
  overflow:hidden;
}
body[data-theme="unhinged"] .impact-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  width:100%;
  min-width:0;
}
body[data-theme="unhinged"] .impact-card{
  min-width:0;
  width:100%;
  overflow:hidden;
}
body[data-theme="unhinged"] .impact-card > strong{
  display:block;
  width:100%;
  min-width:0;
  font-size:clamp(1.7rem,2.35vw,3.15rem);
  line-height:.94;
  letter-spacing:-.055em;
  white-space:nowrap;
}
body[data-theme="unhinged"] .impact-card .scenario{
  min-width:0;
  overflow-wrap:anywhere;
}
body[data-theme="unhinged"] .impact-card p{
  min-width:0;
}

/* Keep the four-card layout only while it can genuinely support the values. */
@media(max-width:1100px){
  body[data-theme="unhinged"] .impact-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body[data-theme="unhinged"] .impact-card > strong{
    font-size:clamp(2rem,5vw,3.35rem);
  }
}
@media(max-width:620px){
  body[data-theme="unhinged"] .impact-grid{
    grid-template-columns:1fr;
  }
  body[data-theme="unhinged"] .impact-card > strong{
    font-size:clamp(2.15rem,10vw,3.35rem);
  }
}

/* The representative grid is allowed to grow with the county. */
body[data-theme="unhinged"] .legislator-grid{
  align-items:stretch;
}
body[data-theme="unhinged"] .legislator-card{
  min-width:0;
}

/* At narrower widths, protect the live headline and selector from scenery. */
@media(max-width:900px){
  body[data-theme="unhinged"] .hero-art{
    background-image:
      linear-gradient(90deg,rgba(2,12,23,.94) 0%,rgba(2,12,23,.94) 58%,rgba(2,12,23,.30) 100%),
      url('../assets/theme-unhinged/hero-scenery-v07.webp');
    background-position:58% center;
  }
}
@media(max-width:600px){
  body[data-theme="unhinged"] .hero-art{
    background-image:
      linear-gradient(180deg,rgba(2,12,23,.88),rgba(2,12,23,.96)),
      url('../assets/theme-unhinged/hero-scenery-v07.webp');
    background-position:65% center;
  }
}
