:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --ink: #16212a;
  --muted: #62717f;
  --line: #d9e1e8;
  --teal: #00a884;
  --blue: #2868b5;
  --amber: #d99b21;
  --red: #c84b5f;
  --nav: #101820;
  --nav-muted: #9baab6;
  --shadow: 0 14px 32px rgba(22, 33, 42, 0.08);
  --sidebar-collapsed: 72px;
  --sidebar-expanded: 232px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
button,
input,
select {
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-collapsed);
  min-height: 100vh;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: hidden;
  background: var(--nav);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: width 180ms ease;
}

.sidebar:hover,
.sidebar:focus-within {
  width: var(--sidebar-expanded);
}

.brand,
.nav-link,
.sidebar-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand {
  min-height: 44px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: var(--nav);
}

.brand-mark img {
  width: 44px;
  height: 44px;
  display: block;
}

.nav-copy {
  opacity: 0;
  white-space: nowrap;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.sidebar:hover .nav-copy,
.sidebar:focus-within .nav-copy {
  opacity: 1;
  transform: translateX(0);
}

.brand small,
.sidebar-status small {
  display: block;
  color: var(--nav-muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--nav-muted);
  font-weight: 800;
}

.nav-link svg,
.icon-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link.active,
.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  box-shadow: inset 3px 0 0 var(--teal);
}

.sidebar-status {
  margin-top: auto;
  min-height: 52px;
  padding: 0 12px;
  color: #fff;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(0, 168, 132, 0.14);
}

.app-shell {
  min-width: 0;
  padding: 24px 28px 32px;
  margin-left: var(--sidebar-collapsed);
}

.topbar,
.toolbar,
.panel-header,
.actions {
  display: flex;
  align-items: center;
}

.topbar {
  min-height: 72px;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 900;
}

h1 {
  margin-top: 4px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

h2 {
  font-size: 1rem;
  line-height: 1.25;
}

.actions {
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.icon-button:hover {
  color: var(--teal);
  border-color: rgba(0, 168, 132, 0.42);
}

.toolbar {
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  margin: 8px 0 12px;
}

.toolbar[hidden],
[data-toolbar-control][hidden],
.icon-button[hidden],
.status-line[hidden] {
  display: none;
}

.status-line {
  min-height: 22px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

select,
input {
  min-height: 38px;
  min-width: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

select:focus,
input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 168, 132, 0.24);
  outline-offset: 2px;
}

.search-box {
  flex: 1;
}

.search-box input {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.kpi-grid,
.dashboard-grid,
.split-layout,
.coverage-grid {
  display: grid;
  gap: 16px;
}

.kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
}

.split-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.7fr);
}

.units-layout {
  grid-template-columns: minmax(280px, 0.6fr) minmax(0, 1.4fr);
}

.kpi,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi {
  min-height: 132px;
  padding: 18px;
  display: grid;
  gap: 9px;
  border-top: 4px solid var(--teal);
}

.kpi span,
.panel p,
.tag,
.coverage-grid span,
td,
th {
  color: var(--muted);
}

.kpi span {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi strong {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1;
}

.kpi small {
  color: var(--muted);
  font-weight: 700;
}

.accent-amber {
  border-top-color: var(--amber);
}

.accent-blue {
  border-top-color: var(--blue);
}

.accent-red {
  border-top-color: var(--red);
}

.panel {
  min-width: 0;
  padding: 18px;
}

.wide {
  grid-column: span 1;
}

.panel-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.tag,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--blue);
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.muted-tag {
  color: var(--muted);
}

canvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  touch-action: none;
}

.chart-tooltip {
  position: fixed;
  z-index: 50;
  min-width: 150px;
  max-width: 220px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.96);
  color: #fff;
  box-shadow: 0 18px 42px rgba(22, 33, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip strong {
  font-size: 0.82rem;
}

.chart-tooltip span {
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 900;
}

.chart-tooltip small {
  color: var(--nav-muted);
  font-weight: 750;
}

.bar-list,
.unit-list {
  display: grid;
  gap: 10px;
}

.compact {
  margin-top: 14px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-meta,
.unit-row,
td,
th {
  font-size: 0.88rem;
}

.bar-meta,
.unit-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecf1;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.unit-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.unit-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.82rem;
  font-weight: 950;
}

.unit-row:hover,
.unit-row.active {
  border-color: rgba(0, 168, 132, 0.35);
  background: rgba(0, 168, 132, 0.08);
}

.unit-row.active .unit-check {
  border-color: transparent;
  color: #fff;
  background: var(--teal);
}

.unit-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.unit-row span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.unit-browser {
  max-height: calc(100vh - 182px);
  overflow: auto;
}

.selected-unit-chips {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}

.unit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid rgba(0, 168, 132, 0.26);
  border-radius: 999px;
  padding: 0 9px 0 12px;
  background: rgba(0, 168, 132, 0.08);
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.unit-chip strong {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.muted-inline {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.compare-fill.fill-1 {
  background: var(--blue);
}

.compare-fill.fill-2 {
  background: #d99b21;
}

.compare-fill.fill-3 {
  background: #6f7f8f;
}

.compare-fill.fill-4 {
  background: #7b61ff;
}

.compare-fill.fill-5 {
  background: #d14f7b;
}

.coverage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.coverage-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.coverage-grid strong {
  font-size: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  font-weight: 900;
}

td,
th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

.status {
  color: var(--red);
  font-weight: 900;
}

.empty-state {
  color: var(--muted);
  font-weight: 750;
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.feature-panel {
  min-width: 0;
  padding: 22px;
  display: grid;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-feature {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: end;
}

.sector-feature {
  grid-column: 1 / -1;
  min-height: 210px;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  background:
    linear-gradient(90deg, rgba(0, 168, 132, 0.1), rgba(40, 104, 181, 0.08)),
    var(--surface);
}

.sector-grid > .panel {
  grid-column: 1 / -1;
}

.sector-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.sector-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.sector-stats dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sector-stats dd {
  margin: 6px 0 0;
  font-size: 1.25rem;
  font-weight: 950;
}

.feature-panel h2 {
  max-width: 860px;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.02;
}

.feature-panel p {
  max-width: 760px;
  color: var(--muted);
  font-weight: 720;
}

.report-stats,
.method-grid,
.report-list,
.sector-list {
  display: grid;
  gap: 12px;
}

.sector-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.sector-list:not([data-loaded="true"]) .sector-card {
  display: none;
}

.report-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-stats div,
.method-grid article,
.report-card,
.sector-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.report-stats dt,
.report-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-stats dd {
  margin: 6px 0 0;
  font-size: 1.35rem;
  font-weight: 950;
}

.report-card,
.sector-card {
  display: grid;
  gap: 9px;
}

.sector-card {
  align-content: start;
}

.sector-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(20, 33, 45, 0.08);
  background: #eef4f7;
}

.report-card h3,
.sector-card h3 {
  font-size: 1rem;
}

.sector-card p {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 690;
}

.sector-card small {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sector-card a {
  width: max-content;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.sector-card a:hover {
  text-decoration: underline;
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editorial-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-weight: 760;
}

.nodes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(440px, 0.85fr);
  gap: 16px;
}

.nodes-panel,
.node-ranking-panel {
  overflow: hidden;
}

.node-ranking-panel {
  max-height: calc(100vh - 236px);
  display: flex;
  flex-direction: column;
}

.node-ranking-panel .table-wrap {
  min-height: 0;
  overflow: auto;
}

.node-ranking-panel thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

.node-controls {
  margin-bottom: 14px;
}

.month-control {
  display: grid;
  gap: 8px;
}

.control-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.month-actions {
  display: flex;
  gap: 8px;
}

.text-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.text-button:hover {
  border-color: rgba(0, 168, 132, 0.42);
  color: var(--teal);
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.segmented-control button.active,
.segmented-control button:hover {
  background: var(--surface);
  color: var(--teal);
}

.month-picker {
  max-height: 92px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  overflow: auto;
  padding: 2px;
}

.month-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.month-chip:hover,
.month-chip.active {
  border-color: rgba(0, 168, 132, 0.5);
  background: rgba(0, 168, 132, 0.1);
  color: #075f51;
}

.node-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.node-kpis article {
  min-height: 74px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.node-kpis span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.node-kpis strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.node-map {
  position: relative;
  min-height: 470px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fbfcfd;
}

.node-map svg {
  width: 100%;
  height: 100%;
  min-height: 470px;
  display: block;
  cursor: grab;
  touch-action: none;
}

.node-map svg:active {
  cursor: grabbing;
}

.map-tools {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  display: grid;
  gap: 6px;
}

.map-tool-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 33, 42, 0.08);
}

.map-tool-button:hover {
  color: var(--teal);
  border-color: rgba(0, 168, 132, 0.42);
}

.map-tool-button svg {
  width: 18px;
  height: 18px;
  min-height: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.province-shape {
  fill: rgba(98, 113, 127, 0.1);
  stroke: rgba(22, 33, 42, 0.22);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: fill 120ms ease, stroke 120ms ease;
}

.province-shape.affected {
  fill: rgba(0, 168, 132, var(--province-alpha));
  stroke: rgba(0, 92, 77, 0.48);
}

.province-shape:hover {
  stroke: #16212a;
  stroke-width: 2;
}

.node-point {
  cursor: crosshair;
  outline: none;
}

.node-point circle {
  fill: rgba(0, 168, 132, 0.74);
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 8px 14px rgba(22, 33, 42, 0.18));
  transition: r 120ms ease, fill 120ms ease;
}

.node-point-400 circle {
  fill: rgba(40, 104, 181, 0.76);
}

.node-point.active circle,
.node-point:focus circle {
  fill: var(--amber);
  stroke: #16212a;
}

.node-point text {
  fill: #16212a;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}

.map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
}

.legend-box {
  width: 18px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(0, 168, 132, 0.18), rgba(0, 168, 132, 0.74));
}

.legend-400 {
  background: var(--blue);
}

#nodeRows tr {
  cursor: crosshair;
}

#nodeRows tr:hover,
#nodeRows tr.active-row {
  background: rgba(0, 168, 132, 0.08);
}

#nodeRows td strong,
#nodeRows td small {
  display: block;
}

#nodeRows td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 32, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(16, 24, 32, 0.28);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: end;
  padding-right: 46px;
}

.node-history-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.node-history-kpis div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.node-history-kpis dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.node-history-kpis dd {
  margin: 6px 0 0;
  font-weight: 950;
}

.node-history-chart {
  width: 100%;
  min-height: 260px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.node-history-axis {
  stroke: #cdd8e2;
  stroke-width: 1;
}

.node-history-bar {
  fill: var(--teal);
}

.node-history-label,
.node-history-max {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-anchor: middle;
}

.node-history-max {
  text-anchor: start;
}

.node-history-table {
  margin-top: 14px;
  max-height: 240px;
}

.technology-period-modal {
  width: min(1040px, 100%);
}

.technology-period-modal .modal-header {
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
  align-items: start;
}

.technology-period-kpis dd {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.technology-period-bars {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  min-height: 590px;
}

.technology-period-item {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.technology-period-item strong,
.technology-period-item span {
  display: block;
}

.technology-period-item strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
}

.technology-period-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.technology-period-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef3;
}

.technology-period-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.technology-period-fill.fill-1 {
  background: var(--blue);
}

.technology-period-fill.fill-2 {
  background: #d99b21;
}

.technology-period-fill.fill-3 {
  background: #6f7f8f;
}

.technology-period-skeleton {
  pointer-events: none;
}

.technology-period-skeleton .skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dce5ec, #eef3f7, #dce5ec);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

.technology-period-skeleton .skeleton-title {
  width: min(180px, 80%);
}

.technology-period-skeleton .skeleton-meta {
  width: min(130px, 60%);
  margin-top: 8px;
}

.technology-period-skeleton .technology-period-fill {
  background: linear-gradient(90deg, #d5dfe7, #eef3f7, #d5dfe7);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  from {
    background-position: 120% 0;
  }

  to {
    background-position: -120% 0;
  }
}

#view-nodes th,
#view-nodes td {
  padding: 11px 8px;
}

@media (max-width: 1040px) {
  .kpi-grid,
  .dashboard-grid,
  .split-layout,
  .units-layout,
  .nodes-grid,
  .editorial-grid,
  .report-feature,
  .method-grid,
  .coverage-grid {
    grid-template-columns: 1fr 1fr;
  }

  .wide {
    grid-column: 1 / -1;
  }

  .sector-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sidebar {
    inset: auto 0 0 0;
    width: 100%;
    min-height: 62px;
    height: 62px;
    padding: 8px 10px;
    flex-direction: row;
    align-items: center;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    width: 100%;
  }

  .brand,
  .sidebar-status,
  .nav-copy {
    display: none;
  }

  .nav {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }

  .nav-link {
    min-height: 44px;
    padding: 0 10px;
  }

  .nav-link.active {
    box-shadow: inset 0 -3px 0 var(--teal);
  }

  .app-shell {
    margin-left: 0;
    padding: 18px 16px 84px;
  }

  .topbar {
    align-items: flex-start;
  }

  .kpi-grid,
  .dashboard-grid,
  .split-layout,
  .units-layout,
  .nodes-grid,
  .editorial-grid,
  .report-feature,
  .sector-feature,
  .report-stats,
  .sector-stats,
  .method-grid,
  .sector-list,
  .coverage-grid {
    grid-template-columns: 1fr;
  }

  select,
  input {
    min-width: 100%;
  }

  .toolbar label {
    width: 100%;
  }

  .unit-browser {
    max-height: none;
  }

  .node-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .modal-header,
  .node-history-kpis {
    grid-template-columns: 1fr;
  }

  .technology-period-modal .modal-header,
  .technology-period-kpis {
    grid-template-columns: 1fr;
  }

  .technology-period-item {
    grid-template-columns: 1fr;
  }

  .technology-period-bars {
    min-height: 766px;
  }

  .modal-header {
    padding-right: 42px;
  }

  .node-map,
  .node-map svg {
    min-height: 360px;
  }

  .node-ranking-panel {
    max-height: 520px;
  }
}
