:root {
  color-scheme: light;
  --ink: #151b2b;
  --night: #101626;
  --night-soft: #192238;
  --paper: #f6f7f3;
  --rule: #d8dcd9;
  --muted: #566174;
  --accent: #d9f591;
  --sans: "Geist", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, ol { margin: 0; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #718e36; outline-offset: 4px; }
section, .record article { scroll-margin-top: 1.4rem; }
.shell { width: min(1184px, calc(100% - 72px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 2; top: 10px; left: 10px; padding: .5rem 1rem; background: var(--accent); color: var(--ink); }

.top, .hero, .footer { background: var(--night); color: #f7f8fc; }
.top { border-bottom: 1px solid #ffffff21; }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.25rem; letter-spacing: .04em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; background: var(--accent); color: var(--night); border-radius: 5px; }
.brand-mark i { width: 17px; height: 18px; border: 2px solid currentColor; border-right: 5px dotted currentColor; border-radius: 2px; }
.header-inner nav { display: flex; flex-wrap: wrap; gap: clamp(14px, 3vw, 40px); font-size: .9rem; color: #d7deed; }
.header-inner nav a { padding-block: 8px; }
.top a:hover, .footer a:hover { color: var(--accent); }
.header-source { color: var(--accent); font-size: .88rem; white-space: nowrap; }
.header-source span { margin-left: 4px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr .96fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  padding-block: clamp(46px, 6.5vw, 92px);
}
.edition { color: var(--accent); font-size: .84rem; font-weight: 700; letter-spacing: .18em; margin-bottom: 1.05rem; }
.edition::before { content: ""; display: inline-block; width: 19px; height: 2px; background: currentColor; margin: 0 .7rem .24rem 0; }
.hero h1 { line-height: 1.04; font-size: clamp(4rem, 7.2vw, 7.1rem); letter-spacing: -.075em; font-weight: 850; }
.hero h1 span { display: block; margin-block: .8rem 0; font-size: clamp(1.05rem, 2.4vw, 1.95rem); letter-spacing: .105em; line-height: 1.4; color: #d9e3f3; }
.intro { margin: 1.25rem 0 1.5rem; max-width: 29em; color: #c5cee0; font-size: clamp(.93rem, 1.35vw, 1.05rem); }
.hero-stats { display: flex; margin: 0 0 1.3rem; gap: .9rem; }
.hero-stats div { display: flex; flex-direction: column-reverse; gap: .15rem; border-left: 1px solid #ffffff34; padding-left: .68rem; }
.hero-stats dt { color: #bdc8dc; font-size: .74rem; }
.hero-stats dd { margin: 0; color: var(--accent); font-family: var(--mono); font-size: .96rem; }
.search { display: flex; max-width: 35rem; min-height: 58px; border-radius: 6px; background: #fff; overflow: hidden; box-shadow: 0 8px 28px #0508144f; }
.search-field { display: flex; flex: 1; align-items: center; padding-left: 15px; min-width: 0; }
.search-field:focus-within { box-shadow: inset 0 0 0 2px #708f39; }
.search-icon { position: relative; flex: none; border: 2px solid #495466; border-radius: 50%; height: 13px; width: 13px; margin: 0 12px 4px 0; }
.search-icon::after { position: absolute; right: -5px; bottom: -3px; background: #495466; content: ""; width: 6px; height: 2px; transform: rotate(47deg); }
.search input { width: 100%; min-width: 0; align-self: stretch; border: 0; outline: 0; background: transparent; color: var(--ink); padding: 6px 10px 6px 2px; }
.search button { flex: none; padding-inline: clamp(13px, 2.4vw, 25px); border: none; background: var(--accent); color: #182112; font-weight: 800; }
.search button:hover { background: #c9eb74; }
.search button:focus-visible { outline-offset: -4px; }
.search button span { margin-left: .35em; }
.examples { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; margin-top: .8rem; color: #aeb8cb; font-size: .82rem; }
.examples a { border-bottom: 1px solid #768199; padding: .1rem .2rem; font-family: var(--mono); color: #f2f5ff; }
.examples a:hover { color: var(--accent); border-color: var(--accent); }
.hero-figure { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #ffffff26; border-radius: 10px; background: var(--night-soft); }
.hero-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #1e2b47; }
.hero-figure figcaption { display: flex; justify-content: space-between; gap: .55rem; border-top: 1px solid #ffffff23; color: #d9e0f0; background: #1b2439; padding: .62rem .95rem; font-size: .77rem; }

.content { padding-block: clamp(29px, 5vw, 60px) 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 1rem; }
h2 { font-size: clamp(1.48rem, 3vw, 2.22rem); line-height: 1.25; letter-spacing: -.045em; }
.section-heading p, .guide > div p { color: var(--muted); margin-top: .4rem; }
.topics { margin-top: clamp(34px, 6vw, 67px); }
.topic-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.topic { --tone: #e7edeb; display: flex; justify-content: space-between; gap: 10px; min-height: 111px; border: 1px solid #17213b14; background: var(--tone); border-radius: 6px; padding: 15px; }
.topic:hover, .topic.active { border-color: #334255; }
.topic h3 { font-size: 1.06rem; line-height: 1.3; margin-bottom: 7px; }
.topic p { font-size: .82rem; color: #3c485a; }
.topic-count { white-space: nowrap; font-family: var(--mono); font-size: .96rem; }
.topic-count span { margin-left: .15rem; }
.amber { --tone: #f7ebd6; }
.blue { --tone: #e4edf8; }
.green { --tone: #e7f0d9; }
.purple { --tone: #ece6f6; }

.archive { margin-top: clamp(34px, 6vw, 67px); }
.result-tools { display: flex; flex: 0 0 auto; align-items: center; gap: .65rem; }
#results { margin: 0; padding: .23rem .62rem; background: #e7ebe4; border-radius: 3px; color: #354358; font-size: .84rem; }
.reset { background: transparent; color: #344b26; border: 1px solid #9baa8f; padding: .2rem .55rem; border-radius: 3px; font-size: .83rem; }
.reset:hover { background: #e9f1e0; }
.records { border: 1px solid var(--rule); border-radius: 7px; overflow: clip; background: #fff; }
.record-group + .record-group { border-top: 1px solid var(--rule); }
.record-group h3 { background: #f2f5ee; color: #374631; padding: .5rem 1rem; font-size: .9rem; border-bottom: 1px solid var(--rule); }
.record-list { padding: 0; list-style: none; }
.record + .record { border-top: 1px solid var(--rule); }
.record-labels, .record-row { display: grid; grid-template-columns: 101px minmax(0, 1fr) 110px 66px; gap: 11px; align-items: center; padding: .72rem 1rem; }
.record-labels { background: #e9ede9; color: #444e60; font-size: .81rem; }
.record-row { padding-bottom: .28rem; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
.record article:target { background: #f3f6ee; }
.record-code { justify-self: start; padding: .12rem .48rem; border: 1px solid #e0e4dc; border-radius: 4px; background: #edf0e9; color: #435139; font: 700 .83rem/1.45 var(--mono); white-space: nowrap; }
.record-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .75rem; margin: 0; font-weight: 400; }
.record-title strong { font-size: .98rem; }
.record-title span, .record-category, .record-year { color: var(--muted); font-size: .84rem; }
.record-year { font-family: var(--mono); }
.record-body { padding: .12rem 1rem .9rem 8rem; max-width: 58rem; font-size: .92rem; }
.record-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1.2rem; margin-top: .4rem; }
.record-credit { color: var(--muted); font-size: .83rem; }
.source-link, .source-links a { display: inline-block; color: #345a25; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; font-size: .87rem; }
.expand { width: 13px; height: 13px; justify-self: end; position: relative; color: #435365; }
.expand::before, .expand::after { content: ""; position: absolute; inset: 6px 0 auto; height: 1.5px; background: currentColor; }
.expand::after { transform: rotate(90deg); }
details[open] .expand::after { display: none; }
.empty { padding: 1.15rem; color: var(--muted); }

.reading-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.reading { padding: 17px; border: 1px solid var(--rule); border-top: 3px solid #81966d; border-radius: 6px; background: #fff; }
.reading h3 { margin-bottom: .5rem; font-size: 1.12rem; line-height: 1.3; }
.reading p { color: #444e60; font-size: .91rem; }
.reading ul { margin: .8rem 0 0; padding: 0; list-style: none; }
.reading li + li { border-top: 1px solid #e5e9e2; }
.reading a { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding-block: .38rem; color: #345a25; font-size: .84rem; font-weight: 700; }
.reading a:hover { text-decoration: underline; }
.reading a span { flex: none; font: .77rem var(--mono); color: var(--muted); }

.guide { display: grid; grid-template-columns: .78fr 1.5fr; gap: 34px; margin-top: clamp(36px, 6vw, 70px); padding: clamp(20px, 4vw, 42px); border-radius: 8px; background: #e8ece3; }
.guide-steps { list-style: none; display: grid; gap: .95rem; padding: 0; counter-reset: steps; }
.guide-steps li { position: relative; padding-left: 3.1rem; counter-increment: steps; }
.guide-steps li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: .05rem; padding: .22rem .38rem; background: #d9e3ce; border-radius: 4px; font: 700 .83rem/1.4 var(--mono); }
.guide-steps h3 { font-size: 1.02rem; margin-bottom: .15rem; }
.guide-steps p { color: #444e60; font-size: .91rem; }
code { font-family: var(--mono); }
.faq, .sources { margin-top: clamp(34px, 6vw, 67px); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; list-style: none; min-height: 52px; padding: .55rem .25rem; font-size: .96rem; font-weight: 700; }
.faq details p { padding: 0 1.3rem 1rem .25rem; max-width: 49em; color: var(--muted); }
.faq .expand { flex: none; }
.sources h2 { margin-bottom: .75rem; }
.sources > p { max-width: 53rem; color: var(--muted); }
.source-links { display: flex; flex-wrap: wrap; gap: .55rem 1.4rem; margin-block: .75rem; }
.published { font-size: .8rem; }
.footer-inner { padding-block: 30px 33px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer p { font-size: .81rem; margin-top: .55rem; color: #bac3d2; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .87rem; }

@media (min-width: 980px) {
  body { display: grid; grid-template-columns: clamp(185px, 17vw, 224px) minmax(0, 1fr); }
  .top {
    grid-column: 1; grid-row: 1 / 3; align-self: start; position: sticky; top: 0; height: 100dvh;
    border: 0; border-right: 1px solid #ffffff26; overflow-y: auto;
  }
  main, .footer { grid-column: 2; min-width: 0; }
  .header-inner { flex-direction: column; align-items: stretch; justify-content: start; gap: 30px; width: 100%; height: 100%; padding: 28px 17px; }
  .header-inner .brand { padding-inline: 9px; }
  .header-inner nav { display: grid; gap: 5px; }
  .header-inner nav a { padding: 10px 12px; border-radius: 5px; }
  .header-inner nav a:hover, .header-inner nav a:focus-visible { background: var(--night-soft); }
  .header-source { margin-top: auto; padding: 10px 12px; border-top: 1px solid #ffffff26; }
  .hero-inner { gap: clamp(28px, 4vw, 67px); }
  .hero h1 { font-size: clamp(3.9rem, 6.5vw, 6.8rem); }
}

@media (max-width: 970px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic { min-height: 92px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 0; flex-wrap: wrap; gap: 5px 12px; padding-block: 13px 8px; }
  .header-inner nav { width: 100%; order: 2; column-gap: clamp(8px, 3vw, 25px); row-gap: 0; font-size: .84rem; }
  .header-source { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; gap: 25px; padding-block: 34px; }
  .hero-figure { max-width: 565px; }
  .hero h1 { font-size: clamp(3.8rem, 11vw, 5.5rem); }
  .content { padding-bottom: 52px; }
  .section-heading { flex-wrap: wrap; }
  .record-labels { display: none; }
  .record-row { grid-template-columns: 65px minmax(0, 1fr); gap: .2rem .5rem; padding: .65rem .66rem .35rem; }
  .record-title { grid-row: 1; grid-column: 2; display: grid; line-height: 1.3; }
  .record-title strong, .record-title span { overflow-wrap: anywhere; }
  .record-code { font-size: .76rem; grid-column: 1; }
  .record-category { grid-row: 2; grid-column: 2; }
  .record-year { grid-row: 2; grid-column: 1; padding-left: .35rem; font-size: .78rem; }
  .record-body { padding: .1rem .66rem .9rem; }
  .source-link { padding-block: .22rem; }
  .reading-grid { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; gap: 18px; }
  .footer-inner { flex-direction: column; align-items: start; }
}

@media (max-width: 380px) {
  .header-inner nav { font-size: .79rem; }
  .topic { padding: 10px; }
  .topic-count { font-size: .82rem; }
  .hero-figure figcaption { padding-inline: .65rem; }
}

@media (max-width: 450px) {
  .header-inner nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
