/* ============================================================
   Real Emdash -- typewriter broadside
   Every dash on this page is two hyphens. On purpose.
   ============================================================ */

:root {
  --paper:      #f4f1e9;
  --paper-edge: #ece7d9;
  --ink:        #1a1a1a;
  --ink-soft:   #4a463d;
  --stamp:      #b22222;   /* rubber-stamp red, used sparingly */
  --rule:       #cfc8b6;
  --maxw:       49rem;
  --mono: "Courier Prime", "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

img { max-width: 100%; height: auto; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  /* faint paper grain */
  background-image:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.012) 0 1px, transparent 1px 3px);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--stamp); }

code {
  font-family: var(--mono);
  font-weight: 700;
  background: var(--paper-edge);
  padding: 0 0.25em;
  border-radius: 2px;
}

/* The AI dash, when we must show it, is grayed-out -- it is the enemy */
.ai-dash { color: #9a9384; }

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.1rem, 4vw, 1.5rem) 4rem;
}

/* ---------- Hero (above the fold) ---------- */
.hero {
  text-align: center;
  padding-bottom: clamp(1.75rem, 5vw, 2.5rem);
}
.wordmark {
  width: min(100%, 21rem);
  margin: 0 auto clamp(1.25rem, 4vw, 1.75rem);
}
.hero-headline {
  /* Break out of the text column so the headline has room to stay on one
     line up to the viewport width (wraps only on genuinely narrow screens). */
  width: max-content;
  max-width: 96vw;
  margin: 0 0 0.5rem;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(1.375rem, 5vw, 1.875rem); /* 30px on desktop */
  font-weight: 700;
  line-height: 1.25;
}
.hero-subhead {
  margin: 0 auto clamp(1.5rem, 4.5vw, 2rem);
  font-size: clamp(1.125rem, 4.2vw, 1.625rem); /* 26px on desktop */
  font-weight: 400;
  line-height: 1.4;
}
.rule-graphic {
  width: min(100%, 23rem);
  margin: 0 auto clamp(1.5rem, 4.5vw, 2rem);
}

/* ---------- Pledge (button + counter, in the hero) ---------- */
.pledge { margin: 0; }

.key-btn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.75rem;
  cursor: pointer;
  /* Lightened keycap ledge -- distinct from the dark face so the eye reads
     the button as 52px tall and the label as vertically centered in it. */
  box-shadow: 0 5px 0 #cfc8b6, 0 8px 12px rgba(0,0,0,0.16);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}
/* Small nudge to optically center the label within the 52px face (Courier
   Prime sits high in its line box). */
.key-btn__txt { display: inline-block; transform: translateY(3px); }

.key-btn:hover { transform: translateY(1px); box-shadow: 0 4px 0 #cfc8b6, 0 6px 9px rgba(0,0,0,0.16); }
.key-btn:active,
.key-btn.is-pressed { transform: translateY(5px); box-shadow: 0 0 0 #cfc8b6, 0 1px 3px rgba(0,0,0,0.2); }

.pledge-statement {
  margin: 0.9rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.counter {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
}
.counter-num {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.counter-label { white-space: nowrap; }

/* ---------- Manifesto ---------- */
.manifesto {
  border-top: 2px dashed var(--rule);
  padding-top: clamp(1.75rem, 5vw, 2.5rem);
}
.manifesto p { margin: 0 0 1.4rem; }
.manifesto .declaration {
  font-weight: 700;
  font-size: 1.15em;
  margin-top: 2rem;
  text-align: center;
}
.ast {
  text-decoration: none;
  font-weight: 700;
  color: var(--stamp);
  vertical-align: super;
  font-size: 0.8em;
}

/* ---------- How-to ---------- */
.howto-lead { margin: 0 0 1.2rem; }
.howto-howto { font-size: 1.2rem; margin-top: 1.4rem; }
.howto-corrections { margin-top: 2rem; font-size: 0.95rem; color: var(--ink-soft); }

.step {
  border-top: 2px dashed var(--rule);
  padding: 0.4rem 0;
}
.step:last-of-type { border-bottom: 2px dashed var(--rule); }
.step summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.7rem 0.2rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.step summary::-webkit-details-marker { display: none; }
.step summary::before {
  content: "--";
  color: var(--stamp);
  font-weight: 700;
}
.step[open] summary::before { content: "\2014"; color: var(--ink); } /* opened: the forbidden glyph, cheekily */
.step ol { margin: 0 0 1rem; padding-left: 1.6rem; }
.step li { margin-bottom: 0.6rem; }

/* ---------- Footnote ---------- */
.footnote {
  margin-top: clamp(2.5rem, 7vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
  font-size: 0.95rem;
  color: var(--ink-soft);
  scroll-margin-top: 2rem;
}
.footnote-kicker {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-align: center;
  margin-top: 1.25rem;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--rule);
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0.4rem 0; }

/* ---------- Share modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 20, 0.6);
}
.modal__card {
  position: relative;
  background: var(--paper);
  border: 3px dashed var(--ink);
  border-radius: 8px;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  max-width: 26rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.modal__close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}
.modal__close:hover { color: var(--stamp); }
.modal__stamp {
  margin: 0 0 0.75rem;
  color: var(--stamp);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}
.modal__title {
  margin: 0 0 1.5rem;
  font-size: 1.15rem;
  line-height: 1.45;
  font-weight: 700;
}
/* Paste modal (LinkedIn / Substack) -- its own type hierarchy, no red */
.paste-heading {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;   /* 30px, Courier Prime Bold */
  font-weight: 700;
  line-height: 1.15;
}
.paste-sub {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;    /* 20px, regular */
  font-weight: 400;
}
.paste-note {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;  /* 15px, regular */
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
}
.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.share-btn {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}
.share-btn:hover { background: var(--ink); color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
