/* The day: the explanation on the left, the phone pinned on the right, the sky behind both
   (story.js moves the sun and the colors). Then the phone's screens, drawn at the app's 390 by 844
   points with its tokens (DesignTokens.swift) and scaled to the phone. */

.story { position: relative; background: #FAFAF8; }
/* The sky stays behind the day only: a track the story's own size, the sky pinned inside it. */
.sky-track { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sky { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; }
.sky .l { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.sky .dawn { opacity: 1; background: linear-gradient(to bottom, #FAFAF8 0%, #FAF6F0 55%, #F7E7D6 100%); }
.sky .noon { background: linear-gradient(to bottom, #F7F7F4 0%, #FAFAF8 60%, #F1EFE9 100%); }
.sky .sunset { background: linear-gradient(to bottom, #F3E6DD 0%, #F2D2BC 55%, #EDB08C 100%); }
.sky .dusk { background: linear-gradient(to bottom, #15141B 0%, #241D29 60%, #4A3238 100%); }
.sky .night { background: linear-gradient(to bottom, #060607 0%, #0A0A0A 55%, #0A0A0A 100%); }
.sky .stars {
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #EDEDEB 50%, transparent 52%), radial-gradient(1px 1px at 22% 42%, #EDEDEB 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 35% 12%, #EDEDEB 50%, transparent 52%), radial-gradient(1px 1px at 48% 30%, #EDEDEB 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 58% 9%, #EDEDEB 50%, transparent 52%), radial-gradient(1px 1px at 66% 36%, #EDEDEB 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 78% 16%, #EDEDEB 50%, transparent 52%), radial-gradient(1px 1px at 88% 44%, #EDEDEB 50%, transparent 52%),
    radial-gradient(1px 1px at 6% 62%, #EDEDEB 50%, transparent 52%), radial-gradient(1.2px 1.2px at 30% 70%, #EDEDEB 50%, transparent 52%),
    radial-gradient(1px 1px at 52% 58%, #EDEDEB 50%, transparent 52%), radial-gradient(1.2px 1.2px at 94% 66%, #EDEDEB 50%, transparent 52%),
    radial-gradient(1px 1px at 72% 74%, #EDEDEB 50%, transparent 52%), radial-gradient(1px 1px at 16% 86%, #EDEDEB 50%, transparent 52%);
}
.sun { position: absolute; left: 0; top: 0; width: 56vmin; height: 56vmin; margin: -28vmin 0 0 -28vmin; border-radius: 50%; will-change: transform, opacity;
  background: radial-gradient(circle, rgba(255, 248, 234, 0.9) 0 9%, rgba(255, 220, 172, 0.42) 18%, rgba(255, 204, 150, 0.16) 38%, rgba(255, 196, 146, 0) 70%); }

.story-head { position: relative; z-index: 1; padding-top: clamp(80px, 10vw, 140px); }
.story-head h2 { max-width: 18ch; }
.goal-chip { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; padding: 10px 16px 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--hairline); font-size: 1.0625rem; font-weight: 500; }
.goal-chip span { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--tertiary); padding: 3px 7px; border-radius: 5px; background: rgba(10, 10, 10, 0.05); }

.story-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 40px; }
.step { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: 12vh; opacity: 0.22; transition: opacity 320ms ease, color 320ms ease; }
.step.on { opacity: 1; }
.step .stamp { font-family: var(--mono); font-weight: 500; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tertiary); margin: 0 0 22px; display: flex; gap: 0 0.75em; flex-wrap: wrap; }
.step .stamp b { color: var(--text); font-weight: 500; }
.step h3 { font-size: clamp(2.25rem, 4.4vw, 3.75rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 13ch; }
.step p.copy { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--secondary); max-width: 30em; margin: 22px 0 0; text-wrap: pretty; }
.step p.copy b { color: var(--text); font-weight: 500; }
.step.night { --text: #EDEDEB; --secondary: #A3A3A3; --tertiary: #8A8A8A; color: var(--text); }
.step .mini { display: none; }

.device-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center; }
.phone { --pw: min(340px, calc((100svh - 120px) * 390 / 844 * 0.95)); position: relative; width: var(--pw); border-radius: calc(var(--pw) * 0.155); background: linear-gradient(145deg, #2C2C30, #0E0E10 40%, #1E1E22); padding: calc(var(--pw) * 0.028);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 40px 90px -30px rgba(20, 16, 40, 0.45), 0 18px 40px -20px rgba(0, 0, 0, 0.35); }
.phone .screen { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: calc(var(--pw) * 0.128); overflow: hidden; background: #0A0A0A; isolation: isolate; }
.phone .island { position: absolute; z-index: 30; top: calc(var(--pw) * 0.03); left: 50%; width: 32%; height: 4.6%; transform: translateX(-50%); border-radius: 99px; background: #000; }
.scr { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform: scale(var(--s, 0.8)); transform-origin: 0 0; overflow: hidden; opacity: 0; transition: opacity 220ms ease; font-family: var(--sans); -webkit-font-smoothing: antialiased; }
.scr.on { opacity: 1; z-index: 2; }
.scr.instant { transition: none; }

/* The app's two palettes. */
.scr.day { --b: #FAFAF8; --r: #FFFFFF; --o: #F2F2EF; --h: #E6E6E2; --t: #0A0A0A; --s2: #5C5C5C; --t3: #6E6E6E; --g: #8A8A8A; --ink: #0A0A0A; --onink: #FFFFFF; --acc: #5F52D6; --bo: #8A8A8A; --bm: #867CDE; --f: #E8E8E4; }
.scr.night { --b: #0A0A0A; --r: #111111; --o: #181818; --h: #222222; --t: #EDEDEB; --s2: #9A9A9A; --t3: #818181; --g: #6E6E6E; --ink: #EDEDEB; --onink: #0A0A0A; --acc: #B8B2F7; --bo: #6E6E6E; --bm: #656284; --f: #232323; }
.scr { background: var(--b); color: var(--t); }
.scr .mono, .scr .sb-t { font-family: var(--mono); font-weight: 500; }
.scr small { font-size: 0.78em; margin-left: 2px; }

.sb { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 36px 0 44px; z-index: 5; color: var(--t); }
.sb.light { color: #FFFFFF; }
.sb-t { font-size: 17px; font-family: var(--sans) !important; font-weight: 600 !important; letter-spacing: -0.01em; }
.sb-i { display: flex; gap: 6px; align-items: center; }
.sb-i svg { display: block; height: 12px; width: auto; fill: currentColor; }
.home-ind { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--t); opacity: 0.9; z-index: 6; }

.pad { position: absolute; top: 62px; left: 16px; right: 16px; bottom: 0; }
.kicker { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; color: var(--t3); margin: 8px 0 0; text-transform: uppercase; }
.caps { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); margin: 22px 0 6px; }
.caps em { font-style: normal; letter-spacing: 0; text-transform: none; font-size: 12px; }
.title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 14px 0 6px; }
.title.big { font-size: 22px; margin-top: 10px; display: flex; justify-content: space-between; }
.sub2 { font-size: 15px; color: var(--s2); margin: 6px 0 0; }
.sub3 { font-size: 13px; line-height: 18px; color: var(--s2); margin: 0; }
.module { background: var(--r); border: 1px solid var(--h); border-radius: 12px; padding: 14px 15px 12px; margin-top: 16px; }
.barwrap { margin-top: 14px; }
.barwrap.tight { margin-top: 18px; }
.bar { display: block; overflow: visible; }
.bar .trk { fill: var(--r); stroke: var(--h); stroke-width: 1; }
.bar .elapsed { fill: var(--o); }
.bar .b-open { fill: var(--bo); }
.bar .b-main { fill: var(--bm); }
.bar .b-done { fill: var(--ink); }
.bar .b-maindone { fill: var(--acc); }
.bar .b-ghost { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.bar .b-hatch-bg { fill: var(--r); }
.bar .b-hatch { stroke: var(--g); stroke-width: 1.5; }
.bar .mark { fill: var(--t); }
.bar .tick { fill: var(--g); }
.bar .lbl { font-family: var(--mono); font-weight: 500; font-size: 11px; fill: var(--t3); }
.bar .needle, .bar .flag { fill: var(--ink); }
.bar .flag-t { font-family: var(--mono); font-weight: 500; font-size: 11px; fill: var(--onink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; border-top: 1px solid var(--h); }
.stats div { padding: 10px 0 0; border-left: 1px solid var(--h); padding-left: 10px; }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats span { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); font-weight: 500; }
.stats b { display: block; font-family: var(--mono); font-weight: 500; font-size: 15px; margin-top: 4px; }
.list { border-top: 1px solid var(--h); }
.sched { display: grid; grid-template-columns: 22px 74px 1fr auto; align-items: baseline; padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--h); }
.sched .si, .sched .st, .sched .sd { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--t3); }
.sched .si { color: var(--acc); }
.sched .sn { color: var(--s2); }
.sched .sn.strong { color: var(--t); }
.pin-bottom { position: absolute; left: 16px; right: 16px; bottom: 30px; }
.pin-bottom.row2 { display: grid; grid-template-columns: 0.42fr 1fr; gap: 10px; align-items: center; }
.hold { position: relative; height: 50px; border-radius: 12px; background: #EDEDEB; color: #0A0A0A; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; overflow: hidden; font-size: 15px; font-weight: 600; }
.hold.light { background: #EDEDEB; }
.hold-fill { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.12); transform: scaleX(0); transform-origin: left; }
.scr.play .hold-fill { animation: hold 1.1s cubic-bezier(0.45, 0, 0.55, 1) 0.35s forwards; }
@keyframes hold { to { transform: scaleX(1); } }
.hold-l { position: relative; display: flex; align-items: center; gap: 10px; }
.hold .mono { position: relative; font-size: 13px; }
.bars { width: 12px; height: 12px; background: linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px, currentColor 5px 7px, transparent 7px 10px, currentColor 10px 12px); opacity: 0.8; }
.foot-note { text-align: center; font-size: 12px; color: var(--t3); margin: 12px 0 0; }
.win-t { font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -0.03em; margin: 34px 0 0; }
.ink-btn { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 12px; background: var(--ink); color: var(--onink); font-size: 15px; font-weight: 600; }
.ghost-btn { display: flex; align-items: center; justify-content: center; height: 50px; font-size: 15px; font-weight: 500; color: var(--t); }
.ghost-btn.boxed { border: 1px solid var(--h); border-radius: 12px; background: var(--r); }

.progress { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--h); }
.progress i.on { background: var(--t); }
.progress span { font-size: 11px; letter-spacing: 0.08em; color: var(--t3); font-weight: 500; margin-left: 6px; }
.progress .x { font-size: 20px; letter-spacing: 0; margin-left: 10px; }
.meta { display: flex; justify-content: space-between; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--t3); margin-top: 6px; }
.q { font-size: 24px; line-height: 29px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.answer { font-size: 17px; line-height: 24px; margin: 14px 0 0; min-height: 48px; }
.caret { display: inline-block; width: 2px; height: 20px; background: var(--acc); vertical-align: -4px; margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.hintline { font-size: 12px; color: var(--t3); margin: 40px 0 0; }

.prow { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--h); }
.prow .idx { font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--acc); }
.prow .pt b { display: block; font-size: 15px; font-weight: 500; }
.prow .pt em { display: flex; align-items: center; gap: 4px; font-style: normal; font-size: 12px; color: var(--t3); margin-top: 2px; }
.link { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.prow .pr { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--s2); }
.scr.play .fresh, .scr.play .bar [style*="--i"] { animation: rise 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 110ms + 200ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.toclose { font-size: 20px; color: var(--s2); margin: 2px 0 0; }
.toclose .mono { font-family: var(--sans) !important; font-weight: 500; font-size: 34px; letter-spacing: -0.03em; color: var(--t); margin-right: 6px; }
.goalline { position: relative; margin-top: 10px; font-size: 14px; }
.goalline .cap, .nowrow .cap { font-size: 11px; letter-spacing: 0.08em; color: var(--t3); font-weight: 500; }
.goalline em { display: block; font-style: normal; font-size: 12px; color: var(--t3); margin-top: 2px; }
.goalline .dots { position: absolute; right: 0; top: 8px; display: flex; gap: 2px; }
.goalline .dots i { width: 6px; height: 6px; border-radius: 1px; background: var(--f); }
.goalline .dots i:first-child { background: var(--t); }
.nowrow { display: flex; align-items: baseline; gap: 8px; font-size: 14px; padding: 10px 0 9px; border-bottom: 1px solid var(--h); margin-top: 4px; }
.nowrow .r { margin-left: auto; font-size: 12px; color: var(--s2); }
.readout { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; }
.readout div { padding: 9px 0 0 10px; border-left: 1px solid var(--h); }
.readout div:first-child { border-left: 0; padding-left: 0; }
.readout span { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); font-weight: 500; }
.readout b { display: block; font-family: var(--mono); font-weight: 500; font-size: 15px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout b em { font-family: var(--sans); font-style: normal; font-size: 12px; color: var(--s2); font-weight: 400; }
.trow { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--h); }
.trow.rest { grid-template-columns: 30px 72px 1fr auto; }
.chk { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--g); display: flex; align-items: center; justify-content: center; }
.chk.done { background: var(--ink); border-color: var(--ink); }
.chk svg { width: 12px; height: 12px; fill: none; stroke: var(--onink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tt b { display: block; font-size: 15px; font-weight: 500; }
.tt em { display: block; font-style: normal; font-size: 12px; color: var(--t3); margin-top: 2px; }
.tt .idx { font-style: normal; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--acc); }
.tr, .tm, .td { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--s2); }
.tn { font-size: 15px; }
.td { color: var(--t3); }
.nowrule { position: relative; height: 14px; margin: 4px 0; }
.nowrule::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1.5px; background: var(--ink); }
.nowrule span { position: relative; z-index: 1; display: inline-block; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--onink); background: var(--ink); border-radius: 4px; padding: 0 5px; line-height: 14px; }
.conflict { margin-top: 16px; padding: 14px 14px 12px; border-radius: 12px; background: var(--r); border: 1px solid var(--h); }
.conflict p { font-size: 14px; font-weight: 600; margin: 0 0 12px; line-height: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip2 { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--h); background: var(--o); font-size: 13px; font-weight: 600; }
.chip2.ghost { background: none; border-color: transparent; color: var(--s2); }
.scr.play .chip2.shift { animation: press 360ms ease 1.3s both; }
@keyframes press { 40% { transform: scale(0.96); background: var(--h); } }

.tabbar { position: absolute; left: 14px; right: 14px; bottom: 26px; display: flex; gap: 10px; align-items: center; z-index: 4; }
.tabs { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); height: 62px; border-radius: 31px; background: color-mix(in srgb, var(--r) 86%, transparent); border: 1px solid var(--h); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.25); padding: 4px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 27px; color: var(--t); }
.tab.on { background: var(--o); }
.tab svg, .plus svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab b { font-size: 10px; font-weight: 500; }
.plus { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--r) 86%, transparent); border: 1px solid var(--h); color: var(--t); }

/* The shield (ShieldDesign): black, the index in lavender, the block, its end and the if-then. */
.shield-s { position: absolute; inset: 0; background: #000; color: #FFFFFF; display: flex; flex-direction: column; justify-content: space-between; padding: 0 22px 46px; }
.sh-top { margin-top: 250px; text-align: center; }
.sh-dot { display: block; width: 5px; height: 5px; border-radius: 1px; background: #B8B2F7; margin: 0 auto 8px; }
.sh-idx { font-family: var(--mono); font-weight: 500; font-size: 26px; color: #B8B2F7; }
.shield-s h4 { font-size: 24px; line-height: 29px; font-weight: 600; letter-spacing: -0.02em; margin: 16px 0 10px; }
.shield-s p { font-size: 15px; line-height: 21px; color: #A3A3A3; margin: 0 10px; }
.sh-btn { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 14px; background: #EDEDEB; color: #0A0A0A; font-weight: 600; font-size: 16px; }
.sh-break { display: block; text-align: center; color: #A3A3A3; font-size: 15px; margin-top: 18px; }

/* The Calendar's year. */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); padding: 3px; border-radius: 10px; background: var(--o); margin-top: 12px; }
.seg.two { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.seg span { text-align: center; font-size: 13px; padding: 6px 0; border-radius: 8px; color: var(--s2); }
.seg span.on { background: var(--r); color: var(--t); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.yspan { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 500; margin: 16px 6px 0; }
.yspan i { font-style: normal; color: var(--s2); font-size: 22px; }
.yr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; padding: 12px 10px; }
.mt b { display: block; font-size: 12px; font-weight: 600; }
.mt em { display: block; font-style: normal; font-size: 11.5px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 16px; }
.mt em.focus { color: var(--acc); }
.cells { display: grid; grid-template-columns: repeat(7, 12px); gap: 2px; margin-top: 6px; }
.cells i { width: 12px; height: 12px; border-radius: 2px; background: var(--f); }
.cells i.blank { background: none; }
.cells i.kept { background: var(--ink); }
.cells i.plan { background: var(--bo); opacity: 0.55; }
.cells i.today { background: none; box-shadow: 0 0 0 1.5px var(--acc) inset; }
.cells i.mile { background: var(--acc); }

/* Insights. */
.insight { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -0.02em; margin: 6px 0 0; }
.based { font-size: 12px; color: var(--t3); margin: 10px 0 0; }
.ins-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.ins-head .mono { font-size: 11.5px; color: var(--s2); }
.effort { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 110px; align-items: end; margin-top: 14px; border-bottom: 1px solid var(--h); }
.wk { position: relative; height: 100%; }
.wk i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 3px 3px 0 0; }
.wk .plan { background: var(--f); }
.wk .kept { background: var(--ink); }
.wk:last-child .kept { background: var(--acc); }
.ins-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-weight: 500; font-size: 10.5px; color: var(--t3); margin-top: 6px; }

/* The close: Sign the day. */
.rows { margin-top: 16px; border-top: 1px solid var(--h); }
.rows div { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--h); font-size: 15px; color: var(--s2); }
.rows b { font-family: var(--mono); font-weight: 500; font-size: 17px; color: var(--t); }
.rows b.acc { color: var(--acc); }
.rows b small { font-size: 12px; color: var(--t3); margin-left: 4px; }
.pad-sign { position: relative; height: 230px; margin-top: 18px; border-radius: 12px; background: var(--r); border: 1px solid var(--h); }
.pad-sign svg { position: absolute; left: 20px; right: 20px; bottom: 54px; width: calc(100% - 40px); }
.pad-sign .sig-line { stroke: var(--g); stroke-width: 1; }
.pad-sign .sig { fill: none; stroke: var(--t); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 0; }
.scr.play .pad-sign .sig { animation: sign 1.6s cubic-bezier(0.45, 0, 0.55, 1) 0.9s both; }
@keyframes sign { from { stroke-dashoffset: 900; } }
.pad-sign .clear { position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--t3); }
.pad-sign .x2 { position: absolute; left: 18px; bottom: 44px; color: var(--s2); font-size: 14px; }
.pad-sign .with { position: absolute; left: 20px; bottom: 16px; font-size: 13px; color: var(--t3); }
.scr.play .hold.light .hold-fill { animation-delay: 2.6s; }

/* Templates, over Today. */
.dim { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.28); z-index: 7; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 430px; z-index: 8; background: var(--r); border-radius: 22px 22px 0 0; padding: 10px 18px 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18); }
.scr.play .sheet { animation: sheet 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scr.play .dim { animation: fade 300ms ease both; }
@keyframes sheet { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--h); margin: 0 auto 14px; }
.sheet-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sheet-h b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.sheet-h span { font-size: 22px; color: var(--s2); }
.tlist { margin-top: 16px; border-top: 1px solid var(--h); }
.trow2 { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--h); }
.trow2 b { display: block; font-size: 15px; font-weight: 500; }
.trow2 em { display: block; font-style: normal; font-size: 12px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.trow2 .mono { font-size: 12px; color: var(--s2); }
.trow2 i { font-style: normal; color: var(--t3); font-size: 20px; }
.chip2.new { margin-top: 16px; }

/* Record. */
.tune { width: 18px; height: 14px; margin-top: 6px; background: linear-gradient(var(--t) 0 0) 0 2px / 100% 1.5px no-repeat, linear-gradient(var(--t) 0 0) 0 10px / 100% 1.5px no-repeat; opacity: 0.7; }
.hrs { display: flex; justify-content: space-between; font-family: var(--mono); font-weight: 500; font-size: 10.5px; color: var(--t3); margin: 2px 0 6px; }
.stack { display: grid; gap: 3px; }
.dr { position: relative; height: 5px; }
.dr i { position: absolute; top: 0; bottom: 0; border-radius: 1.5px; background: var(--ink); opacity: 0.85; }
.dr i.m { background: var(--acc); opacity: 1; }
.dr i.br { background: none; box-shadow: 0 0 0 1px var(--g) inset; }
.dr:first-child i { opacity: 1; }
.stack-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--t3); margin-top: 10px; font-family: var(--mono); font-weight: 500; }
.page1 .promise { font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: -0.015em; margin: 8px 0 6px; }
.page1 .pbody { font-size: 13px; line-height: 18px; color: var(--s2); margin: 0 0 12px; }
.page1 .signed { border-top: 1px solid var(--h); padding-top: 10px; font-size: 14px; }
.page1 .signed span { display: block; font-size: 11px; letter-spacing: 0.08em; color: var(--t3); font-weight: 500; margin-bottom: 3px; }

/* The moments between night and day (MomentOverlay.swift): columns on the bar's hour grid. */
.cols { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.cols i { position: absolute; top: 0; bottom: 0; background: #0A0A0A; transform: scaleY(0); transform-origin: top; will-change: transform; }
.cols.cover i { transform: scaleY(1); }
.cols.fall i { transition: transform 380ms cubic-bezier(0.45, 0, 0.55, 1); transform: scaleY(1); }
.cols.lift i { transition: transform 380ms cubic-bezier(0.76, 0, 0.24, 1); transform: scaleY(0); }

/* Phone-width screens: the phone on top, the words scrolling under it. */
@media (max-width: 900px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .device-col { order: -1; position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 2; height: 58svh; margin-bottom: -6svh; pointer-events: none; }
  .device-pin { position: static; height: 100%; align-items: flex-start; padding-top: 8px; }
  .phone { --pw: min(250px, calc((56svh - 16px) * 390 / 844)); }
  .step { min-height: 60svh; justify-content: flex-start; padding-block: 0; }
  .steps { padding-bottom: 30svh; }
  .step h3 { font-size: 2rem; }
  .step p.copy { font-size: 1rem; margin-top: 12px; }
  .step .stamp { margin-bottom: 12px; }
  .step:not(.on) { opacity: 0; }
}

/* Reduce Motion: no sun, no pinning; each step with its own phone, still. */
@media (prefers-reduced-motion: reduce) {
  .sky-track, .device-col { display: none; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story { background: #FAFAF8; }
  .story .night-band { background: #0A0A0A; }
  .step, .step:not(.on) { min-height: 0; opacity: 1; padding-block: 56px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
  .steps { padding-bottom: 0; }
  .step .mini { display: block; }
  .step .mini .phone { --pw: 240px; }
  .step.night { background: #0A0A0A; box-shadow: 0 0 0 100vmax #0A0A0A; clip-path: inset(0 -100vmax); }
  .scr { transition: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 700px) {
  .step, .step:not(.on) { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 44px; }
  .step .mini { justify-self: center; }
}
