:root {
  --paper: #ffffff;
  --ink: #000000;
  --body: #262626;
  --muted: #6e6e6e;
  --rule: #dcdcdc;
  --accent: #2e5339;
  --accent-soft: #eef2ee;
  --warn: #8a3324;
  --display: "Bricolage Grotesque", Helvetica, Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
}

main.wide { max-width: 44rem; }

p { margin: 0 0 1.1rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  text-decoration: none;
}

h1, h2, h3 { font-family: var(--display); color: var(--ink); }

/* Masthead */

.masthead { margin-bottom: 3.25rem; }

.masthead h1 {
  font-weight: 800;
  font-size: clamp(3.1rem, 12vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0 0 0.9rem;
}

.role {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--body);
  margin: 0;
  max-width: 30rem;
}

/* Lead */

.lead {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.lead p:first-child {
  font-size: 1.32rem;
  line-height: 1.45;
  color: var(--ink);
}

.lead p:last-child { margin-bottom: 0; }

/* Sections */

.block { margin-bottom: 3rem; }

.block h2, .results-head h2, .form-block h2 {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

.block > p:last-child { margin-bottom: 0; }

/* Tool promo on the homepage */

.tool-promo {
  border-left: 4px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.4rem;
  margin-bottom: 3rem;
}

.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.tool-promo h2 {
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}

.tool-promo h2 a {
  color: var(--ink);
  text-decoration: none;
}

.tool-promo h2 a:hover { color: var(--accent); }

.tool-link {
  font-family: var(--display);
  font-weight: 600;
}

.tool-promo p:last-child { margin-bottom: 0; }

/* Link list */

.links { margin: 0; }

.link-row { margin-bottom: 1.4rem; }

.link-row:last-child { margin-bottom: 0; }

.links dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.links dd {
  margin: 0;
  font-size: 1.0625rem;
}

.contact {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* Footer */

footer {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.footer-meta {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Tool page ---------- */

.backlink {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 2.5rem;
}

.tool-head { margin-bottom: 2.5rem; }

.tool-head h1 {
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 0.9rem;
}

.form-block {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  margin-bottom: 3rem;
}

.field { margin-bottom: 1.4rem; }

.field label {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.optional {
  font-weight: 500;
  color: var(--muted);
  text-transform: lowercase;
}

.field input {
  width: 100%;
  font-family: var(--text);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.6rem 0.7rem;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.hint {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.8rem 0 0;
}

button {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}

button:hover { background: #24422d; border-color: #24422d; }

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

button.secondary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--ink);
}

button.secondary:hover { background: var(--accent-soft); }

.error {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--warn);
  margin: 1rem 0 0;
}

.notice {
  font-size: 0.9375rem;
  color: var(--body);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 0.9rem;
  margin: 1rem 0 0;
}

.field select {
  width: 100%;
  font-family: var(--text);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.6rem 0.7rem;
}

.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Results */

.results-head {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.count {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0;
}

.group { margin-bottom: 2.75rem; }

.group h3 {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
}

.group-note {
  font-size: 0.9375rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
  max-width: 34rem;
}

.prompt-row {
  border-left: 3px solid var(--rule);
  padding: 0 0 0 1rem;
  margin-bottom: 1.5rem;
}

.prompt-row.scored { border-left-color: var(--accent); }

.prompt {
  font-size: 1.0625rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.scores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.score {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.score span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.score select {
  font-family: var(--text);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.3rem 0.4rem;
}

.score select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.cta {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 480px) {
  main { padding-top: 3rem; }
  .masthead { margin-bottom: 2.5rem; }
  .block, .lead, .tool-promo { margin-bottom: 2.5rem; }
  .scores { gap: 0.6rem; }
  .score select { font-size: 0.9rem; }
}
