/* Field Launcher site. Look: "Spine". Tokens are the app's own values from Spine.kt. */

@font-face { font-family: 'Space Grotesk'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/space-grotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/space-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/space-grotesk-700.woff2') format('woff2'); }

:root {
  --bone: #F2F1EC;
  --ink: #111111;
  --grey: #5E5E5A;
  --rule: #CFCEC8;
  --placeholder: #8A8983;
  --accent: #FF4B1F;
  --body: #111111;
  --body-edge: #2a2a2a;

  --font: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --line-x: 50%;             /* where the spine sits */
  --mark-w: 8px;
  --edge: clamp(20px, 2.8vw, 48px);   /* outer margin */
  --gut: clamp(24px, 2.6vw, 48px);    /* space between the line and the content */
  --top: clamp(76px, 10vh, 104px);
  --dfs: min(26vw, 43vh);              /* big split clock (Weather behind) */
  --sections: 7;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bone); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-weight: 400; font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip; background: var(--bone);
}
h1, h2, h3, p { margin: 0; font-weight: inherit; }
ol, ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 0; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bone); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bone); padding: 10px 14px; }
.skip:focus { top: 12px; }

/* Type enters by mask. */
.mask { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.mask > * { display: block; }

/* The app's label: uppercase 12px, letter-spacing 1.7px, grey. */
.lbl { font-size: 12px; font-weight: 500; letter-spacing: 1.7px; text-transform: uppercase; color: var(--grey); line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint { height: 44px; border-top: 1.5px solid var(--ink); display: flex; align-items: center; color: var(--grey); font-size: 14px; white-space: nowrap; overflow: hidden; }
.hint > span { overflow: hidden; text-overflow: ellipsis; }
.adot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* ---- Chrome ------------------------------------------------------------------------ */

.chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--edge); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; pointer-events: none;
  transition: color 200ms;
}
.chrome a { pointer-events: auto; padding: 6px 0; }
html.night .chrome { color: var(--bone); }
html.line-top .spine { z-index: 3; }

.spine { position: fixed; top: 0; bottom: 0; left: calc(var(--line-x) - 1px); width: 2px; z-index: 1; pointer-events: none; }
.spine-line { position: absolute; inset: 0; background: var(--accent); transform-origin: 50% 0; }
.spine-mark { position: absolute; top: 0; left: calc((2px - var(--mark-w)) / 2); width: var(--mark-w); height: calc(100% / var(--sections)); background: var(--accent); }
.spine-hold {
  position: fixed; top: 0; bottom: 0; left: calc(var(--line-x) - 24px); width: 48px; z-index: 30; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: pan-y;
}
.spine-hold:focus-visible { outline-offset: -2px; }
.spine-tip {
  position: fixed; left: calc(var(--line-x) + 16px); top: 0; z-index: 31; font-size: 14px; color: var(--grey); pointer-events: none;
  opacity: 0; transition: opacity 200ms; background: var(--bone); padding: 2px 6px;
}
.spine-tip.on { opacity: 1; }
.picker {
  position: fixed; left: calc(var(--line-x) + 14px); top: 120px; z-index: 60; background: var(--bone);
  border: 1px solid var(--rule); border-top: 1.5px solid var(--ink); padding: 4px 6px 4px 16px;
}
.picker[hidden] { display: none; }
.picker-row { display: flex; align-items: center; gap: 10px; height: 52px; }
.picker-name { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.swatches { display: inline-flex; }
.swatch { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.swatch i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid transparent; }
.swatch i::after { content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--c); }
.swatch[aria-pressed="true"] i { border-color: var(--ink); }
.swatch:focus-visible { outline-offset: -2px; }

/* Load sequence: hidden until the intro raises it (removed by a failsafe if scripts fail). */
html.intro .spine-line { transform: scaleY(0); }
html.intro .s-hero .mask > span { transform: translateY(105%); }
html.intro .h-btn, html.intro .h-scroll { opacity: 0; }

/* ---- Hero -------------------------------------------------------------------------- */

.s-hero { position: relative; z-index: 2; }
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; padding-top: var(--h-top, 16vh); overflow: hidden; }
.h-head { display: grid; grid-template-columns: 1fr 1fr; font-size: min(8.4vw, 20vh); font-weight: 500; line-height: 0.95; letter-spacing: -0.04em; color: var(--ink); }
.h-head .mask { padding-bottom: 0.12em; margin-bottom: -0.12em; }
.h-l, .h-r { display: block; min-width: 0; white-space: nowrap; }
.h-l { text-align: right; padding: 0 var(--gut) 0 var(--edge); }
.h-r { text-align: left; padding: 0 var(--edge) 0 var(--gut); }
.h-ink { display: inline-block; }
.h-row { display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--h-gap, 3.5vh); align-items: start; }
.h-sub { padding: 0 var(--gut) 0 var(--edge); display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.h-lead .mask { max-width: 14em; font-size: clamp(20px, 1.7vw, 28px); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.h-body .mask { max-width: 30em; font-size: clamp(17px, 1.2vw, 18px); line-height: 1.5; color: var(--grey); }
.caret { display: none; }
html.motion .caret { display: block; position: absolute; left: 0; top: 0; width: 2px; height: 1.2em; background: var(--accent); animation: caret 1.06s steps(1) infinite; }
html.motion .caret.typing { animation: none; }
@keyframes caret { 50% { opacity: 0; } }
.h-desc { padding: 0 var(--edge) 0 var(--gut); display: flex; flex-direction: column; align-items: flex-start; }
.btn-mask { margin-top: 22px; padding: 5px; margin-left: -5px; margin-bottom: -5px; }
.btn { display: inline-flex; align-items: center; padding: 14px 22px; background: var(--ink); color: var(--bone); font-size: 16px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; border-radius: 0; }
.btn:hover, .btn:focus-visible { text-decoration: none; outline: 2px solid var(--accent); outline-offset: 3px; }
.h-scroll { position: absolute; left: var(--edge); bottom: 20px; font-size: 14px; color: var(--grey); white-space: nowrap; }
.h-scroll.off { visibility: hidden; }
.h-phone { display: none; }
@media (min-width: 760px) and (max-height: 700px) { :root { --h-top: 13vh; --h-gap: 2.6vh; } .btn-mask { margin-top: 14px; } }

/* Static hero (reduced motion, or the stage is not used): the phone sits under the words. */
html.js:not(.motion) .hero { height: auto; min-height: 0; overflow: visible; padding-bottom: 8vh; }
html.js:not(.motion) .h-phone { display: flex; justify-content: center; margin-top: 7vh; }
html.js:not(.motion) .h-scroll, html.no-js .h-scroll { display: none; }
html.no-js .hero { height: auto; min-height: 0; padding-bottom: 12vh; }

/* The Home pane pieces, at the app's sizes, inside the scaled screens. */
.dg.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.home-r { display: flex; flex-direction: column; gap: 6px; }
.ag, .ca { position: relative; overflow: hidden; }
.ag { height: 132px; }
.ca { height: 230px; display: none; }
.ag-set { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.ag-set, .ca-set { position: absolute; inset: 0 0 auto 0; }
.ag-col { min-width: 0; }
.word { height: var(--wh); display: flex; align-items: center; font-size: var(--ws); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; min-width: 0; line-height: 1.2; }
.word > span { overflow: hidden; text-overflow: ellipsis; }
.ms { position: relative; width: 180px; height: 48px; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.ms-track { position: absolute; left: 30px; width: 120px; top: 12.25px; height: 1.5px; background: var(--rule); }
.ms-stop { position: absolute; top: 10.5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--grey); }
.ms-dot { position: absolute; top: 7px; left: 24px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); transform: translateX(var(--at, 60px)); }
.ms-dot.settle { transition: transform 180ms cubic-bezier(.2, .7, .2, 1); }
.ms-name { position: absolute; bottom: 0; width: 60px; height: 48px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: 1.7px; text-transform: uppercase; color: var(--grey); line-height: 16px; }
.ms-name[data-mode="Work"] { left: 0; }
.ms-name[data-mode="Home"] { left: 60px; }
.ms-name[data-mode="Out"] { left: 120px; }
.ms-name.on { color: var(--ink); }
.ms-live { cursor: grab; }
.ms-live .ms-name:focus-visible { outline-offset: -4px; }
.write { display: flex; align-items: center; gap: 12px; height: 44px; border-top: 1.5px solid var(--ink); font-size: 15px; color: var(--grey); min-width: 0; }
.write-ph { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Screens (inside a scaled .scr; px are the app's dp) ---------------------------- */

.fit { position: relative; }
.scr {
  position: relative; width: var(--ow); height: var(--oh); background: var(--bone); color: var(--ink); overflow: hidden; text-align: left;
  font-family: var(--font); font-size: 14px; line-height: 1.25; transform-origin: 0 0;
}
.scr.cover { width: var(--cw); height: var(--ch); }
.scr .pane { position: absolute; top: 0; bottom: 0; width: var(--pw); display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(20px + var(--it)) 36px calc(16px + var(--ib)) 32px; }
.scr .pane.l { left: 0; }
.scr .pane.r { left: var(--pw); padding-left: 36px; padding-right: 32px; }
.pagewrap > .pane.r { left: var(--pw); }
.scr .col { display: flex; flex-direction: column; }
.g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; } .g12 { gap: 12px; }
.pb10 { padding-bottom: 10px; } .pb6 { padding-bottom: 6px; }
.dg { font-size: var(--fs); font-weight: 700; line-height: 1; letter-spacing: -0.05em; white-space: nowrap; height: 1em; }
.dg.tight { height: 0.8em; display: flex; flex-direction: column; justify-content: center; }
.dg.tight > .dg-t { display: block; line-height: 1; }
.dg.outline .dg-t { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.colon { color: var(--accent); }
.scr .next { font-size: 14px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda { display: flex; flex-direction: column; }
.ag-row { height: 44px; border-top: 1px solid var(--rule); display: flex; align-items: center; }
.ag-time { width: 56px; flex: none; font-size: 13px; color: var(--grey); }
.ag-title { font-size: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpane { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: calc(24px + var(--it)) 28px calc(20px + var(--ib)) 28px; }
.scr .ca { display: block; }
.scr .ag { display: block; }
.sl { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.sl-line { position: absolute; left: calc(var(--pw) - 1px / var(--z, 1)); top: 0; bottom: 0; width: calc(2px / var(--z, 1)); background: var(--accent); }
.sl-mark { position: absolute; left: calc(var(--pw) - 4px); top: 0; width: 8px; background: var(--accent); }
.ce { position: absolute; inset: 0 auto 0 0; width: 6px; pointer-events: none; z-index: 5; }
.ce-line { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.ce-mark { position: absolute; left: 0; top: 0; width: 6px; background: var(--accent); }
.stats { display: flex; gap: 12px; border-top: 1.5px solid var(--ink); padding-top: 14px; }
.stat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-v { font-size: var(--ss, 26px); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; line-height: 1.15; }
.stat-n { font-size: 11px; font-weight: 500; letter-spacing: 1.3px; text-transform: uppercase; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 14px; }
.detail { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 0; min-height: 0; }
.kv { height: 44px; border-top: 1px solid var(--rule); display: flex; align-items: center; }
.kv-k { flex: 1; min-width: 0; font-size: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-v { padding-left: 12px; font-size: 14px; color: var(--grey); white-space: nowrap; }
.task { display: flex; align-items: center; width: 100%; height: 44px; border-top: 1px solid var(--rule); font-size: 20px; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task.done { color: var(--grey); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.choices { display: flex; }
.choice { flex: 1; height: 52px; display: flex; align-items: center; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; color: var(--grey); text-align: left; }
.choice.on { color: var(--ink); }
.bigword { display: flex; align-items: center; width: 100%; height: 56px; border-top: 1.5px solid var(--ink); font-size: 28px; font-weight: 500; letter-spacing: -0.02em; text-align: left; }
.nowline { height: 44px; border-top: 1.5px solid var(--ink); display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--grey); }
.wicon { flex: none; color: var(--ink); }
.day { height: 40px; border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 12px; }
.day-n { width: 54px; flex: none; font-size: 20px; font-weight: 500; }
.day-lo { width: 32px; flex: none; text-align: right; font-size: 14px; color: var(--grey); }
.day-hi { width: 32px; flex: none; font-size: 14px; }
.day-bar { position: relative; flex: 1; height: 4px; }
.day-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 1px; height: 2px; background: var(--rule); }
.day-bar i { position: absolute; top: 0; height: 4px; background: var(--ink); }
.day-bar i.today { background: var(--accent); }
.spark { display: block; overflow: visible; }
.spark-wrap { height: 70px; }
.srow { height: 44px; border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 14px; }
.srow-s { width: 70px; flex: none; font-size: 20px; font-weight: 500; }
.srow .spark { flex: 1; min-width: 0; height: 20px; width: 0; }
.srow-p { width: 62px; flex: none; text-align: right; font-size: 14px; }
.srow-m { width: 66px; flex: none; display: flex; justify-content: flex-end; }
.move { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; white-space: nowrap; }
.notefield { flex: 1; display: block; padding: 16px 0; }
.notefield textarea { width: 100%; height: 100%; resize: none; border: 0; background: transparent; padding: 0; font-size: calc(var(--pw) * 0.105); font-weight: 700; line-height: 1.2; letter-spacing: -0.03em; color: var(--ink); caret-color: var(--accent); outline: none; }
.notefield textarea::placeholder { color: var(--placeholder); opacity: 1; }
.notes { flex: 1; padding: 12px 0; display: flex; flex-direction: column; overflow: hidden; }
.note { border-top: 1px solid var(--rule); padding: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.note-t { font-size: 20px; font-weight: 500; line-height: 1.25; }
.note-d { font-size: 12px; color: var(--grey); }

/* Faces */
.say-wrap .say-big { font-size: calc(var(--cw) * 0.145); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; color: var(--grey); }
.say-small { font-size: calc(var(--cw) * 0.058); font-weight: 500; line-height: 1.04; letter-spacing: -0.03em; color: var(--grey); }
.say b { font-weight: inherit; color: var(--ink); }
.svg-cap { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 1.5px; fill: var(--grey); }
.charge { position: relative; font-size: var(--fs); }
.charge-fill { position: absolute; inset: 0; clip-path: inset(var(--clip, 100%) 0 0 0); }
.face-dial .dialbox { position: relative; flex: 1; display: grid; place-items: center; margin: 8px 0; }
.dial-c { position: absolute; inset: 0; display: grid; place-items: center; }
.dial-dot { transform: rotate(var(--turn)); }
.dotbox { display: flex; justify-content: center; }
.dots .d-past { fill: var(--ink); }
.dots .d-now { fill: var(--accent); }
.dots .d-busy { fill: none; stroke: var(--ink); stroke-width: 2; }
.dots .d-future { fill: none; stroke: var(--rule); stroke-width: 1.6; }
.entry { display: flex; align-items: flex-end; gap: 12px; border-top: 1px solid var(--rule); padding-top: 12px; }
.entry .lbl { flex: 0 1 auto; }
.face-sky { position: absolute; inset: 0; width: var(--cw); height: var(--ch); }
.face-upright { flex-direction: row; justify-content: flex-start; }
.up-l { position: relative; width: calc(var(--cw) * 0.42); flex: none; height: 100%; }
.up-clock { position: absolute; left: 0; bottom: 0; font-size: var(--fs); font-weight: 700; line-height: 1; letter-spacing: -0.05em; white-space: nowrap;
  transform-origin: 0 0; transform: translateY(1em) rotate(-90deg); }
.up-r { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding-left: 14px; }
.up-row { border-top: 1px solid var(--rule); padding: 10px 0 12px; }

/* ---- Device ------------------------------------------------------------------------ */
/* Laid out in the app's dp and sized with zoom, so text is rasterised at its final size. */

.dev-wrap { display: none; }
.device { position: absolute; left: 0; top: 0; width: var(--dw); height: var(--dh); }
.dev-group { position: absolute; left: calc(var(--dw) / -2); top: calc(var(--dh) / -2); width: var(--dw); height: var(--dh); perspective: 2600px; }
.dv-body { position: absolute; inset: 0; background: var(--body); border-radius: 40px; border: 2px solid var(--body-edge); }
.dv-screen { position: absolute; left: var(--bz); top: var(--bz); width: var(--ow); height: var(--oh); border-radius: 26px; overflow: hidden; background: var(--bone); }
.dv-screen > .scr { position: absolute; left: 0; top: 0; }
.strip { position: absolute; left: 0; top: 0; height: var(--oh); width: calc(var(--ow) * 8); }
.pagewrap { position: absolute; top: 0; width: var(--ow); height: var(--oh); }

/* Open, flat: two halves of body meeting at the hinge, with a small notch top and bottom. */
.pager .dv-body.l { right: 50%; border-radius: 40px 14px 14px 40px; border-right: 0; }
.pager .dv-body.r { left: 50%; border-radius: 14px 40px 40px 14px; border-left: 0; }

/* Closed, flat: half the open body, the cover screen centred in it, hinge side on the left. */
.closed { width: var(--hw); }
.closed-flat { left: var(--hw); transform-origin: 0 50%; }
.closed .dv-body { border-radius: 14px 40px 40px 14px; }
.closed .dv-screen, .dv-l .back .dv-screen { left: var(--cx); top: var(--cy); width: var(--cw); height: var(--ch); border-radius: 8px 28px 28px 8px; }

/* The fold rig: only shown while it moves. The folding half is exactly half the open body. */
.rig { transform-origin: 50% 50%; transform-style: preserve-3d; visibility: hidden; }
.rig.on { visibility: visible; }
.dv-half { position: absolute; top: 0; width: var(--hw); height: var(--dh); transform-style: preserve-3d; }
.dv-l { left: 0; transform-origin: 100% 50%; }
.dv-r { left: var(--hw); }
.dv-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.dv-l .front .dv-body { border-radius: 40px 14px 14px 40px; border-right: 0; }
.dv-r .front .dv-body { border-radius: 14px 40px 40px 14px; border-left: 0; }
.dv-l .front .dv-screen { left: var(--bz); width: var(--pw); border-radius: 26px 0 0 26px; }
.dv-r .front .dv-screen { left: 0; width: var(--pw); border-radius: 0 26px 26px 0; }
.dv-face .front .dv-screen .scr { width: var(--pw); }
.dv-face .dv-screen .pane { left: 0 !important; }
.dv-l .back { transform: rotateY(180deg) translateZ(1px); }
.dv-l .back .dv-body { border-radius: 14px 40px 40px 14px; }
.dv-shade { position: absolute; inset: 0; background: var(--ink); opacity: 0; pointer-events: none; border-radius: inherit; }
.half-line { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--accent); z-index: 6; }
.half-mark { position: absolute; top: 0; width: 4px; background: var(--accent); z-index: 6; }
.dv-l .half-line { right: 0; } .dv-l .half-mark { right: 0; }
.dv-r .half-line { left: 0; } .dv-r .half-mark { left: 0; }
.pager, .closed-flat { visibility: hidden; }
.pager.on, .closed-flat.on { visibility: visible; }
html:not(.motion) .pager, html:not(.motion) .closed { visibility: visible; }

/* ---- Unfold stage: fold + pages --------------------------------------------------- */

.unfold { position: relative; z-index: 2; }
.s-fold, .s-pages { position: relative; }
.big { font-size: clamp(26px, 2.5vw, 44px); font-weight: 500; line-height: 1.12; letter-spacing: -0.025em; }
.pages-big, .pages-say, .pages-close { display: none; }
.sample { color: var(--grey); }

/* Static layout (no JS, or reduced motion): scenes laid out in order. */
html:not(.motion) .s-fold { display: grid; grid-template-columns: 1fr 1fr; padding: 14vh 0; row-gap: 48px; }
html:not(.motion) .fold-a { grid-column: 1; padding: 0 var(--gut) 0 var(--edge); text-align: right; display: flex; justify-content: flex-end; }
html:not(.motion) .fold-b { grid-column: 2; grid-row: 2; padding: 0 var(--edge) 0 var(--gut); }
html:not(.motion) .fold-copy .big { max-width: 22ch; }
html:not(.motion) .static-devices { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: center; align-items: flex-end; gap: 6vw; }
html:not(.js) .static-devices, html:not(.js) .static-device { display: none; }
html:not(.motion) .s-pages { display: grid; grid-template-columns: 1fr 1fr; padding: 6vh 0 14vh; align-items: center; }
html:not(.motion) .page-list { grid-column: 1; grid-row: 1; padding: 0 var(--gut) 0 var(--edge); display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
html:not(.motion) .page-list li { max-width: 30rem; padding: 18px 0; border-top: 1px solid var(--rule); width: 100%; }
html:not(.motion) .page-list li:first-child { border-top: 0; }
html:not(.motion) .page-list button { font-size: clamp(26px, 2.4vw, 40px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; padding: 4px 0; color: var(--grey); }
html:not(.motion) .page-list button[aria-current="true"] { color: var(--ink); }
html:not(.js) .page-list button { color: var(--ink); cursor: default; }
html:not(.motion) .pl-say { color: var(--grey); font-size: 17px; margin-top: 6px; margin-left: auto; max-width: 40ch; }
html:not(.motion) .static-device { grid-column: 2; grid-row: 1; align-self: center; padding: 0 var(--edge) 0 var(--gut); }
html:not(.motion) .s-pages .pages-close { display: block; grid-column: 1 / -1; grid-row: 2; text-align: center; padding: 8vh var(--edge) 0; color: var(--grey); font-size: 19px; }
.static-fit { position: relative; flex: none; }
.static-fit > .device { position: absolute; }

/* Motion layout: the stage is pinned and the scenes are layers in it. */
html.motion .stage { position: relative; height: 100vh; overflow: hidden; }
html.motion .stage > .s-hero, html.motion .stage > .s-fold, html.motion .stage > .s-pages { position: absolute; inset: 0; }
html.motion .dev-wrap { display: block; position: absolute; left: 50%; top: var(--dev-y, 50%); width: 0; height: 0; z-index: 1; }
html.motion .s-fold, html.motion .s-pages { z-index: 2; pointer-events: none; }
html.motion .s-pages .page-list, html.motion .s-pages .page-list * { pointer-events: auto; }
html.motion .static-devices, html.motion .static-device { display: none; }
html.motion .fold-copy { position: absolute; top: var(--dev-y, 50%); transform: translateY(-50%); width: var(--side-w, 30vw); }
html.motion .fold-a { right: calc(50% + var(--dev-half, 260px) + var(--gut) * 1.4); text-align: right; }
html.motion .fold-b { left: calc(50% + var(--dev-half, 260px) + var(--gut) * 1.4); }
html.motion .fold-copy .big .mask > span { transform: translateY(110%); }
html.motion .fold-copy .big { font-size: clamp(22px, calc(var(--side-w, 300px) / 9.5), 44px); }
html.motion .ps-text { font-size: clamp(20px, calc(var(--side-w, 300px) / 11), 34px); }

html.motion .pages-big { display: block; position: absolute; right: calc(50% + var(--dev-half, 260px) + var(--gut) * 1.4); top: calc(var(--dev-y, 50%) - var(--dev-h, 560px) / 2 - 0.12em); text-align: right;
  font-size: clamp(30px, calc(var(--side-w, 300px) / 4.5), 96px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.pb-mask { height: 1.12em; }
.pb-roll { display: flex; flex-direction: column; }
.pb-roll span { display: block; height: 1.12em; line-height: 1.12em; white-space: nowrap; }
html.motion .page-list { position: absolute; right: calc(50% + var(--dev-half, 260px) + var(--gut) * 1.4); top: calc(var(--dev-y, 50%) + var(--dev-h, 560px) / 2); transform: translateY(-100%); text-align: right; }
html.motion .page-list button { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; padding: 6px 0; color: var(--grey); transition: color 200ms; }
html.motion .page-list button[aria-current="true"] { color: var(--ink); }
html.motion .page-list .pl-say { display: none; }
html.motion .pages-say { display: block; position: absolute; left: calc(50% + var(--dev-half, 260px) + var(--gut) * 1.4); top: var(--dev-y, 50%); transform: translateY(-50%); width: var(--side-w, 30vw); }
.ps-text { font-size: clamp(22px, 2vw, 34px); font-weight: 500; line-height: 1.18; letter-spacing: -0.02em; }
html.motion .pages-close { display: block; position: absolute; left: calc(50% + var(--dev-half, 260px) + var(--gut) * 1.4); top: calc(var(--dev-y, 50%) + var(--dev-h, 560px) / 2); transform: translateY(-100%); width: var(--side-w, 30vw);
  font-size: clamp(17px, 1.25vw, 19px); color: var(--grey); line-height: 1.5; }
html.motion .pages-close .mask > span { transform: translateY(110%); }

/* Band layout: where the columns beside the wide phone would be too narrow, the words sit in a band
   above it, either side of the line; the phone sits lower. */
html.motion [data-band] .fold-copy, html.motion [data-band] .pages-say, html.motion [data-band] .pages-close {
  top: var(--band-mid); bottom: auto; transform: translateY(-50%); width: min(38vw, 32rem); }
html.motion [data-band] .fold-a { right: calc(50% + var(--gut)); left: auto; }
html.motion [data-band] .fold-b, html.motion [data-band] .pages-say, html.motion [data-band] .pages-close { left: calc(50% + var(--gut)); right: auto; }
html.motion [data-band] .fold-copy .big { font-size: clamp(22px, 2.3vw, 38px); }
html.motion [data-band] .ps-text { font-size: clamp(20px, 1.9vw, 30px); }
html.motion [data-band] .pages-big { right: calc(50% + var(--gut)); top: calc(var(--band-mid) - 0.56em); font-size: clamp(36px, 4.6vw, 84px); }
html.motion [data-band] .page-list { display: none; }

/* ---- Clock faces ------------------------------------------------------------------- */

.s-faces { position: relative; z-index: 2; }
.faces-stage { position: relative; padding: 14vh 0 10vh; }
.faces-title { font-size: clamp(32px, 4vw, 72px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; padding: 0 var(--edge); margin-bottom: 6vh; max-width: calc(50vw - var(--gut)); text-wrap: balance; }
.faces-viewport { position: relative; }
.faces-strip { display: flex; gap: var(--fgap, 56px); }
.face-card { flex: none; display: flex; flex-direction: column; align-items: flex-start; }
.face-fit { border: 1px solid var(--rule); border-left: 0; background: var(--bone); overflow: hidden; }
.face-fit .ce-line { width: calc(2px / var(--z, 1)); }
.face-fit .scr, .face-name { will-change: opacity; }
.face-name { padding-left: 13px; margin-top: 18px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.nojs-list { padding: 0 var(--edge); font-size: 22px; font-weight: 500; }
html:not(.motion) .faces-viewport { overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--edge) 16px; scrollbar-width: thin; }
html:not(.motion) .face-card { scroll-snap-align: center; }
html.motion .faces-stage { height: 100vh; padding: 0; overflow: hidden; }
html.motion .faces-title { position: absolute; left: 0; top: var(--top); margin: 0; }
html.motion .faces-viewport { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%); }
html.motion .faces-strip { will-change: transform; }

/* ---- Weather behind ---------------------------------------------------------------- */

.s-sky { position: relative; z-index: 2; }
.sky-stage { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: transparent; color: var(--ink); transition: background-color 300ms, color 300ms; }
.sky-stage.night { background: var(--ink); color: var(--bone); }
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.sky-digits { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; pointer-events: none; }
.sky-half { display: flex; padding-bottom: 2vh; }
.sky-h { justify-content: flex-end; padding-right: var(--gut); }
.sky-m { justify-content: flex-start; padding-left: var(--gut); }
.sky-num { display: block; font-size: var(--dfs); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em; white-space: nowrap;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; transform-origin: 50% 60%; transition: transform 420ms cubic-bezier(.2, .7, .2, 1); }
.sky-num .ch { display: inline-block; }
.sky-stage.lean .sky-num { transform: skewX(-10.8deg); }
.sky-num { transform-origin: 50% 0.446em; }
.sky-title { position: absolute; left: var(--edge); top: var(--top); max-width: calc(50% - var(--edge) - var(--gut)); font-size: clamp(28px, 3vw, 52px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.06; }
.sky-kinds { position: absolute; left: var(--edge); bottom: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.sky-kinds button { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; padding: 5px 0; color: var(--grey); transition: color 200ms; }
.sky-stage.night .sky-kinds button { color: #8a8983; }
.sky-kinds button[aria-pressed="true"] { color: inherit; }
.sky-stage.night .sky-kinds button[aria-pressed="true"] { color: var(--bone); }
.sky-caption { position: absolute; right: var(--edge); bottom: 24px; height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--grey); border-top: 1.5px solid currentColor; min-width: 220px; }
.sky-caption span { color: var(--grey); }
.sky-stage.night .sky-caption { color: var(--bone); }
.sky-stage.night .sky-caption span { color: #b9b8b1; }

/* ---- Small truths ------------------------------------------------------------------ */

.s-truths { position: relative; z-index: 2; padding: 18vh 0 10vh; }
.truth { display: grid; grid-template-columns: 1fr 1fr; align-items: baseline; padding: 7vh 0; }
.truth-h { padding: 0 var(--gut) 0 var(--edge); text-align: right; font-size: clamp(36px, 4.4vw, 80px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
.truth-p { padding: 0 var(--edge) 0 var(--gut); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; color: var(--grey); max-width: calc(60ch + var(--gut) + var(--edge)); }
.truth-p p { max-width: 44ch; }
.truth-swatches { margin-top: 22px; display: flex; align-items: center; gap: 10px; height: 52px; border-top: 1px solid var(--rule); max-width: 420px; }
.truth-sw-name { flex: 1; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }

/* ---- Close ------------------------------------------------------------------------- */

.s-close { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; padding: 16vh 0 0; }
.close-clock { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-size: min(22vw, 36vh); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; white-space: nowrap; }
.cc-h { justify-self: end; display: block; }
.cc-m { justify-self: start; display: block; }
.cc-colon { color: var(--accent); display: block; margin: 0 0 0 -0.05em; transform: translateY(-0.06em); }
.close-body { display: grid; grid-template-columns: 1fr 1fr; align-items: start; padding: 9vh 0 12vh; }
.close-title { grid-column: 1; grid-row: 1 / span 3; padding: 0 var(--gut) 0 var(--edge); text-align: right; font-size: clamp(40px, 5vw, 96px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; justify-self: end; max-width: 11ch; }
.close-p { grid-column: 2; padding: 0 var(--edge) 0 var(--gut); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; color: var(--grey); max-width: calc(46ch + var(--gut)); margin-top: 0.4em; }
.notify { grid-column: 2; padding: 0 var(--edge) 0 var(--gut); margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto; max-width: calc(520px + var(--gut) + var(--edge)); }
.notify-row { display: flex; align-items: center; gap: 12px; height: 56px; border-top: 1.5px solid var(--ink); min-width: 0; }
.notify-row input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; height: 52px; font-size: 19px; color: var(--ink); caret-color: var(--accent); outline: none; border-radius: 0; }
.notify-row input::placeholder { color: var(--grey); opacity: 1; }
.notify-row:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.notify-btn { height: 56px; padding: 0 22px; background: var(--ink); color: var(--bone); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.notify-btn:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.notify-btn[disabled] { cursor: progress; }
.notify-state { grid-column: 1 / -1; min-height: 44px; display: flex; align-items: center; font-size: 15px; color: var(--grey); }
.notify-state.ok { color: var(--ink); }
.notify.done .notify-row input { color: var(--grey); }
.foot { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; padding: 28px 0 32px; font-size: 14px; color: var(--grey); line-height: 1.5; }
.foot p:first-child { padding: 0 var(--gut) 0 var(--edge); text-align: right; }
.foot p:last-child { padding: 0 var(--edge) 0 var(--gut); max-width: calc(64ch + var(--gut)); }
.foot a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.foot a:hover, .foot a:focus-visible { text-decoration-color: var(--accent); }

/* Short, wide windows: the clock gives way so it never reaches the words under it. */
@media (min-width: 760px) and (max-height: 660px) { :root { --dfs: min(26vw, 37vh); } }

/* ---- Cover screen: under 760px the line sits on the left edge -------------------------- */

@media (max-width: 759.98px) {
  :root { --line-x: 1px; --mark-w: 6px; --edge: 20px; --gut: 0px; --pad-l: 30px; --top: 76px; }
  .spine-mark { left: 0; }
  .spine-hold { left: 0; width: 24px; }
  .spine-tip, .picker { left: 18px; }
  .chrome { padding-left: var(--pad-l); }

  .hero { height: auto; min-height: 100svh; padding: var(--top) var(--edge) 0 var(--pad-l); }
  .h-head { display: block; font-size: 17vw; }
  .h-l, .h-r { display: block; padding: 0; text-align: left; }
  .h-row { display: block; margin-top: 22px; }
  .h-sub, .h-desc { padding: 0; justify-content: flex-start; text-align: left; }
  .h-sub { align-items: flex-start; }
  .h-lead .mask { font-size: 20px; max-width: none; }
  .h-body { margin-top: 16px; }
  .h-body .mask { max-width: none; font-size: 17px; }
  .h-scroll { display: none; }
  html.js:not(.motion) .hero { padding-bottom: 6vh; }
  html.js:not(.motion) .h-phone { justify-content: flex-start; margin-top: 40px; margin-left: -9px; }

  html:not(.motion) .s-fold, html:not(.motion) .s-pages { display: flex; flex-direction: column; padding: 10vh var(--edge) 6vh var(--pad-l); gap: 32px; }
  html:not(.motion) .fold-a, html:not(.motion) .fold-b { padding: 0; text-align: left; justify-content: flex-start; }
  html:not(.motion) .static-devices { flex-direction: column; align-items: flex-start; gap: 40px; }
  html:not(.motion) .page-list { padding: 0; align-items: flex-start; text-align: left; }
  html:not(.motion) .pl-say { margin-left: 0; }
  html:not(.motion) .static-device { padding: 0; position: static; }
  html:not(.motion) .s-pages .pages-close { text-align: left; padding: 0; }

  html.motion .fold-copy { width: auto; left: var(--pad-l) !important; right: var(--edge) !important; text-align: left; transform: none; }
  html.motion .fold-a, html.motion .fold-b { top: calc(var(--top) + 8px); }
  html.motion .pages-big { left: var(--pad-l); right: auto; top: calc(var(--dev-y) - var(--dev-h, 380px) / 2 - 14px); transform: translateY(-100%); text-align: left; font-size: 44px; }
  html.motion .page-list { display: none; }
  html.motion .pages-say { left: var(--pad-l); right: var(--edge); width: auto; top: calc(var(--dev-y) + var(--dev-h, 380px) / 2 + 22px); transform: none; }
  html.motion .pages-close { left: var(--pad-l); right: var(--edge); width: auto; top: calc(var(--dev-y) + var(--dev-h, 380px) / 2 + 22px); bottom: auto; transform: none; }
  .ps-text { font-size: 20px; }

  .faces-title { padding-left: var(--pad-l); max-width: 14ch; }
  html.motion .faces-stage, html:not(.motion) .faces-stage { height: auto; padding: 12vh 0 8vh; overflow: visible; }
  html.motion .faces-title { position: static; margin-bottom: 5vh; }
  html.motion .faces-viewport, html:not(.motion) .faces-viewport { position: relative; top: auto; transform: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--edge) 12px var(--pad-l); scroll-padding-left: var(--pad-l); scrollbar-width: none; }
  .faces-viewport::-webkit-scrollbar { display: none; }
  .face-card { scroll-snap-align: start; }
  .faces-strip { --fgap: 20px; }

  .sky-digits { grid-template-columns: 1fr; align-content: center; padding-left: var(--pad-l); }
  .sky-half { padding: 0 !important; justify-content: flex-start !important; }
  .sky-num { font-size: min(50vw, 30vh); }
  .sky-title { left: var(--pad-l); right: var(--edge); max-width: none; font-size: 28px; }
  .sky-kinds { left: var(--pad-l); right: 0; bottom: 76px; flex-direction: row; gap: 18px; overflow-x: auto; scrollbar-width: none; padding-right: var(--edge); }
  .sky-kinds::-webkit-scrollbar { display: none; }
  .sky-kinds li { flex: none; }
  .sky-kinds button { min-height: 44px; white-space: nowrap; }
  .sky-caption { left: var(--pad-l); right: var(--edge); min-width: 0; bottom: 20px; }

  .s-truths { padding: 10vh var(--edge) 4vh var(--pad-l); }
  .truth { grid-template-columns: 1fr; padding: 5vh 0; gap: 14px; }
  .truth-h, .truth-p { padding: 0; text-align: left; }
  .swatches { flex-wrap: nowrap; }
  .truth-swatches { max-width: none; }

  .s-close { padding: 12vh var(--edge) 0 var(--pad-l); }
  .close-clock { grid-template-columns: auto auto 1fr; font-size: 29vw; }
  .close-body { grid-template-columns: 1fr; padding: 6vh 0 8vh; }
  .close-title, .close-p, .notify { grid-column: 1; grid-row: auto; padding: 0; text-align: left; justify-self: start; }
  .close-p { margin-top: 18px; }
  .notify { grid-template-columns: 1fr; margin-top: 28px; width: 100%; justify-self: stretch; }
  .notify-btn { height: 52px; }
  .foot { grid-template-columns: 1fr; padding: 24px 0 28px; gap: 8px; }
  .foot p:first-child, .foot p:last-child { padding: 0; text-align: left; }
}

@media (max-width: 359.98px) {
  .picker-name { font-size: 16px; }
  .swatch { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
html.no-js .truth-swatches, html.no-js .spine-hold { display: none; }
