/* =====================================================================
   Model Legislation — content styles
   Aligned to the CASPR editorial system (see /assets/css/caspr.css):
   Cabinet Grotesk display headings + Manrope body (the caspr.org site faces),
   warm #fcfaf7 page, #4D52FF accent, hairline section rules, flat callouts.

   Loaded by index.html and every draft-bills/*.html. The floating purple
   nav + the gradient footer are injected by ../assets/shared-gambling-chrome.js
   (this file styles the injected .nav-bar sub-nav and .editorial-footer markup).
   ===================================================================== */
/* caspr.org site faces: Cabinet Grotesk (headlines) + Manrope (body) */
@import url("https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;

  --font-head: "Cabinet Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;

  --accent: #4d52ff;
  --accent-line: rgba(77, 82, 255, 0.3);
  --accent-tint: rgba(77, 82, 255, 0.05);

  --ink: #1a1a1a; /* headings */
  --text: #2d2a26; /* body */
  --muted: #555555; /* secondary */
  --muted-2: #6b6b6b; /* tertiary / labels */

  --bg: #fcfaf7;
  --card: #ffffff;
  --panel: #f3f1ed;
  --rule: #eae7e2; /* light hairline */
  --rule-2: #d8d3ca; /* medium hairline */
  --warm-border: #e4e0d9;

  /* scorecard chrome compat tokens (sub-nav injected by the chrome JS) */
  --s200: #e7e5e4;
  --s400: #a8a29e;
  --s800: #292524;
  --s900: #1c1917;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.01em;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ---- Layout: left-anchored with a fluid gutter, like the scoring + paper pages ---- */
.container {
  max-width: 880px;
  margin: 0;
  padding: 40px clamp(20px, 4vw, 64px) 88px;
}

/* ---- Headings ---- */
h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--ink);
  letter-spacing: -0.02em; /* matches caspr.org --hl-kerning */
  line-height: 1.18;
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(31px, 4.6vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
}
h2 {
  margin: 52px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  font-size: clamp(23px, 2.6vw, 28px);
  font-weight: 700;
}
h3 {
  margin: 34px 0 10px;
  font-size: 20px;
  font-weight: 700;
}

p {
  margin: 0 0 18px;
}

ul,
ol {
  margin: 14px 0 18px 1.3rem;
  padding: 0;
}
li {
  margin: 8px 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  padding: 0.06em 0.36em;
  border-radius: 4px;
  color: #3a3f8f;
}

/* ---- Eyebrow / type label (e.g. "MODEL LEGISLATION FOR STATES") ---- */
.eyebrow,
.overview-subheadline {
  display: inline-block;
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-align: left;
}

/* ---- One-line bill description → Manrope subtitle ---- */
.meta {
  margin: 0 0 32px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.4;
  color: var(--muted);
  text-align: left;
}

/* ---- Overview (index) ---- */
.overview-body {
  font-size: 17px;
}
/* the first section heading sits directly under the title block — no top rule there */
.overview-body > h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 22px;
}
.overview-intro,
.overview-policy-copy,
.overview-policy-copy li {
  font-weight: 400;
}
.overview-priorities {
  margin-left: 1.5rem;
}

/* ---- Back link ---- */
.back-link {
  margin: 4px 0 28px;
}
.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.back-link a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
}

/* ---- Rationale (the signature "What it does" panel) ---- */
.rationale {
  margin: 28px 0 0;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--warm-border);
  border-radius: 4px;
}
.rationale + h2 {
  margin-top: 48px;
}
.rationale__summary {
  margin: 0 0 14px;
  color: var(--text);
}
.rationale__summary strong {
  color: var(--ink);
}
.rationale__bullets {
  margin: 14px 0 0 1.2rem;
  list-style: disc;
}
.rationale__bullets li {
  margin: 9px 0;
}
.rationale__bullets strong {
  color: var(--ink);
}
.rationale__bullets li::marker {
  color: var(--accent-line);
}
.rationale__sources-title {
  margin: 22px 0 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}
.rationale__sources {
  margin: 0 0 0 1.2rem;
  font-size: 14.5px;
  color: var(--muted);
}
.rationale__sources li {
  margin: 7px 0;
}
.rationale__sources a {
  color: var(--accent);
}

/* ---- Panel (Notes to Drafters) ---- */
.panel {
  margin: 16px 0;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--warm-border);
  border-radius: 6px;
}
.panel ul,
.panel ol {
  margin: 10px 0 10px 1.2rem;
}
.panel li {
  margin: 7px 0;
}

/* ---- Note ---- */
.note {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--accent-tint);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  color: var(--muted);
}

/* ---- Draft-support row (intro line + download button) ---- */
.draft-support-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0.25rem 0 1.1rem;
}
.draft-support {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  flex: 1 1 460px;
}
.draft-support-row .bill-download {
  margin-left: auto;
}

/* ---- Bill text document ---- */
.bill-block {
  margin: 0;
}
.bill-block__actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
}
.bill {
  margin: 0;
  padding: 30px 34px;
  background: var(--card);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

/* ---- Download / pill button ---- */
.bill-download {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1.5px solid var(--accent-line);
  border-radius: 100px;
  padding: 8px 18px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.bill-download::after {
  content: "↓";
  margin-left: 0.45rem;
  line-height: 1;
}
.bill-download:hover {
  text-decoration: none;
  background: var(--accent-tint);
  border-color: var(--accent);
}

/* ---- TOC (index bill list) ---- */
.toc {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  counter-reset: toc;
  font-size: 17px;
}
.toc > li {
  counter-increment: toc;
  position: relative;
  padding: 22px 0 18px 48px;
  border-top: 1px solid var(--rule);
}
.toc > li:first-child {
  border-top: none;
}
.toc > li::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.toc > li > a {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: currentColor; /* match the link text (near-black), not the accent */
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  line-height: 1.35;
}
.toc > li > a:hover {
  color: var(--accent);
}
.toc ul {
  margin: 10px 0 0;
  padding: 0 0 0 1.1rem;
  list-style: disc;
  font-size: 15px;
  color: var(--muted);
}
.toc ul li {
  margin: 5px 0;
  line-height: 1.5;
}
.toc ul li::marker {
  color: var(--accent-line);
}

/* ---- Badge ---- */
.badge,
.badge-ml {
  display: inline-block;
  border: 1px solid var(--warm-border);
  background: var(--panel);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted);
}

/* ---- Grid ---- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 880px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* =====================================================================
   Footers — the chrome JS injects this markup; styled here so bill pages
   (which load only this stylesheet) render the current CASPR footer.
   ===================================================================== */
.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 2rem;
  font-size: 13px;
  color: var(--s400);
  text-align: center;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

.editorial-footer {
  background: linear-gradient(135deg, #5663cd 0%, #7481dd 100%);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 40px 40px;
  font-size: 17px;
  line-height: 1.7;
  font-family: var(--font-body);
}
.editorial-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}
.editorial-footer a:hover {
  color: #fff;
  text-decoration: none;
}
.editorial-footer .footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.editorial-footer p {
  margin: 4px 0;
  color: rgba(255, 255, 255, 0.7);
}
.editorial-footer .footer-bottom {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.35);
}
.editorial-footer .footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 48px;
}
.editorial-footer .footer-brand img {
  filter: none;
  height: 104px;
  width: auto;
  margin-bottom: 20px;
}
.editorial-footer .footer-brand p {
  margin: 4px 0;
}
.editorial-footer .footer-note {
  margin-top: 14px;
  max-width: 340px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
}
.editorial-footer .footer-col h5 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 14px;
  opacity: 0.92;
}
.editorial-footer .footer-col a {
  display: block;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}
.editorial-footer .footer-col a:hover {
  color: #fff;
}
@media (max-width: 860px) {
  .editorial-footer .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .editorial-footer .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .editorial-footer {
    padding: 40px 16px 28px;
  }
  .editorial-footer .footer-top {
    flex-direction: column;
  }
}
@media (max-width: 520px) {
  .editorial-footer .footer-cols {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Scorecard sub-nav (the "Online Gambling Research Center" pill row,
   injected by the chrome JS). Kept in sync with assets/site.css.
   ===================================================================== */
.nav-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--s200);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
}
.nav-links {
  display: flex;
  gap: 2px;
  background: rgb(224, 233, 255);
  border-radius: 8px;
  padding: 4px;
}
.nav-links a,
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--s800);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  border: none;
}
.nav-links a:hover,
.nav__link:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--s900);
  text-decoration: none;
}
.nav__link--active {
  background: #fff;
  color: var(--s900) !important;
  font-weight: 600;
}
@media (max-width: 720px) {
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-links a,
  .nav__link {
    font-size: 13px;
    padding: 6px 8px;
  }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .container {
    padding: 24px 18px 64px;
  }
  .bill {
    padding: 20px 18px;
    font-size: 14px;
  }
  .rationale,
  .panel {
    padding: 18px 18px;
  }
  .toc > li {
    padding-left: 40px;
  }
}
