/* keepingledger.com: the animations. Each lives in its own shadow root (motion.js), so the hero's styles and these
   never meet; colours come from the page's tokens, which inherit in. */
:host { display: block; }
* { box-sizing: border-box; }
button { font-family: inherit; font-size: inherit; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.tile { position: relative; background: var(--tile); border-radius: 32px; padding: clamp(16px, 3.4vw, 44px); min-width: 0; overflow: hidden; color: var(--text); font-family: var(--sf); }
/* A scene whose devices stand on the page itself, with no card behind them */
.tile.bare { background: none; padding: 0; border-radius: 0; overflow: visible; }
.tile.bare .cloud svg { fill: var(--bg); }
.tilebar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 28px; }
.tilebar .hint { margin: 0; font-size: 14px; color: var(--muted); }
.replay { background: none; border: 0; color: var(--muted); font: 500 13px/1 var(--sf); cursor: pointer; padding: 6px; white-space: nowrap; }
.replay:hover { color: var(--accent); }

/* Line controls (LineControl): a dashed outline while open, a ring for an amount on its way, fill and check when done */
.ctl .pen { fill: none; stroke: var(--p); stroke-width: 1.8; stroke-dasharray: 3 2.6; opacity: 0; transition: opacity 180ms ease, stroke-dasharray 220ms ease, stroke 220ms ease; }
.ctl .trk { fill: none; stroke: var(--p); stroke-opacity: .45; stroke-width: 2.4; opacity: 0; }
.ctl .arc { fill: none; stroke: var(--m); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: var(--arc, 0) 69.115; opacity: 0; }
.ctl .fil { fill: var(--m); transform-box: fill-box; transform-origin: center; transform: scale(0); opacity: 0; transition: transform 180ms ease, opacity 150ms ease; }
.ctl .chk { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 300ms ease-out 70ms; }
.is-pen .pen { opacity: 1; }
.is-ring .trk, .is-ring .arc { opacity: 1; }
.is-ink .fil { transform: scale(1); opacity: 1; animation: ink 260ms var(--snappy); }
.is-ink .chk { stroke-dashoffset: 0; }
.no-anim-once .fil, .no-anim-once .chk, .no-anim-once .pen { animation: none !important; transition: none !important; }
@keyframes ink { 0% { transform: scale(0); } 70% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* ---------- 1 · Devices in step ----------
   Apple's Product Bezels (MacBook Pro 14", iPad Pro 11", iPhone 18 Pro) with Ledger's Today page in each screen hole.
   Apple's marketing guidelines: bezels as is (no shadow, tilt, crop, animation), nothing over them, true relative scale,
   full signal/Wi-Fi/battery, and at least 200 px tall. Scale is 1.7 px per mm (wide) and 1.32 px per mm (narrow: the iPad
   upright on top, the iPhone below it at the right, 201 px tall; side by side they no longer fit a phone): Mac PNG 386 x 254 mm, iPad
   254 x 181 mm, iPhone 74.5 x 152 mm. The sync is drawn between the devices, never on them.
   Inside a screen, 1em is the app's body text (17 pt on iPhone and iPad, 15 pt on the Mac), drawn about a quarter
   larger than true size so the lines can be read; the layouts follow the apps (TodayScreen, LineView, the sidebars). */
.stage-wrap { position: relative; width: 100%; }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.stage.wide { width: 700px; height: 729px; }
.stage.narrow { width: 300px; height: 548px; }
.dev { position: absolute; }
.dev::after { content: ""; position: absolute; inset: 0; background: 0 0 / 100% 100% no-repeat; pointer-events: none; z-index: 5; }
.scr { position: absolute; overflow: hidden; background: var(--a-page); color: var(--a-label); line-height: 1.2; }
.scr svg { display: block; }
.gl { background: var(--glass); box-shadow: inset 0 0 0 .5px var(--glass-rim), 0 .25em 1em rgba(10, 14, 40, .08); display: grid; place-items: center; color: var(--a-label); }
.hctl { display: flex; gap: .47em; }
.hctl .gl { width: 2.6em; height: 2.6em; border-radius: 1.3em; }
.hctl .gl:first-child { width: 2.82em; }
.hctl .gl svg { width: 1.18em; height: 1.18em; }
.av b { font-size: .88em; width: 2.14em; height: 2.14em; border-radius: 50%; background: var(--a-acc-cont); color: var(--a-on-acc-cont); display: grid; place-items: center; font-weight: 600; }

/* The page: greeting, day, status, the week (iPhone), its section label and card */
.greet { font-weight: 600; letter-spacing: -.025em; color: var(--a-accent); white-space: nowrap; }
.titlerow { display: flex; justify-content: space-between; align-items: center; height: 2.6em; margin-top: .94em; }
.ttl { display: flex; align-items: center; font-size: 2em; font-weight: 700; letter-spacing: .012em; white-space: nowrap; }
.chev { width: .36em; margin: .08em 0 0 .3em; color: var(--a-label2); }
.chev svg { width: 100%; height: auto; }
.stat { margin-top: .47em; font-size: .88em; letter-spacing: -.015em; color: var(--a-label2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: .94em; }
.wd { display: flex; flex-direction: column; align-items: center; gap: .24em; }
.wd .l { font-size: .65em; font-weight: 600; color: var(--a-label2); }
.wd .n { width: 2.12em; height: 2.12em; border-radius: 50%; display: grid; place-items: center; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.wd.sel .n, .md.sel .n { background: var(--a-accent); color: var(--a-on-accent); font-weight: 600; }
.tbar { display: contents; }
.bar { display: block; width: 0; height: .3em; border-radius: .15em; transition: width 300ms var(--smooth); }
.seclabel { font-size: .765em; margin: 2.4em 0 .77em 2.77em; font-weight: 600; letter-spacing: -.006em; color: var(--a-label2); }
.card { background: var(--a-card); border-radius: 1.53em; overflow: hidden; position: relative; }

.ln { position: relative; display: grid; grid-template-columns: 3.06em 2.59em minmax(0, 1fr) auto; align-items: baseline; align-content: center; min-height: 3.06em; padding: .47em .94em .47em 1.18em; background: var(--a-card); transition: background 120ms ease; }
.ln::after { content: ""; position: absolute; left: 6.82em; right: 1.18em; bottom: 0; height: 1px; background: var(--a-sep); }
.ln.nosep::after { display: none; }
.ln.press { background: color-mix(in srgb, var(--a-label) 7%, var(--a-card)); }
.lstrip { transition: transform 220ms var(--snappy); transform-origin: left center; }
.wrow { transition: background 200ms ease; }
@media (hover: hover) {   /* a line leans in under the pointer before it's inked */
  .ln:has(button.ctl):hover { background: color-mix(in srgb, var(--a-accent) 5%, var(--a-card)); }
  .ln:has(button.ctl):hover .lstrip { transform: scaleX(1.8); }
  .ln:hover button.ctl.is-pen .pen, button.wrow:hover .ctl.is-pen .pen { stroke-dasharray: 5 .9; stroke: var(--m); }
  button.wrow:hover { background: color-mix(in srgb, var(--w-label) 9%, var(--w-cell)); }
}
.lstrip { position: absolute; left: .47em; top: .18em; bottom: .18em; width: .235em; border-radius: .12em; background: var(--s); }
.tm { font-size: .765em; letter-spacing: -.006em; color: var(--a-label2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm small { display: block; font-size: .846em; }
.slot { line-height: 0; }
.ctl { position: relative; display: inline-block; width: 2.59em; height: 2.59em; vertical-align: -.94em; padding: 0; margin: 0; border: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
span.ctl { cursor: default; }
.ctl svg { position: absolute; top: 50%; left: 50%; width: 1.53em; height: 1.53em; margin: -.765em 0 0 -.765em; overflow: visible; }
.compact .ctl { height: 1.65em; vertical-align: -.47em; }
.ctl .dash { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%); line-height: 1; color: var(--a-label3); }
.tt { margin-left: .24em; min-width: 0; }
.ti { display: block; letter-spacing: -.025em; color: var(--a-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ink .ti { color: var(--a-label); font-weight: 500; }
.note .ti { font-family: var(--ny); color: var(--a-label); letter-spacing: 0; }
.sub { display: flex; align-items: center; gap: .38em; margin-top: .15em; font-size: .765em; color: var(--a-label2); white-space: nowrap; overflow: hidden; }
.sub svg { flex: none; width: 1em; height: 1em; color: var(--m); }
.sub span { overflow: hidden; text-overflow: ellipsis; }
.compact .sub { display: none; }
.acc { margin-left: .47em; }
.due { display: inline-flex; align-items: center; gap: .33em; height: 1.83em; padding: 0 .67em; border-radius: .92em; background: var(--a-due-bg); color: var(--a-due-fg); font-size: .706em; font-weight: 600; }
.due svg { width: 1em; height: 1em; }
.chip { display: inline-flex; align-items: center; height: 2em; padding: 0 .8em; border-radius: 1em; background: color-mix(in srgb, var(--m) 14%, transparent); color: var(--m); font-size: .88em; font-weight: 600; letter-spacing: -.015em; white-space: nowrap; }
.now { display: flex; align-items: center; gap: .62em; min-height: 4em; padding: 0 1.54em; background: var(--a-card); color: var(--a-accent); font-size: .765em; font-weight: 600; white-space: nowrap; }
.now::after { content: ""; flex: 1; height: 1.5px; background: var(--a-accent); border-radius: 1px; }

/* Status bars: full signal, Wi-Fi and battery (Apple's rule for marketing images) */
.sb { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--a-label); z-index: 3; white-space: nowrap; }
.sb .ic { display: flex; align-items: center; gap: .35em; }
.sb svg { height: .7em; width: auto; fill: currentColor; }

/* iPhone (18 Pro): the floating tab bar, + in its own slot */
.iphone::after { background-image: url(images/devices/iphone.png); }
.iphone .scr { left: 5.3333%; top: 2.5%; width: 89.3333%; height: 95%; border-radius: 14.9% / 6.86%; }
.iphone .sb { height: 4.9%; }
.iphone .sb > span:first-child { position: absolute; left: 13.4%; transform: translateX(-50%); }
.iphone .sb .ic { position: absolute; right: 7.6%; gap: .3em; }
.iphone .main { padding-top: 3.65em; }
.iphone .head { padding: 0 1.3em 0 1.5em; }
.iphone .card { margin: 0 .94em; }
.tabbar { position: absolute; left: .94em; right: .94em; bottom: 1.24em; display: flex; gap: .47em; z-index: 3; }
.tabs { flex: 1; height: 3.65em; border-radius: 1.82em; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; padding: 0 .24em; }
.tab { font-size: .59em; height: 5.4em; border-radius: 2.7em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2em; font-weight: 500; color: var(--a-label); }
.tab svg { width: 2.4em; height: 2.4em; }
.tab.on { color: var(--a-accent); background: color-mix(in srgb, var(--a-label) 7%, transparent); }
.plus { flex: none; width: 3.65em; height: 3.65em; border-radius: 50%; }
.plus svg { width: 1.41em; height: 1.41em; }

/* iPad (Pro 11"): Apple's sidebar with the month and Coming up (landscape); the tab bar on top (portrait) */
.ipad.land::after { background-image: url(images/devices/ipad-land.png); }
.ipad.land .scr { left: 4.1667%; top: 5.6383%; width: 91.6667%; height: 88.7234%; border-radius: 9.5px; }
.ipad.port::after { background-image: url(images/devices/ipad-port.png); }
.ipad.port .scr { left: 5.6383%; top: 4.1667%; width: 88.7234%; height: 91.6667%; border-radius: 6.5px; }
.ipad .sb { height: 1.6em; padding: 0 1.4em; font-size: .88em; }
.win { display: grid; height: 100%; }
.ipad .win { grid-template-columns: 17.5em minmax(0, 1fr); }
.side { display: flex; flex-direction: column; min-width: 0; background: var(--side); }
.ipad .side { padding: 0 .8em; }
.side .tog { align-self: flex-end; width: 2.6em; height: 2.6em; border-radius: 50%; margin: 1.75em .1em .9em 0; }
.tog svg { width: 1.2em; height: 1em; }
.nav { display: flex; align-items: center; gap: .62em; flex: none; height: 2.3em; padding: 0 .8em; margin-bottom: .1em; border-radius: 1.15em; color: var(--a-label); white-space: nowrap; }
.nav .ni { color: var(--a-accent); }
.nav .ni svg { width: 1.2em; height: 1.2em; }
.nav.on { background: color-mix(in srgb, var(--a-label) 9%, transparent); }
.nav .kb { margin-left: auto; font-size: .8em; color: var(--a-label3); }
.month { flex: none; margin-top: 1.1em; background: var(--a-card); border-radius: 1.2em; padding: .9em .8em .5em; }
.mh { display: flex; justify-content: space-between; align-items: center; padding: 0 .3em .5em; }
.mh .arrows { color: var(--a-accent); font-size: 1.2em; line-height: 1; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: .25em; }
.mgrid > span:not(.md) { text-align: center; font-size: .65em; font-weight: 600; color: var(--a-label2); }
.md { display: flex; flex-direction: column; align-items: center; gap: .12em; }
.md .n { font-size: .88em; width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.md .bar { height: .26em; }
.coming { flex: none; margin-top: 1.2em; min-height: 0; }
.coming .ch { font-size: .88em; font-weight: 600; color: var(--a-label2); margin: 0 0 .5em .6em; }
.clist { background: var(--a-card); border-radius: 1.2em; padding: .8em .9em; }
.cday + .cday { margin-top: .7em; padding-top: .6em; border-top: 1px solid var(--a-sep); }
.cl { font-size: .76em; color: var(--a-label2); margin-bottom: .35em; }
.cline { position: relative; font-size: .88em; line-height: 1.7; padding-left: .7em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cline::before { content: ""; position: absolute; left: 0; top: .3em; bottom: .3em; width: 2px; border-radius: 1px; background: var(--s); }
.ipad .main { position: relative; min-width: 0; padding: 4.3em 2em 0 2.2em; }
.ipad.land .main > .hctl { position: absolute; top: 1.75em; right: 1.2em; }
.ipad .greet { margin-top: .55em; }
.ipad .seclabel { margin: 2.6em 0 .77em 1.1em; }
.fab { position: absolute; right: 1.6em; bottom: 1.6em; z-index: 2; width: 3.7em; height: 3.7em; border-radius: 50%; background: var(--a-accent); color: var(--a-on-accent); display: grid; place-items: center; box-shadow: 0 .3em 1em rgba(38, 64, 191, .3); }
.fab svg { width: 1.4em; height: 1.4em; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 2em 1.2em 0; }
.topbar .tog { width: 2.6em; height: 2.6em; border-radius: 50%; }
.tabpill { display: inline-flex; gap: .1em; padding: .3em; border-radius: 2em; font-size: .88em; white-space: nowrap; }
.tabpill span { padding: .45em .85em; border-radius: 2em; }
.tabpill span.on { color: var(--a-accent); font-weight: 600; background: color-mix(in srgb, var(--a-label) 7%, transparent); }
.ipad.port .main { padding: 1.6em 1.6em 0; }

/* Mac (MacBook Pro 14"): the menu bar, then Ledger's window: sidebar (search, sections, month, Coming up) and the page */
.mac::after { background-image: url(images/devices/mac.png); }
.mac .scr { left: 10.829%; top: 11.339%; width: 78.342%; height: 77.323%; border-radius: 5px 5px 0 0; display: flex; flex-direction: column; }
.menubar { flex: none; height: 1.6em; display: flex; align-items: center; gap: 1.25em; padding: 0 1em; font-size: .87em; background: var(--menubar); white-space: nowrap; }
.menubar b { font-weight: 700; }
.menubar .mic { margin-left: auto; display: flex; gap: .9em; align-items: center; }
.menubar .mic svg { height: .8em; width: auto; fill: currentColor; }
.menubar .clk { font-variant-numeric: tabular-nums; }
.mac .win { flex: 1; min-height: 0; grid-template-columns: 21em minmax(0, 1fr); }
.mac .side { padding: .7em .8em .6em; }
.lights { display: flex; gap: .5em; margin: 0 0 1em .3em; }
.lights i { width: .8em; height: .8em; border-radius: 50%; background: #FF5F57; }
.lights i:nth-child(2) { background: #FEBC2E; } .lights i:nth-child(3) { background: #28C840; }
.find { display: flex; gap: .55em; margin-bottom: .7em; }
.fld { flex: 1; display: flex; align-items: center; gap: .4em; height: 2em; padding: 0 .55em; border-radius: .55em; background: color-mix(in srgb, var(--a-label) 6%, transparent); color: var(--a-label2); font-size: .93em; }
.fld svg { width: .95em; height: .95em; }
.add { width: 3em; height: 2em; border-radius: .5em; background: var(--a-accent); color: var(--a-on-accent); display: grid; place-items: center; }
.add svg { width: 1em; height: 1em; }
.mac .nav { height: 2.1em; border-radius: .5em; padding: 0 .65em; margin-bottom: .2em; }
.mac .nav .ni { color: var(--a-label2); }
.mac .nav .ni svg { width: 1.05em; height: 1.05em; }
.mac .month { background: none; padding: .6em .4em 0; margin-top: .6em; }
.mac .md { gap: .2em; }
.mac .coming { margin-top: .6em; }
.mac .coming .ch { font-size: .8em; color: var(--a-label3); margin: 0 0 .4em .4em; }
.mac .clist { background: none; padding: 0 .4em; }
.mac .cday + .cday { border-top: 0; margin-top: .5em; padding-top: 0; }
.me { margin-top: auto; display: flex; align-items: center; gap: .6em; padding: .6em .3em 0; border-top: 1px solid var(--a-sep); font-size: .87em; }
.me .av b { font-size: 1em; width: 2.3em; height: 2.3em; }
.me small { display: block; font-size: .85em; color: var(--a-label2); }
.mac .main { min-width: 0; padding: 3.8em 1.9em 0 2.3em; }
.mac .ttl { font-size: 1.87em; }
.mac .greet { margin-top: .9em; }
.mac .stat { margin-top: .4em; font-size: .8em; }
.mac .seclabel { font-size: .8em; margin: 2.6em 0 .7em .9em; }
.mac .card { border-radius: .8em; }
.mac .ln { grid-template-columns: 3.85em 3em minmax(0, 1fr) auto; min-height: 3.3em; padding-left: 2.6em; }
.mac .lstrip { left: 1.77em; }
.mac .ln::after { left: 9.7em; }
.mac .ctl { width: 3em; }

/* Apple Watch (Series 11, 46 mm): the Watch section, on its own. 1em is the Watch's body text. */
.watch-solo { display: flex; justify-content: center; padding: 16px 0 8px; }
.dev.watch.solo { position: relative; width: 229px; height: 360px; font-size: 13px; }
@media (max-width: 520px) { .dev.watch.solo { width: 191px; height: 300px; font-size: 11px; } }
.watch::after { background-image: url(images/devices/watch.png); }
.watch .scr { left: 12.857%; top: 21.818%; width: 74.286%; height: 56.364%; border-radius: 22% / 18.5%; background: #000; color: var(--w-label);
  --fern: #96BC7A; --fern-p: #718164; --berry: #ED96BE; --berry-p: #987182; --iris: #9BAEF4; --iris-p: #747B9A; }
.wtop { position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: .75em 1.1em .45em; text-align: right; background: linear-gradient(#000 72%, rgba(0, 0, 0, 0)); pointer-events: none; }
.wtop span { display: block; font-size: .94em; font-weight: 600; font-variant-numeric: tabular-nums; }
.wtop b { display: block; font-size: 1.06em; font-weight: 600; color: var(--w-accent); }
.wscroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 3.7em .15em 3.4em; }
.wscroll::-webkit-scrollbar { display: none; }
.wstat { font-size: .81em; line-height: 1.25; color: var(--w-label2); padding: 0 1.2em .7em; }
.wlist { position: relative; }
.wrow { position: relative; display: flex; align-items: center; gap: .5em; width: 100%; min-height: 3.45em; margin: 0 0 .25em; padding: .45em .7em .45em .95em; border: 0; border-radius: .8em; background: var(--w-cell); color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
div.wrow { cursor: default; }
.wbar { flex: none; width: .19em; height: 1.9em; border-radius: .1em; background: var(--m); }
.wrow .ctl { flex: none; width: 1.38em; height: 1.38em; vertical-align: 0; cursor: inherit; }
.wrow .ctl svg { left: 0; top: 0; width: 100%; height: 100%; margin: 0; }
.watch .ctl .chk { stroke: #000; }
.wmood .ctl { color: var(--w-label2); }
.wtt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .08em; }
.wrow .ti { color: var(--w-label); white-space: normal; letter-spacing: -.01em; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wrow.ink .ti { color: var(--w-label2); font-weight: 400; }
.ws { font-size: .75em; color: var(--w-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws:empty { display: none; }
.wchip { flex: none; font-size: .75em; font-weight: 600; padding: .35em .6em; border-radius: 1em; background: color-mix(in srgb, var(--m) 25%, transparent); color: var(--m); }
.wnow { display: flex; align-items: center; gap: .5em; padding: .8em 1.3em .8em 1.3em; font-size: .75em; font-weight: 600; color: var(--w-accent); white-space: nowrap; }
.wnow::after { content: ""; flex: 1; height: 1.5px; background: var(--w-accent); }
.wplus { position: absolute; right: .85em; bottom: .75em; z-index: 2; width: 2.15em; height: 2.15em; border-radius: 50%; background: var(--w-accent); color: #fff; display: grid; place-items: center; }
.wplus svg { width: 1.1em; height: 1.1em; }

/* Device font sizes: one number per device, everything else in em */
.wide .mac { left: 22px; top: -35px; width: 656px; height: 432px; font-size: 6.4px; }
.wide .ipad { left: 16px; top: 421px; width: 432px; height: 308px; font-size: 6.1px; }
.wide .iphone { left: 557px; top: 470px; width: 127px; height: 260px; font-size: 5.2px; }
.wide .cloud { left: 502px; top: 548px; }
.narrow .ipad { left: 0; top: 0; width: 239px; height: 335px; font-size: 5.3px; }
.narrow .iphone { left: 202px; top: 347px; width: 98px; height: 201px; font-size: 4px; }
.narrow .cloud { left: 100px; top: 398px; }

.cloud { position: absolute; z-index: 1; width: 90px; margin-left: -45px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.narrow .cloud { font-size: 11px; }
.cloud svg { width: 44px; height: 30px; fill: var(--tile); stroke: currentColor; stroke-width: 1.6; overflow: visible; transition: stroke 200ms ease; }
.cloud.lit { color: var(--accent); }
.cloud.lit svg { animation: lift 420ms var(--smooth); }
@keyframes lift { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.links { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.links path { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.links .base { stroke: color-mix(in srgb, var(--muted) 35%, transparent); stroke-dasharray: 2 4; }
.links .pulse { stroke: var(--accent); stroke-width: 2.4; opacity: 0; }

/* ---------- 2 · Planning ---------- */
.planner { display: flex; flex-direction: column; gap: 22px; }
.rhythm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rhythm .lab { font-size: 15px; font-weight: 600; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto; background: var(--tile-ink); border-radius: 999px; padding: 3px; }
.seg .knob { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 999px; background: var(--knob); box-shadow: 0 1px 4px rgba(10, 14, 40, 0.14); transition: left 380ms var(--smooth), width 380ms var(--smooth); }
.seg button { position: relative; z-index: 1; border: 0; background: none; color: var(--text); font: 500 14px/1 var(--sf); padding: 10px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: transform 120ms ease; }
.seg button[aria-checked="true"] { font-weight: 600; }
.seg button.press, .start.press { transform: scale(.94); }

.calendar { position: relative; }
.plabel { font-size: 14px; font-weight: 600; color: var(--accent); margin: 0 0 10px; white-space: nowrap; transition: opacity 160ms ease; font-variant-numeric: tabular-nums; }
.strip { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.band { position: absolute; top: 0; bottom: 0; z-index: 0; border-radius: 14px; background: var(--tile-ink); }
.bracket { position: absolute; top: -5px; bottom: -5px; z-index: 1; border-radius: 17px; left: 0; width: 0;
  background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent);
  transition: left 650ms var(--smooth), width 650ms var(--smooth); }
.cell { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; min-width: 0; }
.cell .l { font-size: 11px; font-weight: 600; color: var(--muted); }
.cell .n { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; font-variant-numeric: tabular-nums; }
.cell.today .n { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.cell .mk { width: 6px; height: 6px; border-radius: 50%; background: var(--m, transparent); transform: scale(0); transition: transform 260ms var(--snappy); }
.cell .mk.on { transform: scale(1); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 18px; height: 10px; border-radius: 4px; background: var(--tile-ink); }
.legend i.yours { background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }

.lane { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: 30px; row-gap: 6px; min-height: 102px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 7px; border-radius: 15px; background: var(--a-card); color: var(--a-label);
  box-shadow: inset 0 0 0 1px var(--a-sep), 0 1px 2px rgba(10, 14, 40, 0.06); font-size: 14px; letter-spacing: -0.01em; white-space: nowrap; }
.pill svg { width: 16px; height: 16px; flex: none; overflow: visible; }
.pill .sq { fill: none; stroke: var(--p); stroke-width: 1.8; stroke-dasharray: 3 2.6; }
.lane .pill { width: max-content; z-index: 3; }
.lane .pill.fly { transition: transform 680ms var(--smooth); }

.bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.appcard { background: var(--a-card); color: var(--a-label); border-radius: 22px; padding: 16px 18px; min-width: 0; }
.appcard h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--a-label2); letter-spacing: -0.006em; }
.trow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.trow + .trow { border-top: 1px solid var(--a-sep); }
.trow .pill { box-shadow: none; background: none; padding-left: 0; }
.trow .pill.gone { visibility: hidden; }
.trow .pill.placed { opacity: .45; transition: opacity 240ms ease; }
.trow .where { font-size: 13px; color: var(--a-label2); white-space: nowrap; opacity: 0; transition: opacity 240ms ease; }
.trow .where.on { opacity: 1; }
.plan { position: relative; display: grid; }
.plan > div { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; transition: opacity 260ms ease, transform 360ms var(--smooth); }
.plan .ask .t, .plan .done .t { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.plan .s { font-size: 14px; color: var(--a-label2); font-variant-numeric: tabular-nums; }
.plan .btns { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.start { border: 0; background: var(--a-accent); color: var(--a-on-accent); font: 600 15px/1 var(--sf); padding: 11px 20px; border-radius: 999px; cursor: pointer; transition: transform 120ms ease; }
.notnow { font-size: 15px; color: var(--a-accent); font-weight: 500; }
.plan .done { opacity: 0; transform: translateY(6px); pointer-events: none; }
.plan.is-done .ask { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.plan.is-done .done { opacity: 1; transform: none; pointer-events: auto; }
.again-link { align-self: flex-start; border: 0; background: none; color: var(--a-accent); font: 500 14px/1 var(--sf); padding: 8px 0 0; cursor: pointer; }
@media (max-width: 640px) { .bottom { grid-template-columns: minmax(0, 1fr); } .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; } .seg button { font-size: 13px; line-height: 1.15; white-space: normal; padding: 8px 6px; } .cell .n { width: 22px; height: 22px; font-size: 12px; } .cell .l { font-size: 9px; } .lane .pill { font-size: 12px; height: 26px; } .lane { grid-auto-rows: 26px; min-height: 90px; } }


/* Less motion: the finished state, and changes fade in place. */
@media (prefers-reduced-motion: reduce) {
  .ctl .fil, .ctl .chk, .ctl .pen { transition: opacity 200ms ease-in-out !important; }
  .is-ink .fil { animation: none; }
  .ctl .chk { stroke-dashoffset: 0; opacity: 0; } .is-ink .chk { opacity: 1; }
  .bracket, .seg .knob, .cell .mk, .plan > div { transition: opacity 200ms ease !important; }
  .cloud.lit svg { animation: none; }
}
