/* ============ my.adhd — the app: dump -> triage -> one task ============
   Tokens and the type face come from theme.css, loaded first. */

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
/* the rubber-band area on iOS falls through to <html>, so it carries the same
   --surface as the body — otherwise it flashes the light ground in dark mode */

body{
  color:var(--ink);
  font-family:var(--display);
  -webkit-font-smoothing:antialiased;
  line-height:1.45;
  /* The document must not scroll — see #app. */
  overflow:hidden;
}

/* #app is the scroller, not the document.
   iOS drags position:fixed elements along with the rubber band when the
   *document* overscrolls, which is why the tab bar drifted up and down at
   the ends of a scroll instead of holding its place. A fixed element only
   holds still if the thing behind it never moves, so the page scrolls
   inside this box and the document stays put. overscroll-behavior stops a
   scroll that runs off either end from being handed back up to it. */
#app{
  position:relative; z-index:1;
  height:100%; height:100dvh;
  overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
}

/* One flat page in the current theme's --surface. Content is held to a
   readable measure and centred — no card, no shadow, no tinted ground for
   it to float on. */
/* The top inset and the gutter are read by both .screen and the brand bar,
   which has to stop exactly where the status bar ends. Declared once so the
   two can never drift apart.

   The floor on --safe-top is the important half. Launched from the home
   screen iOS does not always report an inset, and the gap alone puts the
   toggle hard against the clock; max() leaves a phone that reports 59px
   untouched and still clears the status bar on one that reports nothing.
   See the standalone block below. */
:root{
  --safe-top:env(safe-area-inset-top, 0px);
  --gutter:clamp(20px,5vw,40px);
  /* the air above the mark — shorter than the old 22-34px, which sat the
     lockup lower on the screen than it wanted to */
  --brand-gap:clamp(12px,2vw,20px);
}

.screen{
  min-height:100%;
  display:flex; flex-direction:column; align-items:center;
  width:100%;
  /* viewport-fit=cover hands us the whole screen, notch included — so the
     gutters have to carry the insets themselves or the header sits under
     the status bar once the app runs from the home screen. */
  padding-top:calc(var(--brand-gap) + var(--safe-top));
  padding-right:calc(var(--gutter) + env(safe-area-inset-right, 0px));
  padding-bottom:calc(clamp(48px,7vw,80px) + env(safe-area-inset-bottom, 0px));
  padding-left:calc(var(--gutter) + env(safe-area-inset-left, 0px));
}
.screen > *{width:100%; max-width:var(--measure)}

/* The 80px foot is thumb room on a phone. On a desktop window there is no
   thumb, and it was the whole reason a 900px-tall screen scrolled 14px to
   reach nothing. */
@media (min-width:820px){
  .screen{padding-bottom:calc(clamp(32px,4vw,56px) + env(safe-area-inset-bottom, 0px))}
}

@media (display-mode:standalone){
  :root{--safe-top:max(env(safe-area-inset-top, 0px), 34px)}
}

.is-hidden{display:none !important}


/* The sprite element itself stays: it still holds the interface icons
   and the logo mark. */
.sprite{position:absolute; width:0; height:0; overflow:hidden}

.art{display:block; margin:0 auto}

/* ---------- brand ---------- */
/* The bar holds its place while the page scrolls under it. #app is the
   scroller, not the document, so sticky resolves against #app and the offset
   only has to clear the status bar — which is exactly --safe-top, the same
   length .screen pads by. */
.brand{
  position:sticky; top:var(--safe-top); z-index:20;
  display:flex; align-items:center; gap:10px;
  padding-bottom:10px;
}
.brand--sm{margin-bottom:12px}

/* The ground the rows pass behind. The bar is held to --measure, so a
   background on the bar itself would leave the gutters — and the strip up
   under the status bar — uncovered. This is one full-bleed panel instead,
   reaching from the top of the screen to the bottom of the bar. It sits at
   z-index -1 inside the bar's own stacking context: behind the lockup,
   still in front of the page. */
.brand::before{
  content:"";
  position:absolute; z-index:-1;
  left:50%; transform:translateX(-50%); width:100vw;
  top:calc(-1 * (var(--safe-top) + var(--brand-gap)));
  bottom:0;
}
/* The mark links out to the landing page, on both screens. A real <a>, not a
   button: this leaves the app, so it should open in a new tab on middle-click
   and offer a URL on hover like any other link. Relative, so it also works
   when index.html is opened straight off disk. */
/* .brand-lockup, .logo and .wordmark now live in theme.css */
.lg-pill{stroke:var(--violet)}
.brand .theme-toggle{margin-left:auto}

/* the toggle button itself is styled in theme.css */

/* ============ the way in ============
   The iOS SplashScreen's timeline, to the millisecond: four rays at 70ms
   apart on the arrive curve, the capsule on the pop, the word opening
   out at 460ms, and the leave at 1080ms. Everything that moves is a
   transform or opacity, except the word's column — a grid track from 0fr
   to 1fr, which is what walks the mark left as the word arrives, and
   costs nothing inside a box this small that contains its own layout. */
.splash{
  --sp-arrive:cubic-bezier(.16,1,.3,1);
  --sp-pop:cubic-bezier(.2,1.4,.4,1);
  position:fixed; inset:0; z-index:1000;
  display:grid; place-items:center;
  contain:strict;
  animation:splash-out .3s ease-out 1.08s forwards;
}
.no-splash .splash{display:none}
.splash.is-leaving{animation:splash-out .22s ease-out forwards}

.splash-lockup{
  display:grid; grid-template-columns:auto 0fr; align-items:center;
  column-gap:0;
  animation:splash-open .5s var(--sp-arrive) .46s forwards,
            splash-grow .3s ease-out 1.08s forwards;
}
.splash-mark{width:55px; height:55px; display:block}   /* 34px × 26/16 */
.splash-word{
  overflow:hidden; min-width:0;
  opacity:0; transform:translateY(8px);
  animation:splash-word .5s var(--sp-arrive) .46s forwards;
}
.splash-word .wordmark{font-size:34px; white-space:nowrap; display:block; line-height:1.1}

.sp-ray{
  transform-box:view-box; transform-origin:50px 50px;
  transform:scaleY(0);
  animation:splash-ray .42s var(--sp-arrive) forwards;
}
.sp-ray-1{animation-delay:.08s}
.sp-ray-2{animation-delay:.15s}
.sp-ray-3{animation-delay:.22s}
.sp-ray-4{animation-delay:.29s}
.sp-pill{
  transform-box:view-box; transform-origin:68px 68px;
  transform:scale(0);
  animation:splash-pop .38s var(--sp-pop) .36s forwards;
}

@keyframes splash-ray{to{transform:scaleY(1)}}
@keyframes splash-pop{to{transform:scale(1)}}
@keyframes splash-open{to{grid-template-columns:auto 1fr; column-gap:21px}}  /* 34 × 10/16 */
@keyframes splash-word{to{opacity:1; transform:none}}
@keyframes splash-out{to{opacity:0; visibility:hidden}}
@keyframes splash-grow{to{transform:scale(1.06)}}
.splash.is-leaving .splash-lockup{animation:splash-open 0s forwards, splash-grow .22s ease-out forwards}

@media (prefers-reduced-motion:reduce){
  .splash{animation:splash-out .15s linear .5s forwards}
  .splash-lockup{animation:none; grid-template-columns:auto 1fr; column-gap:21px}
  .splash-word,.sp-ray,.sp-pill{animation:none; opacity:1; transform:none}
}

/* ---------- screen 1: home ---------- */
/* The dump buffer. Off screen rather than display:none — it still holds the
   text every dump passes through, and the iOS shell still fills it by id
   and focuses it, neither of which works on something that is not laid
   out. Same clip trick as .sr-only, minus the screen-reader part: this one
   is hidden from everybody, aria included. */
.is-offscreen{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
  opacity:0; pointer-events:none;
}

/* The cold start. It floats in the middle of an otherwise empty screen,
   which is what the box used to do here. */
.home-empty-wrap{
  margin:auto 0; padding:26px 0 0;
  display:flex; flex-direction:column;
}
.home-start-hint{margin-top:0; margin-bottom:22px}

/* The welcome figure: thoughts in, rows out. The left side is loose on
   purpose (lower case, no order, wash pills); the right side is the
   list's own grammar (a tick ring, a title, the day under it), so the
   picture is the promise in the hint below it. On short windows it steps
   out of the way: the button matters more than the picture. */
.dump-welcome{
  margin:0 auto 22px; width:100%; max-width:420px;
  display:grid; grid-template-columns:1fr auto 1.2fr; align-items:start; gap:8px;
  padding:16px 14px;
}
.dw-col{min-width:0}
.dw-label{
  text-transform:uppercase; 
  margin:0 0 8px;
}
.dw-thoughts, .dw-rows{list-style:none; margin:0; padding:0}
.dw-thoughts{display:flex; flex-wrap:wrap; gap:6px}
.dw-thoughts li{
  font-family:var(--display); font-size:12.5px; font-weight:600; line-height:1.25;
  padding:4px 10px;
}
/* A little out of line, the way thoughts arrive. Still, so nothing moves. */
.dw-thoughts li:nth-child(2){margin-left:10px}
.dw-thoughts li:nth-child(4){margin-left:4px}
.dw-arrow{color:var(--faint); align-self:center}
.dw-rows{
  padding:2px 10px;
}
.dw-rows li{display:flex; align-items:flex-start; gap:8px; padding:7px 0}
.dw-tick{
  flex:none; width:14px; height:14px; margin-top:2px;
  border-radius:50%;
}
.dw-row-text{
  min-width:0; font-family:var(--display); font-size:12.5px; font-weight:700;
  line-height:1.25; color:var(--ink);
}
.dw-row-text small{
  display:block; font-size:11px; font-weight:600; color:var(--faint); margin-top:1px;
}
@media (max-height:720px){
  .dump-welcome{display:none}
}

.headline{
  font-family:var(--display);
  /* one line, so it has to survive a 320px phone: the lower bound and the
     vw term both shrink, and the wrap is left off rather than forced. */
  font-size:clamp(23px,6vw,38px); font-weight:800;
  letter-spacing:-.04em; line-height:1.15;
  text-wrap:nowrap;
  text-align:center; margin-bottom:12px;
}

/* primary CTA — the brand gradient, as in the reference. Used by the cold
   start on home, the composer's send, the notes' New note and the plans. */
.btn-primary{
  width:100%;
  display:flex; align-items:center; justify-content:center; gap:12px;
  padding:17px 24px; cursor:pointer;
}
.btn-primary:disabled{cursor:not-allowed; transform:none}

/* the typing preview: what the app has already spotted a day in */
.dump-dates{
  /* The box already carries 22px of floor. The strip borrows the top half
     of it so it reads as attached to what was typed, and restores the rest
     underneath so the button keeps its breathing room. */
  margin-top:-10px; margin-bottom:20px;
  display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;
  animation:rise .22s var(--ease) both;
}
.dump-dates-label{
  flex:none; 
  text-transform:uppercase; 
}
.dump-chips{display:flex; gap:6px; flex-wrap:wrap; min-width:0}
.dump-chips .chip--when{font-size:12.5px; padding:4px 11px}
.dump-more{font-size:12px; color:var(--faint); align-self:center}

.hint{margin-top:14px; font-size:13px; color:var(--faint); text-align:center}
.hint strong{color:var(--ink); font-weight:600}

/* ---------- screen 2: loading ---------- */
/* The wait is the logo mark morphing through its own states — eight arms
   changing length and radius, never added or removed, so it reads as one
   shape thinking rather than a spinner. 4s loop; the copy rotates at 1.9s
   underneath it, so the two never land together and the wait stays alive. */
.loading{margin:auto; text-align:center}
/* The mp4 carries its own white ground, because H.264 has no alpha channel,
   and 8-bit yuv420 does not round-trip RGB exactly. One or two values out of
   255 is invisible on its own — what gives it away is the hard edge — so the
   edge is feathered off into the white piece it sits in. The mark itself
   reaches ~67% of the half-width, well inside the mask. */
.logo-morph{
  display:block; width:100%; height:auto;
  -webkit-mask-image:radial-gradient(closest-side,#000 74%,transparent 99%);
          mask-image:radial-gradient(closest-side,#000 74%,transparent 99%);
}
/* Quiet on purpose: the wait is usually a few seconds and this is for the
   time it is not. Puts the words back in the composer. */
.loading-cancel{flex:none; min-width:0; min-height:44px; padding:10px 26px; margin-top:22px}

/* ---------- home: the widgets ----------
   Everything under the dump box. They share one recipe with the cards in
   settings — see .gcal-card, which .acct-card already extends the same way
   — and each is a piece (see THE PIECES). */
.home-widgets{
  width:100%;
  display:flex; flex-direction:column; gap:14px;
  margin-top:26px;
}

.home-card{padding:20px 18px}

.home-card-head{
  display:flex; align-items:baseline; gap:10px;
  margin-bottom:14px;
}
.home-card-title{
  font-family:var(--display); font-size:17px; font-weight:800;
  color:var(--ink); margin:0;
}
/* The one place on this screen orange is allowed: the heading says "3 late"
   or it says "Today", and only the first of those is news. */
.home-card-more,
.home-card-head .home-card-more{
  margin-left:auto;
  background:none; border:0; padding:0; cursor:pointer;
  font:inherit; font-family:var(--display);
  font-size:13px; font-weight:600; color:var(--muted);
  transition:color .18s var(--ease);
}

.home-today-rows{display:flex; flex-direction:column; gap:8px}
/* A signpost, not a task row: no tick, no swipe, no chips. Tapping it goes
   to the lists, which is where a task can actually be worked on.

   appearance:none because this is a <button> and WebKit paints its own
   bezel under one otherwise. The rule down the left is a pseudo-element
   rather than a border-left: a one-sided border under a border-radius is
   drawn as a taper around all four corners, which reads as four stray
   arcs rather than one straight mark. */
.home-today-row{
  position:relative;
  display:flex; flex-direction:column; gap:3px;
  width:100%; text-align:left;
  -webkit-appearance:none; appearance:none;
  background:none; border:0; cursor:pointer;
  font:inherit;
  transition:background .18s var(--ease);
}
.home-today-row::before{
  content:""; position:absolute; 
  transition:background .18s var(--ease);
}
.home-today-title{
  font-family:var(--display); font-size:14.5px; font-weight:600; color:var(--ink);
}
.home-today-meta{font-size:12.5px; color:var(--faint)}

.home-empty{margin:0; font-size:14px; color:var(--muted)}

/* ---------- home: the Now card ----------
   One task. Its title is the loudest thing on the screen, its first step
   sits under it in the same box the lists use, and Done is the screen's
   one gradient. Not now and Change day are the quiet pair under it. */
.now-card{display:flex; flex-direction:column}
.now-card .home-card-head{margin-bottom:8px}
.now-what{margin-bottom:16px}
.now-title{
  display:block; width:100%; text-align:left;
  -webkit-appearance:none; appearance:none;
  background:none; border:0; padding:0; margin:0 0 6px; cursor:pointer;
  font-family:var(--display); font-size:24px; font-weight:800;
  line-height:1.2; letter-spacing:-.015em; color:var(--ink);
  border-radius:var(--b-radius);
}
.now-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px;
  margin:0; font-size:13.5px; color:var(--faint);
}
/* The late chip's recipe: an orange edge on a wash, the word in ink. */
.now-late{
  font-family:var(--display); font-size:12px; font-weight:700;
  padding:2px 9px;
}
.now-step{margin-bottom:16px}
.now-step.is-hidden{display:none}
.now-done{margin-bottom:10px}
.now-alt{display:flex; flex-wrap:wrap; gap:10px}
.now-alt .btn-soft{min-height:44px}

.now-days{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px}
.now-days.is-hidden{display:none}
.now-day{
  position:relative;
  padding:10px 16px;
  display:inline-flex; align-items:center;
  font:inherit; font-size:14px; 
  cursor:pointer;
  transition:border-color .18s var(--ease), background-color .18s var(--ease);
}
.now-day:disabled{opacity:.45; cursor:not-allowed}
/* The chip is the input: laid over it, unseen, so a tap anywhere on
   "Pick a day" opens the phone's own date picker. */
.now-date{
  position:absolute; inset:0; width:100%; height:100%;
  opacity:0; cursor:pointer; border:0; padding:0; margin:0;
}

/* A different task taking the card's place. */
.now-card.is-new .now-what,
.now-card.is-new .now-step{animation:nowIn .32s var(--ease) both}
.now-card.is-new .now-step{animation-delay:.06s}
@keyframes nowIn{from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none}}
@media (prefers-reduced-motion:reduce){
  .now-card.is-new .now-what,
  .now-card.is-new .now-step{animation:none}
}

/* The stat tiles came off the profile screen, where they were an auto-fit
   row that chose its own column count. Here they are pinned to two.

   auto-fit was picking three at 430px and one at 320px off the same rule,
   which made the same five numbers a different shape on every phone —
   and three columns leaves a lone tile on the second row with the wide
   overdue card under it, which reads as a mistake rather than a layout.
   Two, then two, then overdue across the foot, at every width. */
#home-widgets .stat-row{
  margin-top:0;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

/* Two controls in the header instead of one. The toggle stays hard right,
   where it has been on every screen since the app existed; the gear tucks in
   beside it. */
.brand-tools{
  margin-left:auto;
  display:flex; align-items:center; gap:8px;
}
.brand .brand-tools .theme-toggle{margin-left:0}

/* The gear. Deliberately not a .theme-toggle — theme.js binds that class by
   name on every page and would make this switch the theme — so it borrows
   the shape and leaves the orange ring to the button it sits next to. */
.icon-btn{
  flex:none; display:grid; place-items:center;
  cursor:pointer; padding:0;
}
.icon-btn svg{width:17px; height:17px; display:block}


/* ---------- the note's own paper ----------
   A piece, so it keeps its day colours at night like every other. No new
   hue enters here: the paper is Pale, which is already in theme.css, and
   the faint type is ink at a percentage. */
:root{
  --note-paper:var(--pale);
  --note-ink:var(--black);
  --note-faint:rgba(16,16,24,.42);
}

/* ---------- notes ----------
   The index. The editor is a screen of its own, below. */
/* A flex column so the empty state can take the middle of the screen with
   margin:auto — the reference centres it, and on a block parent that has
   nothing to push against. */
.notes-wrap{
  margin:0; padding-top:clamp(18px,3vh,32px); padding-bottom:8px;
  flex:1 1 auto; display:flex; flex-direction:column;
}
.notes-wrap .btn-primary{margin-top:16px}

.notes-list{display:flex; flex-direction:column; gap:10px; margin-top:20px}
.note-card{
  display:flex; flex-direction:column; gap:5px;
  width:100%; text-align:left;
  -webkit-appearance:none; appearance:none;
  padding:15px 16px; cursor:pointer; font:inherit;
  transition:border-color .18s var(--ease), background .18s var(--ease);
}
.note-card-title{
  font-family:var(--display); font-size:15.5px; font-weight:700; color:var(--ink);
}
/* Two lines of the body and no more. A note can be a page long; the card is
   a way back into it, not a way to read it. */
.note-card-preview{
  font-size:13.5px; line-height:1.45; color:var(--muted);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.note-card-foot{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.note-card-when{font-size:11.5px; color:var(--faint)}
.note-card-tag{
  display:inline-flex; align-items:center; gap:4px;
  font-size:11.5px; color:var(--faint);
}
.note-card-tag svg{
  width:12px; height:12px; display:block;
  fill:none; stroke:currentColor;
  stroke-linecap:round; stroke-linejoin:round;
}

/* ---------- the empty state ----------
   Icon, line, reason, one thing to press — centred, which nothing else in
   this app was. Built here for the notes; home and the calendar keep the
   one-liners they already had until there is a reason to move them. */
.empty-state{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  gap:10px; margin:auto 0; padding:32px 0;
}
.empty-mark{
  width:54px; height:54px; display:grid; place-items:center;
  margin-bottom:4px;
}
.empty-mark svg{
  width:26px; height:26px; display:block;
  fill:none; stroke:currentColor;
  stroke-linecap:round; stroke-linejoin:round;
}
.empty-title{
  font-family:var(--display); font-size:17px; font-weight:700;
  color:var(--ink); margin:0;
}
.empty-body{font-size:13.5px; color:var(--muted); margin:0; max-width:30ch; line-height:1.5}
/* .btn-primary is full-width by design — it is the one CTA on every screen
   that has one. In here it is sitting under a sentence and wants to be the
   width of its own word. */
.empty-go{width:auto; margin-top:8px; padding:13px 28px}

/* ---------- the note editor ----------
   A screen, not a panel. The bar is the composer's three-slot grid; the
   canvas is the sheet of paper; the toolbar sits where the tab bar would. */
.sheet-bar{display:grid; grid-template-columns:1fr auto 1fr; gap:10px}
.sheet-back{
  justify-self:start; width:34px; height:34px; display:grid; place-items:center;
  background:none; border:none; color:var(--muted); cursor:pointer; padding:0;
  transition:color .18s var(--ease);
}
.sheet-back svg{width:20px; height:20px; display:block; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round}
.sheet-back:hover{color:var(--accent)}
.sheet-go{
  justify-self:end; display:grid; place-items:center;
  border-radius:999px;
  cursor:pointer; padding:0;
  transition:transform .12s var(--ease), opacity .18s var(--ease);
}
.sheet-go svg{width:18px; height:18px; display:block; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round}
.sheet-go:active{transform:scale(.94)}
/* .screen-title is absolutely centred on the settings screens, where the
   left slot is a word-wide back label. Here the grid already centres it. */
.sheet-bar .screen-title{position:static; transform:none; justify-self:center}

.note-wrap{
  margin:0; padding-top:14px;
  padding-bottom:calc(104px + env(safe-area-inset-bottom,0px));
  flex:1 1 auto; display:flex; flex-direction:column;
}

/* The sheet of paper. Ground from the theme's own pale, never a new hue,
   and the dotted grain is one radial-gradient rather than an asset. */
/* The papers. Each is a wash of a token from theme.css, so a note can only
   ever be a colour the rest of the app already is — and because they are
   mixed against --surface, the same seven names read on both grounds.
   Lavender is the paper a note has always had and stays the default; it is
   the one with no data-paper at all. */
[data-paper="violet"]{--note-paper:color-mix(in srgb,var(--violet) 22%,var(--surface))}
[data-paper="blue"]{--note-paper:color-mix(in srgb,var(--accent) 18%,var(--surface))}
[data-paper="orange"]{--note-paper:color-mix(in srgb,var(--orange) 20%,var(--surface))}
[data-paper="red"]{--note-paper:color-mix(in srgb,var(--danger) 15%,var(--surface))}
[data-paper="stone"]{--note-paper:color-mix(in srgb,var(--stone) 16%,var(--surface))}
[data-paper="white"]{--note-paper:var(--surface); --note-edge:var(--line-strong)}

/* The faces. The three the app pages already load; a fourth would be a
   font file, and these three cover plain, display and typewriter. */
.note-canvas[data-font="sans"]{font-family:var(--sans)}
.note-canvas[data-font="mono"]{font-family:var(--mono)}
.note-canvas[data-font="mono"] .note-title{font-family:var(--mono); letter-spacing:-.01em}
.note-canvas[data-font="sans"] .note-title{font-family:var(--sans)}

.fmt-font--sans{font-family:var(--sans)}
.fmt-font--mono{font-family:var(--mono)}

/* The card wears its paper too, at half strength so the list stays a list
   and not a fruit bowl. */

/* The rail's swatch shows the paper the open note has. */
.note-tool--paper .paper-dot{
  width:20px; height:20px; border-radius:50%;
  background:var(--note-paper); 
  display:block;
}
.paper-row{display:flex; flex-wrap:wrap; gap:12px; padding:4px 0 2px}
.paper-swatch{
  width:36px; height:36px; border-radius:50%; padding:0; cursor:pointer;
  background:var(--note-paper); 
  transition:transform .14s var(--ease), box-shadow .14s var(--ease);
}

.note-canvas{
  flex:1 1 auto;     /* the paper reaches the toolbar, as a sheet would */
  background:var(--note-paper);
  padding:20px 20px 26px;
  min-height:46vh;
  background-size:14px 14px;
  background-position:10px 12px;
}

.note-title{
  width:100%; background:none; border:none; padding:0; margin:0 0 6px;
  font-family:var(--display); font-size:24px; font-weight:800;
  letter-spacing:-.02em; color:var(--note-ink);
}
.note-title::placeholder{color:var(--note-faint)}

.note-blocks{display:flex; flex-direction:column; gap:2px; min-height:32vh}

.nb{display:flex; align-items:flex-start; gap:8px}
.nb-lead{
  flex:none; min-width:16px; padding-top:3px;
  font-size:15px; color:var(--note-faint); user-select:none;
}
.nb-text{
  flex:1 1 auto; min-width:0;
  font-family:var(--sans); font-size:15.5px; line-height:1.55;
  color:var(--note-ink); padding:2px 0; word-break:break-word;
}
.nb--h .nb-text{font-family:var(--display); font-size:19px; font-weight:700; letter-spacing:-.01em}
.nb-text.is-done{color:var(--note-faint); text-decoration:line-through}
/* The placeholder on the first empty line, and only there. */
.nb-text:empty[data-hint]::before{content:attr(data-hint); color:var(--note-faint)}

/* Centred on the first line's letters rather than its line box: DM Sans
   sits low in its line, so 4px left the box riding above the words.
   Measured in WebKit — the box's centre lands between the cap height and
   the x-height of the 15.5px text beside it. */
.nb-box{
  flex:none; width:18px; height:18px; margin-top:5.5px;
  background:none; 
  cursor:pointer; padding:0;
  transition:background .16s var(--ease), border-color .16s var(--ease);
}

.note-files{display:flex; flex-wrap:wrap; gap:8px; margin-top:16px}
.note-file{position:relative; width:84px; height:84px; overflow:hidden}
.note-file img{width:100%; height:100%; object-fit:cover; display:block}
.note-file-x{
  position:absolute; top:4px; right:4px; width:20px; height:20px;
  display:grid; place-items:center; line-height:1;
  background:rgba(16,16,24,.62); border:none; border-radius:999px;
  color:#fff; font-size:14px; cursor:pointer; padding:0;
}

.note-remind{
  font-size:12.5px; color:var(--accent); margin:12px 0 0;
  display:flex; align-items:center; gap:6px;
}
.note-delete{margin-top:16px; align-self:flex-start}

/* ---------- the note toolbar ----------
   Where the tab bar would be, because the tab bar is gone while you write.
   Same pill, same blur, same floor. */
.note-tools{
  position:fixed; z-index:40;
  /* .screen > * puts width:100% on every direct child, which is right for
     the column and wrong for a pill that should be the width of its own
     buttons. */
  width:auto;
  left:50%; transform:translateX(-50%);
  bottom:max(8px, calc(env(safe-area-inset-bottom,0px) - 4px));
  display:flex; align-items:center; gap:4px;
  padding:6px;
}
.note-tool{
  width:44px; height:40px; display:grid; place-items:center;
  background:none; border:none; border-radius:999px;
  cursor:pointer; padding:0;
  transition:color .18s var(--ease), background .18s var(--ease);
}
.note-tool svg{width:19px; height:19px; display:block; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round}

/* ---------- the two note sheets ----------
   Over the toolbar, not over the writing: what you are formatting has to
   stay visible while you format it. */
.note-sheet{
  position:fixed; z-index:45;
  left:50%; transform:translateX(-50%);
  bottom:calc(66px + env(safe-area-inset-bottom,0px));
  width:min(calc(100vw - 32px), 440px);
  padding:14px 16px 18px;
  animation:rise-centred .18s var(--ease) both;
}
.note-sheet-bar{display:flex; align-items:center; margin-bottom:12px}
.note-sheet-title{font-family:var(--display); font-size:14.5px; font-weight:700; }
.note-sheet-x{
  margin-left:auto; width:28px; height:28px; display:grid; place-items:center;
  background:none; border:none; cursor:pointer; padding:0;
  transform:rotate(-90deg);
}
.note-sheet-x svg{width:17px; height:17px; display:block; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round}
.note-sheet-x:hover{color:var(--ink)}

.fmt-row{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px}
/* Sized to their own words rather than stretched to fill the row: five
   buttons across two rows leaves one of them a mile wide otherwise. */
.fmt-btn{
  flex:0 1 auto; min-width:52px;
  font-family:inherit; font-size:13px; font-weight:600;
  padding:9px 10px; 
  cursor:pointer;
  transition:border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.fmt-b{font-weight:800}
.fmt-i{font-style:italic}
.fmt-u{text-decoration:underline}
.fmt-s{text-decoration:line-through}

.rem-foot{display:flex; align-items:center; gap:12px; margin-top:16px}
.rem-foot .btn-soft{flex:0 0 auto; min-width:0; margin-left:auto; padding:11px 26px}


/* ---------- settings ----------
   Four things nobody opens twice, stacked. The cards inside are the ones
   that used to be the profile and feedback screens, unchanged. */
.settings-wrap{margin:0; padding-top:clamp(18px,3vh,32px); padding-bottom:8px}
.settings-section{width:100%}
.settings-section + .settings-section{margin-top:22px}
/* the plans are hidden while billing is off, and a hidden section is not
   a section before this one */
#set-sub.is-hidden + .settings-section{margin-top:0}
.settings-wrap .hint{margin-top:18px}

/* The feedback box kept its own screen, so it keeps the centred, unhurried
   shape it had when it was a tab. */
.settings-wrap--fb{padding-top:clamp(10px,2vh,22px)}

/* The caption over each group: an .eyebrow, the lead-in step — this only
   moves it. Only the plans still wear one; the groups under them go
   without, as on the iPhone. */
.settings-cap{margin:0 0 10px 4px}

/* The group: the iPhone's SettingsGroup. A wash panel with no edge, the
   large radius, rows inside it and hairlines between them — so overflow
   is hidden and the rows themselves carry no radius. */
.settings-group + .settings-group,
.settings-section + .settings-group,
.settings-group + .settings-section{margin-top:22px}
#set-sub.is-hidden + .settings-group{margin-top:0}

/* The row: its name on the left, what it is set to now on the right, a
   chevron when it leads somewhere. 52px high, 60 with a face in it. */
.set-row{
  position:relative;
  display:flex; align-items:center; gap:12px;
  width:100%; min-height:52px; text-align:left;
  -webkit-appearance:none; appearance:none;
  background:none; border:0; padding:0 16px; cursor:pointer;
  font:inherit; color:inherit; text-decoration:none;
  transition:background .18s var(--ease);
}
.set-row--face{min-height:60px}
/* A hidden row is not a row before the next one. */
.set-row.is-hidden{display:none}
/* The rule between two rows, inset by the row padding. A pseudo-element
   rather than a border because a border would sit under the hover wash
   and flicker at its ends. */
.set-row:not(.is-hidden) ~ .set-row::before{
  content:""; position:absolute; top:0; left:16px; right:0; height:1px;
}

.set-row-face{
  flex:none; width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center;
  font-size:19px; line-height:1; 
}

.set-row-title{
  flex:none;
  font-family:var(--display); font-size:16px; font-weight:600;
  line-height:1.2; color:var(--ink);
}
.set-row-value{
  flex:1 1 auto; min-width:0; margin-left:auto; text-align:right;
  font-family:var(--display); font-size:15px; font-weight:500; 
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* --faint on --wash-2 is 4.3:1 in light, under AA, so the hover lifts it. */
.set-row:hover .set-row-value,
.set-row:focus-visible .set-row-value{color:var(--muted)}

.set-chev{
  flex:none; width:13px; height:13px; margin-left:auto;
  color:var(--faint);
  transition:color .18s var(--ease), transform .18s var(--ease);
}
.set-row-value + .set-chev{margin-left:0}
.set-row:hover .set-chev{transform:translateX(2px)}

/* One tap in: the cards that used to sit open on settings, and the fine
   print under them at the iPhone's 13px. */
.set-page-group{margin-top:22px}
#screen-account .hint{text-align:left; padding:0 16px}

/* The plans card. The one coloured object on the screen — the same rule
   home follows, and the same gradient the primary button wears, because
   two different brand gradients in one app is one too many. */
.set-pro{
  display:flex; align-items:center; gap:14px;
  width:100%; text-align:left;
  -webkit-appearance:none; appearance:none;
  cursor:pointer; font:inherit;
  padding:18px 18px; 
  transition:transform .18s var(--ease), box-shadow .18s var(--ease);
}
.set-pro-badge{
  flex:none; width:42px; height:42px; border-radius:50%;
  display:grid; place-items:center;
}
.set-pro-badge svg{width:21px; height:21px; display:block}
.set-pro-text{display:flex; flex-direction:column; gap:3px; min-width:0}
.set-pro-title{
  font-family:var(--display); font-size:18px; font-weight:800;
  letter-spacing:-.02em; line-height:1.15;
}
.set-pro-note{font-size:13px; font-weight:600; }
.set-pro:hover .set-chev{color:#FFFFFF}

/* ---------- the plans screen ---------- */
.plans-title{
  font-family:var(--display); font-size:clamp(25px,6vw,31px); font-weight:800;
  letter-spacing:-.03em; line-height:1.1; margin-bottom:12px;
}
.plans-lede{font-size:15px; color:var(--muted); line-height:1.6; margin-bottom:8px}

.plans-list{display:flex; flex-direction:column; gap:12px; margin-top:22px}
.plan-card{
  padding:18px;
}
/* The one being recommended, and the same one the card on settings names. */
.plan-card-head{display:flex; align-items:baseline; gap:12px; flex-wrap:wrap}
.plan-name{
  font-family:var(--display); font-size:17px; font-weight:800;
  letter-spacing:-.02em; color:var(--ink);
}
.plan-tag{
  margin-left:6px; padding:3px 8px; border-radius:999px;
  font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  vertical-align:middle;
}
.plan-cost{
  margin-left:auto;
  font-family:var(--display); font-size:19px; font-weight:800;
  letter-spacing:-.02em; color:var(--ink); white-space:nowrap;
}
.plan-cost span{font-size:13px; font-weight:600; color:var(--faint)}
.plan-note{margin-top:8px; font-size:13.5px; line-height:1.5; color:var(--muted)}
.plan-card .btn-soft,
.plan-card .btn-primary{margin-top:14px; width:100%; flex:none; min-width:0}
.plans-manage{margin-top:16px; width:100%; flex:none; min-width:0}


/* The way out. Settings is the one screen with no tab lit under it, so it is
   the one screen that has to say how to leave. */
.settings-back{
  display:flex; align-items:center; gap:4px;
  cursor:pointer;
  font:inherit; font-family:var(--display);
  font-size:14.5px; 
  transition:color .18s var(--ease);
}
.settings-back svg{width:20px; height:20px; display:block}

/* Where you are, centred; where you came from, at the left. Absolutely
   positioned rather than a flex child, so the title stays on the middle of
   the screen instead of the middle of whatever space the back button and
   the toggle left over — those two are different widths on every screen. */
.screen-title{
  position:absolute; left:50%; transform:translateX(-50%);
  margin:0; pointer-events:none;
  font-family:var(--display); font-size:17px; font-weight:800;
  letter-spacing:-.02em; color:var(--ink); white-space:nowrap;
}

/* ---------- screen 3: now ---------- */
.now-wrap{margin:0; padding-top:clamp(18px,3vh,32px); padding-bottom:8px}
.eyebrow{
  margin-bottom:12px;
}

@keyframes rise{from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none}}
/* The sheet is centred by translateX(-50%), and `rise` ends on transform:none
   with fill-mode both — so 180ms after it appeared, the translate was gone
   and the sheet sat with its LEFT edge at the middle of the screen. Its own
   rise carries the centring through every frame. */
@keyframes rise-centred{from{opacity:0; transform:translate(-50%,10px)} to{opacity:1; transform:translate(-50%,0)}}

.chip{
  white-space:nowrap;
}
.chip--time{font-weight:600}

.first-step{
  padding:15px 17px; margin-bottom:20px;
}
.first-step-label{
  display:block; 
  text-transform:uppercase; margin-bottom:6px;
}
.first-step-text{font-size:15.5px; line-height:1.55}

.steps-block{
  padding:15px 17px; margin-bottom:20px;
}
.steps{list-style:none; counter-reset:s}
.steps li{
  counter-increment:s;
  display:flex; gap:11px; align-items:flex-start;
  font-size:15px; padding:7px 0;
}
.steps li::before{
  content:counter(s);
  flex:none; width:21px; height:21px; border-radius:50%;
  font-size:11px; font-weight:700;
  display:grid; place-items:center; margin-top:1px;
}

.btn-soft{
  flex:1 1 0; min-width:140px;
  font:inherit; font-size:14px; 
  padding:12px; cursor:pointer;
  transition:border-color .18s var(--ease), color .18s var(--ease), background-color .18s var(--ease), opacity .18s var(--ease);
}
.btn-soft:disabled{opacity:.45; cursor:not-allowed}

/* ---------- screen 3: the lists ----------
   The dump comes back under four deadline headings — Late, Today, Coming
   up, No date yet. Under a dated one the clock leads, then urgency, then
   length; the undated one leads on urgency. Category is the filter row
   above, not the shape of the page. Detail stays collapsed so the lists
   stay scannable. */

.lists-summary{
  font-size:13.5px; color:var(--faint); margin-bottom:22px;
}

.lists{display:flex; flex-direction:column; gap:26px}

/* offline notice — the fallback should never be able to masquerade
   as the real analysis */
.offline-note{
  padding:14px 16px; margin-bottom:22px;
}
.offline-note p{font-size:13.5px; color:var(--ink-soft); line-height:1.55; margin-bottom:12px}
.offline-note strong{font-weight:700}
.offline-note .btn-soft{width:100%; min-width:0}

@keyframes rise{from{opacity:0; transform:translateY(10px)} to{opacity:1; transform:none}}

/* The lists as one scrolling line, in place of a stack of headings. It
   scrolls sideways on its own — overscroll-behavior keeps a swipe that runs
   off the end from being handed up to the page, which on a phone reads as
   the whole screen lurching. The last pill is meant to be clipped: a pill
   cut by the edge is what says there is more along there. */
.cat-bar{
  display:flex; gap:8px; align-items:center;
  overflow-x:auto; overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  scroll-snap-type:x proximity;
  padding-bottom:2px; margin-bottom:18px;
}
.cat-bar::-webkit-scrollbar{display:none}

.cat-pill{
  flex:none; scroll-snap-align:start;
  display:inline-flex; align-items:center; gap:7px;
  font-size:13px; 
  padding:8px 14px; 
  white-space:nowrap; cursor:pointer;
  transition:border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}

.cat-pill-n{
  font-size:11px; font-weight:700; 
  border-radius:999px;
  min-width:18px; padding:1px 6px; text-align:center;
}

/* Headings by deadline. Each card already carries its exact day; the
   heading is there so the shape of what is coming reads without having to
   read any of them. Late is the only one that shouts, and it earns it. */
.bucket{display:flex; flex-direction:column; gap:10px}

.bucket-head{display:flex; align-items:center; gap:9px}
.bucket-count{
  font-size:11px; font-weight:700; 
  border-radius:999px;
  min-width:18px; padding:1px 6px; text-align:center;
}
.bucket--today .bucket-name{color:var(--ink)}

.list-items{
  list-style:none; display:flex; flex-direction:column; gap:8px;
  animation:rise .18s var(--ease) both;
}

/* ---------- the matrix ----------

   Only the iOS shell shows it (IN_SHELL in app.js); a browser never sees
   the toggle. The rules below still ship to everyone — they are inert
   without the elements.

   The same open tasks cut by importance as well as by when. It borrows the
   lists' own row wholesale — .task, its chips, its swipe rails and its
   detail — so nothing in here is a second implementation of a task.

   No four pastel grounds. The rule on this site is one coloured object per
   screen, and orange already means late; four decorative fills would spend
   the whole palette saying what the grid position says for free. What the
   colour does carry is the one thing position cannot: the important row
   gets the accent edge, the other two stay quiet. */
.matrix{display:grid; grid-template-columns:1fr; gap:12px}

/* Two-up only once a column is wide enough to hold a real task row. Below
   this the four stack: a .task card at ~170px wraps its chips onto three
   lines and truncates the title to nothing, and a matrix you cannot read
   is worse than a matrix you have to scroll. */
@media (min-width:560px){
  .matrix{grid-template-columns:1fr 1fr; align-items:start}
}

.quad{
  display:flex; flex-direction:column; gap:10px;
  padding:14px 14px 16px;
}

.quad-head{display:flex; align-items:flex-start; gap:10px}
.quad-name{
  font-family:var(--display); font-size:15px; font-weight:700;
  letter-spacing:-.01em; color:var(--muted); margin:0;
}
.quad--do .quad-name{color:var(--ink)}
.quad-sub{font-size:11.5px; color:var(--faint); margin:2px 0 0}

.quad-add{
  flex:none; margin-left:auto; width:28px; height:28px;
  display:grid; place-items:center;
  border-radius:999px; cursor:pointer; padding:0;
  transition:color .18s var(--ease), border-color .18s var(--ease);
}
.quad-add svg{width:15px; height:15px; display:block}
.quad-add:hover{background:var(--p-wash)}

.quad-empty{font-size:13px; color:var(--faint); margin:0; padding:2px 0 4px}

/* Held, lifted and dropped. The row fades in place rather than leaving, so the
   quadrant does not reflow under the hand mid-drag. */
.quad .task{transition:opacity .18s var(--ease), transform .14s var(--ease), border-color .18s var(--ease), background .18s var(--ease)}
.quad .task.is-pressed{transform:scale(.985)}
.quad .task.is-lifted{opacity:.3}

/* A ring, not a fill: the quadrant already carries a ground and an edge,
   and two of the four carry the accent on that edge already. */

/* ---------- list / matrix ---------- */

.view-toggle{
  flex:none; display:inline-flex; align-items:center; gap:6px;
  font-size:13px; 
  padding:7px 13px 7px 11px; 
  cursor:pointer;
  transition:color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.view-toggle svg{width:15px; height:15px; display:block}

.task{
  display:flex; gap:13px; align-items:flex-start;
  padding:14px 16px;
  cursor:pointer;
  transition:border-color .18s var(--ease), background .18s var(--ease);
}

.task-check{
  /* --faint, not --line-strong: the ring is the control, and a control's
     edge needs 3:1 against the row. --line-strong was 1.5:1 by day. */
  position:relative;
  flex:none; margin-top:1px;
  border-radius:50%; 
  background:none; color:transparent; cursor:pointer;
  display:grid; place-items:center;
  transition:border-color .16s var(--ease), color .16s var(--ease), background-color .16s var(--ease);
}
.task-check svg{width:13px; height:13px}
/* 24px to see, 44px to hit. */
.task-check::after{content:""; position:absolute; inset:-10px; border-radius:50%}
.task-title[role="button"]{cursor:pointer; border-radius:var(--b-radius)}

.task-body{flex:1; min-width:0}
.task-title{
  font-size:15.5px; font-weight:600; color:var(--ink);
  line-height:1.35; letter-spacing:-.01em; margin-bottom:8px;
}
.task-meta{display:flex; gap:6px; flex-wrap:wrap}
.chip--urgent{
  font-weight:600;
}

.task-detail{margin-top:14px}
.task-detail .first-step{margin-bottom:12px}
.task-detail .steps-block{margin-bottom:12px}
.task-break{width:100%}

/* repair — edit and remove.
   Deliberately the quietest thing in the detail: they are the exits, not
   the offer. Sitting below the break-it-down button, which is the one the
   detail was opened for. */
.task-fix{display:flex; gap:8px; margin-top:8px}
.task-fix-btn{
  flex:1 1 0;
  background:none; border:none; cursor:pointer;
  font:inherit; font-size:13px; font-weight:600;
  padding:8px 6px; border-radius:999px;
  transition:color .18s var(--ease), background .18s var(--ease);
}
/* --danger is for the thing that cannot be undone; removing one task can,
   so this takes the softer --danger-ink and only on hover. */
.task-fix-btn--danger:hover{color:var(--danger-ink); background:var(--danger-wash)}

/* The title, while it is being reworded. Sized and weighted exactly like
   the .task-title it replaces, so the row does not jump on either swap. */
.task-edit{
  display:block; width:100%;
  font:inherit; font-size:15.5px; font-weight:600; color:var(--ink);
  line-height:1.35; letter-spacing:-.01em;
  margin:-7px 0 1px; padding:6px 9px;
  outline:none;
}

/* ---- swipe a row: left finishes it, right removes it ----
   Both lists use this — the buckets here and the agenda on the calendar.
   The card rides on a track that holds the rails and clips them, so the
   colour only shows in the gap the card has opened and the row keeps its
   own rounded edge the whole way across.

   --p is how far the gesture has come, 0 to 1, written every frame from
   paintSwipe(). Everything the rail does with it is opacity: a colour that
   arrives with the movement rather than switching on at some invisible
   line. The line itself is .is-armed, and it fills. */
.swipe{
  --p:0;
  --gap:0;               /* px of row uncovered, as a plain number */
  position:relative;
  touch-action:pan-y;    /* down the page is the browser's; across is ours */
}

.swipe-rails{
  position:absolute; inset:0;
  border-radius:var(--b-radius); overflow:hidden;   /* the card's own, so the rail sits inside its edge */
  pointer-events:none;
}
.swipe-rail{
  position:absolute; inset:0;
  display:flex; align-items:center; gap:8px; padding:0 16px;
  font-family:var(--display); font-size:14px; font-weight:700;
  letter-spacing:-.01em;
  opacity:0;
  transition:background .16s var(--ease), color .16s var(--ease);
}
.swipe-rail svg{width:19px; height:19px; flex:none; transition:transform .16s var(--ease)}
/* The icon sits against the edge and is always whole. The word comes up
   behind it as the gap widens — soft where the card is still lying across
   it, full once the row has moved far enough to hold the whole word. It
   is the fill that says the mark has been passed; the word is only there
   to teach the gesture, and it does not have to be finished to do that. */
.swipe-rail span{opacity:clamp(0, calc((var(--gap) - 56) / 40), 1)}

/* Remove reads from the left edge, because a card pushed right is what
   uncovers it. Done is the mirror of that. */
.swipe-rail--remove{
  justify-content:flex-start;
}
.swipe-rail--done{
  justify-content:flex-end;
}
.swipe.is-right .swipe-rail--remove,
.swipe.is-left  .swipe-rail--done{opacity:var(--p)}

/* Past the mark: the rail fills, which is the promise that letting go
   now does it. */
.swipe.is-armed .swipe-rail svg{transform:scale(1.14)}

.swipe-card{position:relative}   /* over the rails, and opaque, so they only show in the gap */
.swipe.is-swiping .swipe-card{
  will-change:transform;
  user-select:none; -webkit-user-select:none;
}
/* short of the mark — back home, rail fading with it */
.swipe.is-settling .swipe-card{transition:transform .22s var(--ease)}
.swipe.is-settling .swipe-rail{transition:opacity .22s var(--ease)}
/* past it — out the side it was pushed, accelerating, because it is not
   coming back */
.swipe.is-leaving .swipe-card{transition:transform .18s cubic-bezier(.4,0,1,1)}

/* done pile */
.done-block{margin-top:30px; padding-top:6px}
.done-list{list-style:none; margin-top:10px; display:flex; flex-direction:column; gap:7px}
.done-item{
  display:flex; align-items:center; gap:12px;
  padding:11px 15px;
  font-size:14.5px; 
}
.done-item .p-title{flex:1; min-width:0; text-decoration:line-through}

/* the tail of the pile — a count, not a row */
.done-note{
  font-size:12.5px; line-height:1.45; color:var(--faint);
  padding:2px 4px;
}

/* Undo. Orange because putting something back is the one move on this
   screen that reverses a decision — it should catch the eye without
   reading as destructive, which is what --danger is for. Sized to its
   word rather than left at the browser's default button metrics. */
.done-item .p-do{
  flex:none; 
  font:inherit; font-size:12.5px; font-weight:700;
  line-height:1; letter-spacing:.01em;
  padding:6px 13px; cursor:pointer;
  transition:background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.done-item .p-do:active{transform:scale(.94)}

/* clear everything — deliberately quiet until armed, then loud */
.danger-zone{margin-top:34px; padding-top:20px; }
.danger-zone .clear-confirm{margin-top:12px}

.btn-danger-quiet{
  background:none; border:none; cursor:pointer;
  font:inherit; font-size:13.5px; font-weight:600;
  color:var(--faint); padding:6px 0;
  transition:color .18s var(--ease);
}
.btn-danger-quiet:hover{color:var(--danger-ink)}

.clear-confirm{
  padding:15px 17px;
  animation:rise .22s var(--ease) both;
}
.clear-confirm-text{
  font-size:14px; line-height:1.55; color:var(--ink);
  margin-bottom:12px; font-weight:500;
}
.clear-confirm-actions{display:flex; gap:12px; flex-wrap:wrap}
.clear-confirm-actions .btn-soft{flex:1 1 0; min-width:110px}

.btn-danger{
  flex:1 1 0; min-width:130px;
  font:inherit; font-family:var(--display);
  font-size:14px; font-weight:700;
  padding:12px; cursor:pointer;
}
.btn-danger:active{transform:translateY(0)}

/* leftover shared bits */
.parked-toggle{
  display:flex; align-items:center; gap:7px;
  background:none; border:none; cursor:pointer;
  color:var(--faint); font:inherit; font-size:13.5px; font-weight:600;
  padding:6px 0;
  transition:color .18s var(--ease);
}
.parked-toggle:hover{color:var(--accent)}
.chev{transition:transform .2s var(--ease); display:grid; place-items:center; width:14px; height:14px}
.chev svg{width:14px; height:14px}
.parked-toggle[aria-expanded="true"] .chev{transform:rotate(180deg)}


.cleared-note{
  text-align:center; color:var(--muted); font-size:15px;
  padding:40px 0;
}
.cleared-note strong{
  display:block; font-family:var(--display); color:var(--ink);
  font-size:20px; font-weight:700; letter-spacing:-.02em; margin-bottom:6px;
}
.link-btn{
  background:none; border:none; color:var(--accent);
  font:inherit; font-size:15px; font-weight:600;
  cursor:pointer; text-decoration:underline; text-underline-offset:3px;
  margin-top:8px;
}

/* toast */
.toast{
  position:fixed; left:50%; bottom:calc(26px + env(safe-area-inset-bottom, 0px)); transform:translateX(-50%);
  font-size:14px; font-weight:500;
  padding:12px 22px; border-radius:999px; z-index:80;   /* over the composer (70): the mic's messages are said while it is open */
  animation:toastIn .3s var(--ease) both;
  max-width:calc(100vw - 40px); text-align:center;
}
/* The device is full, so nothing new is being saved. Boxed like the
   offline note, because it is the same kind of thing: a state to act on.
   Pinned to the top so the tab bar and the toast stay where they are. */
.store-full{
  position:fixed; z-index:80;
  top:calc(10px + env(safe-area-inset-top, 0px));
  left:max(16px, env(safe-area-inset-left, 0px)); right:max(16px, env(safe-area-inset-right, 0px));
  max-width:var(--measure); margin:0 auto;
  padding:12px 16px;
}
.store-full p{font-size:13.5px; color:var(--ink-soft); line-height:1.5; margin:0}
.store-full strong{font-weight:700}

@keyframes toastIn{from{opacity:0; transform:translate(-50%,10px)} to{opacity:1; transform:translate(-50%,0)}}

/* A toast carrying an offer rather than a message: it holds an Undo, so
   it needs a row and a longer life (see toast() in app.js). */
.toast--action{
  /* max-content, because a box pinned at left:50% otherwise shrinks to the
     half of the screen right of its anchor and crushes a longer line. */
  width:max-content;
  display:flex; align-items:center; gap:12px;
  text-align:left; padding:10px 12px 10px 20px;
}
.toast-do{
  flex:none; background:none;
  border-radius:999px;
  font:inherit; font-size:12.5px; font-weight:700;
  line-height:1; letter-spacing:.01em;
  padding:7px 14px; cursor:pointer;
  transition:transform .12s var(--ease), opacity .18s var(--ease);
}
.toast-do:active{transform:scale(.94)}
.toast-do:hover{opacity:.75}


/* ---------- the floating tab bar ----------
   A capsule that sits over the page rather than a bar welded to the
   floor. It only appears past the dump screen: the dump is the one place
   where the whole screen is the job. Drawn as a piece (THE PIECES). */

.tabbar{
  position:fixed; z-index:45;
  /* Low, close to the home indicator rather than floating well above it.
     The inset reserves more room than the indicator actually occupies —
     it is a ~5pt bar sitting ~8pt off the floor — so the pill sits a
     little way into that strip and still clears it. max() keeps a sane
     gap on anything reporting no inset at all, like a desktop window. */
  bottom:max(8px, calc(env(safe-area-inset-bottom, 0px) - 4px));
  /* Stretched between the two edges rather than sized by its contents, so
     the five sections spread across the screen instead of huddling in the
     middle. left+right+auto margins keep it centred once the max-width
     starts binding on a desktop window. */
  left:calc(14px + env(safe-area-inset-left, 0px));
  right:calc(14px + env(safe-area-inset-right, 0px));
  max-width:440px; margin-inline:auto;
  display:flex; align-items:center;
  padding:7px 8px;
  animation:tabIn .3s var(--ease) both;
}
@keyframes tabIn{from{opacity:0; transform:translateY(14px)} to{opacity:1; transform:translateY(0)}}

.tab{
  position:relative;
  flex:1 1 0; min-width:0; height:46px;
  display:grid; place-items:center;
  background:none; border:none; 
  cursor:pointer; padding:0;
  /* The switch itself costs a few ms — what made it feel slow was waiting
     for it to be acknowledged, so the "you are here" slab lands in .12s
     rather than .18s. */
  transition:color .12s var(--ease), background .12s var(--ease), transform .16s var(--ease);
  /* no double-tap-zoom delay to sit through before the tap counts */
  touch-action:manipulation;
}
.tab svg{width:23px; height:23px; display:block}
/* The press dent is the receipt for the tap, so it has to be instant —
   easing it in over .12s meant the finger was already lifting before the
   button admitted it had been touched. It still eases back out on release,
   which is what the base transition above is for. */
.tab:active{transform:scale(.92); transition-duration:0s}
@media (hover:hover){ .tab:hover{color:var(--ink)} }

/* The current section is an ink capsule (THE PIECES), and its glyph
   fills in. --icon-fill is a custom property because it has to cross into
   the <use> shadow tree, and only inherited properties do that. The
   calendar is left outlined — a filled one is an unreadable slab. */
.tab{--icon-fill:none}
#tab-home.is-on, #tab-notes.is-on{--icon-fill:currentColor}

/* something waiting on the lists */
.tab-dot{
  position:absolute; top:8px; left:calc(50% + 7px);
  width:8px; height:8px; border-radius:50%;
}

/* the calendar's count. Sits where the dot sits, sized to its digits, and
   turns orange the moment any of what it counts is due or overdue — the
   number is the volume, the colour is the urgency. */
.tab-badge{
  position:absolute; top:5px; left:calc(50% + 4px);
  min-width:16px; height:16px; padding:0 4px;
  display:grid; place-items:center;
  border-radius:999px; color:var(--on-accent);
  font-size:10px; font-weight:800; line-height:1;
  font-variant-numeric:tabular-nums;
}


/* Room for the bar to hover over, rather than on top of, the last line of
   the page — and the toast has to clear it too. */
body.has-tabbar .screen{
  padding-bottom:calc(96px + env(safe-area-inset-bottom, 0px));
}
body.has-tabbar .toast{
  bottom:calc(88px + env(safe-area-inset-bottom, 0px));
}

/* ---------- feedback ---------- */
.fb-wrap{margin:0; padding-top:clamp(6px,1.5vh,18px)}

.fb-glyph{
  width:60px; height:60px; display:grid; place-items:center; margin:0 auto 18px;
}
.fb-glyph svg{width:27px; height:27px; display:block}

.fb-title{
  font-size:clamp(25px,6vw,31px); font-weight:800; letter-spacing:-.03em;
  line-height:1.1; text-align:center; margin-bottom:12px;
}
.fb-lede{
  font-size:15px; color:var(--muted); line-height:1.6;
  text-align:center; max-width:38ch; margin:0 auto 26px;
}

.fb-input{
  width:100%; resize:vertical; min-height:130px;
  font-family:var(--display); font-size:16px; line-height:1.55; 
  padding:15px 16px;
  transition:border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.fb-input::placeholder{color:var(--faint)}

.fb-foot{display:flex; align-items:center; gap:12px; margin-top:16px}
.fb-count{
  flex:1; font-size:12.5px; color:var(--faint);
  font-variant-numeric:tabular-nums;
}
.fb-send{width:auto; flex:none; margin-top:0; padding-left:26px; padding-right:26px}

.fb-note{
  margin-top:20px; padding-top:16px; 
  font-size:13px; color:var(--faint); line-height:1.6;
}
.fb-note strong{color:var(--ink); font-weight:700}

/* the quiet half of the ask. A real button so it is obviously tappable,
   but outlined rather than filled — it reads as available, not urged. The
   filled one lives on the thanks card, where it has been earned. */
.fb-give-quiet{margin-top:12px}
.fb-give-quiet-text{
  font-size:13px; color:var(--faint); line-height:1.6; margin-bottom:12px;
}
.fb-give-quiet-btn{
  display:inline-block; text-decoration:none;
  padding:10px 20px; line-height:20px;
  font-size:14px; letter-spacing:-.01em;
  transition:border-color .12s ease, color .12s ease, background .12s ease;
}
.fb-give-quiet-btn:active{transform:translateY(1px)}

.fb-thanks{
  text-align:center; padding:34px 16px;
}
.fb-thanks-title{font-size:20px; font-weight:800; letter-spacing:-.02em; margin-bottom:8px}
.fb-thanks-text{font-size:14.5px; color:var(--muted); line-height:1.6; max-width:34ch; margin:0 auto}

/* the tin, on the thanks card. Sits under a rule so it reads as a separate,
   optional thought rather than a condition of the thank-you above it. */
.fb-give{
  margin-top:22px; padding-top:20px; 
}
.fb-give-text{
  font-size:14.5px; color:var(--muted); line-height:1.6;
  max-width:34ch; margin:0 auto 16px;
}
.fb-give-btn{
  display:inline-block; text-decoration:none;
  padding:11px 24px; 
  font-size:15px; font-weight:700; letter-spacing:-.01em;
}
.fb-give-btn:active{transform:translateY(1px)}
.fb-give-note{
  margin-top:12px; font-size:12.5px; color:var(--faint); line-height:1.55;
  max-width:32ch; margin-left:auto; margin-right:auto;
}

/* ---------- the calendar ----------
   A month for orientation, an agenda for reading. The grid is deliberately
   quiet: a dot is enough to say "something is on this day", and the detail
   lives underneath where there is room for it. */
.cal-wrap{margin:0; padding-top:clamp(6px,1.5vh,16px)}

.cal-head{display:flex; align-items:center; gap:8px; margin-bottom:16px}
.cal-month{
  flex:1; text-align:center;
  font-size:19px; font-weight:800; letter-spacing:-.02em;
}
.cal-nav{
  flex:none; display:grid; place-items:center;
  cursor:pointer; padding:0;
}
.cal-nav svg{width:17px; height:17px; display:block}

.cal-dow,
.cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:3px}
.cal-dow{margin-bottom:6px}
.cal-dow span{
  text-align:center; font-size:11.5px; font-weight:700;
  color:var(--faint); letter-spacing:.06em;
}

/* Three months side by side, one pane wide each, snapping. Swiping sideways
   is the arrows without the aim, and the month you are pulling in is drawn
   before it arrives rather than appearing once it lands.

   touch-action is left alone on purpose: the browser reads the first few
   pixels of a gesture and gives a sideways one to this scroller and an
   upward one to the page, which is the behaviour a hand expects.

   The day names ride inside the panes, so the letters are part of the same
   surface as the days. Monday is Monday in every month, so three identical
   headers sliding past each other read as one that never moves — and a
   swipe that starts on them works, which it did not when they sat above.

   The block padding and margin cancel each other out. The padding is there
   only so a focus ring on the top or bottom row is not shaved off by the
   scroller's own edge. */
.cal-months{
  display:grid; grid-auto-flow:column; grid-auto-columns:100%;
  align-items:start;
  overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling:touch;   /* as .cat-bar does, for older iOS */
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scrollbar-width:none; -ms-overflow-style:none;
  /* Cut to the month on screen, so a five-week month is five rows and not
     six with a gap. The height is set in script, from the pane it is on;
     the ease is so a month that needs the extra row opens into it rather
     than snapping, and it runs while you are still swiping.

     220ms on the decelerate curve — the timing a swipe gets, and the same
     numbers the arrow glide is tweened on, so the frame and the month
     always arrive together. */
  transition:height 220ms cubic-bezier(0, 0, .2, 1);
}
@media (prefers-reduced-motion:reduce){ .cal-months{transition:none} }
.cal-months::-webkit-scrollbar{display:none}
/* A pane is the day names and the month under them, moving as one thing. */
.cal-pane{scroll-snap-align:start; min-width:0}

.cal-day{
  position:relative;
  aspect-ratio:1; width:100%; max-height:48px;
  display:grid; place-items:center;
  background:none; 
  font-family:var(--display); font-size:14.5px; font-weight:600;
  cursor:pointer; padding:0;
  transition:background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease);
}
.cal-day.is-blank{pointer-events:none}

/* today is outlined, the picked day is filled — so both can show at once */
.cal-day.is-today{color:var(--ink); font-weight:800}
.cal-day.is-picked{font-weight:800}

.cal-dot{
  position:absolute; bottom:6px; left:50%; transform:translateX(-50%);
  width:5px; height:5px; border-radius:50%; background:var(--accent);
}
.cal-day.is-late .cal-dot{background:var(--orange)}
.cal-day.is-picked .cal-dot{background:var(--on-accent)}

/* the earliest time that day, in the dot's place. Out of flow so the date
   stays optically centred whether or not there is a time under it. */
.cal-time{
  position:absolute; bottom:3px; left:0; right:0;
  /* The widest label ("12.30pm") is what sizes this: at a fixed 9px it
     clips by a hair once the cells drop under ~40px on a 320px phone. */
  font-size:clamp(8px, 2.4vw, 9px);
  font-weight:700; line-height:1; letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;
  white-space:nowrap; overflow:hidden;
}
/* A late day with a time keeps the time in ink, since orange is never
   text (BRAND.md §3.3), and says late with the orange dot in its top
   corner. The corner, not beside the time: "12.30pm" already fills a
   cell under 390px. The picked day's violet takes the dot white, as it
   does the plain dot. */
.cal-day.is-late .cal-time{color:var(--ink)}
.cal-day.is-late:has(.cal-time)::after{
  content:""; position:absolute; top:5px; right:5px;
  width:5px; height:5px; border-radius:50%; background:var(--orange);
}
.cal-day.is-picked .cal-time{color:var(--on-accent)}
.cal-day.is-picked:has(.cal-time)::after{background:var(--on-accent)}

.cal-today{
  display:block; margin:14px auto 0;
  background:none; border:none; padding:4px 8px;
  font-family:var(--display); font-size:13.5px; font-weight:600;
  cursor:pointer;
  text-decoration:underline; text-underline-offset:3px;
}

.cal-agenda{margin-top:14px; display:flex; flex-direction:column; gap:22px}

/* ---- the chip a lifted row becomes ----
   Named for the calendar, where the drag was born; the calendar no longer
   drags, and the only rows that lift now are the matrix's. */
.cal-ghost{
  position:fixed; z-index:60; margin:0;
  left:0; top:0; will-change:transform;   /* placed by transform — see placeGhost() */
  pointer-events:none;          /* so elementFromPoint sees the cell beneath */
  max-width:min(230px, 62vw);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  padding:9px 15px;
  font-family:var(--display); font-size:13.5px; font-weight:600; 
}

body.is-dragging{cursor:grabbing}
body.is-dragging *{user-select:none; -webkit-user-select:none}

.cal-group{animation:rise .18s var(--ease) both}
.cal-group-head{
  text-transform:uppercase;
  margin-bottom:10px;
  padding-bottom:9px; 
}

.cal-items{list-style:none; display:flex; flex-direction:column; gap:8px}
.cal-item{
  display:flex; align-items:flex-start; gap:11px;
  /* --surface is what the page is already: the row looks untouched, and a
     swipe rail cannot show through it. */
  padding:13px 15px;
}

.cal-item-body{flex:1; min-width:0}
.cal-item-title{font-size:15px; font-weight:600; line-height:1.35}
.cal-item-meta{margin-top:3px; font-size:12.5px; color:var(--faint)}

.cal-empty{
  font-size:14.5px; color:var(--muted); line-height:1.6;
  text-align:center; padding:26px 10px;
}
.cal-undated{
  margin-top:24px; padding-top:16px; 
  font-size:13px; color:var(--faint); line-height:1.55;
}

/* the day stamp on a task card, over on the lists screen */
.chip--when{border-style:solid; font-weight:600}

/* ---------- profile ---------- */
.profile-wrap{margin:0; padding-top:clamp(10px,2vh,22px)}

.profile-card{
  display:flex; flex-direction:column; align-items:center;
  padding:28px 22px 24px;
}
.avatar-big{
  width:78px; height:78px; border-radius:50%;
  display:grid; place-items:center; font-size:42px; line-height:1;
}
.profile-name-big{
  margin-top:14px; font-size:22px; font-weight:800; letter-spacing:-.02em;
}

.field{display:block; width:100%; margin-top:22px}
.field-label{
  display:block; font-size:12.5px; font-weight:600; color:var(--muted);
  margin-bottom:8px;
}
.field-input{
  width:100%; font-family:var(--display); font-size:16px; 
  padding:12px 14px;
  transition:border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field-input::placeholder{color:var(--faint)}

.avatar-picker{display:flex; flex-wrap:wrap; gap:8px}
.avatar-opt{
  width:44px; height:44px; 
  display:grid; place-items:center; font-size:22px; line-height:1;
  cursor:pointer; padding:0;
  transition:border-color .18s var(--ease), transform .12s var(--ease), box-shadow .18s var(--ease);
}
.avatar-opt:active{transform:scale(.93)}

/* A fourth stat will not sit in one row on a phone without squeezing the
   labels to shreds, so the row is a grid that folds to 2x2 when the cards
   would go under 140px, and lines all four up once there is room. */
.stat-row{
  display:grid; gap:10px; margin-top:18px;
  grid-template-columns:repeat(auto-fit, minmax(min(140px, 100%), 1fr));
}
.stat{
  text-align:center;
  padding:16px 8px;
}
/* Overdue takes the whole row: it is the odd one out of five, and it is
   the only card here that is ever bad news, so it reads better as its own
   line than as a stray fifth tile with a hole beside it. */
.stat--overdue{grid-column:1 / -1}

.stat strong{display:block; font-size:26px; font-weight:800; letter-spacing:-.03em; line-height:1.1}
.stat span{display:block; margin-top:4px; font-size:12.5px; color:var(--faint)}

.profile-wrap .hint{margin-top:18px}
/* The policy link sits directly under the hint it qualifies, so it gets a
   tighter gap than the hint's own — they read as one block. */
.hint--link{margin-top:6px}
.hint--link a{color:var(--muted); text-underline-offset:2px}
.hint--link a:hover{color:var(--accent)}

/* The last line on the last screen, and quieter than the links above it: the
   number is only ever wanted by someone saying which build broke, and Beta is
   what it qualifies — a thing still moving, said once, where a banner over the
   dump box would say it on every visit to people who already know. Stone, not
   orange: this is a label, never a signal to act on. */
.version{margin-top:16px; text-align:center; font-size:12px; color:var(--faint);
         font-variant-numeric:tabular-nums}
.version-tag{display:inline-block; margin-left:7px; padding:1px 8px;
             border-radius:999px;
             font-size:10.5px; font-weight:700; letter-spacing:.07em;
             text-transform:uppercase; }


/* ---------- the Google Calendar card ----------
   Deliberately quieter than the profile card above it: it is a setting,
   not the subject of the screen. It only earns the accent border once it
   is actually linked, and the amber only when it needs a hand. */

.gcal-card{
  margin-top:18px; padding:20px 18px;
  transition:border-color .22s var(--ease), background .22s var(--ease);
}

.gcal-head{display:flex; align-items:center; gap:12px}
.gcal-mark{
  width:34px; height:34px; flex:none; padding:6px;
}

.gcal-title{font-size:15.5px; font-weight:700; letter-spacing:-.015em; line-height:1.2}
.gcal-state{margin-top:2px; font-size:12.5px; font-weight:600; color:var(--faint)}
.gcal-card.is-on .gcal-state{color:var(--accent)}

.gcal-note{margin-top:12px; font-size:13.5px; line-height:1.5; color:var(--muted)}

/* Narrower than the full-bleed primary on the dump screen — this is a
   settings action, and a button the width of the phone reads like the
   point of the page. */
.gcal-go{margin-top:16px; font-size:15px; padding:13px 20px}

/* Signed in, the account button is a nudge, not the point of the card:
   a small outline pill, sized to its word. */
.gcal-go.acct-btn--quiet{
  width:auto; display:inline-flex; gap:6px;
  margin-top:16px; padding:7px 14px;
  font-size:13px; letter-spacing:0;
}
.gcal-go.acct-btn--quiet:hover{transform:none}

.gcal-more{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-top:12px;
}
.gcal-more:empty,
.gcal-more:not(:has(> :not(.is-hidden):not(:empty))){display:none}
.gcal-more{flex-wrap:wrap}
.gcal-more .btn-soft{flex:0 1 auto; min-width:0; padding:9px 16px; font-size:13.5px}
.gcal-more .is-hidden{display:none}


/* ---------- the account card ----------
   Quieter than the calendar card below it until it is actually signed in:
   this is an offer, not a task. */

/* The duplicate-calendar notice. Orange like the other "something is off"
   states on this card, and boxed so it reads as a thing to act on rather
   than another sentence in the note above it. */
.gcal-dupe{
  margin:12px 0 14px; padding:12px 14px;
}
.gcal-dupe .gcal-note{margin:0 0 12px}

.acct-card{margin-top:18px}
.acct-face{
  width:34px; height:34px; flex:none;
  display:grid; place-items:center; font-size:17px; line-height:1;
}
.acct-hint{font-size:12.5px; color:var(--faint)}

/* The account's own danger zone. Lighter than the one under the lists: that
   one has to carve a region out of a plain screen, this one sits inside a
   card that already has edges and only needs the rule saying past here is
   different. */
.acct-danger{margin-top:16px; padding-top:14px; }
.acct-danger .clear-confirm{margin-top:12px}

/* Reset this browser — the foot of settings, behind a rule like the lists'
   danger zone. Greyed while Google is still in it, with the reason under
   it in plain faint text: it is a step to take, not an error. */
.reset-zone{padding-top:18px; }
.reset-zone .clear-confirm{margin-top:4px}
.btn-danger-quiet:disabled{opacity:.5; cursor:not-allowed}
.btn-danger-quiet:disabled:hover{color:var(--faint)}
.reset-note{margin-top:4px; font-size:13px; line-height:1.5; color:var(--faint)}
.reset-where{display:block; flex:none; width:auto; min-width:0; margin-top:12px; padding:10px 20px}

/* ---------- the onboarding offer ----------
   Sits above the lists, after the app has already done its job once. Bordered
   rather than filled, so it reads as a suggestion beside the content instead
   of a banner stapled over it. */

.signup-offer{
  position:relative;
  margin:0 0 18px; padding:20px 18px;
}
.signup-x{
  position:absolute; top:10px; right:12px;
  background:none; border:none; cursor:pointer; padding:6px;
  font-size:20px; line-height:1; color:var(--faint);
  transition:color .18s var(--ease);
}
.signup-x:hover{color:var(--ink)}
.signup-title{
  font-size:16px; font-weight:800; letter-spacing:-.02em;
  padding-right:28px;   /* clear of the dismiss cross */
}
.signup-body{margin-top:8px; font-size:13.5px; line-height:1.55; color:var(--muted)}
.signup-go{margin-top:16px; font-size:15px; padding:13px 20px}

/* ---------- night: the same monochrome, inverted ---------- */

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important; transition-duration:.01ms !important}
}

/* ---------- the composer ----------
   The + opens this over whatever is on screen. Anchored to the top rather
   than centred, because the keyboard takes the bottom half the moment it
   opens — the input has to already be up where the eye is, not slide out
   from under a keyboard. Nothing here reaches below the fold on purpose. */
.composer{position:fixed; inset:0; z-index:70}

.composer-scrim{
  position:absolute; inset:0;
  animation:scrimIn .38s var(--ease) both;
  /* same reasoning as the sheet: its own layer before the drag, not during */
  will-change:opacity;
}
/* dragging thins it out in step with the sheet, so the page behind comes
   back as the sheet leaves rather than all at once at the end */
.composer.is-dragging .composer-scrim{animation:none}
@keyframes scrimIn{from{opacity:0} to{opacity:1}}

.composer-sheet{
  position:absolute; left:0; right:0;
  /* just clear of the status bar, so the screen underneath still shows as a
     sliver and the sheet reads as sitting on top of it */
  top:calc(env(safe-area-inset-top, 0px) + 10px);
  bottom:0;
  display:flex; flex-direction:column;
  /* On a dark page the sheet and the screen behind it are the same value,
     and a shadow alone does not separate them — the hairline does. */
  overflow:hidden;
  /* Promoted while the sheet exists at all, not once a finger lands on it.
     Building the layer costs a frame, and asking for it on the first
     pointermove spent that frame in the middle of the gesture — the sheet
     sat still, then caught up. The whole composer is display:none when it
     is closed, so there is no layer to hold in the meantime. */
  will-change:transform;
}
/* Comes up from below the screen rather than fading in place. The curve is
   the one iOS uses for a sheet: almost all of the travel is spent slowing
   down, which is what makes it feel like it was thrown rather than played.

   On its own class, not on .composer-sheet, and taken off again the moment
   it has played. Held on the base rule it had to be suppressed with
   animation:none by every other state, and the moment one of those was
   removed — a spring-back finishing, say — the entrance would start over and
   the sheet would drop away and fly back up. */
.composer-sheet.is-entering{animation:sheetUp .38s cubic-bezier(.32,.72,0,1) both}
@keyframes sheetUp{from{transform:translateY(100%)} to{transform:translateY(0)}}

/* While a finger is on it: no transition, the sheet is pinned to the
   pointer. On release one of the two below takes over. */
.composer-sheet.is-dragging{transition:none}

/* The transform itself is written inline by closeComposer, over the drag's
   own inline one — a rule here could never win against the style attribute.
   This owns the curve; the duration is set inline too, from how far the
   sheet still has to fall and how fast it was going when it was let go. */

/* No transitions on either of these: the sheet and the scrim are moved by
   script, with the Web Animations API, so that a release can start from
   wherever the finger left them. See slideSheet in app.js. */
/* The bar has nothing to scroll, ever, so it never has to arbitrate. The
   body's is set live in syncComposer — pan-y only while its content really
   does overflow. */
.composer-bar{touch-action:none}

.composer-bar{
  flex:none;
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px;
  padding:14px clamp(16px,4vw,22px);
}
.composer-title{font-size:16px; font-weight:800; letter-spacing:-.02em; text-align:center}

.composer-cancel{
  justify-self:start;
  background:none; border:none; padding:6px 2px;
  font-family:var(--display); font-size:15px; font-weight:600;
  cursor:pointer; touch-action:manipulation;
}
.composer-cancel:active{transform:scale(.96); transition-duration:0s}

.composer-post{
  justify-self:end;
  cursor:pointer; touch-action:manipulation;
}
.composer-post:active{transform:scale(.96); transition-duration:0s}
/* Dimmed rather than hidden — the button is the thing you are working
   towards, so it should be visible before it is usable. */
.composer-post:disabled{cursor:default}

.composer-body{
  flex:1 1 auto; min-height:0; overflow-y:auto;
  /* a scroll that runs off the end stays here rather than moving the list
     the sheet is covering */
  overscroll-behavior:contain;
  display:flex; gap:12px;
  padding:16px clamp(16px,4vw,22px) 24px;
}
.composer-face{
  flex:none; width:38px; height:38px; border-radius:999px;
  display:grid; place-items:center; font-size:21px; line-height:1;
}
.composer-field{flex:1 1 auto; min-width:0}
.composer-name{
  display:block; font-size:14.5px; font-weight:700; 
  margin-bottom:2px;
}
.composer-input{
  display:block; width:100%; resize:none;
  background:none; border:none; padding:0;
  font-family:var(--display); font-size:16.5px; line-height:1.45; 
  /* grown to fit by script; this is the floor, about one line */
  min-height:26px;
}
.composer .dump-dates{margin-top:16px}

/* ---------- hold to talk ----------
   The sheet opens with no keyboard (see openComposer), so this is what
   is under the thumb when it arrives. Anchored to the bottom of the
   sheet rather than sitting in the flow, because the body scrolls and a
   mic that scrolls off is a mic you cannot find one-handed.

   It goes when the keyboard comes. There is no arrangement in which a
   button 34px off the bottom of the screen is visible over a keyboard,
   and hiding it is more honest than letting it be covered. */
.composer-voice{
  position:absolute; left:0; right:0;
  bottom:calc(30px + env(safe-area-inset-bottom, 0px));
  display:flex; flex-direction:column; align-items:center; gap:12px;
  pointer-events:none;                     /* only the button takes touches */
  transition:opacity .18s var(--ease), transform .18s var(--ease);
}
.composer-voice.is-hidden{display:none}

/* Typing and talking are alternatives, not a pair. */
.composer.is-typing .composer-voice{
  opacity:0; transform:translateY(10px); pointer-events:none;
}

.composer-mic{
  pointer-events:auto;
  position:relative;
  border-radius:999px;
  display:grid; place-items:center;
  cursor:pointer;
  /* A press-and-hold is not a scroll, not a text selection and not a
     long-press menu. Saying so up front is what stops iOS spending the
     first 300ms deciding. */
  touch-action:none;
  -webkit-user-select:none; user-select:none;
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform .16s var(--ease), box-shadow .16s var(--ease);
}

.composer-mic-icon{width:30px; height:30px; fill:currentColor; position:relative; z-index:1}

/* Held: it grows and keeps growing a ring, so there is something moving
   for as long as it is listening. A recording with no feedback is a
   recording you do not trust. */

.composer-mic-ring{
  position:absolute; inset:0; border-radius:999px;
  opacity:0;
}
.composer-mic.is-live .composer-mic-ring{animation:micPulse 1.5s ease-out infinite}
@keyframes micPulse{
  from{opacity:.5; transform:scale(1)}
  to{opacity:0; transform:scale(1.9)}
}

/* The second ring is the one that is actually listening: voice.js sets
   --mic-level from the microphone about twenty-five times a second, so
   this one moves with the room rather than on a timer. On a phone with no
   live text it is the only evidence the app can hear anything, which is
   why it is driven by sound and not by a keyframe.

   Transform and opacity only, and no transition on scale — a level meter
   that eases is a level meter half a beat behind what you just said. */
.composer-mic-level{
  position:absolute; inset:-6px; border-radius:999px;
  border:2.5px solid currentColor;
  opacity:0; transform:scale(1);
  pointer-events:none;
}
.composer-mic.is-live .composer-mic-level{
  opacity:calc(.25 + var(--mic-level, 0) * .55);
  transform:scale(calc(1 + var(--mic-level, 0) * .22));
  transition:opacity .08s linear;
}

/* Let go, and it stops listening but is not finished — the recording is
   on its way to be transcribed. Shrunk back below resting size and turned
   down, so it reads as busy rather than as live. */
.composer-mic.is-working{
  cursor:progress;
}
.composer-mic.is-working .composer-mic-ring{
  opacity:.32;
  animation:micThinking 1.1s var(--ease) infinite;
}
@keyframes micThinking{
  0%,100%{opacity:.14; transform:scale(1)}
  50%    {opacity:.42; transform:scale(1.16)}
}
.composer-voice.is-working .composer-mic-hint{color:var(--ink)}

.composer-mic-hint{
  margin:0; font-size:13.5px; font-weight:600; 
  letter-spacing:-.01em; text-align:center;
}
.composer-voice.is-live .composer-mic-hint{color:var(--ink)}

@media (prefers-reduced-motion:reduce){
  .composer-mic.is-live .composer-mic-ring{animation:none; opacity:.28}
  .composer-mic.is-working .composer-mic-ring{animation:none; opacity:.28}
  /* The level ring stays. It is not decoration — without it there is no
     sign the microphone is picking anything up, and it does not loop. */
}

/* Clears the mic so a long dump never ends up underneath it. */
.composer-body{padding-bottom:150px}
.composer.is-typing .composer-body{padding-bottom:24px}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* Someone who has asked for less movement gets the sheet without the
   journey — it is still a sheet, it just does not fly. */
@media (prefers-reduced-motion:reduce){
  .composer-sheet.is-entering{animation:none}
  .composer-scrim{animation:none}
  /* the leaving and settling moves are script's, and check the same
     preference themselves — see stillMotion in app.js */
}

/* ---------- hit areas ----------
   These controls are drawn small on purpose, and were being hit small
   too — 28 to 36px against the 44 a thumb needs. An invisible box around
   each one takes the tap without moving anything that is drawn. Vertical
   only where buttons sit side by side, so neighbours never overlap. */
.btn-danger-quiet, .toast-do, .composer-cancel, .composer-post,
.note-sheet-x, .quad-add, .task-fix-btn, .gcal-go.acct-btn--quiet{position:relative}
.btn-danger-quiet::after, .toast-do::after, .composer-cancel::after, .composer-post::after,
.note-sheet-x::after, .quad-add::after, .signup-x::after, .gcal-go.acct-btn--quiet::after{
  content:""; position:absolute; inset:-8px;
}
.task-fix-btn::after{content:""; position:absolute; inset:-6px 0}


/* ============ THE PIECES ============
   The look (BRAND.md §5), the same as the iOS app's, screen for screen.
   The ground is flat: lilac by day, ink at night. On it sit pieces: a
   flat colour, an ink outline (--b-stroke) and a hard shadow with no
   blur. Tokens are bento.css's (--b-*, --p-*), loaded before this file.

   - Two curves only: --b-radius (16px), or a capsule.
   - The shadow is ink by day and blue at night, one colour per screen; a
     piece whose fill would match it casts orange (--b-shadow-ink under
     ink and navy, --b-shadow-blue under blue).
   - Pieces keep their day colours at night, so the type tokens inside
     one are put back to their day values; the ground and the type on it
     flip.
   - Pressing: a button sinks onto its shadow. Under reduced motion it
     dims instead; nothing moves.
   - Flat and even: nothing rotated, nothing blurred, nothing glowing. */

/* ---------- the ground ---------- */
html, body, .screen, .splash, #screen-home{background:var(--b-ground)}
.brand::before{background:var(--b-ground)}

/* ---------- a piece's own day ---------- */
.dump-welcome, .home-card, .note-card, .note-sheet, .note-tools,
.settings-group, .set-pro, .plan-card, .offline-note, .quad, .task,
.done-item, .clear-confirm, .store-full, .tabbar, .fb-thanks, .fb-input,
.fb-glyph, .cal-months, .cal-item, .profile-card, .stat, .gcal-card,
.gcal-dupe, .signup-offer, .field-input, .avatar-opt, .avatar-big,
.icon-btn, .cal-nav, .settings-back, .btn-soft, .now-day, .cat-pill,
.view-toggle, .fmt-btn, .chip, .empty-mark, .cal-ghost, .fb-give-quiet-btn,
.gcal-go.acct-btn--quiet, .quad-add, .p-do, .note-canvas, .paper-swatch, .paper-dot{
  --ink:var(--black); --ink-soft:var(--navy); --muted:var(--stone); --faint:#6B6B7A;
  --line:#E4E2F5; --line-strong:#CFCBE9; --accent:var(--blue); --on-accent:#FFFFFF;
  --violet-ink:var(--violet); --surface:#FFFFFF; --wash:#F4F3FE; --wash-2:#E9E7FD;
  --danger-ink:var(--danger);
  --b-focus:var(--blue);   /* the night ring is pale; on a white piece it would vanish */
}

/* ---------- the piece ---------- */
.dump-welcome, .home-card, .note-card, .settings-group, .plan-card,
.offline-note, .task, .done-item, .clear-confirm, .store-full, .fb-thanks,
.cal-months, .cal-item, .profile-card, .stat, .gcal-card, .signup-offer{
  --l:var(--b-lift);
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line);
  border-radius:var(--b-radius);
  box-shadow:var(--l) var(--l) 0 var(--b-shadow);
}
.now-card, .dump-welcome, .profile-card{--l:var(--b-lift-lg)}
/* The cold start, the profile and the signup offer are violet-pale. */
.dump-welcome, .profile-card, .signup-offer{background:var(--p-violet-pale)}
/* A run of sibling cards takes the quiet fills in turn. */
.stat-row > .stat:nth-child(4n+2){background:var(--p-pale)}
.stat-row > .stat:nth-child(4n+3){background:var(--p-violet-pale)}
.stat-row > .stat:nth-child(4n+4){background:var(--p-blue-pale)}
.stat-row > .stat:not(:nth-child(4n+1)){--muted:var(--navy); --faint:var(--navy)}

/* An inset: a piece with no shadow, for a box inside a piece. */
.dw-rows, .first-step, .steps-block, .fb-input, .field-input, .gcal-dupe{
  background:var(--p-white);
  border:var(--b-stroke-thin) solid var(--b-line);
  border-radius:var(--b-radius);
  box-shadow:none;
}
.first-step{background:var(--p-violet-pale)}
.steps-block{background:var(--p-pale)}
.first-step-label, .steps-block .first-step-label{color:var(--ink)}
.first-step-text, .steps li{color:var(--ink)}
.steps li::before{background:var(--p-ink); color:var(--p-on-dark)}
.fb-input, .field-input{border-width:var(--b-stroke); color:var(--ink)}
.fb-input:focus, .field-input:focus{border-color:var(--b-line); box-shadow:none}
.gcal-dupe{background:var(--p-wash); color:var(--ink)}

/* ---------- buttons ---------- */
/* The primary: a violet capsule, 54px tall, with a hard shadow. */
.btn-primary, .composer-post{
  --l:var(--b-lift);
  min-height:54px;
  background:var(--p-violet); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  font-family:var(--display); font-size:19px; font-weight:800; letter-spacing:-.01em;
  box-shadow:var(--l) var(--l) 0 var(--b-shadow);
  transition:transform var(--b-release) var(--ease), box-shadow var(--b-release) var(--ease), opacity .18s var(--ease);
}
.btn-primary:hover, .btn-primary:active{transform:none}
.btn-primary:disabled, .composer-post:disabled{opacity:.45; box-shadow:var(--l) var(--l) 0 var(--b-shadow)}
.composer-post{--l:var(--b-lift-sm); min-height:44px; font-size:15px; padding:0 18px}

/* Secondary: a white capsule, ink type, no shadow. */
.btn-soft, .now-day, .fb-give-quiet-btn, .gcal-go.acct-btn--quiet, .view-toggle{
  min-height:44px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  font-family:var(--display); font-weight:700;
  box-shadow:none;
}
.btn-soft:hover, .now-day:hover, .fb-give-quiet-btn:hover,
.gcal-go.acct-btn--quiet:hover, .view-toggle:hover{background:var(--p-wash); color:var(--ink); border-color:var(--b-line)}

/* Blue and danger capsules: white type, a small shadow. */
.fb-give-btn, .btn-danger{
  --l:var(--b-lift-sm);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  color:var(--p-on-dark);
  transition:transform var(--b-release) var(--ease), box-shadow var(--b-release) var(--ease);
}
.fb-give-btn{background:var(--p-blue); box-shadow:var(--l) var(--l) 0 var(--b-shadow-blue)}
.btn-danger{background:var(--danger); box-shadow:var(--l) var(--l) 0 var(--b-shadow)}
.fb-give-btn:hover, .btn-danger:hover{filter:none; transform:none}

/* Icon buttons: 44px white circles with a small shadow. */
.icon-btn, .cal-nav{
  --l:var(--b-lift-sm);
  width:44px; height:44px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  box-shadow:var(--l) var(--l) 0 var(--b-shadow);
  transition:transform var(--b-release) var(--ease), box-shadow var(--b-release) var(--ease);
}
.icon-btn:hover, .cal-nav:hover{background:var(--p-wash); color:var(--ink); border-color:var(--b-line)}
/* The way back: a white capsule. */
.settings-back{
  --l:var(--b-lift-sm);
  min-height:44px; padding:0 16px 0 10px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  font-weight:700;
  box-shadow:var(--l) var(--l) 0 var(--b-shadow);
}
.settings-back:hover{color:var(--ink); background:var(--p-wash)}
/* The note's done button: an ink circle, casting orange. */
.sheet-go{
  --l:var(--b-lift-sm);
  width:44px; height:44px;
  background:var(--p-ink); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line);
  box-shadow:var(--l) var(--l) 0 var(--b-shadow-ink);
}
/* The theme button: the sun casts orange, the moon blue. */
.brand .theme-toggle{
  width:44px; height:44px;
  background:var(--p-pale); color:var(--black);
  border:var(--b-stroke) solid var(--b-line);
  box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--orange);
  transition:transform var(--b-release) var(--ease), box-shadow var(--b-release) var(--ease);
}
:root[data-theme="dark"] .brand .theme-toggle{box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--blue)}
.brand .theme-toggle:hover{background:var(--p-pale); color:var(--black); border-color:var(--b-line)}

/* Pressing. */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .btn-primary:hover:not(:disabled), .icon-btn:hover, .cal-nav:hover, .settings-back:hover{
    transform:translate(-2px,-2px); box-shadow:calc(var(--l) + 2px) calc(var(--l) + 2px) 0 var(--b-shadow);
  }
}
@media (prefers-reduced-motion:no-preference){
  .btn-primary:active:not(:disabled), .composer-post:active:not(:disabled), .icon-btn:active,
  .cal-nav:active, .settings-back:active, .sheet-go:active, .fb-give-btn:active, .btn-danger:active,
  .brand .theme-toggle:active{
    transform:translate(var(--l,var(--b-lift-sm)),var(--l,var(--b-lift-sm)));
    box-shadow:0 0 0 transparent; transition-duration:0s;
  }
}
@media (prefers-reduced-motion:reduce){
  .btn-primary:active, .composer-post:active, .icon-btn:active, .cal-nav:active, .settings-back:active,
  .sheet-go:active, .fb-give-btn:active, .btn-danger:active, .btn-soft:active, .now-day:active,
  .brand .theme-toggle:active{opacity:.7}
}

/* ---------- focus ----------
   The hard shadow lives in box-shadow, so the ring is an outline. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
[contenteditable]:focus-visible, .now-pick:focus-within{
  outline:3px solid var(--b-focus) !important; outline-offset:3px;
}
.note-title:focus-visible, .nb-text:focus-visible, .composer-input:focus-visible{outline:0 !important}

/* ---------- chips and pills ---------- */
.chip{
  min-height:24px; padding:3px 11px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
  font-family:var(--display); font-size:12px; font-weight:600;
}
.chip--time{background:var(--p-white); color:var(--blue); border-color:var(--b-line)}
.chip--when{background:var(--p-pale); color:var(--ink); border-color:var(--b-line)}
.chip--when.is-late, .chip--urgent{background:var(--orange); color:var(--black); border-color:var(--b-line)}
.dw-thoughts li{
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
}
.dw-tick{border:var(--b-stroke-thin) solid var(--b-line)}
.dw-rows li + li{border-top:var(--b-stroke-thin) dashed var(--line-strong)}
.dw-label{color:var(--ink)}

/* The category bar: white capsules; the chosen one is ink (blue at night). */
.cat-pill{
  min-height:44px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  font-family:var(--display); font-weight:700;
}
.cat-pill:hover{color:var(--ink); border-color:var(--b-line); background:var(--p-wash)}
.cat-pill.is-on{background:var(--p-ink); color:var(--p-on-dark); border-color:var(--b-line)}
:root[data-theme="dark"] .cat-pill.is-on{background:var(--p-blue)}
.cat-pill-n{background:var(--p-wash); color:var(--ink)}
.cat-pill.is-on .cat-pill-n{background:var(--p-white); color:var(--black)}

/* Formatting and paper buttons in the note sheets. */
.fmt-btn{
  min-height:44px;
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
}
.fmt-btn:hover{color:var(--ink); border-color:var(--b-line); background:var(--p-wash)}
.fmt-btn.is-on{background:var(--p-ink); color:var(--p-on-dark); border-color:var(--b-line)}
.paper-swatch, .note-tool--paper .paper-dot{border:var(--b-stroke-thin) solid var(--b-line)}
.paper-swatch.is-on{box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--b-shadow); transform:none}

/* ---------- lead-ins and labels ----------
   The line above a screen's content is the lead-in step (BRAND.md §4.2):
   Baloo 700, caps, ink, no tracking. A label inside a piece is the same
   at 13px. */
.eyebrow, .bucket-name{
  font-family:var(--display); font-size:15px; font-weight:700;
  letter-spacing:0; text-transform:uppercase; color:var(--b-ink);
}
.dump-dates-label, .cal-group-head, .dw-label, .first-step-label{
  font-family:var(--display); font-size:13px; font-weight:700; letter-spacing:0;
}
.dump-dates-label{color:var(--b-ink)}

/* ---------- home ---------- */
.headline{color:var(--ink)}
.home-card-title.is-late{
  display:inline-flex; align-items:center; align-self:flex-start;
  padding:2px 12px; background:var(--orange); color:var(--black);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
}
.home-card-more{color:var(--ink)}
.home-card-more:hover{color:var(--blue)}
/* Next up: rows parted by dashed rules, each led by a 10px ink dot,
   orange when late. */
.home-today-row{padding:11px 12px 11px 26px; border-radius:0}
.home-today-row + .home-today-row{border-top:var(--b-stroke-thin) dashed var(--line-strong)}
.home-today-row::before{
  top:calc(11px + .45em); bottom:auto; left:6px;
  width:10px; height:10px; border-radius:var(--b-pill);
  background:var(--black);
}
.home-today-row:hover{background:var(--p-wash)}
.home-today-row:hover::before{background:var(--black)}
.home-today-row.is-late::before{background:var(--orange)}
.home-today-row.is-late .home-today-meta{color:var(--ink)}
.now-title:hover{color:var(--ink)}
.now-late{
  background:var(--orange); color:var(--black);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
}
.stat--overdue.is-late{background:var(--orange); --muted:var(--black); --faint:var(--black)}
.stat--overdue.is-late strong{color:var(--black)}

/* ---------- lists ---------- */
.bucket-count{background:var(--p-white); color:var(--black); border:var(--b-stroke-thin) solid var(--b-line)}
.bucket--late .bucket-name{
  padding:2px 12px; background:var(--orange); color:var(--black);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
}
.bucket--late .bucket-count{color:var(--black)}
.task:hover{border-color:var(--b-line)}
.task.is-open{border-color:var(--b-line); background:var(--p-white)}
.task--urgent{border-left:var(--b-stroke) solid var(--b-line)}
/* The tick: a 26px ink ring, filled blue with a white tick. */
.task-check{width:26px; height:26px; border:var(--b-stroke) solid var(--b-line)}
.task-check:hover{border-color:var(--b-line); color:var(--blue)}
.task-check:active{background:var(--blue); color:#FFFFFF}
.task-edit{border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius); background:var(--p-white)}
.task-fix-btn{color:var(--ink)}
.task-fix-btn:hover{color:var(--ink); background:var(--p-wash)}
/* The swipe rails, the colours of the app's. */
.swipe-rail--remove{background:var(--danger-wash); color:var(--danger)}
.swipe-rail--done{background:var(--p-pale); color:var(--black)}
.swipe.is-armed.is-right .swipe-rail--remove{background:var(--danger); color:#FFFFFF}
.swipe.is-armed.is-left .swipe-rail--done{background:var(--blue); color:#FFFFFF}
.swipe-rails{border:var(--b-stroke) solid var(--b-line)}
.offline-note strong{color:var(--ink)}
.done-item{--l:var(--b-lift-sm)}
.done-item .p-do{
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill);
}
.done-item .p-do:hover{background:var(--p-wash); color:var(--ink)}
.clear-confirm.is-final{background:var(--danger-wash)}
.danger-zone, .reset-zone, .acct-danger, .fb-note, .fb-give, .cal-undated{border-top:var(--b-stroke-thin) dashed var(--b-muted)}

/* The matrix (the iOS shell only): solid quadrants. */
.quad{
  background:var(--p-white);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow);
}
.quad.is-drop{box-shadow:var(--b-lift) var(--b-lift) 0 var(--orange)}
.quad-add{background:var(--p-white); color:var(--ink); border:var(--b-stroke-thin) solid var(--b-line)}

/* ---------- notes ---------- */
.note-card{--l:var(--b-lift)}
.note-card:hover{border-color:var(--b-line); background:var(--p-wash)}
.note-card[data-paper]{background:var(--note-paper)}
.note-canvas{
  background-color:var(--note-paper); background-image:none;
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow);
}
.nb-box{border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-pill)}
.nb-box.is-done{background:var(--blue); border-color:var(--b-line)}
.note-file{border-radius:var(--b-radius)}
.empty-mark{background:var(--p-violet-pale); color:var(--black); border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius)}
.note-tools{
  background:var(--p-white);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow);
}
.note-tool{color:var(--ink)}
.note-tool:hover{color:var(--ink); background:var(--p-wash)}
.note-tool.is-on{background:var(--p-ink); color:var(--p-on-dark)}
.note-sheet{
  background:var(--b-ground); color:var(--b-ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:none;
}
.note-sheet-title{color:var(--b-ink)}
.note-sheet-x{color:var(--b-ink)}

/* ---------- settings ---------- */
.settings-group{overflow:hidden}
.set-row:not(.is-hidden) ~ .set-row::before{background:none; border-top:var(--b-stroke-thin) dashed var(--line-strong)}
.set-row:hover, .set-row:focus-visible{background:var(--p-wash)}
.set-row-face{background:var(--p-violet-pale); color:var(--black); border:var(--b-stroke-thin) solid var(--b-line)}
.set-row-value{color:var(--stone)}
.set-row:hover .set-chev{color:var(--ink)}
/* The Pro row: an ink piece, casting orange. */
.set-pro{
  --l:var(--b-lift);
  background:var(--p-ink); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:var(--l) var(--l) 0 var(--b-shadow-ink);
}
.set-pro:hover, .set-pro:active{transform:none; box-shadow:var(--l) var(--l) 0 var(--b-shadow-ink)}
.set-pro-badge{background:var(--p-violet-pale); color:var(--black); border:var(--b-stroke-thin) solid var(--b-line)}
.set-pro-note, .set-pro .set-chev{color:var(--p-pale)}
.plan-card--best{background:var(--p-violet-pale)}
.plan-tag{background:var(--p-ink); color:var(--p-on-dark); border:var(--b-stroke-thin) solid var(--b-line)}
.fb-glyph{background:var(--p-violet-pale); color:var(--black); border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius)}
.fb-thanks{background:var(--p-violet-pale)}
.avatar-big{background:var(--p-white); border:var(--b-stroke) solid var(--b-line)}
.avatar-opt{border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-radius); background:var(--p-white)}
.avatar-opt:hover{border-color:var(--b-line)}
.avatar-opt.is-on{background:var(--p-violet-pale); border-color:var(--b-line); box-shadow:var(--b-lift-sm) var(--b-lift-sm) 0 var(--b-shadow)}
.gcal-card.is-on{background:var(--p-pale)}
.gcal-card.is-stale{background:var(--orange)}
.gcal-card.is-stale .gcal-state, .gcal-card.is-stale .gcal-mark{color:var(--black)}
.gcal-mark, .acct-face{background:var(--p-violet-pale); color:var(--black); border:var(--b-stroke-thin) solid var(--b-line); border-radius:var(--b-radius)}
.gcal-card.is-on .gcal-mark, .acct-card.is-on .acct-face{background:var(--p-white)}
.version-tag{border:var(--b-stroke-thin) solid var(--b-ink); color:var(--b-ink)}

/* ---------- the calendar ---------- */
/* The pager is the piece, so one month shows and the next waits behind
   its edge; each pane keeps room for a focus ring inside it. */
.cal-pane{padding:10px}
.cal-months{padding:0}
.cal-day{border:var(--b-stroke-thin) solid transparent; border-radius:var(--b-radius); color:var(--ink)}
.cal-day:not(.is-blank):hover{background:var(--p-wash)}
.cal-day.is-today{border-color:var(--b-line)}
.cal-day.is-picked{background:var(--p-violet); border-color:var(--b-line); color:var(--p-on-dark)}
.cal-time{color:var(--blue)}
.cal-group-head{color:var(--ink); border-bottom:var(--b-stroke-thin) dashed var(--b-muted)}
.cal-group--late .cal-group-head{color:var(--ink)}
.cal-group--late .cal-item{border-left:var(--b-stroke) solid var(--b-line)}
.cal-today{color:var(--ink)}
/* The drag ghost: a white capsule, flat and level. */
.cal-ghost{
  background:var(--p-white); color:var(--ink);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow);
  transform:none;
}

/* ---------- the tab bar ----------
   A white capsule, 66px tall, with a hard shadow; the current tab is an
   ink capsule, and + a violet piece. Nothing blurred or see-through. */
.tabbar{
  min-height:66px;
  background:var(--p-white);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-pill);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow);
}
.tab{color:var(--ink); border-radius:var(--b-pill)}
.tab.is-on{background:var(--p-ink); color:var(--p-on-dark)}
.tab--add{
  background:var(--p-violet); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:2px 2px 0 var(--b-shadow);
}
.tab-dot{background:var(--blue); box-shadow:0 0 0 2px var(--p-white)}
.tab-badge{background:var(--blue); box-shadow:0 0 0 2px var(--p-white)}
.tab-badge.is-late{background:var(--orange); color:var(--black)}

/* ---------- the wait ----------
   The morph in a white piece, the line under it on the ground. */
.art--think{
  width:200px; padding:12px; box-sizing:border-box;
  background:var(--p-white);
  border:var(--b-stroke) solid var(--b-line); border-radius:var(--b-radius);
  box-shadow:var(--b-lift-lg) var(--b-lift-lg) 0 var(--b-shadow);
  margin-bottom:24px;
}
.loading-text{
  color:var(--b-ink);
  font-family:var(--display); font-size:24px; font-weight:800; letter-spacing:-.01em;
}

/* ---------- toast and notices ---------- */
.toast{
  background:var(--p-navy); color:var(--p-on-dark);
  border:var(--b-stroke) solid var(--b-line);
  box-shadow:var(--b-lift) var(--b-lift) 0 var(--b-shadow-ink);
}
.toast-do{border:var(--b-stroke-thin) solid var(--p-on-dark); color:var(--p-on-dark)}
.store-full{--l:var(--b-lift)}
.store-full strong{color:var(--ink)}

/* ---------- the composer ----------
   The sheet is the ground's colour with an outline and 16px top corners;
   nothing under it is blurred. */
.composer-scrim{background:rgba(16,16,24,.42)}
.composer-sheet{
  background:var(--b-ground); color:var(--b-ink);
  border:var(--b-stroke) solid var(--b-line); border-bottom:0;
  border-radius:var(--b-radius) var(--b-radius) 0 0;
  box-shadow:none;
}
.composer-bar{border-bottom:var(--b-stroke-thin) dashed var(--b-muted)}
.composer-title, .composer-cancel, .composer-name, .composer-input{color:var(--b-ink)}
.composer-input::placeholder, .composer-mic-hint{color:var(--b-muted)}
.composer-face{background:var(--p-violet-pale); color:var(--black); border:var(--b-stroke-thin) solid var(--b-line)}
/* The mic: a 92px blue circle with a hard shadow; listening, it sinks
   onto its shadow and does not grow. */
.composer-mic{
  --l:var(--b-lift-lg);
  width:92px; height:92px;
  background:var(--p-blue); color:var(--p-on-dark);
  border:3px solid var(--b-line);
  box-shadow:var(--l) var(--l) 0 var(--b-shadow-blue);
}
.composer-mic.is-live, .composer-mic.is-working{
  transform:translate(var(--l),var(--l)); box-shadow:0 0 0 transparent;
}
.composer-mic-ring{background:none; border:var(--b-stroke) solid var(--b-line)}
.composer-mic-level{border-color:var(--b-line)}
@media (prefers-reduced-motion:reduce){
  .composer-mic.is-live, .composer-mic.is-working{transform:none; opacity:.85}
}

/* ============ NESTED CORNERS ============
   BRAND.md §5: a shape that sits in a piece's corner takes the piece's
   radius minus the gap between their edges (the piece's outline plus its
   padding), down to square, so the two curves run parallel. Each gap below
   repeats the padding of the rule it names; change one, change both.
   Where the gaps differ, the larger one counts. Free-standing capsules and
   circles (chips, small buttons, icon discs) keep their own shape. */
/* Square: the cold start's rows (.dump-welcome padding:16px 14px); a step
   in Next up or in an open task (.home-card 20px 18px, .task 14px 16px),
   and the task's edit box, 16px in from its sides; a task in a matrix
   quad (.quad 14px 14px 16px), and the rails behind it; the
   duplicate note and the confirm in a calendar card (.gcal-card 20px
   18px); a field in the profile (28px 22px 24px) or a note sheet (14px
   16px 18px). */
.dw-rows, .task .first-step, .task .steps-block, .task-edit, .quad .task, .quad .swipe-rails{
  border-radius:max(0px, calc(var(--b-radius) - var(--b-stroke) - 16px));
}
.home-card .first-step, .gcal-card .gcal-dupe, .gcal-card .clear-confirm{
  border-radius:max(0px, calc(var(--b-radius) - var(--b-stroke) - 20px));
}
.profile-card .field-input{border-radius:max(0px, calc(var(--b-radius) - var(--b-stroke) - 28px))}
.note-sheet .field-input{border-radius:max(0px, calc(var(--b-radius) - var(--b-stroke) - 18px))}
/* A day sits 10px in from the month's outline (.cal-pane padding:10px). */
.cal-day{border-radius:max(0px, calc(var(--b-radius) - var(--b-stroke) - 10px))}
/* Inside the tab bar's capsule, the + is a capsule too. */
.tab--add{border-radius:var(--b-pill)}

/* ============ ICON STROKES ============
   BRAND.md §4.3: an icon's stroke is the stem of the text it sits with.
   It is drawn in screen pixels (vector-effect) and sized in em, so an
   icon inside its label follows the label's size, and the --stem-* token
   names the label's face and weight. The sprite's --icon-stem is Baloo 2 700
   unless a rule here says otherwise. A control with no words in it reads
   as the app's button label, Baloo 2 700 at 15px. A glyph alone in its
   own tile is a badge, not a word's neighbour: it keeps the stroke it was
   drawn with, through --icon-ve and --icon-stem, since a rule cannot
   reach a sprite's copy by where it sits. The sprite's stroke-width
   attributes are otherwise only the fallback; the mark keeps its own. */
[id^="icon-"]{stroke-width:var(--icon-stem, var(--stem-baloo-700))}
[id^="icon-"] *{vector-effect:var(--icon-ve, non-scaling-stroke)}
.task-check svg *, .swipe-rail svg *, .cal-nav svg *{vector-effect:non-scaling-stroke}
.icon-btn svg, .theme-toggle svg, .tab svg, .quad-add svg, .sheet-back svg, .sheet-go svg,
.note-tool svg, .note-sheet-x svg, .cal-nav svg{font-size:15px}
.cal-nav svg *{stroke-width:var(--stem-baloo-700)}
.task-check svg{font-size:15.5px}                       /* beside the task's title, Baloo 2 600 */
.task-check svg *{stroke-width:var(--stem-600)}
.swipe-rail svg *{stroke-width:var(--stem-baloo-700)}   /* the rail's word, which the svg inherits */
.set-chev{--icon-stem:var(--stem-600)}                  /* .set-row-title, Baloo 2 600 16px */
.gcal-mark, .fb-glyph svg, .empty-mark svg, .set-pro-badge svg{--icon-ve:none; --icon-stem:2.2px}  /* drawn: 2.2 of 24 */

/* ============ THE PILLS' EDGES ============
   The list pills scroll sideways under a fade (theme.css, "a strip's
   faded edges"): the first pill is solid until the row moves. */
.cat-bar{
  -webkit-mask-image:linear-gradient(90deg, transparent, black var(--edge-in) var(--edge-out), transparent);
          mask-image:linear-gradient(90deg, transparent, black var(--edge-in) var(--edge-out), transparent);
}
@supports (animation-timeline:scroll()){
  .cat-bar{
    --edge-out:100%;   /* no overflow, no timeline: nothing to fade */
    animation:edge-in linear both, edge-out linear both;
    animation-timeline:scroll(self x), scroll(self x);
    animation-range:0px 48px, calc(100% - 48px) 100%;
  }
}
