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

:root {
  --navy: #1a2744;
  --blue: #2c4a8c;
  --light-blue: #4a6fa5;
  --gold: #c8952a;
  --light-gray: #f4f6f9;
  --border: #dde1e8;
  --text: #2d3748;
  --text-light: #64748b;
  --white: #ffffff;
  --green: #1e7a45;
  --red: #c0392b;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ── */
header {
  background: var(--navy);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.logo {
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--white) !important;
  text-decoration: none !important;
  letter-spacing: 1px;
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-law { color: var(--white); }
.logo-shield { color: #ffd980; }
.logo-img {
  height: 22px;
  width: 22px;
  display: block;
  object-fit: contain;
}
nav { display: flex; align-items: center; gap: 0.25rem; }
nav a {
  color: rgba(255,255,255,0.82);
  padding: 0.35rem 0.75rem;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
nav a:hover { color: var(--white); background: rgba(255,255,255,0.1); text-decoration: none; }

/* ── Ad Banner — collapses when empty ── */
.ad-banner {
  background: var(--light-gray);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  min-height: 0;
}
.ad-banner .container { padding-top: 0.4rem; padding-bottom: 0.4rem; }
/* hide the banner entirely until adsbygoogle fills it */
.ad-banner ins:empty { display: none; }
.ad-banner:has(ins:empty) { display: none; }

/* ── Main Layout ── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 2.5rem;
  padding: 2rem 1.25rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
main { min-width: 0; }
aside { position: sticky; top: 72px; }

/* ── Sidebar ── */
.sidebar-box {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}
.sidebar-box h3 {
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gold);
  font-family: Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.state-list-mini {
  list-style: none;
  columns: 2;
  column-gap: 0.5rem;
  max-height: 260px;
  overflow-y: auto;
}
.state-list-mini li { margin-bottom: 0.2rem; }
.state-list-mini a { font-size: 0.8rem; color: var(--blue); line-height: 1.4; }
.state-list-mini a:hover { color: var(--navy); }
.sidebar-box ul { list-style: none; }
.sidebar-box ul li { margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.sidebar-box ul li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-box ul a { font-size: 0.88rem; color: var(--blue); }

/* ── Hero ── */
.hero {
  background: linear-gradient(140deg, #0f1c3a 0%, #1a2744 40%, #2c4a8c 100%);
  color: white;
  padding: 3.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
}
.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
  color: #fff;
  line-height: 1.25;
}
.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  margin-bottom: 1.75rem;
  font-family: Arial, sans-serif;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

.search-box { position: relative; max-width: 520px; margin: 0 auto; }
.search-box input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  outline: none;
  color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 200;
}
.search-dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}
.search-dropdown a:last-child { border-bottom: none; }
.search-dropdown a:hover { background: var(--light-gray); }

/* ── Disclaimer ── */
.disclaimer-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3px solid #d97706;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
  font-family: Arial, sans-serif;
  color: #78350f;
}
.disclaimer {
  background: #fffbeb;
  border-left: 4px solid #d97706;
  padding: 0.65rem 1rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.82rem;
  font-family: Arial, sans-serif;
  border-radius: 0 4px 4px 0;
  color: #78350f;
}

/* ── Section Titles ── */
.section-title {
  font-size: 1.3rem;
  color: var(--navy);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
  font-family: Arial, sans-serif;
}

/* ── States Grid ── */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.7rem 0.5rem;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  transition: all 0.15s;
  text-decoration: none !important;
}
.state-card:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-1px); }
.state-card:hover .state-abbr, .state-card:hover .state-name { color: white; }
.state-abbr { font-weight: bold; font-size: 1rem; color: var(--navy); font-family: Arial, sans-serif; }
.state-name { font-size: 0.72rem; color: var(--text-light); margin-top: 0.15rem; font-family: Arial, sans-serif; line-height: 1.2; }

/* ── Topic Cards ── */
.topic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.topic-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-decoration: none !important;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.topic-card:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(44,74,140,0.13); transform: translateY(-2px); }
.topic-icon { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--blue); }
.topic-card h3 { font-size: 0.95rem; color: var(--navy); margin-bottom: 0.35rem; font-family: Arial, sans-serif; font-weight: 600; }
.topic-card p { font-size: 0.8rem; color: var(--text-light); font-family: Arial, sans-serif; margin-bottom: 0; line-height: 1.4; }

.topic-cards-small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}
.topic-card-small {
  display: inline-block;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  font-size: 0.83rem;
  font-family: Arial, sans-serif;
  text-decoration: none !important;
  color: var(--blue);
  transition: all 0.12s;
}
.topic-card-small:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ── Recently Updated ── */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.recent-item {
  display: block;
  padding: 0.6rem 0.9rem;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.85rem;
  font-family: Arial, sans-serif;
  color: var(--blue);
  text-decoration: none !important;
  transition: all 0.12s;
  line-height: 1.35;
}
.recent-item:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ── Law Sections ── */
.law-section {
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.law-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
}
.law-table th {
  background: var(--navy);
  color: white;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
}
.law-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.law-table tr:last-child td { border-bottom: none; }
.law-table tr:nth-child(even) td { background: rgba(255,255,255,0.55); }
.law-table-wide { margin-bottom: 1rem; }

.law-note {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.75rem;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

/* ── Quick Facts / Highlight Box ── */
.quick-facts, .highlight-box {
  background: var(--navy);
  color: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.quick-facts h2, .highlight-box h2 { color: #ffd980; margin-bottom: 1rem; font-size: 1rem; font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0; }
.quick-facts ul { list-style: none; }
.quick-facts li { padding: 0.4rem 0; font-family: Arial, sans-serif; font-size: 0.88rem; border-bottom: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.95); }
.quick-facts li:last-child { border-bottom: none; }
.quick-facts strong { color: #ffd980; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { text-align: center; padding: 0.5rem; }
.stat-label { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.75); font-family: Arial, sans-serif; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { display: block; font-size: 1rem; font-weight: bold; color: #ffd980; line-height: 1.3; }

/* ── Status badges ── */
.status-legal { color: #22c55e; font-weight: bold; }
.status-illegal { color: #f87171; font-weight: bold; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.78rem;
  font-family: Arial, sans-serif;
  color: var(--text-light);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { color: var(--navy); }

/* ── Intro ── */
.intro {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  font-family: Arial, sans-serif;
  line-height: 1.65;
}

h1 { font-size: 1.75rem; color: var(--navy); margin-bottom: 0.6rem; line-height: 1.25; }
h2 { font-size: 1.2rem; color: var(--navy); margin: 1.75rem 0 0.65rem; }
h3 { font-size: 1rem; color: var(--navy); margin-bottom: 0.5rem; }
p { margin-bottom: 0.85rem; }
ul { padding-left: 1.5rem; margin-bottom: 0.85rem; }
li { margin-bottom: 0.3rem; }

/* Collapse ad slots when AdSense hasn't filled them */
ins.adsbygoogle:empty { display: none !important; }
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-inline:has(ins:empty) { margin: 0; }
.ad-inline { margin: 1.5rem 0; }

.states-grid-small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.state-link-small {
  font-size: 0.79rem;
  font-family: Arial, sans-serif;
  color: var(--blue);
  padding: 0.2rem 0.55rem;
  background: var(--light-gray);
  border-radius: 3px;
  border: 1px solid var(--border);
  transition: all 0.12s;
}
.state-link-small:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.88);
  margin-top: 3rem;
  padding: 2.5rem 0 1rem;
  font-family: Arial, sans-serif;
  font-size: 0.84rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
}
footer h4 { color: #ffd980; margin-bottom: 0.75rem; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.5px; }
footer p { color: rgba(255,255,255,0.82); line-height: 1.65; }
footer ul { list-style: none; padding: 0; }
footer li { margin-bottom: 0.45rem; }
footer a { color: rgba(255,255,255,0.82); }
footer a:hover { color: white; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1rem; text-align: center; color: rgba(255,255,255,0.65); font-size: 0.78rem; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  aside { position: static; }
  .state-list-mini { max-height: none; }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  nav a { padding: 0.3rem 0.5rem; font-size: 0.78rem; }
  .hero { padding: 2.5rem 1.25rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-sub { font-size: 0.95rem; }
  .states-grid { grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); }
  .topic-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  h1 { font-size: 1.5rem; }
  .recent-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .recent-grid { grid-template-columns: 1fr; }
  nav { gap: 0; }
  nav a { padding: 0.25rem 0.4rem; font-size: 0.72rem; }
}
