/* State Legal Snapshot — one-page printable reference.
 * Implements the "State Legal Snapshot" design (claude.ai/design project
 * "Abhortion"), with its chosen tweaks baked in: classic accent, compact
 * density. Rendered inside <doc-page> (assets/doc-page.js). */

:root {
  --paper: #f2ede3;
  --paper-2: #ebe5d7;
  --ink: #1b1a17;
  --ink-2: #2c2a25;
  --ink-mute: #5b574d;
  --ink-fade: #8a8579;
  --rule: #cdc6b5;
  --rule-soft: #ddd6c4;
  --navy: #1e2a44;
  --navy-2: #2a3858;
  --ochre: #8a6e3c;
  --ochre-soft: #b89a63;
  --green: #3f7d4f;
  --red: #9a3b2f;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:  "Source Sans 3",  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #d8d2c4; }
body { font-family: var(--sans); color: var(--ink); }

doc-page { --dp-paper: var(--paper); }

a { color: var(--navy); }
a:hover { color: var(--ochre); }

/* ---------- Screen-only toolbar ---------- */
.snapshot-bar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  display: flex;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
}
.snapshot-bar a, .snapshot-bar button {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--paper);
  background: var(--navy);
  border: none;
  border-radius: 3px;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 20, 19, 0.25);
}
.snapshot-bar a:hover, .snapshot-bar button:hover { background: var(--navy-2); color: var(--paper); }
@media print { .snapshot-bar { display: none; } }

/* ---------- Running header/footer ---------- */
.dp-header, .dp-footer {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.dp-header { padding-bottom: 24px; }
.dp-footer { padding-top: 14px; }
.dp-header .row, .dp-footer .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 10px;
}
.dp-header .row { border-bottom: 1px solid var(--rule); }
.dp-footer .row { border-top: 1px solid var(--rule); padding: 10px 0 0; }
.dp-footer {
  border-bottom: none;
  border-top: 1px solid var(--rule);
  padding-bottom: 0;
  padding-top: 10px;
}
.dp-header .brand { color: var(--ochre); font-weight: 600; }
.dp-header a { color: inherit; text-decoration: none; }
/* At print the footer is position:fixed at the sheet's bottom edge, and this
 * stylesheet's padding-bottom:0 overrides doc-page's ::slotted inset
 * (document styles beat shadow ::slotted). Re-add the inset here so the
 * footer clears the printer's unprintable bottom band (~0.3in). */
@media print {
  .dp-footer { padding-bottom: 0.45in; }
}

/* ---------- Masthead ---------- */
.doc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.doc-head .kicker {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 0 0 4px;
}
.doc-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
.doc-head .sub {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  margin: 5px 0 0;
}
.doc-head-right {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
}
.doc-head .asof {
  text-align: right;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--ink-fade);
  white-space: nowrap;
}
.doc-head .asof strong { display: block; color: var(--ink-2); font-size: 11.5px; margin-bottom: 2px; }
.doc-head .qr {
  display: block;
  width: 62px;
  text-align: center;
  text-decoration: none;
}
.doc-head .qr svg { display: block; width: 62px; height: 62px; }

/* ---------- Classification banner ---------- */
.classify-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  margin: 0 0 6px;
  background: var(--paper-2);
  border-left: 3px solid var(--navy);
}
.classify-banner .icon {
  font-size: 14px;
  color: var(--green);
  flex-shrink: 0;
  line-height: 1;
}
.classify-banner .txt {
  font-family: var(--serif);
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--ink);
}
.classify-banner .txt strong { font-weight: 600; }
.classify-banner.tone-ban { border-left-color: var(--red); }
.classify-banner.tone-ban .icon { color: var(--red); }
.classify-banner.tone-limit { border-left-color: var(--ochre); }
.classify-banner.tone-limit .icon { color: var(--ochre); }

/* ---------- Stat rail (dense inline facts, not a table/grid of boxes) ---------- */
.stat-rail {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 0 0 16px;
  break-inside: avoid;
}
.stat-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 9px 3px 0;
  margin-right: 9px;
  border-right: 1px solid var(--rule-soft);
  white-space: nowrap;
}
.stat-item:last-child { border-right: none; margin-right: 0; }
.stat-item .icon {
  font-size: 9.5px;
  color: var(--ink-fade);
  flex-shrink: 0;
}
.stat-item .icon.yes { color: var(--green); }
.stat-item .icon.no { color: var(--red); }
.stat-item .icon.flag { color: var(--ochre); }
.stat-item .k {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.stat-item .v {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.stat-item .v.yes { color: var(--green); }
.stat-item .v.no { color: var(--red); }

/* ---------- Section headings ---------- */
h2.sec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
  margin: 11px 0 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}
h2.sec:first-of-type { margin-top: 0; }
h2.sec .ic { font-size: 11.5px; color: var(--ochre); }
h3.sub {
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 10px 0 5px;
}
p.body-txt {
  font-family: var(--serif);
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0 0 5px;
}
/* Running text justifies so the right edge lines up; hyphenation keeps the
 * word spacing even (needs lang="en" on <html>, which the page sets). */
p.body-txt,
.classify-banner .txt,
.tl-item .ev,
.pending-item .effect,
.auth-item .why,
.doc-foot-note {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.cite-line {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-fade);
  margin: 0 0 8px;
}
.cite-line em { font-style: italic; color: var(--ink-mute); }

/* ---------- Two-column note ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

/* ---------- Penalty table ---------- */
table.pen-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: 9.5px;
}
table.pen-table thead th {
  text-align: left;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-fade);
  padding: 0 10px 5px 0;
  border-bottom: 1px solid var(--rule);
}
table.pen-table td {
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
  color: var(--ink-2);
  line-height: 1.35;
}
table.pen-table tr { break-inside: avoid; }

/* ---------- Timeline ---------- */
.timeline { margin: 0 0 4px; }
.tl-item {
  display: grid;
  grid-template-columns: 16px 60px 1fr;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid var(--rule-soft);
  break-inside: avoid;
}
.tl-item:last-child { border-bottom: none; }
.tl-item .ic { font-size: 10px; color: var(--ochre); }
.tl-item .date {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  color: var(--ochre);
  white-space: nowrap;
}
.tl-item .ev {
  font-family: var(--serif);
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink-2);
}

/* ---------- Pending changes ---------- */
.pending-item {
  display: flex;
  gap: 10px;
  padding: 4px 12px;
  margin: 0 0 5px;
  background: var(--paper-2);
  border-left: 2px solid var(--ochre);
  break-inside: avoid;
}
.pending-item .ic { font-size: 13px; color: var(--ochre); flex-shrink: 0; padding-top: 2px; }
.pending-item .name {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1px;
}
.pending-item .status {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-fade);
  margin: 0 0 3px;
}
.pending-item .effect {
  font-family: var(--serif);
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink-2);
  margin: 0;
}

/* ---------- Authorities list ---------- */
.auth-list { list-style: none; margin: 0; padding: 0; }
.auth-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule-soft);
  break-inside: avoid;
}
.auth-item:last-child { border-bottom: none; }
.auth-item .ic { font-size: 11px; color: var(--navy); padding-top: 2px; flex-shrink: 0; }
.auth-item .name {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--navy);
}
.auth-item .cite {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--ink-fade);
  margin-left: 6px;
}
.auth-item .why {
  font-family: var(--sans);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--ink-mute);
  margin: 2px 0 0;
}

.doc-foot-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 8.5px;
  line-height: 1.4;
  color: var(--ink-fade);
}
