/* 3DPrintingIsNotACrime.org — state detail pages
 *
 * Palette, type scale, and component styles are taken directly from the
 * existing AB2047 page (the3dprintingnerd.com/ab2047) so the two sites read
 * as one project. Class names are kept the same on purpose, so anything
 * lifted from that page drops in here unchanged.
 */

:root {
  color-scheme: light;

  --cream: #FBF7EE;
  --paper: #fff;
  --navy: #0B3B5C;
  --navy-deep: #072B44;
  --navy-line: #1a4a6b;
  --orange: #E8794B;
  --orange-dark: #d56838;
  --gold: #F4B942;
  --teal: #1F8A8A;
  --rust: #B83A1A;

  --ink: #1A2B3C;
  --body: #3C4D5E;
  --muted: #5B6B7C;
  --rule: #E4DFD2;

  --peach: #FBE3D6;
  --peach-ink: #A14722;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

section { padding: 64px 0; }

/* The nav is sticky and ~79px tall, so anchored sections must reserve room
   or the heading lands underneath it. */
section[id], .hero { scroll-margin-top: 96px; }

/* --------------------------------------------------------------- banner */

.banner {
  background: var(--navy);
  color: var(--cream);
  padding: 10px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.banner a {
  color: var(--gold);
  text-decoration: underline;
  margin-left: 8px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ nav */

.nav {
  border-bottom: 1px solid var(--rule);
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
  background: rgba(251, 247, 238, 0.95);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  /* The wordmark must not wrap when a page has a long jump-link list. */
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-badge {
  background: var(--navy);
  color: var(--cream);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a { color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--navy); }

.nav-cta {
  /* Darker than --orange so white text clears 4.5:1. */
  background: #B4501F;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-cta:hover { background: #93400F; transform: translateY(-1px); }

/* ----------------------------------------------------------------- hero */

.hero { padding: 72px 0 52px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--peach);
  color: var(--peach-ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

/* Status recolours the eyebrow, echoing the map legend. */
.status-enacted .hero-eyebrow { background: #DCEFEF; color: #166B6B; }
.status-enacted .hero-eyebrow .dot { background: var(--teal); }
.status-failed .hero-eyebrow { background: #E0E8EF; color: var(--navy); }
.status-failed .hero-eyebrow .dot { background: var(--navy); }
.status-pending .hero-eyebrow .dot { animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

h1.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 18px;
}

h1.hero-title em { font-style: italic; color: var(--orange); font-weight: 500; }

.hero-bill {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--body);
  max-width: 620px;
}

/* -------------------------------------------------------- section titles */

.section-title { max-width: 760px; margin-bottom: 36px; }

.section-title .eyebrow {
  display: inline-block;
  background: var(--navy);
  color: var(--cream);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-title h2 em { font-style: italic; color: var(--orange); font-weight: 500; }

/* The overview card sits directly under the hero, so it needs no top gap. */
.overview-body { padding-top: 0; }

/* ---------------------------------------------------------------- cards */

.bill-card {
  background: var(--paper);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--rule);
  box-shadow: 0 2px 12px rgba(11, 59, 92, 0.04);
}

.prose p { color: var(--body); font-size: 17px; line-height: 1.7; }
.prose p + p { margin-top: 1.1em; }
.prose p:first-child { font-size: 18px; color: var(--ink); }

/* The support card carries one line of copy above its button. Matches the
   prose body so the card reads like the note above it, not like an ad. */
.support-line {
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
  max-width: 62ch;
  margin-bottom: 24px;
}

/* Numbered provisions, styled like the AB2047 bill steps. */
.bill-steps { list-style: none; }

.bill-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.bill-step:first-child { padding-top: 0; }
.bill-step:last-child { border-bottom: none; padding-bottom: 0; }

.bill-num {
  background: var(--navy);
  color: var(--cream);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  font-family: 'Fraunces', serif;
}

.bill-step p { color: var(--body); font-size: 16px; line-height: 1.55; padding-top: 9px; }

/* Plain-language callout — the AB2047 ".bill-plain" treatment. */
.bill-plain {
  background: var(--peach);
  border-radius: 10px;
  padding: 22px 24px;
  font-size: 16px;
  line-height: 1.6;
  color: #5A2E0F;
}

.bill-plain strong {
  display: block;
  color: var(--peach-ink);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-weight: 800;
}

/* --------------------------------------------------- public input */

.input-note {
  color: var(--body);
  font-size: 17px;
  line-height: 1.7;
  max-width: 780px;
  margin-bottom: 24px;
}

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.input-col { padding: 32px 34px; }

.input-head {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--teal);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--rule);
}

.input-list { list-style: none; }

.input-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.input-item:last-child { border-bottom: none; padding-bottom: 0; }

/* The date sits above its heading as a small navy tag. */
.input-when {
  display: inline-block;
  background: var(--navy);
  color: var(--cream);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 9px;
}

.input-item h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.input-item p {
  color: var(--body);
  font-size: 16px;
  line-height: 1.6;
  margin-top: 6px;
}

@media (max-width: 860px) {
  .input-grid { grid-template-columns: 1fr; }
  .input-col { padding: 26px 24px; }
}

/* --------------------------------------------- civic engagement matrix */

.engage-list { list-style: none; }

.engage-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.engage-item:first-child { padding-top: 0; }
.engage-item:last-child { border-bottom: none; padding-bottom: 0; }

.engage-item h3 {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 16px;
}

.engage-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Virginia and Delaware carry two fields per row rather than three, and the
   contact blocks carry four. Both read better on an even grid than on three
   columns with a stranded last cell. */
.engage-fields:has(.engage-field:nth-child(2):last-child),
.engage-fields:has(.engage-field:nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.engage-label {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--teal);
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 2px solid var(--rule);
}

.engage-field p {
  color: var(--body);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 860px) {
  .engage-fields,
  .engage-fields:has(.engage-field:nth-child(2):last-child) {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .engage-item h3 { font-size: 19px; }
}

/* -------------------------------------------------------------- sources */

.sources-list { list-style: none; display: grid; gap: 10px; }

.sources-list a {
  display: inline-block;
  color: var(--navy);
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid rgba(11, 59, 92, 0.3);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.sources-list a:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 59, 92, 0.18);
}

.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------------------- siblings */

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chips a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.15s;
}

.chips a:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-1px); }

/* ------------------------------------------------- updates / changelog */

.feed-url {
  display: inline-block;
  margin-top: 6px;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--navy);
  /* A long URL must not push the card wider than the phone. */
  word-break: break-all;
}

.feed-direct { margin-top: 26px; }

.log { list-style: none; }

.log-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

.log-entry:last-child { border-bottom: none; }

.log-entry time {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: var(--muted);
  padding-top: 4px;
}

.log-entry h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 6px;
}

.log-entry p { color: var(--body); font-size: 16px; line-height: 1.55; }

/* "Last reviewed" stamp under a state's hero. */
.reviewed { margin-top: 18px; font-size: 13px; color: var(--muted); }

@media (max-width: 620px) {
  .log-entry { grid-template-columns: 1fr; gap: 8px; }
}

/* --------------------------------------------------------------- footer */

footer { background: var(--navy); color: #B8C9D8; padding: 60px 0 30px; }

.footer-brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 26px;
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-brand em { color: var(--gold); font-style: italic; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid p { font-size: 14px; line-height: 1.6; max-width: 42ch; }

.footer-grid h5 {
  color: var(--cream);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-grid a { display: block; padding: 5px 0; font-size: 14px; transition: color 0.15s; }
.footer-grid a:hover { color: var(--gold); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--navy-line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  flex-wrap: wrap;
}

.footer-bottom .disclaimer { max-width: 68ch; }

/* ----------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .wrap { padding: 0 24px; }
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  section { padding: 44px 0; }
  .hero { padding: 44px 0 32px; }
  .bill-card { padding: 26px 22px; }
  .nav-brand span:not(.nav-badge) { font-size: 15px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

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

/* --------------------------------------------------------------- regions */

.regions { list-style: none; }

.region {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.region:first-child { padding-top: 0; }
.region:last-child { border-bottom: none; padding-bottom: 0; }

.region-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--muted);
}

.region-pending { background: var(--orange); }
.region-enacted { background: var(--teal); }
.region-failed  { background: var(--navy); }

.region h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--navy);
  margin-bottom: 4px;
}

.region p { color: var(--body); font-size: 15px; }

.region h3 a { color: var(--navy); border-bottom: 1px solid rgba(11,59,92,0.3); }
.region h3 a:hover { color: var(--orange); border-bottom-color: var(--orange); }

.region-count {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- byline */

/* Sits at the foot of the creator's note on the About page. */
.byline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.byline .initials {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cream);
  background: var(--navy);
}

.byline .avatar {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--navy);
}

.byline .who { line-height: 1.4; }

.byline .who strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.byline .who > span { color: var(--muted); font-size: 14px; }

.byline .ig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.byline .ig:hover,
.byline .ig:focus-visible { border-bottom-color: var(--orange); outline: none; }
