
:root {
  --fg: #182230;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d9e2ee;
  --soft: #f6f8fb;
  --panel: #ffffff;
  --accent: #1d4ed8;
  --accent-soft: #eaf1ff;
  --green: #0f766e;
  --green-soft: #e7f6f3;
  --gold: #a16207;
  --gold-soft: #fff8e6;
  --red: #b42318;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fg);
  background: #fff;
  font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); overflow-wrap: anywhere; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 22px; }
.top {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  padding: 28px 0 22px;
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 30px; align-items: end; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 760;
}
h1 { margin: 0; font-size: 34px; line-height: 1.08; letter-spacing: 0; }
h2 { margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: 0; }
h3 { margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0; font-size: 12px; }
.summary { margin: 12px 0 0; max-width: 820px; color: #475569; font-size: 15px; }
.jump-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.jump-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 5px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.jump-nav a:hover, .jump-nav a:focus { border-color: var(--accent); color: var(--accent); outline: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 12px; min-width: 0; }
.metric b { display: block; color: var(--ink); font-size: 23px; font-weight: 760; line-height: 1.1; overflow-wrap: anywhere; }
.metric span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; padding-top: 22px; padding-bottom: 70px; }
.filters {
  position: sticky;
  top: 14px;
  align-self: start;
  max-height: calc(100vh - 28px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.sidebar-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px; }
.sidebar-head h2 { font-size: 16px; }
.filter-status { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; }
.control { margin-bottom: 14px; }
.control label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 760;
}
.filters input, .filters select {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--fg);
  padding: 9px 10px;
}
.filters input:focus, .filters select:focus, button:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
.clear { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 8px; color: var(--accent); font-weight: 760; }
.clear:hover { border-color: var(--accent); background: var(--accent-soft); }
.content { min-width: 0; display: grid; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 18px; min-width: 0; }
.section-head { margin-bottom: 14px; }
.section-head p:not(.eyebrow), #viewExplain, #count { margin: 7px 0 0; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.guide-card, .note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
  min-width: 0;
}
.guide-card b { display: block; margin-bottom: 5px; color: var(--ink); }
.guide-card span, .note { color: #475569; font-size: 13px; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.note { border-left: 4px solid var(--gold); background: var(--gold-soft); }
.selection-panel { border-left: 4px solid var(--accent); }
.active-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.pill, .chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef2f7;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.pill strong { color: var(--ink); margin-right: 4px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 12px; }
.subtheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 10px; }
.theme, .subtheme {
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.subtheme { border-top-color: var(--green); }
.theme:hover, .theme.on, .subtheme:hover, .subtheme.on { background: #f8fbff; box-shadow: 0 0 0 2px #dbeafe; }
.theme:focus-visible, .subtheme:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.theme h4, .subtheme h4 { margin: 0 0 7px; color: var(--ink); font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.theme p, .subtheme p { margin: 7px 0; color: #475569; font-size: 13px; overflow-wrap: anywhere; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; }
.meta span, .meta a { overflow-wrap: anywhere; }
.mix { display: grid; gap: 5px; margin-top: 9px; }
.mix-row { display: grid; grid-template-columns: minmax(74px, 112px) minmax(0, 1fr) 42px; gap: 8px; align-items: center; color: #475569; font-size: 11.5px; }
.mix-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track, .bar { display: block; overflow: hidden; background: #e5ebf3; border-radius: 999px; }
.track { height: 8px; }
.fill { display: block; height: 100%; background: var(--accent); }
.charts { display: grid; grid-template-columns: 1.35fr .9fr .9fr; gap: 18px; }
.charts.comparison { grid-template-columns: 1fr 1fr; }
.chart { min-height: 230px; max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; padding: 10px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 70px; gap: 9px; align-items: center; margin: 6px 0; color: #475569; font-size: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 18px; border-radius: 4px; }
.bar > span { display: block; height: 100%; background: #dbeafe; min-width: 1px; }
.bar > span > span { display: block; height: 100%; background: var(--green); min-width: 1px; }
.bar-value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.review-grid, .examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.review-card { border: 1px solid #f2d39b; border-left: 4px solid var(--gold); border-radius: 8px; background: var(--gold-soft); padding: 12px; min-width: 0; }
.example { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px; min-width: 0; }
.chip { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: #fef3c7; color: #92400e; }
.evidence { margin: 8px 0; border-left: 3px solid var(--line); padding-left: 8px; color: #475569; overflow-wrap: anywhere; }
.txt { max-height: 180px; overflow: auto; white-space: pre-wrap; color: #263244; font-size: 13px; overflow-wrap: anywhere; }
.empty {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  color: #475569;
}
.empty b { display: block; margin-bottom: 4px; color: var(--ink); }
.empty button { margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--accent); padding: 7px 10px; font-weight: 760; }
.caveats ul { margin: 0; padding-left: 19px; color: #475569; }
.caveats li { margin: 6px 0; }
mark { background: #fef08a; border-radius: 3px; padding: 0 1px; }
@media (max-width: 980px) {
  .hero, .shell, .charts { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; order: 2; }
  .content { order: 1; }
  .metrics, .notes, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  h1 { font-size: 27px; }
  .metrics, .notes, .guide-grid { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .bar-row { grid-template-columns: 74px minmax(0, 1fr) 56px; }
  .review-grid, .examples { grid-template-columns: 1fr; }
  .mix-row { grid-template-columns: minmax(72px, 96px) minmax(0, 1fr) 38px; }
}
