/* One hand-written stylesheet. No framework, no build step.

   Look: clean and calm, in the spirit of Stripe and Notion. A white and soft-grey base, one
   deep-blue accent, Inter for all text, thin borders and very light shadows. Light is the default;
   dark is a refined neutral theme (toggle in the header, or the device setting when nothing is saved).

   Kept on purpose for non-technical users on phones: readable sizes, 44px tap targets,
   status shown in words (never colour alone), and visible keyboard focus.

   Inter is served from /static/fonts (our Content-Security-Policy blocks third-party font hosts).
   Latin subset, SIL Open Font License; see LICENSES.txt. */

@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2"); }

:root {
  /* light palette */
  --bg: #f8fafc; --panel: #f1f5f9; --surface: #ffffff;
  --border: #e2e8f0; --border-strong: #cbd5e1;
  --text: #0f172a; --text-2: #334155; --muted: #586275;
  --accent: #1d4ed8; --accent-hover: #1e40af; --accent-soft: #eef3ff; --on-accent: #ffffff;
  --ok: #16a34a;   --ok-bg: #e9f7ef;   --ok-text: #166534;
  --soon: #d97706; --soon-bg: #fef3e2; --soon-text: #8a4a05;
  --over: #dc2626; --over-bg: #fdecec; --over-text: #b42318;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -10px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .28);
  --scrim: rgba(15, 23, 42, .5);
  --radius: 8px; --radius-lg: 12px; --gutter: clamp(1rem, 3vw, 3.5rem);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --panel: #0f1520; --surface: #131a27;
  --border: #243044; --border-strong: #34425a;
  --text: #e8ecf4; --text-2: #bcc5d6; --muted: #98a3b8;
  --accent: #86a8ff; --accent-hover: #adc4ff; --accent-soft: #16213a; --on-accent: #ffffff;
  --ok: #34d399;   --ok-bg: rgba(52, 211, 153, .13);  --ok-text: #6ee7b7;
  --soon: #fb923c; --soon-bg: rgba(251, 146, 60, .14); --soon-text: #fdba74;
  --over: #f87171; --over-bg: rgba(248, 113, 113, .15); --over-text: #fca5a5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  --scrim: rgba(3, 6, 12, .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --panel: #0f1520; --surface: #131a27;
    --border: #243044; --border-strong: #34425a;
    --text: #e8ecf4; --text-2: #bcc5d6; --muted: #98a3b8;
    --accent: #86a8ff; --accent-hover: #adc4ff; --accent-soft: #16213a; --on-accent: #ffffff;
    --ok: #34d399;   --ok-bg: rgba(52, 211, 153, .13);  --ok-text: #6ee7b7;
    --soon: #fb923c; --soon-bg: rgba(251, 146, 60, .14); --soon-text: #fdba74;
    --over: #f87171; --over-bg: rgba(248, 113, 113, .15); --over-text: #fca5a5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -10px rgba(0, 0, 0, .55);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    --scrim: rgba(3, 6, 12, .7);
    color-scheme: dark;
  }
}
/* button fill: the accent text colour is too light to carry white text in dark mode */
:root { --btn: var(--accent); --btn-hover: var(--accent-hover); }
:root[data-theme="dark"] { --btn: #3a64e4; --btn-hover: #2f55d4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --btn: #3a64e4; --btn-hover: #2f55d4; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html[data-text="large"] { font-size: 112.5%; }
html[data-text="xlarge"] { font-size: 125%; }
h1, h2, h3 { overflow-wrap: anywhere; }
body { margin: 0; min-height: 100vh; overflow-x: clip; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 1rem; font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column; }
.wrap { width: min(100% - 2rem, 44rem); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 2000; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---- header: a plain bar with a hairline ---- */
.wide { width: min(100% - 2 * var(--gutter), 112rem); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 500; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em;
  line-height: 1; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .glow { color: inherit; }
.mark { flex: none; border-radius: 8px; }
.mark-bg { fill: #1d4ed8; }
.nav-sections { display: flex; gap: .1rem; margin-inline: 1.25rem auto; }
.nav-sections a { text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .9rem; padding: .45rem .75rem; border-radius: var(--radius); }
.nav-sections a:hover { color: var(--text); background: var(--panel); }
nav.nav-account { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
nav a.pill, nav button.link, nav a.cta { white-space: nowrap; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: .9rem;
  padding: .45rem .8rem; min-height: 40px; display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: var(--radius); background: transparent; }
nav a.pill:hover, nav button.link:hover { color: var(--text); background: var(--panel); }
nav a.cta { background: var(--btn); color: var(--on-accent); font-weight: 600; margin-left: .25rem; }
nav a.cta:hover { background: var(--btn-hover); color: var(--on-accent); }
form.inline { display: inline; margin: 0; }
button.link { font: inherit; font-size: .9rem; cursor: pointer; }
#theme-toggle { gap: .45rem; }
.tt-ico { flex: none; }
@media (max-width: 52rem) { .nav-sections { display: none; } }
@media (max-width: 40rem) { #theme-toggle .tt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #theme-toggle { padding: .4rem .6rem; min-width: 40px; justify-content: center; } }
@media (max-width: 40rem) { .bar-auth { flex-wrap: wrap; } .bar-auth nav.nav-account { width: 100%; justify-content: space-between; flex-wrap: nowrap; } }
@media (max-width: 26rem) { .bar-auth nav.nav-account { flex-wrap: wrap; } }
@media (max-width: 24rem) { .site-header .brand-name { display: none; } }
@media (max-width: 30rem) { .bar { gap: .5rem; } nav.nav-account { gap: 0; } nav a.pill, nav button.link, nav a.cta { padding: .4rem .6rem; font-size: .82rem; } }

main { padding-block: 2.25rem 3.5rem; flex: 1; }
main.flush { padding-block: 0; }

/* ---- type ---- */
h1 { font-weight: 700; letter-spacing: -.03em; font-size: clamp(1.9rem, 4.4vw, 2.5rem); line-height: 1.15; margin: 0 0 .9rem; text-wrap: balance; }
h2 { font-weight: 650; letter-spacing: -.02em; font-size: 1.35rem; line-height: 1.25; margin: 0 0 .7rem; }
h3 { font-weight: 600; letter-spacing: -.01em; font-size: 1.05rem; line-height: 1.35; }
.lead { font-size: 1.125rem; color: var(--text-2); line-height: 1.6; }
.muted { color: var(--muted); }
.eyebrow { font-size: .875rem; font-weight: 600; color: var(--accent); margin: 0 0 .5rem; }
.glow { color: inherit; }

.hero { padding-block: 1rem 2rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem; margin-block: 1rem; box-shadow: var(--shadow-sm); }
.steps { padding-left: 1.25rem; }
.steps li { margin-block: .6rem; }

/* ---- buttons ---- */
.button, button.primary, button.secondary, button.danger {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.15rem; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--btn); color: var(--on-accent);
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
  box-shadow: var(--shadow-sm); transition: background-color .15s, border-color .15s, color .15s; }
.button:hover, button.primary:hover { background: var(--btn-hover); color: var(--on-accent); }
.button.secondary, button.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.button.secondary:hover, button.secondary:hover { background: var(--panel); color: var(--text); border-color: var(--border-strong); }
button.danger { background: var(--surface); border-color: var(--over); color: var(--over-text); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.25rem; align-items: center; }

/* ---- forms ---- */
label { display: block; font-size: .875rem; font-weight: 500; color: var(--text); margin: 1.1rem 0 .35rem; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .8rem; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); outline: 2px solid transparent; }
textarea { min-height: 6rem; }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--btn); vertical-align: middle; }
.help { color: var(--muted); font-size: .875rem; margin: .3rem 0 0; }
.errorlist { list-style: none; padding: 0; margin: .3rem 0 0; color: var(--over-text); font-weight: 500; font-size: .9rem; }
.alert { background: var(--over-bg); color: var(--over-text); padding: .8rem 1rem; border-radius: var(--radius);
  font-weight: 500; border: 1px solid color-mix(in srgb, var(--over) 30%, transparent); }

.messages { margin-bottom: 1rem; }
.message { padding: .75rem 1rem; border-radius: var(--radius); margin: .5rem 0; background: var(--ok-bg);
  color: var(--ok-text); font-weight: 500; border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.message.error, .message.warning { background: var(--over-bg); color: var(--over-text); border-color: color-mix(in srgb, var(--over) 30%, transparent); }
.banner { background: var(--soon-bg); color: var(--soon-text); border: 1px solid color-mix(in srgb, var(--soon) 35%, transparent);
  border-radius: var(--radius-lg); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.banner p { margin: 0 0 .6rem; }

/* ---- reminders ---- */
.reminder { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: space-between; align-items: flex-start; }
.reminder .r-title { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.reminder .meta { color: var(--muted); margin: .2rem 0 0; }
.badge { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 999px; font-weight: 600; font-size: .8125rem;
  line-height: 1.4; border: 1px solid transparent; }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.badge.soon { background: var(--soon-bg); color: var(--soon-text); border-color: color-mix(in srgb, var(--soon) 32%, transparent); }
.badge.overdue { background: var(--over-bg); color: var(--over-text); border-color: color-mix(in srgb, var(--over) 30%, transparent); }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.row-actions .button, .row-actions button { min-height: 44px; padding: .5rem 1.05rem; }
.done-list { list-style: none; padding: 0; margin: 0; }
.done-list li { padding: .65rem 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.done-list li:first-child { border-top: 0; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-block: 2.5rem 1.5rem; }
.foot-grid.three { grid-template-columns: 1.6fr 1fr 1fr; }
.foot-brand p { margin: .7rem 0 0; max-width: 22rem; }
.foot-col h2 { font-size: .875rem; font-weight: 600; letter-spacing: 0; color: var(--text); margin: 0 0 .8rem; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .brand, .site-footer .brand:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding-block: 1.1rem 1.6rem; border-top: 1px solid var(--border); font-size: .8125rem; }
.foot-bottom p { margin: 0; }
@media (max-width: 52rem) { .foot-grid, .foot-grid.three { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---- sign-in / sign-up: form card beside a short pitch ---- */
.auth { display: grid; grid-template-columns: 1fr minmax(0, 26rem); gap: 4rem; align-items: center; min-height: calc(100vh - 16rem); }
.auth-pitch h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); }
.auth-pitch ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.auth-pitch li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text-2); }
.tick { flex: none; width: 1.3rem; height: 1.3rem; margin-top: .2rem; color: var(--ok); }
.auth-card { margin: 0; padding: 2rem 1.9rem 1.8rem; box-shadow: var(--shadow); }
.auth-card h1, .auth-card h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-card .sub { margin: 0 0 .5rem; color: var(--muted); }
.auth-card label:first-of-type { margin-top: .6rem; }
.auth-card .actions { flex-direction: column; align-items: stretch; gap: .9rem; }
.auth-card .actions .primary { width: 100%; }
.auth-card .alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; font-size: .92rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 4.6rem; }
.pw-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 .7rem;
  background: transparent; border: 0; border-radius: 6px; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; }
.pw-toggle:hover { color: var(--text); }
@media (max-width: 52rem) { .auth { grid-template-columns: 1fr; gap: 1.5rem; min-height: 0; } .auth-pitch { order: 2; } .auth-pitch ul { margin-top: 1rem; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 30rem) { .card { padding: 1.1rem 1.1rem; } }

/* theme toggle (shown by js/theme.js; hidden without JavaScript) */

/* ---- error pages ---- */
.notfound { text-align: center; padding-block: 3rem 2rem; }
.notfound .big-num { font-size: clamp(5rem, 20vw, 9rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; margin: 0 0 .5rem; color: var(--border-strong); }
.notfound .actions { justify-content: center; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- reminder form: groups, template picker, email-time checkboxes ---- */
[hidden] { display: none !important; }
fieldset.group { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0 0; padding: 0; min-width: 0; }
fieldset.group legend { font-size: .875rem; font-weight: 600; color: var(--text); padding: 0 .6rem 0 0; margin-top: .9rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.label { display: block; font-size: .875rem; font-weight: 500; color: var(--text); margin: 1.1rem 0 .35rem; }
.tpl-grid { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .6rem; }
.tpl { display: flex; flex-direction: column; gap: .15rem; min-height: 64px; padding: .7rem .9rem; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tpl span { color: var(--muted); font-size: .85rem; }
.tpl:hover, .tpl.active { border-color: var(--accent); }
.tpl.active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---- reminder card extras ---- */
.reminder > div:first-child { flex: 1 1 18rem; min-width: 0; }
.reminder .r-link { overflow-wrap: anywhere; }
.reminder .r-notes { white-space: pre-line; overflow-wrap: anywhere; }
.todo-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.todo-list li { margin: .15rem 0; }
.todo-list form { margin: 0; }
.todo { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .3rem .5rem; text-align: left;
  font: inherit; font-weight: 400; color: var(--text); background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; box-shadow: none; }
.todo:hover { background: var(--panel); }
.todo .box { flex: none; width: 1.15rem; height: 1.15rem; border: 1.5px solid var(--border-strong); border-radius: 5px; display: inline-grid; place-items: center; background: var(--surface); }
.todo.done { color: var(--muted); text-decoration: line-through; }
.todo.done .box { background: var(--btn); border-color: var(--btn); color: var(--on-accent); }
.todo.done .box::after { content: "\2713"; font-size: .8rem; line-height: 1; font-weight: 700; text-decoration: none; }
@media (max-width: 30rem) { .field-row { grid-template-columns: 1fr; } }
@media (max-width: 24rem) { .bar { flex-wrap: wrap; } nav.nav-account { flex-wrap: wrap; justify-content: flex-end; } }

/* ---- collapsible sections ---- */
details.more, details.templates, details.docs { margin-top: 1.5rem; }
details > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .75rem; padding: .6rem 0; font-weight: 600; color: var(--text); }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-grid; place-items: center; flex: none; width: 1.4rem; height: 1.4rem;
  border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text-2); font-weight: 500; line-height: 1; }
details[open] > summary::before { content: "\2212"; }
details > summary .muted { font-weight: 400; font-size: .9rem; }
details.docs { margin: .8rem 0 0; }
details.docs > summary { font-size: .875rem; font-weight: 500; color: var(--text-2); }
.list-h { font-size: .875rem; font-weight: 600; color: var(--text); margin: 1rem 0 .1rem; }

/* ---- wider app pages ---- */
.wrap.wrap-wide { width: min(100% - 2.5rem, 80rem); }
.wrap.wrap-dash { width: calc(100% - 2 * var(--gutter)); max-width: none; }
.page-head { margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: .35rem; }
.page-head .lede { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 42rem; }

.add-grid { display: grid; gap: 1.25rem; align-items: start; }
.add-grid .card { margin: 0; }
.main-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.tpl-picker { margin-bottom: 1.25rem; }
.tpl-picker label { margin-top: 0; }
.tpl-row { display: flex; gap: .75rem; align-items: stretch; flex-wrap: wrap; }
.tpl-row select { flex: 1 1 16rem; width: auto; min-width: 0; max-width: 100%; }
.tpl-picker .help { margin-bottom: 0; }

.tpl-bar { padding: 1rem 1.25rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem 1.25rem; align-items: center; }
.tpl-bar > * { min-width: 0; }
.tpl-bar label { margin: 0; }
.tpl-bar .help { margin: 0; grid-column: 1 / -1; font-size: .85rem; }
.tpl-bar .tpl-row { flex-wrap: nowrap; }
.tpl-bar .tpl-row select { flex: 1 1 auto; }
@media (min-width: 44rem) { .tpl-bar { grid-template-columns: auto minmax(0, 1fr); } }

.form-card { padding: 1.6rem 1.7rem 1.35rem; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: .15rem 1.25rem; }
.form-grid.inner { padding: 0; }
.form-grid .field { min-width: 0; }
.form-grid .field > label, .form-grid .field > .label { margin-top: .9rem; }
.form-grid .help { font-size: .82rem; margin-top: .3rem; }
@media (min-width: 40rem) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.form-card textarea { min-height: 7rem; line-height: 1.5; resize: vertical; }

details.more { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0 1.1rem; background: var(--bg); }
details.more[open] { padding-bottom: 1.1rem; }
details.more > summary { padding: .85rem 0; }
details.more fieldset.group:first-of-type { border-top: 0; }
details.more .form-grid { margin-top: .1rem; }

#id_email_days { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .45rem; margin-top: .1rem; }
#id_email_days > div { margin: 0; }
#id_email_days label { display: flex; align-items: center; gap: .6rem; margin: 0; min-height: 42px; padding: .35rem .9rem;
  font-size: .9rem; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 999px; cursor: pointer; transition: border-color .15s, background-color .15s; }
#id_email_days label:hover { border-color: var(--muted); }
#id_email_days label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
#id_email_days label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-actions { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.form-actions .primary { min-width: 11rem; }

.side { padding: 1.35rem 1.4rem; }
.side h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { position: relative; margin: 0 0 .8rem; padding-left: 1.25rem; font-size: .92rem; color: var(--text-2); }
.side-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); }
.side-list li:last-child { margin-bottom: 0; }
.side p:last-child { margin-bottom: 0; overflow-wrap: anywhere; }
@media (min-width: 60rem) {
  .add-grid { grid-template-columns: minmax(0, 1fr) 20rem; }
  .side { position: sticky; top: 5rem; }
  .cards { grid-template-columns: 1fr 1fr; }
}

/* ================= Dashboard ================= */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.dash-head .eyebrow { margin-bottom: .2rem; }
.page-title { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.stat-num { display: block; font-weight: 700; font-size: 2rem; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 1.05rem; font-weight: 500; color: var(--muted); }
.stat-num.bad { color: var(--over-text); }
.stat-label { display: block; font-size: .8125rem; font-weight: 500; color: var(--muted); margin-top: .15rem; }
.stat-body { min-width: 0; }
.stat-title { display: block; font-size: 1.125rem; font-weight: 600; line-height: 1.25; margin: .15rem 0; overflow-wrap: anywhere; }
.stat-sub { font-size: .85rem; font-weight: 600; }
.stat-sub.ok { color: var(--ok-text); } .stat-sub.soon { color: var(--soon-text); } .stat-sub.overdue { color: var(--over-text); }
.ring { flex: none; }
.ring-bg { stroke: var(--border); }
.ring-fg { stroke: var(--btn); }
@media (max-width: 52rem) { .stats { grid-template-columns: 1fr; } .stat { padding: .85rem 1.1rem; } }

.empty { text-align: center; padding: 2.5rem 1.5rem; }

/* ---- Settings: calendar link ---- */
.cal-card { margin-top: 1.25rem; }
.cal-card h2 { margin-top: 0; }
.cal-row { display: flex; gap: .6rem; margin-top: .4rem; }
.cal-url { flex: 1; min-width: 0; font-family: var(--mono); font-size: .85rem; }
.copy-btn { white-space: nowrap; min-width: 8.5rem; }
.copy-btn.is-copied { background: var(--ok-bg); border-color: var(--ok); color: var(--ok-text); }
.copy-btn.is-copied::before { content: "\2713\00a0"; display: inline-block; font-weight: 700; }
.copy-btn.is-failed { background: var(--over-bg); border-color: var(--over); color: var(--over-text); }
.copy-note { min-height: 1.4em; margin: .5rem 0 0; font-size: .9rem; color: var(--ok-text); opacity: 0; transition: opacity .2s; }
.copy-note.fail { color: var(--over-text); }
.copy-note.show { opacity: 1; }
.cal-help { margin-top: .9rem; }
.cal-help summary { cursor: pointer; color: var(--text-2); }
.cal-reset { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-top: 1.1rem; }
.cal-reset .help { margin: 0; flex: 1 1 14rem; }
@media (max-width: 30rem) { .cal-row { flex-direction: column; } }

.cal-qr { margin: 0; flex: 0 0 auto; text-align: center; }
.cal-qr svg { display: block; width: 9.5rem; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.cal-qr figcaption { margin-top: .4rem; font-size: .8rem; color: var(--muted); }
@media (max-width: 40rem) { .cal-qr { display: none; } }
.cal-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2.5rem; margin: 1rem 0 .6rem; }
.cal-opt { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.cal-opt .button { width: 100%; justify-content: center; text-align: center; white-space: nowrap; }
.cal-opt .cal-qr svg { width: 8.5rem; }
@media (max-width: 40rem) { .cal-options { grid-template-columns: 1fr; gap: .6rem; } }

/* ---- icon tiles (a line icon on a tinted square; replaces the old illustrations) ---- */
.tile { display: inline-grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); }
.tile svg { width: 1.4rem; height: 1.4rem; }
.tile.u-soon { background: var(--soon-bg); color: var(--soon-text); }
.tile.u-overdue { background: var(--over-bg); color: var(--over-text); }
.tile.u-ok { background: var(--accent-soft); color: var(--accent); }

/* ================= "Coming up": a slim, slowly sliding strip ================= */
.suggest { margin: 1.25rem 0 1.75rem; padding: .85rem 1rem 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.sg-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; }
.sg-title { margin: 0; font-size: .95rem; font-weight: 600; color: var(--text); }
.sg-ctl { display: flex; align-items: center; gap: .35rem; }
.sg-ctl button { min-height: 32px; padding: 0 .75rem; border-radius: 999px; font-size: .8rem; line-height: 1; box-shadow: none; }
.sg-nav { min-width: 32px; padding: 0 !important; font-size: 1.2rem !important; }
.sg-track { list-style: none; margin: 0; padding: .15rem .1rem; display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sg-track::-webkit-scrollbar { display: none; }
.sg-track.sliding { scroll-snap-type: none; }
.sg-item { flex: 0 0 min(19rem, 86%); scroll-snap-align: start; display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.sg-item:hover, .sg-item:focus-within { border-color: var(--border-strong); }
.sg-art { flex: 0 0 auto; }
.sg-art .tile { width: 2.5rem; height: 2.5rem; border-radius: 8px; }
.sg-body { display: flex; flex-direction: column; min-width: 0; flex: 1; overflow: hidden; }
.sg-name { font-size: .92rem; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-when { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-actions { display: flex; align-items: center; gap: .35rem; }
.sg-actions form { margin: 0; }
.sg-add { min-height: 36px; padding: .3rem .8rem; border-radius: var(--radius); border: 0; font: inherit; font-size: .85rem; font-weight: 600;
  background: var(--btn); color: var(--on-accent); cursor: pointer; }
.sg-add:hover { background: var(--btn-hover); }
.sg-x { min-height: 36px; min-width: 36px; padding: 0; line-height: 1; font-size: 1.1rem; box-shadow: none; }
@media (min-width: 64rem) { .sg-item { flex-basis: calc((100% - .7rem) / 2); } }

.sg-track.ticking { overflow: hidden; display: block; scroll-snap-type: none; padding: .15rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.sg-belt { list-style: none; margin: 0; padding: 0; display: flex; gap: .75rem; width: max-content; animation: sg-run var(--dur, 120s) linear infinite; will-change: transform; }
.sg-belt .sg-item { flex: 0 0 19.5rem; }
@keyframes sg-run { to { transform: translateX(calc(-50% - .375rem)); } }
.suggest:hover .sg-belt, .suggest:focus-within .sg-belt, .suggest.paused .sg-belt { animation-play-state: paused; }

/* ---------- The details dialog ---------- */
.rd { width: min(36rem, calc(100vw - 1.5rem)); max-height: min(90vh, 52rem); padding: 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.rd[open] { display: flex; flex-direction: column; }
.rd::backdrop { background: var(--scrim); }
@media (prefers-reduced-motion: no-preference) {
  .rd[open] { animation: rd-in .2s ease-out; }
  .rd[open]::backdrop { animation: rd-fade .2s ease; }
}
@keyframes rd-in { from { opacity: 0; transform: translateY(.6rem); } }
@keyframes rd-fade { from { opacity: 0; } }
.rd-art { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: .8rem; padding: 1.1rem 4rem 0 1.5rem; }
.rd-close { position: absolute; top: .8rem; right: .8rem; margin: 0; }
.rd-close button { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; font-size: 1.4rem; line-height: 1; box-shadow: none; }
.rd-body { padding: .9rem 1.5rem 1.5rem; overflow-y: auto; }
.rd-body h2 { margin: 0 0 1rem; font-size: 1.5rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rd-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.2rem; margin: 0 0 1rem; }
.rd-facts div { min-width: 0; }
.rd-facts .full { grid-column: 1 / -1; }
.rd-facts dt { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.rd-facts dd { margin: .1rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }
.rd-link { margin: 0 0 .8rem; overflow-wrap: anywhere; }
.rd-notes { margin: 0 0 .8rem; white-space: pre-line; color: var(--text-2); }
.rd-actions { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
@media (max-width: 30rem) { .rd-facts { grid-template-columns: 1fr; } .rd-body { padding: .9rem 1.1rem 1.3rem; } .rd-art { padding-left: 1.1rem; } }

/* ================= Dashboard: two columns, reminders first ================= */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 2rem; align-items: start; }
@media (min-width: 70rem) { .dash { grid-template-columns: minmax(0, 1fr) 22rem; } }
@media (min-width: 110rem) { .dash { grid-template-columns: minmax(0, 1fr) 26rem; } }
.dash-main, .dash-side { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-content: start; }
.dash-main > .suggest { margin: 0; overflow: hidden; }
.dash-side > * { margin: 0; }
.dash-sub { margin: .25rem 0 0; color: var(--muted); }
.dash-sub .bad { color: var(--over-text); }
.dash-head-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.dash-head-actions .view-switch { margin: 0; }
.rem-group-h { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; font-size: 1.05rem; }
.count-pill { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .5rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.rem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; }
.rem-grid-attn { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.rem { --u: var(--ok); position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem 1rem; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--u);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease; }
.rem:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.rem.u-soon { --u: var(--soon); } .rem.u-overdue { --u: var(--over); }
.rem-grid-attn .rem { padding-block: 1.25rem 1.1rem; }
.rem-grid-attn .rem.u-overdue { background: linear-gradient(180deg, var(--over-bg), var(--surface) 70%); }
.rem-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.rem-top .badge { white-space: nowrap; }
.rem-count { display: flex; align-items: baseline; gap: .5rem; margin-top: .4rem; }
.rem-num { font-size: 2.6rem; line-height: 1; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rem-num.word { font-size: 2rem; }
.rem-grid-attn .rem-num { font-size: 3.1rem; }
.rem.u-overdue .rem-num { color: var(--over-text); } .rem.u-soon .rem-num { color: var(--soon-text); }
.rem-count span { font-size: .875rem; font-weight: 500; color: var(--muted); }
.rem-title { margin: .3rem 0 0; font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.rem-title a { color: inherit; text-decoration: none; }
.rem-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }  /* the whole card opens details */
.rem-title a:focus-visible { outline: none; }
.rem:has(.rc-open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rem-due { margin: 0; color: var(--text-2); font-size: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.dk-chip { font-size: .75rem; font-weight: 500; padding: .15rem .55rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--text-2); }
.dk-run { display: block; width: 100%; height: .3rem; margin: .5rem 0 .4rem; }
.dk-run .bg { fill: var(--border); } .dk-run .fg { fill: var(--u); }
.rem-actions { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: auto; padding-top: .3rem; }
.rem-actions form { margin: 0; }
.rem-actions button { min-height: 2.5rem; padding: .35rem 1rem; }
@media (prefers-reduced-motion: reduce) { .rem, .rem:hover { transition: none; transform: none; } }
.dash-side .today { margin: 0; }
.insights { margin: 0; }
@media (min-width: 70rem) { .dash-main .insights { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ================= Settings: side menu + sections ================= */
html[data-motion="calm"] *, html[data-motion="calm"] *::before, html[data-motion="calm"] *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }

.set-layout { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.set-stage { min-width: 0; }
.set-stage > * { margin: 0; min-width: 0; }
/* With JS only the open panel shows; without it every panel is stacked and the rail is plain links. */
.set-layout.is-js [data-panel] { display: none; }
.set-layout.is-js [data-panel].is-open { display: block; }
.set-layout:not(.is-js) [data-panel] + [data-panel] { margin-top: 1.25rem; }
.set-back { display: none; margin-bottom: .6rem; font-size: .9rem; font-weight: 500; text-decoration: none; color: var(--muted); }
.set-back:hover { color: var(--accent); }
.is-js .set-back { display: inline-block; }

/* ---- the rail: a column of signal lamps ---- */
.set-rail { display: flex; gap: .4rem; overflow-x: auto; padding: .35rem 0; position: sticky; top: 0; z-index: 20; scrollbar-width: none; background: var(--bg); }
.set-rail::-webkit-scrollbar { display: none; }
.set-rail a { flex: 0 0 auto; display: flex; align-items: center; gap: .55rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .9rem; white-space: nowrap; }
.set-rail a:hover { border-color: var(--border-strong); color: var(--text); }
.set-rail a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.led { flex: 0 0 auto; width: .6rem; height: .6rem; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 2px color-mix(in srgb, var(--border-strong) 25%, transparent); }
.rail-ok .led { background: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg), 0 0 .6rem color-mix(in srgb, var(--ok) 55%, transparent); }
.rail-todo .led { background: var(--soon); box-shadow: 0 0 0 2px var(--soon-bg), 0 0 .7rem color-mix(in srgb, var(--soon) 70%, transparent); }
.rail-skipped .led { background: transparent; border: 2px dashed var(--soon); box-shadow: none; }
.rail-plain .led, .rail-off .led, .rail-home .led { background: transparent; border: 2px solid var(--border-strong); box-shadow: none; }
.rail-home[aria-current="true"] .led { background: var(--accent); border-color: var(--accent); }
.rail-todo { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .rail-todo .led { animation: led-ping 2.4s ease-out infinite; }
  @keyframes led-ping { 0% { box-shadow: 0 0 0 2px var(--soon-bg), 0 0 0 0 color-mix(in srgb, var(--soon) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 2px var(--soon-bg), 0 0 0 .7rem transparent; } }
}

/* ---- the hub: brand rings + a board of tiles ---- */
.set-hub { padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background:
  radial-gradient(circle at 0 0, color-mix(in srgb, var(--accent) 11%, transparent), transparent 55%), var(--surface); box-shadow: var(--shadow-sm); }
.hub-top { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.6rem; margin-bottom: 1.4rem; }
.hub-top h2 { margin: 0 0 .25rem; }
.hub-sub { margin: 0 0 .8rem; color: var(--text-2); max-width: 38rem; }
.hub-top .actions { margin: 0; }
.hub-rings { flex: 0 0 auto; overflow: visible; }
.hub-rings .rg { fill: none; stroke: var(--border-strong); stroke-width: 2.4; stroke-dasharray: 3 4.5; stroke-linecap: round; }
.hub-rings .rg.lit { stroke: var(--accent); stroke-dasharray: none; filter: drop-shadow(0 0 3px color-mix(in srgb, var(--accent) 55%, transparent)); }
.hub-rings .core { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .hub-rings .rg:not(.lit) { animation: ring-turn 40s linear infinite; transform-origin: 40px 40px; }
  .hub-rings .core { animation: core-beat 3s ease-in-out infinite; transform-origin: 40px 40px; }
  @keyframes ring-turn { to { transform: rotate(360deg); } }
  @keyframes core-beat { 50% { transform: scale(1.35); opacity: .75; } }
}
.hub-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.stile { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: center; height: 100%; padding: .95rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.stile:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile-ic { grid-row: span 2; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.tile-ic svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stile b { font-weight: 600; line-height: 1.25; }
.stile small { color: var(--muted); font-size: .8125rem; line-height: 1.3; grid-column: 2; }
.stile:not(:has(small)) b { grid-row: span 2; align-self: center; }
.tile-ok .tile-ic { background: var(--ok-bg); color: var(--ok-text); }
.tile-ok small { color: var(--ok-text); }
.tile-todo { border-color: color-mix(in srgb, var(--soon) 60%, var(--border)); background: color-mix(in srgb, var(--soon-bg) 55%, var(--bg)); }
.tile-todo .tile-ic { background: var(--soon-bg); color: var(--soon-text); }
.tile-todo small { color: var(--soon-text); }
.tile-skipped { border-style: dashed; }
.tile-tag { position: absolute; top: -.55rem; right: .8rem; padding: .1rem .55rem; border-radius: 999px; background: var(--soon); color: #1c1400; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.tile-tag.soft { background: var(--panel); color: var(--muted); border: 1px solid var(--border); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .is-js .set-hub.is-open .stile { animation: tile-in .35s ease-out backwards; }
  .hub-tiles li:nth-child(2) .stile { animation-delay: 45ms; } .hub-tiles li:nth-child(3) .stile { animation-delay: 90ms; } .hub-tiles li:nth-child(4) .stile { animation-delay: 135ms; } .hub-tiles li:nth-child(5) .stile { animation-delay: 180ms; } .hub-tiles li:nth-child(6) .stile { animation-delay: 225ms; } .hub-tiles li:nth-child(7) .stile { animation-delay: 270ms; } .hub-tiles li:nth-child(8) .stile { animation-delay: 315ms; }
  .is-js .set-card.is-open { animation: panel-in .28s ease-out; }
  @keyframes tile-in { from { opacity: 0; transform: translateY(8px); } }
  @keyframes panel-in { from { opacity: 0; transform: translateX(10px); } }
}

/* ---- "recommended" strip inside phone / security ---- */
.set-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin: 0 0 1.1rem; padding: .85rem 1rem; border: 1px solid color-mix(in srgb, var(--soon) 55%, var(--border)); border-left-width: 4px; border-radius: var(--radius); background: var(--soon-bg); color: var(--soon-text); }
.set-nudge p { margin: 0; flex: 1 1 18rem; }
.set-nudge form { margin: 0; }

.set-card { scroll-margin-top: 4.5rem; }
.set-card h2 { margin-top: 0; }
.set-facts { display: grid; gap: .8rem 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 0 0 1rem; }
.set-facts dt { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.set-facts dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.set-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin: 1rem 0; padding: .85rem 1rem; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius); }
.set-inline p { margin: 0; }
.set-plan { display: flex; align-items: center; gap: 1.4rem; }
.set-plan-name { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.set-plan-use { margin: .1rem 0 .3rem; }
.set-look { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); display: grid; gap: 1.1rem; }
.set-choice .label { display: block; margin-bottom: .45rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border: 1px solid var(--border); background: var(--panel); border-radius: 10px; }
.seg button { min-height: 38px; padding: .3rem 1rem; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 500; cursor: pointer; box-shadow: none; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.set-dl { display: flex; flex-wrap: wrap; gap: .6rem; }
.set-danger { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; margin-top: 1.4rem; padding: 1rem 1.1rem; border: 1px solid color-mix(in srgb, var(--over) 40%, transparent); border-radius: var(--radius); }
.set-danger p { margin: .15rem 0 0; }
.button.danger-link { background: var(--surface); border: 1px solid var(--over); color: var(--over-text); }
@media (min-width: 62rem) {
  .set-layout { grid-template-columns: 14.5rem minmax(0, 1fr); align-items: start; gap: 2rem; }
  .set-rail { flex-direction: column; top: 5rem; overflow: visible; background: none; padding: 0 0 0 .2rem; gap: .15rem; position: sticky; }
  .set-rail::before { content: ""; position: absolute; left: calc(.2rem + .65rem + .3rem - 1px); top: 1rem; bottom: 1rem; width: 2px; background: var(--border); z-index: 0; }
  .set-rail a { position: relative; z-index: 1; border-radius: var(--radius); border-color: transparent; background: transparent; white-space: normal; }
  .set-rail a:hover { background: var(--panel); }
  .set-rail .led { background-clip: padding-box; outline: 4px solid var(--bg); }
}

#id_n-default_days { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .1rem 1rem; }

/* ---- Phone alarm (Settings) ---- */
.ph-contact { display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; align-items: center; margin: 1.2rem 0; padding: 1rem; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius); }
.ph-contact > div { flex: 1 1 14rem; }
#phone .set-form { margin: 1rem 0; }
#phone .check { display: flex; gap: .6rem; align-items: flex-start; margin: .8rem 0; font-size: .92rem; font-weight: 400; }
#phone .check input { margin-top: .25rem; flex: 0 0 auto; }
#phone .actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---- Passkeys ---- */
.passkey-login { margin-top: 1rem; }
.passkey-or { display: flex; align-items: center; gap: .8rem; margin: .4rem 0 .9rem; color: var(--muted); font-size: .85rem; }
.passkey-or::before, .passkey-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.passkey-btn { width: 100%; justify-content: center; }
.passkey-msg { min-height: 1.2em; margin: .5rem 0 0; color: var(--over-text); font-size: .9rem; }
.passkeys { margin: 1.4rem 0; padding: 1rem; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius); }
.passkeys h3 { margin-top: 0; }
.passkey-list { list-style: none; margin: .8rem 0; padding: 0; display: grid; gap: .6rem; }
.passkey-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .6rem .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.passkey-list .help { display: block; }
.passkey-add { margin-top: .8rem; }

/* ---- Feedback ---- */
.feedback-card { max-width: 46rem; }
.fb-kinds { border: 0; padding: 0; margin: 0 0 1rem; }
.fb-kinds ul, .fb-kinds div[id] { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.fb-kinds li label, .fb-kinds div > label { display: inline-flex; align-items: center; gap: .45rem; margin: 0; padding: .5rem .85rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-size: .95rem; font-weight: 400; }
.fb-kinds input[type=radio] { accent-color: var(--btn); }
.fb-kinds li label:has(input:checked), .fb-kinds div > label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.fb-history { max-width: 46rem; margin-top: 1.4rem; }
.fb-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .8rem; }
.fb-list li { padding: .7rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); }
.fb-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.fb-list p { margin: .4rem 0 0; color: var(--text-2); white-space: pre-line; }

/* ---- one-tap email action page ---- */
.action-card { max-width: 32rem; margin-inline: auto; }
.action-form { margin: 1.2rem 0 1.6rem; }
.action-form .primary { width: 100%; min-height: 52px; font-size: 1.05rem; }
.action-h { font-size: 1rem; margin: 0 0 .2rem; }
.action-card .actions { margin-top: .8rem; }
.action-foot { margin-top: 1.4rem; }

/* ---- Add with AI ---- */
.ai-card textarea { margin-top: .2rem; }
.ai-examples { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .8rem; }
.ai-examples[hidden] { display: none; }
.ai-chip { min-height: 36px; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.ai-chip:hover { background: var(--panel); color: var(--text); }
.ai-note { margin: 1rem 0; padding: .8rem 1rem; border-radius: var(--radius); background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.ai-drafts { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.ai-draft { display: flex; align-items: center; gap: 1rem; margin: 0; }
.ai-body { flex: 1; min-width: 0; }
.ai-body h3 { margin: 0 0 .15rem; }
.ai-facts { margin: 0; color: var(--text-2); }
.ai-body .help { margin: .2rem 0 0; }
@media (max-width: 36rem) { .ai-draft { flex-wrap: wrap; } .ai-draft form { width: 100%; } .ai-draft form .primary { width: 100%; } }

.ai-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: stretch; margin: 0 0 1.5rem; padding: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.ai-bar .ai-lead { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .92rem; padding-inline: .4rem; white-space: nowrap; }
.ai-bar .tile { width: 2rem; height: 2rem; border-radius: 8px; }
.ai-bar .tile svg { width: 1.1rem; height: 1.1rem; }
.ai-bar input[type=text] { flex: 1 1 16rem; min-width: 0; box-shadow: none; }
.ai-bar button { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Continue with Google ---- */
.google-btn { width: 100%; margin-top: .4rem; gap: .6rem; }
.google-btn .g-ico { flex: none; }
.auth-card .passkey-or { margin-top: 1rem; }

/* Dashboard: today's tasks */
.today { margin: 0 0 1.5rem; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.today-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .4rem; }
.today-head h2 { font-size: 1.05rem; margin: 0; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li { display: flex; align-items: center; gap: .9rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.today-list li:first-child { border-top: 0; }
.today-list b { min-width: 5.2rem; font-variant-numeric: tabular-nums; }
.today-list li > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.today-list li.past { color: var(--muted); }
.today-list li.past b { font-weight: 500; }
.today-hint { color: var(--muted); margin: 0 0 1.4rem; font-size: .95rem; }

/* Add with AI: the chat */
.ai-chat { padding: 0; overflow: hidden; }
.ai-thread { display: grid; gap: .8rem; align-content: start; padding: 1.1rem 1.2rem; min-height: 11rem; max-height: 26rem; overflow-y: auto; background: var(--bg); border-bottom: 1px solid var(--border); }
.ai-msg { max-width: 88%; padding: .7rem .95rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.ai-msg p { margin: 0; overflow-wrap: anywhere; }
.ai-msg.bot { justify-self: start; border-bottom-left-radius: 4px; }
.ai-msg.me { justify-self: end; border-bottom-right-radius: 4px; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.ai-who { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: .15rem; }
.ai-compose { display: flex; gap: .6rem; align-items: stretch; padding: .9rem 1.2rem 0; }
.ai-compose textarea { flex: 1; min-width: 0; margin: 0; resize: vertical; min-height: 3.2rem; max-height: 9rem; }
.ai-compose button { align-self: flex-end; min-height: 3.2rem; }
.ai-chat .ai-examples { padding: 0 1.2rem; }
.ai-foot { padding: .8rem 1.2rem 1.1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; align-items: center; }
.ai-foot .help { margin: 0; flex: 1 1 22rem; }
.ai-new { margin: 0; }
@media (max-width: 36rem) { .ai-compose { flex-direction: column; } .ai-compose button { align-self: stretch; } .ai-msg { max-width: 96%; } }

/* ---- Two-factor authentication (2FA) ---- */
.auth-single { grid-template-columns: minmax(0, 26rem); justify-content: center; }
.twofactor { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.twofactor h3 { margin: 0 0 .4rem; }
.twofactor-more { margin: .6rem 0; }
.twofactor-more summary { cursor: pointer; font-weight: 500; padding: .35rem 0; }
.twofactor-form { margin-top: .6rem; max-width: 26rem; }
.mfa-page { max-width: 38rem; margin: 0 auto; }
.mfa-card { padding: 1.8rem; }
.mfa-card h1 { font-size: 1.6rem; margin-top: 0; }
.mfa-steps { padding-left: 1.2rem; display: grid; gap: 1rem; }
.mfa-qr { width: 12.5rem; max-width: 100%; margin: .8rem 0 .4rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.mfa-key { overflow-wrap: anywhere; user-select: all; letter-spacing: .05em; }
.mono { font-family: var(--mono); }
.recovery-grid { list-style: none; margin: 1rem 0; padding: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); font-size: 1.05rem; letter-spacing: .04em; }
.mfa-note { min-height: 1.4em; }
@media (max-width: 30rem) { .recovery-grid { grid-template-columns: 1fr; } }
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --panel: #fff; --text: #000; --text-2: #222; --muted: #444; --border: #999; }
  body { background: #fff; color: #000; }
  .skip, .site-header, .site-footer, .messages { display: none !important; }
  .recovery-grid { border: 1px solid #000; background: #fff; color: #000; }
  .mfa-card .actions, .mfa-note { display: none !important; }
}

/* ---- dashboard extras: Done on Today, insights, calendar view, activity ---- */
.today-list li > form { margin: 0; }
.today-done { min-height: 2.25rem; padding: .3rem .9rem; font-size: .9rem; }
.today-list li.finished > span:nth-child(2) { text-decoration: line-through; color: var(--muted); }
.insights { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.insights li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: .9rem 1rem; display: grid; gap: .1rem; }
.insights b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.insights span { color: var(--muted); font-size: .875rem; }
@media (max-width: 40rem) { .insights { grid-template-columns: 1fr 1fr; } }
.view-switch { display: inline-flex; gap: .25rem; padding: .25rem; margin: 0 0 1rem; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; }
.view-switch a { padding: .35rem 1rem; border-radius: 999px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.view-switch a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.cal { margin: 0 0 1.5rem; }
.cal-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.cal-head h2 { margin: 0; font-size: 1.2rem; min-width: 9rem; text-align: center; }
.cal-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.cal-grid { width: 100%; min-width: 44rem; border-collapse: collapse; table-layout: fixed; }
.cal-grid th { padding: .5rem; font-size: .8125rem; font-weight: 600; color: var(--muted); text-align: left; border-bottom: 1px solid var(--border); }
.cal-grid td { vertical-align: top; height: 6.2rem; padding: .35rem .4rem; border-top: 1px solid var(--border); border-left: 1px solid var(--border); overflow: hidden; }
.cal-grid td:first-child { border-left: 0; }
.cal-grid tr:first-child td { border-top: 0; }
.cal-grid td.out { background: var(--panel); }
.cal-grid td.out .cal-n { color: var(--muted); }
.cal-n { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; font-size: .85rem; font-variant-numeric: tabular-nums; border-radius: 999px; }
.cal-grid td.today .cal-n { background: var(--btn); color: var(--on-accent); font-weight: 700; }
.cal-item { display: block; margin-top: .2rem; padding: .1rem .4rem; border-radius: 6px; font-size: .8125rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; background: var(--accent-soft); color: var(--text); border-left: 3px solid var(--accent); }
.cal-item.u-overdue { border-left-color: var(--over); }
.cal-item.u-soon { border-left-color: var(--soon); }
.cal-more, .cal-tasks { display: block; margin-top: .2rem; font-size: .75rem; color: var(--muted); }
.activity h2 { margin-top: 0; }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.act-list li { display: flex; gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.act-list li:first-child { border-top: 0; }
.act-dot { flex: none; width: .65rem; height: .65rem; margin-top: .45rem; border-radius: 999px; background: var(--accent); }
.act-done .act-dot { background: var(--ok); } .act-call .act-dot { background: var(--soon); }
.act-list li > div { min-width: 0; overflow-wrap: anywhere; }
.act-list time { display: block; color: var(--muted); font-size: .8125rem; }

/* header and footer follow the width of the page they sit on, so edges line up */
body:has(.wrap-wide) .site-header .wide, body:has(.wrap-wide) .site-footer .wide { width: min(100% - 2.5rem, 80rem); }
body:has(.wrap-dash) .site-header .wide, body:has(.wrap-dash) .site-footer .wide { width: calc(100% - 2 * var(--gutter)); max-width: none; }

/* ---- onboarding: starter tiles and the getting-started list ---- */
.welcome h2 { margin-top: 0; }
.starter-grid { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .8rem; }
.starter { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.starter:hover { border-color: var(--accent); transform: translateY(-2px); }
.starter b { display: block; font-weight: 600; }
.starter small { color: var(--muted); font-size: .85rem; }
.checklist .chk-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.checklist h2 { margin: 0; font-size: 1.05rem; }
.chk-hide { margin-left: auto; min-height: 2rem; padding: .15rem .7rem; font-size: .8125rem; }
.chk-bar { width: 100%; height: .5rem; accent-color: var(--btn); margin-bottom: .8rem; }
.chk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.chk-list li { display: flex; gap: .7rem; align-items: flex-start; }
.chk-list small { display: block; color: var(--muted); font-size: .8125rem; }
.chk-box { flex: none; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-top: .1rem; border: 2px solid var(--border-strong); border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--on-accent); }
.chk-list li.done .chk-box { background: var(--ok); border-color: var(--ok); }
.chk-list li.done s { color: var(--muted); }

.preview { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.preview h3 { margin: 0 0 .6rem; font-size: .95rem; }
.preview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.preview-list li { display: grid; gap: .05rem; padding-left: .8rem; border-left: 3px solid var(--accent); }
.preview-list li.past { border-left-color: var(--border-strong); color: var(--muted); }
.preview-list span { font-size: .85rem; color: var(--muted); }

.set-import { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.set-import h3 { margin: 0 0 .3rem; font-size: 1rem; }
.set-import-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.set-import-row input[type=file] { flex: 1 1 14rem; min-width: 0; }

.activity .chk-head { justify-content: space-between; margin-bottom: .4rem; }
.hist-table { width: 100%; border-collapse: collapse; }
.hist-table th, .hist-table td { text-align: left; padding: .7rem .6rem; border-top: 1px solid var(--border); vertical-align: top; }
.hist-table thead th { border-top: 0; font-size: .8125rem; color: var(--muted); font-weight: 600; }
.hist-table tbody th { font-weight: 600; overflow-wrap: anywhere; }
.hist-table small { display: block; color: var(--muted); font-weight: 400; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; }
@media (min-width: 62rem) { .add-grid > .side { position: sticky; top: 5rem; align-self: start; } }

kbd { font-family: var(--mono); font-size: .85em; padding: .05rem .4rem; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.print-sheet h2 { font-size: 1.1rem; margin: 1.4rem 0 .4rem; }
.print-table { width: 100%; border-collapse: collapse; }
.print-table th, .print-table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--border-strong); vertical-align: top; }
.print-table thead th { font-size: .8125rem; color: var(--muted); }
.print-actions { display: flex; gap: .8rem; margin: 1rem 0; }
@media print { .print-actions { display: none !important; } .print-sheet { font-size: 11pt; } .print-table th, .print-table td { border-color: #888; } }

/* sign-up: a box only bots see, and the Terms tick box */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field-check .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.field-check input[type=checkbox] { width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex: none; }
.g-note { margin: .5rem 0 0; text-align: center; }

/* ---- ambient reminder cards: home page (behind every section), log in and sign up ----
   Small soft reminder cards drift slowly up the page, like a feed of what it will tell you.
   Pure CSS, no scripts or images. Reduced-motion and "Calm" mode (above) leave them still, scattered. */
.float-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fc {
  position: absolute; top: var(--y); left: min(var(--x), calc(100% - 14rem)); width: 13.4rem;
  display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem .55rem .6rem;
  border-radius: 12px; border: 1px solid var(--border); font-size: .8rem; line-height: 1.25;
  background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--shadow-sm);
  scale: var(--sc); filter: blur(var(--bl)); opacity: var(--op);
}
.fc-i { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 9px; flex: none; background: var(--accent-soft); color: var(--accent); }
.fc-i svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fc-t b { display: block; font-weight: 600; color: var(--text); }
.fc-t small { display: block; color: var(--muted); font-size: .74rem; }
.fc .ok { width: 1.15rem; height: 1.15rem; margin-left: auto; flex: none; fill: none; stroke: var(--ok, #16a34a); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fc:nth-child(1) { --x: 3%; --y: 8%; --dur: 52s; --delay: -8s; --sc: 1.04; --bl: 0px; --op: 0.96; }
.fc:nth-child(2) { --x: 78%; --y: 70%; --dur: 58s; --delay: -30s; --sc: 1.04; --bl: 0px; --op: 0.96; }
.fc:nth-child(3) { --x: 10%; --y: 36%; --dur: 66s; --delay: -45s; --sc: 0.88; --bl: 2.2px; --op: 0.9; }
.fc:nth-child(4) { --x: 66%; --y: 22%; --dur: 62s; --delay: -14s; --sc: 0.88; --bl: 2.2px; --op: 0.9; }
.fc:nth-child(5) { --x: 82%; --y: 58%; --dur: 74s; --delay: -50s; --sc: 0.74; --bl: 3.6px; --op: 0.55; }
.fc:nth-child(6) { --x: 28%; --y: 80%; --dur: 80s; --delay: -22s; --sc: 0.74; --bl: 3.6px; --op: 0.55; }
.fc:nth-child(7) { --x: 52%; --y: 14%; --dur: 76s; --delay: -60s; --sc: 0.74; --bl: 3.6px; --op: 0.55; }
.fc:nth-child(8) { --x: 18%; --y: 52%; --dur: 56s; --delay: -36s; --sc: 1.04; --bl: 0px; --op: 0.96; }
.fc:nth-child(9) { --x: 70%; --y: 90%; --dur: 68s; --delay: -5s; --sc: 0.88; --bl: 2.2px; --op: 0.9; }
.fc:nth-child(10) { --x: 42%; --y: 44%; --dur: 70s; --delay: -40s; --sc: 0.88; --bl: 2.2px; --op: 0.9; }
@media (max-width: 640px) { .fc:nth-child(n+6) { display: none; } .fc { scale: calc(var(--sc) * .9); } }
@media (prefers-reduced-motion: no-preference) {
  .fc {
    top: 0; will-change: translate, transform;
    animation: fc-rise var(--dur) linear var(--delay) infinite, fc-sway calc(var(--dur) / 5) ease-in-out var(--delay) infinite alternate;
  }
  .fc.d .ok { opacity: 0; animation: fc-done var(--dur) linear var(--delay) infinite; }
  @keyframes fc-rise { from { translate: 0 108vh; } to { translate: 0 -30vh; } }
  @keyframes fc-sway { from { transform: translateX(-16px); } to { transform: translateX(16px); } }
  @keyframes fc-done { 0%, 44% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } }
}
html[data-motion="calm"] .fc { top: var(--y); }

/* ---- undo bar: shown on the dashboard for a few minutes after "Mark done" ---- */
.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0 0 1rem; padding: .7rem 1rem;
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: var(--radius); background: var(--ok-bg); color: var(--ok-text); }
.undo-bar p { margin: 0; font-weight: 500; }
.undo-bar form { margin: 0; }

/* ---- dashboard: finish setting up ---- */
.setup-banner { margin: 0 0 1.25rem; padding: 1rem 1.2rem; border: 1px solid color-mix(in srgb, var(--soon) 55%, var(--border)); border-left-width: 4px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--soon-bg) 60%, var(--surface)); }
.sb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1rem; margin-bottom: .6rem; }
.sb-head h2 { margin: 0; font-size: 1.05rem; }
.sb-head p { margin: 0; color: var(--soon-text); font-size: .92rem; }
.setup-banner ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.setup-banner li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; }
.setup-banner li > div { flex: 1 1 12rem; display: grid; }
.setup-banner li small { color: var(--soon-text); }
.setup-banner form { margin: 0; }
.setup-banner .tile-ic { background: var(--soon-bg); color: var(--soon-text); }

.set-stage h2[tabindex="-1"]:focus { outline: none; }

/* ---- "Check your inbox" (after sign-up / blocked log-in) ---- */
.ce { display: grid; place-items: center; padding: 2.5rem 0 3rem; }
.ce-card { width: min(100%, 34rem); text-align: center; padding: 2.2rem 2rem 1.8rem; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg);
  background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%), color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px); }
.ce-orb { position: relative; width: 9rem; height: 9rem; margin: 0 auto 1.1rem; display: grid; place-items: center; }
.ce-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); }
.ce-ring.r1 { inset: 1.9rem; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.ce-ring.r2 { inset: .9rem; border-style: dashed; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ce-ring.r3 { inset: 0; border-color: color-mix(in srgb, var(--accent) 20%, transparent); }
.ce-core { position: relative; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
.ce-core svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ce-tag { display: inline-block; margin: 0 0 .5rem; padding: .15rem .7rem; border-radius: 999px; background: var(--soon-bg); color: var(--soon-text); font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.ce-card h1 { margin: 0 0 .5rem; font-size: clamp(1.6rem, 4vw, 2rem); letter-spacing: -.02em; }
.ce-lead { margin: 0 auto .8rem; color: var(--text-2); max-width: 26rem; }
.ce-addr { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1.5rem; padding: .5rem 1rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.ce-addr svg { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ce-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .6rem; text-align: left; }
.ce-steps li { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); }
.ce-steps li > span { flex: 0 0 auto; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.ce-steps li > div { display: grid; line-height: 1.3; }
.ce-steps small { color: var(--muted); }
.ce-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0; }
.ce-actions .button, .ce-actions button { flex: 1 1 12rem; justify-content: center; }
.ce-foot { margin: 1.1rem 0 0; color: var(--muted); font-size: .9rem; }
@media (prefers-reduced-motion: no-preference) {
  .ce-ring.r1 { animation: ce-pulse 3.2s ease-out infinite; }
  .ce-ring.r3 { animation: ce-pulse 3.2s ease-out 1.6s infinite; }
  .ce-ring.r2 { animation: ring-turn 40s linear infinite; }
  .ce-core { animation: ce-float 4s ease-in-out infinite; }
  .ce-steps li { animation: tile-in .45s ease-out backwards; }
  .ce-steps li:nth-child(2) { animation-delay: .1s; } .ce-steps li:nth-child(3) { animation-delay: .2s; }
  @keyframes ce-pulse { 0% { transform: scale(.82); opacity: .9; } 100% { transform: scale(1.12); opacity: 0; } }
  @keyframes ce-float { 50% { transform: translateY(-4px); } }
}
