:root {
  --ink: #172126;
  --teal: #214e50;
  --teal-mid: #2c6668;
  --gold: #9a7524;
  --gold-ink: #8c691f;
  --paper: #fcfbf7;
  --mist: #eaf0ef;
  --rule: #9aa9a9;
  --muted: #526466;
  --white: #ffffff;
  --page: min(1180px, calc(100% - 40px));
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--gold);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.skip-link {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--teal);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  width: var(--page);
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid rgba(33, 78, 80, .32);
}
.wordmark { text-decoration: none; display: grid; gap: 1px; }
.wordmark__name {
  margin: 0;
  font: 700 20px/1.1 Georgia, "Times New Roman", serif;
  letter-spacing: .01em;
}
.wordmark__line {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.site-header nav, .site-footer nav { display: flex; gap: 24px; align-items: center; }
.site-header nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.site-header nav a:hover { color: var(--teal); }

.hero {
  position: relative;
  width: var(--page);
  min-height: 630px;
  margin: 28px auto 0;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}
.hero__image, .hero__veil { position: absolute; inset: 0; }
.hero__image {
  z-index: -3;
  background: url("assets/a-plus-hero.jpg") 48% center / cover no-repeat;
  transform: scale(1.015);
}
.hero__veil {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(17, 36, 39, .94) 0%, rgba(17, 36, 39, .76) 48%, rgba(17, 36, 39, .18) 78%),
    linear-gradient(0deg, rgba(12, 27, 29, .62), transparent 50%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22px;
  border: 1px solid rgba(255,255,255,.45);
  pointer-events: none;
}
.hero__copy {
  width: min(650px, 67%);
  padding: 112px 0 90px 76px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1.2;
  text-transform: uppercase;
}
.hero .eyebrow { color: #e5c979; }
h1, h2, h3 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}
h1 { margin-bottom: 22px; font-size: clamp(46px, 6vw, 78px); line-height: .98; }
h2 { margin-bottom: 20px; font-size: clamp(34px, 4.5vw, 57px); line-height: 1.04; }
h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; }
.hero__lede { max-width: 560px; margin: 0; color: rgba(255,255,255,.9); font-size: 19px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid currentColor;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button--solid { border-color: var(--teal); color: var(--white); background: var(--teal); }
.hero .button--solid { border-color: var(--paper); color: var(--teal); background: var(--paper); }
.button--quiet { border-color: rgba(255,255,255,.65); color: inherit; }
.button--plain { border-color: transparent; color: var(--muted); }
.button:hover { transform: translateY(-1px); }
.hero__book {
  position: absolute;
  right: 74px;
  bottom: 48px;
  width: 204px;
  margin: 0;
  transform: rotate(1.25deg);
}
.hero__book img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 8;
  object-fit: contain;
  box-shadow: 0 20px 48px rgba(0,0,0,.44);
}
.hero__book figcaption {
  margin-top: 10px;
  color: rgba(255,255,255,.82);
  font-size: 10px;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}

.practice-shell {
  width: var(--page);
  margin: 104px auto;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(44px, 7vw, 100px);
}
.mortal-margin {
  position: relative;
  padding-right: 30px;
  border-right: 1px solid var(--rule);
}
.mortal-margin::after {
  content: "";
  position: absolute;
  top: 29px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 162px 0 var(--teal-mid), 0 324px 0 var(--teal-mid);
}
.mortal-margin ol {
  margin: 46px 0;
  padding: 0;
  list-style: none;
  counter-reset: pause;
}
.mortal-margin li {
  counter-increment: pause;
  margin: 0 0 30px;
  color: var(--rule);
  font: 700 21px/1 Georgia, "Times New Roman", serif;
  transition: color .18s ease;
}
.mortal-margin li::before {
  content: "0" counter(pause);
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font: 700 9px/1 Arial, sans-serif;
  letter-spacing: .12em;
}
.mortal-margin li.is-current { color: var(--teal); }
.mortal-margin__note { color: var(--muted); font-size: 13px; }
.section-heading { max-width: 790px; margin-bottom: 42px; }
.section-heading > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.section-heading--row {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, .55fr);
  gap: 48px;
  align-items: end;
}
.section-heading--row > p { padding-bottom: 10px; border-bottom: 1px solid var(--rule); }

.pause-stage {
  padding: clamp(30px, 5vw, 62px);
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(230px, 1fr);
  gap: 56px;
  align-items: center;
  background: var(--mist);
}
.pause-ring {
  --progress: 0deg;
  width: min(310px, 70vw);
  aspect-ratio: 1;
  padding: 14px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--progress), rgba(33,78,80,.17) 0);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.pause-ring__inner {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--teal);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.04);
}
.pause-ring__phase { font: 700 clamp(35px, 5vw, 52px)/1 Georgia, serif; }
.pause-ring__verb { margin-top: 12px; color: rgba(255,255,255,.72); font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.pause-stage__copy { color: var(--muted); }
.status { min-height: 1.4em; color: var(--teal); font-weight: 700; }
.text-button, .footer-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
}
.daily-line {
  margin: 42px 0;
  padding: 40px 0 34px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.daily-line blockquote { margin: 0; font: 700 clamp(27px, 3.5vw, 44px)/1.15 Georgia, serif; }
.daily-line > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 12px; }

.review { padding: clamp(28px, 4vw, 46px); background: #f4f6f2; }
.review__heading { display: flex; gap: 30px; justify-content: space-between; align-items: start; }
.local-only { margin-top: 0; color: var(--teal); font-size: 12px; white-space: nowrap; }
.local-only span { color: var(--gold-ink); }
.review label { display: grid; gap: 8px; margin-top: 22px; font-weight: 700; }
textarea, input {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  background: var(--white);
}
select {
  width: 100%;
  min-height: 50px;
  padding: 12px 38px 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  background: var(--white);
}
textarea { padding: 13px; resize: vertical; font-weight: 400; }
input { min-height: 50px; padding: 12px 14px; }
.review__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.journal-invitation > p:not(.consent) { max-width: 760px; color: var(--muted); font-size: 17px; }
.journal-invitation .button { margin-top: 10px; }

.capture {
  width: var(--page);
  margin: 0 auto 104px;
  padding: clamp(38px, 6vw, 74px);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr);
  gap: clamp(44px, 7vw, 96px);
  color: var(--white);
  background: var(--teal);
}
.capture .eyebrow { color: #e5c979; }
.capture__copy p:not(.eyebrow) { color: rgba(255,255,255,.78); }
.detail-link { font-weight: 700; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.capture__form { align-self: center; }
.capture__form label { display: block; margin-bottom: 10px; font: 700 17px/1.2 Georgia, serif; }
.capture__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.capture__row input { border-color: transparent; border-radius: 2px 0 0 2px; }
.capture__row .button { border-color: var(--gold); border-radius: 0 2px 2px 0; background: var(--gold); }
.consent { color: rgba(255,255,255,.64); font-size: 11px; }
.capture .status { color: #e5c979; }

.dear-mortals {
  width: var(--page);
  margin: 0 auto 110px;
  border-top: 4px double var(--gold);
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(90deg, transparent 0 72px, rgba(154,117,36,.18) 72px 73px, transparent 73px),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(44,102,104,.08) 34px 35px),
    var(--paper);
}
.dear-mortals__masthead {
  min-height: 72px;
  padding: 22px clamp(30px, 6vw, 76px);
  border-bottom: 1px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.dear-mortals__masthead .eyebrow { margin: 0; font-size: 13px; }
.dear-mortals__edition { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.dear-mortals__body {
  padding: clamp(46px, 7vw, 86px) clamp(30px, 6vw, 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  gap: clamp(46px, 8vw, 104px);
  align-items: start;
}
.dear-mortals__body h2 { max-width: 680px; }
.dear-mortals__lede { max-width: 680px; color: var(--muted); font: 700 clamp(20px, 2.4vw, 29px)/1.35 Georgia, "Times New Roman", serif; }
.dear-mortals__note { padding: 26px 0 26px 30px; border-left: 3px solid var(--gold); }
.dear-mortals__note blockquote { margin: 0 0 18px; color: var(--teal); font: 700 clamp(24px, 3vw, 36px)/1.16 Georgia, "Times New Roman", serif; }
.dear-mortals__note > p:not(.eyebrow) { color: var(--muted); }

.library, .about { width: var(--page); margin: 0 auto 110px; }
.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.book-card {
  min-height: 380px;
  padding: clamp(24px, 4vw, 42px);
  border-top: 3px solid var(--teal);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 30px;
  align-items: start;
  background: var(--mist);
}
.book-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 8;
  object-fit: contain;
  box-shadow: 0 12px 28px rgba(23,33,38,.2);
}
.book-card--journal { border-top-color: var(--gold); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.formats { color: var(--muted); font-size: 12px; font-weight: 700; }
.book-card .button { margin-top: 8px; }
.edition-covers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: start; }
.edition-links { display: grid; gap: 8px; }
.edition-links .button { width: 100%; padding: 10px 12px; font-size: 12px; text-align: left; }

.about { padding: 74px clamp(26px, 7vw, 100px); border: 1px solid var(--rule); }
.about h2 { max-width: 930px; }
.about__columns { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; color: var(--muted); }
.about__promise {
  display: block;
  margin-top: 18px;
  color: var(--teal);
  font-weight: 700;
}

.install-card {
  width: var(--page);
  margin: 0 auto 74px;
  padding: clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  color: var(--white);
  background: var(--teal);
  border-top: 4px solid var(--gold);
}
.install-card h2 { margin: 0 0 14px; color: var(--white); }
.install-card p { margin-bottom: 0; color: var(--mist); }
.install-card__action { display: grid; gap: 12px; }
.install-card .button--solid { color: var(--teal); background: var(--paper); border-color: var(--paper); }
.install-status { min-height: 2.8em; margin: 0; font-size: 12px; }
.local-install {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--teal);
  border-radius: 2px;
  color: var(--paper);
  background: var(--teal);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.local-install[hidden] { display: none; }
.install-dialog [data-install-instructions] { color: var(--muted); }

.site-footer {
  width: var(--page);
  min-height: 210px;
  margin: 0 auto;
  padding: 42px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 44px;
  align-items: start;
  color: var(--muted);
  font-size: 13px;
}
.site-footer nav a { font-weight: 700; }
.footer-note { grid-column: 1 / -1; margin: 20px 0 0; font-size: 11px; }

.exercise-page { width: min(820px, calc(100vw - 40px)); margin: 70px auto 110px; }
.exercise-page__intro { margin-bottom: 44px; }
.exercise-steps { counter-reset: exercise; padding: 0; list-style: none; }
.exercise-steps li { counter-increment: exercise; padding: 28px 0 28px 68px; border-top: 1px solid var(--rule); position: relative; }
.exercise-steps li::before { content: counter(exercise); position: absolute; left: 0; top: 25px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--white); background: var(--teal); font-weight: 700; }
.exercise-download { margin-top: 48px; padding: 32px; background: var(--mist); }
.exercise-consent { margin-top: 14px; color: var(--muted); }
.privacy-copy { max-width: 760px; }
.privacy-copy h2 { margin-top: 48px; font-size: 30px; }

/* Local-first practice journal: a working ledger, not a dashboard. */
.journal-shell { width: var(--page); margin: 0 auto 110px; }
.journal-intro {
  padding: clamp(54px, 8vw, 104px) 0 clamp(42px, 6vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: clamp(34px, 7vw, 90px);
  align-items: end;
  border-bottom: 1px solid var(--teal);
}
.journal-intro > div { max-width: 820px; }
.journal-intro h1 { margin-bottom: 18px; }
.journal-intro > div > p:last-child { max-width: 700px; color: var(--muted); font-size: 18px; }
.local-seal {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--teal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--teal);
  background: linear-gradient(135deg, var(--paper) 58%, var(--mist) 58%);
}
.local-seal > span { color: var(--gold-ink); font: 700 11px/1 Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.local-seal strong { font: 700 27px/1.05 Georgia, serif; }
.local-seal small { color: var(--muted); }
#connection-summary {
  padding-top: 10px;
  border-top: 1px solid rgba(33, 78, 80, .24);
  color: var(--teal);
  font-weight: 700;
}

.journal-workbench {
  display: grid;
  grid-template-columns: minmax(380px, .92fr) minmax(440px, 1.08fr);
  border-bottom: 1px solid var(--rule);
}
.entry-editor { padding: clamp(34px, 5vw, 64px) clamp(24px, 5vw, 62px) 62px 0; border-right: 1px solid var(--rule); }
.entry-ledger { padding: clamp(34px, 5vw, 64px) 0 62px clamp(24px, 5vw, 62px); }
.editor-heading, .ledger-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.editor-heading h2, .ledger-heading h2 { margin-top: 0; font-size: clamp(30px, 4vw, 44px); }
.entry-number, .ledger-heading > strong { color: var(--gold-ink); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.practice-kind { margin: 26px 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.practice-kind legend { width: 100%; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.practice-kind label { position: relative; }
.practice-kind input { position: absolute; opacity: 0; pointer-events: none; }
.practice-kind label { padding: 9px 12px; border: 1px solid var(--rule); color: var(--muted); cursor: pointer; }
.practice-kind label:has(input:checked) { border-color: var(--teal); color: var(--white); background: var(--teal); }
.practice-kind label:has(input:focus-visible) { box-shadow: var(--focus); }
.entry-meta, .ledger-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.entry-meta label, .ledger-tools label, .entry-tags { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.entry-prompt { display: grid; gap: 8px; margin-top: 22px; color: var(--teal); font: 700 18px/1.2 Georgia, serif; }
.entry-tags { margin-top: 22px; }
.entry-tags small { font-weight: 400; }
.journal-consent { color: var(--muted); }

.practice-insights {
  position: relative;
  overflow: hidden;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--teal);
  color: var(--white);
  background: var(--teal);
}
.practice-insights::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -72px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(226, 190, 102, .35);
  border-radius: 50%;
  pointer-events: none;
}
.practice-insights > header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.practice-insights h3 { margin: 0; font-size: 25px; }
.practice-insights .eyebrow { color: #e5c979; }
.practice-insights > header > strong { color: #e5c979; font: 700 10px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.insights-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(190px, .85fr); gap: 18px; margin-top: 22px; }
.practice-thread-panel { padding: 18px; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.06); }
.insight-label { margin: 0; color: #e5c979; font: 700 10px/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.insight-thread { position: relative; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; margin: 22px 0 14px; align-items: center; }
.insight-thread::before { content: ""; position: absolute; right: 4px; left: 4px; height: 1px; background: #e5c979; }
.insight-day { position: relative; z-index: 1; width: 100%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.58); border-radius: 50%; background: var(--teal); }
.insight-day.is-active { border: 3px solid #e5c979; background: var(--white); box-shadow: 0 0 0 3px var(--teal); }
.insight-day.is-today { outline: 2px solid var(--white); outline-offset: 3px; }
#insight-thread-summary { margin: 0; color: rgba(255,255,255,.84); font-size: 11px; }
.insight-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid rgba(255,255,255,.24); border-left: 1px solid rgba(255,255,255,.24); }
.insight-facts > div { min-width: 0; padding: 12px; border-right: 1px solid rgba(255,255,255,.24); border-bottom: 1px solid rgba(255,255,255,.24); }
.insight-facts dt { color: rgba(255,255,255,.72); font: 700 9px/1.3 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.insight-facts dd { margin: 7px 0 0; }
.insight-facts dd strong { display: block; color: var(--white); font: 700 26px/1 Georgia, serif; }
.insight-facts dd span { display: block; margin-top: 4px; color: rgba(255,255,255,.72); font-size: 9px; overflow-wrap: anywhere; }
.insight-mix { position: relative; z-index: 1; margin: 18px 0 0; color: rgba(255,255,255,.88); font-size: 11px; }
.insight-privacy { position: relative; z-index: 1; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.72); font-size: 10px; }

.ledger-tools { margin: 20px 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.practice-calendar { margin: 24px 0; padding: 20px; border: 1px solid var(--rule); background: var(--paper); }
.practice-calendar > header, .practice-calendar > footer { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.practice-calendar h3 { margin: 0; font-size: 25px; }
.calendar-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.calendar-weekdays, .calendar-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { margin-top: 18px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; text-transform: uppercase; }
.calendar-grid { margin: 7px 0 14px; border-top: 1px solid var(--mist); border-left: 1px solid var(--mist); }
.calendar-day, .calendar-blank { min-width: 0; min-height: 52px; border: 0; border-right: 1px solid var(--mist); border-bottom: 1px solid var(--mist); background: var(--white); }
.calendar-day { position: relative; padding: 7px 5px; color: var(--ink); cursor: pointer; text-align: left; }
.calendar-day:hover { background: var(--mist); }
.calendar-day:focus-visible { z-index: 1; outline: 3px solid var(--gold); outline-offset: -3px; }
.calendar-day.is-today .calendar-number { color: var(--gold-ink); font-weight: 800; }
.calendar-day.is-selected { color: var(--white); background: var(--teal); }
.calendar-day.is-selected .calendar-marker { border-color: var(--white); }
.calendar-number { display: block; font-size: 12px; }
.calendar-markers { position: absolute; right: 5px; bottom: 6px; left: 5px; display: flex; gap: 3px; }
.calendar-marker { width: 7px; height: 7px; border: 1px solid transparent; border-radius: 50%; }
.calendar-marker--morning { background: var(--gold); }
.calendar-marker--evening { background: var(--slate); }
.calendar-marker--control { background: var(--teal); }
.calendar-day.is-selected .calendar-marker--control { background: var(--white); }
.practice-calendar > footer { color: var(--muted); font-size: 11px; }
.calendar-privacy { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.entry-list { display: grid; gap: 18px; max-height: 920px; overflow: auto; padding-right: 10px; }
.empty-ledger { padding: 40px 28px; border-left: 4px solid var(--gold); background: var(--mist); }
.empty-ledger p { margin-bottom: 0; color: var(--muted); }
.ledger-entry { padding: 24px; border: 1px solid var(--rule); background: var(--white); }
.ledger-entry > header { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--rule); }
.ledger-entry h3 { margin: 0 0 18px; font-size: 24px; }
.stress-mark { color: var(--gold-ink); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.ledger-entry dl { margin: 20px 0; }
.ledger-entry dl > div + div { margin-top: 16px; }
.ledger-entry dt { color: var(--teal); font-size: 12px; font-weight: 700; }
.ledger-entry dd { margin: 4px 0 0; white-space: pre-wrap; }
.entry-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.entry-tag-list span { padding: 3px 8px; color: var(--teal); background: var(--mist); font-size: 11px; }
.ledger-entry footer { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--mist); }

.data-desk {
  padding: clamp(44px, 7vw, 82px) 0;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr);
  gap: clamp(36px, 7vw, 90px);
}
.data-desk > div:first-child p:last-child { color: var(--muted); }
.data-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.file-button { position: relative; overflow: hidden; text-align: center; }
.file-button input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.file-button:has(input:focus-visible) { box-shadow: var(--focus); }
.danger-action { color: #7a302c; }
.danger-button { border-color: #7a302c; color: var(--white); background: #7a302c; }
.reminder-row { grid-column: 1 / -1; margin-top: 12px; padding: 24px; display: grid; grid-template-columns: 240px auto 1fr; gap: 14px 20px; align-items: end; background: var(--mist); }
.reminder-row label { color: var(--muted); font-size: 12px; font-weight: 700; }
.reminder-row p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.journal-dialog { width: min(560px, calc(100vw - 32px)); padding: 34px; border: 1px solid var(--teal); color: var(--ink); background: var(--paper); }
.journal-dialog::backdrop { background: rgba(23, 33, 38, .68); }
.journal-dialog label { display: grid; gap: 8px; }
.journal-dialog form > p:not(.eyebrow):not(.status) { color: var(--muted); }
.journal-dialog input[type="password"] { width: 100%; }
.journal-dialog .status { min-height: 1.4em; color: var(--teal); font-weight: 700; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.print-sheet { display: none; }

@media (max-width: 900px) {
  .site-header { padding: 20px 0; align-items: flex-start; }
  .site-header nav { display: none; }
  .hero { min-height: 680px; }
  .hero__copy { width: calc(100% - 40px); padding: 82px 0 180px 42px; }
  .hero__book { right: 42px; bottom: 34px; width: 136px; }
  .practice-shell { grid-template-columns: 1fr; }
  .mortal-margin { padding: 0 0 26px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .mortal-margin::after, .mortal-margin__note { display: none; }
  .mortal-margin ol { margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .mortal-margin li { margin: 0; font-size: 16px; }
  .pause-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .capture, .section-heading--row, .dear-mortals__body { grid-template-columns: 1fr; }
  .capture__row { grid-template-columns: 1fr; gap: 10px; }
  .capture__row input, .capture__row .button { border-radius: 2px; }
  .shelf { grid-template-columns: 1fr; }
  .journal-workbench, .data-desk { grid-template-columns: 1fr; }
  .entry-editor { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  .entry-ledger { padding-left: 0; }
  .install-card { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --page: min(calc(100% - 24px), 1180px); }
  .wordmark__line { display: none; }
  .hero { margin-top: 12px; min-height: 620px; }
  .hero::after { inset: 12px; }
  .hero__copy { width: calc(100% - 24px); padding: 62px 12px 178px 30px; }
  .hero__lede { font-size: 16px; }
  .hero__book { right: 28px; width: 108px; }
  .practice-shell { margin: 74px auto; }
  .mortal-margin ol { grid-template-columns: repeat(2, 1fr); }
  .pause-stage { padding: 26px 18px; gap: 30px; }
  .review { padding: 26px 18px; }
  .review__heading { display: block; }
  .local-only { white-space: normal; }
  .capture { padding: 38px 20px; margin-bottom: 74px; }
  .dear-mortals { background: repeating-linear-gradient(0deg, transparent 0 34px, rgba(44,102,104,.08) 34px 35px), var(--paper); }
  .dear-mortals__masthead { padding: 20px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .dear-mortals__body { padding: 42px 20px; }
  .dear-mortals__note { padding-left: 20px; }
  .book-card { grid-template-columns: 86px 1fr; gap: 20px; padding: 22px 18px; }
  .edition-links .button { text-align: center; }
  .about { padding: 40px 22px; }
  .about__columns, .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { align-items: flex-start; flex-direction: column; gap: 12px; }
  .journal-intro { grid-template-columns: 1fr; }
  .local-seal { min-height: 150px; }
  .entry-meta, .ledger-tools, .data-actions, .reminder-row { grid-template-columns: 1fr; }
  .reminder-row { align-items: start; }
  .reminder-row p { grid-column: auto; }
  .editor-heading, .ledger-heading { display: block; }
  .practice-calendar { padding: 14px 10px; }
  .practice-calendar > header { align-items: flex-start; flex-direction: column; }
  .calendar-day, .calendar-blank { min-height: 46px; }
  .practice-insights { padding: 18px 14px; }
  .practice-insights > header { display: block; }
  .practice-insights > header > strong { display: block; margin-top: 10px; }
  .insights-layout { grid-template-columns: 1fr; }
  .practice-thread-panel { padding: 16px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .button:hover { transform: none; }
}

@media print {
  body.printing-entry > *:not(.print-sheet) { display: none !important; }
  body.printing-entry .print-sheet { display: block; color: #000; background: #fff; font-family: Georgia, serif; }
  .print-sheet > p:first-child { padding-bottom: 14px; border-bottom: 1px solid #000; font: 700 10px Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
  .print-sheet h1 { font-size: 36px; }
  .print-sheet h2 { margin-top: 32px; font-size: 16px; }
}

/* Dear Mortals reader: the source-bounded reading room inside the local-first app. */
.reading-shell { width: var(--page); margin: 0 auto 110px; }
.reading-intro { padding: clamp(54px, 8vw, 104px) 0 clamp(42px, 6vw, 70px); display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: clamp(34px, 7vw, 90px); align-items: end; border-bottom: 1px solid var(--teal); }
.reading-intro > div { max-width: 820px; }
.reading-intro > div > p:last-child { max-width: 700px; color: var(--muted); font-size: 18px; }
.reading-library { padding: clamp(42px, 6vw, 72px) 0; border-bottom: 1px solid var(--rule); }
.reading-section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.reading-section-head h2 { margin-bottom: 0; }
.issue-list { margin-top: 28px; }
.issue-card { width: 100%; padding: 28px 0; border: 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.issue-card:last-child { border-bottom: 1px solid var(--rule); }
.issue-card:hover { background: linear-gradient(90deg, transparent, var(--mist)); }
.issue-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.issue-card h3 { margin: 6px 0 8px; color: var(--teal); font-size: clamp(27px, 4vw, 43px); }
.issue-card p:last-child { margin: 0; color: var(--muted); }
.issue-meta { display: flex; gap: 18px; color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.reader-shell { padding: clamp(44px, 7vw, 82px) 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(40px, 8vw, 100px); border-bottom: 1px solid var(--rule); }
.reader-tools { padding-top: 12px; border-top: 3px solid var(--gold); align-self: start; position: sticky; top: 20px; }
.reader-tools fieldset { margin: 22px 0 16px; padding: 0; border: 0; }
.reader-tools legend { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.reader-segmented { display: grid; grid-template-columns: repeat(3, 1fr); }
.reader-segmented button { min-height: 44px; border: 1px solid var(--teal); color: var(--teal); background: var(--paper); cursor: pointer; }
.reader-segmented button + button { border-left: 0; }
.reader-segmented button[aria-pressed="true"] { color: var(--white); background: var(--teal); }
.reader-quiet-button { width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--teal); color: var(--teal); background: transparent; cursor: pointer; text-align: left; }
.reader-quiet-button[aria-pressed="true"] { color: var(--white); background: var(--teal); }
.reader-privacy-note { color: var(--muted); font-size: 10px; }
.reader-article { min-width: 0; max-width: 760px; }
.reader-article > header { padding-bottom: 30px; border-bottom: 1px solid var(--rule); }
.reader-article h2 { margin: 8px 0 14px; font-size: clamp(40px, 6vw, 67px); }
.reader-dek { color: var(--muted); font: 700 clamp(19px, 2.4vw, 27px)/1.35 Georgia, serif; }
.reader-content { font-size: 18px; line-height: 1.7; }
.reader-content > p { margin: 30px 0; }
.reader-content .reader-practice { margin: 38px 0; padding: clamp(26px, 4vw, 42px); border-top: 3px solid var(--gold); background: var(--white); }
.reader-practice h3 { margin: 6px 0 20px; }
.reader-practice ol { margin: 0; padding: 0; list-style: none; counter-reset: reader-step; }
.reader-practice li { counter-increment: reader-step; position: relative; padding: 15px 0 15px 44px; border-top: 1px solid var(--rule); font: 700 18px/1.35 Georgia, serif; }
.reader-practice li::before { content: counter(reader-step); position: absolute; left: 0; color: var(--gold-ink); font: 700 11px/1.6 Arial, sans-serif; }
.reader-cta { margin: 32px 0; padding: 22px; border: 1px solid var(--rule); background: var(--mist); }
.reader-cta a { display: inline-block; color: var(--teal); font-weight: 700; }
.reader-source { margin-top: 38px; padding: 24px; border-left: 3px solid var(--gold); color: var(--muted); font-size: 12px; }
.reader-source strong { color: var(--teal); }
.reader-data .data-actions { grid-template-columns: 1fr 1fr; }
.reader-data-status { grid-column: 1 / -1; }
.reading-page[data-font="small"] .reader-article { font-size: .9rem; }
.reading-page[data-font="large"] .reader-article { font-size: 1.14rem; }
.reading-page[data-font="large"] .reader-content { font-size: 20px; }

@media (max-width: 900px) {
  .reading-intro { grid-template-columns: 1fr; }
  .reading-intro .local-seal { max-width: 360px; }
  .reader-shell { grid-template-columns: 1fr; }
  .reader-tools { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .reader-tools > .eyebrow, .reader-tools fieldset, .reader-tools .reader-privacy-note { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .reading-section-head, .issue-card { display: block; }
  .issue-meta { margin-top: 18px; }
  .reader-tools { display: block; }
  .reader-data .data-actions { grid-template-columns: 1fr; }
  .reader-data-status { grid-column: auto; }
}

.signup { margin-top: 20px; }
.signup__label { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.signup__row { display: flex; flex-wrap: wrap; gap: 10px; }
.signup__input { flex: 1 1 220px; min-height: 50px; padding: 12px 14px; border: 1px solid var(--rule); background: #fff; font: inherit; }
.signup__input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.signup .consent { margin-top: 10px; }
.exercise-followup { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--rule); }

.essay-shell { display: block; max-width: 760px; margin: 0 auto; }
.essay-page .reader-article h1 { font-size: clamp(30px, 5vw, 40px); margin: .2em 0; }
.essay-pagination { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin: 40px 0 10px; padding-top: 20px; border-top: 1px solid var(--rule); }
.reading-static-index { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--rule); }
.reading-static-index ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
