:root {
  color-scheme: light;
  --ink: #171713;
  --paper: #f5f1e8;
  --paper-strong: #fffdf7;
  --muted: #656156;
  --line: #d7d0c1;
  --accent: #8a6727;
  --accent-dark: #624817;
  --focus: #1b63c6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.65rem 0.85rem;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.catalog-shell {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.75rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-header nav a {
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-header nav a[aria-current="page"] {
  color: var(--accent-dark);
}

.catalog-shell {
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.catalog-intro {
  max-width: 50rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
.judgment-card h2,
.message-page h1 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 14ch;
  margin-bottom: 1.15rem;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.catalog-intro > p:not(.source-note) {
  max-width: 42rem;
  color: #39372f;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.source-note {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.filters {
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) repeat(2, minmax(11rem, 1fr)) auto auto;
  gap: 0.9rem;
  align-items: end;
  margin-block: clamp(2.4rem, 6vw, 4.5rem);
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: 0 0.8rem 2.5rem rgba(45, 37, 22, 0.06);
}

.filters label {
  display: grid;
  gap: 0.38rem;
  color: #4d493f;
  font-size: 0.82rem;
  font-weight: 700;
}

.filters input,
.filters select,
.filters button {
  width: 100%;
  min-height: 3rem;
  border: 1px solid #bdb5a5;
  border-radius: 0;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.filters input,
.filters select {
  padding-inline: 0.8rem;
}

.filters button {
  width: auto;
  padding-inline: 1.15rem;
  border-color: var(--ink);
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

.filters button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.clear-link {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  padding-inline: 0.35rem;
  font-weight: 700;
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.results-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.results-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.judgment-list {
  border-top: 1px solid var(--ink);
}

.judgment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.35fr);
  gap: 1rem 2rem;
  padding-block: clamp(1.5rem, 4vw, 2.4rem);
  border-bottom: 1px solid var(--line);
}

.citation-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  grid-column: 1 / -1;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.judgment-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.14;
  text-wrap: balance;
}

.judgment-card h2 a {
  text-decoration-thickness: 0.06em;
  text-decoration-color: transparent;
}

.judgment-card h2 a:hover {
  text-decoration-color: var(--accent);
}

.card-facts {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  grid-column: 2;
  grid-row: 2 / span 3;
  align-self: start;
}

.card-facts div {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.card-facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
}

.excerpt {
  display: -webkit-box;
  max-width: 48rem;
  margin: 0;
  overflow: hidden;
  color: #514d44;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.read-link {
  width: fit-content;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.read-link:hover {
  text-decoration: underline;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  font-weight: 700;
}

.pagination > :last-child {
  justify-self: end;
}

.pagination span {
  color: var(--muted);
}

.empty-state,
.message-page {
  padding-block: 4rem;
}

.message-page,
.detail-shell {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

.message-page {
  min-height: 60vh;
}

.breadcrumbs {
  display: flex;
  gap: 0.55rem;
  padding-block: 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-header {
  padding-block: clamp(2.25rem, 7vw, 6.5rem);
  border-bottom: 1px solid var(--ink);
}

.detail-header h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
}

.detail-citations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.42fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.detail-main {
  display: grid;
  gap: 3rem;
}

.detail-main h2,
.record-panel h2 {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.source-excerpt {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  line-height: 1.75;
}

.content-notice {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  background: var(--paper-strong);
}

.content-notice p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.record-panel {
  align-self: start;
  padding: 1.25rem;
  border-top: 3px solid var(--ink);
  background: var(--paper-strong);
}

.record-panel dl {
  margin: 0;
}

.record-panel dl div {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.record-panel dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.record-panel dd {
  margin: 0.2rem 0 0;
}

.record-panel h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-list {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.asset-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
}

.asset-list li span:last-child {
  color: var(--muted);
}

.source-link {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 800;
}

.attribution {
  margin-bottom: clamp(3rem, 7vw, 6rem);
  padding-block: 1.25rem;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.attribution p {
  margin: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 64rem) {
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 44rem) {
  .site-header,
  .site-footer,
  .catalog-shell,
  .message-page,
  .detail-shell {
    width: min(100% - 1.25rem, 76rem);
  }

  .filters {
    grid-template-columns: 1fr;
    margin-inline: -0.15rem;
  }

  .search-field {
    grid-column: auto;
  }

  .filters button,
  .clear-link {
    width: 100%;
    justify-content: center;
  }

  .results-heading {
    align-items: start;
    flex-direction: column;
  }

  .judgment-card {
    grid-template-columns: 1fr;
  }

  .card-facts {
    grid-column: auto;
    grid-row: auto;
  }

  .pagination {
    grid-template-columns: 1fr 1fr;
  }

  .pagination span {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .site-footer {
    flex-direction: column;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}
