:root {
  color-scheme: light;
  --paper: #f3f0e7;
  --paper-deep: #e6e1d5;
  --ink: #17211d;
  --muted: #5c665f;
  --line: #aeb7ad;
  --blue: #28516b;
  --orange: #c04d2f;
  --orange-text: #9f3f27;
  --white: #fffdf7;
  --max: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue);
}

a:hover {
  color: var(--orange-text);
}

:focus-visible {
  outline: 0.18rem solid var(--orange);
  outline-offset: 0.2rem;
}

.site-header,
.site-footer,
.page-wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 2px solid var(--ink);
}

.wordmark {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.wordmark span {
  color: var(--orange-text);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--orange-text);
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  margin: 0 0 1rem;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.8rem, 8vw, 6rem);
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1rem;
}

.page-wrap {
  padding: 4.8rem 0 6rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.8fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  min-height: 36rem;
}

.hero-copy {
  max-width: 48rem;
}

.lede,
.intro {
  max-width: 44rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.eyebrow,
.card-number,
.example-label {
  color: var(--orange-text);
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.audience-eyebrow {
  color: var(--blue);
}

.button,
button {
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.button:hover,
button:hover {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--white);
}

.button.secondary,
button.secondary {
  border-color: var(--blue);
  background: transparent;
  color: var(--blue);
}

.button.secondary:hover,
button.secondary:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.button-row,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.section {
  margin-top: 6rem;
}

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

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.7rem;
}

.section-heading > div {
  max-width: 42rem;
}

.section-heading > p {
  max-width: 30rem;
  color: var(--muted);
}

.hero-example,
.tool-card,
.card,
.guide-link,
.workbench-note {
  border: 1.5px solid var(--ink);
  background: var(--white);
}

.hero-example {
  position: relative;
  padding: 1.5rem;
  box-shadow: 0.45rem 0.45rem 0 var(--line);
}

.hero-example::before {
  position: absolute;
  top: 0;
  right: 1.2rem;
  width: 0.55rem;
  height: 2.7rem;
  background: var(--orange);
  content: "";
}

.example-label {
  margin-top: 1.8rem;
  margin-bottom: 0.35rem;
}

.example-result {
  margin-bottom: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.example-result {
  color: var(--blue);
}

.example-lines {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.example-lines li {
  padding: 0.6rem 0.7rem;
  border-top: 1px solid var(--line);
}

.example-lines .example-line-selected {
  border: 1.5px solid var(--blue);
  border-left: 0.35rem solid var(--orange);
  background: var(--paper-deep);
}

.example-line-tag {
  display: block;
  color: var(--blue);
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.example-caption {
  margin-top: 2rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-output {
  max-width: 34rem;
  margin: 1.3rem 0;
  padding: 0.75rem 1rem;
  border-left: 0.3rem solid var(--orange);
  background: var(--paper-deep);
}

.hero-output strong {
  color: var(--blue);
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-note {
  max-width: 48rem;
  margin-top: 1.8rem;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 0.3rem solid var(--orange);
  color: var(--muted);
  font-size: 0.92rem;
}

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

.card {
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem;
  box-shadow: 0.3rem 0.3rem 0 var(--paper-deep);
}

.card-number {
  margin-bottom: 2.2rem;
  color: var(--blue);
}

.card p,
.workbench-note p,
.muted {
  color: var(--muted);
}

.card-link {
  align-self: flex-start;
  margin-top: 1.2rem;
  font-weight: 800;
}

.workbench-note {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  padding: 1.6rem;
  background: var(--paper-deep);
  box-shadow: 0.3rem 0.3rem 0 var(--line);
}

.workbench-note h2 {
  max-width: 14ch;
}

.rule-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.tool-intro {
  max-width: 54rem;
  margin-bottom: 2.5rem;
}

.tool-intro h1 {
  max-width: 16ch;
}

.tool-context {
  max-width: 48rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 0.3rem solid var(--blue);
  background: var(--paper-deep);
  color: var(--muted);
}

.tool-context strong {
  color: var(--ink);
}

.tool-card {
  max-width: 58rem;
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: 0.45rem 0.45rem 0 var(--line);
}

.tool-card form,
.field-stack {
  display: grid;
  gap: 1.15rem;
}

label,
.field-label {
  color: var(--ink);
  font-weight: 800;
}

.field-help {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

textarea,
input,
select {
  width: 100%;
  margin-top: 0.35rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 0.8rem;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--blue);
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

textarea {
  min-height: 12rem;
  resize: vertical;
}

select {
  min-height: 3rem;
}

.message,
.result {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
}

.message.error {
  border-color: var(--orange);
  color: var(--orange-text);
}

.result {
  max-width: 58rem;
  background: var(--ink);
  color: var(--white);
}

.result .eyebrow {
  color: #f1a184;
}

.result h2 {
  color: var(--white);
}

.result pre {
  overflow-x: auto;
  white-space: pre-wrap;
  color: #f3f0e7;
  font: 1rem/1.6 "Courier New", monospace;
}

.result label {
  color: var(--white);
}

.result textarea {
  min-height: 14rem;
  background: var(--white);
  color: var(--ink);
}

.result button.secondary {
  border-color: var(--white);
  color: var(--white);
}

.thought-list {
  display: grid;
  gap: 0.65rem;
  margin: 1.2rem 0;
}

.thought-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem);
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.thought-label {
  font-weight: 400;
}

.guide-list {
  display: grid;
  gap: 0.9rem;
  max-width: 58rem;
}

.guide-link {
  display: block;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
}

.guide-link:hover {
  border-color: var(--orange);
  background: #fff8ee;
}

.guide-link strong,
.guide-link span {
  display: block;
}

.guide-link strong {
  color: var(--ink);
}

.guide-link span {
  margin-top: 0.3rem;
  color: var(--muted);
}

.article {
  max-width: 52rem;
}

.article h1 {
  max-width: 17ch;
}

.article h2 {
  margin-top: 3rem;
}

.article ul,
.article ol {
  padding-left: 1.4rem;
}

.article li {
  margin: 0.65rem 0;
}

.not-found h1 {
  max-width: 12ch;
}

.site-footer {
  padding: 1.5rem 0 3rem;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin-bottom: 0.4rem;
}

@media (max-width: 50rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.6rem 0;
  }

  .site-nav {
    gap: 0.2rem 0.75rem;
    justify-content: flex-start;
  }

  .hero,
  .workbench-note {
    grid-template-columns: 1fr;
  }

  .tool-intro h1 {
    max-width: 22ch;
    font-size: clamp(2rem, 10vw, 4rem);
  }

  .tool-intro {
    margin-bottom: 0.8rem;
  }

  .tool-intro .intro {
    display: none;
  }

  .page-wrap {
    padding-top: 1rem;
  }

  .tool-context {
    margin-top: 1rem;
    padding: 0.6rem 0.8rem;
  }

  .tool-card {
    padding: 0.6rem;
  }

  .tool-card form,
  .field-stack {
    gap: 0.6rem;
  }

  #brain-dump {
    min-height: 6rem;
  }

  .hero {
    min-height: auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .thought-row {
    grid-template-columns: 1fr;
  }
}
