:root {
  color-scheme: light;
  --ink: #173d43;
  --muted: #5d6c69;
  --deep: #1f5960;
  --deep-soft: #dceae5;
  --gold: #98713a;
  --gold-soft: #ded0a9;
  --line: #c9d0c5;
  --paper: #fbf7e9;
  --paper-bright: #fffdf5;
  --wash: #e9f1ec;
  --danger: #833f35;
  --shadow: rgba(27, 61, 65, .07);
  font-family: Georgia, "Noto Serif CJK SC", "Songti SC", "Times New Roman", serif;
  color: var(--ink);
  background: #edf3ee;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 300px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 7% -5%, #faedcf 0, transparent 42%),
    linear-gradient(135deg, #f7f6e9 0%, #e4efeb 100%);
}

a {
  color: #1e5b66;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 19px 30px 17px;
  border-bottom: 1px solid var(--line);
}

.header-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .075em;
  white-space: nowrap;
}

.language-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
}

.site-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 19px;
  margin-top: 15px;
  font-size: .86rem;
}

.site-navigation a {
  min-height: 30px;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-navigation a:hover,
.site-navigation a[aria-current="page"] {
  color: var(--deep);
  border-bottom-color: var(--gold);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 30px 36px;
}

.hero {
  max-width: 1050px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: .71rem;
  letter-spacing: .17em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
}

h1 {
  max-width: 920px;
  margin: 14px 0 18px;
  font-size: clamp(2.05rem, 4.2vw, 3.7rem);
  line-height: 1.2;
  letter-spacing: -.018em;
}

.lead {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.82;
}

.release-counts {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 30px 0 0;
}

.release-counts > div {
  min-width: 0;
  padding: 14px 15px;
  border-top: 1px solid var(--gold);
  background: rgba(255, 253, 241, .68);
}

.release-counts .primary-count {
  background: rgba(231, 241, 235, .86);
}

.release-counts dt {
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.4;
}

.release-counts dd {
  margin: 8px 0 0;
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 34px 0 52px;
  padding: 21px 25px;
  border: 1px solid #d7cba8;
  border-left: 4px solid var(--gold);
  border-radius: 5px 22px 22px 5px;
  background: rgba(255, 253, 242, .82);
  box-shadow: 0 8px 26px var(--shadow);
}

.notice strong {
  display: block;
  font-size: 1rem;
}

.notice ul {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.notice li {
  margin: 7px 0;
  color: #405356;
  font-size: .91rem;
  line-height: 1.7;
}

.catalogue {
  scroll-margin-top: 18px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
}

.section-heading .fine {
  max-width: 470px;
  margin: 0;
  text-align: right;
}

#search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(190px, .7fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 25px 0 9px;
}

#search-form label {
  display: grid;
  min-width: 0;
  gap: 8px;
  font-size: .86rem;
  line-height: 1.45;
}

input,
select,
button {
  min-height: 46px;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid #aab8b2;
  border-radius: 8px;
  background: var(--paper-bright);
  color: var(--ink);
}

input,
select {
  width: 100%;
}

button {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: var(--paper-bright);
  color: var(--ink);
}

button:disabled {
  opacity: .45;
  cursor: default;
}

.form-actions {
  display: flex;
  gap: 9px;
}

:focus-visible {
  outline: 3px solid #9e793d;
  outline-offset: 3px;
}

.fine,
footer {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.72;
}

#index-note {
  margin: 8px 0 0;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 66px;
}

#status {
  margin: 0;
  font-size: .93rem;
  line-height: 1.55;
}

#status.error {
  color: var(--danger);
}

#retry {
  min-height: 38px;
  padding: 7px 13px;
}

.records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.record {
  min-width: 0;
  padding: 22px;
  overflow-wrap: anywhere;
  border: 1px solid #d2d6c7;
  border-radius: 5px 17px 17px 5px;
  background: var(--paper);
  box-shadow: 0 8px 22px var(--shadow);
}

.record-topline,
.record-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.record-topline {
  justify-content: space-between;
}

.record-meta-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.55;
}

.provider-pill,
.category-pill,
.language-pill,
.review-badge,
.paragraph-kind {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: .73rem;
  line-height: 1.35;
}

.provider-pill {
  padding: 4px 9px;
  background: var(--deep-soft);
  color: #2d5357;
}

.category-pill {
  max-width: 72%;
  padding: 4px 9px;
  background: #eee7d3;
  color: #5e543e;
}

.record-id {
  color: var(--gold);
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}

.record h3 {
  margin: 14px 0 0;
  font-size: 1.29rem;
  line-height: 1.46;
  unicode-bidi: plaintext;
}

.source-language-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
}

.record > details {
  margin-top: 19px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .89rem;
}

.record summary {
  padding: 3px 0;
  color: #205c65;
  cursor: pointer;
  line-height: 1.55;
}

.record details[open] > summary {
  margin-bottom: 18px;
}

.detail-section + .detail-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #d8d9cb;
}

.detail-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.detail-section h4 {
  margin: 0;
  font-size: 1.02rem;
}

.language-pill {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid #d5c7a0;
  background: #fffaf0;
  color: #675537;
}

.intro-list {
  display: grid;
  gap: 13px;
  margin: 13px 0 0;
}

.intro-paragraph {
  margin: 0;
  padding: 13px 14px;
  border-left: 2px solid #b9c9bf;
  background: rgba(255, 253, 245, .7);
  color: #354f52;
  line-height: 1.78;
  unicode-bidi: plaintext;
}

.paragraph-kind {
  margin-right: 8px;
  padding: 2px 7px;
  background: #e7efe9;
  color: #47615e;
  vertical-align: .1em;
}

.fact-list {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.fact-item {
  padding: 11px 12px;
  border: 1px solid #d7dacd;
  border-radius: 7px;
  background: rgba(255, 253, 245, .68);
}

.fact-name {
  display: block;
  color: var(--gold);
  font-size: .74rem;
  letter-spacing: .025em;
}

.fact-value {
  display: block;
  margin-top: 5px;
  color: #2c484b;
  line-height: 1.66;
  unicode-bidi: plaintext;
}

.fact-evidence {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.55;
}

.field-list {
  display: grid;
  grid-template-columns: minmax(125px, .82fr) minmax(0, 2fr);
  gap: 9px 15px;
  margin: 13px 0 0;
  line-height: 1.65;
}

.field-list dt {
  color: var(--muted);
}

.field-list dd {
  min-width: 0;
  margin: 0;
  unicode-bidi: plaintext;
}

.record-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  margin: 15px 0 0;
}

.boundary-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.65;
}

.review-badge {
  margin-top: 13px;
  padding: 4px 9px;
  background: #ece5d3;
  color: #5e533c;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 160px;
  padding: 31px;
  border: 1px dashed #aab8b2;
  border-radius: 12px;
  background: rgba(255, 253, 245, .68);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  line-height: 1.75;
}

.empty-state.error {
  color: var(--danger);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  padding: 31px 0;
}

.pagination span {
  min-width: 125px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.noscript {
  padding: 18px;
  border: 1px solid var(--danger);
  background: var(--paper-bright);
  color: var(--danger);
}

footer {
  max-width: 920px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  #search-form {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(180px, .7fr));
  }

  .form-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 780px) {
  .site-header {
    padding: 17px 18px 14px;
  }

  main {
    padding: 35px 18px 30px;
  }

  .release-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-counts .primary-count {
    grid-column: 1 / -1;
  }

  .section-heading {
    display: block;
  }

  .section-heading .fine {
    margin-top: 12px;
    text-align: left;
  }

  #search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .query-control {
    grid-column: 1 / -1;
  }

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

@media (max-width: 520px) {
  html {
    scroll-behavior: auto;
  }

  .site-header {
    padding-inline: 15px;
  }

  .header-primary {
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    padding-top: 12px;
    font-size: .85rem;
  }

  .language-control {
    display: grid;
    gap: 4px;
  }

  .language-control span {
    font-size: .72rem;
  }

  .language-control select {
    min-height: 42px;
    padding: 8px 9px;
  }

  .site-navigation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px 13px;
    margin-top: 13px;
  }

  .site-navigation a {
    text-align: center;
  }

  main {
    padding: 30px 15px 27px;
  }

  h1 {
    font-size: clamp(1.88rem, 10vw, 2.42rem);
  }

  .lead {
    font-size: 1rem;
  }

  .release-counts {
    gap: 7px;
  }

  .release-counts > div {
    padding: 11px 12px;
  }

  .release-counts dd {
    font-size: 1.08rem;
  }

  .notice {
    margin: 28px 0 43px;
    padding: 17px;
  }

  .notice ul {
    padding-left: 1.1rem;
  }

  #search-form {
    grid-template-columns: 1fr;
  }

  .query-control,
  .form-actions {
    grid-column: auto;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button {
    flex: 1 1 0;
  }

  .record {
    padding: 19px;
  }

  .category-pill {
    max-width: 66%;
  }

  .detail-heading-row {
    display: grid;
  }

  .field-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .field-list dd {
    margin-bottom: 8px;
  }

  .pagination {
    gap: 8px;
  }

  .pagination button {
    min-width: 0;
    padding-inline: 10px;
  }

  .pagination span {
    min-width: 105px;
    font-size: .86rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button,
  .site-navigation a {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  }

  button:hover:not(:disabled) {
    background: #356b70;
    color: #fff;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #758a83;
    --muted: #344c4c;
  }

  .record,
  .notice,
  input,
  select,
  button {
    border-width: 2px;
  }
}
