/* Talk is Cheap. Speech is Powerful. — site styles
   Brand and Marketing Guidelines (Draft 1), October 14, 2026.
   Warm paper and ink, one gold accent, terracotta only for a loop come undone.
   One column, no cards, no gradients, no pure white or pure black. */

:root {
  --paper: #F6F1E7;
  --paper-deep: #EDE5D6;
  --ink: #1F1B16;
  --ink-light: #6B6257;
  --rule: #D8CFBF;
  --gold: #C9962B;
  --terracotta: #B5553A;
  /* loop phases: reserved for the loop diagram and phase marks only */
  --ph-request: #B5553A;
  --ph-agreement: #6E5A8E;
  --ph-completion: #2E7A74;
  --ph-satisfaction: #4B7F4A;

  --serif: "Fraunces", "Newsreader", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --measure: 68ch;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
}
@media (max-width: 600px) { body { font-size: 17px; } }

/* ---------- column ---------- */
.page {
  max-width: calc(var(--measure) + 2rem);
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}
@media (min-width: 720px) { .page { padding: 3.5rem 1.5rem 5rem; } }

header.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}
.mark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  font-variation-settings: "opsz" 24;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -.005em;
}
.mark span { color: var(--ink-light); font-weight: 500; }
nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.2rem;
  font-size: .9rem;
}
nav.site a { color: var(--ink-light); text-decoration: none; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); border-bottom: 1px solid var(--gold); }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
  text-wrap: balance;
  font-variation-settings: "opsz" 72, "SOFT" 20;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.1rem); margin-bottom: .5em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 1.95rem); margin-top: 2.6em; font-weight: 500; }
h3 { font-size: 1.2rem; margin-top: 2em; font-weight: 600; font-variation-settings: "opsz" 24; }
h2 + p, h3 + p { margin-top: 0; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
p.lede { font-size: 1.22rem; line-height: 1.45; color: var(--ink); font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 24; }
p.small, .small { font-size: .9rem; color: var(--ink-light); }
a { color: var(--gold); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
strong { font-weight: 600; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; max-width: var(--measure); }
li { margin-bottom: .45em; }
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--paper-deep);
  border-left: 2px solid var(--rule);
  font-style: italic;
  max-width: var(--measure);
}
blockquote p:last-child { margin-bottom: 0; }
.mono, code { font-family: var(--mono); font-size: .88em; }
.record {
  font-family: var(--mono);
  font-size: .86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  background: var(--paper-deep);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  overflow-x: auto;
  max-width: var(--measure);
}
.record b { font-weight: 500; color: var(--ink); }
.record .ph { display: inline-block; width: .62em; height: .62em; border-radius: 50%; margin-right: .5em; vertical-align: baseline; }
.ph.request { background: var(--ph-request); }
.ph.agreement { background: var(--ph-agreement); }
.ph.completion { background: var(--ph-completion); }
.ph.satisfaction { background: var(--ph-satisfaction); }
.hedge { color: var(--gold); }
.undone { color: var(--terracotta); }

dl.glossary { max-width: var(--measure); }
dl.glossary dt { font-weight: 600; margin-top: 1.2em; }
dl.glossary dt .term { font-weight: 400; color: var(--ink-light); font-style: italic; }
dl.glossary dd { margin: .2em 0 0; }

/* ---------- offers (buttons are offers or questions) ---------- */
.offer {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: .6em 1.15em;
  text-decoration: none;
  margin: .4rem 0 1.2rem;
  font-variation-settings: "opsz" 24;
}
.offer:hover { background: var(--paper-deep); color: var(--ink); }
.offer.quiet { border-color: var(--rule); color: var(--ink-light); font-size: .95rem; }
.offer:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.offer-note { font-size: .9rem; color: var(--ink-light); margin-top: -.6rem; }

/* ---------- figures ---------- */
figure { margin: 2.2rem 0; }
figure svg { display: block; width: 100%; height: auto; }
figcaption { font-size: .9rem; color: var(--ink-light); margin-top: .7rem; max-width: var(--measure); }
figure.loop { max-width: 600px; margin-left: auto; margin-right: auto; }
figure.loop figcaption { text-align: center; }
figure.thread { max-width: 440px; margin: 1.6rem 0; }
figure.ladder { max-width: 560px; margin-left: auto; margin-right: auto; }
figure.ladder figcaption { text-align: center; }

/* the loop, drawn one phase at a time where the page asks for it */
.loop-draw .phase { transition: opacity .6s ease; }
.loop-draw[data-step="0"] .phase { opacity: .14; }
.loop-draw[data-step="1"] .phase:not(.p1) { opacity: .14; }
.loop-draw[data-step="2"] .phase:not(.p1):not(.p2) { opacity: .14; }
.loop-draw[data-step="3"] .phase:not(.p1):not(.p2):not(.p3) { opacity: .14; }
@media (prefers-reduced-motion: reduce) { .loop-draw .phase { transition: none; } }
.steps { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: -1rem 0 2rem; }
.steps button {
  font: inherit; font-size: .88rem; color: var(--ink-light);
  background: none; border: 1px solid var(--rule); padding: .3em .8em; cursor: pointer;
}
.steps button[aria-pressed="true"] { color: var(--ink); border-color: var(--gold); }

/* ---------- phase marks on the ladder ---------- */
.ladder-svg .rung { fill: var(--paper-deep); stroke: var(--ink); stroke-width: 1.2; }
.ladder-svg .rung.current { fill: var(--paper); stroke: var(--gold); stroke-width: 2.2; }
.ladder-svg text { font-family: var(--sans); fill: var(--ink); }
.ladder-svg .door { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.ladder-svg .label { font-size: 14px; }
.ladder-svg .num { font-family: var(--mono); font-size: 11px; fill: var(--ink-light); }
.ladder-svg .doorlabel { font-size: 12px; fill: var(--ink-light); font-style: italic; }

/* ---------- margin note (the thread, small) ---------- */
aside.marginal {
  font-size: .9rem;
  color: var(--ink-light);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin: 2rem 0;
  max-width: var(--measure);
}
aside.marginal p { margin: 0; }

/* ---------- count line ---------- */
.count { font-family: var(--mono); font-size: .86rem; color: var(--ink-light); }
.count[hidden] { display: none; }

/* ---------- footer ---------- */
footer.site {
  margin-top: 4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-size: .88rem;
  color: var(--ink-light);
  max-width: var(--measure);
}
footer.site p { margin: 0 0 .5em; }
footer.site nav { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-bottom: .8rem; }
footer.site a { color: var(--ink-light); }
footer.site a:hover { color: var(--ink); }

/* ---------- skip link ---------- */
.skip { position: absolute; left: -999px; top: .5rem; background: var(--paper); padding: .4em .8em; border: 1px solid var(--ink); }
.skip:focus { left: .5rem; z-index: 10; }

@media print {
  body { background: #fff; }
  nav.site, .offer, .steps { display: none; }
}
