:root {
  --color-bg: #ffffff;
  --color-text: #202622;
  --color-heading: #131815;
  --color-muted: #66706a;
  --color-line: #d9dfdb;
  --color-line-strong: #b9c4be;
  --color-soft: #f3f7f5;
  --color-accent: #176b51;
  --color-accent-hover: #10553f;
  --color-accent-soft: #e4f1ec;
  --color-warning: #b65725;
  --color-warning-soft: #fff3ea;
  --color-danger: #a53b36;
  --shadow-dialog: 0 24px 64px rgb(21 36 29 / 18%);
  --radius: 6px;
  --container: 1240px;
  --font: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.filter-open { overflow: hidden; }

button, input, select { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--color-heading); font-weight: 700; letter-spacing: 0; }
h1 { margin-bottom: 10px; font-size: 34px; line-height: 1.25; }
h2 { font-size: 21px; line-height: 1.35; }
h3 { font-size: 18px; line-height: 1.45; }

:focus-visible {
  outline: 3px solid rgb(23 107 81 / 28%);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--color-heading);
  color: #fff;
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 66px;
  border-bottom: 1px solid var(--color-line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(10px);
}

.site-header__inner,
.stats-band__inner,
.search-shell,
.page-shell,
.detail-shell,
.site-footer__inner {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 100%;
  gap: 38px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-heading);
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: #fff;
  font-size: 15px;
}

.primary-nav { display: flex; align-items: stretch; height: 100%; gap: 26px; }

.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #4e5852;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  content: "";
  opacity: 0;
}

.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--color-accent); }
.primary-nav a[aria-current="page"]::after { opacity: 1; }

.button,
.icon-button,
.pagination__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button {
  min-height: 40px;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

.button svg, .text-link svg, .icon-button svg, .pagination__button svg { width: 17px; height: 17px; stroke-width: 2; }
.button--primary { background: var(--color-accent); color: #fff; }
.button--primary:hover { background: var(--color-accent-hover); }
.button--secondary { border-color: var(--color-line-strong); background: #fff; color: var(--color-heading); }
.button--secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.button--ghost { background: transparent; color: var(--color-muted); }
.button--ghost:hover { background: var(--color-soft); color: var(--color-heading); }
.button--disabled { border-color: var(--color-line); background: var(--color-soft); color: #8a928d; cursor: not-allowed; }
.button--full { width: 100%; }
.button:active, .icon-button:active { transform: translateY(1px); }

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--color-line);
  background: #fff;
  color: var(--color-heading);
}

.icon-button:hover { border-color: var(--color-line-strong); background: var(--color-soft); }
.mobile-nav-toggle, .mobile-filter-button { display: none; }

.stats-band {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-soft);
}

.stats-band__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 76px;
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border-left: 1px solid var(--color-line);
  white-space: nowrap;
}

.metric:last-child { border-right: 1px solid var(--color-line); }
.metric strong { color: var(--color-heading); font-size: 22px; line-height: 1; }
.metric span { color: var(--color-muted); font-size: 13px; }

.search-shell { padding-block: 34px 72px; }

.service-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-left: 3px solid var(--color-warning);
  background: var(--color-warning-soft);
  color: #70421f;
  font-size: 13px;
}

.service-notice svg { width: 17px; height: 17px; flex: 0 0 auto; }

.search-shell__heading,
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.search-shell__heading p,
.page-heading p { margin-bottom: 0; color: var(--color-muted); }

.search-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 22px;
}

.search-input { position: relative; display: block; }
.search-input svg { position: absolute; top: 15px; left: 16px; width: 20px; height: 20px; color: #7b857f; }

.search-input input {
  width: 100%;
  height: 50px;
  padding: 0 18px 0 48px;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-heading);
  font-size: 15px;
}

.search-input input:hover { border-color: #8d9992; }
.search-input input:focus { border-color: var(--color-accent); outline: 3px solid rgb(23 107 81 / 12%); }
.search-submit { min-width: 92px; height: 50px; }

.search-progress {
  position: absolute;
  right: 106px;
  bottom: -4px;
  left: 0;
  height: 2px;
  overflow: hidden;
  background: var(--color-accent-soft);
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease;
}

.search-progress.htmx-request { opacity: 1; visibility: visible; }

.search-progress::after {
  display: block;
  width: 36%;
  height: 100%;
  background: var(--color-accent);
  content: "";
  animation: progress 900ms ease-in-out infinite;
}

.section-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
}

.section-nav__item {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 74px;
  align-content: center;
  gap: 2px;
  padding: 12px 13px;
  border-right: 1px solid var(--color-line);
  color: var(--color-heading);
  text-decoration: none;
}

.section-nav__item:last-child { border-right: 0; }
.section-nav__item:hover { background: var(--color-soft); }
.section-nav__item.is-active { background: var(--color-accent-soft); color: var(--color-accent); }
.section-nav__item.is-active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--color-accent); content: ""; }
.section-nav__item span { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.section-nav__item small { overflow: hidden; color: var(--color-muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.section-nav__item strong { position: absolute; top: 11px; right: 11px; color: var(--color-muted); font-size: 11px; font-weight: 650; }
.section-nav__item:not(:first-child) span { padding-right: 38px; }
.section-nav__item--unclassified { background: #fafafa; }
.section-nav__item--unclassified.is-active { background: #f0f2f1; color: #4f5953; }
.section-nav__item--unclassified.is-active::after { background: #69736d; }

.search-layout { display: block; }

.filter-panel {
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-soft);
}

.filter-panel__mobile-header { display: none; }

.filter-grid {
  display: grid;
  grid-template-columns: minmax(145px, 0.9fr) minmax(125px, 0.75fr) minmax(200px, 1.25fr) minmax(245px, 1.45fr) minmax(130px, 0.75fr) auto;
  align-items: end;
  gap: 12px;
}

.filter-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-field > label,
.filter-field > legend,
.filter-field__label-row {
  display: block;
  margin-bottom: 6px;
  color: var(--color-heading);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.filter-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.filter-field__label-row a { color: var(--color-accent); font-size: 11px; font-weight: 650; text-decoration: none; }
.filter-field__label-row a:hover { text-decoration: underline; text-underline-offset: 2px; }

.filter-field select,
.filter-field input {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-heading);
  font-size: 13px;
}

.filter-field input { padding-right: 8px; }
.filter-field select:hover, .filter-field input:hover { border-color: var(--color-line-strong); }
.filter-field select:focus, .filter-field input:focus { border-color: var(--color-accent); outline: 2px solid rgb(23 107 81 / 12%); }

.date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.date-range label { position: relative; display: block; }
.date-range label span { position: absolute; top: 10px; left: 10px; z-index: 1; color: var(--color-muted); font-size: 12px; line-height: 20px; pointer-events: none; }
.date-range input { padding-left: 28px; }

.filter-actions { display: flex; align-items: center; gap: 4px; }
.filter-actions .button { height: 40px; white-space: nowrap; }
.filter-backdrop { display: none; }

.results-panel { min-width: 0; }

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-line-strong);
}

.results-header h2 { margin-bottom: 3px; font-size: 17px; }
.results-header p, .results-header > span { margin: 0; color: var(--color-muted); font-size: 12px; }
.results-header > div { min-width: 0; }
.results-header > span { flex: 0 0 auto; white-space: nowrap; }
.results-context { overflow-wrap: anywhere; }
.results-context span + span::before { margin-inline: 6px; content: "·"; }
.article-list { border-bottom: 1px solid var(--color-line-strong); }

.article-row { padding: 21px 0 20px; border-bottom: 1px solid var(--color-line); }
.article-row:last-child { border-bottom: 0; }
.article-row h3 { max-width: 1000px; margin: 8px 0 7px; font-size: 18px; }
.article-row h3 a { text-decoration: none; }
.article-row h3 a:hover { color: var(--color-accent); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 15px;
  color: var(--color-muted);
  font-size: 12px;
}

.article-meta > * { position: relative; }
.article-meta > * + *::before { position: absolute; top: 50%; left: -9px; width: 3px; height: 3px; border-radius: 50%; background: #a8b0ab; content: ""; transform: translateY(-50%); }
.country-missing { color: #946525 !important; }
.section-label { color: var(--color-accent); font-weight: 700; }
.section-label--unclassified, .section-missing { color: var(--color-muted) !important; }
.article-summary { display: -webkit-box; max-width: 1080px; margin-bottom: 12px; overflow: hidden; color: #505a54; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.article-actions { display: flex; flex-wrap: wrap; gap: 18px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover { color: var(--color-accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.text-link--strong { font-weight: 750; }
.muted-action { color: #909893; font-size: 13px; }

.status-warning { display: inline-flex; align-items: center; gap: 4px; color: var(--color-warning); font-weight: 650; }
.status-warning svg { width: 14px; height: 14px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding-top: 28px; color: var(--color-muted); font-size: 13px; }

.pagination__button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-line);
  background: #fff;
  color: var(--color-heading);
}

a.pagination__button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination__button[aria-disabled="true"] { background: var(--color-soft); color: #a0a8a3; cursor: not-allowed; }

.empty-state {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state > svg { width: 38px; height: 38px; margin-bottom: 18px; color: var(--color-muted); }
.empty-state h3, .empty-state h2 { margin-bottom: 8px; }
.empty-state p { max-width: 460px; margin-bottom: 20px; color: var(--color-muted); }
.empty-state--error > svg { color: var(--color-danger); }

.detail-shell { padding-block: 34px 80px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 32px; color: var(--color-muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.back-link:hover { color: var(--color-accent); }
.back-link svg { width: 17px; height: 17px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; align-items: start; }
.detail-article { min-width: 0; }
.detail-article > h1 { max-width: 860px; margin: 14px 0 32px; font-size: 38px; line-height: 1.25; }
.article-meta--detail { font-size: 13px; }

.summary-block, .preview-block { padding-block: 25px; border-top: 1px solid var(--color-line); }
.summary-block h2, .preview-block h2 { margin-bottom: 12px; font-size: 15px; }
.summary-block p { margin: 0; color: #3f4943; font-size: 17px; line-height: 1.8; }
.preview-block p { margin: 0; color: #3e4842; font-size: 16px; line-height: 1.9; white-space: pre-line; }
.section-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-heading-row > span { color: var(--color-muted); font-size: 12px; }

.evidence-panel { padding: 24px; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-soft); }
.evidence-panel h2 { margin-bottom: 20px; font-size: 16px; }
.evidence-panel dl { margin: 0 0 22px; }
.evidence-panel dl > div { padding: 11px 0; border-bottom: 1px solid var(--color-line); }
.evidence-panel dt { margin-bottom: 3px; color: var(--color-muted); font-size: 11px; }
.evidence-panel dd { margin: 0; overflow-wrap: anywhere; color: var(--color-heading); font-size: 13px; }
.evidence-secondary { display: block; margin-top: 2px; color: var(--color-muted); font-size: 10px; }

.inline-state { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border-left: 3px solid var(--color-warning); background: var(--color-warning-soft); }
.inline-state > svg { width: 21px; height: 21px; color: var(--color-warning); }
.inline-state strong, .inline-state span { display: block; }
.inline-state span { margin-top: 2px; color: var(--color-muted); font-size: 13px; }

.conversion-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 72px;
  padding: 30px 34px;
  border-top: 1px solid var(--color-line-strong);
  border-bottom: 1px solid var(--color-line-strong);
  background: var(--color-soft);
}

.conversion-band h2 { margin-bottom: 5px; font-size: 20px; }
.conversion-band p { margin: 0; color: var(--color-muted); }

.page-shell { padding-block: 50px 82px; }
.page-heading { align-items: flex-start; padding-bottom: 26px; border-bottom: 1px solid var(--color-line-strong); }
.page-heading > span { padding-top: 12px; color: var(--color-muted); font-size: 13px; white-space: nowrap; }
.source-summary { display: flex; gap: 0; margin-bottom: 34px; border-bottom: 1px solid var(--color-line); }
.source-summary > div { display: flex; min-width: 180px; align-items: baseline; gap: 8px; padding: 21px 32px 21px 0; }
.source-summary strong { color: var(--color-heading); font-size: 23px; }
.source-summary span { color: var(--color-muted); font-size: 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius); }
.data-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 15px 18px; border-bottom: 1px solid var(--color-line); text-align: left; }
.data-table thead th { background: var(--color-soft); color: var(--color-muted); font-size: 11px; font-weight: 700; }
.data-table tbody th { color: var(--color-heading); font-weight: 650; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr:hover { background: #f9fbfa; }
.source-identity { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.source-fallback, .source-favicon { width: 24px; height: 24px; border-radius: 4px; }
.source-fallback { display: inline-grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); font-size: 11px; font-weight: 750; }
.source-favicon { position: absolute; left: 0; object-fit: contain; background: #fff; }
.source-favicon[data-failed="true"] { display: none; }

.page-heading--product { max-width: 850px; border: 0; }
.page-heading--product h1 { font-size: 40px; }
.page-heading--product p { max-width: 720px; font-size: 17px; line-height: 1.75; }
.product-section { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 74px; padding: 42px 0; border-top: 1px solid var(--color-line-strong); }
.product-section__intro h2 { margin-bottom: 9px; }
.product-section__intro p { color: var(--color-muted); font-size: 13px; }
.field-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--color-line); }
.field-list > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 12px; padding: 16px 12px 16px 0; border-bottom: 1px solid var(--color-line); }
.field-list strong { overflow-wrap: anywhere; color: var(--color-accent); font-family: Consolas, monospace; font-size: 12px; }
.field-list span { color: #505a54; font-size: 13px; }
.code-sample { margin: 0; padding: 24px; overflow-x: auto; border-radius: var(--radius); background: #17231e; color: #dce9e3; font: 13px/1.75 Consolas, "Courier New", monospace; }
.conversion-band--product { margin-top: 42px; }
.contact-pending { color: var(--color-muted); font-size: 13px; }

.contact-dialog {
  width: min(calc(100% - 32px), 520px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-dialog);
}

.contact-dialog::backdrop { background: rgb(16 27 22 / 46%); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 26px 20px; border-bottom: 1px solid var(--color-line); }
.dialog-header h2 { margin-bottom: 5px; }
.dialog-header p { margin: 0; color: var(--color-muted); font-size: 13px; }
.contact-value { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 14px; padding: 24px 26px; }
.contact-value span { color: var(--color-muted); font-size: 13px; }
.contact-value strong { overflow-wrap: anywhere; color: var(--color-heading); font-size: 16px; }
.dialog-actions { display: flex; gap: 10px; padding: 0 26px 26px; }

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  width: min(calc(100% - 44px), 360px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #9fb9ac;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 32px rgb(21 36 29 / 14%);
  color: var(--color-heading);
  font-size: 13px;
  animation: toast-in 180ms ease-out;
}

.toast--error { border-color: #d5aaa7; }
.toast svg { width: 18px; height: 18px; color: var(--color-accent); }
.toast--error svg { color: var(--color-danger); }

.error-page { display: flex; min-height: calc(100vh - 146px); flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; text-align: center; }
.error-page > svg { width: 46px; height: 46px; margin-bottom: 20px; color: var(--color-warning); }
.error-page h1 { margin-bottom: 8px; }
.error-page p { margin-bottom: 24px; color: var(--color-muted); }

.site-footer { border-top: 1px solid var(--color-line); }
.site-footer__inner { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 24px; color: var(--color-muted); font-size: 12px; }

@keyframes progress { from { transform: translateX(-100%); } to { transform: translateX(380%); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .section-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .section-nav__item:nth-child(4) { border-right: 0; }
  .section-nav__item:nth-child(-n+4) { border-bottom: 1px solid var(--color-line); }
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; gap: 14px; }
  .mobile-nav-toggle { display: inline-flex; justify-self: end; }
  .primary-nav {
    position: absolute;
    top: 66px;
    right: 20px;
    display: none;
    width: 190px;
    height: auto;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 16px 36px rgb(21 36 29 / 12%);
  }
  .primary-nav[data-open="true"] { display: flex; }
  .primary-nav a { min-height: 42px; padding: 0 12px; border-radius: 4px; }
  .primary-nav a::after { display: none; }
  .primary-nav a[aria-current="page"] { background: var(--color-soft); }
  .header-cta { display: none; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 38px; }
  .product-section { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .field-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 28px; }
  .site-header__inner, .stats-band__inner, .search-shell, .page-shell, .detail-shell, .site-footer__inner { width: min(calc(100% - 32px), var(--container)); }
  .site-header { height: 60px; }
  .brand { font-size: 16px; }
  .brand__mark { width: 30px; height: 30px; }
  .primary-nav { top: 60px; right: 16px; }
  .stats-band { overflow-x: auto; }
  .stats-band__inner { width: max(100%, 690px); min-width: 0; grid-template-columns: repeat(5, minmax(138px, 1fr)); }
  .metric { min-height: 72px; flex-direction: column; align-items: center; gap: 6px; padding: 14px 12px; }
  .metric strong { font-size: 21px; }
  .metric span { font-size: 12px; line-height: 1; }
  .search-shell { padding-block: 26px 56px; }
  .search-shell__heading { align-items: center; margin-bottom: 18px; }
  .search-shell__heading p { font-size: 13px; }
  .mobile-filter-button { display: inline-flex; flex: 0 0 auto; }
  .search-form { grid-template-columns: minmax(0, 1fr) 76px; margin-bottom: 24px; }
  .search-input input { height: 46px; padding-left: 43px; }
  .search-input svg { top: 13px; left: 14px; }
  .search-submit { min-width: 0; height: 46px; padding-inline: 12px; }
  .search-progress { right: 86px; }
  .section-nav {
    display: flex;
    margin-right: -16px;
    margin-left: -16px;
    overflow-x: auto;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    scroll-snap-type: x proximity;
  }
  .section-nav__item {
    width: 158px;
    min-width: 158px;
    min-height: 70px;
    border-bottom: 0 !important;
    scroll-snap-align: start;
  }
  .section-nav__item:nth-child(4) { border-right: 1px solid var(--color-line); }
  .search-layout { display: block; }
  .filter-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    display: block;
    width: min(88vw, 340px);
    margin: 0;
    padding: 22px 20px 32px;
    border: 0;
    border-radius: 0;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-105%);
    transition: transform 180ms ease-out;
  }
  .filter-panel[data-open="true"] { transform: translateX(0); }
  .filter-panel__mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
  .filter-grid { display: block; }
  .filter-field { margin-bottom: 20px; }
  .filter-field > label, .filter-field > legend, .filter-field__label-row { margin-bottom: 7px; }
  .filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    background: rgb(16 27 22 / 44%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease-out;
  }
  body.filter-open .filter-backdrop { opacity: 1; pointer-events: auto; }
  .filter-actions { position: sticky; bottom: -32px; margin: 4px -20px -32px; padding: 14px 20px 20px; border-top: 1px solid var(--color-line); background: #fff; }
  .filter-actions .button--primary { flex: 1; }
  .results-header { min-height: 48px; }
  .article-row { padding-block: 22px 20px; }
  .article-row h3 { font-size: 18px; }
  .article-summary { -webkit-line-clamp: 3; }
  .article-actions { gap: 15px; }
  .pagination { gap: 12px; }
  .pagination > span { font-size: 12px; }
  .detail-shell { padding-block: 25px 60px; }
  .back-link { margin-bottom: 25px; }
  .detail-grid { display: flex; flex-direction: column; gap: 30px; }
  .detail-article > h1 { margin-bottom: 24px; font-size: 29px; }
  .summary-block p { font-size: 16px; }
  .preview-block p { font-size: 15px; }
  .evidence-panel { width: 100%; order: 2; }
  .conversion-band { align-items: flex-start; flex-direction: column; margin-top: 46px; padding: 25px 22px; }
  .conversion-band .button { width: 100%; }
  .page-shell { padding-block: 34px 60px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 20px; }
  .page-heading > span { padding-top: 0; }
  .source-summary { overflow-x: auto; }
  .source-summary > div { min-width: 145px; padding-right: 20px; }
  .page-heading--product h1 { font-size: 31px; }
  .page-heading--product p { font-size: 15px; }
  .product-section { display: block; padding: 30px 0; }
  .product-section__intro { margin-bottom: 20px; }
  .field-list > div { grid-template-columns: 135px minmax(0, 1fr); }
  .code-sample { padding: 18px; font-size: 12px; }
  .contact-dialog { max-height: calc(100vh - 32px); overflow-y: auto; }
  .contact-value { grid-template-columns: 1fr; gap: 4px; }
  .dialog-actions { flex-direction: column; }
  .dialog-actions .button { width: 100%; }
  .site-footer__inner { min-height: 92px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; }
}

@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; }
}
