:root {
  /* Palette: PAPERBACK, from the studio's reference. base #FBF6EC cream,
     secondary #3B3A36 charcoal, accent #E4572E vermilion. Every token below is
     one of those three lightened, deepened or tinted. No fourth colour.
     Source of truth: ../../brand/tokens.css */
  --paper:        #fbf6ec;
  --paper-raised: #fffdf6;
  --paper-sunk:   #f3ecdd;
  --rule:         #e3dac8;

  --ink:       #2b2a26;
  --ink-body:  #3b3a36;
  --ink-soft:  #5f5e57;
  --ink-faint: #6b6a63;

  --accent:      #e4572e;   /* large text and marks */
  --accent-ink:  #b83c1a;   /* small text and links: 5.3:1 on cream */
  --accent-soft: #fbe4da;

  --shadow: 0 1px 2px rgba(59, 58, 54, .06), 0 12px 32px -16px rgba(59, 58, 54, .22);

  --measure: 62ch;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step: clamp(1.1rem, .6rem + 1.6vw, 1.9rem);
}

/* Dark: the secondary lightened into a ground, not an inverted palette. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1e1d1a; --paper-raised: #262520; --paper-sunk: #171613; --rule: #39372f;
    --ink: #f2ede3; --ink-body: #e8e2d6; --ink-soft: #a49f94; --ink-faint: #8a8578;
    --accent: #ff7a52; --accent-ink: #ff7a52; --accent-soft: #33251f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  --paper: #1e1d1a; --paper-raised: #262520; --paper-sunk: #171613; --rule: #39372f;
  --ink: #f2ede3; --ink-body: #e8e2d6; --ink-soft: #a49f94; --ink-faint: #8a8578;
  --accent: #ff7a52; --accent-ink: #ff7a52; --accent-soft: #33251f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain. Fixed, behind everything, so the page is not a flat digital plane. */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; color: var(--ink); }
p { margin: 0 0 1rem; max-width: var(--measure); text-wrap: pretty; }
b, strong { font-weight: 600; }

a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; border-radius: 0 0 10px 0; z-index: 20;
  font-size: .9rem; text-decoration: none;
}
.skip:focus { left: 0; }

.eyebrow {
  font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 .9rem;
}
.footnote { color: var(--ink-faint); font-size: .88rem; }

/* ------------------------------------------------------------------ header */

.top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem 2rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.logo { width: 30px; height: 30px; flex: none; }
.logo .rule { fill: var(--accent); }
.logo .line { fill: var(--ink-body); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--serif); font-size: 1.22rem; letter-spacing: -.02em; }
.brand-text i {
  font-style: normal; font-size: .6rem; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink);
}
.top nav { display: flex; gap: clamp(.9rem, 2vw, 1.6rem); flex-wrap: wrap; }
.top nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: .2rem 0; border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.top nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* -------------------------------------------------------------------- main */

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 5rem;
}

section { padding: calc(var(--step) * 2.6) 0 0; }
section + section { margin-top: calc(var(--step) * 1.2); border-top: 1px solid var(--rule); }

h2 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem); line-height: 1.15; margin: 0 0 .9rem; max-width: 20ch; }
h3 { font-size: 1.16rem; margin: 0 0 .2rem; letter-spacing: -.01em; }
.section-lede { font-size: 1.06rem; color: var(--ink-soft); max-width: 58ch; margin-bottom: calc(var(--step) * 1.4); }

/* -------------------------------------------------------------------- hero */

.hero { padding-top: clamp(3.5rem, 9vw, 6.5rem); border: 0; }
.hero h1 {
  font-size: clamp(2.4rem, 1.2rem + 4.6vw, 4.4rem);
  line-height: 1.06; margin: 0 0 1.4rem; max-width: 17ch; font-weight: 600;
}
/* The one accent on this page: the phrase the reader should leave with.
   Display size, so 3.4:1 is the right threshold and it clears it. */
.hero h1 em { font-style: italic; color: var(--accent); }
.lede {
  font-family: var(--serif);
  font-size: clamp(1.14rem, 1rem + .5vw, 1.38rem);
  line-height: 1.6; max-width: 54ch; color: var(--ink); margin-bottom: 1.6rem;
}
.assurance {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .92rem; color: var(--ink-soft);
  background: var(--paper-sunk); border: 1px solid var(--rule);
  padding: .5rem .95rem; border-radius: 999px; max-width: none;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); flex: none; }

/* --------------------------------------------------------------- purposes */
/* Not three equal cards. Three rows, each hung off a margin rule in its own
   colour: the shape of a marked-up page, which is what the product is. */

.purposes { list-style: none; margin: 0 0 calc(var(--step) * 1.3); padding: 0; display: grid; }
.purpose {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  padding: calc(var(--step) * 1.1) 0 calc(var(--step) * 1.1) clamp(1rem, 2.4vw, 1.8rem);
  border-left: 3px solid var(--rule);
  border-top: 1px solid var(--rule);
  transition: background .25s ease;
}
.purpose:last-child { border-bottom: 1px solid var(--rule); }
/* Told apart by the rule's style and the word beside it, never by colour. */
.purpose.revise   { border-left: 4px solid  var(--ink-body); }
.purpose.remember { border-left: 3px dashed var(--ink-body); }
.purpose.reflect  { border-left: 3px dotted var(--ink-body); }
.purpose:hover { background: var(--paper-sunk); }

.purpose h3 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.8rem); font-weight: 600; margin: 0 0 .25rem; }

.who { font-size: .8rem; color: var(--ink-faint); margin: 0; }
.purpose-body p { font-size: 1rem; color: var(--ink-soft); margin-bottom: .9rem; max-width: 52ch; }

.purpose blockquote { margin: 0; }
.purpose blockquote p {
  font-family: var(--serif); font-size: 1.1rem; line-height: 1.55; color: var(--ink);
  border-left: 2px solid var(--ink-faint); padding-left: .95rem; margin: 0 0 .35rem; max-width: 48ch; color: var(--ink);
}
.purpose cite { font-style: italic; font-size: .78rem; color: var(--ink-faint); padding-left: .95rem; }

.claim {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); line-height: 1.45;
  max-width: 34ch; margin: 0; color: var(--ink);
}

/* ------------------------------------------------------------------ routes */

.routes { margin: 0 0 1.25rem; display: grid; gap: 0; }
.route {
  display: grid; grid-template-columns: minmax(11rem, 17rem) 1fr;
  gap: clamp(.4rem, 2vw, 2.5rem);
  padding: 1.05rem 0; border-top: 1px solid var(--rule);
}
.route:last-child { border-bottom: 1px solid var(--rule); }
.route dt { font-weight: 600; font-size: 1rem; }
.route dd { margin: 0; color: var(--ink-soft); font-size: .97rem; max-width: 52ch; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .86em; background: var(--accent-soft); color: var(--ink);
  padding: .12rem .4rem; border-radius: 5px;
}

/* ------------------------------------------------------------------- plain */

ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
ul.plain li { padding: 1.15rem 0; border-top: 1px solid var(--rule); }
ul.plain li:last-child { border-bottom: 1px solid var(--rule); }
ul.plain p { color: var(--ink-soft); margin: 0; font-size: .99rem; }

/* ------------------------------------------------------------------ status */

.status {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-body);
  border-radius: 4px 14px 14px 4px;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  margin-top: calc(var(--step) * 2.4);
  box-shadow: var(--shadow);
}
.status h2 { margin-top: 0; }
.emphatic {
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.55;
  color: var(--ink); font-weight: 600;
}

/* ------------------------------------------------------------------ footer */

footer {
  border-top: 1px solid var(--rule);
  padding: calc(var(--step) * 2) clamp(1rem, 4vw, 2.5rem) calc(var(--step) * 2.6);
  max-width: 1080px; margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: .35rem; }
.footer-brand p { margin: 0; }
.footer-brand b { font-family: var(--serif); font-size: 1.05rem; }
footer .footnote { margin: 0 0 1.1rem; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .88rem; align-items: center; }
.footer-links a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.footer-links a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.placeholder { color: var(--accent-ink); }

/* ------------------------------------------------------------------ narrow */

@media (max-width: 720px) {
  .purpose, .route { grid-template-columns: 1fr; gap: .75rem; }
  .purpose { padding-left: 1rem; }
  .top nav { gap: 1rem; font-size: .85rem; }
  .brand-text b { font-size: 1.1rem; }
}
