:root {
  color-scheme: light;
  --ink: #111814;
  --muted: #59605b;
  --paper: #f4f1e9;
  --panel: #ffffff;
  --panel-warm: #fbfaf6;
  --card-solid: #eef2e9;
  --card-quiet: #f8f8f1;
  --card-hover: #e3eadc;
  --line: #d8d2c2;
  --line-strong: #b9ae99;
  --teal: #177366;
  --teal-dark: #0e3b35;
  --plum: #73456f;
  --amber: #b66918;
  --rose: #9c3f49;
  --blue: #305f7a;
  --shadow: 0 24px 70px rgba(22, 27, 22, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.is-report-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 24, 20, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(17, 24, 20, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 58%);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(244, 241, 233, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    var(--ink);
  color: var(--paper);
  border-radius: 7px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  padding: 8px 11px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
  min-height: 455px;
  padding: 76px 0 42px;
}

.intro-copy {
  position: relative;
}

.intro-copy::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 8px;
  width: 5px;
  height: min(82%, 330px);
  background: linear-gradient(var(--rose), var(--amber), var(--teal));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 5.7vw, 4.85rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.thesis-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.thesis-row span {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 750;
}

.lens-panel {
  position: relative;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 38%),
    var(--ink);
  color: var(--paper);
  border-radius: 7px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lens-panel::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(244, 241, 233, 0.18);
  border-radius: 999px;
}

.lens-label {
  margin-bottom: 22px;
  color: #c9e4dd;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.axis-map {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.axis-endpoint strong,
.axis-endpoint span {
  display: block;
}

.axis-endpoint strong {
  font-size: 0.92rem;
}

.axis-endpoint span {
  color: #b9d3cc;
  font-size: 0.78rem;
}

.axis-endpoint:last-child {
  text-align: right;
}

.axis-track {
  height: 9px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--amber), var(--teal));
}

.axis-track span {
  display: block;
  width: 10px;
  height: 26px;
  margin-left: 52%;
  transform: translateY(-8px);
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--ink);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 58px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--card-solid);
}

.stats-band div {
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.stats-band div:last-child {
  border-right: 0;
}

.stats-band strong {
  display: block;
  font-size: 1.45rem;
}

.stats-band span {
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace,
.framework,
.submit-section {
  margin-bottom: 72px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-note {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
}

.controls {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(210px, 1fr) minmax(230px, 1fr);
  gap: 12px;
  align-items: start;
  width: min(760px, 100%);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
}

textarea {
  resize: vertical;
}

.directory-layout {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 18px;
}

.tool-list,
.scorecard,
.criteria-card,
.submission-form {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.tool-list {
  overflow: hidden;
}

.tool-button {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 14px 16px 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tool-button:last-child {
  border-bottom: 0;
}

.tool-button:hover,
.tool-button:focus-visible,
.tool-button.is-active {
  background: var(--card-hover);
  box-shadow: inset 4px 0 0 var(--teal);
}

.tool-button strong,
.tool-button span {
  display: block;
}

.tool-button span {
  color: var(--muted);
  font-size: 0.86rem;
}

.scorecard {
  min-height: 520px;
  padding: clamp(18px, 3vw, 28px);
  border-top: 4px solid var(--tool-axis-color, var(--ink));
}

.scorecard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.posture-badge {
  flex: 0 0 264px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  width: 264px;
  min-height: 164px;
  border: 1px solid var(--tool-axis-color, var(--teal));
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 48%),
    var(--tool-axis-color, var(--teal));
  color: #fff;
  text-align: left;
  padding: 18px;
}

.posture-score-row {
  display: flex;
  align-items: end;
  gap: 8px;
}

.posture-badge .posture-score {
  display: block;
  font-size: 3.1rem;
  line-height: 0.88;
}

.posture-score-row span {
  padding-bottom: 3px;
}

.posture-label strong {
  display: block;
  max-width: 100%;
  font-size: 1.45rem;
  line-height: 1.05;
}

.posture-badge span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 850;
  opacity: 0.86;
}

.posture-spectrum {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--amber), var(--teal));
}

.posture-spectrum span {
  position: absolute;
  top: 50%;
  left: var(--tool-axis-position, 50%);
  width: 12px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(17, 24, 20, 0.78);
  box-shadow: 0 3px 10px rgba(17, 24, 20, 0.28);
}

.meta-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-ledger div {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.meta-ledger div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.meta-ledger div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.meta-ledger dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-ledger dd {
  margin: 4px 0 0;
}

.bar-list,
.signal-grid,
.disclosure-list {
  display: grid;
  gap: 12px;
}

.agency-posture {
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--tool-axis-color, var(--teal));
  border-radius: 7px;
  background: var(--card-quiet);
}

.agency-posture h3 {
  margin-bottom: 7px;
  font-size: 1.28rem;
}

.agency-posture p:last-child {
  margin-bottom: 0;
  color: #303832;
}

.measure-section {
  margin-top: 24px;
}

.measure-section > h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

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

.signal-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: 7px;
  background: var(--card-quiet);
}

.signal-positive {
  border-top-color: var(--teal);
}

.signal-partial {
  border-top-color: var(--amber);
}

.signal-institutional {
  border-top-color: var(--blue);
}

.signal-unknown {
  border-top-color: var(--line-strong);
}

.signal-neutral {
  border-top-color: var(--muted);
}

.signal-question {
  margin-bottom: 7px;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 850;
}

.signal-answer {
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--card-hover);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.signal-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.disclosure-list {
  border-top: 1px solid var(--line);
}

.disclosure-row {
  display: grid;
  grid-template-columns: minmax(170px, 260px) minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.disclosure-row h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.disclosure-row p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(145px, 230px) minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
}

.bar-label {
  color: var(--muted);
  font-size: 0.84rem;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: #e7e1d3;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--plum), var(--blue), var(--teal));
}

.confidence {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 18px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #efe5cf;
  color: #6b4315;
  font-size: 0.82rem;
  font-weight: 800;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.criteria-card {
  padding: 16px 16px 18px;
  border-top: 3px solid var(--teal-dark);
}

.criteria-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.criteria-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.answer-type {
  display: inline-flex;
  width: fit-content;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-warm);
  color: var(--teal-dark);
  font-size: 0.75rem;
  font-weight: 850;
}

.submission-form {
  display: grid;
  gap: 14px;
  max-width: 720px;
  padding: 20px;
}

button[type="submit"] {
  width: fit-content;
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
}

button[type="submit"]:hover,
button[type="submit"]:focus-visible {
  background: var(--teal);
}

.report-button {
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel-warm);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 11px;
  cursor: pointer;
}

.report-button:hover,
.report-button:focus-visible {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.report-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(17, 24, 20, 0.34);
  backdrop-filter: blur(2px);
}

.report-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(680px, 100%);
  height: 100dvh;
  border-left: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: -24px 0 70px rgba(17, 24, 20, 0.22);
}

.report-panel[hidden],
.report-backdrop[hidden] {
  display: none;
}

.report-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-warm);
}

.report-panel-header h2 {
  font-size: 1.4rem;
}

.report-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
}

.report-close:hover,
.report-close:focus-visible {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.report-body {
  overflow: auto;
  padding: 24px;
}

.report-body h1 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.08;
}

.report-body h2 {
  margin: 28px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 1.18rem;
}

.report-body h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.report-body p,
.report-body li {
  color: #303832;
  font-size: 0.98rem;
}

.report-body ul {
  padding-left: 1.15rem;
}

.report-body a {
  color: var(--teal-dark);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.report-loading {
  color: var(--muted);
}

.report-table {
  overflow-x: auto;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card-quiet);
  color: #303832;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre;
}

.canonical-tool-lens {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.35fr;
  gap: 0;
  margin: 0 0 22px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--card-quiet);
}

.canonical-tool-lens div {
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.canonical-tool-lens div:last-child {
  border-right: 0;
}

.canonical-tool-lens span,
.criteria-label {
  display: block;
  margin-bottom: 5px;
  color: var(--plum);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.canonical-tool-lens strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.35;
}

.framework-explainer {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(220px, 0.7fr);
  gap: 0;
  margin: 0 0 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--card-solid);
}

.framework-explainer article {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.framework-explainer article:last-child {
  border-right: 0;
}

.framework-explainer h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.framework-explainer p {
  margin-bottom: 0;
  color: var(--muted);
}

.source-links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.source-links a {
  width: fit-content;
  border-bottom: 1px solid var(--teal);
  color: var(--teal-dark);
  font-weight: 800;
}

.source-links a:hover,
.source-links a:focus-visible {
  color: var(--plum);
}

.form-status {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--teal);
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--line);
  padding: 26px clamp(18px, 4vw, 56px);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  width: min(1180px, 100%);
  margin: 0 auto;
}

@media (max-width: 860px) {
  .topbar,
  .section-heading,
  .scorecard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro,
  .directory-layout,
  .criteria-grid,
  .framework-explainer,
  .canonical-tool-lens {
    grid-template-columns: 1fr;
  }

  .framework-explainer article,
  .canonical-tool-lens div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .framework-explainer article:last-child,
  .canonical-tool-lens div:last-child {
    border-bottom: 0;
  }

  .controls {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .posture-badge {
    flex: 0 0 auto;
    width: min(100%, 360px);
  }

  .stats-band {
    grid-template-columns: 1fr;
  }

  .stats-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats-band div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 24px, 1180px);
  }

  .intro {
    min-height: auto;
    padding-top: 44px;
  }

  .intro-copy::before {
    left: 0;
    top: -18px;
    width: 92px;
    height: 5px;
  }

  .axis-map {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .axis-endpoint:last-child {
    text-align: left;
  }

  .lens-panel::after {
    display: none;
  }

  .report-panel {
    width: 100%;
    border-left: 0;
  }

  .report-panel-header,
  .report-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .bar-row,
  .meta-ledger,
  .signal-grid,
  .disclosure-row {
    grid-template-columns: 1fr;
  }

  .meta-ledger div,
  .meta-ledger div:nth-child(odd) {
    border-right: 0;
  }
}
