:root {
  --ink: #18201d;
  --muted: #5f6864;
  --line: #cfd6d2;
  --surface: #ffffff;
  --soft: #f4f7f5;
  --green: #1d6650;
  --green-dark: #124536;
  --amber: #9b6213;
  --amber-soft: #fff4df;
  --red: #9c3e36;
  --blue: #315f86;
  --shadow: 0 10px 28px rgba(24, 32, 29, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; line-height: 1.6; letter-spacing: 0; }
button, input, select { font: inherit; }
a { color: var(--green-dark); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.content-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; background: #fff; padding: 10px 14px; border: 2px solid var(--green); }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 40; color: #fff; background: var(--green-dark); border-bottom: 3px solid #d3a34e; }
.site-header__inner { width: min(1240px, calc(100% - 32px)); min-height: 68px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: #fff; text-decoration: none; display: grid; line-height: 1.25; }
.brand span { font-size: 0.76rem; color: #c8ded6; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a { color: #fff; text-decoration: none; padding: 9px 10px; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-color: #efc574; background: rgba(255,255,255,0.08); }

.intro-band { background: #eaf1ed; border-bottom: 1px solid var(--line); padding: 42px 0 24px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; max-width: 840px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.08; }
.subtitle { margin: 10px 0 0; color: var(--green-dark); font-weight: 700; font-size: 1.05rem; }
.lead { max-width: 850px; color: #3c4843; font-size: 1.05rem; }
.review-notice { border-left: 5px solid var(--amber); background: var(--amber-soft); padding: 18px 20px; }
.review-notice p { margin: 6px 0 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 26px; background: var(--line); border: 1px solid var(--line); }
.metric { min-height: 88px; padding: 14px 16px; background: var(--surface); }
.metric strong { display: block; font-size: 1.65rem; color: var(--green-dark); }
.metric span { color: var(--muted); font-size: 0.84rem; }

.toolbar-band { background: var(--surface); border-bottom: 1px solid var(--line); }
.toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 14px 0; }
.view-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.view-tabs button { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 13px; cursor: pointer; border-radius: 4px; }
.view-tabs button[aria-selected="true"] { color: #fff; background: var(--green); border-color: var(--green); }
.search-box { min-width: min(420px, 100%); color: var(--muted); font-size: 0.78rem; }
.search-box span { display: block; margin-bottom: 4px; }
.search-box input { width: 100%; min-height: 42px; border: 1px solid #9eaaa4; border-radius: 4px; padding: 8px 11px; background: #fff; }
.workspace { min-height: 620px; padding: 34px 0 64px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 1.7rem; }
.section-heading > p { max-width: 540px; margin: 0; color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.filter-row label { color: var(--muted); font-size: 0.82rem; }
.filter-row select { display: block; min-width: 190px; min-height: 40px; border: 1px solid #aeb8b3; border-radius: 4px; background: #fff; padding: 7px 10px; }
.result-line { margin: 10px 0 16px; color: var(--muted); }

.image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.image-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.image-card button { width: 100%; height: 250px; padding: 0; border: 0; background: #e4e9e6; cursor: zoom-in; overflow: hidden; }
.image-card img { width: 100%; height: 100%; object-fit: contain; }
.image-card__body { padding: 14px; }
.image-card__locator { margin: 0 0 6px !important; color: var(--green); font-size: 0.75rem !important; font-weight: 800; }
.image-card h3 { margin: 0; font-size: 1rem; }
.image-card h3 span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.image-card p { margin: 10px 0; font-size: 0.88rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 7px; border-radius: 3px; background: #e7f0ec; color: var(--green-dark); font-size: 0.74rem; font-weight: 700; }
.tag--pending { background: var(--amber-soft); color: #754607; }
.tag--license { background: #e8eef5; color: var(--blue); }
.tag--role { background: #ece8f4; color: #51406e; }

.taxonomy-list { display: grid; gap: 10px; }
.taxonomy-item { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--green); }
.taxonomy-item summary { cursor: pointer; padding: 14px 16px; font-weight: 800; }
.taxonomy-item summary span { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.taxonomy-item__body { padding: 0 16px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.taxonomy-item__body p { margin: 5px 0; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); background: #fff; }
table { width: 100%; min-width: 850px; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid #dce1de; text-align: left; vertical-align: top; }
th { position: sticky; top: 67px; z-index: 2; color: #fff; background: #315148; font-size: 0.78rem; }
td { font-size: 0.88rem; }
td strong span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.quality-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.quality-item { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--green); padding: 14px; }
.quality-item h4 { margin: 0 0 6px; }
.quality-item p { margin: 5px 0; font-size: 0.86rem; }
.policy-box { margin-bottom: 20px; padding: 16px 18px; background: #eef3f0; border-left: 5px solid var(--green); }
.empty { grid-column: 1 / -1; padding: 32px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #aeb8b3; }

dialog { width: min(1100px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid #87958e; border-radius: 6px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(16, 25, 21, 0.74); }
.dialog-close { position: sticky; top: 10px; z-index: 3; float: right; margin: 10px 10px 0 0; border: 1px solid #fff; border-radius: 4px; padding: 8px 12px; color: #fff; background: var(--green-dark); cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr); min-height: 520px; }
.dialog-image { display: grid; place-items: center; min-height: 520px; padding: 24px; background: #e8ecea; }
.dialog-image img { max-height: 75vh; object-fit: contain; }
.dialog-copy { padding: 34px 28px; overflow-wrap: anywhere; }
.dialog-copy h2 { margin: 0; font-size: 1.5rem; }
.dialog-copy h2 span { display: block; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.dialog-copy dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 0.84rem; }
.dialog-copy dt { color: var(--muted); font-weight: 700; }
.dialog-copy dd { margin: 0; }
.dialog-copy details { margin: 18px 0; padding: 12px; border: 1px solid var(--line); background: var(--soft); }
.dialog-copy summary { cursor: pointer; font-weight: 800; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.full-image-link { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 12px; color: #fff; background: var(--green); border-radius: 4px; text-decoration: none; font-weight: 700; }
.parent-figure img { display: block; width: 100%; height: auto; margin-top: 12px; object-fit: contain; }
footer { color: #eaf2ef; background: #173c31; padding: 28px 0; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; }
footer a { color: #fff; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #efb74f; outline-offset: 2px; }
@media print {
  .site-header, .toolbar-band, .dialog-close { display: none !important; }
  body { background: #fff; }
  .view-panel[hidden] { display: none !important; }
}
@media (max-width: 900px) {
  .site-header__inner, .toolbar, .section-heading { align-items: stretch; flex-direction: column; }
  .site-header__inner { padding: 10px 0; }
  .intro-grid, .dialog-layout { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .image-grid, .quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taxonomy-item__body { grid-template-columns: 1fr; }
  .dialog-image { min-height: 340px; }
}
@media (max-width: 600px) {
  .content-shell, .site-header__inner { width: min(100% - 22px, 1180px); }
  nav { display: none; }
  .intro-band { padding-top: 28px; }
  h1 { font-size: 2rem; }
  .metrics, .image-grid, .quality-grid { grid-template-columns: 1fr; }
  .view-tabs { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; }
  .view-tabs button { width: 100%; }
  .filter-row label, .filter-row select { width: 100%; }
  .image-card button { height: 230px; }
  .footer-grid { display: block; }
  .dialog-copy { padding: 24px 18px; }
  .dialog-copy dl { grid-template-columns: 1fr; }
  .dialog-copy dd { margin-bottom: 8px; }
}
