/* Boker — getboker.app
   The page is a day: a fixed day axis on the left, the gold now-disc sliding down it as you
   scroll, each chapter stamped with its hour, and the page ending at night. Colours are the
   app's own (brand/tokens.json). One face, Fraunces; product mock-ups use the system sans,
   the way the app does. */

@font-face {
  font-family: "Fraunces";
  src: url("fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FBF7EC;
  --paper-deep: #F4EEDD;
  --card: #FFFFFF;
  --ink: #1E1B4B;
  --ink-2: #55527F;
  --ink-3: #807EA0;
  --rule: #E7E2D6;
  --amber: #F59E0B;
  --gold: #FBBF24;
  --ember: #B45309;
  --night: #121127;
  --night-2: #1E1B4B;
  --cream: #FBF7EC;
  --cream-2: #BDBAE0;

  --routine-fill: #FDE68A;
  --habit: #0F766E;   --habit-fill: #D9E9E8;
  --expense: #164E63; --expense-fill: #DAE3E6;
  --task: #4338CA;    --task-fill: #E1DFF7;
  --event: #0284C7;   --event-fill: #D7EBF6;
  --reminder: #DB2777; --reminder-fill: #F9DCE9;
  --project: #64748B; --project-fill: #E6E9EC;
  --shopping: #A16207; --shopping-fill: #F3E7CF;
  --note: #7C3AED;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --axis-x: clamp(92px, 9vw, 132px);
  --content-x: calc(var(--axis-x) + clamp(2.5rem, 6vw, 6.5rem));
  --gutter-r: clamp(1rem, 5vw, 5rem);

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 3.6vw, 2.75rem);
  --step-4: clamp(2.4rem, 5vw, 4rem);
  --step-5: clamp(3.1rem, 8.6vw, 8.25rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121127;
    --paper-deep: #1A1838;
    --card: #1E1B4B;
    --ink: #FBF7EC;
    --ink-2: #BDBAE0;
    --ink-3: #9490B3;
    --rule: #2E2B55;
    --amber: #FBBF24;
    --ember: #F3A93A;
    --night: #0B0A1C;
    --routine-fill: #583E38;
    --habit: #2DD4BF;   --habit-fill: #22526E;
    --expense: #67E8F9; --expense-fill: #34587F;
    --task: #818CF8;    --task-fill: #3C3D7F;
    --event: #5BBDF2;   --event-fill: #304C7D;
    --reminder: #E65CC9; --reminder-fill: #5A2E71;
    --project: #8A99B4; --project-fill: #3E416A;
    --shopping: #BCA48A; --shopping-fill: #4A3F3A;
    --note: #B79CFB;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  /* paper grain: a faint fractal noise, so the page reads as stock rather than screen */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .1 0 0 0 0 .3 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.62;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: var(--amber); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 3px;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-wrap: balance;
  letter-spacing: -0.012em;
}
h2 { font-size: var(--step-4); line-height: 1.04; }
h3 { font-size: var(--step-2); line-height: 1.15; }
p { margin: 0 0 1em; text-wrap: pretty; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--content-x);
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: var(--step--1);
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ——— The day axis and the now-disc ——— */

.axis {
  position: fixed;
  top: 0;
  bottom: 0;
  left: var(--axis-x);
  width: 2px;
  margin-left: -1px;
  background: color-mix(in srgb, var(--ink) 38%, transparent);
  z-index: 1;
  pointer-events: none;
}

.now {
  position: fixed;
  left: var(--axis-x);
  top: 18vh;
  z-index: 30;
  pointer-events: none;
  transform: translateY(-50%);
}
.now-disc {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px var(--paper);
  transition: box-shadow 0.3s;
}
.now-pill {
  position: absolute;
  right: 22px;
  top: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.is-night .now-disc { box-shadow: 0 0 0 3px var(--cream), 0 0 0 7px var(--night); }
.is-night .now-pill { background: var(--cream); color: var(--night-2); }

/* ——— Masthead ——— */

.masthead {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem var(--gutter-r) 0 var(--content-x);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.6rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--rule);
}
.masthead nav {
  display: flex;
  gap: 1.4rem;
  font-size: 1rem;
}
.masthead nav a { text-decoration: none; color: var(--ink-2); }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); }

/* ——— Chapters (each one is an hour of the day) ——— */

.chapter {
  position: relative;
  padding: clamp(5rem, 11vw, 9.5rem) var(--gutter-r) clamp(5rem, 11vw, 9.5rem) var(--content-x);
}

.stamp {
  position: absolute;
  left: 0;
  width: calc(var(--axis-x) - 1.1rem);
  top: calc(clamp(5rem, 11vw, 9.5rem) + 0.95rem);
  margin: 0;
  text-align: right;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums lining-nums;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  white-space: nowrap;
}
.stamp::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(100% + 0.55rem);
  width: 1.15rem;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
  border-radius: 2px;
}

/* ——— Hero ——— */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: clamp(3.5rem, 8vw, 6.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.hero .stamp { top: calc(clamp(3.5rem, 8vw, 6.5rem) + 1.6rem); }

.hero-title {
  font-size: var(--step-5);
  line-height: 0.93;
  font-weight: 340;
  letter-spacing: -0.028em;
  margin: 0 0 2.2rem;
  max-width: 11ch;
  text-wrap: initial;
}
.hero-lede {
  max-width: 34ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 2.2rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
  margin: 0;
}
.hero-cta span { font-size: 1rem; color: var(--ink-2); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s;
}
.button::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--amber);
}
.button:hover { background: color-mix(in srgb, var(--ink) 88%, var(--amber)); transform: translateY(-1px); }

.hero-figure {
  position: relative;
  margin: clamp(0rem, 3vw, 2.5rem) 0 0;
  justify-self: center;
  width: min(100%, 330px);
}
.sun {
  position: absolute;
  z-index: 0;
  width: 168%;
  aspect-ratio: 1;
  left: -34%;
  top: 34%;
  border-radius: 50%;
  background: var(--amber);
}
.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  transform: rotate(2.2deg);
  border-radius: 46px;
  filter: drop-shadow(0 1px 0 rgba(30, 27, 75, 0.18)) drop-shadow(10px 14px 0 rgba(30, 27, 75, 0.12));
}
.hero-figure figcaption {
  position: absolute;
  z-index: 2;
  left: -9.5rem;
  top: 30%;
  width: 8.2rem;
  font-size: 0.98rem;
  line-height: 1.25;
  color: var(--ember);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  transform: rotate(-4deg);
}
.hero-figure figcaption svg {
  width: 5.6rem;
  height: 3.2rem;
  margin: 0.25rem 0 0 2.6rem;
  overflow: visible;
}

/* hand-drawn strokes */
.hand {
  fill: none;
  stroke: var(--ember);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* The one page-load moment: the sun comes up behind the phone, then the note is drawn. */
@media (prefers-reduced-motion: no-preference) {
  .sun { animation: sunrise 1.9s cubic-bezier(.16,.8,.24,1) 0.15s both; }
  .phone { animation: settle 1.2s cubic-bezier(.2,.8,.2,1) both; }
  .hero-figure figcaption { animation: fade 0.6s ease 1.5s both; }
  .hero-figure .hand { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s ease-out 1.75s forwards; }
}
@keyframes sunrise { from { transform: translateY(42%); opacity: 0.0; } 35% { opacity: 1; } to { transform: none; } }
@keyframes settle { from { transform: rotate(0deg) translateY(10px); opacity: 0; } to { transform: rotate(2.2deg); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* the sun belongs to the hero only; the next chapter covers what's left of it */
.hero { overflow: clip; overflow-clip-margin: 0; }

/* ——— 6:30 am — Routines ——— */

.routines {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 22rem);
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: start;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.chapter-text { max-width: 36rem; }
.chapter-text h2 { margin-bottom: 1.6rem; }
.chapter-text p { color: var(--ink-2); max-width: 34em; }

.routine-block {
  list-style: none;
  margin: clamp(0rem, 6vw, 5.5rem) 0 0;
  padding: 0;
  font-family: var(--ui);
  border-radius: 18px;
  background: var(--routine-fill);
  border-left: 5px solid var(--ember);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.routine-block li {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  min-height: calc(var(--min, 5) * 0.42rem + 2.1rem);
  padding: 0 1.1rem;
  border-top: 1px solid color-mix(in srgb, var(--ember) 22%, transparent);
  font-size: 0.98rem;
  color: var(--ink);
}
.routine-block li:first-child { border-top: 0; }
.routine-block .rb-head {
  min-height: 3.4rem;
  font-weight: 600;
  font-size: 1.06rem;
}
.rb-5 { --min: 5; }
.rb-10 { --min: 10; }
.rb-15 { --min: 15; }
.rb-time { font-variant-numeric: tabular-nums; color: var(--ember); font-size: 0.85rem; font-weight: 600; }
.rb-min { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.85rem; }
.rb-done { color: var(--ink-2); font-size: 0.88rem; }

.pull {
  grid-column: 1 / -1;
  margin: clamp(4rem, 9vw, 7rem) 0 0 clamp(0rem, 12vw, 12rem);
  max-width: 26ch;
  font-size: var(--step-3);
  line-height: 1.16;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 360;
  text-indent: -0.42em;
}

/* ——— 8:15 am — Capture ——— */

.capture-chapter {
  background: var(--paper-deep);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.capture-chapter .chapter-text { padding-top: 0.4rem; }

.capture-demo { max-width: 34rem; }
.capture {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.55rem 0.55rem 1.3rem;
  background: var(--card);
  border: 1.5px solid var(--ink-3);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 1.12rem;
  color: var(--ink);
  min-height: 3.6rem;
}
.capture-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.capture-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--ember);
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .capture-text::after { animation: none; } }
.capture-send {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}
.capture-send svg { width: 1.1rem; height: 1.1rem; }

.ledger {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
}
.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.6rem minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  transition: opacity 0.35s;
}
.ledger li:last-child { border-bottom: 1px solid var(--rule); }
.ledger.is-live li { opacity: 0.42; }
.ledger.is-live li.is-on { opacity: 1; }
.said {
  font-size: 1.15rem;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.said::before { content: "\201C"; color: var(--ink-3); }
.said::after { content: "\201D"; color: var(--ink-3); }
.ledger svg { width: 2.4rem; height: 1rem; overflow: visible; }
.became {
  font-family: var(--ui);
  font-size: 0.92rem;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
}
.chip::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; }
.chip-expense { background: var(--expense-fill); color: var(--expense); }
.chip-event { background: var(--event-fill); color: var(--event); }
.chip-task { background: var(--task-fill); color: var(--task); }
.chip-reminder { background: var(--reminder-fill); color: var(--reminder); }
.chip-shopping { background: var(--shopping-fill); color: var(--shopping); }

.aside-notes {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 32rem;
}
.aside-notes li { padding-left: 1.4rem; position: relative; margin-bottom: 0.7rem; }
.aside-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1.5px solid var(--ember);
}
.aside-notes code {
  font-family: var(--ui);
  font-weight: 700;
  font-size: 0.92em;
  color: var(--ink);
  background: var(--card);
  padding: 0 0.3em;
  border-radius: 4px;
}

/* ——— 12:40 pm — Everything else ——— */

.rest-chapter h2 { max-width: 15ch; margin-bottom: clamp(3rem, 6vw, 5rem); }
.modules {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 2.6rem clamp(2.5rem, 7vw, 7rem);
  margin: 0;
  max-width: 64rem;
}
.modules > div { position: relative; padding-left: 1.6rem; }
.modules > div:nth-child(even) { transform: translateY(3.2rem); }
.modules dt {
  font-size: var(--step-2);
  line-height: 1.1;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  margin-bottom: 0.4rem;
}
.modules dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--dot, var(--ink));
}
.modules dd { margin: 0; color: var(--ink-2); max-width: 30em; }
.m-habit { --dot: var(--habit); }
.m-task { --dot: var(--task); }
.m-event { --dot: var(--event); }
.m-reminder { --dot: var(--reminder); }
.m-expense { --dot: var(--expense); }
.m-project { --dot: var(--project); }
.m-shopping { --dot: var(--shopping); }
.m-widget { --dot: var(--amber); }

.margin-note {
  max-width: 17rem;
  margin: clamp(5rem, 9vw, 7rem) 0 0 auto;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--card);
  border-radius: 4px 4px 4px 22px;
  box-shadow: 0 0 0 1px var(--rule);
  transform: rotate(1.6deg);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.margin-note strong {
  display: block;
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.margin-note svg { width: 100%; height: 2.6rem; margin-top: 0.5rem; }
.margin-note .ink { stroke: var(--note); }

/* ——— 7:30 pm — Privacy ——— */

.privacy-chapter {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}
.privacy-chapter h2 { max-width: 12ch; }
.promises { list-style: none; margin: 0.6rem 0 0; padding: 0; counter-reset: none; }
.promises li {
  padding: 1.25rem 0 1.3rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.4rem 2rem;
}
.promises li:last-child { border-bottom: 1px solid var(--rule); }
.promises strong {
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.promises span { color: var(--ink-2); font-size: 1.02rem; }
.privacy-chapter .more { margin-top: 1.6rem; font-size: 1.05rem; }

/* ——— 9:00 pm — Price ——— */

.price-chapter {
  background: var(--paper-deep);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
}
.price-chapter h2 { font-size: var(--step-5); font-weight: 340; line-height: 0.95; letter-spacing: -0.025em; }
.price-lede { font-size: var(--step-1); line-height: 1.45; max-width: 26ch; margin-top: 1.6rem; color: var(--ink-2); }
.circled { position: relative; white-space: nowrap; color: var(--ink); }
.circled svg {
  position: absolute;
  left: -12%;
  top: -34%;
  width: 124%;
  height: 168%;
  overflow: visible;
  pointer-events: none;
}
.plans { margin: 0; display: grid; gap: 0; }
.plans > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.plans > div:first-child { border-top: 2px solid var(--ink); }
.plans dt { font-size: 1.1rem; }
.plans dt small { display: block; font-size: 0.92rem; color: var(--ink-2); }
.plans dd { margin: 0; font-size: var(--step-3); font-variant-numeric: lining-nums tabular-nums; font-variation-settings: "SOFT" 100, "WONK" 1; }
.plans dd span { font-size: 1rem; color: var(--ink-2); }
.fine { font-size: 0.95rem; color: var(--ink-2); margin-top: 1.4rem; max-width: 36em; }
.never-locked {
  grid-column: 1 / -1;
  margin: clamp(2rem, 5vw, 4rem) 0 0;
  max-width: 40rem;
  padding-left: 1.4rem;
  border-left: 3px solid var(--amber);
  font-size: var(--step-1);
  line-height: 1.45;
}

/* ——— 10:30 pm — Night ——— */

.night {
  position: relative;
  z-index: 2;
  background: var(--night);
  color: var(--cream);
  padding: clamp(5rem, 11vw, 9rem) var(--gutter-r) 2.5rem var(--content-x);
  overflow: hidden;
}
.night::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--axis-x);
  width: 2px;
  margin-left: -1px;
  background: rgba(251, 247, 236, 0.32);
}
.night .stamp { color: var(--cream-2); top: calc(clamp(5rem, 11vw, 9rem) + 0.95rem); }
.night .stamp::after { background: var(--cream); }
.night a { color: var(--cream); }
.night-word {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 1rem clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(4rem, 9vw, 7rem);
}
.hebrew {
  margin: 0;
  font-family: "Frank Ruhl Libre", "Times New Roman", "New Peninim MT", "David", "Narkisim", serif;
  font-size: clamp(5.5rem, 17vw, 14rem);
  line-height: 0.8;
  font-weight: 400;
  color: var(--gold);
  direction: rtl;
}
.night-word > div p { max-width: 30ch; color: var(--cream-2); font-size: 1.1rem; line-height: 1.55; margin: 0 0 0.6rem; }
.night-word > div p b { color: var(--cream); font-weight: 500; }
.night-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(251, 247, 236, 0.16);
  font-size: 0.98rem;
  color: var(--cream-2);
}
.night-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.night-foot nav a { text-decoration-color: rgba(251, 247, 236, 0.35); }
.night-foot p { margin: 0; }

/* placeholders the owner must fill before publishing */
mark.fill {
  background: #FDE68A;
  color: #1E1B4B;
  padding: 0 0.2em;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #B45309;
}

/* ——— Legal pages ——— */

.doc-head {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter-r) clamp(2rem, 4vw, 3rem) var(--content-x);
}
.doc-head .stamp { top: calc(clamp(3.5rem, 8vw, 6rem) + 1.2rem); }
.doc-head h1 {
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 340;
  line-height: 0.95;
  letter-spacing: -0.025em;
  max-width: 12ch;
}
.doc-meta { margin: 1.5rem 0 0; color: var(--ink-2); font-size: 1rem; }

.doc {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 40rem) minmax(0, 15rem);
  justify-content: start;
  gap: clamp(3rem, 7vw, 7rem);
  padding: 0 var(--gutter-r) clamp(5rem, 10vw, 8rem) var(--content-x);
}
.doc-body { min-width: 0; }
.doc-body > section { position: relative; padding-top: 2.6rem; }
.doc-body > section .stamp { top: calc(2.6rem + 0.62rem); left: calc(-1 * var(--content-x)); }
.doc-body h2 {
  font-size: var(--step-3);
  line-height: 1.12;
  margin-bottom: 1rem;
}
.doc-body h3 { font-size: 1.28rem; margin: 1.8rem 0 0.6rem; font-weight: 500; }
.doc-body p, .doc-body li { color: var(--ink); }
.doc-body ul, .doc-body ol { padding-left: 1.3rem; margin: 0 0 1.1em; }
.doc-body li { margin-bottom: 0.45em; padding-left: 0.2rem; }
.doc-body li::marker { color: var(--ember); }
.doc-body strong { font-weight: 600; }
.doc-body .caps-notice { font-size: 1rem; color: var(--ink-2); }

.short-version {
  margin: 0 0 1rem;
  padding: 1.6rem 1.7rem 1.2rem;
  background: var(--card);
  border-radius: 4px 22px 4px 4px;
  box-shadow: 0 0 0 1px var(--rule);
}
.short-version h2 { font-size: var(--step-2); margin-bottom: 0.9rem; }
.short-version ul { padding-left: 1.1rem; }

.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; }
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  line-height: 1.45;
}
.doc-body th, .doc-body td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0.9rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.doc-body th { font-weight: 600; border-bottom: 2px solid var(--ink); }
.doc-body td:first-child { font-weight: 500; white-space: nowrap; }

.toc {
  position: sticky;
  top: 2rem;
  align-self: start;
  padding-top: 2.6rem;
  font-size: 0.95rem;
}
.toc p { margin: 0 0 0.8rem; color: var(--ink-2); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 0.9rem;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover { color: var(--ink); }
.toc a.is-here { color: var(--ink); border-left-color: var(--amber); }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem !important; margin-bottom: 1rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--routine-fill);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: lining-nums;
}

/* ——— 404 ——— */
.lost { min-height: 70vh; }
.lost h1 { font-size: var(--step-5); font-weight: 340; line-height: 0.95; max-width: 10ch; margin-bottom: 1.6rem; }

/* ——— Responsive ——— */

@media (max-width: 1100px) {
  .doc { grid-template-columns: minmax(0, 40rem); }
  .toc { display: none; }
}

@media (max-width: 900px) {
  .hero, .routines, .capture-chapter, .privacy-chapter, .price-chapter { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { width: min(78%, 320px); margin-top: 1rem; justify-self: end; margin-right: 6%; }
  .hero-figure figcaption { left: -7.6rem; width: 6.8rem; font-size: 0.92rem; }
  .routine-block { max-width: 24rem; margin-top: 0; }
  .pull { margin-left: 0; }
  .modules { grid-template-columns: minmax(0, 1fr); }
  .modules > div:nth-child(even) { transform: none; }
  .margin-note { margin-right: 0.5rem; }
  .price-chapter { align-items: start; }
}

@media (max-width: 640px) {
  :root {
    --axis-x: 18px;
    --content-x: 44px;
    --gutter-r: 16px;
  }
  body { font-size: 1.0625rem; }
  .now-pill { display: none; }
  .now-disc { width: 16px; height: 16px; margin: -8px 0 0 -8px; box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 5px var(--paper); }
  .is-night .now-disc { box-shadow: 0 0 0 2.5px var(--cream), 0 0 0 5px var(--night); }
  .stamp, .hero .stamp, .night .stamp, .doc-head .stamp, .doc-body > section .stamp {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    text-align: left;
    margin: 0 0 1.1rem;
    display: block;
  }
  .stamp::after { left: calc(-1 * (var(--content-x) - var(--axis-x))); width: calc(var(--content-x) - var(--axis-x) - 0.5rem); }
  .masthead { padding-top: 1.1rem; }
  .masthead nav { gap: 1rem; font-size: 0.95rem; }
  .brand { font-size: 1.35rem; }
  .brand img { width: 28px; height: 28px; border-radius: 7px; }
  .hero { padding-top: 2.6rem; }
  .hero-title { font-size: clamp(2.9rem, 14.5vw, 4rem); margin-bottom: 1.5rem; }
  .hero-figure { width: 72%; justify-self: end; margin-right: 4%; }
  .hero-figure { margin-top: 2.5rem; }
  .hero-figure figcaption { position: relative; left: auto; top: auto; width: auto; margin-top: 1.4rem; font-size: 0.92rem; text-align: right; transform: rotate(-2deg); color: #1E1B4B; }
  .hero-figure figcaption svg { display: none; }
  .ledger li { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .ledger svg { display: none; }
  .promises li { grid-template-columns: minmax(0, 1fr); }
  .night-word { grid-template-columns: minmax(0, 1fr); }
  .doc-body td:first-child { white-space: normal; }
  .capture { font-size: 1rem; }
}

@media print {
  .axis, .now, .masthead nav, .toc, .skip { display: none !important; }
  body { background: #fff; color: #000; }
  .doc, .doc-head { padding-left: 0; }
  .stamp { display: none; }
}

.night-slim { padding-top: 2.5rem; }
.night-slim .night-foot { border-top: 0; padding-top: 0; }
