:root {
  --paper: #f3eadc;
  --ink: #1b1612;
  --muted: #4a433b;
  --line: #d9cbb6;
  --pass: #145c38;
  --miss: #8e2f2a;
  --brass: #6b4e22;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 5;
}

.skip:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--ink);
}

.bar,
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
}

.brand,
.site-header nav a,
.foot nav a,
.kicker,
.num,
.badge,
.when,
.row-status,
.fine,
button,
input[type="text"] {
  font-family: var(--mono);
}

.brand {
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.site-header .bar {
  justify-content: center;
}

.site-header nav,
.foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
}

.site-header nav a {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-header nav a,
.foot nav a {
  font-size: 0.75rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 3rem;
  align-items: end;
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.7rem);
  line-height: 0.95;
  font-weight: 560;
  letter-spacing: -0.03em;
  max-width: 11ch;
}

.lede {
  max-width: 38rem;
  font-size: 1.25rem;
}

.path + .path {
  margin-top: 1.25rem;
}

.path {
  border-top: 1px solid var(--ink);
  padding-top: 0.7rem;
}

.num {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.path h2,
.audit h2,
.faq h2,
.page h1 {
  font-weight: 560;
}

.path h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.45rem;
}

.path p,
.faq p,
.page p,
.page li {
  margin-top: 0;
}

.audit {
  margin: 2.5rem 0;
  background: var(--ink);
  color: var(--paper);
  padding: 1.25rem;
}

.audit:has(+ .updated:not([hidden])) {
  margin-bottom: 0;
}

.audit h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: 18ch;
  line-height: 1.1;
}

.audit-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.audit .primary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.audit .primary:focus-visible {
  outline-color: var(--paper);
}

#prompt-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
}

.updated {
  margin: 0.45rem 0 2.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.fine {
  margin: 0.9rem 0 0;
  color: #e6dccb;
  font-size: 0.75rem;
  max-width: 46rem;
}

.scorebar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  padding: 1rem 0;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  z-index: 3;
}

.score-line {
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}

.score-line strong {
  font-size: 2.6rem;
  font-weight: 560;
}

.score-line span {
  font-size: 1.25rem;
  color: var(--muted);
}

#score-note,
#score-required,
.legend {
  margin: 0.35rem 0 0;
  color: var(--muted);
  max-width: 36rem;
}

.project-label {
  display: grid;
  gap: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"] {
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  padding: 0.35rem 0;
  width: min(16rem, 70vw);
  border-radius: 0;
}

.survey h1 {
  margin-bottom: 0.25rem;
}

.ask {
  border: 0;
  margin: 1.35rem 0 0;
  padding: 0;
  min-width: 0;
}

.ask legend {
  padding: 0;
  font-size: 1.35rem;
}

.ask .hint {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ask .chips {
  margin: 0.7rem 0 0;
}

.survey .primary {
  margin-top: 1.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 36rem;
  margin: 1.75rem 0 1.75rem;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.chip:has(input:checked) {
  background: var(--ink);
  color: var(--paper);
}

.chip:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.chip:has(input:checked):has(input:focus-visible) {
  outline-color: var(--paper);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

button,
.button {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.75rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ghost {
  background: transparent;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.legend {
  padding: 0.9rem 0 0;
  font-size: 1rem;
}

.category {
  margin-top: 2.4rem;
}

.category h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 560;
}

.category-summary,
.why,
.how {
  color: var(--muted);
}

.category-summary {
  margin: 0.25rem 0 0.4rem;
  max-width: 40rem;
}

.item {
  display: grid;
  grid-template-columns: 1.2rem 1fr auto;
  gap: 0.35rem 0.9rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.item input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.28rem;
  accent-color: var(--ink);
}

.item-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.item label {
  font-size: 1.2rem;
}

.badge {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 0.12rem 0.35rem;
}

.badge.required {
  color: var(--miss);
}

.badge.recommended {
  color: var(--brass);
}

.when,
.row-status {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.row-status {
  margin-top: 0.35rem;
}

.row-status.pass {
  color: var(--pass);
}

.why,
.how {
  margin: 0.35rem 0 0;
}

details summary {
  cursor: pointer;
  font-size: 0.95rem;
}

.na-toggle {
  margin-top: 0.35rem;
  padding: 0.45rem 0;
  min-height: 44px;
  background: transparent;
  color: var(--muted);
  border: none;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-size: 0.85rem;
}

.item.is-na label,
.item.is-na .why,
.item.is-na .how {
  color: var(--muted);
}

.faq {
  padding: 2.5rem 0 3rem;
}

.faq h2,
.page h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  margin-bottom: 1rem;
}

.faq article {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.faq h3 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  font-weight: 560;
}

.page {
  padding: 3rem 0 4rem;
}

.page h1 {
  max-width: 16ch;
}

.page p,
.page li {
  max-width: 40rem;
}

.load-error {
  border: 1px solid var(--ink);
  padding: 0.8rem 1rem;
}

.site-footer {
  border-top: 1px solid var(--ink);
}

.foot p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
}

@media (min-width: 800px) {
  .scorebar {
    position: sticky;
    top: 0;
  }
}

@media (max-width: 800px) {
  .hero,
  .audit-head,
  .scorebar {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .item {
    grid-template-columns: 1.2rem 1fr;
  }

  .row-status {
    grid-column: 2;
  }
}

.home-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-body main {
  flex: 1;
  display: flex;
  align-items: safe center;
}

nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.home {
  width: min(760px, calc(100% - 3rem));
  padding: 8vh 0 10vh;
}

.home .kicker,
.home h1 {
  text-align: center;
}

.home h1 {
  max-width: none;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.75rem;
}

.choice {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 9rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  color: var(--ink);
  background: transparent;
}

.choice strong {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice span {
  font-size: 1.2rem;
  line-height: 1.35;
  max-width: 16ch;
}

.choice.filled {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 700px) {
  .choices {
    grid-template-columns: 1fr;
  }

  .home {
    padding-top: 3.5rem;
  }
}

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