/* Texas AI Law — design system per brief sections 2 and 3.
   Paper #F7F6F1, Ink #202925, Forest #24313C, Sage #DEE3E6,
   White #FFFFFF, Link #2F3B46, Muted #5A636B, Rule #C9D0D4.
   Poppins Medium headings and navigation, Poppins Light body. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/poppins-light.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-medium.woff2") format("woff2");
}

:root {
  --paper: #F7F6F1;
  --ink: #202925;
  --forest: #24313C;
  --sage: #DEE3E6;
  --white: #FFFFFF;
  --link: #2F3B46;
  --muted: #5A636B;
  --rule: #C9D0D4;
  --max: 1200px;
  --prose: 702px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink);
}

h1.article-title { font-size: 54px; }
h2 { font-size: 34px; margin-top: 48px; }
h3 { font-size: 24px; margin-top: 32px; }

p { margin: 0 0 16px; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--forest); }

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
  border-radius: 2px;
}

img { max-width: 100%; height: auto; display: block; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 200;
  background: var(--forest);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 12px; color: var(--white); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 88px;
}

.brand { flex: 0 1 auto; min-width: 0; line-height: 1; text-decoration: none; }
.brand img { height: 40px; width: auto; max-width: 100%; display: block; }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 2px;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover { color: var(--forest); border-bottom-color: var(--sage); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--forest); }

.header-actions { display: none; }

.menu-button {
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  background: var(--forest);
  color: var(--white);
  border: 1px solid var(--forest);
  border-radius: 4px;
  cursor: pointer;
}

.mobile-menu {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.mobile-menu nav { padding: 16px 0 24px; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { border-top: 1px solid var(--rule); }
.mobile-menu a {
  display: block;
  padding: 14px 4px;
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.mobile-menu a[aria-current="page"] { color: var(--forest); }

/* Site version selector in the mobile menu (shared family feature;
   storage key "trl-site-version", driven by site-version.js). */
.site-version { padding: 20px 0 28px; }
.site-version-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 10px;
}
.site-version-options {
  display: inline-flex;
  border: 1px solid var(--forest);
  border-radius: 4px;
  overflow: hidden;
}
.site-version-btn {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  min-height: 44px;
  padding: 8px 22px;
  background: var(--white);
  color: var(--forest);
  border: 0;
  cursor: pointer;
}
.site-version-btn + .site-version-btn { border-left: 1px solid var(--forest); }
.site-version-btn[aria-pressed="true"] { background: var(--forest); color: var(--white); }

.menu-close-row { display: flex; justify-content: flex-end; padding-top: 8px; }
.menu-close {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  min-height: 44px;
  padding: 8px 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
  cursor: pointer;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb { padding: 24px 0 0; font-size: 15px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li { display: inline; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.breadcrumb a { color: var(--link); }
.breadcrumb [aria-current="page"] { color: var(--muted); }

/* ---------- Article header ---------- */

.article-head { max-width: var(--prose); padding: 24px 0 8px; }
.kicker {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  margin: 0 0 12px;
}
.deck { font-size: 20px; line-height: 1.55; color: var(--ink); }

.date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  margin: 24px 0 32px;
}
.date-row .sep { color: var(--rule); }

.article-dates { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.article-status { font-size: 15px; color: var(--muted); margin: 6px 0 0; }
.article-dates time { white-space: nowrap; }
.checked-through { font-size: 15px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Prose ---------- */

.prose { max-width: var(--prose); }
.prose ul, .prose ol { padding-left: 28px; }
.prose li { margin-bottom: 8px; }

.spacer { height: 48px; }

/* ---------- Homepage hero / slideshow ---------- */

.hero {
  background: var(--forest);
  padding: 48px 0 40px;
  color: var(--white);
}

.slideshow { max-width: 1000px; margin: 0 auto; }

.slide { margin: 0; }
.slide[hidden] { display: none; }

.slide-link { display: block; text-decoration: none; color: var(--ink); }
.slide-link:hover { color: var(--ink); }

.slide-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--sage);
  border-radius: 6px 6px 0 0;
}

.slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-caption {
  background: var(--paper);
  color: var(--ink);
  padding: 24px 28px;
  border-radius: 0 0 6px 6px;
}

.slide-title {
  display: block;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.slide-link:hover .slide-title, .slide-link:focus-visible .slide-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.slide-text { display: block; font-size: 17px; color: var(--ink); }

.slide-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.slide-controls button {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 18px;
  border-radius: 4px;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.slide-controls button:hover { background: rgba(255, 255, 255, 0.14); }
.slide-controls button:focus-visible { outline-color: var(--white); }

.slide-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.slide-dots button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 15px;
}
.slide-dots button[aria-current="true"] { background: var(--white); color: var(--forest); }

/* ---------- Homepage sections ---------- */

.home-section { padding: 56px 0; }
.home-section + .home-section { border-top: 1px solid var(--rule); }
.home-section h2 { margin-top: 0; }
.section-lede { max-width: var(--prose); font-size: 19px; }

.question-list { list-style: none; margin: 0; padding: 0; max-width: var(--prose); }
.question-list li { border-bottom: 1px solid var(--rule); }
.question-list a.question-link {
  display: block;
  padding: 16px 4px;
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.question-list a.question-link:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.question-list .question-text {
  display: block;
  padding: 16px 4px 4px;
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
}
.question-list .question-guides {
  display: block;
  padding: 0 4px 16px;
  font-size: 15px;
  color: var(--muted);
}
.question-list .question-guides a {
  display: inline;
  padding: 0;
  font-size: inherit;
  font-weight: 400;
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
  min-height: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card h2, .card h3 { font-size: 22px; margin: 0 0 12px; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.card p { font-size: 16px; margin: 0 0 12px; }
.card .card-meta { font-size: 14px; color: var(--muted); margin-top: auto; padding-top: 8px; }
.card .card-link { font-weight: 500; margin-top: 8px; }

.link-more { display: inline-block; margin-top: 24px; font-weight: 500; }

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

.contents {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 0 0 32px;
  max-width: var(--prose);
}
.contents h2 { font-size: 20px; margin: 0 0 12px; }
.contents ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.contents li { margin-bottom: 6px; break-inside: avoid; }
.contents a { font-size: 16px; }

/* ---------- Unified article layout (unified-layout pass, Oct 2026) ----------
   The shared family article structure in this site's palette: the guide
   lead is the summary panel (pale sage tint, forest top rule, the same
   restrained treatment IP Law gives its cream panel); at desktop widths
   the contents list becomes a sticky rail beside a 702px reading column,
   with the rail scrolling internally on shorter viewports. DOM order is
   unchanged at every width: head, lead, contents, prose. */

.lead {
  background: #EDF0F2;
  border-top: 10px solid var(--forest);
  padding: 24px 28px;
  margin: 0 0 32px;
  max-width: var(--prose);
}
.lead p { margin: 0 0 12px; }
.lead p:last-child { margin-bottom: 0; }

.toc {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 24px;
  margin: 0 0 32px;
  max-width: var(--prose);
}
.toc .toc-title { font-size: 20px; margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 6px; }
.toc li:last-child { margin-bottom: 0; }
.toc a { font-size: 16px; }

.prose section:first-child > h2 { margin-top: 0; }

/* Two-column composition (AI Law's shipped article-layout values): the
   head and the lead sit in the reading column (column 2); the contents
   rail sits beside the prose. Below 1100px the grid stacks in DOM order
   (head, lead, contents, prose) so the rail stays fully reachable. */
.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, var(--prose));
  gap: 8px clamp(40px, 5vw, 80px);
  justify-content: center;
  align-items: start;
}
.article-layout > .article-head {
  grid-column: 2;
  grid-row: 1;
  max-width: none;
}
.article-layout > .lead {
  grid-column: 2;
  grid-row: 2;
  max-width: none;
  margin-bottom: 16px;
}
.article-layout > .toc {
  grid-column: 1;
  grid-row: 3;
  max-width: none;
  margin: 0;
  position: sticky;
  top: 24px;
  /* The rail never runs past the viewport; a long rail scrolls
     internally and stays fully usable in shorter windows. */
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.article-layout > .prose {
  grid-column: 2;
  grid-row: 3;
  max-width: none;
}

@media (max-width: 1099px) {
  .article-layout { grid-template-columns: minmax(0, var(--prose)); }
  .article-layout > .article-head,
  .article-layout > .lead,
  .article-layout > .toc,
  .article-layout > .prose {
    grid-column: 1;
    grid-row: auto;
    max-width: var(--prose);
    margin-inline: auto;
    width: 100%;
  }
  .article-layout > .lead { margin-bottom: 32px; }
  .article-layout > .toc { position: static; margin-bottom: 32px; }
}

/* ---------- Key authorities ---------- */

.authority-group { margin-bottom: 24px; }
.authority-group h3 { font-size: 20px; margin-bottom: 8px; }

/* ---------- Sources ---------- */

.source-list { list-style: none; margin: 0; padding: 0; max-width: var(--prose); }
.source-list li {
  border-top: 1px solid var(--rule);
  padding: 14px 0;
  font-size: 16px;
}
.source-list .source-title { font-weight: 500; }
.source-list .source-meta { color: var(--muted); font-size: 15px; }

/* ---------- Related reading ---------- */

.related-list { list-style: none; margin: 0; padding: 0; max-width: var(--prose); }
.related-list li { margin-bottom: 10px; font-size: 17px; }

/* ---------- Tracker ---------- */

.tracker-filters {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px;
  margin: 24px 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.field label { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
.field input[type="search"], .field select {
  width: 100%;
  min-height: 44px;
  font-family: var(--font);
  font-size: 16px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
}

.button {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 4px;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
}
.button.secondary { background: transparent; color: var(--forest); }

.filter-status { font-size: 15px; color: var(--muted); margin: 0 0 16px; }

/* Tracker index filter form. The form carries id tracker-filters (the
   .tracker-filters grid class belongs to an earlier markup pattern and
   never matched it), so its fields sized to their widest option and
   overflowed phone and tablet widths. Fields now stack at a bounded
   width, matching the .field treatment used elsewhere. */
#tracker-filters { margin: 24px 0 8px; }
#tracker-filters label {
  display: block;
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 14px;
}
#tracker-filters input[type="search"],
#tracker-filters select {
  display: block;
  width: 100%;
  max-width: 430px;
  min-height: 44px;
  margin-top: 6px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 300;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
}
#tracker-filters button,
#tracker-clear-empty {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 4px;
  border: 1px solid var(--forest);
  background: var(--forest);
  color: var(--white);
  cursor: pointer;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--white);
  margin-bottom: 48px;
}

/* Content tables inside a .table-scroll region: the shared family
   treatment (flat, sage header row, hairline row rules, top-aligned
   cells), matching AI Law's prose tables in this palette. */
.table-scroll table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
.table-scroll th, .table-scroll td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
.table-scroll th { font-weight: 500; }
.table-scroll thead th {
  background: var(--sage);
  border-bottom: 2px solid var(--rule);
}
.table-scroll tbody tr:last-child td { border-bottom: 0; }

.table-scroll table caption {
  text-align: left;
  padding: 16px;
  font-weight: 500;
  font-size: 17px;
}

/* Verbatim statutory blockquotes (GEO pilot, Nov 11, 2026): forest
   left rule, citation in muted small text. */
.prose blockquote {
  margin: 0 0 24px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--forest);
}
.prose blockquote p { margin-bottom: 12px; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite {
  font-style: normal;
  font-size: 14px;
  color: var(--muted);
}

table.tracker { border-collapse: collapse; width: 100%; min-width: 1100px; font-size: 15px; }
table.tracker caption { text-align: left; padding: 16px; font-weight: 500; font-size: 17px; }
table.tracker th, table.tracker td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-top: 1px solid var(--rule);
}
table.tracker thead th {
  background: var(--sage);
  font-weight: 500;
  white-space: nowrap;
  border-top: 0;
}
table.tracker tbody tr:hover { background: var(--paper); }
table.tracker .rec-title { font-weight: 500; }
table.tracker .rec-id { color: var(--muted); font-size: 13px; }

.empty-row td { text-align: center; padding: 32px; font-size: 17px; }

/* ---------- Definitions ---------- */

.def-list { max-width: var(--prose); }
.def-list dt { font-weight: 500; font-size: 20px; margin: 32px 0 4px; }
.def-list dd { margin: 0 0 8px; }
.def-list .def-applies { font-size: 15px; color: var(--muted); }

/* ---------- Search ---------- */

.search-form { max-width: var(--prose); margin: 24px 0; }
.search-row { display: flex; gap: 12px; }
.search-row input[type="search"] {
  flex: 1;
  min-height: 48px;
  font-family: var(--font);
  font-size: 17px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink);
}
.search-results { list-style: none; margin: 24px 0; padding: 0; max-width: var(--prose); }
.search-results li { border-top: 1px solid var(--rule); padding: 16px 0; }
.search-results .result-title { font-weight: 500; font-size: 19px; }
.search-results .result-url { font-size: 14px; color: var(--muted); }
.search-results .result-excerpt { font-size: 16px; margin-top: 4px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest);
  color: var(--white);
  padding: 48px 0 32px;
  margin-top: 64px;
}

.site-footer .footer-note { font-size: 19px; font-weight: 500; margin-bottom: 24px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-bottom: 32px; }
.footer-links a { color: var(--white); font-size: 16px; }
.footer-links a:hover { color: var(--sage); }
.footer-links .footer-group-label { width: 100%; font-size: 14px; color: var(--sage); margin: 16px 0 0; }

.footer-copy { font-size: 14px; color: var(--sage); border-top: 1px solid rgba(255,255,255,0.25); padding-top: 24px; }
.site-footer :focus-visible { outline-color: var(--white); }

/* ---------- Tablet ---------- */

@media (max-width: 1199px) {
  .wrap { padding-left: 32px; padding-right: 32px; }
  .header-inner { min-height: 76px; }
  .site-nav { display: none; }
  .header-actions { display: block; margin-left: auto; }
  h1.article-title { font-size: 44px; }
  h2 { font-size: 30px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .tracker-filters { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile ---------- */

@media (max-width: 699px) {
  body { font-size: 17px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .header-inner { min-height: 68px; gap: 16px; }
  .brand img { height: 32px; max-width: 220px; }
  h1.article-title { font-size: 34px; }
  h2 { font-size: 28px; }
  .hero { padding: 32px 0 28px; }
  .slide-title { font-size: 22px; }
  .slide-caption { padding: 20px; }
  .card-grid { grid-template-columns: 1fr; }
  .contents ul { columns: 1; }
  .tracker-filters { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; }
  .slide-dots { margin-left: 0; }
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 16px;
  background: var(--forest);
  color: var(--white);
  border: 1px solid var(--forest);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(32, 41, 37, 0.25);
}

.to-top:hover,
.to-top:focus-visible {
  background: var(--link);
  border-color: var(--link);
}

/* ---------- Search page ---------- */
#site-search { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
#site-search input[type="search"] { flex: 1 1 320px; padding: 12px 16px; font-size: 17px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--ink); }
#site-search button { padding: 12px 20px; font-size: 16px; border-radius: 6px; cursor: pointer; }
#site-search button[type="submit"] { background: var(--forest); color: #fff; border: 1px solid var(--forest); }
#search-clear { background: transparent; color: var(--ink); border: 1px solid var(--rule); }

#search-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 20px; border-bottom: 1px solid var(--rule); padding-bottom: 16px; }
#search-tabs [role="tab"] { background: transparent; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 16px; font-size: 15px; cursor: pointer; color: var(--ink); }
#search-tabs [role="tab"][aria-selected="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

#search-facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; margin: 0 0 20px; padding: 16px 20px; background: #fff; border: 1px solid var(--rule); border-radius: 8px; }
#search-facets h2 { grid-column: 1 / -1; font-size: 17px; margin: 0; }
#search-facets label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
#search-facets select { width: 100%; padding: 8px 10px; font-size: 15px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--ink); }

#search-status { font-size: 15px; color: var(--muted); margin: 16px 0; }
#search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.result-card { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 18px 20px; }
.result-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--forest); border: 1px solid var(--sage); border-radius: 4px; padding: 3px 8px; margin-bottom: 8px; }
.result-title { display: block; font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.result-excerpt { margin: 0; color: var(--ink); }

#search-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
#search-chips button { background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; color: var(--ink); }
#search-chips button:hover { border-color: var(--forest); color: var(--forest); }

#search-no-results, #search-error { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 24px; margin-top: 20px; }
#search-no-results ul { margin: 12px 0; padding-left: 24px; }
#search-no-results li { margin-bottom: 6px; }

/* ---------- Worksheet fields ---------- */

input.fill {
  font-family: var(--font);
  font-size: 16px;
  border: none;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  min-width: 220px;
  padding: 2px 4px;
  color: var(--ink);
}
input.fill:focus { outline: 2px solid var(--forest); outline-offset: 2px; }

.print-row { margin: 16px 0; }
.print-btn {
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  padding: 10px 20px;
  background: var(--forest);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.print-btn:hover { opacity: 0.9; }

@media print {
  .site-header, .site-footer, .print-row, .menu-button { display: none !important; }
  input.fill { border-bottom: 1px solid #000; }
  body { font-size: 12pt; }
  .wrap { max-width: 100%; padding: 0; }
}

/* ---------- Mobile tables ---------- */

@media (max-width: 699px) {
  .article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Tables already inside a .table-scroll region scroll in that region,
     not as a second nested scroller. */
  .article .table-scroll > table { display: table; }
}

/* ---------- Hub rewrite (Oct 18, 2026) ---------- */

.hub-foundational, .hub-questions, .hub-list, .hub-resources,
.hub-insights, .hub-authorities {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}
.hub-foundational li, .hub-resources li, .hub-insights li, .hub-authorities li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.hub-foundational li:last-child, .hub-resources li:last-child,
.hub-insights li:last-child, .hub-authorities li:last-child {
  border-bottom: none;
}
.hub-foundational p, .hub-resources p, .hub-insights p, .hub-authorities p {
  margin: 8px 0 0;
}
.hub-questions li { margin-bottom: 12px; }
.hub-list li { margin-bottom: 8px; }
.hub-date, .hub-meta {
  font-size: 14px;
  color: var(--muted);
}
.hub-group-nav {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.hub-more {
  margin: 0 0 32px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 20px;
  background: var(--white);
}
.hub-more summary {
  font-weight: 500;
  cursor: pointer;
  font-size: 17px;
}
.hub-more ul { margin-top: 16px; }

/* Definitions page: compact alphabetical index */
.def-index ol {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  columns: 3;
  column-gap: 32px;
}
.def-index li {
  break-inside: avoid;
  margin-bottom: 6px;
  font-size: 15px;
}
@media (max-width: 900px) {
  .def-index ol { columns: 2; }
}
@media (max-width: 600px) {
  .def-index ol { columns: 1; }
}
.definition {
  scroll-margin-top: 80px;
  margin-bottom: 32px;
  overflow-wrap: break-word;
  max-width: var(--prose);
}
.def-scope {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 12px;
}
.def-authorities {
  font-size: 14px;
  margin-top: 12px;
}

/* ---------- Resource worksheets (Oct 2026 review) ---------- */

.index-group { margin-top: 32px; }
.worksheet-notes {
  background: #f5f7f5;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0 24px;
}
.worksheet-notes p { margin: 8px 0; }
p.field label { display: block; margin-bottom: 12px; }

/* Discreet author link at the end of article pages. */
.article-author { margin-top: 2rem; font-size: 0.95rem; }
