:root {
  --bg: #f5f7f4;
  --panel: #ffffff;
  --panel-soft: #eef4ef;
  --ink: #17201b;
  --muted: #596861;
  --line: #dce4dd;
  --green: #1c7c54;
  --green-dark: #0f5132;
  --blue: #2f6f9f;
  --amber: #bb7b14;
  --red: #b4423a;
  --violet: #6955a3;
  --shadow: 0 18px 45px rgba(29, 42, 35, 0.08);
}
* {
  box-sizing: border-box;
}
:focus-visible {
  outline: 3px solid rgba(47, 111, 159, 0.76);
  outline-offset: 3px;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
button,
select {
  font: inherit;
}
a {
  color: inherit;
}
.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding: 56px clamp(20px, 5vw, 72px) 36px;
  background:
    linear-gradient(120deg, rgba(28, 124, 84, 0.14), rgba(47, 111, 159, 0.12)),
    #fbfcfa;
  border-bottom: 1px solid var(--line);
}
.app-header > div {
  min-width: 0;
  width: 100%;
}
.app-header h1 {
  width: min(100%, 900px);
  max-width: calc(100vw - 32px);
  margin: 8px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.app-header h1 span {
  display: inline;
}
.app-header h1 span::after {
  content: " ";
}
.app-header h1 span:last-child::after {
  content: "";
}
.lead {
  width: min(100%, 820px);
  max-width: calc(100vw - 32px);
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.lead span {
  display: inline;
}
.lead span::after {
  content: " ";
}
.lead span:last-child::after {
  content: "";
}
.hero-actions,
.inline-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-actions {
  margin-top: 24px;
}
.button,
.pager-controls button,
.page-tabs button,
.export-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button.primary {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.button.ghost {
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.54);
}
.button.small {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}
.eyebrow {
  margin: 0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.metadata {
  min-width: 260px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metadata div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 0;
  color: var(--muted);
  border-bottom: 1px solid rgba(220, 228, 221, 0.72);
  font-size: 13px;
}
.metadata div:last-child {
  border-bottom: 0;
}
.metadata strong {
  color: var(--ink);
  overflow-wrap: anywhere;
  text-align: right;
}
main {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}
.notice-band,
.pager-panel,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.notice-band {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 18px;
  color: var(--muted);
}
.notice-band strong {
  color: var(--ink);
}
.notice-band > span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.notice-band > * {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.summary-panel {
  box-shadow: var(--shadow);
}
.summary-panel h2 {
  margin: 6px 0 12px;
  font-size: 22px;
}
.summary-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.outcome-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.outcome-list div {
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.outcome-list strong,
.outcome-list span {
  display: block;
}
.outcome-list strong {
  color: var(--green-dark);
  font-size: 30px;
  line-height: 1;
}
.outcome-list span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.compact-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}
.pager-panel {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px;
}
.pager-copy h2 {
  margin: 6px 0 5px;
  font-size: 24px;
}
.pager-copy p:last-child {
  margin: 0;
  color: var(--muted);
}
.pager-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pager-controls button:hover,
.page-tabs button:hover,
.export-actions button:hover,
.button:hover {
  border-color: var(--green);
}
.page-tabs {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 4px;
}
.page-tabs button {
  white-space: nowrap;
  color: var(--muted);
}
.page-tabs button.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}
.pager-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid rgba(220, 228, 221, 0.72);
}
.pager-cta span {
  flex: 1 1 360px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.page-panel {
  display: none;
  margin-bottom: 20px;
}
.page-panel.active {
  display: block;
}
.panel {
  padding: 22px;
}
.panel.inset {
  box-shadow: none;
  background: var(--panel-soft);
}
.insight-note {
  margin: 12px 0 0;
  padding: 11px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(220, 228, 221, 0.9);
  border-radius: 8px;
  line-height: 1.45;
}
.insight-note strong {
  color: var(--ink);
}
.section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}
.section-header h2,
.panel h3 {
  margin: 6px 0 7px;
}
.section-header p:last-child {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.select-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.select-label select {
  min-width: 180px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card,
.rank-row,
.bottleneck-item,
.memo-card,
.concordance-hero > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.stat-card {
  padding: 16px;
}
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 2.2vw, 28px);
  overflow-wrap: anywhere;
}
.stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
tr.highlight td {
  background: rgba(28, 124, 84, 0.1);
}
.run-card {
  display: grid;
  gap: 12px;
}
.run-card div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(220, 228, 221, 0.9);
}
.run-card div:last-child {
  border-bottom: 0;
}
.run-card span {
  color: var(--muted);
}
.chart {
  width: 100%;
  min-height: 280px;
}
.axis-label {
  fill: var(--muted);
  font-size: 11px;
}
.chart-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.rank-list,
.bottleneck-list,
.memo {
  display: grid;
  gap: 10px;
}
.rank-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}
.rank-row b {
  color: var(--green-dark);
}
.rank-row span {
  color: var(--muted);
  font-size: 13px;
}
.score-pill,
.flag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.score-pill {
  color: #fff;
  background: var(--green-dark);
}
.flag-pill {
  color: var(--ink);
  background: #f0ead9;
}
.flag-pill.risk {
  color: #fff;
  background: var(--red);
}
.flag-pill.fit {
  color: #fff;
  background: var(--green);
}
.bottleneck-item {
  padding: 14px;
}
.bottleneck-item strong {
  display: block;
  margin-bottom: 6px;
}
.bottleneck-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.heatmap {
  display: grid;
  grid-template-columns: 110px repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}
.heatmap div {
  min-height: 46px;
  padding: 9px;
  border-radius: 8px;
  font-size: 12px;
}
.heatmap .head {
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}
.concordance-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.concordance-hero > div {
  padding: 20px;
  background:
    linear-gradient(120deg, rgba(28, 124, 84, 0.14), rgba(47, 111, 159, 0.1)),
    #fff;
}
.concordance-hero span {
  display: block;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.concordance-hero strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
}
.concordance-hero p {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.validation-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.validation-card h3 {
  margin: 6px 0 0;
}
.validation-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.validation-grid div {
  padding: 12px;
  background: var(--panel-soft);
  border-radius: 8px;
}
.validation-grid span,
.validation-grid strong {
  display: block;
}
.validation-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.3;
}
.validation-grid strong {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.25;
}
.memo-card {
  padding: 18px;
}
.memo-card h3 {
  margin: 0 0 8px;
}
.memo-card p,
.memo-card li {
  color: var(--muted);
  line-height: 1.5;
}
.memo-card ul {
  margin: 0;
  padding-left: 20px;
}
.inline-actions,
.export-actions {
  margin-top: 16px;
}
.copy-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}
.assumptions {
  color: var(--muted);
  line-height: 1.5;
}
details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}
@media (max-width: 900px) {
  .app-header,
  .pager-panel,
  .section-header,
  .two-column,
  .concordance-hero,
  .summary-grid,
  .validation-card {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .validation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metadata {
    min-width: 0;
  }
}
@media (max-width: 560px) {
  main {
    width: min(100% - 24px, 1240px);
  }
  .app-header {
    padding: 36px 16px 24px;
  }
  .app-header h1 {
    font-size: 32px;
    line-height: 1.08;
    word-break: normal;
  }
  .app-header h1 span {
    display: block;
  }
  .app-header h1 span::after {
    content: "";
  }
  .lead {
    font-size: 16px;
  }
  .lead span {
    display: block;
  }
  .lead span::after {
    content: "";
  }
  .metadata div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .metadata strong {
    text-align: left;
  }
  .notice-band {
    align-items: flex-start;
    flex-direction: column;
  }
  .notice-band > span {
    display: block;
    width: 100%;
  }
  .notice-band > span span {
    display: block;
    width: 100%;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .outcome-list,
  .validation-grid {
    grid-template-columns: 1fr;
  }
  .panel,
  .pager-panel {
    padding: 16px;
  }
  .heatmap {
    grid-template-columns: 1fr;
  }
}
