/* ============================================================================
   FIELD NOTES — design system
   ----------------------------------------------------------------------------
   Everything visual is driven by the tokens below. To re-skin the site,
   edit :root (dark) and [data-theme="light"] (light) — nothing else.
   Accent orange means ONE thing: "act here". Do not use it decoratively.
   Teal is reserved for Telegram.
   ============================================================================ */

:root {
  /* --- color: dark (default) --- */
  --bg: #121110;                    /* near-black, warm */
  --bg-raised: #181614;             /* subtly lifted surfaces */
  --bg-inset: #0d0c0b;              /* recessed, e.g. input focus */
  --text: #EDE8DF;                  /* warm off-white */
  --text-dim: rgba(237, 232, 223, .58);
  --text-faint: rgba(237, 232, 223, .36);
  --hairline: rgba(237, 232, 223, .14);   /* the ruled-sheet lines */
  --hairline-strong: rgba(237, 232, 223, .34);
  --accent: #E8722A;                /* warm orange — ACTIONS ONLY */
  --accent-ink: #121110;            /* text on top of accent */
  --teal: #4FA8C9;                  /* Telegram only */

  /* --- type --- */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  /* --- structure --- */
  --sheet-max: 1180px;              /* width of the ruled sheet */
  --pad: clamp(1.25rem, 4vw, 2.5rem);   /* standard section gutter */
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* Light mode: same structure, paper-flipped values. */
[data-theme="light"] {
  --bg: #F1ECE2;
  --bg-raised: #EAE4D6;
  --bg-inset: #F8F4EB;
  --text: #1B1813;
  --text-dim: rgba(27, 24, 19, .62);
  --text-faint: rgba(27, 24, 19, .40);
  --hairline: rgba(27, 24, 19, .18);
  --hairline-strong: rgba(27, 24, 19, .40);
  --accent: #D95F16;
  --accent-ink: #F8F4EB;
  --teal: #2B7A99;
  color-scheme: light;
}

/* ============================================================================
   field conditions (time-adaptive)
   The inline <head> script sets data-field-condition (dawn/day/dusk/night)
   when the user has NOT chosen a theme manually. These blocks override the
   base color tokens ONLY — layout, typography, and component rules are never
   redeclared here. A stored 'fn-theme' (manual choice) removes the attribute
   and wins via the base [data-theme] rules.
   Mapping (LOCKED): dawn/day -> light base; dusk/night -> dark base.
   ============================================================================ */

/* day — existing light mode. No override needed; the [data-theme="light"] base applies as-is. */

/* dawn — light base, warmed for the golden hour; more golden hairlines. */
[data-field-condition="dawn"] {
  --bg: #F3E9DA;
  --bg-raised: #EDE0CD;
  --bg-inset: #F8F0E3;
  --hairline: rgba(109, 72, 38, .24);
  --hairline-strong: rgba(109, 72, 38, .44);
}

/* dusk — dark base with transitioning warmth: warmer tint, warm hairlines. */
[data-field-condition="dusk"] {
  --bg: #181410;
  --bg-raised: #1E1913;
  --bg-inset: #120E0A;
  --hairline: rgba(231, 200, 158, .16);
  --hairline-strong: rgba(231, 200, 158, .32);
}

/* night — existing dark palette, even subtler hairlines. */
[data-field-condition="night"] {
  --hairline: rgba(237, 232, 223, .09);
  --hairline-strong: rgba(237, 232, 223, .22);
}

/* ============================================================================
   RESET / BASE
   ============================================================================ */

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

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { text-wrap: balance; }

img { max-width: 100%; }
a { color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* Focus visibility for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* ============================================================================
   THE SHEET — signature device #1
   The whole site lives inside a hairline-ruled sheet, like a page from a
   lab notebook. Sections end in ruled lines; nothing floats free.
   ============================================================================ */

.sheet {
  max-width: var(--sheet-max);
  margin: 0 auto;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  min-height: 100vh;
}

/* Every top-level section is a ruled row in the ledger. */
.rule { border-bottom: 1px solid var(--hairline); }

/* Small-caps label used for section eyebrows, meta lines, log headers. */
.label {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.label--faint { color: var(--text-faint); }

/* Section numbering — the "№ 02" markers. Deliberately NOT accent-colored:
   they are structure, not actions. */
.num { font-family: var(--font-display); color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ============================================================================
   component: site-header
   Masthead strip. Name left, nav right; on phones the nav collapses behind
   a text "Menu" toggle (no hamburger icon — type only).
   ============================================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem var(--pad);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand small {
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: .14em;
  margin-left: .7em;
  font-size: .68rem;
}

.nav-toggle {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text);
  padding: .3rem 0;
}

.site-nav {
  display: none;                 /* mobile: closed until toggled */
  border-top: 1px solid var(--hairline);
}

.site-nav.is-open { display: block; }

.site-nav a {
  display: block;
  padding: .8rem var(--pad);
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .04em;
}

.site-nav a:last-child { border-bottom: 0; }
.site-nav a[aria-current] { color: var(--text-faint); }
.site-nav a:hover { background: var(--bg-raised); }
.site-nav a.nav-telegram { color: var(--teal); }

@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; border-top: 0; gap: 1.6rem; align-items: baseline; }
  .site-nav a {
    padding: 0;
    border: 0;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .site-nav a:hover { background: none; color: var(--text); }
  .site-nav a[aria-current] { color: var(--text); text-decoration: underline; text-underline-offset: .35em; }
}

/* ============================================================================
   component: hero + wordmark — signature device #2
   Oversized cropped wordmark. The surname is stroked (outline) so the pair
   reads as one object with two densities. The portrait slot overlaps the
   wordmark from below — the design works whether or not a photo is set.
   ============================================================================ */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--hairline); }

.hero__kicker {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad) 0;
}

.wordmark {
  margin: .35em 0 0 -.045em;      /* optical left-align of the huge caps */
  padding: 0 var(--pad);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.4rem, 17.5vw, 11.5rem);
  line-height: .80;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* The stroked twin. On mobile the two words stack; on desktop they may
   share a line — both are fine, the layout is built for either. */
.wordmark .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

/* Asymmetric pair below the wordmark: intro text left (~7/12),
   portrait right (~5/12), portrait pulled UP into the wordmark's space. */
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 0 var(--pad) calc(var(--pad) * 1.2);
  align-items: start;
}

.hero__intro { padding-top: 1.2rem; }

.hero__intro p {
  margin: 0 0 1.1em;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 42ch;
}

.hero__intro p b { color: var(--text); font-weight: 500; }

/* Inline action links — text with arrows, not buttons. */
.link-act {
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link-act:hover { border-bottom-color: var(--accent); }

.link-plain {
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--text-dim);
  text-decoration: none;
}

.link-plain:hover { color: var(--text); }

.hero__links { display: flex; gap: 1.8rem; align-items: baseline; flex-wrap: wrap; }

/* Portrait slot. Empty state shows a monogram + caption; drop an <img>
   inside and remove data-state="empty" when the photo exists. */
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  margin: -3.2rem 0 0;            /* the overlap into the wordmark zone */
  border: 1px solid var(--hairline-strong);
  background: var(--bg-raised);
  overflow: hidden;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Empty-state monogram */
.portrait-frame[data-state="empty"]::before {
  content: "JF";                  /* swap with initials; replaced by <img> */
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: -.03em;
  color: var(--text-faint);
}

.portrait-frame figcaption {
  position: absolute;
  left: .8rem;
  bottom: .6rem;
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Crop mark — a small "+" at the top-left corner of the frame. Pure print. */
.portrait-frame::after {
  content: "+";
  position: absolute;
  top: .35rem;
  left: .55rem;
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--text-faint);
}

@media (max-width: 560px) {
  .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
  .portrait-frame { margin-top: -2.2rem; }
}

@media (min-width: 720px) {
  /* Desktop: the frame only kisses the wordmark's baseline — enough to read
     as a deliberate overlap, never enough to swallow the surname. */
  .portrait-frame { margin-top: -1.2rem; width: 100%; max-width: 360px; justify-self: end; }
}

/* ============================================================================
   component: status-log ("Currently experimenting") — signature device #3
   A live strip of bracketed checkboxes: [■] running, [ ] queued.
   Day counters are computed by js/main.js from data-start attributes,
   so updating the log = editing one date in the HTML.
   ============================================================================ */

.status-log {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-raised);
}

.status-log__label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .6em;
  padding: 1rem 1.1rem 1rem var(--pad);
  border-right: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The live pulse. The ONLY continuously animated element on the site. */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  html { scroll-behavior: auto; }
}

.status-log__items {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;          /* clean strip; swipeable on phones */
}

.status-log__items::-webkit-scrollbar { display: none; }

.status-log__items li {
  display: flex;
  align-items: center;
  gap: .7em;
  padding: 1rem 1.2rem;
  border-right: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: .85rem;
  white-space: nowrap;
}

.status-log__items .box {
  color: var(--text-faint);
  letter-spacing: 0;
}

.status-log__items li.is-live .box { color: var(--accent); }
.status-log__items li.is-live { color: var(--text); }
.status-log__items li:not(.is-live) { color: var(--text-dim); }

.status-log__items .day {
  color: var(--text-faint);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.status-log__updated {
  margin-left: auto;
  flex: 0 0 auto;
  display: none;                  /* hidden on phones, shown on desktop */
  align-items: center;
  padding: 1rem var(--pad) 1rem 1.1rem;
  border-left: 1px solid var(--hairline);
}

@media (min-width: 720px) {
  .status-log__updated { display: flex; }
}

/* ============================================================================
   component: route-index
   Navigation as a typographic table of contents. Rows, not cards.
   Add or remove rows freely — the layout takes any count.
   ============================================================================ */

.route-index { border-bottom: 1px solid var(--hairline); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(var(--pad) * .9) var(--pad) 1rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  letter-spacing: -.025em;
}

.section-head .more { flex: 0 0 auto; }

.route-row {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  grid-template-areas:
    "num name arrow"
    "num desc arrow";
  column-gap: 1rem;
  align-items: baseline;
  padding: 1.15rem var(--pad);
  border-top: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  transition: background .2s var(--ease);
}

.route-row:hover { background: var(--bg-raised); }

.route-num { grid-area: num; font-family: var(--font-display); font-size: .8rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.route-name {
  grid-area: name;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 3.8vw, 1.8rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  text-wrap: balance;
}

.route-desc {
  grid-area: desc;
  margin-top: .35em;
  color: var(--text-dim);
  font-size: .88rem;
  line-height: 1.5;
  max-width: 52ch;
}

.route-arrow {
  grid-area: arrow;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-faint);
  transition: transform .25s var(--ease), color .25s var(--ease);
}

.route-row:hover .route-arrow { transform: translateX(6px); color: var(--accent); }
.route-row:hover .route-name { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }

/* External destinations get the diagonal arrow. Telegram speaks teal. */
.route-row--ext .route-arrow { transform: none; }
.route-row--ext:hover .route-arrow { transform: translate(4px, -4px); }
.route-row--telegram:hover .route-arrow { color: var(--teal); }
.route-row--telegram .route-name::after { content: ""; }

@media (min-width: 720px) {
  .route-row {
    grid-template-columns: 3.5rem minmax(0, 5fr) minmax(0, 6fr) 3rem;
    grid-template-areas: "num name desc arrow";
    align-items: baseline;
  }
  .route-desc { margin-top: 0; }
}

/* ============================================================================
   component: post-ledger + post-card
   Writing surfaced as ledger entries: one feature entry, then compact rows.
   Any count works — each entry is just another ruled row.
   ============================================================================ */

.post-ledger { border-bottom: 1px solid var(--hairline); padding-bottom: calc(var(--pad) * .8); }

.post-card {
  display: block;
  margin: 0 var(--pad);
  padding: 1.3rem 0;
  border-top: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  content-visibility: auto;
}

.post-card__meta {
  display: flex;
  gap: 1.2em;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.post-card__title {
  margin: .45em 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.28;
  letter-spacing: -.015em;
  max-width: 34ch;
  text-wrap: balance;
}

.post-card__excerpt {
  margin: .6em 0 0;
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.6;
  max-width: 58ch;
}

.post-card:hover .post-card__title {
  text-decoration: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}

/* The most recent post gets the big treatment — but as an entry, not a card. */
.post-card--feature { padding: 1.6rem 0 1.9rem; }

.post-card--feature .post-card__title {
  font-size: clamp(1.55rem, 5vw, 2.4rem);
  line-height: 1.12;
  max-width: 22ch;
}

.post-card--feature .post-card__excerpt { font-size: 1rem; }

/* ============================================================================
   component: signup-block
   The list is the engine — present, never pushy. One dedicated section on
   the homepage + a compact repeat in the footer. No popups, ever.
   ACTION: wire the <form action> to your provider (Buttondown, Mailchimp…).
   ============================================================================ */

.signup-block {
  display: grid;
  gap: 1.8rem;
  padding: calc(var(--pad) * 1.1) var(--pad);
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-raised);
}

.signup-block h2 {
  margin: .4em 0 .5em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  letter-spacing: -.025em;
  line-height: 1.1;
  max-width: 16ch;
}

.signup-block .pitch {
  margin: 0;
  color: var(--text-dim);
  max-width: 46ch;
  line-height: 1.65;
}

.signup-form { display: flex; flex-direction: column; gap: .9rem; align-self: center; }

.signup-form label {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.signup-form input[type="email"] {
  width: 100%;
  padding: .95rem 1.2rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;             /* pills = actions; the sheet stays square */
  background: transparent;
  color: var(--text);
  font: inherit;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.signup-form input[type="email"]::placeholder { color: var(--text-faint); }

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-inset);
}

/* The single solid-orange element per view: the subscribe button. */
.btn-accent {
  display: inline-block;
  padding: .95rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.btn-accent:hover { background: transparent; color: var(--accent); }

.fineprint {
  margin: 0;
  font-size: .78rem;
  color: var(--text-faint);
  line-height: 1.55;
}

@media (min-width: 720px) {
  .signup-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: calc(var(--pad) * 1.5);
  }
  .signup-form {
    border-left: 1px solid var(--hairline);
    padding-left: calc(var(--pad) * 1.5);
  }
}

/* ============================================================================
   component: telegram-cta
   A quiet, teal-marked invitation. Reusable wherever the group is mentioned.
   ============================================================================ */

.telegram-cta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 var(--pad);
  padding: 1.2rem 0;
  border-top: 1px solid var(--hairline);
}

.telegram-cta p { margin: 0; color: var(--text-dim); font-size: .92rem; max-width: 52ch; }

.telegram-cta a {
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .06em;
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.telegram-cta a:hover { border-bottom-color: var(--teal); }

/* ============================================================================
   component: disclaimer
   The standing disclaimer. Inline strip for the homepage, boxed variant
   for posts. Reused everywhere via the same class.
   ============================================================================ */

.disclaimer {
  padding: 1.2rem var(--pad);
  border-bottom: 1px solid var(--hairline);
  font-size: .8rem;
  line-height: 1.65;
  color: var(--text-dim);
}

.disclaimer b { color: var(--text); font-weight: 500; }

.disclaimer--box {
  border: 1px solid var(--hairline);
  padding: 1.2rem 1.4rem;
  margin: 2.5rem 0;
}

/* ============================================================================
   component: site-footer
   The wordmark returns, stroked and cropped by the sheet edge — the bookend.
   Link columns, a compact signup repeat, theme toggle with the same
   bracketed-checkbox language as the experiment log.
   ============================================================================ */

.site-footer { overflow: hidden; }

.footer-wordmark {
  margin: 0 0 0 -.045em;
  padding: calc(var(--pad) * .9) var(--pad) 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 13vw, 9.5rem);
  line-height: .82;
  letter-spacing: -.045em;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px var(--hairline-strong);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding: calc(var(--pad) * .9) var(--pad);
  border-top: 1px solid var(--hairline);
  margin-top: calc(var(--pad) * .9);
}

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: calc(var(--pad) * 1.5); }
}

.footer-grid .label { display: block; margin-bottom: .9em; }

.footer-links { margin: 0; padding: 0; list-style: none; }

.footer-links li { border-top: 1px solid var(--hairline); }

.footer-links a {
  display: block;
  padding: .55rem 0;
  text-decoration: none;
  font-size: .92rem;
  color: var(--text-dim);
}

.footer-links a:hover { color: var(--text); }
.footer-links a.t-telegram { color: var(--teal); }

.footer-signup form { display: flex; flex-direction: column; gap: .8rem; }

.footer-signup input[type="email"] {
  width: 100%;
  padding: .8rem 1.1rem;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: .9rem;
}

.footer-signup input[type="email"]:focus { outline: none; border-color: var(--accent); }
.footer-signup .btn-accent { padding: .8rem 1.3rem; font-size: .78rem; }

.colophon {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem var(--pad) 1.4rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Theme toggle — same [ ]/[■] checkbox language as the experiment log. */
.theme-toggle {
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: .3rem 0;
}

.theme-toggle:hover { color: var(--text); }

/* ============================================================================
   BLOG INDEX page (blog/index.html)
   The notebook itself: a filter row of text links + a pure ledger of posts.
   ============================================================================ */

.page-head { padding: calc(var(--pad) * 1.2) var(--pad) calc(var(--pad) * .8); border-bottom: 1px solid var(--hairline); }

.page-head h1 {
  margin: .3em 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 6.5rem);
  line-height: .92;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.page-head .lede {
  margin: 1.2em 0 0;
  color: var(--text-dim);
  max-width: 52ch;
  font-size: 1.02rem;
  line-height: 1.65;
}

.filter-row {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding: 1rem var(--pad);
  border-bottom: 1px solid var(--hairline);
}

.filter-row a {
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
}

.filter-row a:hover { color: var(--text); }
.filter-row a[aria-current] { color: var(--text); text-decoration: underline; text-underline-offset: .35em; }

/* ============================================================================
   SINGLE POST page (blog/post.html)
   Article header, prose column, experiment-log box, pull quote, prev/next.
   ============================================================================ */

.post-head { padding: calc(var(--pad) * 1.2) var(--pad) calc(var(--pad) * .9); border-bottom: 1px solid var(--hairline); }

.post-head h1 {
  margin: .5em 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 6.5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  max-width: 20ch;
}

.post-head .standfirst {
  margin: 1.1em 0 0;
  font-size: clamp(1.02rem, 2.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 54ch;
}

/* The reading column. Narrow, generous, unhurried. */
.prose { padding: calc(var(--pad) * .9) var(--pad); max-width: 46rem; }

.prose p { margin: 0 0 1.45em; line-height: 1.78; }

.prose h2 {
  margin: 2.2em 0 .7em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.prose h2 .num { margin-right: .6em; font-size: .8em; }

.prose ul { margin: 0 0 1.45em; padding-left: 1.2em; line-height: 1.75; }
.prose li { margin-bottom: .4em; }

.prose a { color: var(--text); text-decoration: underline; text-underline-offset: .2em; text-decoration-color: var(--hairline-strong); }
.prose a:hover { text-decoration-color: var(--text); }

.prose strong { font-weight: 600; }

/* Pull quote: type doing the work — rules above and below, no accent bar. */
.pull-quote {
  margin: 2.6em 0;
  padding: 1.4em 0;
  border-top: 1px solid var(--hairline-strong);
  border-bottom: 1px solid var(--hairline-strong);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 3.6vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -.015em;
}

/* Experiment-log box inside articles — the homepage device, in miniature. */
.log-entry {
  margin: 2.2em 0;
  border: 1px solid var(--hairline);
  background: var(--bg-raised);
  font-size: .92rem;
}

.log-entry header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.log-entry ul { margin: 0; padding: .4rem 0; list-style: none; }

.log-entry li {
  display: flex;
  gap: .7em;
  padding: .5rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-dim);
}

.log-entry li:last-child { border-bottom: 0; }
.log-entry li .box { color: var(--accent); }
.log-entry li.queued .box { color: var(--text-faint); }

/* Prev / next navigation at the foot of a post. */
.post-nav { display: grid; border-top: 1px solid var(--hairline); }

.post-nav a {
  padding: 1.4rem var(--pad);
  text-decoration: none;
  color: inherit;
}

.post-nav a + a { border-top: 1px solid var(--hairline); }
.post-nav a:hover { background: var(--bg-raised); }
.post-nav .label { display: block; margin-bottom: .4em; }
.post-nav .t { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.01em; }

@media (min-width: 720px) {
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav a + a { border-top: 0; border-left: 1px solid var(--hairline); text-align: right; }
}

/* ============================================================================
   POST INTERACTIVES - protocol block, experiment phase bar, inline sparkline
   Small data widgets for experiment posts. State lives in the markup or in
   localStorage (fn-protocol-{slug}); JS only reflects it into the DOM.
   Accent orange is reserved for live/progress states - never decoration.
   ============================================================================ */

/* --- run-this-protocol checklist --- */
.protocol-block {
  margin: 2.2em 0;
  border: 1px solid var(--hairline);
  background: var(--bg-raised);
  font-size: .92rem;
}

.protocol-block summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.protocol-block summary::-webkit-details-marker { display: none; }

.protocol-label {
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text);
}

.protocol-progress { color: var(--text-dim); font-size: .85rem; }

.protocol-block[data-complete] .protocol-progress { color: var(--accent); }

.protocol-steps {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.protocol-steps li { border-bottom: 1px solid var(--hairline); }
.protocol-steps li:last-child { border-bottom: 0; }
.protocol-steps li.is-done { background: var(--bg-inset); }

.protocol-steps label {
  display: flex;
  align-items: center;
  gap: .7em;
  padding: .5rem 1.1rem;
  cursor: pointer;
  color: var(--text-dim);
}

.protocol-steps label:has(input:checked) { color: var(--text); }

.protocol-steps input[type="checkbox"] { flex: none; }

/* Bracketed box markers. Only rendered where :has works; elsewhere the
   native checkbox shows and works as usual. */
@supports selector(:has(*)) {
  .protocol-steps input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .protocol-steps label::before {
    content: "[ ]";
    color: var(--text-faint);
    font-family: var(--font-display);
    letter-spacing: .08em;
  }

  .protocol-steps label:has(input:checked)::before { content: "[■]"; color: var(--accent); }
  .protocol-steps label:has(input:focus-visible)::before { outline: 1px solid var(--accent); outline-offset: 3px; }
}

/* --- experiment phase bar --- */
.phase-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.phase {
  padding: .5rem .5rem .55rem;
  background: var(--bg);
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-faint);
}

.phase[data-phase-done] { color: var(--text-dim); background: var(--bg-raised); }

.phase[data-phase-active] { color: var(--accent); }

.phase[data-phase-active]::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: .35em;
  border-radius: 50%;
  background: var(--accent);
  animation: phase-pulse 1.6s var(--ease) infinite;
}

@keyframes phase-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
  .phase[data-phase-active]::after { animation: none; }
}

/* --- inline sparkline --- */
.sparkline {
  display: inline-block;
  width: 60px;
  height: 20px;
  vertical-align: -.35em;
}

.sparkline svg { display: block; width: 60px; height: 20px; }

.sparkline-area { fill: var(--hairline); }

.sparkline-line {
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Screen-reader-only text (sparkline labels, hidden in normal viewing). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================================
   ABOUT page (about.html)
   Portrait large beside manifesto; beliefs as bracketed ledger rows.
   ============================================================================ */

.about-grid { display: grid; gap: 2rem; padding: calc(var(--pad) * .9) var(--pad); border-bottom: 1px solid var(--hairline); }

@media (min-width: 720px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: calc(var(--pad) * 1.5); }
  .about-grid .portrait-frame { margin-top: 0; }
}

.about-grid .portrait-frame { max-width: 340px; }

.beliefs { border-bottom: 1px solid var(--hairline); }

.beliefs ul { margin: 0; padding: 0 var(--pad) calc(var(--pad) * .8); list-style: none; }

.beliefs li {
  display: flex;
  gap: .9em;
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
  line-height: 1.6;
  color: var(--text-dim);
}

.beliefs li b { color: var(--text); font-weight: 500; }
.beliefs .box { color: var(--text-faint); font-family: var(--font-display); flex: 0 0 auto; }

/* ============================================================================
   START-HERE page (start-here.html)
   Curated entry points, grouped by theme — route rows + ledger entries.
   Reuses .route-index, .route-row, .post-card — nothing new needed.
   ============================================================================ */

.group-head {
  padding: calc(var(--pad) * .8) var(--pad) .9rem;
  border-bottom: 1px solid var(--hairline);
}

.group-head h2 {
  margin: .35em 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -.02em;
}

/* ============================================================================
   component: scroll reveals (data-reveal)
   Sections carrying data-reveal get a three-beat entrance when they scroll
   into view: a hairline draws across the top, content rises 12px, then the
   label fades in last. Native scroll-driven animations where supported;
   .js-reveal transition states cover the JS fallback. Resting state is
   always visible — nothing is hidden without an opt-in.
   ============================================================================ */

[data-reveal] { position: relative; }

@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-line {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes reveal-label {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: reveal-rise .6s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

  [data-reveal]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--hairline-strong);
    transform-origin: left;
    animation: reveal-line .6s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

  [data-reveal] .label {
    animation: reveal-label .6s var(--ease) .15s both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }

  @media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal]::before,
    [data-reveal] .label { animation: none; }
  }
}

.js-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.js-reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline-strong);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .6s var(--ease);
}

.js-reveal .label {
  opacity: 0;
  transition: opacity .6s var(--ease) .15s;
}

.js-reveal.js-revealed {
  opacity: 1;
  transform: none;
}

.js-reveal.js-revealed::before { transform: scaleX(1); }

.js-reveal.js-revealed .label { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal,
  .js-reveal::before,
  .js-reveal .label {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================================
   PAGE TURNS — cross-document view transitions
   Multi-page site: shared .sheet / .site-header containers carry named
   view-transitions so every page participates with zero markup changes.
   Unsupported engines ignore the at-rule/pseudos and navigate instantly.
   Motion is transforms + opacity only; default/start states come from the
   snapshots. No JS, no polyfill, no @supports — absent support IS the
   fallback.
   ============================================================================ */

@view-transition { navigation: auto; }

.sheet { view-transition-name: sheet; }
.site-header { view-transition-name: site-header; }

/* Outgoing page lifts slightly and fades; incoming slides up from below.
   Root + both named groups share the motion so the page reads as one sheet —
   the sticky header and ruled edges stay glued to it. */
::view-transition-old(root),
::view-transition-old(sheet),
::view-transition-old(site-header) {
  animation: page-turn-out .4s var(--ease) both;
}

::view-transition-new(root),
::view-transition-new(sheet),
::view-transition-new(site-header) {
  animation: page-turn-in .4s var(--ease) both;
}

@keyframes page-turn-out {
  to { transform: translateY(-24px); opacity: 0; }
}

@keyframes page-turn-in {
  from { transform: translateY(24px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ============================================================================
   POST SEAL — generative SVG stamp in the post header
   js/main.js draws a deterministic 120x80 SVG inside every
   .post-seal[data-seed] div. Quiet hairline ink, no hover, no motion —
   a stamp, not a hero image.
   ============================================================================ */
.post-seal {
  margin: 0 0 1.1rem;
}

.post-seal__svg {
  display: block;
  stroke: var(--hairline-strong);
  stroke-width: 1;
  fill: none;
}

/* ============================================================================
   MARGINALIA — private reader margin notes
   Runtime-generated by js/main.js (marginalia module). No markup in HTML.
   Dots are passive state (quiet fill); Save is the one action (accent).
   ============================================================================ */

/* Anchor the editor + pop positioning to the reading column. */
.prose { position: relative; }

/* Each paragraph anchors its own dot. */
.prose p { position: relative; }

/* Focusable paragraphs — matches the site's focus-visible idiom. */
.prose p:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* --- note dots --- */
.marginalia-dot {
  position: absolute;
  top: .6em;
  right: 1rem;
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  background: var(--text-dim);
}

.marginalia-dot:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* Desktop: the dot moves out into the sheet's right margin. */
@media (min-width: 900px) {
  .marginalia-dot { right: calc(-1 * 2.5rem); }
}

/* --- editor --- */
.marginalia-editor {
  position: absolute;
  z-index: 40;
  max-width: 24rem;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-raised);
  padding: 1rem 1.1rem;
}

.marginalia-editor textarea {
  width: 100%;
  min-height: 5rem;
  padding: .6rem .7rem;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-inset);
  color: var(--text);
  font: inherit;
  font-size: .92rem;
  line-height: 1.6;
  resize: vertical;
}

.marginalia-editor textarea:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.marginalia-editor__actions {
  display: flex;
  gap: 1.2rem;
  margin-top: .7rem;
}

.marginalia-btn {
  font-family: var(--font-display);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: .3rem 0;
}

.marginalia-btn:hover { color: var(--text); }

/* Saving is an action — accent. Cancel/Delete stay quiet. */
.marginalia-btn--save { color: var(--accent); }
.marginalia-btn--save:hover { color: var(--text); }

/* Mobile: the editor becomes a square-edged bottom sheet. */
@media (max-width: 719px) {
  .marginalia-editor--sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-width: none;
    border: 0;
    border-top: 1px solid var(--hairline-strong);
    padding: 1rem var(--pad) calc(var(--pad) * .8);
  }
}

/* --- note pop (tooltip) --- */
.marginalia-pop {
  position: absolute;
  z-index: 40;
  max-width: 16rem;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-raised);
  padding: .7rem .9rem;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--text);
}

/* --- live region (screen-reader announcements) --- */
.marginalia-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* No transitions were added — this block is a guard for future edits. */
@media (prefers-reduced-motion: reduce) {
  .marginalia-dot,
  .marginalia-editor,
  .marginalia-pop { transition: none; }
}

/* ============================================================================
   PRINT — lab notebook export
   Printing any page produces a physical lab-notebook artifact: 2cm margins,
   a running header, page numbers, crop marks, white paper, black ink.
   Everything below is wrapped in @media print so the screen is untouched.

   @page margin boxes (@top-* / @bottom-*) drive the running header, the
   footer page number, and the four crop marks. They render on every page.

   BROWSER SUPPORT (verified Aug 2026):
   - Chrome / Edge 131+: @page margin boxes supported. Running header, footer
     page numbers, crop marks all work. ✓
   - Firefox: @page margin boxes supported for years. ✓
   - Safari (recent): @page margin box content partially supported; header and
     page numbers generally render. ✓
   - Fallback / graceful degradation: no browser-agnostic CSS can feature-detect
     @page margin-box support, so NO duplicate fixed-position emitter is shipped
     (a fixed footer would DOUBLE the page numbers in margin-box-capable
     browsers). Browsers without margin-box support (very old Chrome/Firefox)
     simply drop the header/footer/crop-mark content and print clean content
     inside the 2cm @page margin — a correct, readable artifact either way.
   ========================================================================= */

@media print {
  /* --- page geometry: 2cm margins, A4, ink-only crop + header + page no. --- */
  @page {
    size: A4;
    margin: 2cm;

    /* running header — every page */
    @top-center {
      content: "Field Notes — Jonas Feld";
      font-family: var(--font-display);
      font-size: 8pt;
      letter-spacing: .18em;
      text-transform: uppercase;
      color: #000;
    }

    /* crop marks — four corners */
    @top-left    { content: "+"; font-size: 9pt; color: #000; }
    @top-right   { content: "+"; font-size: 9pt; color: #000; }
    @bottom-left { content: "+"; font-size: 9pt; color: #000; }
    @bottom-right{ content: "+"; font-size: 9pt; color: #000; }

    /* footer page number — every page */
    @bottom-center {
      content: counter(page);
      font-family: var(--font-display);
      font-size: 9pt;
      font-variant-numeric: tabular-nums;
      color: #000;
    }
  }

  /* --- paper: everything white, everything black ink.
        Print forces the light palette regardless of data-theme /
        data-field-condition. Overrides the dark base and all field tints. --- */
  html, body { background: #fff !important; color: #000 !important; }

  * {
    color: #000 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
  }

  /* Every hairline border becomes 0.5pt solid black. Reducing width alone
     converts existing borders without inventing new ones (sides whose
     border-style is `none` stay invisible regardless of width). */
  *, *::before, *::after { border-width: 0.5pt !important; border-color: #000 !important; }

  /* Prose links are underlined, not box-bordered — ink the rule only. */
  .prose a { text-decoration-color: #000 !important; }

  /* Specific overrides after the blunt resets above (higher specificity
     beats the `*` rule even with equal importance). */
  .phase-bar { background: #000 !important; }   /* 1px gaps stay visible */
  .phase { background: #fff !important; }
  .post-seal__svg { stroke: #000 !important; }  /* stamp prints in solid ink */

  /* --- hide interactive / chrome-only UI in print --- */
  .wordmark, .status-log, .site-nav, .nav-toggle, .theme-toggle,
  .marginalia-dot, .marginalia-editor, .marginalia-pop, .marginalia-live,
  .footer-wordmark { display: none !important; }

  /* post seal kept as a small ink stamp (pure hairline SVG — prints cleanly) */
  .post-seal { display: block !important; margin: 0 0 1rem; }
  .post-seal__svg { stroke-width: 1.2; }

  /* --- layout: sheet goes full-bleed, prose widens to the full page --- */
  .sheet { max-width: none; min-height: 0; border: 0 !important; }
  .prose { max-width: none; padding-left: 0; padding-right: 0; }

  /* --- protocol block: forced open + detachable dashed box ---
        `details:not([open])` hides content via the UA's ::details-content
        pseudo-element; setting it to display:block + content-visibility:
        visible reveals it for print (modern Chromium / Firefox). --- */
  .protocol-block {
    break-inside: avoid;
    border: 0.5pt dashed #000 !important;
  }
  .protocol-block::details-content { display: block; content-visibility: visible; }
  .protocol-block summary { cursor: default; }

  /* --- keep boxes from splitting across pages --- */
  .log-entry, .pull-quote, .phase-bar { break-inside: avoid; }

  /* --- reveal states: force everything visible for print --- */
  .js-reveal, .js-reveal::before, .js-reveal .label,
  [data-reveal], [data-reveal]::before, [data-reveal] .label {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  /* --- live dots: static ink, no pulse --- */
  .live-dot { display: none !important; }
  .phase[data-phase-active]::after { animation: none !important; }
}
