:root {
  --paper: #ffffff;
  --ink: #183c32;
  --muted: #677b78;
  --line: #d5deda;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 13px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main {
  max-width: 1920px;
  height: 100dvh;
  margin: auto;
  padding: 22px 32px 0;
  display: flex;
  flex-direction: column;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid #4f6e34;
  outline-offset: 3px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand {
  font: 700 34px/1 var(--serif);
  letter-spacing: -1.5px;
  text-decoration: none;
}
.source-link,
.download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #345362;
}
svg {
  display: block;
}
.source-link svg,
.download svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding-top: 18px;
  padding-bottom: 24px;
  flex-shrink: 0;
}
.filter-group { margin: 0; }
.filter-label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.filter-buttons { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f3f5f4; }
.filter-buttons button {
  flex: 1;
  padding: 7px 13px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.filter-buttons button:hover { color: var(--ink); background: #e8edea; }
.filter-buttons button[aria-pressed="true"] { background: white; color: var(--ink); box-shadow: 0 1px 3px #183c3224; font-weight: 600; }
footer .source-link { font-size: inherit; }
footer > span { display: flex; align-items: center; gap: 5px; }
h1 {
  font: 32px var(--serif);
}
h2 {
  margin: 0;
  font: normal 23px/1.2 var(--serif);
  letter-spacing: -0.4px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.9fr) minmax(320px, 2fr) minmax(
      240px,
      1.05fr
    );
  flex: 1;
  min-height: 0;
  gap: 24px;
  padding-bottom: 20px;
}
.detail-grid > * {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.trend,
.annual {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  flex-shrink: 0;
}
.section-heading > span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 32px 0 20px;
}
.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  font-size: 12px;
}
.bar-row strong {
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
  grid-column: 2;
  grid-row: 1;
}
.bar-track {
  height: 15px;
  background: #e5e9e5;
  grid-column: 1/-1;
  grid-row: 2;
}
.bar-track > div {
  height: 100%;
}
.comparison > small {
  color: var(--muted);
  font-size: 10px;
}
.chart-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
  margin-top: 17px;
  flex: 1;
  min-height: 0;
}
.chart-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: pan-y;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  flex-shrink: 0;
}
.legend button {
  display: flex;
  gap: 7px;
  align-items: center;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
  font-size: 11px;
}
.legend button[aria-pressed="false"] {
  opacity: 0.4;
}
.legend span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--series-color);
  flex-shrink: 0;
}
.chart-note {
  margin: 12px 0 0;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  flex-shrink: 0;
}
.trend-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.trend-stats strong {
  margin-left: 4px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tooltip {
  position: absolute;
  z-index: 3;
  background: white;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 5px 18px #193f3212;
  pointer-events: none;
  min-width: 160px;
  font-size: 11px;
}
.tooltip strong {
  display: block;
  margin-bottom: 5px;
}
.tooltip div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.tooltip span:last-child {
  font-variant-numeric: tabular-nums;
}
.table-stage {
  flex: 1;
  min-height: 0;
  margin-top: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 7px 0;
  height: 33px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}
th:first-child {
  text-align: left;
}
thead th {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
tbody th {
  font-weight: 400;
}
td small {
  margin-left: 4px;
  color: var(--muted);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
  gap: 8px;
  padding-top: 8px;
  font-size: 11px;
  flex-shrink: 0;
}
.pagination button {
  border: 0;
  background: none;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pagination button:disabled {
  opacity: 0.3;
  cursor: default;
  text-decoration: none;
}
.pagination span {
  color: var(--muted);
  font-size: 10px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 12px 0 16px;
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.empty-label {
  fill: var(--muted);
  font: 12px var(--sans);
}
.view-tabs {
  display: none;
}
@media (max-width: 1150px) {
  main {
    padding: 18px 22px 0;
  }
  .detail-grid {
    grid-template-columns: minmax(170px, 0.85fr) minmax(290px, 1.8fr) minmax(
        220px,
        1fr
      );
    gap: 18px;
  }
  .trend,
  .annual {
    padding-left: 18px;
  }
  h2 {
    font-size: 20px;
  }
  #filters {
    gap: 12px;
  }
}
@media (max-width: 850px) {
  main {
    padding: 16px 18px 0;
  }
  .brand {
    font-size: 27px;
    line-height: 1.15;
    letter-spacing: -1px;
  }
  .source-link {
    font-size: 10px;
  }
  header {
    padding-bottom: 13px;
  }
  #filters { gap: 10px; padding-top: 12px; }
  .filter-group { width: 100%; }
  .filter-label { margin-bottom: 4px; }
  .filter-buttons button { padding: 5px 8px; font-size: 11px; }
  .view-tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 17px;
    flex-shrink: 0;
  }
  .view-tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 0 0 9px;
    background: none;
    color: var(--muted);
    font-size: 12px;
  }
  .view-tabs button[aria-pressed="true"] {
    color: var(--ink);
    border-color: var(--ink);
  }
  .detail-grid {
    display: flex;
    padding-bottom: 14px;
  }
  .detail-grid > * {
    width: 100%;
    padding: 0;
    border: 0;
  }
  .detail-grid[data-active="comparison"] > :not(.comparison),
  .detail-grid[data-active="trend"] > :not(.trend),
  .detail-grid[data-active="annual"] > :not(.annual) {
    display: none;
  }
  h2 {
    font-size: 24px;
  }
  .bars {
    gap: 25px;
    margin-top: 26px;
  }
  .bar-row {
    font-size: 13px;
  }
  .chart-note {
    font-size: 10px;
  }
  .trend-stats {
    gap: 6px 12px;
    padding-top: 8px;
    margin-top: 9px;
  }
  .legend {
    gap: 8px 13px;
  }
  footer {
    padding: 10px 0 12px;
  }
  footer .download {
    font-size: 11px;
  }
}
@media (max-height: 650px) {
  main {
    padding-top: 12px;
  }
  header {
    padding-bottom: 10px;
  }
  .brand {
    font-size: 28px;
  }
  #filters {
    padding-top: 10px;
  }
  .bars {
    gap: 18px;
    margin-top: 20px;
  }
  .chart-layout {
    gap: 10px;
    margin-top: 12px;
  }
  .chart-note {
    margin-top: 6px;
  }
  .trend-stats {
    margin-top: 8px;
    padding-top: 8px;
  }
}

.model-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.project-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}
.switch-track { width: 28px; height: 16px; border-radius: 10px; background: #b7c4bc; padding: 2px; }
.switch-track::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: white; transition: transform 120ms ease; }
.project-toggle[aria-checked="true"] .switch-track { background: var(--ink); }
.project-toggle[aria-checked="true"] .switch-track::after { transform: translateX(12px); }
.model-summary { margin: 20px 0; }
.model-summary > div { display: flex; justify-content: space-between; gap: 24px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.model-summary dt, .model-caption { color: var(--muted); font-size: 12px; }
.model-summary dd { margin: 0; text-align: right; }
.model-caption { max-width: 360px; }
#model-info { border: 0; background: none; text-decoration: underline; padding: 0; font-size: 11px; }
.estimated .bar-track > div { background-image: repeating-linear-gradient(135deg, transparent, transparent 5px, #ffffff66 5px, #ffffff66 8px) !important; }
dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; max-width: 530px; max-height: 85dvh; padding: 24px; }
dialog::backdrop { background: #183c3266; }
.dialog-close { float: right; }
.dialog-close button { background: none; border: 0; font-size: 24px; }
@media (max-width: 850px) {
  .model-controls { gap: 6px 12px; flex-wrap: wrap; font-size: 10px; }
}

header { gap: 20px; }
.architecture-button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: white;
  font-weight: 600;
  box-shadow: 0 3px 8px #183c3220;
}
.architecture-button:hover { background: #2b5949; }
.architecture-button span { font-size: 18px; }
#architecture-dialog { width: min(680px, calc(100% - 24px)); max-width: 680px; max-height: 94dvh; padding: 16px 22px; }
.architecture-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#architecture-dialog img { display: block; width: 100%; height: min(72dvh, 900px); object-fit: contain; }
.diagram-full-size { display: block; margin-top: 10px; text-align: center; font-size: 12px; }
@media (max-width: 850px) {
  header { gap: 12px; }
  .architecture-button { padding: 9px 11px; gap: 6px; font-size: 11px; }
}
