/* ─────────────────────────────────────────────────────────────
   restless.css · the restless pass (2026-09-28)

   One steady frame, a different god in every room.
   The chrome (tape, masthead, footer) stays the same everywhere.
   The body of each room is allowed its own temperament:

     studio   collision: the series pile up, never the same pile twice
     lab      a messy desk: drops lie on it like loose papers
     library  books lean, the shelf notes are handwritten
     toys     loud and cramped: the powerful, crowded onto one shelf
     writings near silence: nothing moves here but the tape, slowly

   Tilts, drops and spans are dealt fresh on every visit by
   js/restless.js (CSS vars --rk-tilt, --rk-drop, --rk-span).
   Without the script every room falls back to its calm layout.

   Linked in <head> after each page's own <style>, so it wins ties.
   Remove: delete this file, js/restless.js, and their two hooks
   (the <link> in each page head, the loader in js/chrome.js).
   ───────────────────────────────────────────────────────────── */

/* ── 0 · One label, everywhere ─────────────────────────────────
   The small boxed label above an H1 came in three shapes (box,
   pill, red-lettered box). Now one: square box, ink rule, mono.
   A number (№) inside it is the only red. */
.eyebrow, .kicker, .page-stamp, .hero-stamp {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.3rem 0.65rem; border: 1px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: var(--mono-a); font-weight: 400;
  letter-spacing: var(--mono-a-track); text-transform: uppercase; font-style: normal;
}
.eyebrow .num, .kicker .num, .page-stamp .num, .hero-stamp .num {
  color: var(--red); font-weight: 400; margin: 0; border: 0; padding: 0; background: none;
}
.eyebrow .num:empty, .kicker .num:empty { display: none; }

/* The masthead news: the italic middot sat glued to the next word. */
.masthead .mh-sep { font-style: normal; display: inline-block; margin: 0 0.42em; opacity: 0.7; }

/* ── 1 · Tape ─────────────────────────────────────────────────
   js/restless.js drives the tape by hand (scroll speeds it,
   scrolling up runs it backwards, hover stalls it). A title that
   interrupts goes red for a beat. */
.tape .tape-track > span { transition: color 0.25s ease; }
.tape .tape-track > span.rk-hot { color: var(--red); }
.tape .tape-track > span.rk-hot a { color: var(--red); }

/* ── 2 · Tangents ─────────────────────────────────────────────
   Stickers slapped next to the paragraph being read (margin on
   wide screens, the screen corner otherwise), never inline in the
   text. The sticker itself (paper + tape, black vinyl, the x, the
   fuse) is drawn by js/chrome.js (RKK_STICKER); this is only what
   sits on it: a polaroid, the lead in red hand, the title, a line. */
.rk-sticker.rk-tangent { width: 250px; max-width: calc(100vw - 40px); }
.rk-sticker.rk-tangent .rk-s-body { padding: 0.9rem 1rem 1.05rem; font-size: 1rem; line-height: 1.2; white-space: normal; }
.rk-tangent .rk-t { display: block; }
.rk-tangent .rk-t::after { content: ""; display: table; clear: both; }
.rk-tangent .rk-t-hand {
  display: block; font-family: var(--hand); font-size: 1.38rem; line-height: 1; color: var(--red, #E03A1F);
  margin-bottom: 0.3rem;
}
.rk-tangent .rk-t-title {
  display: block; font-family: var(--hand); font-weight: 600; font-size: 1.6rem; line-height: 1.02; color: inherit;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.rk-tangent .rk-t-pitch {
  display: block; margin-top: 0.4rem; font-family: var(--serif); font-style: italic;
  font-size: 0.84rem; line-height: 1.4; color: var(--ink-2, #3a3935);
}
.rk-tangent .rk-t-img {
  float: right; width: 72px; height: 72px; object-fit: cover; margin: -0.2rem -0.2rem 0.4rem 0.7rem;
  background: #FCFCFA; padding: 4px 4px 11px; box-shadow: 0 6px 14px rgba(14,14,12,.18);
  transform: rotate(4deg);
}
.rk-tangent.v-ink .rk-t-hand { color: var(--red, #E03A1F); }
.rk-tangent.v-ink .rk-t-pitch { color: rgba(252,252,250,.72); }
.rk-tangent a.rk-s-body:hover .rk-t-title,
.rk-tangent a.rk-s-body:focus-visible .rk-t-title { text-decoration-color: currentColor; text-decoration-style: wavy; }
.rk-sticker.rk-track { width: 230px; }

/* What I told a kid (2026-10-01, js/restless.js part 5). The lead in red hand,
   then his line to a seven-year-old, in his hand, a size you can read. */
.rk-sticker.rk-kid-aside { width: 280px; }
.rk-kid-aside .rk-t-say {
  display: block; font-family: var(--hand); font-size: 1.36rem; line-height: 1.1; color: inherit;
}
.rk-tangent .rk-t-lead {
  display: block; margin-top: 0.7rem; font-family: var(--hand); font-size: 1.12rem; line-height: 1; color: var(--red, #E03A1F);
}
.rk-sticker.rk-doom { width: 270px; }
.rk-doom .rk-t-hand { font-size: 1.5rem; line-height: 1.02; }
html .rk-sticker.rk-kid-pair { max-width: min(19rem, calc(100vw - 48px)); }
html .rk-sticker.rk-kid-pair .rk-s-body { font-size: clamp(1.55rem, 2.4vw, 2.1rem); line-height: 1.04; white-space: normal; }

/* ── 3 · Rooms ────────────────────────────────────────────────
   Only on screens wide enough to hold a mess. Phones keep the
   calm layout: a pile on a 390px screen is just a broken page. */
@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {

  /* STUDIO · collision. Uneven widths, leaning cards, a ragged pile. */
  html[data-room="studio"] .tile {
    grid-column: span var(--rk-span, 4);
    rotate: var(--rk-tilt, 0deg);
    translate: 0 var(--rk-drop, 0px);
    transition: rotate .5s cubic-bezier(.16,1,.3,1), translate .5s cubic-bezier(.16,1,.3,1), transform .35s var(--ease), box-shadow .35s var(--ease);
  }
  html[data-room="studio"] .tile:hover,
  html[data-room="studio"] .tile:focus-within { rotate: 0deg; translate: 0 0; z-index: 4; }

  /* LAB · a messy desk. Drops overlap like papers dropped on it. */
  html[data-room="lab"] .drops-carousel { padding-top: 1.6rem; padding-bottom: 2.2rem; gap: 0; scroll-snap-type: none; }
  html[data-room="lab"] .drop-card {
    margin-left: -14px;
    rotate: var(--rk-tilt, 0deg);
    translate: 0 var(--rk-drop, 0px);
    box-shadow: 0 10px 24px rgba(14,14,12,.10);
    transition: rotate .45s cubic-bezier(.16,1,.3,1), translate .45s cubic-bezier(.16,1,.3,1), transform .35s var(--ease), box-shadow .35s var(--ease);
  }
  html[data-room="lab"] .drop-card:first-child { margin-left: 0; }
  html[data-room="lab"] .drop-card:hover,
  html[data-room="lab"] .drop-card:focus-visible { rotate: 0deg; translate: 0 -6px; z-index: 5; }

  /* LIBRARY · books lean on each other; the shelf notes are in my hand. */
  html[data-room="library"] .book-tile {
    rotate: var(--rk-tilt, 0deg);
    transition: rotate .4s cubic-bezier(.16,1,.3,1), filter .25s ease;
  }
  html[data-room="library"] .book-tile:hover,
  html[data-room="library"] .book-tile:focus-visible { rotate: 0deg; }

  /* TOYS · loud and cramped. Bigger shout, figures shoved together. */
  html[data-room="toys"] .head-title { font-size: clamp(4rem, 9vw, 8.6rem); line-height: 0.86; letter-spacing: -0.03em; }
  html[data-room="toys"] .head-title em { font-style: normal; }
  html[data-room="toys"] .toys-shelf .toy-tile {
    rotate: var(--rk-tilt, 0deg);
    translate: var(--rk-shove, 0px) 0;
    transition: rotate .35s cubic-bezier(.34,1.56,.64,1), translate .35s cubic-bezier(.34,1.56,.64,1), filter .25s ease;
  }
  html[data-room="toys"] .toys-shelf .toy-tile:hover,
  html[data-room="toys"] .toys-shelf .toy-tile:focus-visible { rotate: 0deg; }

  /* WRITINGS · near silence. The one room that does not move. */
  html[data-room="writings"] .page-title em { color: var(--ink); }
}

/* Handwritten shelf notes (library and toys) at every width. */
html[data-room="library"] .library-row__note,
html[data-room="toys"] .library-row__note {
  font-family: var(--hand); font-style: normal; font-size: 1.3rem; letter-spacing: 0; text-transform: none;
  color: var(--ink-2, #3a3935); display: inline-block; transform: rotate(-1.5deg);
}


/* ─── Visible edits (2026-09-29): the site is still being written ───
   Both the struck words and the correction are Raghava's own: his
   "correct, then deepen" move, collapsed. Never invent either side.
   Markup: <span class="rk-edit"><del>first</del> <ins>truer</ins></span> */
.rk-edit del {
  text-decoration: line-through; text-decoration-color: var(--red);
  text-decoration-thickness: 0.09em; color: var(--muted);
}
.rk-edit ins {
  text-decoration: none; display: inline-block;
  font-family: var(--hand); font-style: normal; font-weight: 400;
  font-size: 1.42em; line-height: 1; color: var(--red);
  transform: rotate(-2.5deg) translateY(-0.08em); margin-left: 0.12em;
}
h1 .rk-edit ins, h2 .rk-edit ins { font-size: 0.55em; letter-spacing: 0; }
h1 .rk-edit del, h2 .rk-edit del { text-decoration-thickness: 0.05em; }
