/* ==========================================================================
   HB 1336-FN — Site stylesheet (v4, June 2026)
   Editorial, feature-piece design: serif text, generous measure,
   scroll-triggered reveals, sticky section navigation, Statute Reader.
   ========================================================================== */

:root {
  /* Palette */
  --paper: #fbfaf7;
  --paper-deep: #f3f1ea;
  --ink: #191919;
  --ink-soft: #3c3c3a;
  --muted: #76746e;
  --border: #e2dfd6;
  --border-strong: #c9c5b8;
  --primary: #1d3c5e;          /* granite navy */
  --primary-deep: #142c46;
  --primary-soft: #e8eef5;
  --accent: #8a6d2f;           /* statehouse gold, muted */
  --accent-soft: #f4eeda;
  --good: #2e6e4e;
  --good-soft: #e3f1e9;
  --bad: #8c3b2e;
  --bad-soft: #f7e8e4;
  --mark: #fff3c4;
  --hit: #ffe28a;

  /* Back-compat aliases */
  --border-light: #e2dfd6;
  --text: #191919;
  --text-soft: #3c3c3a;

  /* Type */
  --serif: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 41rem;

  /* Motion */
  --ease-out: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); }
a:hover { color: var(--primary-deep); }
img { max-width: 100%; height: auto; }

::selection { background: var(--primary-soft); }

/* --------------------------------------------------------------------------
   Reading progress bar
   -------------------------------------------------------------------------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 200; transition: width .1s linear;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,250,247,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1380px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px; gap: 16px; flex-wrap: wrap;
}
.site-title {
  font-family: var(--sans); font-weight: 700; font-size: 16px;
  letter-spacing: .02em; color: var(--ink); text-decoration: none;
  display: flex; flex-direction: column; line-height: 1.25; padding: 8px 0;
}
.site-title .sub {
  font-weight: 400; font-size: 11.5px; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
}
.site-nav { display: flex; gap: 4px; font-family: var(--sans); flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 14px;
  padding: 8px 12px; border-radius: 6px; transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--paper-deep); color: var(--ink); }
.site-nav a.active { color: var(--primary); font-weight: 600; background: var(--primary-soft); }

/* --------------------------------------------------------------------------
   Generic page scaffolding
   -------------------------------------------------------------------------- */
.page { max-width: 1380px; margin: 0 auto; padding: 40px 24px 96px; }

.page-header { max-width: 52rem; margin: 24px auto 8px; }
.page-header h1 {
  font-size: clamp(32px, 5vw, 46px); line-height: 1.12;
  margin: 0 0 14px; font-weight: 700; letter-spacing: -.01em;
}
.page-header .subtitle { color: var(--muted); font-size: 17px; margin: 0 0 8px; }

.kicker {
  font-family: var(--sans); font-size: 12.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 10px;
}

/* --------------------------------------------------------------------------
   Scroll-reveal animation
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* --------------------------------------------------------------------------
   Overview — hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin: 0 -24px;
  padding: clamp(56px, 10vh, 120px) 24px clamp(48px, 8vh, 100px);
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(138,109,47,.14), transparent 60%),
    radial-gradient(900px 520px at 10% 110%, rgba(29,60,94,.16), transparent 60%),
    linear-gradient(180deg, var(--paper-deep), var(--paper));
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 62px); line-height: 1.06; letter-spacing: -.015em;
  margin: 0 auto 22px; max-width: 21ch; font-weight: 700;
}
.hero .deck {
  max-width: 46rem; margin: 0 auto 30px; font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.6; color: var(--ink-soft);
}
.hero-status {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px 0;
  font-family: var(--sans); font-size: 13px; color: var(--muted);
  margin: 0 0 34px; align-items: center;
}
.hero-status .step { display: inline-flex; align-items: center; gap: 7px; padding: 4px 2px; }
.hero-status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--good); flex: none;
}
.hero-status .step.pending .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(138,109,47,.18); }
.hero-status .step.pending { color: var(--accent); font-weight: 700; }
.hero-status .sep { width: 28px; height: 1px; background: var(--border-strong); margin: 0 8px; }

.cta {
  display: inline-block; font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  text-decoration: none; padding: 13px 26px; border-radius: 8px;
  background: var(--primary); color: #fff; margin: 4px 6px;
  transition: transform .2s var(--ease-out), box-shadow .2s, background .2s;
  box-shadow: 0 1px 2px rgba(20,44,70,.25);
}
.cta:hover { background: var(--primary-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20,44,70,.22); }
.cta.secondary { background: transparent; color: var(--primary); border: 1px solid var(--border-strong); box-shadow: none; }
.cta.secondary:hover { background: var(--primary-soft); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Overview — sections
   -------------------------------------------------------------------------- */
.section-title {
  font-size: clamp(25px, 3.4vw, 34px); letter-spacing: -.01em;
  margin: 0 0 8px; line-height: 1.15;
}
.section-lede { color: var(--muted); max-width: var(--measure); margin: 0 0 30px; font-size: 17px; }
.overview-section { padding: 64px 0 8px; }
.overview-section .rule {
  width: 56px; height: 3px; background: var(--accent); border: 0; margin: 0 0 18px;
}

.exec-summary { max-width: var(--measure); margin: 0 auto; }
.exec-summary p { margin: 0 0 1.2em; }
.exec-summary .dropcap::first-letter {
  float: left; font-size: 74px; line-height: .84; padding: 6px 10px 0 0;
  font-weight: 700; color: var(--primary);
}

/* At-a-glance fact-sheet panels */
.glance-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 22px; margin-top: 26px; align-items: start;
}
.glance-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 26px 28px 10px; overflow: hidden;
}
.glance-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.glance-head h3 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.glance-head .glance-cite { font-family: var(--sans); font-size: 13px; white-space: nowrap; }
.glance-intro { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: 8px 0 14px; line-height: 1.55; }
.glance-rows { list-style: none; margin: 0; padding: 0; }
.glance-rows li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 0; border-top: 1px solid var(--border);
}
.glance-rows .g-badge {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--serif); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.glance-panel.protections .g-badge { background: var(--good-soft); color: var(--good); border-radius: 8px; font-family: var(--sans); font-size: 12.5px; }
.glance-rows .g-text { font-family: var(--sans); font-size: 14px; line-height: 1.58; color: var(--ink-soft); min-width: 0; }
.glance-rows .g-text strong { color: var(--ink); font-weight: 700; }
.glance-rows .g-text .g-key { color: var(--primary); font-weight: 700; }
.glance-rows .g-ref { margin-left: auto; flex: none; font-family: var(--sans); font-size: 12px; padding-top: 3px; }
.glance-foot { font-family: var(--sans); font-size: 12.5px; color: var(--muted); padding: 13px 0 14px; border-top: 1px solid var(--border); }

/* Infographic figures */
.infographics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px; margin-top: 30px;
}
.figure-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 24px 18px;
}
.figure-card h3 { margin: 0 0 4px; font-size: 18px; }
.figure-card .fig-sub { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.figure-card svg { width: 100%; height: auto; display: block; }
.figure-card .fig-note { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.bar-anim rect.bar { transform: scaleY(0); transform-origin: bottom; transition: transform 1s var(--ease-out); }
.figure-card.in .bar-anim rect.bar { transform: scaleY(1); }
.line-anim path.trace { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.8s var(--ease-out) .2s; }
.figure-card.in .line-anim path.trace { stroke-dashoffset: 0; }

/* Examples carousel */
.carousel { position: relative; margin-top: 26px; }
.carousel-viewport { overflow: hidden; border-radius: 14px; }
.carousel-track { display: flex; transition: transform .55s var(--ease-out); }
.carousel-slide {
  flex: 0 0 100%; min-width: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 32px 38px 28px;
}
.carousel-slide .eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.carousel-slide h3 { margin: 0 0 6px; font-size: 22px; }
.carousel-slide .tagline { font-family: var(--sans); font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.carousel-slide p { margin: 0 0 12px; font-size: 16.5px; }
.carousel-slide .mech {
  font-family: var(--sans); font-size: 13px; color: var(--primary);
  background: var(--primary-soft); display: inline-block; padding: 5px 11px; border-radius: 100px;
  margin: 2px 6px 2px 0;
}
.carousel-slide .more { font-family: var(--sans); font-size: 13.5px; }
.carousel-controls {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px;
  font-family: var(--sans);
}
.carousel-btn {
  background: #fff; border: 1px solid var(--border-strong); color: var(--ink-soft);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 17px;
  transition: background .2s, transform .2s;
}
.carousel-btn:hover { background: var(--primary-soft); transform: translateY(-1px); }
.carousel-dots { display: flex; gap: 7px; }
.carousel-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong);
  border: 0; padding: 0; cursor: pointer; transition: background .2s, transform .2s;
}
.carousel-dot.active { background: var(--primary); transform: scale(1.3); }

/* Topic index cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px 24px 18px; text-decoration: none; color: var(--ink);
  transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s;
}
.card:hover {
  transform: translateY(-3px); box-shadow: 0 12px 30px rgba(25,25,25,.08);
  border-color: var(--border-strong); color: var(--ink);
}
.card-eyebrow {
  font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.card p { margin: 0 0 14px; font-family: var(--sans); font-size: 13.8px; color: var(--muted); line-height: 1.55; }
.card .arrow { font-family: var(--sans); font-size: 13.5px; font-weight: 600; color: var(--primary); }
.card.resource { background: var(--paper-deep); }

/* --------------------------------------------------------------------------
   Analysis layout: TOC | article | Statute Reader
   -------------------------------------------------------------------------- */
.with-toc {
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px; align-items: start; margin-top: 30px;
}
.with-rail { grid-template-columns: 240px minmax(0, 1fr) 372px; gap: 38px; }

.toc {
  position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto;
  font-family: var(--sans); font-size: 13.5px; padding-right: 6px;
  scrollbar-width: thin;
}
.toc h3 {
  font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc > ul > li { margin: 0; }
.toc a {
  display: block; padding: 5px 10px; color: var(--ink-soft); text-decoration: none;
  border-left: 2px solid transparent; border-radius: 0 6px 6px 0; line-height: 1.4;
  transition: color .15s, background .15s, border-color .15s;
}
.toc a:hover { background: var(--paper-deep); color: var(--ink); }
.toc a.active { color: var(--primary); border-left-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.toc ul ul { margin: 0 0 4px; }
.toc ul ul a { padding-left: 24px; font-size: 12.5px; color: var(--muted); }
.toc ul ul a.active { color: var(--primary); }
.toc li.toc-section > ul { display: none; }
.toc li.toc-section.open > ul { display: block; }
.toc .toc-tools { margin-top: 16px; }

/* Document search — overlay results */
.search-bar { position: relative; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; font-family: var(--sans); }
.search-bar input {
  flex: 1 1 160px; min-width: 0; padding: 9px 13px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: var(--sans);
}
.search-bar input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.search-bar .count { font-size: 12.5px; color: var(--muted); }
.search-results {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 260;
  flex-direction: column; gap: 8px;
  background: var(--paper); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(25,25,25,.18);
  padding: 10px; max-height: 56vh; overflow-y: auto; scrollbar-width: thin;
}
.search-results.open { display: flex; }
.search-result {
  font-family: var(--sans); text-align: left; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
  display: block; width: 100%;
}
.search-result:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(25,25,25,.07); }
.search-result .sr-sec {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px;
}
.search-result .sr-snippet { display: block; font-size: 12.8px; color: var(--ink-soft); line-height: 1.5; }
.search-result .sr-snippet mark { background: var(--hit); border-radius: 2px; padding: 0 1px; }
.rail-search { flex: none; margin-bottom: 10px; }
.search-mobile { display: none; }
.hit { background: var(--hit); border-radius: 2px; }
.hidden { display: none !important; }

/* Flash highlight when jumping to a search result */
@keyframes flashTarget {
  0% { background: var(--hit); box-shadow: 0 0 0 6px var(--hit); }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
.flash { animation: flashTarget 1.8s ease-out 1; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Article typography
   -------------------------------------------------------------------------- */
.article { max-width: var(--measure); min-width: 0; }
.article > section { margin: 0 0 18px; }
.article h2 {
  font-size: clamp(26px, 3.2vw, 33px); line-height: 1.18; letter-spacing: -.01em;
  margin: 64px 0 18px; padding-top: 26px; border-top: 1px solid var(--border);
}
.article section:first-child h2 { margin-top: 8px; border-top: 0; padding-top: 0; }
.article h3 { font-size: 21.5px; line-height: 1.3; margin: 40px 0 12px; }
.article h4 { font-size: 18px; margin: 30px 0 10px; }
.article p { margin: 0 0 1.25em; }
.article ul, .article ol { padding-left: 1.4em; margin: 0 0 1.25em; }
.article li { margin: 0 0 .55em; }
.article blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent);
  color: var(--ink-soft); font-style: italic;
}
.article figure { margin: 1.8em 0; }
.article figure img { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.article figcaption { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.article .note { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.article a.xref { text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
.article a.xref:hover { border-bottom-color: var(--primary); background: var(--paper-deep); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.article table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 14px; }
.article th, .article td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.article thead th, .article tr.head td { background: var(--paper-deep); font-weight: 700; font-size: 13px; }
.article tbody tr:last-child td { border-bottom: 0; }

/* Upfront-cost visual (§3) */
.upfront-visual { margin: 1.8em 0; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.upfront-visual .uv-head { padding: 18px 22px 4px; }
.upfront-visual .uv-head h4 { margin: 0 0 4px; font-size: 17.5px; }
.upfront-visual .uv-head p { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.uv-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 13.5px; }
.uv-table th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--paper-deep); }
.uv-table td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.uv-table tr:last-child td { border-bottom: 0; }
.uv-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px; white-space: nowrap; }
.uv-badge.ok { background: var(--good-soft); color: var(--good); }
.uv-badge.no { background: var(--bad-soft); color: var(--bad); }
.uv-table tr.no td { background: #fdf6f4; }
.uv-cost { font-weight: 700; white-space: normal; color: var(--ink); }
.uv-table th:nth-child(2) { width: 90px; }
.uv-table th:nth-child(3) { width: 88px; }
.uv-months { display: inline-flex; flex-wrap: wrap; gap: 2.5px; vertical-align: middle; margin-top: 5px; }
.uv-months i {
  width: 11px; height: 14px; border-radius: 2.5px; background: var(--primary);
  display: inline-block; opacity: .85;
}
.uv-months i.dep { background: var(--accent); }
.uv-months i.ghost { background: var(--border); }
.uv-months i.off { background: transparent; border: 1px solid rgba(29,60,94,.55); }
.uv-months .uv-plus {
  font-family: var(--sans); font-weight: 700; color: var(--primary);
  font-size: 13px; line-height: 14px; align-self: center; padding: 0 1px;
}
.uv-more { font-weight: 700; color: var(--primary); letter-spacing: .04em; }
.uv-foot { font-family: var(--sans); font-size: 12px; color: var(--muted); padding: 12px 22px 14px; border-top: 1px solid var(--border); line-height: 1.55; }

/* Topic tiles (subsections) */
.topic-block {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 26px 12px; margin: 0 0 18px;
}
.topic-block > h3, .topic-block > h4 { margin: 0 0 12px; }
.topic-block > h3 { font-size: 20px; }
.topic-block > h4 { font-size: 17px; }
.topic-block .table-wrap { margin: 1.2em 0; }
.topic-block .upfront-visual { margin: 1.2em 0; }
.topic-block figure { margin: 1.2em 0; }

/* Statutory-mechanism pills on practical examples (matches the overview carousel) */
.mech-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 16px; }
.mech-row .mech {
  font-family: var(--sans); font-size: 13px; color: var(--primary);
  background: var(--primary-soft); display: inline-block; padding: 5px 11px; border-radius: 100px;
}
.article .divider-head {
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 38px 0 14px;
}

/* Objection blocks */
.objection-block {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 26px 30px 18px; margin: 0 0 22px;
}
.objection-block h3 { margin: 0 0 14px; font-size: 20px; }
.label-tag {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 8px;
}
.strongest { border-left: 3px solid var(--bad); padding-left: 18px; margin: 0 0 18px; }
.strongest .label-tag { color: var(--bad); }
.strongest p { color: var(--ink-soft); font-style: italic; }
.response .label-tag { color: var(--good); }

/* --------------------------------------------------------------------------
   Statutory citations
   -------------------------------------------------------------------------- */
a.cite, button.cite {
  font: inherit; color: var(--primary); background: none; border: 0; padding: 0 2px;
  cursor: pointer; text-decoration: none; border-radius: 3px;
  border-bottom: 1px dashed rgba(29,60,94,.5);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
a.cite:hover, button.cite:hover { background: var(--primary-soft); border-bottom-color: var(--primary); }

/* Linked-hover (from a reader pill) */
a.cite.cite-hover {
  background: var(--accent-soft); border-bottom: 1px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* The citation currently displayed in the Statute Reader — unmissable */
a.cite.active-cite {
  background: var(--primary); color: #fff; font-weight: 700;
  border-bottom: 0; padding: 1px 6px; border-radius: 4px;
  box-shadow: 0 1px 6px rgba(20,44,70,.35);
}
a.cite.active-cite:hover { background: var(--primary-deep); color: #fff; }

/* Flash when the reader auto-advances to a new citation */
@keyframes citePulse {
  0%   { box-shadow: 0 0 0 0 rgba(138,109,47,.65); background: var(--accent); }
  45%  { box-shadow: 0 0 0 10px rgba(138,109,47,0); }
  100% { box-shadow: 0 1px 6px rgba(20,44,70,.35); background: var(--primary); }
}
a.cite.cite-flash { animation: citePulse 1.1s var(--ease-out) 1; }

/* --------------------------------------------------------------------------
   Statute Reader rail
   -------------------------------------------------------------------------- */
.statute-rail {
  position: sticky; top: 84px; max-height: calc(100vh - 104px);
  display: flex; flex-direction: column; min-width: 0;
}

.reader-bar {
  font-family: var(--sans); display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 10px; flex: none;
}
.reader-bar select {
  flex: 1 1 140px; min-width: 0; font-family: var(--sans); font-size: 12.5px;
  padding: 7px 8px; border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.reader-bar select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }

/* Auto / Manual segmented switch */
.reader-switch {
  display: inline-flex; flex: none; border: 1px solid var(--border-strong);
  border-radius: 8px; overflow: hidden; background: #fff;
}
.reader-switch button {
  font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer;
  border: 0; background: transparent; color: var(--muted); padding: 7px 12px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s;
}
.reader-switch button + button { border-left: 1px solid var(--border); }
.reader-switch button.on { background: var(--primary); color: #fff; }
.reader-switch button.on .live-dot { background: #9fd4b6; animation: livePulse 2s infinite; }
.reader-switch .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex: none; }
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(159,212,182,.5); }
  50% { box-shadow: 0 0 0 4px rgba(159,212,182,.18); }
}

/* On-screen citation pills */
.cite-pills-wrap { flex: none; margin-bottom: 10px; font-family: var(--sans); }
.cite-pills-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px;
}
.cite-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cite-pill {
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-strong); background: #fff; color: var(--ink-soft);
  padding: 4px 11px; border-radius: 100px;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.cite-pill:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.cite-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cite-pill.active:hover { background: var(--primary-deep); }
.cite-pills .pills-empty { font-size: 11.5px; color: var(--muted); padding: 4px 2px; font-style: italic; }

.reader-body { min-height: 0; display: flex; flex-direction: column; }

.statute-hint {
  font-family: var(--sans); font-size: 13px; color: var(--muted);
  border: 1px dashed var(--border-strong); border-radius: 12px; padding: 22px;
  line-height: 1.6; background: var(--paper-deep);
}
.statute-hint .pill {
  display: inline-block; border-bottom: 1px dashed rgba(29,60,94,.5); color: var(--primary);
}

.statute-card {
  position: relative;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(25,25,25,.10);
  display: flex; flex-direction: column; overflow: hidden; max-height: 100%; min-height: 0;
  animation: statuteIn .35s var(--ease-out);
}
@keyframes statuteIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.statute-card-head {
  padding: 14px 44px 11px 16px; border-bottom: 1px solid var(--border);
  background: var(--paper-deep); flex: none;
}
.statute-card-head .chapter { font-family: var(--sans); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.statute-card-head h4 { margin: 0 0 6px; font-size: 15.5px; line-height: 1.3; }
.statute-card-head .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-family: var(--sans); font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 100px; background: var(--primary-soft); color: var(--primary);
}
.badge.new { background: var(--good-soft); color: var(--good); }
.badge.amended { background: var(--accent-soft); color: var(--accent); }
.badge.pending { background: var(--accent-soft); color: var(--accent); }
.statute-close {
  position: absolute; top: 8px; right: 8px; background: none; border: 0; cursor: pointer;
  font-size: 17px; color: var(--muted); padding: 6px; line-height: 1; border-radius: 6px;
  font-family: var(--sans);
}
.statute-close:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.statute-card-body { overflow-y: auto; padding: 13px 16px 16px; font-size: 14px; line-height: 1.6; scrollbar-width: thin; }
.statute-card-body .status-note { font-family: var(--sans); font-size: 12.3px; color: var(--muted); margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.statute-card-body .statute-para { margin: 0 0 .9em; }

/* OLS drafting conventions:
   added matter → bold italics; removed matter → [bracketed, struckthrough] */
.statute-card-body .statute-para mark {
  background: transparent; color: inherit; font-style: italic; font-weight: 700;
}
.statute-card-body .statute-para del { color: var(--muted); text-decoration: line-through; }
.statute-card-body .statute-para del::before { content: "["; text-decoration: none; }
.statute-card-body .statute-para del::after { content: "]"; text-decoration: none; }

/* Blue focus highlight for the paragraph matching the active citation */
.statute-card-body .statute-para.focus {
  background: var(--primary-soft); border-radius: 8px; padding: 8px 10px; margin-left: -10px; margin-right: -10px;
  box-shadow: inset 3px 0 0 var(--primary);
}
.statute-form-note { font-family: var(--sans); font-size: 12.3px; color: var(--muted); display: inline-block; margin-top: 4px; font-style: normal; font-weight: 400; }
.statute-card-foot { padding: 9px 16px; border-top: 1px solid var(--border); font-family: var(--sans); font-size: 12.3px; flex: none; }

/* Popover variant (narrow screens) */
.statute-popover {
  position: fixed; z-index: 300; inset: auto 12px 12px 12px; max-height: 62vh;
  margin: 0 auto; max-width: 560px;
}
.statute-popover .statute-card { max-height: 62vh; animation: sheetIn .3s var(--ease-out); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.statute-scrim {
  position: fixed; inset: 0; z-index: 290; background: rgba(25,25,25,.32);
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------------------
   Downloads / resources
   -------------------------------------------------------------------------- */
.resource-group { margin: 44px 0 0; }
.resource-group h2 { font-size: 24px; margin: 0 0 16px; }
.resource-list { list-style: none; margin: 0; padding: 0; }
.resource-list li {
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 15px 20px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap; font-family: var(--sans); font-size: 14.5px;
}
.resource-list .ftype {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 100px; text-transform: uppercase;
}
.resource-list a { font-weight: 600; text-decoration: none; }
.resource-list a:hover { text-decoration: underline; }
.resource-list .rdesc { color: var(--muted); font-size: 13px; flex-basis: 100%; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--paper-deep); margin-top: 40px; }
.site-footer-inner {
  max-width: 1380px; margin: 0 auto; padding: 34px 24px 44px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 13.5px; color: var(--muted); line-height: 1.7;
}
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1340px) {
  .with-rail { grid-template-columns: 235px minmax(0, 1fr); }
  .statute-rail { display: none; }
  .search-mobile { display: flex; }
  .search-mobile-count { display: block; }
}
@media (min-width: 1341px) {
  .search-mobile, .search-mobile-count { display: none !important; }
}
@media (max-width: 980px) {
  .with-toc, .with-rail { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { position: static; max-height: none; margin-bottom: 26px; border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fff; }
  .carousel-slide { padding: 26px 22px 22px; }
  .article h2 { margin-top: 44px; }
  .glance-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; line-height: 1.62; }
  .site-header-inner { padding: 8px 14px; }
  .site-nav a { padding: 7px 9px; font-size: 13px; }
  .page { padding: 22px 16px 64px; }
  .hero { margin: 0 -16px; padding-left: 18px; padding-right: 18px; }
  .hero-status { font-size: 12px; }
  .hero-status .sep { width: 12px; margin: 0 4px; }
  .cta { display: block; margin: 8px auto; max-width: 320px; }
  .overview-section { padding: 48px 0 8px; }
  .glance-panel { padding: 20px 18px 6px; }
  .glance-rows .g-ref { display: none; }
  .topic-block { padding: 18px 16px 8px; }
  .objection-block { padding: 20px 18px 12px; }
  .carousel-slide h3 { font-size: 19px; }
  .carousel-slide p { font-size: 15.5px; }
  .article table, .uv-table { font-size: 12.5px; }
  .article th, .article td { padding: 8px 10px; }
  .uv-table th, .uv-table td { padding: 7px 8px; }
  .page-header h1 { font-size: clamp(28px, 7.5vw, 34px); }
  .exec-summary .dropcap::first-letter { font-size: 58px; }
  .statute-popover { inset: auto 8px 8px 8px; max-height: 70vh; }
  .statute-popover .statute-card { max-height: 70vh; }
}

/* §6 example cite footers */
.ex-cites {
  font-family: var(--sans); margin: 4px 0 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.ex-cites-label {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.ex-cites .mech {
  font-family: var(--sans); font-size: 12.5px;
  background: var(--primary-soft); display: inline-block; padding: 4px 11px; border-radius: 100px;
  margin: 2px 6px 2px 0;
}
.ex-cites .mech a.cite { border-bottom: 0; color: var(--primary); }
.ex-cites .mech a.cite.active-cite { background: var(--primary); color: #fff; }

/* --------------------------------------------------------------------------
   Statute Reader — pin button & mode toast
   -------------------------------------------------------------------------- */
.statute-pin {
  position: absolute; top: 8px; right: 8px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 700;
  border: 1px solid var(--border-strong); background: #fff; color: var(--ink-soft);
  padding: 5px 11px; border-radius: 100px; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background .2s, color .2s, border-color .2s;
}
.statute-pin:hover { background: var(--accent-soft); border-color: var(--accent); }
.statute-pin.pinned { background: var(--primary); border-color: var(--primary); color: #fff; }
.reader-toast {
  font-family: var(--sans); font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(138,109,47,.35);
  border-radius: 8px; padding: 7px 12px; margin: 0 0 10px; line-height: 1.5;
  animation: fadeIn .25s ease;
}

/* --------------------------------------------------------------------------
   Bill Text page
   -------------------------------------------------------------------------- */
.ols-note {
  max-width: 52rem; font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft);
  background: var(--paper-deep); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 20px; margin: 22px auto 6px; line-height: 1.65;
}
.ols-note del { color: var(--muted); }
.bill-tabs-row { display: flex; justify-content: center; margin: 22px 0 26px; }
.bill-tabs {
  display: inline-flex; flex-wrap: wrap;
  border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #fff;
  font-family: var(--sans);
}
.bill-tab {
  font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer;
  border: 0; background: transparent; color: var(--muted); padding: 11px 20px;
  transition: background .2s, color .2s;
}
.bill-tab + .bill-tab { border-left: 1px solid var(--border); }
.bill-tab:hover { background: var(--paper-deep); color: var(--ink); }
.bill-tab.on { background: var(--primary); color: #fff; }
.bill-pane { max-width: 56rem; margin: 0 auto; }
.bill-meta { font-family: var(--sans); font-size: 14px; color: var(--muted); max-width: 52rem; margin: 0 auto; text-align: center; }
.bill-meta .bill-dl { font-weight: 600; }
.bill-doc {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: clamp(22px, 4vw, 48px) clamp(20px, 5vw, 56px);
  margin: 18px 0 40px; font-size: 16.5px; line-height: 1.75;
  box-shadow: 0 10px 30px rgba(25,25,25,.05);
}
.bill-doc p { margin: 0 0 1em; }
.bill-doc .bt-center { text-align: center; margin: 1.1em 0; }
.bill-doc .bt-ind1 { padding-left: 1.4em; }
.bill-doc .bt-ind2 { padding-left: 2.8em; }
.bill-doc .bt-ind3 { padding-left: 4.2em; }
.bill-doc .bt-ind4 { padding-left: 5.6em; }
.bill-doc .bt-ind5 { padding-left: 7em; }
.bill-doc del { color: var(--muted); text-decoration: line-through; }
.bill-doc b, .bill-doc strong { font-weight: 700; }
.bill-cover { border-bottom: 1px solid var(--border); margin-bottom: 1.6em; padding-bottom: .6em; }
.bill-cover .bt-amend { text-align: center; font-family: var(--sans); font-size: 13px; color: var(--muted); margin: .2em 0 1em; }

/* Interactive Final Bill view */
#bill-interactive { max-width: 1340px; }
.bill-interactive-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 32px;
  align-items: start; margin: 18px 0 40px;
}
.bill-doc-i { margin: 0; }
.bill-doc-i [data-prov] {
  cursor: pointer; border-radius: 6px; padding: 3px 9px; margin-left: -9px;
  transition: background .15s, box-shadow .15s;
}
.bill-doc-i [data-prov]:hover { background: var(--paper-deep); box-shadow: inset 3px 0 0 var(--accent); }
.bill-doc-i [data-prov].sel { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.bill-xref-rail {
  position: sticky; top: 84px; max-height: calc(100vh - 104px);
  overflow-y: auto; scrollbar-width: thin; padding-right: 4px;
}
.xref-head h4 { margin: 2px 0 12px; font-size: 16.5px; line-height: 1.35; }
.xref-group {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin: 16px 0 8px;
}
.xref-tile {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; margin: 0 0 8px; text-decoration: none; font-family: var(--sans);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.xref-tile:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(25,25,25,.07); }
.xref-tile .sr-sec {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 3px;
}
.xref-tile .xt-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 0 0 3px; line-height: 1.35; }
.xref-tile .sr-snippet { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 1100px) {
  .bill-interactive-grid { grid-template-columns: minmax(0, 1fr); }
  .bill-xref-rail { display: none; }
}

/* Drill-through card popup */
.card-modal-scrim {
  position: fixed; inset: 0; z-index: 270;
  background: rgba(25,25,25,.42); animation: fadeIn .25s ease;
}
.card-modal {
  position: fixed; z-index: 275; inset: 6vh 16px auto 16px;
  margin: 0 auto; max-width: 780px;
}
.card-modal .statute-card { max-height: 86vh; }
.card-modal .card-modal-body { font-family: var(--serif); font-size: 15.5px; line-height: 1.66; padding: 18px 26px 22px; }
.card-modal .card-modal-body h4 { font-size: 16px; margin: 18px 0 8px; }
.card-modal .card-modal-body figure { margin: 1.2em 0; }
.card-modal .card-modal-body .table-wrap { margin: 1.2em 0; }
@media (max-width: 640px) {
  .card-modal { inset: 4vh 8px auto 8px; }
  .card-modal .statute-card { max-height: 90vh; }
  .card-modal .card-modal-body { padding: 14px 16px 18px; font-size: 14.5px; }
}
@media (max-width: 640px) {
  .bill-doc { font-size: 15px; }
  .bill-doc .bt-ind3 { padding-left: 2.6em; }
  .bill-doc .bt-ind4 { padding-left: 3.4em; }
  .bill-doc .bt-ind5 { padding-left: 4em; }
  .bill-tab { padding: 10px 13px; font-size: 13px; }
}

/* Print: hide chrome */
@media print {
  .site-header, .site-footer, .toc, .statute-rail, .progress-bar, .carousel-controls, .search-bar, .search-results, .bill-tabs { display: none !important; }
  .with-toc, .with-rail { display: block; }
  .reveal { opacity: 1; transform: none; }
  body { background: #fff; }
}

/* Keep the Pin button from overlapping the statute-card header text (rail variant only;
   the popover variant uses the narrower close button) */
.statute-rail .statute-card-head { padding-right: 96px; }

/* Favorable / unfavorable deltas in article tables (green good, red bad) */
.article td.pos { color: var(--good); font-weight: 600; }
.article td.neg { color: var(--bad); font-weight: 600; }
