html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.58;
  color: #1e2930;
  background: #f8f7f3;
}

body > header,
main,
footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  padding-top: 36px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: #14242d;
}

h1 {
  margin: 0 0 10px;
  font-size: 2.1rem;
}

h2 {
  margin-top: 32px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d9d4c8;
}

h3,
h4 {
  margin: 22px 0 12px;
}

a {
  color: #0f5f73;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #083f4d;
}

.muted,
footer,
.breadcrumbs {
  color: #66747c;
  font-size: 0.95rem;
}

.citation-count {
  color: #66747c;
  font-size: 0.92rem;
}

.case-meta {
  color: #66747c;
  font-size: 1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-chip {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid #c9c1b0;
  border-radius: 999px;
  background: #fffdf8;
  font-size: 0.9rem;
  text-decoration: none;
}

.breadcrumbs {
  margin-bottom: 18px;
}

.section-list {
  padding-left: 1.4rem;
}

.book-list {
  padding-left: 1.4rem;
}

.book-list li {
  margin: 0 0 26px;
}

.search-panel {
  margin: 8px 0 34px;
  padding: 20px;
  border: 1px solid #ddd6c7;
  border-radius: 6px;
  background: #fffdf8;
}

.search-grid {
  display: grid;
  gap: 10px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #c9c1b0;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}

.search-row button {
  padding: 10px 14px;
  border: 1px solid #0f5f73;
  border-radius: 4px;
  color: #fff;
  background: #0f5f73;
  font: inherit;
  cursor: pointer;
}

.search-row button:hover {
  background: #083f4d;
}

.search-status {
  min-height: 1.4em;
  color: #66747c;
}

.search-status.error {
  color: #a33a2a;
}

.search-results {
  display: grid;
  gap: 12px;
}

.search-result {
  padding: 14px;
  border: 1px solid #e0d8ca;
  border-radius: 6px;
  background: #fff;
}

.search-result p {
  margin: 6px 0 0;
}

.search-result-meta {
  color: #66747c;
  font-size: 0.92rem;
}

.show-more {
  justify-self: start;
  padding: 8px 14px;
  border: 1px solid #c9c1b0;
  border-radius: 4px;
  background: #fffdf8;
  color: #0f5f73;
  font: inherit;
  cursor: pointer;
}

.show-more:hover {
  border-color: #0f5f73;
}

.result-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.filter-chip {
  padding: 5px 12px;
  border: 1px solid #c9c1b0;
  border-radius: 999px;
  background: #fffdf8;
  color: #0f5f73;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.filter-chip:hover {
  border-color: #0f5f73;
}

.filter-chip.active {
  color: #fff;
  background: #0f5f73;
  border-color: #0f5f73;
}

@media (max-width: 640px) {
  .search-row {
    flex-direction: column;
  }
}

.section-list li {
  margin: 0 0 18px;
}

.section-list p {
  margin: 6px 0 0;
}

pre {
  white-space: pre-wrap;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid #ddd6c7;
  border-radius: 6px;
  background: #fffdf8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

a.cite {
  color: #0b6677;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a.xref {
  color: #0b6677;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.opinion-body {
  line-height: 1.65;
  max-width: 72ch;
}

.opinion-body p {
  margin: 0 0 1em;
}

footer.disclaimer {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #ddd;
  font-size: 0.8rem;
  color: #666;
}

footer.disclaimer a {
  color: #666;
  text-decoration: underline;
}

.disclaimer-block {
  border-left: 3px solid #b45309;
  padding-left: 1rem;
}

.feature-strip {
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px solid #ddd6c7;
  border-radius: 6px;
  background: #fffdf8;
}

.feature-strip h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.feature-link {
  display: inline-block;
  margin-top: 4px;
  padding: 9px 16px;
  border: 1px solid #0f5f73;
  border-radius: 4px;
  color: #fff;
  background: #0f5f73;
  text-decoration: none;
  font-weight: bold;
}

.feature-link:hover {
  background: #083f4d;
  color: #fff;
}

.econ-domain .scope {
  margin: 4px 0 10px;
  font-style: italic;
  color: #4a565d;
}

.econ-highlights {
  margin: 6px 0 0;
  padding-left: 1.4rem;
}

.econ-highlights li {
  margin: 0 0 8px;
}

.landmark-list {
  padding-left: 1.4rem;
}

.landmark-case {
  margin: 0 0 16px;
}

.lc-name {
  font-weight: bold;
}

.lc-cite {
  margin-left: 6px;
  color: #4a565d;
}

.lc-meta {
  display: block;
  color: #66747c;
  font-size: 0.92rem;
}

.relies {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
}

/* Homepage: one card system (topic grid + card rows share the label/keyword idiom). */
.home-page .section-sub {
  color: #4a565d;
  margin: 2px 0 14px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.topic-grid a {
  display: block;
  padding: 12px 14px;
  border: 1px solid #ddd6c7;
  border-radius: 6px;
  background: #fffdf8;
  text-decoration: none;
  color: #14242d;
}
.topic-grid a span {
  display: block;
  margin-top: 2px;
  color: #66747c;
  font-size: 0.9rem;
}
.topic-grid a:hover {
  border-color: #0f5f73;
}
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin: 12px 0;
}
.card-row a {
  display: block;
  padding: 14px 16px;
  border: 1px solid #ddd6c7;
  border-radius: 6px;
  background: #fffdf8;
  text-decoration: none;
  color: #1e2930;
}
.card-row a:hover {
  border-color: #0f5f73;
}
.card-row strong {
  display: block;
  color: #0f5f73;
}
.card-row .plain {
  display: block;
  margin-top: 4px;
  color: #1e2930;
}
.card-row .kw {
  display: block;
  margin-top: 4px;
  color: #66747c;
  font-size: 0.92rem;
}
.card-row .meta,
.card-row .cite {
  display: block;
  margin-top: 4px;
  color: #66747c;
  font-size: 0.9rem;
}
.card-row .badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.badge-texas {
  background: #e2efe9;
  color: #0f5f73;
}
.badge-federal {
  background: #efe9db;
  color: #6b5b32;
}

/* Homepage masthead — the redesign's centrepiece; previously shipped unstyled. */
.masthead {
  padding-top: 40px;
  padding-bottom: 10px;
}
.brand {
  margin: 0 0 6px;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: #14242d;
}
.brand a {
  text-decoration: none;
  color: inherit;
}
.tagline {
  font-size: 1.05rem;
  font-weight: 400;
  color: #66747c;
}
.scale {
  margin: 0 0 18px;
  max-width: 70ch;
  font-size: 1.05rem;
  color: #4a565d;
}
.searchbar {
  display: flex;
  gap: 10px;
  max-width: 640px;
}
.searchbar input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #c9c1b0;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.searchbar button {
  padding: 11px 22px;
  min-height: 44px;
  border: 1px solid #0f5f73;
  border-radius: 4px;
  color: #fff;
  background: #0f5f73;
  font: inherit;
  cursor: pointer;
}
.searchbar button:hover {
  background: #083f4d;
}
.searchbar-hint {
  margin: 8px 0 0;
  max-width: 640px;
  font-size: 0.9rem;
  color: #66747c;
}
.topic-icon {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  margin-right: 2px;
  color: #66747c;
  flex: none;
}
/* Section wrappers — vertical rhythm comes from h2/.section-sub; light rule keeps every
   homepage class present in the stylesheet (enforced by check_style_coverage). */
.topics,
.guides,
.pillars,
.notable {
  margin-top: 8px;
}
/* Card variants share .card-row a styling; grouped selector documents them + satisfies coverage. */
.law-card,
.guide-card,
.case-card {
  height: 100%;
}
.library-strip {
  margin-top: 8px;
}
.books-inline {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.books-inline li {
  padding: 12px 14px;
  border: 1px solid #ddd6c7;
  border-radius: 6px;
  background: #fffdf8;
}
.books-inline a {
  text-decoration: none;
  font-weight: 600;
}
.books-inline span {
  display: block;
  margin-top: 2px;
  color: #66747c;
  font-size: 0.9rem;
  font-weight: 400;
}
.hint {
  margin-top: 14px;
  color: #66747c;
  font-size: 0.92rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 640px) {
  .searchbar {
    flex-direction: column;
  }
}
