/* NoRush: warm, calm, with a clear identity.
   Warm cream paper, a soft serif for task titles, tinted cards in each
   task's color, and the shrinking disc as the signature element. */

:root {
  --bg: #f4efe6;
  --surface: #fffdf9;
  --surface-2: #efe8dc;
  --surface-3: #e6ded0;
  --ink: #262420;
  --ink-2: #4f4a43;
  --ink-3: #6b655b; /* the quiet grey still reads easily: 5 to 1 on the page colour */
  --line: #e7dfd2;
  --line-2: #d7cebf;
  --accent: #3f6b5a;
  --accent-soft: #e2ebe5;
  --btn: #262420;
  --btn-ink: #fbf7f0;
  --warm: #9a6b2c;
  --warm-soft: #f6ead6;
  --danger: #a9503c;
  --tint: 15%;
  --shadow: 0 1px 2px rgba(60, 45, 20, .05), 0 10px 30px -14px rgba(60, 45, 20, .18);
  --shadow-lg: 0 30px 70px -24px rgba(60, 45, 20, .35);
  --r: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  /* Atkinson Hyperlegible was drawn so that letters are hard to mix up (Il1, 0O). */
  --font: "Atkinson Hyperlegible", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", "Sitka Heading", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --spring: cubic-bezier(.22, 1, .36, 1); /* no overshoot: things settle, they never bounce */
  --calm: cubic-bezier(.4, 0, .2, 1);
  /* One set of timings, so everything moves at the same calm pace:
     touch  a button or row answering your pointer
     panel  something small opening (a menu, a hint, a section)
     scene  something big arriving (a dialog, the big card)
     leave  anything going away (a little quicker than it came) */
  --t-touch: .18s;
  --t-panel: .32s;
  --t-scene: .46s;
  --t-leave: .26s;
  /* Behind a dialog the page goes soft and out of focus, never dark. */
  --veil: color-mix(in srgb, var(--bg) 38%, transparent);
  --veil-blur: blur(16px) saturate(1.15);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171614; --surface: #201f1c; --surface-2: #2a2825; --surface-3: #34322e; --ink: #f0eae0; --ink-2: #bcb5a8; --ink-3: #9a9488;
    --line: #2f2d29; --line-2: #3d3a35; --accent: #9cc4b0; --accent-soft: #263029; --btn: #f0eae0; --btn-ink: #1b1a17;
    --warm: #d9ac68; --warm-soft: #33291a; --danger: #e08a74; --tint: 18%;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171614; --surface: #201f1c; --surface-2: #2a2825; --surface-3: #34322e; --ink: #f0eae0; --ink-2: #bcb5a8; --ink-3: #9a9488;
  --line: #2f2d29; --line-2: #3d3a35; --accent: #9cc4b0; --accent-soft: #263029; --btn: #f0eae0; --btn-ink: #1b1a17;
  --warm: #d9ac68; --warm-soft: #33291a; --danger: #e08a74; --tint: 18%;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); } /* the very first frame is already the right colour */
body { font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; display: block; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
.grow { flex: 1; }
.serif { font-family: var(--serif); }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; white-space: nowrap; transition: background var(--t-touch) var(--calm), border-color var(--t-touch) var(--calm), color var(--t-touch) var(--calm), transform var(--t-touch) var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--btn) 88%, var(--bg)); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.quiet:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.btn.glass { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: color-mix(in srgb, var(--ink) 12%, transparent); }
.btn.glass:hover { background: var(--surface); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.danger:hover { color: var(--danger); }
.btn.primary.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.primary.danger-fill:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
.modal.ask { width: min(440px, 100%); }
.modal.ask .lede { margin-bottom: 0; }

.link {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0;
  color: var(--ink-2); font-size: 13.5px; text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 3px; transition: color var(--t-touch) var(--calm), text-decoration-color var(--t-touch) var(--calm);
}
.link:hover { color: var(--ink); text-decoration-color: var(--line-2); }
.links { display: flex; flex-wrap: wrap; gap: 4px 22px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  border: 0; background: transparent; color: var(--ink-3); transition: background var(--t-touch) var(--calm), color var(--t-touch) var(--calm);
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.sm { width: 28px; height: 28px; }

.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt {
  height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-2); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t-touch) var(--calm), border-color var(--t-touch) var(--calm), color var(--t-touch) var(--calm);
}
.opt:hover { border-color: var(--ink-3); color: var(--ink); }
.opt[aria-pressed="true"] { border-color: var(--btn); background: var(--btn); color: var(--btn-ink); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }

/* ---------- inputs ---------- */
.input, .textarea, .select {
  width: 100%; height: 40px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); transition: border-color var(--t-touch) var(--calm), box-shadow var(--t-touch) var(--calm);
}
.textarea { height: auto; min-height: 70px; padding: 10px 14px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 6%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }

.add {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-3);
  transition: border-color var(--t-touch) var(--calm), box-shadow var(--t-touch) var(--calm);
}
.add:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 5%, transparent); }
.add input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; height: 100%; font-size: 14.5px; color: var(--ink); }
.add input::placeholder { color: var(--ink-3); }

/* ---------- check ---------- */
.check {
  position: relative; flex: none; width: 22px; height: 22px; border-radius: 999px; padding: 0;
  border: 2px solid var(--line-2); background: var(--surface); color: transparent;
  display: grid; place-items: center; transition: border-color var(--t-touch) var(--calm), background var(--t-touch) var(--calm), color var(--t-touch) var(--calm), transform var(--t-panel) var(--spring);
}
.check:hover { border-color: var(--c, var(--accent)); color: var(--c, var(--accent)); }
.check.done { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; transform: scale(1.1); }
.check .ic { width: 12px; height: 12px; stroke-width: 3; }
/* The circle stays small and calm, but the area that answers a click is nearly twice as wide. */
.check::before { content: ""; position: absolute; inset: -9px; border-radius: 999px; }
.check.tinted { border-color: color-mix(in srgb, var(--c, var(--accent)) 70%, var(--surface)); }

/* ripple when something is done: calm, colored, over in half a second */
.ripple { position: fixed; pointer-events: none; z-index: 90; border-radius: 999px; border: 2px solid var(--c, var(--accent)); animation: ripple .7s var(--ease) forwards; }
@keyframes ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }

/* ---------- task icon badge ---------- */
.badge {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px;
  background: color-mix(in srgb, var(--c, var(--accent)) 24%, var(--surface)); font-size: 18px; line-height: 1;
  color: color-mix(in srgb, var(--c, var(--accent)) 70%, var(--ink)); font-family: var(--serif); font-weight: 600;
}
.badge .bi { filter: drop-shadow(0 0 .6px rgba(40, 30, 15, .55)) drop-shadow(0 1px 1.5px rgba(40, 30, 15, .16)); }
.badge.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 26px; }
.badge.xl { width: 76px; height: 76px; border-radius: 22px; font-size: 38px; }

/* ---------- task rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.row {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  border-radius: 16px; transition: opacity var(--t-panel) var(--calm), background var(--t-touch) var(--calm), transform var(--t-panel) var(--ease);
}
.row:hover { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.row .body { flex: 1; min-width: 0; cursor: pointer; }
.row .title { font-size: 15.5px; overflow-wrap: anywhere; }
.row .meta { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 1px; }
.row .actions { display: flex; gap: 2px; opacity: 0; transition: opacity var(--t-touch) var(--calm); }
.row:hover .actions, .row:focus-within .actions { opacity: 1; }
.row .act-done:hover { color: var(--accent); background: var(--accent-soft); }
.row .act-delete:hover { color: #b5524a; background: color-mix(in srgb, #b5524a 12%, transparent); }
.row.is-current { background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.row.completing { opacity: 0; transform: translateX(12px); }
/* a deleted row that is turning to dust keeps its place, unseen, until the list closes up */
.row.gone { visibility: hidden; }
.row.vanish { background: color-mix(in srgb, var(--c, var(--accent)) 10%, var(--surface)); }
.row.vanish .actions { opacity: 1; }
.dust { position: fixed; z-index: 60; pointer-events: none; }
.row.dragging { opacity: .35; }
.row.drop-before::before { content: ""; position: absolute; left: 12px; right: 12px; top: -3px; height: 2px; border-radius: 2px; background: var(--ink-2); }
.drop-zone.over { background: color-mix(in srgb, var(--ink) 4%, transparent); border-radius: var(--r-lg); }
.empty { padding: 16px 12px; color: var(--ink-3); font-size: 13.5px; list-style: none; }

/* timeline (Structured-style: see how your day actually flows) */
.timeline .row { padding-left: 4px; }
.tl-time { flex: none; width: 66px; text-align: right; font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-time small { margin-left: 2px; font-size: 9.5px; letter-spacing: .02em; }
.tl-time.tl-now { color: var(--ink); font-weight: 700; }
.timeline .row::after {
  content: ""; position: absolute; left: 92px; top: -6px; bottom: -6px; width: 2px; background: var(--line); z-index: 0;
}
.timeline .row:first-child::after { top: 50%; }
.timeline .row .check { z-index: 1; }
.tl-end { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 4px; color: var(--ink-3); font-size: 13px; list-style: none; position: relative; }
.tl-end .tl-flag { width: 22px; display: grid; place-items: center; position: relative; z-index: 1; }
.tl-end .tl-flag::before { content: ""; width: 10px; height: 10px; border-radius: 99px; background: var(--line-2); }
.tl-end::after { content: ""; position: absolute; left: 92px; top: -6px; height: 50%; width: 2px; background: var(--line); }

/* ---------- disc (signature element: time you can see) ---------- */
.disc { position: relative; flex: none; }
.disc svg { display: block; }
.disc .disc-face { fill: color-mix(in srgb, var(--surface) 62%, transparent); }
.disc .disc-track { stroke: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--surface-2)); }
.disc .disc-arc { stroke: var(--c, var(--accent)); transition: stroke-dashoffset 1s linear, opacity var(--t-touch) var(--calm); }
.disc .disc-dots { stroke: color-mix(in srgb, var(--ink) 22%, transparent); stroke-width: 3; stroke-linecap: round; }
.disc.preview .disc-arc { transition: stroke-dashoffset .45s var(--ease), opacity var(--t-touch) var(--calm); }
.disc-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 18%; line-height: 1.2; }
.disc-in b { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); }
.disc-in span { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
/* Two even lines ("Even five / minutes counts."), never one word left alone on the second. */
.disc-in .disc-note { margin: 0; max-width: 9em; font-size: 14px; line-height: 1.4; text-wrap: balance; }
.clock { display: grid; justify-items: center; }
.clock.paused .disc-arc { stroke: var(--ink-3); }
.clock-time { font-family: var(--serif); font-size: 52px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.clock-sub { font-size: 14px; color: var(--ink-2); margin-top: 8px; }

/* ---------- the one thing (hero card) ---------- */
.now {
  --c: var(--accent);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: 34px 38px; border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--c) var(--tint), var(--surface));
  box-shadow: var(--shadow);
}
.now.enter { animation: rise var(--t-scene) var(--spring); }
.now-main { min-width: 0; }
/* The card changed because something small went away (a task was deleted): the card stays solid and only its words ease in. */
.now.settle .now-main, .now.settle .now-side { animation: settle var(--t-panel) var(--calm); }
@keyframes settle { from { opacity: .3; } }
.now-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.label { margin: 0; font-size: 13px; font-weight: 500; color: color-mix(in srgb, var(--c) 55%, var(--ink-2)); }
.now-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.015em; overflow-wrap: anywhere; }
.now-title.clickable { cursor: pointer; }
.now-meta { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.now-step {
  display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 16px; font-size: 15.5px;
  border-radius: 16px; background: color-mix(in srgb, var(--surface) 72%, transparent);
}
.now-step .step-k { font-size: 13px; color: var(--ink-3); margin-right: 2px; white-space: nowrap; }
.now-step.plain { background: none; padding: 0; }
.durs { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; animation: rise var(--t-panel) var(--spring); }
.durs .k { font-size: 13px; color: var(--ink-2); margin-right: 4px; }
.dur { height: 32px; min-width: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); background: transparent; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: background var(--t-touch) var(--calm), border-color var(--t-touch) var(--calm), color var(--t-touch) var(--calm), box-shadow var(--t-touch) var(--calm); }
.dur:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); }
.dur[aria-pressed="true"] { background: var(--surface); border-color: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.now-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
/* The small actions on the card are real buttons with an icon: easy to see as clickable, still quiet. */
.now .links { margin: 14px 0 0 -12px; gap: 2px; }
.now .links .link { height: 40px; padding: 0 12px; gap: 8px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); transition: background var(--t-touch) var(--calm), color var(--t-touch) var(--calm); }
.now .links .link:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); text-decoration-color: transparent; }
.now-side { display: grid; justify-items: center; gap: 10px; text-align: center; }
.now-input { margin-top: 18px; max-width: 540px; }
.now-input .add { background: color-mix(in srgb, var(--surface) 85%, transparent); height: 52px; }
.now-input .add input { font-size: 16px; }
.focus-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.focus-ctrl .btn { height: 46px; padding: 0 20px; font-size: 15px; }
.focus-ctrl .btn.quiet { padding: 0 14px; }

/* Focus on the new tab: its own quiet scene, no card. The task, a big ring and a few controls,
   in the middle of the page (the page behind turns a soft green, see newtab.css). */
.now.centered { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 0; background: none; box-shadow: none; }
.now.centered .now-main { display: grid; justify-items: center; width: 100%; }
.focus-chip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 72%, transparent); font-size: 14px; font-weight: 700; color: color-mix(in srgb, var(--c) 40%, var(--ink)); }
.focus-chip .badge { width: 32px; height: 32px; border-radius: 999px; }
.focus-chip .pulse-dot { margin-left: 2px; }
.now.centered .now-title { max-width: 720px; margin-top: 16px; }
.now.centered .clock { margin-top: 24px; }
.now.centered .disc-face { fill: color-mix(in srgb, var(--surface) 78%, transparent); }
.now.centered .now-step { margin-top: 24px; max-width: 560px; text-align: left; background: var(--surface); box-shadow: var(--shadow); }
.now.centered .now-meta, .now.centered .note { max-width: 520px; }
.now.centered .focus-ctrl { justify-content: center; margin-top: 24px; }
.now.centered .links { justify-content: center; margin: 10px 0 0; }
.note { margin: 16px 0 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--warm-soft) 80%, transparent); color: var(--warm); font-size: 13.5px; }
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 99px; background: var(--c); }
/* The ring that grows and fades is a copy of the dot that scales up behind it. It looks the same
   as animating a shadow, but only size and opacity move, so the page is never repainted for it. */
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--c); opacity: 0; animation: breathe 3.5s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .45; } 50% { transform: scale(2.5); opacity: 0; } }

/* ---------- shuffle deck (pick for me) ---------- */
.deck { position: relative; height: 250px; margin: 10px 0 18px; perspective: 900px; }
.deck-back, .deck-card {
  position: absolute; inset: 0 20px; border-radius: 24px;
  background: color-mix(in srgb, var(--c, var(--accent)) var(--tint), var(--surface)); box-shadow: var(--shadow);
}
.deck-back.b1 { transform: translate(-14px, 10px) rotate(-5deg) scale(.97); opacity: .9; filter: saturate(1.2); }
.deck-back.b2 { transform: translate(16px, 16px) rotate(6deg) scale(.94); opacity: .75; filter: saturate(1.3); }
.deck-card { display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; cursor: pointer; }
.deck-card .dt { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; max-width: 380px; }
.deck-card .dm { font-size: 13.5px; color: var(--ink-2); }
.deck-card.out { animation: cardOut .22s var(--ease) forwards; }
.deck-card.in { animation: cardIn .34s var(--spring); }
@keyframes cardOut { to { transform: translateX(-70px) rotate(-10deg); opacity: 0; } }
@keyframes cardIn { from { transform: translateX(50px) rotate(7deg) scale(.95); opacity: 0; } }
.deck-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.deck-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.deck-foot label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); cursor: pointer; }
.deck-foot input { accent-color: var(--btn); }

/* ---------- modal / sheet ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 50; background: var(--veil);
  -webkit-backdrop-filter: var(--veil-blur); backdrop-filter: var(--veil-blur);
  display: grid; place-items: center; padding: 16px; animation: fade var(--t-panel) var(--calm);
}
.modal {
  width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 30px;
  animation: rise var(--t-scene) var(--spring);
}
.modal h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.modal .lede { margin: 0 0 20px; color: var(--ink-2); }
.modal:focus, .sheet:focus { outline: none; }
.modal .foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.modal .foot .spacer { flex: 1; }
.backdrop.sheet-mode { place-items: stretch end; padding: 12px; }
.sheet { width: min(460px, 100vw); height: calc(100vh - 24px); overflow: auto; background: var(--surface); box-shadow: var(--shadow-lg); border-radius: var(--r-xl); padding: 24px 26px 40px; animation: slide var(--t-scene) var(--spring); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slide { from { opacity: 0; transform: translateX(20px); } }

.sheet-head { display: flex; align-items: flex-start; gap: 14px; }
.sheet-title { flex: 1; font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.25; border: 0; background: transparent; resize: none; outline: none; padding: 4px 0; field-sizing: content; min-height: 34px; }
.sec { margin-top: 24px; }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; align-items: center; gap: 10px; padding: 7px 2px; }
.step .st { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.step.done .st { text-decoration: line-through; color: var(--ink-3); }
.step .icon-btn { opacity: 0; }
.step:hover .icon-btn { opacity: 1; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; min-height: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-foot { display: flex; align-items: center; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.icon-grid button { display: grid; place-items: center; height: 38px; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2); color: var(--ink-2); font-size: 18px; }
.icon-grid button:hover { border-color: var(--line-2); }
.icon-grid button[aria-pressed="true"] { border-color: var(--ink-2); background: color-mix(in srgb, var(--c) 25%, var(--surface)); }
.icon-grid .letter { font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink-2); }

/* ---------- tooltips ---------- */
.tip {
  position: fixed; left: 0; top: 0; z-index: 2147483600; max-width: 260px; padding: 6px 10px; border-radius: 10px;
  background: var(--btn); color: var(--btn-ink); font: 500 12.5px/1.35 var(--font); box-shadow: var(--shadow);
  pointer-events: none; opacity: 0; transform: translateY(2px);
  transition: opacity var(--t-touch) var(--calm), transform var(--t-touch) var(--calm);
}
.tip.on { opacity: 1; transform: none; }

/* ---------- toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; min-height: 42px;
  border-radius: 999px; background: var(--btn); color: var(--btn-ink); box-shadow: var(--shadow-lg);
  font-size: 13.5px; font-weight: 500; animation: rise var(--t-panel) var(--spring);
}
.toast.no-action { padding-right: 18px; }
.toast .btn { height: 28px; background: transparent; color: var(--btn-ink); border-color: color-mix(in srgb, var(--btn-ink) 30%, transparent); }
.toast.out { opacity: 0; transition: opacity var(--t-leave) var(--calm); }

/* ---------- misc ---------- */
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 100; }
.kbd { display: inline-block; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; color: var(--ink-2); }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background var(--t-panel) var(--calm); cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 99px; background: #fff; transition: transform var(--t-panel) var(--spring), background var(--t-panel) var(--calm); }
.switch input:checked + span { background: var(--btn); }
.switch input:checked + span::after { transform: translateX(16px); background: var(--btn-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.options { display: grid; gap: 6px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: var(--surface-2); border-radius: 16px; transition: background var(--t-touch) var(--calm), transform var(--t-touch) var(--ease); }
.option:hover { background: var(--surface-3); transform: translateX(2px); }
.option .oi { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); font-size: 18px; }
.option b { display: block; font-weight: 600; }
.option span { color: var(--ink-2); font-size: 13px; }

.pick-list { list-style: none; margin: 0; padding: 0; max-height: min(300px, 42vh); overflow: auto; display: grid; gap: 4px; }
.pick-list li { display: flex; align-items: center; border-radius: 14px; transition: background var(--t-touch) var(--calm), opacity var(--t-touch) var(--calm); }
.pick-list li.dragging { opacity: .45; background: var(--surface-2); }
.pick-list .grip { display: grid; place-items: center; width: 22px; align-self: stretch; color: var(--ink-3); opacity: .35; cursor: grab; transition: opacity var(--t-touch) var(--calm); }
.pick-list li:hover .grip { opacity: .9; }
.pick-list li:active .grip { cursor: grabbing; }
.pick-list label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 4px; border-radius: 14px; cursor: pointer; }
.pick-list label:hover { background: var(--surface-2); }
.pick-list input { accent-color: var(--btn); width: 17px; height: 17px; flex: none; }
.pick-list .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pick-list .src { font-size: 13px; color: var(--ink-3); }
.pick-list .badge { width: 30px; height: 30px; font-size: 15px; border-radius: 10px; }

.energy-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.energy-pick button { display: grid; justify-items: center; gap: 4px; padding: 14px 6px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-weight: 600; transition: background var(--t-touch) var(--calm), border-color var(--t-touch) var(--calm), color var(--t-touch) var(--calm); }
.energy-pick button:hover { border-color: var(--line-2); }
.energy-pick button[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.energy-pick button[aria-pressed="true"] small { color: inherit; opacity: .75; }
.energy-pick .e { font-size: 22px; }
.energy-pick small { color: var(--ink-3); font-size: 13px; font-weight: 400; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-row div { padding: 14px; border-radius: 16px; background: var(--surface-2); }
.stat-row b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; }
.stat-row span { font-size: 13px; color: var(--ink-3); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 5px 0; color: var(--ink-2); }

.readable body, .readable button, .readable input, .readable textarea { font-family: Verdana, Tahoma, "Segoe UI", sans-serif; letter-spacing: .01em; }
.readable { --serif: Verdana, Tahoma, sans-serif; }

@media (max-width: 720px) {
  .now { grid-template-columns: 1fr; padding: 26px 22px; }
  .now-side { justify-items: start; text-align: left; }
}

.swatches { display: flex; gap: 10px; }
.swatch { width: 28px; height: 28px; border-radius: 99px; border: 3px solid var(--surface); outline: 2px solid transparent; padding: 0; transition: transform var(--t-touch) var(--spring); }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { outline-color: var(--ink-2); }

/* ---------- scrollbars: thin, rounded, warm, and quiet until you need them ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 99px; border: 3px solid transparent; background-clip: padding-box;
  min-height: 40px;
}
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--ink) 30%, transparent); }
::-webkit-scrollbar-thumb:active { background-color: color-mix(in srgb, var(--accent) 60%, transparent); }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
/* inside cards, sheets and lists the bar is slimmer so it does not crowd the content */
.modal::-webkit-scrollbar, .sheet::-webkit-scrollbar, .pick-list::-webkit-scrollbar, .p-main::-webkit-scrollbar { width: 10px; }
.modal::-webkit-scrollbar-track, .sheet::-webkit-scrollbar-track { margin: 18px 0; }

/* segmented controls never wrap their labels */
.seg { flex: none; max-width: 100%; }
.seg button { white-space: nowrap; flex: none; }

/* ---------- simplified task editor ---------- */
.badge-btn { border: 0; padding: 0; background: none; border-radius: 16px; transition: transform var(--t-touch) var(--ease); }
.badge-btn:hover { transform: scale(1.05); }
.badge-btn:focus-visible { outline-offset: 3px; }
.look-panel { display: grid; gap: 14px; justify-items: start; margin-top: 16px; padding: 14px; border-radius: 18px; background: var(--surface-2); animation: rise var(--t-panel) var(--spring); }
.look-panel .icon-grid { width: 100%; }
.look-panel .icon-grid button { background: var(--surface); }
.steps-add { margin-top: 6px; }
.break-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; animation: rise var(--t-panel) var(--spring); }
.break-menu .muted { margin-right: 2px; }
.more-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 26px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-weight: 600; font-size: 13.5px; text-align: left;
}
.more-btn:hover { background: var(--surface-2); color: var(--ink); }
.more-btn .ic { color: var(--ink-3); transition: transform var(--t-panel) var(--spring); flex: none; }
.more-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.more-sum { flex: 1; min-width: 0; text-align: right; font-weight: 400; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-body { animation: rise var(--t-panel) var(--spring); }
.more-body .sec:first-child { margin-top: 18px; }
.sheet-foot .btn.is-done { background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); color: #fff; }

/* ---------- site footer ---------- */
.site-foot { text-align: center; font-size: 13px; color: var(--ink-3); padding: 26px 16px 30px; }
.site-foot a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--ink); }
.site-foot .sep { margin: 0 8px; }

/* on NoRush's own pages, the bubble steps aside while a panel or dialog is open */
html:has(.backdrop, .rw-back) > nudge-float { display: none !important; }

/* weekly goal slider */
.goal-ctl { display: grid; gap: 8px; min-width: 0; }
.goal-line { display: flex; align-items: center; gap: 12px; }
.goal-range {
  --p: 0%; flex: 1; min-width: 120px; height: 8px; margin: 0; border-radius: 99px; outline: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p));
}
.goal-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 99px; cursor: grab;
  background: var(--btn); border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.goal-range:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.08); }
.goal-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.goal-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 99px; background: var(--btn); border: 3px solid var(--surface); }
.goal-num { width: 78px; height: 34px; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; }
.goal-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.goal-hint .link { font-size: 13px; color: var(--accent); font-weight: 600; }

/* sound mixer: pills to pick, then one slider per picked sound */
.mixer { display: grid; gap: 14px; min-width: 0; }
.mixer input[type=range] { min-width: 0; width: 100%; margin: 0; box-sizing: border-box; }
.mx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mx-title { min-width: 0; }
.mx-head h4 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.mx-status { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-power {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 12px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 13px var(--sans); cursor: pointer;
  transition: background var(--t-panel) var(--calm), color var(--t-panel) var(--calm), border-color var(--t-panel) var(--calm);
}
.mx-power span { display: inline-grid; }
.mx-power[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.mx-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.mx-pill {
  display: flex; align-items: center; gap: 7px; min-width: 0; height: 38px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font: 500 13px var(--sans); cursor: pointer;
  transition: background var(--t-panel) var(--calm), border-color var(--t-panel) var(--calm), color var(--t-panel) var(--calm);
}
.mx-pill > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-pill:hover { border-color: var(--line-2); color: var(--ink); }
.mx-pill[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--ink); font-weight: 600; }
.mx-pill:focus-visible, .mx-chip:focus-visible, .mx-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mx-ic { flex: none; font-size: 16px; line-height: 1; }
.mx-pill .mx-ic { filter: grayscale(.6); opacity: .75; transition: filter var(--t-panel) var(--calm), opacity var(--t-panel) var(--calm); }
.mx-pill[aria-pressed="true"] .mx-ic { filter: none; opacity: 1; }
.mx-mix { display: grid; gap: 2px; padding: 6px 12px; border-radius: 14px; background: var(--surface-2); }
.mx-row { display: grid; grid-template-columns: 20px 74px minmax(0, 1fr) 26px; align-items: center; gap: 8px; height: 38px; animation: rowIn var(--t-scene) var(--spring) both; }
.mx-rname { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-x { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 99px; background: none; color: var(--ink-3); cursor: pointer; }
.mx-x:hover { background: var(--surface-3); color: var(--ink); }
.mx-empty { margin: 8px 0; font-size: 13px; color: var(--ink-3); text-align: center; }
.mx-sub { margin-bottom: -6px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.mx-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.mx-chip {
  height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: none;
  color: var(--ink-2); font: 500 12.5px var(--sans); cursor: pointer; transition: background var(--t-panel) var(--calm), border-color var(--t-panel) var(--calm), color var(--t-panel) var(--calm);
}
.mx-chip:hover { border-color: var(--line-2); color: var(--ink); }
.mx-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); }
.mx-foot { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.mx-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); }
.mx-line .switch { justify-self: end; }
.mx-vol {
  --p: 50%; height: 6px; border-radius: 99px; outline: none; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--accent) var(--p), var(--surface-3) var(--p));
}
.mx-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 99px; background: var(--btn); border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .22); cursor: grab; }
.mx-vol:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.mx-vol::-moz-range-thumb { width: 14px; height: 14px; border-radius: 99px; background: var(--btn); border: 2px solid var(--surface); }
.mx-note { margin: -4px 0 0; font-size: 13px; color: var(--ink-3); }
.mixer-modal { width: calc(100% - 20px); max-width: 370px; padding: 18px; }

/* ---------- calm motion ---------- */
/* Closing: dialogs fade and sink a little, never snap shut. */
.backdrop.leaving { pointer-events: none; animation: fadeOut var(--t-leave) var(--calm) forwards; }
.backdrop.leaving .modal { animation: sinkOut var(--t-leave) var(--calm) forwards; }
.backdrop.leaving .sheet { animation: slideOut var(--t-leave) var(--calm) forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sinkOut { to { opacity: 0; transform: translateY(6px) scale(.99); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(18px); } }
/* A task you just added eases into the list. */
.row-in { animation: rowIn var(--t-scene) var(--spring) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-4px); } }
/* Scene changes (meeting over, focus starts, next task) blur-fade across the whole page. */
::view-transition-group(root) { animation-duration: .7s; }
.vt-scene::view-transition-old(root) { animation: vtOut .45s var(--calm) both; }
.vt-scene::view-transition-new(root) { animation: vtIn .7s var(--calm) .1s both; }
@keyframes vtOut { to { opacity: 0; filter: blur(8px); } }
@keyframes vtIn { from { opacity: 0; filter: blur(8px); } }
.reduce-motion::view-transition-old(root), .reduce-motion::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* ---------- free trial, sign in and plans ---------- */
.trial-note { margin: -8px 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; color: var(--ink); }
.trial-chip {
  height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft); color: var(--ink); font: 600 12.5px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background var(--t-panel) var(--calm);
}
.trial-chip:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
#planSlot:empty { display: none; }

.signin { display: grid; gap: 12px; }
.si-google { width: 100%; justify-content: center; gap: 10px; height: 44px; font-weight: 600; }
.si-or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.si-row { display: flex; gap: 8px; }
.si-row .input { flex: 1; min-width: 0; }
.si-code { font-size: 20px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.si-err { margin: 0; min-height: 0; font-size: 13px; color: #b5524a; }
.si-err:empty { display: none; }
.si-sent, .si-small { margin: 0; font-size: 13px; color: var(--ink-2); }
.si-small { color: var(--ink-3); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.plan {
  display: grid; gap: 4px; justify-items: start; padding: 16px; border-radius: 16px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color var(--t-panel) var(--calm), box-shadow var(--t-panel) var(--calm), background var(--t-panel) var(--calm);
}
.plan:hover { border-color: var(--line-2); }
.plan[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.plan:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-name { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.plan-price { font-size: 13px; color: var(--ink-3); }
.plan-price b { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); }
.plan-note { font-size: 13px; font-weight: 600; color: var(--accent); }
.plan-fine { margin: 12px 0 0; font-size: 13px; color: var(--ink-3); }

#planGate { position: fixed; inset: 0; z-index: 140; }
body.plan-ended > :not(#planGate):not(.backdrop):not(.toasts) { visibility: hidden; }
.gate { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; overflow: auto; background: var(--bg); animation: fade .6s var(--calm); }
.gate-card { width: min(520px, 100%); display: grid; gap: 14px; justify-items: stretch; padding: 36px; border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-lg); animation: rise .7s var(--spring); }
.gate-card .logo { width: 40px; height: 40px; border-radius: 10px; background: url("../../icons/icon.svg") center / contain no-repeat; }
.gate-kicker { margin: 4px 0 -8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.gate-card h1, .gate-card h2 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.gate-card h1 { font-size: 32px; line-height: 1.15; }
.gate-card h2 { font-size: 22px; }
.gate-lede, .gate-card > p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.gate-go { height: 48px; font-size: 15px; justify-content: center; }
.gate-status:empty { display: none; }
.gate-status { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.gate-wait { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; color: var(--ink); }
.gate-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--ink-3); }
.gate.compact { padding: 14px; }
.gate.compact .gate-card { padding: 22px; gap: 10px; justify-items: start; }

.acct-line small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.acct-line b { font-size: 14px; }
.link.danger { color: #b5524a; }
.acct-delete { justify-self: start; font-size: 13px; }
body.plan-ended .backdrop { z-index: 160; }
body.plan-ended .toasts { z-index: 170; }
.gate-card { position: relative; }
.gate-close { position: absolute; top: 16px; right: 16px; }
.gate-look { justify-content: center; margin-top: -6px; }
.gate.compact .gate-close, .gate.compact .gate-look { display: none; }

/* View only: after the free week, your tasks can still be looked at. Controls that would change
   them are dimmed (a tap explains why), and one small bar offers a plan. */
.vo-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 120;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 18px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 14px 36px -18px rgba(30, 25, 15, .35); font-size: 13.5px; color: var(--ink-2);
  animation: fade var(--t-scene) var(--calm);
}
.vo-bar b { color: var(--ink); }
body.view-only { padding-bottom: 72px; }
body.view-only :is(#heroSlot, #park, #lists, #footLine) :is(button, .add, input):not(#laterToggle, #doneToggle, #showLists, #moreToday) { opacity: .5; cursor: default; }
.gate-links .gate-acts { display: flex; gap: 16px; }
body.view-only :is(#lists .row) { cursor: default; }
@media (max-width: 560px) { .vo-bar { flex-wrap: wrap; justify-content: center; border-radius: 20px; text-align: center; padding: 12px 14px; } }

/* ---------- page to page: the "bloom" ---------- */
/* Leaving: the pressed button glows, the page softly recedes, and a circle of the page's own
   colour opens from the button to fill the screen. */
.bloom-veil {
  position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  background:
    radial-gradient(circle at var(--x) var(--y), color-mix(in srgb, var(--accent) 12%, var(--bg)) 0, var(--bg) 60%);
  clip-path: circle(0px at var(--x) var(--y));
}
.bloom-veil.full { clip-path: none; }
/* Before the new page's code runs, the page itself shows the glow the last page ended on. */
html.bloom-pending { background: radial-gradient(circle at var(--bx) var(--by), color-mix(in srgb, var(--accent) 12%, var(--bg)) 0, var(--bg) 60%) fixed; }
html.bloom-pending body { background: transparent; }
.bloom-veil { transition: none !important; }
html.bloom-out { pointer-events: none; }
html.bloom-out body > :not(.bloom-veil) { animation: bloomRecede .48s cubic-bezier(.65, 0, .35, 1) forwards; }
@keyframes bloomRecede { to { opacity: .35; transform: scale(.985); filter: blur(3px); } }
.bloom-from { box-shadow: 0 0 0 8px var(--accent-soft), 0 0 30px 6px color-mix(in srgb, var(--accent) 35%, transparent); }

/* Arriving: the new page grows out of the same spot, each section settling in turn. */
html.bloom-in main > *, html.bloom-in header, html.bloom-in .site-foot {
  transform-origin: var(--bx) var(--by);
  animation: bloomGrow .75s cubic-bezier(.22, 1, .36, 1) both;
}
html.bloom-in main > :nth-child(1) { animation-delay: 60ms; }
html.bloom-in main > :nth-child(2) { animation-delay: 120ms; }
html.bloom-in main > :nth-child(3) { animation-delay: 180ms; }
html.bloom-in main > :nth-child(4) { animation-delay: 240ms; }
html.bloom-in main > :nth-child(n+5) { animation-delay: 300ms; }
html.bloom-in .site-foot { animation-delay: 300ms; }
@keyframes bloomGrow { from { opacity: 0; transform: scale(.94) translateY(10px); filter: blur(8px); } }

/* A page stays hidden until its first draw, then fades in. The fallback shows it anyway after 1.5s. */
html.booting body > :not(.backdrop):not(.toasts):not(.bloom-veil) { opacity: 0; animation: bootShow 0s 1.5s forwards; }
body > * { transition: opacity .4s var(--calm); }
@keyframes bootShow { to { opacity: 1; } }

/* popovers fade out */
.popover.leaving { pointer-events: none; animation: sinkOut var(--t-leave) var(--calm) forwards; }

/* folds (settings sections, task options) open and close smoothly where the browser supports it */
:root { interpolate-size: allow-keywords; }
details::details-content { height: 0; overflow: clip; opacity: 0; transition: height var(--t-panel) var(--calm), opacity var(--t-panel) var(--calm), content-visibility var(--t-panel) allow-discrete; }
details[open]::details-content { height: auto; opacity: 1; }
.reduce-motion details::details-content { transition: none; }

/* number sliders in settings */
.slide-val { flex: none; min-width: 64px; text-align: right; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* account: header button, sign-in window, trial welcome */
/* Pricing and the account button sit at the end of the header row, after a thin divider. */
#acctSlot:empty, #pricingSlot:empty { display: none; }
#acctSlot, #pricingSlot { display: flex; align-items: center; }
#pricingSlot { margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line-2); }
#pricingSlot:empty + #acctSlot { margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line-2); }
#acctSlot { margin-left: 4px; }

/* Pricing: the page's own colour with a dark outline, so it is easy to find but never shouts. */
.pricing-btn {
  height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid transparent; background: transparent; color: var(--ink-2);
  font: 600 13px var(--font); cursor: pointer; white-space: nowrap; transition: background var(--t-touch) var(--calm), transform var(--t-touch) var(--ease);
}
.pricing-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.pricing-btn:active { transform: scale(.97); }
.pricing-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* account menu under the avatar */
.acct-wrap { position: relative; display: flex; }
.acct-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 240px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: rise var(--t-panel) var(--spring);
}
.acct-menu.leaving { pointer-events: none; animation: sinkOut var(--t-leave) var(--calm) forwards; }
.acct-who { padding: 10px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.acct-who b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.acct-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: 500 13.5px var(--font); text-align: left; cursor: pointer; transition: background var(--t-touch) var(--calm);
}
.acct-item:hover, .acct-item:focus-visible { background: var(--surface-2); outline: none; }
.acct-item.quiet { color: var(--ink-2); }
.acct-ic { display: grid; place-items: center; color: var(--ink-3); }
.acct-sep { height: 1px; margin: 4px 0; background: var(--line); }
.acct-btn {
  height: 34px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: 600 13px var(--font); cursor: pointer; white-space: nowrap; transition: background var(--t-touch) var(--calm), border-color var(--t-touch) var(--calm), transform var(--t-touch) var(--ease);
}
/* Quiet on purpose: the only dark button on the page should be the one that starts your task. */
.acct-btn:hover { border-color: var(--ink-3); }
.acct-btn:active { transform: scale(.97); }
.acct-avatar {
  width: 34px; height: 34px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft); color: var(--ink); font: 600 14px var(--font); cursor: pointer; transition: box-shadow var(--t-touch) var(--calm);
}
.acct-avatar:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.acct-btn:focus-visible, .acct-avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.s-acct { display: grid; gap: 14px; }

.si-tabs { width: 100%; }
.si-tabs button { flex: 1; justify-content: center; }
.si-form { display: grid; gap: 8px; }
.si-form .btn { justify-content: center; height: 42px; margin-top: 2px; }
.si-forgot { justify-self: start; font-size: 13px; }
.si-links { display: flex; gap: 18px; font-size: 13px; }

.trial-welcome { display: grid; gap: 12px; justify-items: start; }
.tw-badge { padding: 5px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.trial-welcome h2 { margin: 2px 0 0; }
.trial-welcome .lede { margin: 0; }
.tw-points { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 12px; }
.tw-points li { display: flex; gap: 12px; align-items: flex-start; }
.tw-tick { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.tw-points b { display: block; font-size: 14.5px; }
.tw-points span { font-size: 13.5px; color: var(--ink-2); }
.tw-fine { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.si-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.signin > .btn.primary { justify-content: center; height: 42px; }

/* close button in the corner of dialogs */
.modal.has-x { position: relative; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; color: var(--ink-3); }
.modal-x:hover { color: var(--ink); }
.modal.has-x > h2:first-child, .modal.has-x > :first-child h2:first-child { padding-right: 36px; }
.si-waiting .si-google::after { content: "Finish in the Google window that just opened."; position: absolute; left: 0; right: 0; top: calc(100% + 6px); font-size: 13px; font-weight: 400; color: var(--ink-3); text-align: center; }
.si-waiting .si-google { position: relative; margin-bottom: 22px; }
.si-waiting .si-form, .si-waiting .si-tabs, .si-waiting .si-or { opacity: .45; pointer-events: none; transition: opacity var(--t-panel) var(--calm); }

/* checkout panel inside NoRush */
.modal.pay-modal { width: min(560px, 100%); padding: 0; overflow: hidden; display: grid; }
.pay { display: grid; grid-template-rows: auto 1fr auto; min-height: 0; }
.pay-head { padding: 18px 56px 14px 22px; border-bottom: 1px solid var(--line); }
.pay-head b { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.pay-head small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.pay-body { position: relative; height: min(640px, calc(100vh - 210px)); background: #fff; }
.pay-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.pay-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13.5px; color: #6b6b6b; background: #fff; }
.pay-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.pay-foot .link { font-size: 13px; }

/* sync */
.si-sync { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.si-sync-ic { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.si-sync b { display: block; font-size: 13.5px; font-weight: 600; }
.si-sync small { display: block; margin-top: 1px; font-size: 13px; color: var(--ink-3); }
.sync-box { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.sync-box .srow { align-items: flex-start; }
.sync-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-3); }
.sync-links:empty { display: none; }
.sync-links .link { font-size: 13px; }
.sync-err { color: #b5524a !important; }
.ob-signin { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); }

/* a document (the privacy policy) shown in a popup */
.modal.doc-modal { width: min(820px, 100%); height: min(880px, calc(100vh - 32px)); padding: 0; overflow: hidden; display: block; }
.doc-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.doc-modal .modal-x { top: 12px; right: 18px; background: var(--surface); box-shadow: var(--shadow); }

/* ---------- smooth scrolling, the light way: plain CSS, no library, nothing running ---------- */
/* When NoRush moves you somewhere itself (opening a Settings section, say) it glides instead of
   snapping. Your own wheel and trackpad scrolling is left to the browser, which is already smooth. */
.modal, .sheet, .pick-list { scroll-behavior: smooth; overscroll-behavior: contain; } /* a dialog that reaches its end does not start scrolling the page behind it */
.reduce-motion, .reduce-motion .modal, .reduce-motion .sheet, .reduce-motion .pick-list { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) { html, .modal, .sheet, .pick-list { scroll-behavior: auto !important; } }
