:root {
  --paper: #f5f5ef;
  --card: #fff;
  --ink: #23372f;
  --muted: #69766e;
  --line: #dce3d7;
  --accent: #315f43;
  --wash: #e8eedf;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
button,
input {
  font: inherit;
}
.topbar {
  padding: 20px 5%;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--paper);
}
.brand {
  text-decoration: none;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.05em;
}
.brand span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 12px;
}
.topbar nav {
  display: flex;
  gap: 24px;
  font-size: 13px;
}
.layout {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 64px;
  padding: 48px 5%;
}
aside {
  min-width: 0;
  position: sticky;
  top: 24px;
  align-self: start;
}
aside h2 {
  font-size: 20px;
  margin: 8px 0 0;
}
.muted,
.scope {
  color: var(--muted);
}
aside .muted {
  margin-top: 0;
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 12px;
}
#categories {
  display: grid;
  gap: 5px;
  margin: 32px 0;
}
#categories button {
  border: 0;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  gap: 12px;
}
#categories button:hover,
#categories button.active {
  background: var(--wash);
  color: var(--ink);
}
.nav-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.aside-note {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
main {
  min-width: 0;
}
.hero {
  padding: 0 0 30px;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin: 12px 0 20px;
}
.hero > p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
}
.version {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--muted);
}
.toolbar {
  margin: 8px 0 32px;
  padding: 22px;
  background: var(--wash);
  border-radius: 10px;
}
.toolbar label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.search-row {
  display: flex;
  gap: 10px;
}
input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
}
input:focus {
  outline: 2px solid #a1b69c;
  outline-offset: 2px;
}
button {
  cursor: pointer;
}
.search-row button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
}
#status {
  font-size: 12px;
  margin: 12px 0 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading h2,
.sources h2 {
  font-size: 23px;
  font-weight: 650;
}
.section-heading span {
  font-size: 12px;
  color: var(--muted);
}
.scope {
  font-size: 12px;
}
.rule {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0;
  scroll-margin-top: 20px;
}
.rule > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  list-style: none;
}
.rule > summary:after {
  content: "＋";
  color: var(--muted);
  font-size: 18px;
}
.rule[open] > summary:after {
  content: "−";
}
.rule-heading {
  min-width: 0;
  flex: 1;
}
.rule-id {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.rule h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 2px 0;
}
.category-tag {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.rule-body {
  padding: 0 24px 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.rule-body h4 {
  font-size: 14px;
  margin: 24px 0 12px;
}
.labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.badge {
  font-size: 10px;
  border-radius: 20px;
  background: var(--wash);
  padding: 3px 10px;
}
.muted-badge {
  background: #f0f2ed;
  color: var(--muted);
}
blockquote {
  margin: 10px 0;
  padding: 14px 18px;
  border-left: 3px solid #aec1a3;
  background: #f5f7f0;
  white-space: pre-wrap;
  font-size: 13px;
}
.source-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.links,
.rule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 12px;
}
.rule-actions {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
}
.precision {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.precision summary {
  cursor: pointer;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f4f6f0;
  padding: 14px;
  font-size: 11px;
  line-height: 1.7;
  max-width: 100%;
}
.sources {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  scroll-margin-top: 24px;
}
#source-date {
  font-size: 13px;
  color: var(--muted);
}
#source-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.source-card {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.source-card h3 {
  font-size: 15px;
  margin: 0;
}
.source-card p {
  font-size: 12px;
  color: var(--muted);
}
footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.empty {
  padding: 36px;
  text-align: center;
  color: var(--muted);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-top: 24px;
  }
  aside {
    position: static;
  }
  aside h2 {
    font-size: 18px;
  }
  #categories {
    display: flex;
    overflow: auto;
    gap: 6px;
    margin: 18px 0;
  }
  #categories button {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .aside-note {
    display: none;
  }
  .hero {
    padding-top: 8px;
  }
  .hero h1 {
    font-size: 34px;
  }
  #source-list {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 16px 5%;
  }
  .topbar nav {
    gap: 12px;
    font-size: 11px;
  }
  .brand {
    font-size: 18px;
  }
  .brand span {
    margin-left: 6px;
    font-size: 11px;
  }
  .category-tag {
    display: none;
  }
  .rule > summary {
    padding: 16px;
  }
  .rule-body {
    padding: 0 16px 18px;
  }
}
@media (max-width: 440px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .search-row {
    flex-wrap: wrap;
  }
  .search-row button {
    width: 100%;
  }
  .hero h1 {
    font-size: 30px;
  }
}
