:root {
  --paper: #f5f8f6;
  --surface: #ffffff;
  --surface-soft: #f0f5f2;
  --ink: #17211f;
  --ink-soft: #31413d;
  --muted: #65716e;
  --line: #dce4e0;
  --line-strong: #c5d0cb;
  --teal: #168d80;
  --teal-deep: #09695f;
  --teal-soft: #e4f3ef;
  --coral: #dd654f;
  --coral-soft: #fbeae6;
  --gold: #dfa62f;
  --gold-soft: #fbf2d8;
  --blue: #4778a8;
  --blue-soft: #e9f0f7;
  --violet: #7669a8;
  --green: #4e9f62;
  --gray: #9aa3a0;
  --radius: 6px;
  --content: 1500px;
  --shadow-soft: 0 12px 36px rgba(27, 49, 43, 0.07);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button,
th[data-sort],
tbody tr {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
th[data-sort]:focus-visible {
  outline: 3px solid rgba(22, 141, 128, 0.24);
  outline-offset: 2px;
}

::selection {
  color: #ffffff;
  background: var(--teal);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: #ffffff;
  background: var(--ink);
  border-radius: 4px;
  text-decoration: none;
}

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

.app-shell {
  min-height: 100vh;
}

.topbar,
main > section,
.site-footer {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 10px 0;
  background: rgba(245, 248, 246, 0.94);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--teal);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark circle {
  fill: var(--paper);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 1.16rem;
  line-height: 1.1;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.nav a {
  position: relative;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 2px;
  background: transparent;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  background: var(--teal);
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  color: var(--muted);
  background: #e9efec;
  border: 1px solid var(--line);
  border-radius: 5px;
  white-space: nowrap;
}

.language-toggle span {
  display: none;
}

.language-toggle button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.language-toggle button.active {
  color: var(--teal-deep);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(27, 49, 43, 0.1);
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(560px, 1.3fr);
  gap: 48px;
  padding: 64px 0 34px;
  border-bottom: 1px solid var(--line-strong);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--teal-deep);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 3px;
  margin: 0 9px 2px 0;
  background: var(--coral);
}

.hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 4.35rem;
  font-weight: 500;
  line-height: 0.98;
}

.hero-copy h1 span {
  color: var(--teal-deep);
  font-family: Inter, "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 900;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 38rem;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 1.07rem;
  line-height: 1.7;
}

.release-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  margin-top: 24px;
  padding: 8px 0;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(78, 159, 98, 0.13);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-self: center;
}

.kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 132px;
  padding: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: currentColor;
}

.kpi-card svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-card strong {
  display: block;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 2rem;
  line-height: 1.05;
}

.kpi-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.kpi-card.teal { color: var(--teal); }
.kpi-card.coral { color: var(--coral); }
.kpi-card.gold { color: var(--gold); }
.kpi-card.blue { color: var(--blue); }

.workflow-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-step {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 13px;
  min-height: 108px;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step strong {
  align-self: end;
  font-size: 0.9rem;
}

.workflow-step span {
  align-self: start;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.workflow-icon {
  position: relative;
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  align-self: center;
  color: var(--teal);
}

.workflow-icon::before,
.workflow-icon::after {
  content: "";
  position: absolute;
}

.genome-icon::before {
  inset: 5px 17px;
  border-right: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
  border-radius: 50%;
  transform: rotate(18deg);
}

.genome-icon::after {
  inset: 12px 5px;
  border-top: 2px solid var(--coral);
  border-bottom: 2px solid var(--coral);
  transform: rotate(-18deg);
}

.gauge-icon::before {
  width: 38px;
  height: 38px;
  left: 5px;
  top: 5px;
  border: 6px solid var(--line-strong);
  border-top-color: var(--coral);
  border-right-color: var(--gold);
  border-bottom-color: var(--teal);
  border-radius: 50%;
}

.gauge-icon::after {
  width: 19px;
  height: 2px;
  left: 24px;
  top: 25px;
  background: var(--ink);
  transform: rotate(-42deg);
  transform-origin: left center;
}

.model-icon::before {
  inset: 5px;
  background: var(--teal);
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
}

.model-icon::after {
  content: "GEM";
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
}

.network-icon::before {
  width: 11px;
  height: 11px;
  left: 6px;
  top: 18px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 25px -11px 0 var(--blue), 25px 12px 0 var(--coral);
}

.network-icon::after {
  width: 31px;
  height: 24px;
  left: 11px;
  top: 11px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transform: skewX(-25deg);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 58px 0 64px;
}

.summary-intro {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1.55fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 6px;
}

.summary-intro h2 {
  max-width: 820px;
  margin: 0;
  font-family: Charter, "Iowan Old Style", Georgia, serif;
  font-size: 2.15rem;
  font-weight: 500;
  line-height: 1.2;
}

.summary-intro > div > p {
  margin: 8px 0 0;
  color: var(--muted);
}

.summary-card {
  min-height: 330px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
}

.summary-card:nth-of-type(2) {
  border-top-color: var(--blue);
}

.summary-card:nth-of-type(3) {
  border-top-color: var(--gold);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.card-head span {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
}

.bar-list,
.legend-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.9fr) minmax(110px, 1fr) 88px;
  gap: 10px;
  align-items: center;
  min-height: 22px;
}

.bar-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  background: #e8eeeb;
  border-radius: 2px;
}

.bar-fill {
  width: var(--fill);
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  transition: width 240ms ease;
}

.summary-card:nth-of-type(2) .bar-fill,
#sgb-phylum-chart .bar-fill {
  background: var(--blue);
}

#interaction-env-chart .bar-fill {
  background: var(--coral);
}

#sgb-source-chart .bar-fill {
  background: var(--violet);
}

.bar-row strong {
  text-align: right;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.bar-row strong small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
}

.compact .bar-row {
  grid-template-columns: minmax(92px, 0.85fr) minmax(80px, 1fr) 76px;
}

.continent-map {
  display: none;
}

.donut-row {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 226px;
}

.donut {
  position: relative;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 70%, var(--gold) 70% 90%, var(--gray) 90% 100%);
}

.donut::after {
  content: attr(data-total);
  position: absolute;
  inset: 27px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border-radius: 50%;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  white-space: pre-line;
}

.legend-item {
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.8rem;
}

.legend-dot {
  width: 9px;
  height: 9px;
  background: var(--legend);
  border-radius: 2px;
}

.legend-item strong {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.sgb-panel,
.interaction-panel {
  padding: 64px 0;
  border-top: 1px solid var(--line-strong);
}

.sgb-panel {
  position: relative;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.section-head h2,
.download-panel h2 {
  margin: 0;
  font-family: Charter, "Iowan Old Style", Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
}

.section-head > div > p:not(.section-label),
.download-panel > div > p:not(.section-label) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-count {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  border-radius: 2px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.sgb-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.2fr) minmax(420px, 0.8fr);
  gap: 42px;
  align-items: start;
}

.sgb-layout > *,
.interaction-layout > *,
.browser-layout > * {
  min-width: 0;
}

.sgb-figure {
  display: grid;
  gap: 12px;
  margin: 0;
  min-width: 0;
}

.sgb-figure img {
  display: block;
  width: 100%;
  max-height: 760px;
  object-fit: contain;
  background: var(--surface);
}

.sgb-figure figcaption {
  padding-top: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
}

.sgb-side {
  display: grid;
  gap: 20px;
  align-content: start;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.sgb-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sgb-charts {
  display: grid;
  gap: 14px;
}

.sgb-charts article,
.interaction-card-large {
  min-height: 250px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sgb-charts h3,
.interaction-card-large h3 {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.metric-box {
  min-height: 82px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.metric-box > span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.metric-box > strong {
  display: block;
  margin-top: 7px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
}

.interaction-panel {
  border-bottom: 1px solid var(--line-strong);
}

.interaction-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 0.95fr) minmax(480px, 1.45fr);
  gap: 16px;
  align-items: start;
}

.interaction-kpis {
  display: grid;
  gap: 10px;
}

.interaction-kpis .metric-box:first-child {
  color: var(--teal-deep);
  border-top: 4px solid var(--teal);
}

.interaction-card-large {
  min-height: 100%;
}

.highlight-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  border-top: 4px solid var(--coral);
}

.highlight-card .card-head {
  margin: 0;
}

.interaction-tools {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px;
}

.interaction-tools select,
.interaction-tools input,
.filters input,
.filters select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.interaction-tools select:focus,
.interaction-tools input:focus,
.filters input:focus,
.filters select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(22, 141, 128, 0.14);
}

.interaction-table-wrap {
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--line);
}

.interaction-table {
  min-width: 760px;
}

.interaction-table th,
.interaction-table td {
  font-size: 0.76rem;
}

.browser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 16px;
  align-items: start;
  padding: 64px 0 0;
}

.table-panel,
.detail-panel {
  min-width: 0;
  min-height: 650px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.table-panel .section-head {
  margin: 0;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.table-panel .section-head h2 {
  font-size: 1.55rem;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(130px, 0.8fr)) auto;
  gap: 9px;
  align-items: end;
  padding: 14px 18px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.filters label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-weight: 800;
}

.reset-button:hover,
.pager-buttons button:hover:not(:disabled) {
  color: var(--teal-deep);
  border-color: var(--teal);
}

.reset-button svg,
.pager-buttons svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-wrap {
  max-height: 545px;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 0.82rem;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--ink-soft);
  background: #edf2ef;
  font-size: 0.7rem;
  font-weight: 900;
  user-select: none;
  white-space: nowrap;
}

th[data-sort]::after {
  content: "↕";
  margin-left: 6px;
  color: var(--gray);
  font-size: 0.66rem;
}

th.sorted-asc::after {
  content: "↑";
  color: var(--teal);
}

th.sorted-desc::after {
  content: "↓";
  color: var(--teal);
}

tbody tr {
  transition: background-color 160ms ease;
}

tbody tr:hover {
  background: #f1f7f4;
}

tbody tr.selected {
  background: var(--teal-soft);
  box-shadow: inset 3px 0 0 var(--teal);
}

td.species-cell {
  min-width: 240px;
}

.species-name {
  display: block;
  color: var(--teal-deep);
  font-style: italic;
  font-weight: 800;
}

.subline {
  display: block;
  max-width: 280px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.quality-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.quality-pill.high {
  color: var(--teal-deep);
  background: var(--teal-soft);
}

.quality-pill.good {
  color: #8c6500;
  background: var(--gold-soft);
}

.quality-pill.review {
  color: var(--coral);
  background: var(--coral-soft);
}

.quality-pill.unscored {
  color: var(--muted);
  background: #edf0ef;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.pager-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pager-buttons button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.pager-buttons button:disabled {
  color: var(--gray);
  background: #f2f4f3;
  cursor: not-allowed;
}

#page-number {
  min-width: 82px;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.detail-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.detail-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 590px;
  color: var(--muted);
  text-align: center;
}

.detail-empty-icon {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.detail-empty-icon::before,
.detail-empty-icon::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.detail-empty-icon::before {
  top: 17px;
  left: 17px;
  background: var(--teal);
}

.detail-empty-icon::after {
  right: 15px;
  bottom: 16px;
  background: var(--coral);
}

.detail-kicker {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-panel h2 {
  margin: 0;
  color: var(--teal-deep);
  font-family: Charter, "Iowan Old Style", Georgia, serif;
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 16px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
}

.detail-meta span {
  padding: 3px 5px;
  background: var(--surface-soft);
  border-radius: 2px;
}

.detail-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 11px;
  font-size: 0.88rem;
}

.lineage {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lineage span {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.65rem;
  text-overflow: ellipsis;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-panel .metric-box {
  min-height: 72px;
  background: var(--surface-soft);
}

.interaction-metric-grid {
  margin-bottom: 12px;
}

.interaction-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface-soft);
  border-left: 3px solid var(--teal);
}

.interaction-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.interaction-card .network-mini {
  position: relative;
  width: 54px;
  height: 38px;
}

.interaction-card .network-mini::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: 3px;
  top: 16px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 20px -12px 0 var(--blue), 39px 5px 0 var(--coral);
}

.interaction-card .network-mini::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 22px;
  left: 7px;
  top: 7px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transform: skewX(-22deg);
}

.interaction-card button {
  justify-self: start;
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  background: #e7ece9;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: not-allowed;
}

.download-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  gap: 40px;
  margin-top: 64px;
  padding: 42px;
  color: #ffffff;
  background: #202a27;
}

.download-panel .section-label {
  color: #a7d8cd;
}

.download-panel > div > p:not(.section-label) {
  color: #bcc8c4;
  line-height: 1.65;
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.layer-grid article {
  min-height: 140px;
  padding: 16px;
  background: #2c3834;
  border-top: 3px solid var(--teal);
}

.layer-grid article:last-child {
  border-top-color: var(--gold);
}

.layer-grid strong,
.layer-grid span {
  display: block;
}

.layer-grid strong {
  font-size: 0.82rem;
}

.layer-grid span {
  margin-top: 9px;
  color: #bcc8c4;
  font-size: 0.76rem;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer strong {
  color: var(--ink);
}

.empty-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 1240px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    border-top: 1px solid var(--line);
  }

  .language-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    grid-template-columns: minmax(300px, 0.8fr) minmax(500px, 1.2fr);
  }

  .sgb-layout,
  .interaction-layout,
  .browser-layout,
  .download-panel {
    grid-template-columns: 1fr;
  }

  .sgb-side {
    padding: 0;
    border: 0;
  }

  .sgb-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .interaction-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 920px) {
  .topbar,
  main > section,
  .site-footer {
    width: min(var(--content), calc(100% - 28px));
  }

  .hero,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 34px;
    padding-top: 46px;
  }

  .hero-copy h1 {
    font-size: 3.35rem;
  }

  .workflow-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-step:nth-child(2) {
    border-right: 0;
  }

  .workflow-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .summary-intro {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-card {
    min-height: auto;
  }

  .interaction-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .reset-button {
    align-self: end;
  }
}

@media (max-width: 620px) {
  html {
    scroll-padding-top: 132px;
  }

  .topbar,
  main > section,
  .site-footer {
    width: min(var(--content), calc(100% - 20px));
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 68px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text small {
    display: none;
  }

  .language-toggle button {
    min-height: 30px;
    padding: 0 7px;
    font-size: 0.7rem;
  }

  .nav a {
    flex: 0 0 auto;
    padding-inline: 8px;
    font-size: 0.74rem;
  }

  .hero {
    gap: 28px;
    padding: 38px 0 26px;
    overflow: hidden;
  }

  .hero-copy h1 {
    font-size: 2.75rem;
  }

  .hero-copy > p:not(.eyebrow) {
    margin-top: 16px;
    font-size: 0.96rem;
  }

  .kpi-grid,
  .workflow-panel,
  .sgb-charts,
  .interaction-tools,
  .filters,
  .layer-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 105px;
    padding: 17px;
  }

  .kpi-card strong {
    font-size: 1.65rem;
  }

  .workflow-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-step:last-child {
    border-bottom: 0;
  }

  .summary-grid,
  .sgb-panel,
  .interaction-panel,
  .browser-layout {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .summary-intro h2,
  .section-head h2,
  .download-panel h2 {
    font-size: 1.55rem;
  }

  .donut-row {
    grid-template-columns: 1fr;
  }

  .donut {
    margin-inline: auto;
  }

  .section-head,
  .pagination,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .sgb-layout {
    display: block;
  }

  .sgb-side {
    margin-top: 24px;
  }

  .sgb-metrics,
  .interaction-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-panel .section-head,
  .detail-panel {
    padding: 18px;
  }

  .download-panel {
    margin-top: 44px;
    padding: 28px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
