:root {
  --paper: #fffaf1;
  --card: #fffdf8;
  --ink: #2d2b27;
  --muted: #756f64;
  --graphite: #4d4941;
  --sage: #9aa99a;
  --sage-wash: #d9e1d4;
  --coral: #c86f55;
  --ochre: #c7a24f;
  --pencil: #9a9488;
  --line: #e8dcc8;
  --wash: #f5ead8;
  --shadow: rgba(60, 47, 28, 0.08);
  --display: Georgia, "Iowan Old Style", Charter, serif;
  --body: "Avenir Next", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(255, 250, 241, 0.98)),
    linear-gradient(108deg, transparent 0 34%, rgba(154, 169, 154, 0.055) 34% 52%, transparent 52%),
    linear-gradient(74deg, transparent 0 55%, rgba(199, 162, 79, 0.05) 55% 68%, transparent 68%),
    var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(45, 43, 39, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 43, 39, 0.018) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000, transparent 86%);
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

.folio-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

.folio-shell:focus {
  outline: none;
}

.drawn-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.folio-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 16px;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto 18px;
  padding: 8px 0 16px;
  border-bottom: 1px solid rgba(77, 73, 65, 0.16);
}

.folio-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(77, 73, 65, 0.13);
  border-radius: 13px 15px 12px 16px;
  background: rgba(255, 253, 248, 0.72);
  text-decoration: none;
}

.folio-mark img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.folio-head h1 {
  margin: 0;
  grid-column: 2;
  font-family: var(--display);
  font-size: clamp(27px, 4vw, 43px);
  font-weight: 520;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.folio-nav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  padding-top: 14px;
}

.folio-nav a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 66px;
  padding: 5px 2px 13px;
  color: var(--graphite);
  text-align: center;
  text-decoration: none;
  transform-origin: 50% 80%;
}

.folio-nav a::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 15%;
  bottom: 0;
  height: 2px;
  border-radius: 999px 80% 999px 70%;
  background: transparent;
}

.folio-nav a:nth-child(2n) .drawn-icon {
  transform: rotate(-2deg);
}

.folio-nav a:nth-child(3n) .drawn-icon {
  transform: rotate(2deg);
}

.folio-nav a span {
  font-size: clamp(13px, 2vw, 18px);
  font-weight: 560;
}

.folio-nav a.is-active {
  color: var(--coral);
}

.folio-nav a.is-active::after {
  background: var(--coral);
  box-shadow:
    0 1px 0 rgba(200, 111, 85, 0.18),
    8px 1px 0 -1px rgba(200, 111, 85, 0.45);
}

.sleep-plan-card,
.folio-section {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
  border: 1px solid rgba(77, 73, 65, 0.12);
  border-radius: 17px 19px 16px 20px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.93), rgba(255, 250, 241, 0.88)),
    var(--card);
  box-shadow: 0 22px 90px var(--shadow);
  overflow: hidden;
}

.sleep-plan-card {
  padding: clamp(20px, 4vw, 38px);
}

.folio-section {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 42px);
}

.sleep-plan-card::before,
.folio-section::before {
  content: "";
  position: absolute;
  inset: 11px;
  pointer-events: none;
  border: 1px solid rgba(77, 73, 65, 0.055);
  border-radius: 13px 15px 12px 16px;
}

.sleep-plan-card::after,
.folio-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(96deg, transparent 0 42%, rgba(199, 162, 79, 0.04) 48%, transparent 55%),
    linear-gradient(rgba(77, 73, 65, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 31px;
  opacity: 0.5;
}

.sleep-plan-card > *,
.folio-section > * {
  position: relative;
  z-index: 1;
}

.folio-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  max-width: 1060px;
  margin: 14px auto 0;
  padding: 0 10px;
  color: rgba(77, 73, 65, 0.56);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.folio-foot span {
  position: relative;
}

.folio-foot span + span::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(200, 111, 85, 0.45);
  transform: translateY(-50%);
}

.today-answer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(230px, 0.74fr);
  gap: clamp(12px, 3.5vw, 40px);
  align-items: center;
  padding: 2px 0 20px;
  border-bottom: 1px solid rgba(77, 73, 65, 0.12);
}

.folio-section .page-intro::before,
.sleep-plan-card .today-answer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background:
    linear-gradient(90deg, rgba(77, 73, 65, 0.12), transparent 38%),
    linear-gradient(90deg, transparent 8%, rgba(200, 111, 85, 0.18) 18% 28%, transparent 40%);
  transform: rotate(-0.12deg);
}

.answer-copy p,
.page-intro p:first-child,
.section-head p,
.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

.answer-copy h2,
.page-intro h2,
.section-head h2,
.section-head h3 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(42px, 6.5vw, 68px);
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: 0;
}

.folio-section .page-intro h2 {
  font-size: clamp(38px, 5.1vw, 58px);
}

.answer-copy span,
.page-intro > p,
.lead {
  display: block;
  max-width: 31rem;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

.anderson-scene {
  position: relative;
  margin: 0;
  min-height: 190px;
  align-self: end;
}

.anderson-scene::before,
.anderson-scene::after {
  content: "";
  position: absolute;
  display: block;
  width: 8px;
  height: 8px;
  background: var(--ochre);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0.68;
}

.anderson-scene::before {
  top: 18%;
  left: 8%;
  transform: rotate(12deg);
}

.anderson-scene::after {
  top: 36%;
  right: 10%;
  width: 5px;
  height: 5px;
  opacity: 0.5;
}

.anderson-scene img,
.folio-character img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

.anderson-scene img {
  max-height: 330px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 2px;
}

.data-note,
.quiet-disclaimer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.today-workbench {
  display: grid;
  gap: 20px;
}

.today-map {
  min-width: 0;
}

.today-timeline-strip {
  margin-top: clamp(18px, 3vw, 28px);
  padding-top: 18px;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
}

.rescue-strip {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
}

.rescue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rescue-chips button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(77, 73, 65, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.76);
  color: var(--graphite);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.rescue-chips button.is-active {
  border-color: rgba(200, 111, 85, 0.46);
  background: rgba(200, 111, 85, 0.08);
  color: var(--ink);
}

.rescue-card {
  padding: 13px 14px;
  border: 1px solid rgba(77, 73, 65, 0.11);
  border-radius: 12px 10px 14px 11px;
  background: rgba(255, 253, 248, 0.56);
}

.rescue-card span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 820;
}

.rescue-card b {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 520;
  line-height: 1;
}

.rescue-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.rescue-card small {
  display: block;
  margin-top: 8px;
  color: rgba(77, 73, 65, 0.58);
  font-size: 11px;
  font-weight: 720;
}

.mini-stats article {
  padding: 10px 12px 12px;
  border: 1px solid rgba(77, 73, 65, 0.1);
  border-radius: 12px 10px 13px 11px;
  background: rgba(255, 253, 248, 0.5);
}

.mini-stats article,
.metric-index button,
.ledger-strip article {
  transform: rotate(-0.15deg);
}

.mini-stats article:nth-child(2n),
.metric-index button:nth-child(2n),
.ledger-strip article:nth-child(2n) {
  transform: rotate(0.14deg);
}

.mini-stats span,
.metric-strip span,
.plan-notes span,
.method-grid span,
.rule-card span,
.reason-stack span {
  display: block;
  color: var(--coral);
  font-size: 12px;
  font-weight: 760;
}

.mini-stats b,
.metric-strip strong {
  display: block;
  margin-top: 2px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 520;
  line-height: 1;
}

.rhythm-path {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 20px;
}

.rhythm-path::before {
  content: "";
  position: absolute;
  left: 100px;
  top: 54px;
  bottom: 54px;
  border-left: 2px dotted rgba(77, 73, 65, 0.3);
  filter: drop-shadow(1px 0 0 rgba(255, 250, 241, 0.8));
}

.rhythm-row {
  position: relative;
  display: grid;
  grid-template-columns: 72px 28px minmax(112px, 178px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 96px;
  border-bottom: 1px dashed rgba(77, 73, 65, 0.12);
}

.rhythm-row:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(77, 73, 65, 0.1);
  border-radius: 48% 52% 47% 53%;
  background: rgba(255, 253, 248, 0.78);
  color: var(--ochre);
  transform: rotate(-2deg);
}

.activity-icon.nap {
  background: rgba(154, 169, 154, 0.22);
  color: var(--graphite);
  transform: rotate(2deg);
}

.activity-icon.moon {
  background: rgba(200, 111, 85, 0.2);
  color: var(--coral);
  transform: rotate(-4deg);
}

.activity-icon .drawn-icon {
  stroke-width: 1.42;
}

.path-node {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ochre);
  box-shadow: 0 0 0 4px rgba(255, 253, 248, 0.92);
}

.path-node.nap {
  background: var(--sage);
}

.path-node.moon {
  background: var(--coral);
}

.rhythm-row strong {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 4px 14px 7px;
  border: 1px solid rgba(77, 73, 65, 0.22);
  border-radius: 14px 12px 15px 11px;
  background: rgba(255, 253, 248, 0.62);
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 520;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, 0.48);
}

.rhythm-row:nth-child(2n) strong {
  border-radius: 12px 15px 11px 14px;
}

.rhythm-row span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: clamp(17px, 2.4vw, 24px);
}

.rhythm-row span b {
  color: var(--graphite);
  font-weight: 620;
}

.rhythm-row span small {
  color: var(--muted);
  font-size: 0.78em;
}

.plan-note,
.field-note {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(77, 73, 65, 0.12);
  border-radius: 11px 13px 12px 10px;
  background: rgba(255, 253, 248, 0.56);
}

.field-note,
.chart-caption {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(255, 250, 241, 0.56)),
    linear-gradient(90deg, rgba(154, 169, 154, 0.09) 0 6px, transparent 6px);
}

.plan-note {
  grid-template-columns: 76px 1fr;
  align-items: center;
}

.plan-note .drawn-icon {
  width: 48px;
  height: 48px;
  justify-self: center;
  color: var(--sage);
}

.plan-note p,
.field-note p,
.rule-card p,
.reason-stack p,
.watch-list p,
.log-day p,
.method-grid p {
  margin: 0;
  color: var(--muted);
}

.plan-note p {
  font-size: clamp(17px, 2.2vw, 22px);
}

.field-note b {
  color: var(--ink);
}

.plan-legend,
.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.plan-legend span,
.legend-row span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.plan-legend i,
.legend-row i {
  display: inline-block;
  width: 28px;
  height: 10px;
  border-radius: 999px;
}

.awake-key {
  border-top: 3px dashed var(--ochre);
}

.nap-key {
  background: rgba(154, 169, 154, 0.45);
  border: 1px solid rgba(77, 73, 65, 0.1);
}

.night-key {
  border-top: 4px solid var(--coral);
}

.target-key {
  border-top: 3px dotted var(--pencil);
}

.day-timeline {
  display: block;
  width: 100%;
  height: 158px;
  margin-top: 8px;
  overflow: visible;
}

.today-map .day-timeline {
  margin-top: 4px;
}

.today-timeline-strip .plan-legend {
  margin-top: 0;
}

.today-timeline-strip .day-timeline {
  height: clamp(132px, 14vw, 190px);
  margin-top: 6px;
}

.day-timeline text {
  fill: var(--muted);
  font: 600 14px var(--body);
  text-anchor: middle;
}

.day-timeline .timeline-note {
  fill: var(--graphite);
  font: 760 13px var(--body);
}

.timeline-axis,
.awake-line,
.night-line,
.target-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-axis {
  stroke: rgba(77, 73, 65, 0.15);
}

.tick {
  fill: none;
  stroke: rgba(77, 73, 65, 0.13);
  stroke-dasharray: 8 9;
}

.awake-line {
  stroke: var(--ochre);
  stroke-width: 4;
  stroke-dasharray: 11 11;
}

.awake-line-shadow {
  opacity: 0.22;
  stroke-width: 3;
}

.night-line {
  stroke: var(--coral);
  stroke-width: 5;
}

.target-line {
  stroke: var(--pencil);
  stroke-width: 2;
  stroke-dasharray: 4 7;
}

.nap-block {
  fill: rgba(154, 169, 154, 0.52);
  stroke: rgba(77, 73, 65, 0.14);
  transform-box: fill-box;
  transform-origin: center;
}

.nap-block:nth-of-type(2n) {
  transform: rotate(-1deg);
}

.latest-dot {
  fill: var(--graphite);
  stroke: var(--card);
  stroke-width: 4;
}

.page-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.62fr);
  gap: clamp(18px, 4vw, 46px);
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(77, 73, 65, 0.12);
}

.page-intro h2 {
  max-width: 12ch;
}

.sheet-layout,
.evidence-board,
.watch-board,
.method-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.46fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
  margin-top: 20px;
}

.folio-section .sheet-layout,
.folio-section .evidence-board,
.folio-section .watch-board,
.folio-section .method-board,
.folio-section .reason-stack,
.folio-section .log-list {
  padding-top: 2px;
}

.sheet-main,
.chart-stage {
  min-width: 0;
}

.plan-timeline-strip {
  margin-top: clamp(18px, 3vw, 30px);
  padding-top: 18px;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
}

.strip-label {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  color: var(--muted);
}

.strip-label span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 780;
}

.strip-label b {
  color: var(--graphite);
  font-size: 15px;
}

.plan-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.plan-rule-grid .field-note {
  margin-top: 0;
}

.alternative-plans {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
}

.alternative-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.alternative-grid article {
  padding: 12px;
  border: 1px solid rgba(77, 73, 65, 0.11);
  border-radius: 11px 9px 12px 10px;
  background: rgba(255, 253, 248, 0.54);
}

.alternative-grid span {
  display: block;
  color: var(--coral);
  font-size: 11px;
  font-weight: 820;
}

.alternative-grid b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.alternative-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.side-note,
.chart-read {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-left: clamp(12px, 2vw, 22px);
  border-left: 1px dashed rgba(77, 73, 65, 0.16);
}

.folio-character {
  margin: 0;
  pointer-events: none;
}

.schedule-character img {
  width: min(100%, 270px);
  margin: 0 auto;
}

.evidence-character {
  width: min(100%, 230px);
  justify-self: center;
}

.method-character {
  width: min(100%, 235px);
  justify-self: center;
}

.sleep-character img {
  width: min(100%, 360px);
  margin: 0 auto;
}

.rule-card,
.reason-stack article {
  padding: 15px 0;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
}

.rule-card:first-of-type,
.reason-stack article:nth-child(-n + 2) {
  border-top-color: rgba(77, 73, 65, 0.09);
}

.rule-card span,
.reason-stack span {
  margin-bottom: 4px;
}

.drawn-chart {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  overflow: visible;
}

.drawn-chart .grid {
  fill: none;
  stroke: rgba(77, 73, 65, 0.1);
  stroke-dasharray: 3 9;
}

.drawn-chart .axis {
  fill: none;
  stroke: rgba(77, 73, 65, 0.22);
}

.drawn-chart .reference {
  stroke: rgba(199, 162, 79, 0.64);
  stroke-width: 2;
  stroke-dasharray: 6 10;
}

.drawn-chart .line {
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawn-chart .annotation-line {
  fill: none;
  stroke: rgba(200, 111, 85, 0.62);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 4 7;
}

.drawn-chart .latest {
  fill: var(--coral);
  stroke: var(--card);
  stroke-width: 3;
  pointer-events: none;
}

.drawn-chart .travel {
  fill: rgba(200, 111, 85, 0.38);
}

.drawn-chart .chart-hit {
  fill: rgba(255, 253, 248, 0.72);
  stroke: rgba(77, 73, 65, 0.18);
  stroke-width: 1.5;
  cursor: pointer;
}

.drawn-chart .chart-hit:hover,
.drawn-chart .chart-hit:focus {
  fill: rgba(200, 111, 85, 0.16);
  stroke: var(--coral);
  outline: none;
}

.drawn-chart .chart-hit.is-selected {
  fill: var(--coral);
  stroke: var(--card);
  stroke-width: 3;
}

.period-band {
  fill: rgba(200, 111, 85, 0.05);
}

.period-band.reentry {
  fill: rgba(154, 169, 154, 0.08);
}

.chart-title {
  fill: var(--ink);
  font: 700 16px var(--body);
}

.chart-subtitle,
.period-label,
.tick-label {
  fill: var(--muted);
  font: 650 11px var(--body);
}

.tick-label {
  text-anchor: end;
}

.period-label {
  fill: rgba(77, 73, 65, 0.62);
  text-anchor: middle;
}

.axis-label {
  fill: var(--muted);
  font: 700 12px var(--body);
}

.annotation {
  fill: var(--coral);
  font: 760 12px var(--body);
}

.annotation.end,
.axis-label.end {
  text-anchor: end;
}

.line-key {
  border-top: 3px solid var(--graphite);
}

.reference-key {
  border-top: 2px dashed var(--ochre);
  background: transparent;
}

.dot-key {
  width: 10px !important;
  height: 10px !important;
  background: var(--coral);
}

.travel-key {
  background: rgba(200, 111, 85, 0.24);
}

.chart-caption {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(77, 73, 65, 0.1);
  border-radius: 11px 13px 12px 10px;
  background: rgba(255, 253, 248, 0.48);
}

.chart-caption b {
  color: var(--ink);
}

.chart-caption p {
  margin: 0;
  color: var(--muted);
}

.evidence-day-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(77, 73, 65, 0.12);
  border-radius: 13px 10px 14px 11px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.74), rgba(255, 250, 241, 0.56)),
    linear-gradient(rgba(77, 73, 65, 0.024) 1px, transparent 1px);
  background-size: 100% 100%, 100% 34px;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-kicker span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 820;
}

.card-kicker button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(77, 73, 65, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--graphite);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.day-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.day-detail-grid article {
  padding: 9px;
  border: 1px solid rgba(77, 73, 65, 0.08);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.5);
}

.day-detail-grid span {
  display: block;
  color: var(--coral);
  font-size: 10px;
  font-weight: 820;
}

.day-detail-grid b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.event-mini-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.event-mini-list li.is-sleep,
.event-mini-list li.is-nap {
  color: var(--graphite);
}

.evidence-picker {
  margin: 20px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(77, 73, 65, 0.12);
}

.metric-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.metric-index button {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(77, 73, 65, 0.14);
  border-radius: 9px 11px 8px 12px;
  background: rgba(255, 253, 248, 0.54);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 -12px 0 rgba(154, 169, 154, 0.045);
}

.metric-index button::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 20px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.metric-index button.is-active {
  border-color: rgba(200, 111, 85, 0.42);
  background: rgba(200, 111, 85, 0.07);
  color: var(--ink);
}

.metric-index button.is-active::after {
  background: var(--coral);
}

.metric-index span {
  color: var(--coral);
  font-size: 11px;
  font-weight: 780;
}

.metric-index strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 520;
}

.metric-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.metric-strip article {
  padding: 11px 0;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
}

.reason-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin-top: 20px;
}

.method-page .reason-stack,
.appendix-page .log-list {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.22), transparent),
    linear-gradient(rgba(77, 73, 65, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 38px;
}

.why-equation {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(77, 73, 65, 0.11);
  border-radius: 14px 12px 15px 11px;
  background: rgba(255, 253, 248, 0.5);
  color: var(--muted);
}

.why-equation span,
.why-equation strong {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 8px 10px;
  border: 1px dashed rgba(77, 73, 65, 0.16);
  border-radius: 11px;
  text-align: center;
}

.why-equation b {
  color: var(--coral);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 520;
}

.why-equation strong {
  grid-column: 1 / -1;
  min-height: 56px;
  border-style: solid;
  border-color: rgba(200, 111, 85, 0.26);
  background: rgba(200, 111, 85, 0.06);
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 520;
}

.reason-stack article {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0 12px;
  align-items: start;
}

.reason-stack i {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(77, 73, 65, 0.12);
  border-radius: 50%;
  color: var(--sage);
}

.reason-stack .drawn-icon {
  width: 20px;
  height: 20px;
}

.watch-list {
  display: grid;
  gap: 0;
  background:
    linear-gradient(90deg, rgba(199, 162, 79, 0.08) 0 6px, transparent 6px),
    linear-gradient(rgba(77, 73, 65, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 42px;
}

.watch-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.watch-summary article {
  padding: 12px 14px 14px;
  border: 1px solid rgba(77, 73, 65, 0.11);
  border-radius: 12px 10px 13px 11px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.72), rgba(255, 250, 241, 0.58)),
    linear-gradient(90deg, rgba(199, 162, 79, 0.08) 0 5px, transparent 5px);
}

.watch-summary article:nth-child(2) {
  transform: rotate(0.12deg);
}

.watch-summary span {
  display: block;
  color: var(--coral);
  font-size: 11px;
  font-weight: 780;
}

.watch-summary b {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 520;
  line-height: 1;
}

.watch-summary p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.trigger-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 0 16px;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
  border-bottom: 1px dashed rgba(77, 73, 65, 0.14);
}

.trigger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trigger-card {
  padding: 12px;
  border: 1px solid rgba(77, 73, 65, 0.11);
  border-radius: 12px 10px 13px 11px;
  background: rgba(255, 253, 248, 0.56);
}

.trigger-card.is-watch {
  border-color: rgba(200, 111, 85, 0.32);
  background: rgba(200, 111, 85, 0.055);
}

.trigger-card span {
  color: var(--coral);
  font-size: 11px;
  font-weight: 820;
}

.trigger-card b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.trigger-card p,
.trigger-todo {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.trigger-todo {
  margin-top: -2px;
  font-size: 12px;
  font-weight: 720;
}

.watch-meter {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.watch-meter i {
  position: relative;
  display: block;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(154, 169, 154, 0.28), rgba(199, 162, 79, 0.28), rgba(200, 111, 85, 0.32));
}

.watch-meter i::after {
  content: "";
  position: absolute;
  right: 18%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--coral);
  transform: translateY(-50%);
  box-shadow: 0 0 0 4px rgba(255, 253, 248, 0.9);
}

.watch-list article {
  display: grid;
  grid-template-columns: 42px minmax(86px, 150px) 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px dashed rgba(77, 73, 65, 0.14);
}

.watch-list article:first-child {
  border-top: 1px dashed rgba(77, 73, 65, 0.12);
}

.watch-list span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 49% 51% 46% 54%;
  background: rgba(199, 162, 79, 0.18);
  color: var(--coral);
  font-weight: 800;
}

.watch-list b {
  color: var(--graphite);
}

.watch-list p strong {
  color: var(--graphite);
  font-weight: 760;
}

.log-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.ledger-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ledger-strip article {
  padding: 12px;
  border: 1px solid rgba(77, 73, 65, 0.1);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.54);
}

.ledger-strip span {
  display: block;
  color: var(--coral);
  font-size: 11px;
  font-weight: 780;
}

.ledger-strip b {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 520;
  line-height: 1;
}

.log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 0 14px;
  border-top: 1px dashed rgba(77, 73, 65, 0.14);
  border-bottom: 1px dashed rgba(77, 73, 65, 0.14);
}

.log-count b {
  display: block;
  font-family: var(--display);
  font-size: clamp(22px, 2.7vw, 30px);
  font-weight: 520;
  line-height: 1;
}

.log-count span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.log-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.log-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(77, 73, 65, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  color: var(--graphite);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.log-actions button:hover:not(:disabled) {
  background: rgba(199, 162, 79, 0.16);
  transform: translateY(-1px);
}

.log-actions button:disabled {
  opacity: 0.42;
  cursor: default;
}

.log-day {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0 16px 14px;
  border-top: 1px dashed rgba(77, 73, 65, 0.16);
  border-left: 3px solid transparent;
  border-radius: 3px;
}

.log-day:nth-child(2n) {
  transform: translateY(1px);
}

.log-day.period-reentry {
  border-left-color: rgba(154, 169, 154, 0.58);
  background: linear-gradient(90deg, rgba(154, 169, 154, 0.06), transparent 42%);
}

.log-day.period-travel {
  border-left-color: rgba(200, 111, 85, 0.48);
  background: linear-gradient(90deg, rgba(200, 111, 85, 0.045), transparent 42%);
}

.log-day.period-routine {
  border-left-color: rgba(199, 162, 79, 0.4);
}

.log-day.is-focused {
  border-left-color: var(--coral);
  background:
    linear-gradient(90deg, rgba(200, 111, 85, 0.08), transparent 46%),
    linear-gradient(rgba(77, 73, 65, 0.026) 1px, transparent 1px);
  background-size: 100% 100%, 100% 38px;
}

.log-day span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 780;
}

.log-day strong {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 520;
  line-height: 1;
}

.log-day ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-day li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(77, 73, 65, 0.08);
  color: var(--muted);
}

.log-day li.is-sleep,
.log-day li.is-nap {
  color: var(--graphite);
}

.log-day li.is-sleep b::before,
.log-day li.is-nap b::before,
.event-mini-list li.is-sleep b::before,
.event-mini-list li.is-nap b::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(154, 169, 154, 0.62);
}

.log-day li.is-nap b::before,
.event-mini-list li.is-nap b::before {
  background: rgba(199, 162, 79, 0.64);
}

.log-day li b {
  color: var(--ink);
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 780px) {
  .folio-shell {
    width: min(100% - 22px, 520px);
    padding-top: 10px;
  }

  .folio-head {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 10px;
    margin-bottom: 12px;
  }

  .folio-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .folio-mark img {
    width: 34px;
    height: 34px;
  }

  .folio-head h1 {
    font-size: clamp(19px, 5.7vw, 34px);
  }

  .folio-nav {
    gap: 2px;
    padding-top: 12px;
  }

  .folio-nav a {
    min-height: 58px;
    padding-bottom: 10px;
  }

  .folio-nav .drawn-icon {
    width: 23px;
    height: 23px;
  }

  .folio-nav a span {
    font-size: 13px;
  }

  .sleep-plan-card,
  .folio-section {
    padding: 18px 16px 20px;
    border-radius: 14px;
  }

  .sleep-plan-card::before,
  .folio-section::before {
    inset: 7px;
    border-radius: 11px;
  }

  .today-answer {
    grid-template-columns: minmax(0, 1fr) minmax(122px, 0.72fr);
    gap: 4px;
    align-items: end;
    padding-bottom: 16px;
  }

  .answer-copy h2,
  .page-intro h2 {
    max-width: 8.5ch;
    font-size: clamp(34px, 9.7vw, 48px);
  }

  .answer-copy span,
  .page-intro > p {
    font-size: 16.5px;
  }

  .anderson-scene {
    min-height: 118px;
  }

  .anderson-scene img {
    max-height: 188px;
    transform: translateX(-5px) translateY(4px) scale(1.08);
  }

  .mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .mini-stats article {
    padding: 8px 8px 9px;
  }

  .mini-stats span {
    font-size: 10px;
  }

  .mini-stats b {
    font-size: 20px;
  }

  .rhythm-path {
    margin-top: 14px;
  }

  .rhythm-path::before {
    left: 69px;
    top: 49px;
    bottom: 49px;
  }

  .rhythm-row {
    grid-template-columns: 48px 18px minmax(96px, 128px) minmax(0, 1fr);
    gap: 8px;
    min-height: 88px;
  }

  .activity-icon {
    width: 46px;
    height: 46px;
  }

  .activity-icon .drawn-icon {
    width: 24px;
    height: 24px;
  }

  .path-node {
    width: 12px;
    height: 12px;
  }

  .rhythm-row strong {
    min-height: 52px;
    padding-inline: 8px;
    font-size: clamp(31px, 9.2vw, 42px);
  }

  .rhythm-row span {
    font-size: 16px;
  }

  .plan-note {
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .plan-note .drawn-icon {
    width: 35px;
    height: 35px;
  }

  .plan-note p {
    font-size: 16px;
  }

  .plan-legend,
  .legend-row {
    gap: 10px 15px;
    font-size: 13px;
  }

  .plan-legend i,
  .legend-row i {
    width: 22px;
  }

  .day-timeline {
    height: 112px;
    margin-top: 2px;
  }

  .today-timeline-strip {
    margin-top: 16px;
    padding-top: 14px;
  }

  .today-timeline-strip .day-timeline {
    height: 112px;
  }

  .day-timeline text {
    font-size: 13px;
  }

  .page-intro,
  .sheet-layout,
  .evidence-board,
  .watch-board,
  .method-board,
  .reason-stack,
  .why-equation,
  .log-day {
    grid-template-columns: 1fr;
  }

  .page-intro {
    gap: 8px;
  }

  .sheet-layout,
  .evidence-board,
  .watch-board {
    gap: 18px;
  }

  .plan-rule-grid {
    grid-template-columns: 1fr;
  }

  .alternative-grid,
  .trigger-grid,
  .day-detail-grid {
    grid-template-columns: 1fr;
  }

  .today-workbench {
    grid-template-columns: 1fr;
  }

  .why-equation strong {
    grid-column: auto;
  }

  .ledger-strip {
    grid-template-columns: 1fr;
  }

  .log-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .log-actions {
    justify-content: stretch;
  }

  .log-actions button {
    flex: 1 1 96px;
  }

  .watch-summary {
    grid-template-columns: 1fr;
  }

  .metric-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawn-chart .annotation,
  .drawn-chart .annotation-line {
    display: none;
  }

  .drawn-chart .chart-title {
    font-size: 18px;
  }

  .drawn-chart .chart-subtitle {
    display: none;
  }

  .drawn-chart .axis-label,
  .drawn-chart .period-label,
  .drawn-chart .tick-label {
    font-size: 13px;
  }

  .drawn-chart .line {
    stroke-width: 5;
  }

  .reason-stack article {
    grid-template-columns: 32px 1fr;
  }

  .watch-list article {
    grid-template-columns: 36px 1fr;
  }

  .watch-list p {
    grid-column: 2;
  }

  .side-note {
    gap: 10px;
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px dashed rgba(77, 73, 65, 0.14);
  }

  .chart-read {
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px dashed rgba(77, 73, 65, 0.14);
  }

  .schedule-character img,
  .evidence-character,
  .method-character,
  .sleep-character img {
    width: min(100%, 250px);
  }

  .log-day li {
    display: grid;
    gap: 2px;
  }
}

@media (min-width: 980px) {
  .sleep-plan-card.is-today {
    max-width: 1120px;
  }

  .today-workbench {
    grid-template-columns: minmax(0, 0.64fr) minmax(330px, 0.36fr);
    align-items: start;
  }

  .today-map {
    padding-top: 20px;
  }

  .today-map .plan-note {
    grid-template-columns: 58px 1fr;
    margin-top: 0;
  }

  .today-map .plan-note p {
    font-size: 17px;
  }

  .today-timeline-strip .day-timeline text {
    font-size: 13px;
  }

  .appendix-page {
    max-width: 1120px;
  }

  .appendix-page .log-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
  }

  .appendix-page .log-day {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .folio-shell {
    width: min(100% - 16px, 420px);
  }

  .rhythm-row {
    grid-template-columns: 42px 15px minmax(82px, 112px) minmax(0, 1fr);
    gap: 7px;
  }

  .rhythm-path::before {
    left: 61px;
  }

  .activity-icon {
    width: 40px;
    height: 40px;
  }

  .activity-icon .drawn-icon {
    width: 22px;
    height: 22px;
  }

  .rhythm-row strong {
    min-height: 48px;
    font-size: clamp(28px, 8.8vw, 38px);
  }

  .rhythm-row span {
    font-size: 15px;
  }

}
