@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f2f3ee;
  --paper-deep: #e6e8e0;
  --ink: #14213d;
  --slate: #5a6475;
  --brass: #9a7b2f;
  --brass-text: #7a5f1c;
  --panel: #14213d;
  --panel-text: #e9e7dd;
  --panel-dim: #9aa3b5;
  --fail: #f0a595;
  --pass: #dcbd6a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 38rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
}

a {
  color: var(--ink);
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid var(--brass-text);
  outline-offset: 3px;
}

.wrap {
  max-width: 74rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  font-variation-settings: "opsz" 72;
}

.wordmark:hover {
  color: var(--ink);
}

.site-header nav a {
  font-size: 0.95rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

.hero .lede {
  max-width: 31rem;
  margin: 0 0 2rem;
  font-size: 1.15rem;
}

.signup {
  max-width: 31rem;
}

.signup label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.signup .row {
  display: flex;
  gap: 0.5rem;
}

.signup input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: #fbfbf8;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

.signup button,
.demo button {
  font: inherit;
  font-weight: 600;
  padding: 0.8rem 1.15rem;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.signup button:hover,
.demo button:hover {
  background: var(--brass-text);
  border-color: var(--brass-text);
}

.signup .note {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--slate);
}

.signup .status {
  margin: 0.75rem 0 0;
  min-height: 1.5em;
  font-weight: 600;
}

.demo {
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 3px;
  padding: 1.25rem 1.25rem 1.1rem;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--panel-dim);
  transition: border-color 0.4s ease;
}

.demo[data-state="pass"] {
  border-top-color: var(--brass);
}

.demo::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 18%;
  background: rgba(255, 255, 255, 0.1);
  transform: skewX(-18deg);
  pointer-events: none;
  opacity: 0;
}

.demo.sheen::after {
  animation: sweep 0.9s ease-out 1;
}

@keyframes sweep {
  0% {
    left: -30%;
    opacity: 1;
  }
  100% {
    left: 130%;
    opacity: 1;
  }
}

.demo .filename {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--panel-dim);
  margin: 0 0 0.6rem;
}

.demo pre,
.proof-output {
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
}

.demo pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  overflow-x: auto;
  tab-size: 2;
}

.demo pre code {
  font: inherit;
}

.demo .hot {
  display: inline-block;
  width: 100%;
  background: rgba(154, 123, 47, 0.28);
  box-shadow: -0.75rem 0 0 rgba(154, 123, 47, 0.28);
}

.demo .out {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(233, 231, 221, 0.2);
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  min-height: 5.4em;
}

.demo .out .result {
  font-weight: 500;
}

.demo[data-state="fail"] .result {
  color: var(--fail);
}

.demo[data-state="pass"] .result {
  color: var(--pass);
}

.demo .out .dim {
  color: var(--panel-dim);
}

.demo .controls {
  margin-top: 1rem;
}

.demo button {
  background: var(--panel-text);
  color: var(--ink);
  border-color: var(--panel-text);
}

.demo button:hover {
  background: var(--pass);
  border-color: var(--pass);
  color: var(--ink);
}

.demo button:focus-visible {
  outline-color: var(--pass);
}

.section {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-top: 2px solid var(--brass);
}

.section > h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  font-variation-settings: "opsz" 48;
}

.section .body {
  max-width: var(--measure);
}

.section .body > :first-child {
  margin-top: 0;
}

.section p {
  margin: 0 0 1.1rem;
}

.chapters {
  list-style: none;
  counter-reset: chapter;
  margin: 0;
  padding: 0;
}

.chapters li {
  counter-increment: chapter;
  position: relative;
  padding: 0 0 1.15rem 2.6rem;
}

.chapters li::before {
  content: counter(chapter);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.9rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--brass-text);
  text-align: right;
  font-variation-settings: "opsz" 48;
}

.chapters strong {
  display: block;
  font-weight: 600;
}

.chapters span {
  color: var(--slate);
  font-size: 0.97rem;
}

.briefs {
  margin: 1.5rem 0 0;
}

.briefs dt {
  font-weight: 600;
  margin-top: 1rem;
}

.briefs dd {
  margin: 0.1rem 0 0;
  color: var(--slate);
}

.proof-output {
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.7;
  overflow-x: auto;
}

.proof-output .dim {
  color: var(--panel-dim);
}

.proof-output .ok {
  color: var(--pass);
}

.terms {
  margin: 0;
}

.terms dt {
  font-weight: 600;
  margin-top: 1rem;
}

.terms dt:first-child {
  margin-top: 0;
}

.terms dd {
  margin: 0.1rem 0 0;
}

details {
  border-bottom: 1px solid rgba(20, 33, 61, 0.2);
  padding: 0.9rem 0;
}

details:first-of-type {
  border-top: 1px solid rgba(20, 33, 61, 0.2);
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-family: var(--mono);
  color: var(--brass-text);
}

details[open] summary::after {
  content: "\2212";
}

details p {
  margin: 0.6rem 0 0;
}

.site-footer {
  border-top: 2px solid var(--brass);
  padding-top: 1.75rem;
  padding-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.93rem;
  color: var(--slate);
}

.site-footer a {
  color: var(--slate);
}

.prose {
  max-width: var(--measure);
  padding-bottom: 4rem;
}

.prose h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 1.5rem 0 1rem;
}

.prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 2rem 0 0.5rem;
}

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 30rem) {
  .demo pre {
    font-size: 0.74rem;
  }

  .demo .out,
  .proof-output {
    font-size: 0.74rem;
  }

  .signup .row {
    flex-direction: column;
  }

  .signup button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo,
  .demo.sheen::after {
    transition: none;
    animation: none;
  }
}

.signup .check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
}

.signup .check input {
  margin-top: 0.3rem;
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ink);
}

.signup .check label {
  display: inline;
  font-weight: 400;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.prose .draft {
  border-left: 3px solid var(--brass);
  padding-left: 1rem;
  color: var(--slate);
  font-size: 0.95rem;
}

.prose h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 1.4rem 0 0.3rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose a.button {
  display: inline-block;
  padding: 0.8rem 1.15rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border-radius: 2px;
  text-decoration: none;
}

.prose a.button:hover {
  background: var(--brass-text);
  color: var(--paper);
}
