:root {
  color-scheme: light;
  --paper: #f4efe4;
  --paper-deep: #e9dfcc;
  --paper-light: #fffdf7;
  --ink: #202b27;
  --ink-soft: #53615b;
  --mineral: #1f5a4a;
  --mineral-deep: #123f35;
  --mineral-pale: #dce8df;
  --cinnabar: #a23c2b;
  --cinnabar-pale: #f4dfd8;
  --gold: #a5823a;
  --line: #cfc3ad;
  --line-soft: #dfd6c6;
  --focus: #0b70c9;
  --shadow: 0 18px 55px rgb(35 47 41 / 13%);
  --shadow-soft: 0 6px 24px rgb(35 47 41 / 8%);
  --radius-sm: 0.45rem;
  --radius: 0.85rem;
  --radius-lg: 1.35rem;
  --content: 88rem;
  font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei UI", "Hiragino Sans GB", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 49.8%, rgb(72 84 76 / 3%) 50%, transparent 50.2%) 0 0 / 4.25rem 4.25rem,
    var(--paper);
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image: radial-gradient(rgb(31 45 39 / 18%) 0.45px, transparent 0.55px);
  background-size: 5px 5px;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--mineral);
  text-underline-offset: 0.18em;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--mineral-deep);
  border-radius: var(--radius-sm);
  transform: translateY(-180%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.safety-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 3rem;
  padding: 0.5rem clamp(1rem, 4vw, 3rem);
  color: #fffaf1;
  background: var(--mineral-deep);
  border-bottom: 3px solid var(--gold);
  font-size: 0.86rem;
}

.safety-ribbon p {
  margin: 0;
}

.safety-ribbon a {
  flex: none;
  color: #fff;
  font-weight: 700;
}

.safety-ribbon__mark {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
  color: var(--mineral-deep);
  background: #f0d89a;
  border-radius: 50%;
  font-family: serif;
  font-weight: 800;
}

.masthead {
  position: relative;
  overflow: hidden;
  color: #f9f4e9;
  background:
    linear-gradient(110deg, rgb(17 62 51 / 98%), rgb(28 82 66 / 94%)),
    var(--mineral-deep);
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.masthead::after {
  position: absolute;
  top: -9rem;
  right: -4rem;
  width: 24rem;
  height: 24rem;
  content: "";
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 50%;
  box-shadow: 0 0 0 3.8rem rgb(255 255 255 / 3%), 0 0 0 7.6rem rgb(255 255 255 / 2%);
}

.masthead__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(2.7rem, 6vw, 5.4rem) 0 clamp(2.3rem, 5vw, 4.2rem);
}

.brand-lockup h1 {
  max-width: 13em;
  margin: 0.25rem 0 0.75rem;
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(2.2rem, 5vw, 4.65rem);
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.08;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-lockup .eyebrow {
  color: #d9c690;
}

.brand-deck {
  max-width: 38rem;
  margin: 0;
  color: rgb(255 255 255 / 76%);
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.principle-stamp {
  display: grid;
  width: 14rem;
  min-height: 9rem;
  padding: 1.25rem;
  flex: none;
  align-content: center;
  text-align: center;
  border: 1px solid rgb(239 216 158 / 60%);
  box-shadow: inset 0 0 0 4px rgb(15 52 43 / 55%), inset 0 0 0 5px rgb(239 216 158 / 28%);
}

.principle-stamp span,
.principle-stamp small {
  color: rgb(255 255 255 / 65%);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.principle-stamp strong {
  margin: 0.5rem 0;
  color: #f0d89a;
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
}

main {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 0 0 5rem;
}

.search-stage {
  position: relative;
  z-index: 2;
  margin-top: -1.45rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-top: 4px solid var(--cinnabar);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-stage__heading,
.section-heading,
.results-toolbar,
.filter-panel__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.search-stage h2,
.section-heading h2,
.results-toolbar h2,
.filter-panel h2 {
  margin: 0.1rem 0 0;
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.3;
}

.section-kicker {
  color: var(--cinnabar);
}

.search-hint,
.section-heading > p,
.loading-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 4rem;
  margin-top: 1.25rem;
  padding: 0 1rem;
  background: #fff;
  border: 1px solid #a9aa9f;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgb(34 43 39 / 5%);
}

.search-box:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(11 112 201 / 14%);
}

.search-box__icon {
  color: var(--mineral);
  font-family: serif;
  font-size: 2rem;
  line-height: 1;
  transform: rotate(-18deg);
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 3.7rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1.06rem;
}

.search-box input::placeholder {
  color: #7b837e;
}

kbd {
  min-width: 1.8rem;
  padding: 0.12rem 0.4rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 0.3rem;
  text-align: center;
}

.app-status {
  min-height: 1.4em;
  margin: 0.65rem 0 -0.35rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.app-status[data-state="error"] {
  color: var(--cinnabar);
  font-weight: 700;
}

.summary-section {
  padding: clamp(2.5rem, 6vw, 4.25rem) 0 2.5rem;
}

.section-heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 1rem;
  background: var(--line);
  border: 1px solid var(--line);
  gap: 1px;
}

.summary-card {
  position: relative;
  display: block;
  min-height: 7.5rem;
  padding: 1.25rem;
  color: var(--ink);
  background: rgb(255 253 247 / 86%);
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.summary-card:hover {
  z-index: 1;
  background: var(--paper-light);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.summary-card[aria-current="true"] {
  z-index: 1;
  box-shadow: inset 0 -4px 0 var(--mineral);
}

.summary-card::before {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 0.42rem;
  height: 0.42rem;
  content: "";
  background: var(--cinnabar);
  border-radius: 50%;
}

.summary-card strong {
  display: block;
  font-family: inherit;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1;
}

.summary-card span {
  display: block;
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.summary-card small {
  display: block;
  margin-top: 0.45rem;
  color: var(--mineral);
  font-size: 0.7rem;
  font-weight: 800;
}

.summary-card--loading {
  grid-column: 1 / -1;
  min-height: 5rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

.catalog-layout--overview {
  grid-template-columns: minmax(0, 1fr);
}

.filter-panel {
  position: sticky;
  top: 1rem;
  max-height: calc(100dvh - 2rem);
  padding: 1.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: rgb(255 253 247 / 72%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.filter-panel__heading {
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.text-button,
.icon-button,
.filter-option,
.filter-chip,
.source-open {
  min-height: 44px;
  cursor: pointer;
}

.text-button {
  padding: 0.45rem 0.2rem;
  color: var(--mineral);
  background: none;
  border: 0;
  font-size: 0.8rem;
  font-weight: 800;
}

.filter-groups {
  display: grid;
  gap: 0.35rem;
  padding-top: 0.5rem;
}

.filter-group {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.filter-group:last-child {
  border-bottom: 0;
}

.filter-group summary {
  min-height: 44px;
  cursor: pointer;
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-weight: 700;
}

.filter-group__options {
  display: grid;
  gap: 0.2rem;
}

.filter-option {
  display: grid;
  grid-template-columns: 1.1rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.filter-option input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--mineral);
}

.filter-option__count {
  color: #777f7a;
  font-variant-numeric: tabular-nums;
}

.results-panel {
  min-width: 0;
}

.results-toolbar {
  min-height: 4.7rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.result-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 1rem;
  padding: 0.75rem 0;
}

.filter-chip {
  padding: 0.45rem 0.7rem;
  color: var(--mineral-deep);
  background: var(--mineral-pale);
  border: 1px solid #b6cbbf;
  border-radius: 999px;
  font-size: 0.76rem;
}

.result-list {
  display: grid;
  gap: 0.8rem;
}

.source-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: clamp(1.15rem, 3vw, 1.65rem);
  background: rgb(255 253 247 / 88%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--mineral);
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 12px rgb(35 47 41 / 4%);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.source-card:hover {
  border-color: #9d9b8d;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.source-card h3 {
  margin: 0.35rem 0 0.55rem;
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: clamp(1.05rem, 2.3vw, 1.32rem);
  line-height: 1.42;
}

.source-card__meta,
.badge-row,
.identifier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.source-card__meta span + span::before {
  margin-right: 0.7rem;
  color: var(--line);
  content: "◆";
  font-size: 0.45rem;
  vertical-align: middle;
}

.badge-row {
  margin-top: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.18rem 0.55rem;
  color: var(--mineral-deep);
  background: var(--mineral-pale);
  border: 1px solid #c0d0c7;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge--caution {
  color: #743426;
  background: var(--cinnabar-pale);
  border-color: #deb7ab;
}

.badge--neutral {
  color: #505853;
  background: #eeeae1;
  border-color: #d4cdbc;
}

.source-card__limitation {
  margin: 0.85rem 0 0;
  color: #6b514a;
  font-size: 0.78rem;
}

.source-open {
  align-self: center;
  padding: 0.55rem 0.9rem;
  color: #fff;
  background: var(--mineral);
  border: 1px solid var(--mineral-deep);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.source-open:hover {
  background: var(--mineral-deep);
}

.catalog-overview {
  overflow: hidden;
  background: rgb(255 253 247 / 82%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 12px rgb(35 47 41 / 4%);
}

.catalog-overview__intro {
  padding: 1.2rem 1.35rem;
  background: linear-gradient(120deg, rgb(220 232 223 / 72%), rgb(255 253 247 / 84%));
  border-bottom: 1px solid var(--line);
}

.catalog-overview__intro h3 {
  margin: 0 0 0.35rem;
  color: var(--mineral-deep);
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: 1.2rem;
}

.catalog-overview__intro p {
  max-width: 70rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.catalog-overview__table-wrap {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.catalog-overview__table {
  width: 100%;
  min-width: 64rem;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.catalog-overview__table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.catalog-overview__table th,
.catalog-overview__table td {
  padding: 0.8rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.58;
}

.catalog-overview__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--mineral-deep);
  background: #e5eee7;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.catalog-overview__table tbody tr:nth-child(even) {
  background: rgb(238 234 225 / 44%);
}

.catalog-overview__table tbody tr:hover {
  background: var(--mineral-pale);
}

.catalog-overview__table tbody tr:last-child td {
  border-bottom: 0;
}

.catalog-overview__table td:first-child {
  color: var(--ink);
  font-weight: 700;
}

.catalog-overview__action {
  width: 1%;
  white-space: nowrap;
}

.overview-open {
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  color: var(--mineral-deep);
  background: var(--mineral-pale);
  border: 1px solid #9eb7a9;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 800;
}

.overview-open:hover {
  color: #fff;
  background: var(--mineral);
}

.overview-open:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.empty-state {
  padding: 4.5rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state__mark {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  color: var(--cinnabar);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: serif;
  font-size: 1.4rem;
}

.empty-state h3 {
  margin-bottom: 0.35rem;
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
}

.empty-state p {
  margin: 0;
  color: var(--ink-soft);
}

.detail-scrim {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgb(18 32 27 / 46%);
  backdrop-filter: blur(2px);
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  width: min(46rem, 92vw);
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  background: var(--paper-light);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 65px rgb(20 32 27 / 22%);
}

.detail-panel__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.4rem;
  padding: 1rem clamp(1.2rem, 4vw, 2.25rem);
  background: rgb(255 253 247 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(9px);
}

.detail-panel__bar h2 {
  margin: 0.1rem 0 0;
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 1.35rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.65rem;
  line-height: 1;
}

.detail-content {
  padding: clamp(1.35rem, 5vw, 2.5rem);
}

.detail-hero {
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
}

.detail-hero h3 {
  margin: 0.5rem 0 0.8rem;
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 1.38;
}

.reading-guide {
  margin: 1.4rem 0 0.35rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(231 240 234 / 82%), rgb(250 246 232 / 92%));
  border: 1px solid #b9cbc0;
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgb(35 47 41 / 7%);
}

.reading-guide__heading,
.reading-guide__overview,
.reading-guide__section,
.reading-guide__missing {
  padding: clamp(1.05rem, 3vw, 1.55rem);
}

.reading-guide__heading {
  border-bottom: 1px solid rgb(91 117 102 / 22%);
}

.reading-guide__heading h4 {
  margin: 0.15rem 0 0.45rem;
  color: var(--mineral-deep);
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.reading-guide__heading p:last-child,
.reading-guide__scope p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.7;
}

.reading-guide__scope {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 0.75rem;
  align-items: baseline;
  padding: 0.9rem clamp(1.05rem, 3vw, 1.55rem);
  background: rgb(255 253 247 / 76%);
  border-bottom: 1px solid rgb(91 117 102 / 18%);
}

.reading-guide__scope > span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.reading-guide__scope > strong {
  color: var(--mineral-deep);
}

.reading-guide__scope p {
  grid-column: 2;
}

.reading-guide__scope--pending {
  background: #fff3df;
  border-left: 4px solid var(--cinnabar);
}

.reading-guide__overview {
  background: rgb(255 253 247 / 55%);
  border-bottom: 1px solid rgb(91 117 102 / 18%);
}

.reading-guide__overview h5,
.reading-guide__section h5,
.reading-guide__missing h5 {
  margin: 0 0 0.6rem;
  color: var(--mineral-deep);
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 1rem;
}

.reading-guide__overview p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.85;
}

.reading-guide__section + .reading-guide__section {
  border-top: 1px dashed rgb(91 117 102 / 25%);
}

.reading-guide__facts,
.reading-guide__missing ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.25rem;
}

.reading-guide__facts li,
.reading-guide__missing li {
  padding-left: 0.12rem;
  line-height: 1.75;
}

.reading-guide__facts li::marker,
.reading-guide__missing li::marker {
  color: var(--cinnabar);
}

.reading-guide__outcomes-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgb(91 117 102 / 24%);
  border-radius: var(--radius-sm);
  scrollbar-gutter: stable;
}

.reading-guide__outcomes {
  width: 100%;
  min-width: 46rem;
  border-collapse: collapse;
  background: rgb(255 253 247 / 72%);
  font-size: 0.84rem;
}

.reading-guide__outcomes caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.reading-guide__outcomes th,
.reading-guide__outcomes td {
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(91 117 102 / 18%);
  line-height: 1.55;
}

.reading-guide__outcomes th {
  color: var(--mineral-deep);
  background: rgb(226 237 229 / 82%);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.reading-guide__outcomes tbody tr:last-child td {
  border-bottom: 0;
}

.reading-guide__result-cell {
  min-width: 12rem;
}

.reading-guide__timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reading-guide__event {
  position: relative;
  margin-left: 1rem;
  padding: 0 0 1.35rem 1.65rem;
  border-left: 2px solid #9fb7aa;
}

.reading-guide__event:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.reading-guide__event-heading {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-height: 1.75rem;
  margin-bottom: 0.55rem;
}

.reading-guide__event-number {
  position: absolute;
  left: -0.9rem;
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  color: #fff;
  background: var(--mineral);
  border: 3px solid var(--paper-light);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
}

.reading-guide__event .detail-label {
  margin-top: 0.45rem;
}

.reading-guide__missing {
  background: #fff7e8;
  border-top: 1px solid #dfc69b;
}

.source-summary {
  margin: 1.4rem 0 0.35rem;
  padding: clamp(1.1rem, 3vw, 1.55rem);
  background:
    linear-gradient(135deg, rgb(231 240 234 / 78%), rgb(250 246 232 / 88%));
  border: 1px solid #b9cbc0;
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgb(35 47 41 / 7%);
}

.source-summary__heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(91 117 102 / 22%);
}

.source-summary__heading h4 {
  margin: 0.15rem 0 0.45rem;
  color: var(--mineral-deep);
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.source-summary__heading p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.65;
}

.source-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.source-summary__card {
  padding: 0.9rem 1rem;
  background: rgb(255 253 247 / 76%);
  border: 1px solid rgb(167 177 165 / 42%);
  border-radius: var(--radius-sm);
}

.source-summary__card:nth-child(3),
.source-summary__card:nth-child(4),
.source-summary__card:nth-child(5) {
  grid-column: 1 / -1;
}

.source-summary__card h5 {
  margin: 0 0 0.45rem;
  color: var(--mineral-deep);
  font-size: 0.83rem;
  letter-spacing: 0.04em;
}

.source-summary__card ul {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding-left: 1.15rem;
}

.source-summary__card li {
  padding-left: 0.1rem;
  line-height: 1.62;
}

.source-summary__card li::marker {
  color: var(--cinnabar);
}

.detail-section {
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.detail-section h4 {
  margin: 0 0 0.85rem;
  color: var(--mineral-deep);
  font-family: "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 1.05rem;
}

.detail-item {
  padding: 0.9rem 0;
}

.detail-item + .detail-item {
  border-top: 1px dashed var(--line-soft);
}

.detail-item p {
  margin: 0.35rem 0;
}

.detail-label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.original-text {
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
  font-family: "Noto Serif CJK SC", "Yu Mincho", "Batang", serif;
  line-height: 1.85;
}

.nonidentity-note,
.safety-note {
  padding: 1rem;
  background: var(--cinnabar-pale);
  border-left: 4px solid var(--cinnabar);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.nonidentity-note strong,
.safety-note strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #713226;
}

.external-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.55rem 0.8rem;
  color: #fff;
  background: var(--mineral);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
}

.noscript-note {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 50;
  padding: 1rem;
  color: #fff;
  background: var(--cinnabar);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

@media (max-width: 960px) {
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-layout {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .safety-ribbon {
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    padding: 0.7rem 1rem;
  }

  .safety-ribbon p {
    flex: 1 1 calc(100% - 2.4rem);
  }

  .safety-ribbon a {
    margin-left: 2.35rem;
  }

  .source-summary__grid {
    grid-template-columns: 1fr;
  }

  .source-summary__card:nth-child(n) {
    grid-column: auto;
  }

  .masthead__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2.5rem;
  }

  .principle-stamp {
    width: min(100%, 20rem);
    min-height: 6.5rem;
  }

  main {
    width: min(calc(100% - 1rem), var(--content));
  }

  .search-stage {
    margin-top: -0.7rem;
  }

  .search-stage__heading,
  .section-heading,
  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  kbd {
    display: none;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-layout {
    display: block;
  }

  .filter-panel {
    position: static;
    max-height: none;
    margin-bottom: 1.5rem;
    overflow-y: visible;
    scrollbar-gutter: auto;
  }

  .filter-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .results-toolbar {
    min-height: auto;
  }

  .source-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .source-open {
    width: 100%;
  }

  .detail-panel {
    width: 100%;
    border-left: 0;
  }
}

@media (max-width: 430px) {
  .brand-lockup h1 {
    font-size: 2.25rem;
  }

  .summary-grid,
  .filter-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-card {
    min-height: 6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
:root .relation-controls {
  display: grid;
  gap: .5rem;
  border: 0;
  padding: 0 0 1rem;
  margin: 0;
}
.relation-controls legend { font-weight: 700; margin-bottom: .65rem; }
.relation-controls button {
  padding: .65rem;
  border: 1px solid #c8d3c8;
  border-radius: .4rem;
  background: #fff;
  color: #244b42;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.relation-controls button[aria-pressed="true"] { background: #e2ede5; border-color: #42694d; font-weight: 700; }
.relation-controls small, .foundation-depth small { display: block; line-height: 1.6; }
.foundation-panel { margin-top: 1rem; border-top: 1px solid #dce1d8; padding-top: .75rem; overflow-wrap: anywhere; }
.foundation-panel p, .foundation-panel ul { margin: .45rem 0; font-size: .9rem; line-height: 1.7; }
.foundation-panel ul { padding-left: 1.3rem; }
.foundation-panel h4 { font-size: .95rem; margin: .8rem 0 .35rem; }
.foundation-gaps summary { cursor: pointer; color: #745826; }
.foundation-depth { padding: .5rem 0; }
.relation-result-group { display: grid; gap: 1rem; }
.relation-result-group > h3 { padding: .65rem; margin: 0; border-left: 4px solid #42694d; background: #edf2ec; }
.relation-result-group--historical > h3 { border-color: #9b733e; background: #f5f0e7; }
.relation-result-group--pending > h3 { border-color: #a36e48; background: #f8eee6; }
