/* styles.css — every style of the page (5/10: moved out of index.html, which held them inline, so two people can work on
   the look and the markup without meeting in one file). The theme's first paint stays inline in index.html. */
/* One screen shows one thing. Navigation lives in a drawer, the assistant in a sheet.
   The earlier layout put both panes side by side and on a phone that meant two cramped
   columns instead of one comfortable one. */
:root{
  --bg:#f6f8fc; --panel:#fff; --raise:#eaeff8; --ink:#111827; --dim:#5f6b7f; --line:#e1e7f0;
  --accent:#2f6fed; --on-accent:#fff; --ok:#2f7d4f; --warn:#b4541a;
  --r:16px; --pad:18px; --safe: env(safe-area-inset-bottom, 0px);
}
/* Dark by the system — unless he chose light — and dark by his choice (look.js sets data-theme). These are the default
   palette's (look.js PALETTES.daylight); the chosen palette's tokens are written over them (look.js lookCss). */
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --bg:#0e1320; --panel:#161d2d; --raise:#1f2840; --ink:#eef2fa; --dim:#9aa6bd; --line:#263049;
  --accent:#7aa7ff; --on-accent:#14141a; --ok:#6fcf97; --warn:#e2934f; color-scheme:dark;
}}
:root[data-theme=dark]{
  --bg:#0e1320; --panel:#161d2d; --raise:#1f2840; --ink:#eef2fa; --dim:#9aa6bd; --line:#263049;
  --accent:#7aa7ff; --on-accent:#14141a; --ok:#6fcf97; --warn:#e2934f; color-scheme:dark;
}
:root[data-theme=light]{ color-scheme:light }
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
/* A placeholder must never pass for a value — "every fri" in near-ink read as a task that repeats
   (2026-09-25). Dim, italic, and worded as what an empty field MEANS, not as an example. */
::placeholder{color:var(--dim);opacity:.7;font-style:italic}
html,body{height:100%;overscroll-behavior:none}
body{margin:0;background:var(--bg);color:var(--ink);overflow:hidden;
  font:16px/1.55 ui-sans-serif,-apple-system,system-ui,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
[hidden]{display:none !important}

/* ── header (the home screen's — the rest of it is in the last block) ────────────────── */
header{display:flex;align-items:center;flex:0 0 auto}
header .icon{display:grid;place-items:center}
header .icon:active{background:var(--raise)}
header h1{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.sheet-open .bar{display:flex}
/* ── content ────────────────────────────────────────────────────────────────────── */
main{flex:1;min-height:0;overflow-y:auto;padding:4px var(--pad) 96px;-webkit-overflow-scrolling:touch}
.shell{height:100%;display:flex;flex-direction:column}
.sect{font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);margin:20px 4px 10px}
.sect:first-child{margin-top:6px}
.empty{color:var(--dim);padding:48px 8px;text-align:center}

/* A task is a calm block, not a bordered row. Chips only for fields that are actually set. */
.task{background:var(--panel);border-radius:var(--r);padding:14px 16px;margin-bottom:10px;display:flex;gap:13px}
.task .box{flex:0 0 auto;width:23px;height:23px;border:2px solid var(--line);border-radius:7px;
  display:grid;place-items:center;margin-top:1px;color:transparent;font-size:14px;
  transition:background .14s,border-color .14s,color .14s}
.box.pop{animation:pop .34s cubic-bezier(.34,1.56,.64,1)}
@keyframes pop{0%{transform:scale(1)}42%{transform:scale(1.32)}100%{transform:scale(1)}}

/* Settle, then leave. The beat in between is the point: it confirms what the tap did before
   the row disappears, which is the difference between "done" and "where did that go". */
.task.settling{background:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel))}
.task.settling .title{color:var(--dim);text-decoration:line-through}
.task.settling .box{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.task.leaving{overflow:hidden;animation:leave .34s ease forwards}
@keyframes leave{to{opacity:0;transform:translateX(-10px);max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0}}

  background:var(--ink);color:var(--bg);border-radius:14px;padding:13px 16px;display:flex;align-items:center;gap:12px;
  box-shadow:0 6px 26px #00000040;font-size:15px;
  /* Hidden by opacity, not by sliding. translateY(140%) moved it 140% of its OWN height —
     about 70px — while it sits 84px above the bottom, so it slid down and stopped still on
     screen, with the undo button live forever. Opacity cannot half-succeed. */
  opacity:0;pointer-events:none;transform:translateY(16px);
  transition:opacity .2s,transform .26s cubic-bezier(.3,.8,.3,1)}
@media (prefers-reduced-motion:reduce){
  .box.pop,.task.leaving{animation:none}
}
.task.done .box{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.task .body{flex:1;min-width:0}
.task .title{font-size:16.5px;line-height:1.4;word-break:break-word}
.task.done .title{color:var(--dim);text-decoration:line-through}
.task .desc{margin-top:6px;font-size:14px;color:var(--dim);white-space:pre-wrap;word-break:break-word}
.meta{direction:ltr;text-align:left;display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;font-size:12px;color:var(--dim)}
.meta span{background:var(--raise);border-radius:7px;padding:2px 8px}
.meta .id{font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:11.5px}
.meta .soon{color:var(--warn)} .meta .p1{color:var(--warn)}
.minis{margin-top:11px;display:flex;flex-direction:column;gap:7px}
.mini{display:flex;gap:10px;align-items:flex-start;font-size:14.5px}
.mini .box{width:19px;height:19px;border-radius:6px;font-size:12px}
.mini.done span.t{color:var(--dim);text-decoration:line-through}
/* The filled state was keyed on `.task.done .box` — the TASK being done — so a finished
   step got its strikethrough and an empty checkbox. A step closes on its own. */
.mini.done .box{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.mini .est{direction:ltr;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:11px;background:var(--raise);border-radius:6px;padding:1px 6px;color:var(--dim)}

.outcome{background:var(--raise);border-radius:var(--r);padding:14px 16px;margin:6px 0 4px;font-size:15px}
.outcome b{display:block;font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--dim);margin-bottom:5px}

/* ── documents ──────────────────────────────────────────────────────────────────── */
.doc{padding:2px 2px 8px;font-size:16px}
.doc .md-h{margin:22px 0 8px;line-height:1.3;font-weight:650}
.doc h1.md-h{font-size:23px} .doc h2.md-h{font-size:19px} .doc h3.md-h{font-size:16.5px}
.doc .md-p{margin:11px 0;word-break:break-word}
.doc .md-l{margin:9px 0;padding-inline-start:24px} .doc .md-l li{margin:4px 0}
.doc .md-q{margin:12px 0;padding:10px 14px;background:var(--raise);border-radius:12px;color:var(--dim)}
.doc .md-code{direction:ltr;text-align:left;background:var(--raise);border-radius:12px;padding:13px 15px;overflow-x:auto;font-size:13px}
.doc code{background:var(--raise);border-radius:5px;padding:1px 5px;font-size:.9em}
.doc .md-t{border-collapse:collapse;display:block;overflow-x:auto;margin:14px 0;font-size:14px}
.doc .md-t th,.doc .md-t td{border:1px solid var(--line);padding:8px 11px;text-align:start;white-space:nowrap}
.doc a{color:var(--accent)} .doc a.wiki{text-decoration:none;border-bottom:1.5px dashed var(--accent)}
.doc hr{border:0;border-top:1px solid var(--line);margin:20px 0}
.backlinks{margin-top:26px;padding-top:14px;border-top:1px solid var(--line);font-size:14px;color:var(--dim)}
.backlinks a{color:var(--accent);text-decoration:none;margin-inline-end:12px}
textarea.edit{width:100%;min-height:60vh;font:16px/1.6 ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;direction:ltr;text-align:left;
  padding:14px;border:1px solid var(--line);border-radius:var(--r);background:var(--panel);color:var(--ink)}

/* ── the scrim under a sheet ─────────────────────────────────────────────────────── */
.scrim{position:fixed;inset:0;background:#0008;opacity:0;pointer-events:none;transition:.22s;z-index:40}
.scrim.on{opacity:1;pointer-events:auto}
.cfgrow{display:flex;align-items:flex-start;gap:14px;padding:15px 2px;border-bottom:1px solid var(--line)}
.cfgrow:last-child{border-bottom:0}
.cfgrow .txt{flex:1;min-width:0}
.cfgrow b{display:block;color:var(--ink);font-weight:600;font-size:15.5px}
.cfgrow span{display:block;color:var(--dim);font-size:13.5px;margin-top:3px}
.cfgrow button{flex:0 0 auto;padding:9px 15px;border-radius:11px;background:var(--raise);font-size:14px;align-self:center}
.cfgrow button.danger{color:var(--warn)}
.tagchips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.tagchips:empty{display:none}
.tagchips button{background:var(--raise);border:1px solid var(--line);border-radius:999px;padding:3px 10px;font-size:13px;color:inherit}
.tagchips.sugg button{opacity:.7}
.tagchips button.on{border-color:var(--accent);color:var(--accent)}
.cl-add{width:100%;margin:6px 0 10px}
.cl-item{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-bottom:1px solid var(--line)}
.cl-item.done .title{text-decoration:line-through;color:var(--dim)}
.frow{padding:8px 0;border-bottom:1px solid var(--line)}
.frow .fl{font-weight:600;margin-bottom:4px}
.frow .freq{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:13.5px;color:var(--dim)}
/* A required field this task lacks (fields.js): marked, never blocking. */
#editForm [data-field].req{border-inline-start:3px solid var(--warn);padding-inline-start:8px}
.fl.yf{margin:16px 0 4px;font-weight:600}
#sBody ol{padding-inline-start:20px;margin:6px 0}
#sBody code{word-break:break-all;background:var(--raise);padding:1px 4px;border-radius:4px}
.frow.yfr{display:flex;justify-content:space-between;align-items:center}
.frow .fm{display:grid;grid-template-columns:3fr 2fr;gap:8px}
.frow .fm > div > span{display:block;font-size:12px;color:var(--dim);margin-bottom:2px}
.frow .seg button{padding:5px 4px;font-size:13px}
.cfgfoot{padding:16px 2px 4px;font-size:11.5px;color:var(--dim);direction:ltr;text-align:start}

/* ── assistant sheet ────────────────────────────────────────────────────────────── */
.sheet{position:fixed;inset-inline:0;bottom:0;z-index:45;background:var(--panel);
  border-radius:22px 22px 0 0;box-shadow:0 -14px 40px #0003;display:flex;flex-direction:column;
  max-height:82vh;max-height:82dvh;transform:translateY(102%);transition:transform .26s cubic-bezier(.3,.8,.3,1);
  padding-bottom:calc(72px + var(--safe))}   /* clears the fixed composer below */
.sheet.on{transform:none}
/* A closed sheet sits just below the screen, and its shadow reached up into view as a dark band. */
.sheet:not(.on){box-shadow:none}
.grab{padding:12px;display:grid;place-items:center;flex:0 0 auto;touch-action:none;cursor:grab}
.sheet .hd{touch-action:none}
.grab i{display:block;width:44px;height:5px;border-radius:3px;background:var(--line)}
.sheet .hd{display:flex;align-items:center;gap:8px;padding:0 var(--pad) 8px;flex:0 0 auto}
.sheet .hd b{font-size:15px;font-weight:620}
.sheet .hd .sp{flex:1}
.sheet .hd button{font-size:13.5px;color:var(--accent);padding:7px 11px;border-radius:10px;background:var(--raise)}
.thread{flex:1;overflow-y:auto;padding:4px var(--pad) 8px;min-height:120px}
/* His words are a bubble; the assistant's reply is a DOCUMENT. Their app renders the
   agent full width with real headings and weight, and it reads far better than a chat
   bubble does — an answer with structure should look like it has structure. */
.msg{margin-bottom:16px}
.msg .who{font-size:11.5px;color:var(--dim);margin-bottom:4px}
.msg.self{max-width:88%;margin-inline-start:auto}
.msg.self .txt{background:var(--accent);color:var(--on-accent);border-radius:16px;padding:11px 15px;
  white-space:pre-wrap;word-break:break-word;font-size:15.5px}
.msg.self .who{text-align:end}
.msg.agent .txt{font-size:16px}
.msg.agent.live{white-space:pre-wrap;font-size:16px;opacity:.85}   /* the reply as it is written (thread.js partial) */
.msg.agent .md-h{margin:16px 0 6px;font-weight:660;line-height:1.3}
.msg.agent h1.md-h{font-size:21px} .msg.agent h2.md-h{font-size:18px} .msg.agent h3.md-h{font-size:16px}
.msg.agent .md-p{margin:9px 0} .msg.agent .md-l{margin:8px 0;padding-inline-start:22px}
/* Items take their list's direction (md.js dirOf, by the majority of letters): a first-letter rule
   per item set a Hebrew item that opens on an English name left-to-right. */
.md-l .md-l{margin:4px 0 4px}
.md-task{list-style:none;margin-inline-start:-1.2em}
.md-box{display:inline-block;width:1.3em;color:var(--dim)}
.md-task.done .md-box{color:var(--accent)}
/* A long word or link wraps rather than widening the thread past the screen. */
.msg .txt{overflow-wrap:anywhere}
.txt.folded{max-height:13.5em;overflow:hidden;-webkit-mask-image:linear-gradient(#000 70%,transparent);mask-image:linear-gradient(#000 70%,transparent)}
.fold-more{display:block;margin:4px 2px 0;font-size:13.5px;font-weight:600;color:var(--accent);background:none;padding:2px 0}
.msg.self .fold-more{margin-inline-start:auto}
.atts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.att-img{max-width:min(100%,260px);max-height:260px;border-radius:12px;object-fit:cover;cursor:zoom-in}
.att-file{display:inline-block;padding:8px 11px;border-radius:10px;background:var(--raise);color:var(--ink);font-size:14px;text-decoration:none}
/* A TABLE SCROLLS INSIDE ITSELF rather than crushing a column: the rule above let an id in a narrow
   cell break letter by letter ("so / med / ay_"). Cells break between words only, and code is kept whole. */
.msg .md-t{display:block;overflow-x:auto;border-collapse:collapse;margin:10px 0;font-size:14px}
.msg .md-t th,.msg .md-t td{border:1px solid var(--line);padding:6px 9px;text-align:start;vertical-align:top;overflow-wrap:normal;min-width:5em}
.msg .md-t code{white-space:nowrap}
.msg.agent .md-q{margin:10px 0;padding:9px 13px;background:var(--raise);border-radius:12px;color:var(--dim)}
.msg.agent .md-code{direction:ltr;text-align:left;background:var(--raise);border-radius:11px;padding:11px 13px;overflow-x:auto;font-size:13px}
.msg.agent code{background:var(--raise);border-radius:5px;padding:1px 5px;font-size:.9em}
.msg.agent a{color:var(--accent)}
.msg.sys .txt{font-size:13.5px;color:var(--dim)}
/* A change to the lists, recorded in the room — not something anyone SAID. A quiet card: who
   did it, then one row per task with what changed and to what. */
.msg.act{margin:2px 0 16px;padding:10px 13px 6px;border-radius:14px;background:var(--raise)}
.act-hd{font-size:12px;font-weight:620;color:var(--dim);letter-spacing:.2px;margin-bottom:2px}
.msg.act[data-kind=approved] .act-hd{color:var(--ok)}
.act-row{padding:6px 0}
.act-row + .act-row{border-top:1px solid var(--line)}
.act-t{font-size:14.5px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.act-m{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.act-m span{font-size:12px;line-height:1.5;padding:0 7px;border-radius:7px;background:var(--panel);color:var(--dim)}
.act-m span.act-v{color:var(--ink);font-weight:560}

/* Their crossing card — a labelled, bordered block sitting in the flow — reads better than
   a floating widget: it is part of what the assistant said, not an interruption of it. */
.prop{border:1px solid var(--line);border-radius:var(--r);padding:13px 15px;margin-bottom:12px}
.prop.waiting{opacity:.55}
.prop-head{display:flex;align-items:center;gap:9px;width:100%}
.k{font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;color:var(--accent);font-weight:640;flex:0 0 auto}
.prop-sum{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14.5px}
.chev{color:var(--dim);flex:0 0 auto}
.prop-wait{direction:ltr;flex:0 0 auto;font-size:11px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;color:var(--warn)}
.prop.foreign{border:1.5px solid var(--warn)}
.prop-warn{color:var(--warn);font-size:13.5px;font-weight:600;margin:4px 0 6px;line-height:1.4}
.prop-repl{direction:ltr;flex:0 0 auto;font-size:11px;color:var(--accent)}
.prop pre{direction:ltr;text-align:left;margin:9px 0 0;font-size:12.5px;color:var(--dim);
  white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace}
.prop-why{margin:9px 0 4px;font-size:14px}
.cal-title{margin:6px 0 2px;font-size:17px;font-weight:650}
.cal-note{margin:6px 0 4px;font-size:14px;white-space:pre-wrap;background:var(--raise);border-radius:10px;padding:8px 10px}
.cal-head{margin:12px 0 4px;font-size:12.5px;font-weight:650;letter-spacing:.03em;text-transform:uppercase;color:var(--dim)}
.diff{direction:ltr;text-align:left;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12.5px;
  border-radius:9px;padding:8px 11px;margin:5px 0;white-space:pre-wrap;word-break:break-word}
/* A line that carries its own direction (dir=auto) keeps it — forced LTR, a Hebrew name led with its number (2026-09-28). */
.diff[dir=auto]{direction:revert;unicode-bidi:plaintext;text-align:start}
.diff.old{background:color-mix(in srgb,var(--warn) 16%,transparent)}
.diff.new{background:color-mix(in srgb,var(--ok) 17%,transparent)}
.row{display:flex;gap:9px;margin-top:11px}
.row button{flex:1;padding:10px;border-radius:11px;background:var(--panel);font-size:15px;text-align:center}
.row button.primary{background:var(--accent);color:var(--on-accent);font-weight:600}
.row button:disabled{opacity:.4}

/* ── composer ───────────────────────────────────────────────────────────────────── */
.bar{display:none;position:fixed;inset-inline:0;bottom:0;z-index:46;padding:10px var(--pad) calc(10px + var(--safe));
  background:linear-gradient(to top,var(--bg) 62%,transparent);gap:9px;align-items:flex-end}
/* It said display:none and then display:flex in the same rule, and the second won — so the
   assistant's composer floated over the loading screen and the gate. Shown only by the sheet
   (openSheet sets it) or where it sits inside a sheet, as capture's does. */
.bar.bar-in{display:flex}
.bar textarea{flex:1;resize:none;font:inherit;font-size:16px;padding:12px 16px;border:0;border-radius:22px;
  background:var(--panel);color:var(--ink);max-height:130px;box-shadow:0 2px 14px #0000000f}
.bar textarea:focus{outline:2px solid var(--accent);outline-offset:-2px}
.bar .send{width:46px;height:46px;flex:0 0 auto;border-radius:50%;background:var(--accent);color:var(--on-accent);
  display:grid;place-items:center;font-size:19px}
.bar .send:disabled{opacity:.45}
/* Attachments in the assistant's composer (assistant.js, 4/10): the picked ones above the box, a 📎 beside it. */
.bar{flex-wrap:wrap}
.bar .attach{width:40px;height:46px;flex:0 0 auto;border-radius:50%;background:none;font-size:20px;display:grid;place-items:center}
.bar .tatts{flex-basis:100%;display:flex;gap:6px;overflow-x:auto;padding:0 0 2px}
.bar .tatts .tatt-c{display:flex;align-items:center;gap:6px;background:var(--panel);border-radius:14px;padding:4px 8px;font-size:13px;white-space:nowrap;max-width:60%}
.bar .tatts .tatt-c img{width:32px;height:32px;object-fit:cover;border-radius:8px}
.bar .tatts .tatt-c span{overflow:hidden;text-overflow:ellipsis}
.bar .tatts .tatt-c button{background:none;color:var(--dim);font-size:15px;padding:0 2px}
.bar .tattnote{flex-basis:100%;margin:0}

  .calItem{padding:10px 0;border-bottom:1px solid var(--line)} .calItem .seg{margin:6px 0} .calItem input{width:100%}
details.callLine summary{cursor:pointer;list-style:none} details.callLine summary::-webkit-details-marker{display:none}
.readFold summary{cursor:pointer;list-style:none} .readFold summary::-webkit-details-marker{display:none}
.readFold > details > summary{font-size:13.5px;color:var(--dim)} .readBody{margin-top:10px;padding-inline-start:12px;border-inline-start:2px solid var(--line)}
.readBody .msg{margin-bottom:10px} .readBody .msg.agent .txt{font-size:15px}
.callRaw{margin-top:6px;font-size:12px;opacity:.75;word-break:break-all;white-space:pre-wrap}
#gate{margin:auto;max-width:440px;padding:30px;text-align:center}
/* The opening screen. Until something real can be shown, show THIS — not an empty page with a
   composer floating over it, which is what an app half-way through loading looked like. */
#boot{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--bg)}
#boot img{width:76px;height:76px;border-radius:18px;box-shadow:0 6px 24px #0000001f}
#boot b{font-size:20px;font-weight:650;letter-spacing:.2px}
#bootMsg{color:var(--dim);font-size:15px;min-height:1.5em}
body.booting .bar, body.booting .tabs, body.booting .add, body.booting .clearbar{display:none !important}
/* THE LOCK (lock.js, lockui.js). Above everything (sheets 45, bars 50, boot and menus 60); while it is up the rest of
   the page is not merely covered but invisible, so neither the app switcher's picture nor a screen reader shows it. */
#lock{position:fixed;inset:0;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  background:var(--bg);padding:30px;text-align:center}
#lock[hidden]{display:none}
#lock img{width:76px;height:76px;border-radius:18px;box-shadow:0 6px 24px #0000001f}
#lock > b{font-size:20px;font-weight:650;letter-spacing:.2px}
#lock .act{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:380px;width:100%}
#lock.veil .act{display:none}
#lock .act > span{color:var(--dim);font-size:15px}
#lock .primary{background:var(--accent);color:var(--on-accent);padding:13px 26px;border-radius:13px;font-weight:600;font-size:16px}
#lock .err{text-align:center}
#lockPwForm{display:flex;flex-direction:column;gap:10px;width:100%}
#lockPwForm[hidden]{display:none}
#lockPwForm input{width:100%;font:inherit;font-size:16px;padding:12px 15px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink)}
#lockSheet input[type=password]{width:100%;margin:6px 0}
#lockLostBox{font-size:14px;color:var(--dim);text-align:start}
#lockLostBox .row{display:flex;gap:10px;margin-top:12px}
#lockLostBox button{padding:11px 16px;border-radius:12px;background:var(--raise)}
#lockLostBox button.danger{color:var(--warn)}
#lockBuild{position:absolute;bottom:calc(14px + var(--safe));font-size:12px;color:var(--dim)}
body.locked > :not(#lock){visibility:hidden}
#gate h1{font-size:26px;margin:0 0 10px}
#gate p{color:var(--dim);font-size:15px}
#gate input{width:100%;font:inherit;font-size:16px;padding:12px 15px;border:1px solid var(--line);border-radius:12px;
  background:var(--panel);color:var(--ink);margin:12px 0;direction:ltr}
#gate .primary{background:var(--accent);color:var(--on-accent);padding:13px 26px;border-radius:13px;font-weight:600;font-size:16px}
#gate .ghost{padding:11px 20px;border-radius:12px;background:var(--raise)}
.err{color:var(--warn);font-size:14px;margin-top:14px;text-align:start}
  .chip.pend, span.pend { background: #fde9c8; color: #7a4b00 }
  #content .doc { padding-inline: 16px; padding-bottom: 26px }
  #statusBar { display:flex; align-items:center; gap:10px; padding:10px 14px;
    background:var(--raise); border-bottom:1px solid var(--line); font-size:14px }
  #statusBar.bad { background:#5b1f1a; color:#fff }
  #statusBar.ask { background:var(--raise) }
  /* 16px is the threshold below which iOS zooms into a field on focus, in a browser tab, and never zooms back out. This
     floor loses to any more specific rule (18/10: the add sheet's note and Settings → You were 15px, and he was stuck
     zoomed in) — browser.mjs records every field the page ever draws under 16px and fails on one. */
  input, textarea, select { font-size: 16px }
  #capSheet { max-height:none }
  #editSheet .form, #skillSheet .form, #viewSheet .form, #arrSheet .form, #fieldsSheet .form, #fieldDefSheet .form, #siriSheet .form, #acctSheet .form, #lockSheet .form, #moveSheet .form, #teamSheet .form, #ttSheet .form, #calSheet .form, #newSheet .form, #personaSheet .form, #importSheet .form { padding:0 var(--pad) calc(18px + var(--safe)); overflow-y:auto }
  #skillSheet, #viewSheet, #arrSheet, #fieldsSheet, #fieldDefSheet, #siriSheet, #acctSheet, #lockSheet, #moveSheet, #teamSheet, #ttSheet, #calSheet, #newSheet, #personaSheet, #importSheet { max-height:92vh;max-height:92dvh }
  /* A section of a view: one card of controls. Several toggles may be on at once (.multi). */
  .rchips { display:flex; flex-wrap:wrap; gap:7px; margin-top:6px }
  /* A person on a team (teamviews.js): initials in a circle, the address on tap. */
  .av { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; background:var(--raise); color:var(--ink); font-size:10.5px; font-weight:600; margin-inline-end:3px; vertical-align:middle }
  .av.on { background:var(--accent); color:var(--on-accent, #fff) }
  .ttabs { display:flex; gap:7px; overflow-x:auto; padding:2px 0 10px }
  .ttabs button { flex:none; background:var(--raise); border-radius:10px; padding:7px 11px; font-size:13.5px; color:var(--ink) }
  .ttabs button.on { background:var(--accent); color:var(--on-accent, #fff) }
  .people button { background:var(--raise); border-radius:14px; padding:6px 10px; font-size:13.5px; color:var(--ink); margin:0 6px 6px 0 }
  .people button.on { background:var(--accent); color:var(--on-accent, #fff) }
  /* The team's talk (teamviews.js): comments on a task and the chat. */
  .talk { display:flex; flex-direction:column; gap:8px; margin:6px 0 10px }
  .tmsg { background:var(--raise); border-radius:12px; padding:8px 10px; max-width:92% }
  .tmsg.mine { align-self:flex-end }
  .tmsg.agent { border:1px dashed var(--line, #8884) }
  .tmsg .who { font-size:12px; color:var(--dim); margin-bottom:3px }
  .tmsg .tx { white-space:pre-wrap; word-break:break-word }
  .tmsg .tatt { display:block; max-width:100%; border-radius:8px; margin-top:6px }
  .tmsg .tfile { display:block; margin-top:6px }
  .tcomp textarea { width:100%; box-sizing:border-box }
  .tact { padding:6px 0; border-bottom:1px solid var(--line, #8882); font-size:14px }
  /* Change members (sheets.js): one person a row — address, role, remove. */
  .tmm { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--line, #8882) }
  .tmm .em { flex:1; min-width:0; overflow-wrap:anywhere; font-size:14px }
  .tmm select { font-size:16px }
  .tmm.out .em { text-decoration:line-through; color:var(--dim) }
  .rchips button { background:var(--raise); border-radius:10px; padding:8px 11px; font-size:13.5px; color:var(--ink) }
  .rchips button small { color:var(--dim); margin-inline-start:4px; font-size:12.5px }
  .rchips button.on { background:var(--accent); color:var(--on-accent); font-weight:600 }
  .rchips button.on small { color:var(--on-accent); opacity:.75 }
  .rchips button:disabled { opacity:.35 }
  .rcustom { margin-top:8px; display:flex; align-items:center; gap:8px }
  .form .rcustom input { width:70px; display:inline-block } .form .rcustom select { width:auto; display:inline-block }
  #eRepNext.bad { color:var(--warn) }
  .cfgfield { padding:4px 16px 10px } .cfgfield label { display:block; font-size:13px; color:var(--dim) }
  .cfgfield input, .cfgfield select { display:block; width:100%; margin-top:5px; padding:10px 12px; border-radius:11px; border:1px solid var(--line); background:var(--raise); color:var(--ink); font-size:16px }
  .areas { display:flex; flex-wrap:wrap; gap:7px; margin-top:6px; align-items:center }
  .areachip { display:inline-flex; align-items:center; gap:4px; background:var(--raise); border-radius:10px; padding:6px 6px 6px 11px; font-size:14px; color:var(--ink) }
  .areachip button { color:var(--dim); font-size:16px; padding:0 5px }
  .cfgfield .areas input { flex:1; min-width:120px; margin-top:0 }
  .swatches { display:flex; flex-wrap:wrap; gap:10px; padding:4px 16px 12px }
  .swatches button { width:34px; height:34px; border-radius:50%; border:2px solid transparent; box-shadow:inset 0 0 0 3px var(--panel) }
  .swatches button.on { border-color:var(--ink) }
  .swatches label { display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--dim) }
  .swatches input[type=color] { width:34px; height:34px; border:none; padding:0; background:none; border-radius:50% }
  .cfgseg { padding:0 16px 12px }
  .arr-g { border:1px solid var(--line); border-radius:14px; margin:0 0 12px; padding:4px 0 }
  .arr-row { display:flex; align-items:center; gap:6px; padding:6px 10px }
  .arr-row.head { font-weight:640; font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--dim) }
  .arr-row .lbl { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
  .arr-row.off .lbl { opacity:.45; text-decoration:line-through }
  .arr-row button { background:var(--raise); border-radius:9px; padding:6px 9px; font-size:13px; color:var(--ink) }
  .arr-row button:disabled { opacity:.3 }
  .vsec { border:1px solid var(--line); border-radius:14px; padding:12px 12px 2px; margin:0 0 12px }
  .vsec .seg { flex-wrap:wrap }
  .vsec .rm { float:inline-end; font-size:13px; color:var(--dim) }
  .form label { display:block; font-size:12px; color:var(--dim); margin:0 0 12px; letter-spacing:.02em }
  .form input, .form textarea, .form select { display:block; width:100%; box-sizing:border-box;
    margin-top:5px; font:16px/1.45 inherit; color:var(--ink); background:var(--bg);
    border:1px solid var(--line); border-radius:11px; padding:10px 12px; -webkit-appearance:none }
  .form textarea { resize:vertical }
  .form .two { display:flex; gap:12px } .form .two label { flex:1; min-width:0 }
  .form .row { display:flex; align-items:center; gap:10px; margin-top:2px }
  .form .row .sp { flex:1 }
  .form .row .primary { flex:1 }
  .form .fld { font-size:12px; color:var(--dim); margin:0 0 14px; letter-spacing:.02em }
  .seg { display:flex; gap:6px; margin-top:6px }
  .seg button { flex:1; padding:9px 4px; border-radius:10px; background:var(--raise);
    color:var(--dim); font-size:13.5px; font-weight:560; border:1px solid transparent; min-width:0;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
  .seg button.on { background:var(--accent); color:var(--on-accent) }
  .seg button.p1.on { background:#c9382c }
  .linkish { display:block; width:100%; margin-top:18px; padding:12px; border-radius:11px;
    background:none; font-size:14.5px; font-weight:580 }
  .linkish.danger { color:#c9382c }
  .linkish.danger:hover { background:#c9382c14 }
  /* fields: quiet until touched, so the sheet is not a wall of identical boxes */
  .form input, .form textarea { background:var(--raise); border-color:transparent }
  .form input:focus, .form textarea:focus { background:var(--bg); border-color:var(--accent); outline:none }
  .capHint { padding:0 var(--pad) 12px; color:var(--dim); font-size:13px; line-height:1.5 }
  .bar-in { position:static; padding:0 var(--pad) calc(16px + var(--safe)) }
  .menu { position:fixed; z-index:60; background:var(--panel); border:1px solid var(--line);
    border-radius:14px; padding:6px; min-width:200px; box-shadow:0 18px 50px rgba(0,0,0,.35) }
  .menu button { display:block; width:100%; text-align:start; padding:12px 14px; border-radius:10px;
    font-size:15px; color:var(--ink); background:none }
  .menu button:hover { background:var(--raise) }
  .menu button.danger { color:#e1584b }
  .menu .sep { height:1px; background:var(--line); margin:5px 8px }
  .menu .cap { padding:9px 14px 6px; color:var(--dim); font-size:12px }
  #statusBar button.danger { color:#e1584b }
  .capbox input { width:100%; box-sizing:border-box; font:16px/1.5 inherit; padding:11px 12px;
    border:1px solid var(--line); border-radius:11px; background:var(--bg); color:var(--ink) }
  .capbox .row { margin-top:10px }
  #statusBar .st { flex:1; min-width:0 }
  #statusBar button { font-size:14px; font-weight:640; color:var(--accent); padding:4px 6px }
  #statusBar.bad button { color:#fff; text-decoration:underline }
  #statusBar .x { color:var(--dim); font-weight:400 }
  #gateBuild { margin-top:22px; font:12px ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace; color:var(--dim) }
  #gateRecover { display:block; margin:26px auto 0; padding:11px 20px; border-radius:12px;
    background:var(--raise); color:var(--ink); font-size:15px }
  /* A skill is a short act, not a paragraph — it should read as a marker between turns. */
  .msg.self.skill .txt { font-size:14px; font-weight:600; padding:9px 14px; opacity:.95 }
  /* The conversation must always keep most of the screen: what is waiting matters, but not
     more than being able to read why. */
  #props { flex:0 0 auto; max-height:38vh;max-height:38dvh; overflow-y:auto; padding:10px var(--pad) 4px;
    border-top:1px solid var(--line); background:var(--panel) }
  #props:empty { display:none }
  .preview { margin:2px 0 4px }
  .preview-cap { font-size:11.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--dim);
    padding:2px 4px 6px; font-weight:600 }
  .preview .task { margin:0; cursor:default }
  /* A long description would push everything else off the card. Three lines answer "does this
     look right"; the full text is one tap away under the arrow, and is his own words anyway. */
  .preview .desc { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
    overflow:hidden; max-height:4.8em }
  #hapticLabel { position:fixed; left:-9999px; top:0; width:1px; height:1px; opacity:0; pointer-events:none }
  .task.pending { opacity:.72 }
  .task.pending .box { cursor:default }
  .undo-inline { margin:6px 0 0 auto; display:block; font-size:14px; font-weight:640;
    color:var(--accent); padding:6px 2px }
  .cfggrp { padding:22px 16px 8px; font-size:12px; letter-spacing:.06em; text-transform:uppercase;
    color:var(--dim); font-weight:600 }
  .cfggrp:first-child { padding-top:6px }
  .cfgrow { align-items:flex-start }
  .cfgrow .txt b { display:block; margin-bottom:3px }
  .cfgsay { margin:-4px 16px 14px; padding:10px 12px; background:var(--raise); border-radius:10px;
    font-size:13.5px; line-height:1.5; color:var(--ink) }
  .cfgsay.bad { background:#5b1f1a; color:#fff }
  #offlineBar { position: sticky; top: 0; z-index: 50; background: #3a3a3a; color: #fff;
    font: 12px/1.5 -apple-system, system-ui, sans-serif; padding: 7px 14px; text-align: center }
  /* The phone's copy is on screen and the room is still opening. Quieter than offline: it lasts
     seconds and usually needs nothing from him — but it says so, because a copy must never pass
     for the live room. */
  #syncBar { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
    z-index: 50; background: var(--raise); color: var(--dim); font-size: 12.5px; padding: 3px 12px; border-radius: 12px }
  /* The recovery code (recovery.js): big, spaced, selectable — he copies it or writes it down. */
  .rcCode { font: 600 20px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; text-align: center;
    padding: 14px 10px; margin: 14px 0 8px; border-radius: 10px; background: var(--raise); user-select: all; -webkit-user-select: all; word-break: break-all }

/* ── THE HOME SCREEN (16/10, after Guy's preview — MinimaList's shape with our features; his yes, item by item) ──────
   One block, after everything. It replaces the centred header with ☰ and ＋, the drawer, the "🔒 Assistant" pill and
   the task as a panel of chips. Rows are scoped to `main`, so a task drawn in a sheet keeps the look it had. */
svg.ln{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
header{gap:8px;padding:calc(8px + env(safe-area-inset-top,0px)) 16px 6px}
header .pickbtn{display:flex;align-items:center;gap:5px;min-width:0;padding:6px 0;color:var(--ink)}
header h1{flex:0 1 auto;text-align:start;font-size:22px;font-weight:700;letter-spacing:-.022em}
header .pickbtn svg{width:10px;height:10px;flex:0 0 auto;margin-top:4px;stroke-width:1.5;transition:transform .26s cubic-bezier(.3,1.25,.4,1)}
header .pickbtn[aria-expanded=true] svg{transform:rotate(180deg)}
header .sp{flex:1}
header .hpill{display:flex;align-items:center;flex:0 0 auto;background:var(--panel);border-radius:21px;padding:0 4px;box-shadow:0 2px 14px #00000014}
header .hpill .icon{width:38px;height:42px;border-radius:19px;color:var(--ink)}
header .hpill .icon.on{background:var(--raise);color:var(--accent)}
header .icon svg{width:20px;height:20px}
header .hq{flex:1;min-width:0;border:0;outline:0;background:none;color:var(--ink);font:inherit;font-size:20px;font-weight:600;padding:6px 0}
header.searching .pickbtn,header.searching .sp,header.searching #hist,header.searching #nowBtn{display:none}
/* Search turns into ✕ and back: the glass shrinks away, its handle grows into one stroke of the ✕ and the other is drawn
   across it. Lengths are the icon's own units (a 24 box); the stroke keeps its width while a line is scaled. */
.morph *{vector-effect:non-scaling-stroke;transition:transform .3s cubic-bezier(.3,.8,.3,1),opacity .2s}
.morph .m-o{transform-origin:11px 11px}
.morph .m-a{transform-origin:12px 12px;transform:translate(5.5px,5.5px) scale(.364)}
.morph .m-b{transform-origin:12px 12px;transform:rotate(-90deg) scale(0);opacity:0}
header.searching .morph .m-o{transform:scale(0);opacity:0}
header.searching .morph .m-a{transform:none}
header.searching .morph .m-b{transform:none;opacity:1}
@media (prefers-reduced-motion:reduce){.morph *{transition:none}}

main{padding:2px 16px 170px}
main .sect{font-size:13.5px;letter-spacing:0;text-transform:none;margin:18px 0 2px}
main .sect:first-child{margin-top:4px}
main .empty{min-height:56vh;display:grid;place-items:center;padding:0;font-size:17px;opacity:.62}
main .outcome{margin:4px 0 8px}

/* A task is a line of text with a small square before it; what is set sits under it in one small row. */
main .task{display:flex;gap:11px;align-items:flex-start;background:none;border-radius:0;padding:9px 0;margin:0}
main .task .box,main .cl-item .box{flex:0 0 auto;position:relative;width:17px;height:17px;border:1.6px solid var(--ink);border-radius:4.5px;
  display:grid;place-items:center;margin-top:3px;color:transparent;font-size:11px;font-weight:700;line-height:1;
  transition:background .14s,border-color .14s,color .14s}
main .task .box::after,main .cl-item .box::after{content:'';position:absolute;inset:-13px}   /* the finger's target stays a finger's size */
main .task .body{flex:1;min-width:0;cursor:pointer}
main .task .title{font-size:17px;line-height:1.32;word-break:break-word}
main .task.done .box,main .cl-item.done .box{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
main .task.done>*,main .cl-item.done>*{opacity:.5;transition:opacity .3s}
main .task.done .meta{text-decoration:line-through}
main .meta{direction:ltr;text-align:left;gap:0;margin-top:2px;font-size:11.5px;color:var(--dim)}
main .meta span{background:none;border-radius:0;padding:0}
main .meta span+span::before{content:'|';margin:0 6px;opacity:.55}
main .meta .soon,main .meta .p1,main .meta .late{color:var(--warn)}
main .meta .id{font-size:10.5px;letter-spacing:-.01em}
main .task .desc,main .cl-item .desc{margin-top:2px;font-size:12.5px}
/* The line through a ticked title is DRAWN from where the text starts to its end, and drawn back on an untick. It is a
   background on the inline text, so on a title of two lines it runs along the first and then the second. */
main .title .sk{background:linear-gradient(currentColor,currentColor) no-repeat 0 56%/0 1.5px}
main .title:dir(rtl) .sk{background-position:100% 56%}
main .task.done .title,main .cl-item.done .title{text-decoration:none;color:inherit}
main .task.done .title .sk,main .cl-item.done .title .sk{background-size:100% 1.5px}
main .strike .title .sk{animation:strike .3s cubic-bezier(.3,.7,.3,1) both}
main .unstrike .title .sk{animation:strike .26s cubic-bezier(.4,0,.6,1) reverse both}
@keyframes strike{from{background-size:0 1.5px}to{background-size:100% 1.5px}}
@media (prefers-reduced-motion:reduce){main .strike .title .sk,main .unstrike .title .sk{animation-duration:1ms}}
/* Now and the views: a ticked task holds its place for a beat, with its way back (the beat is state — views.js). */
main .task.settling{background:none}
main .task.settling .box{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
main .task.settling .title{color:var(--dim)}
main .task.settling .title .sk{background-size:100% 1.5px}
main .task .undo-inline{margin:2px 0 0;font-size:13px;padding:4px 0}

/* A tapped task opens IN PLACE: its note, its steps, what is set, and what can be done with it. */
main .task.tcard{display:block;background:var(--panel);border-radius:14px;box-shadow:0 2px 16px #00000014;margin:6px -8px 10px;padding:2px 12px 0;scroll-margin-block:16px 150px}
main .tcard .l{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--line);font-size:15.5px;line-height:1.35}
main .tcard .l>span{flex:1;min-width:0;word-break:break-word;white-space:pre-wrap}
main .tcard .tt{cursor:pointer}
main .tcard .tt .title{font-size:17.5px}
main .tcard .note svg{width:15px;height:15px;flex:0 0 auto;margin-top:3px;color:var(--dim)}
main .tcard .box{margin-top:2px}
main .tcard .step.done>span{color:var(--dim);text-decoration:line-through}
main .tcard .step.done .box{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
main .tcard .l>span.est{flex:0 0 auto;font-size:11px;color:var(--dim);margin-top:3px;text-decoration:none}
main .tcard .l.new .box{opacity:.45}
main .tcard .l.new input{flex:1;min-width:0;border:0;outline:0;background:none;color:var(--ink);font:inherit;font-size:16px;padding:0}
main .tcard .meta{padding:9px 0;margin:0;border-bottom:1px solid var(--line);flex-wrap:wrap}
main .tcard .acts{display:flex;padding:5px 0 6px}
main .tcard .acts button{flex:1;display:flex;flex-direction:column;align-items:center;gap:1px;padding:5px 0;border-radius:10px;font-size:10px;color:var(--dim)}
main .tcard .acts button:active{background:var(--raise)}
main .tcard .acts svg{width:21px;height:21px;color:var(--ink)}
main .tcard .acts .danger svg{color:#e02e2a}
/* Opening and closing (views.js openAnim / closeAnim — the height is the script's, the rest is here). */
main .tcard.opening{animation:cardin .3s ease-out}
main .tcard.opening>.tt>.title{animation:ttin .36s cubic-bezier(.3,.8,.3,1)}
main .tcard.opening>:not(.tt){animation:lin .34s cubic-bezier(.3,.8,.3,1) both}
main .tcard.opening>:nth-child(2){animation-delay:.03s} main .tcard.opening>:nth-child(3){animation-delay:.06s}
main .tcard.opening>:nth-child(4){animation-delay:.09s} main .tcard.opening>:nth-child(5){animation-delay:.12s}
main .tcard.opening>:nth-child(n+6){animation-delay:.15s}
@keyframes cardin{from{background-color:transparent;box-shadow:0 2px 16px #0000}}
@keyframes ttin{from{transform:translateX(28px)}}
@keyframes lin{from{opacity:0;transform:translateY(-8px)}}
main .tcard.closing{background-color:transparent;box-shadow:0 2px 16px #0000}
main .tcard.closing>:not(.tt){opacity:0;transition:opacity .13s}
main .tcard.closing>.tt{border-bottom-color:transparent;transition:border-color .13s}
main .tcard.closing>.tt>.title{transform:translateX(28px);transition:transform .26s cubic-bezier(.4,0,.3,1)}
@media (prefers-reduced-motion:reduce){main .tcard.opening,main .tcard.opening>*,main .tcard.opening>.tt>.title{animation:none}}

/* A checklist, Stats, History and search results in the same hand. */
main .cl-item{border:0;padding:9px 0;gap:11px}
main .cl-item .body{flex:1;min-width:0}
main .cl-item .title{font-size:17px;line-height:1.32;word-break:break-word}
main .cl-add{border:0;outline:0;background:none;color:var(--ink);font:inherit;font-size:17px;padding:9px 0;margin:0}

/* Capture, Clear ticked and the tabs: over the page, under the scrim (40) — a sheet's dimming covers them. */
.add{position:fixed;inset-inline-end:20px;bottom:calc(92px + var(--safe));z-index:39;width:48px;height:48px;border-radius:50%;
  background:var(--accent);color:var(--on-accent);display:grid;place-items:center;box-shadow:0 4px 14px #0000002e}
.add svg{width:22px;height:22px;stroke-width:2.1}
.add:active{transform:scale(.95)}
.clearbar{position:fixed;inset-inline:22px 80px;bottom:calc(93px + var(--safe));z-index:39;height:46px;border-radius:23px;
  background:var(--panel);color:var(--ink);font-size:15px;font-weight:560;box-shadow:0 4px 26px #00000016;display:grid;place-items:center}
.clearbar:active{transform:scale(.98)}
.clearbar.undo{color:var(--accent);font-weight:640;display:flex;justify-content:center;align-items:center;gap:9px;animation:undofade 5s cubic-bezier(.5,0,.9,.7) both}
.clearbar.undo .n{min-width:22px;height:22px;border-radius:11px;background:var(--raise);font-size:13px;line-height:22px;text-align:center;font-variant-numeric:tabular-nums}
@keyframes undofade{to{opacity:0}}
body.cfg-open .clearbar,body.cfg-open .add{display:none}
.tabs{position:fixed;inset-inline:22px;bottom:calc(18px + var(--safe));z-index:39;height:56px;border-radius:28px;
  display:flex;align-items:center;gap:2px;padding:0 7px}
.tabs button{flex:1;height:44px;border-radius:22px;display:grid;place-items:center;position:relative;color:var(--dim);opacity:.75;z-index:1;transition:color .2s,opacity .2s}
.tabs button svg{width:22px;height:22px;transition:transform .34s cubic-bezier(.3,1.5,.5,1)}
.tabs button.on{color:var(--ink);opacity:1}
.tabs button.on svg{transform:scale(1.07)}
.tabs button:active svg{transform:scale(.86);transition-duration:.08s}
/* Glass: what is behind shows through, blurred; a bright upper edge where the light catches it. The lit tab has no fill
   of its own — the lens (ui.js) lies under it and slides to the next. */
.tabs{--hi:#ffffffd9;--rim:#ffffff66;--drop:#0000001f;background:color-mix(in srgb,var(--panel) 62%,transparent);
  -webkit-backdrop-filter:blur(22px) saturate(180%);backdrop-filter:blur(22px) saturate(180%);
  box-shadow:0 8px 30px var(--drop),inset 0 1px 0 var(--hi),inset 0 0 0 1px var(--rim),inset 0 -1px 0 #0000000f}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .tabs{--hi:#ffffff2e;--rim:#ffffff14;--drop:#00000066}}
:root[data-theme=dark] .tabs{--hi:#ffffff2e;--rim:#ffffff14;--drop:#00000066}
.tabs .lens{position:absolute;left:0;top:6px;height:44px;border-radius:22px;pointer-events:none;will-change:transform;transition:opacity .2s;
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 8%,transparent),color-mix(in srgb,var(--accent) 18%,transparent));
  box-shadow:inset 0 1px 0 var(--hi),inset 0 0 0 1px var(--rim),inset 0 -2px 3px #0000000d,0 2px 8px #00000014}
@media (prefers-reduced-transparency:reduce){.tabs{background:var(--panel);-webkit-backdrop-filter:none;backdrop-filter:none}}
@media (prefers-contrast:more){.tabs{background:var(--panel);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:inset 0 0 0 1.5px var(--ink)}}
/* Cards waiting: a dot on the Assistant's tab (the count is in its text, for a screen reader). */
.tabs .badge{position:absolute;top:9px;left:calc(50% + 8px);width:8px;height:8px;border-radius:50%;background:#e5484d;font-size:0;color:transparent;overflow:hidden}
.tabs #openSheet.pulse{color:var(--accent);opacity:1}

/* The menu of lists, under the name. It opens out of the name — a little small and a little high, then in place — its
   lines following one after the other, and closes back into it (`.out`, sheets.js openDrawer). */
.menu:not([hidden]){transform-origin:calc(100% - 22px) top;animation:menuin .26s cubic-bezier(.3,1.25,.4,1)}
.menu.pick:not([hidden]){transform-origin:36px top}
.menu.pick.out{animation:menuout .15s cubic-bezier(.4,0,1,1) forwards;pointer-events:none}
.menu:not([hidden]):not(.out)>*,.menu.pick:not([hidden]):not(.out) .nav>*{animation:menurow .28s cubic-bezier(.3,.8,.3,1) both}
@keyframes menuin{from{opacity:0;transform:scale(.9) translateY(-8px)}}
@keyframes menuout{to{opacity:0;transform:scale(.94) translateY(-6px)}}
@keyframes menurow{from{opacity:0;transform:translateY(-6px)}}
@media (prefers-reduced-motion:reduce){.menu:not([hidden]),.menu.pick.out,.menu:not([hidden])>*,.menu.pick .nav>*{animation-duration:1ms;animation-delay:0s}}
.menu.pick{border:0;border-radius:16px;box-shadow:0 6px 30px #00000024;min-width:226px;max-width:84vw;max-height:72vh;max-height:72dvh;overflow-y:auto;padding:6px}
.menu.pick .grp{font-size:11px;color:var(--dim);margin:8px 12px 2px}
.menu.pick .grp:first-child{margin-top:4px}
.menu.pick button{display:flex;align-items:center;gap:9px;padding:9px 12px;font-size:15.5px}
.menu.pick button.on{background:var(--raise);font-weight:600}
.menu.pick .ic{flex:0 0 auto;width:18px;text-align:center;color:var(--dim);font-size:13px}
.menu.pick button.on .ic{color:var(--accent)}
.menu.pick .n{margin-inline-start:auto;font-size:12px;color:var(--dim)}

/* SETTINGS IS A PAGE: over the lists and under the tabs; every heading opens and closes. */
.page{position:fixed;inset:0;z-index:38;background:var(--bg);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  padding:0 16px calc(110px + var(--safe));opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility 0s .18s}
.page.on{opacity:1;visibility:visible;pointer-events:auto;transition:opacity .18s ease}
.page .phd{position:sticky;top:0;z-index:2;background:var(--bg);padding:calc(14px + env(safe-area-inset-top,0px)) 0 8px}
.page .phd h1{margin:0;font-size:22px;font-weight:700;letter-spacing:-.022em}
#cfg .cfggrp{display:flex;align-items:center;width:100%;padding:17px 2px;font-size:16.5px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink);text-align:start}
#cfg .cfggrp span{flex:1}
#cfg .cfggrp svg{width:11px;height:11px;stroke-width:1.5;color:var(--dim);transition:transform .36s cubic-bezier(.3,.8,.3,1)}
#cfg .cfggrp.on svg{transform:rotate(180deg)}
/* Open and shut are one motion of the box's height (0fr ↔ 1fr), with what is in it fading and settling into place. */
#cfg .cfgbox{display:grid;grid-template-rows:0fr;border-bottom:1px solid var(--line);transition:grid-template-rows .38s cubic-bezier(.3,.8,.3,1)}
#cfg .cfgbox.open{grid-template-rows:1fr}
#cfg .cfgbox>.in{min-height:0;overflow:hidden;opacity:0;transform:translateY(-6px);transition:opacity .22s ease,transform .38s cubic-bezier(.3,.8,.3,1)}
#cfg .cfgbox.open>.in{opacity:1;transform:none;transition-delay:.05s,0s}
#cfg .cfgbox>.in::after{content:'';display:block;height:10px}
@media (prefers-reduced-motion:reduce){#cfg .cfgbox,#cfg .cfgbox>.in,#cfg .cfggrp svg{transition-duration:1ms}}
#cfg .cfgsay{margin-inline:0}
/* The palettes: a small picture of each, light half and dark half. */
.palettes{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:10px 2px 6px}
.palettes button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 6px;border-radius:14px;border:1.5px solid var(--line);font-size:13.5px}
.palettes button.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);font-weight:600}
.palettes .pic{display:flex;width:100%;height:46px;border-radius:9px;overflow:hidden;box-shadow:inset 0 0 0 1px #0000000f}
.palettes .pic i{flex:1;display:flex;flex-direction:column;justify-content:center;gap:5px;padding:0 8px}
.palettes .pic u{display:block;height:4px;border-radius:2px;background:var(--line);text-decoration:none}
.palettes .pic u:first-child{width:80%;background:var(--ink);opacity:.8}
.palettes .pic b{display:block;width:12px;height:12px;border-radius:4px;background:var(--acc)}
.swatches button.pal{box-shadow:inset 0 0 0 2px var(--panel)}
/* The phone's copy while the room opens: said in words, under the name — never over the header's pill. */
#syncBar{top:calc(54px + env(safe-area-inset-top,0px));left:16px;transform:none;background:none;padding:0;border-radius:0;font-size:12px;color:var(--dim)}
body:has(#syncBar) main{padding-top:20px}
.lookcap{font-size:12.5px;color:var(--dim);margin:12px 2px 0}
/* The menu of lists scrolls inside itself; New stays at its foot, always in reach. */
.menu.pick{display:flex;flex-direction:column;overflow:hidden}
.menu.pick .nav{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.menu.pick>.sep,.menu.pick>#newList{flex:0 0 auto}
/* COLOUR AS A SIGNAL (17/10 — look.js PALETTES): the accent is the page's name, the +, a ticked box and the lit tab;
   headings, boxes and the page itself stay calm. */
header h1,.page .phd h1{color:var(--accent)}
.tabs button.on{color:var(--accent)}
main .meta .note svg{width:12px;height:12px;vertical-align:-2px}

/* ── PHASE 2 (16/10, Guy's preview, his yes): the star, swipe to delete, a list's colour, dragging steps, the Calendar ── */
/* The star: pale and hollow at the end of a row until tapped; then filled, in amber, with a small pop. */
main .star{flex:0 0 auto;width:36px;height:36px;margin:-6px -8px -6px 0;display:grid;place-items:center;border-radius:50%;color:var(--dim)}
main .star svg{width:19px;height:19px;stroke-width:1.5;opacity:.38;transition:opacity .18s,color .18s}
main .star.on{color:#f0a81c}
main .star.on svg{fill:currentColor;opacity:1}
main .star:active svg{transform:scale(.84)}
main .star.pop svg{animation:starpop .36s cubic-bezier(.3,1.5,.5,1)}
@keyframes starpop{0%{transform:scale(.6)}55%{transform:scale(1.24)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){main .star.pop svg{animation:none}}
main .task.done>.star{opacity:.5}
main .tcard .tt .star{margin:-7px -8px -7px 0}
/* Swipe left: the row, edge to edge, slides off a red Delete lying behind it; deleted, the gap closes. */
main .swipe{position:relative;margin-inline:-16px;overflow:hidden;touch-action:pan-y pinch-zoom}
main .swipe>.task,main .swipe>.cl-item{position:relative;padding-inline:16px;background:var(--bg);will-change:transform}
main .swipe-del{position:absolute;inset:0;display:flex;align-items:center;justify-content:flex-end;gap:7px;padding-inline-end:18px;
  background:#e02e2a;color:#fff;font-size:14px;font-weight:600;visibility:hidden}
main .swipe.live .swipe-del{visibility:visible}
main .swipe-del svg{width:20px;height:20px;transition:transform .22s cubic-bezier(.3,1.6,.5,1)}
main .swipe-del.go svg{transform:scale(1.28)}
main .swipe.gone{transition:height .24s cubic-bezier(.3,.8,.3,1),opacity .2s;opacity:0}
/* The colours in a list's ⋯ menu: a row of small rounds, the first one "no colour". */
.menu .lc{display:flex;flex-wrap:wrap;gap:10px;padding:6px 14px 10px;width:250px}
.menu .lc button{flex:0 0 auto;width:26px;height:26px;padding:0;border-radius:50%;border:2px solid var(--panel);box-shadow:0 0 0 1.5px transparent;transition:box-shadow .15s,transform .2s cubic-bezier(.3,1.5,.5,1)}
.menu .lc button.on{box-shadow:0 0 0 1.5px var(--ink);transform:scale(1.06)}
.menu .lc button.none{background:linear-gradient(135deg,transparent calc(50% - 1px),var(--dim) calc(50% - 1px),var(--dim) calc(50% + 1px),transparent calc(50% + 1px));box-shadow:inset 0 0 0 1.5px var(--line)}
.menu .lc button.none.on{box-shadow:inset 0 0 0 1.5px var(--line),0 0 0 1.5px var(--ink)}
/* Drag to reorder steps: the grip at the end of a step; the step in hand is lifted, the others slide out of its way. */
main .tcard .grip{flex:0 0 auto;width:30px;height:28px;margin:-4px -6px -4px 0;display:grid;place-items:center;color:var(--dim);opacity:.5;touch-action:none;cursor:grab}
main .tcard .grip svg{width:18px;height:18px}
main .tcard.sorting .l.step{transition:transform .2s cubic-bezier(.3,.8,.3,1)}
main .tcard .l.step.drag{position:relative;z-index:2;transition:none;background:var(--panel);box-shadow:0 6px 20px #00000026;border-radius:10px;border-bottom-color:transparent;margin-inline:-8px;padding-inline:8px}
main .tcard .l.step.drag .grip{opacity:1;cursor:grabbing}
main .tcard .l.step.drag.drop{transition:transform .18s cubic-bezier(.3,.8,.3,1),box-shadow .18s;box-shadow:0 0 0 #0000}
/* The Calendar: the month on a card, a dot under a day that has tasks, the lists to filter by, and the day's tasks. */
main .mon-head{display:flex;align-items:center;gap:2px;margin:4px 0 8px}
main .mon-head b{flex:1;font-size:17px;font-weight:650;letter-spacing:-.01em}
main .mon-head .icon{width:38px;height:38px;border-radius:19px;display:grid;place-items:center;color:var(--ink)}
main .mon-head .icon:active{background:var(--raise)}
main .mon-head .icon svg{width:18px;height:18px}
main .mon-today{font-size:13.5px;font-weight:600;padding:7px 13px;border-radius:16px;background:var(--raise);margin-inline-end:4px}
main .mon-grid{background:var(--panel);border-radius:18px;padding:12px 8px 8px;box-shadow:0 2px 14px #0000000f;overflow:hidden}
main .mon-wk,main .mon-days{display:grid;grid-template-columns:repeat(7,1fr);row-gap:2px}
main .mon-days{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;will-change:transform}
main .mon-days.from-next{--from:38%;animation:monin .36s cubic-bezier(.2,.9,.3,1) both}
main .mon-days.from-prev{--from:-38%;animation:monin .36s cubic-bezier(.2,.9,.3,1) both}
@keyframes monin{from{transform:translateX(var(--from));opacity:0}}
@media (prefers-reduced-motion:reduce){main .mon-days.from-next,main .mon-days.from-prev{animation:none}}
main .mon-grid .wd{text-align:center;font-size:11.5px;color:var(--dim);padding-bottom:6px}
main .mon-grid .day{height:44px;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:15.5px;font-variant-numeric:tabular-nums}
main .mon-grid .day span{width:33px;height:33px;border-radius:50%;display:grid;place-items:center}
main .mon-grid .day.today span{box-shadow:inset 0 0 0 1.5px var(--accent);font-weight:650}
main .mon-grid .day.on span{background:var(--accent);color:var(--on-accent);font-weight:650}
main .mon-grid .day i{width:5px;height:5px;border-radius:50%;background:var(--ink)}
main .mon-grid .day i.late{background:var(--warn)}
main .mon-grid .day i.off{background:var(--dim);opacity:.4}
main .mon-filter{display:flex;gap:7px;overflow-x:auto;margin:14px -16px 0;padding:0 16px 2px;scrollbar-width:none}
main .mon-filter::-webkit-scrollbar{display:none}
main .mon-filter button{flex:0 0 auto;padding:7px 14px;border-radius:17px;background:var(--raise);font-size:13.5px;color:var(--dim)}
main .mon-filter button.on{background:var(--accent);color:var(--on-accent);font-weight:600}
main .mon-none{color:var(--dim);padding:12px 0;font-size:15px}
/* A list's colour MARKS it in the menu of lists (17/10, his call — to find a project at a glance; inside a list the app's
   own colour holds): its mark there takes the colour, a little larger. */
.menu.pick button{--lc:var(--lcl)}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .menu.pick button{--lc:var(--lcd)}}
:root[data-theme=dark] .menu.pick button{--lc:var(--lcd)}
.menu.pick button .ic{color:var(--lc,var(--dim))}
.menu.pick button[style*="--lcl"] .ic{font-size:16px;color:var(--lc)}   /* the open one too */
/* While a field on the page is typed in, the keyboard is up: the floating + , Clear and the tabs step aside (17/10, his
   note — the + over the keyboard while adding a step confused). */
body.typing .add,body.typing .clearbar,body.typing .tabs{display:none}
/* Where tasks of many lists meet (Now, the views, the Calendar), a coloured list's name carries a small dot of its colour. */
main .meta .lname{--lc:var(--lcl)}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) main .meta .lname{--lc:var(--lcd)}}
:root[data-theme=dark] main .meta .lname{--lc:var(--lcd)}
main .meta .ldot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--lc);margin-inline-end:4px;vertical-align:1px}
/* The assistant pulled up to the whole screen (17/10): no rounded top, the page's full height, its handle still there to
   pull it back down. */
#sheet{transition:transform .26s cubic-bezier(.3,.8,.3,1),max-height .3s cubic-bezier(.3,.8,.3,1),border-radius .3s}
/* Opened, it is the LOWER part of the screen (17/10, his note: pulled up it grew too little to notice) — the page stays
   in sight above it; pulled up, the whole screen. */
#sheet:not(.full){max-height:60vh;max-height:60dvh}
#sheet.full{max-height:100vh;max-height:100dvh;height:100vh;height:100dvh;border-radius:0;padding-top:env(safe-area-inset-top,0px)}

/* ── ADDING A TASK (17/10, Todoist's manner): the title, a note, chips; the list at the foot. ────────────────────── */
#capSheet{padding-bottom:calc(10px + var(--safe))}
#capSheet .xclose{position:absolute;top:6px;inset-inline-end:10px;width:36px;height:36px;border-radius:50%;color:var(--dim);font-size:17px}
.addform{display:flex;flex-direction:column;padding:0 var(--pad)}
.addform textarea{width:100%;border:0;outline:0;background:none;color:var(--ink);font:inherit;resize:none;padding:4px 0}
#capField{font-size:19px;font-weight:600;line-height:1.35;padding-top:6px}
#capNote{font-size:16px;color:var(--ink);min-height:0;padding-bottom:6px}
#capNote::placeholder{font-style:normal}
.addform .chips{display:flex;flex-wrap:wrap;gap:8px;padding:8px 0 12px}
.addform .chip{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:17px;border:1px solid var(--line);font-size:14px;color:var(--dim);background:var(--panel)}
.addform .chip svg{width:16px;height:16px}
.addform .chip.set{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 8%,var(--panel));font-weight:560}
.addform .chip[data-k=priority][data-p="1"]{color:#e02e2a;border-color:#e02e2a66;background:#e02e2a10}
.addform .chip[data-k=priority][data-p="2"]{color:#d9480f;border-color:#d9480f66;background:#d9480f10}
.addform #capDate,.addform #capTag{margin:0 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:inherit;font-size:16px}
.addform .addfoot{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding:10px 0 4px}
.addform .addfoot .sp{flex:1}
.addform .tolist{border:0;background:none;padding:0 4px;color:var(--ink);font-weight:560}
.addform .tolist .dn{width:9px;height:9px;stroke-width:1.5}
.addform .send{width:40px;height:40px;border-radius:50%;background:var(--accent);color:var(--on-accent);display:grid;place-items:center}
.addform .send svg{width:20px;height:20px;stroke-width:2}
.addform .send:disabled{opacity:.4}
/* The task sheet saves as it goes (17/10): Done in its header, a quiet word at its foot. */
#editSheet .donebtn{font-size:15.5px;font-weight:620;color:var(--accent);padding:6px 10px;border-radius:10px}
#editSheet .donebtn:active{background:var(--raise)}
#editSheet .savesnote{padding:14px 0 4px}

/* ── THE ONBOARDING (onboarding.js, 17/10 — Guy's preview, design/preview/onboarding.html). In ink, not the accent: the
   round button is the app's ink colour in both themes, as he drew it. Everything is under #onb, so nothing leaks. ── */
#onb{position:fixed;inset:0;z-index:39;background:var(--bg);color:var(--ink);overflow:hidden;--ease:cubic-bezier(.22,1,.36,1);--pop:cubic-bezier(.34,1.56,.64,1)}
#onbBack{position:absolute;top:calc(10px + env(safe-area-inset-top,0px));inset-inline-start:10px;z-index:3;width:44px;height:44px;
  border-radius:50%;display:flex;align-items:center;justify-content:center;transition:opacity .2s,background-color .1s}
#onbBack svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#onbBack:active{background:var(--raise)}
#onbBack.off{opacity:0;pointer-events:none}
#onbStage{position:absolute;inset:0;touch-action:pan-y pinch-zoom}
#onb .oslide{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;will-change:transform,opacity;
  padding:calc(72px + env(safe-area-inset-top,0px)) 26px calc(176px + env(safe-area-inset-bottom,0px));
  display:flex;flex-direction:column;align-items:center;text-align:center;max-width:480px;margin:0 auto}
#onb .oslide.ghost{pointer-events:none}
#onb .oslide>*{width:100%}
#onb .enter{animation:orise .55s var(--ease) both;animation-delay:calc(var(--i,0) * 60ms + 60ms)}
@keyframes orise{from{opacity:0;transform:translateY(12px)}}
@keyframes ofade{from{opacity:0}}
#onb .oslide.ghost .enter{animation:none}
#onb h1{font-size:clamp(26px,7.4vw,31px);line-height:1.14;font-weight:650;letter-spacing:-.022em;margin:0 0 16px;text-wrap:balance;white-space:pre-line;color:var(--ink)}
#onb h1.big{font-size:clamp(38px,11vw,46px);line-height:1.02;letter-spacing:-.03em}
#onb h1 u{text-decoration-thickness:.07em;text-underline-offset:.16em}
#onb h1.fit{font-size:clamp(19px,5.7vw,24px);letter-spacing:-.018em;line-height:1.2}
#onb h1 small{display:block;font-size:20px;line-height:1.3;font-weight:500;color:var(--dim);letter-spacing:-.005em;margin-top:8px}
#onb .sub{font-size:19px;line-height:1.42;letter-spacing:-.005em;margin:0 0 14px;text-wrap:pretty}
#onb .sub b{font-weight:700}
#onb .body{font-size:17px;line-height:1.52;color:var(--dim);margin:0 0 14px;text-wrap:pretty;white-space:pre-line}
#onb .body.row1{margin-inline:-12px;width:calc(100% + 24px)}
#onb .body.row1 span{display:inline-block;white-space:nowrap}
#onb .seen+.body{margin:16px 0 0}
#onb .note{font-size:15px;color:var(--dim);margin:20px 0 0}
#onb .mid{margin-block:auto;display:flex;flex-direction:column;align-items:center}
#onb .mid.top{margin-block:0 auto}
#onb .art{width:116px;height:116px;margin-bottom:26px;color:var(--ink)}
#onb .art svg{width:100%;height:100%;overflow:visible;fill:none;stroke:currentColor;stroke-width:3.6;stroke-linecap:round;stroke-linejoin:round}
#onb .art .fill{fill:currentColor;stroke:none}
#onb .art.sparkles{width:96px;height:96px}
#onb .art.wondering{width:132px;height:132px;margin-bottom:20px}
#onb .shield{width:72px;height:72px;border-radius:18px;margin-bottom:26px;box-shadow:0 8px 26px #00000024}
/* Options: the press is felt on the way down, the tick lands with a small pop. */
#onb .opts{display:flex;flex-direction:column;gap:10px;margin-top:10px;text-align:start}
#onb .opt{display:flex;align-items:center;gap:12px;min-height:54px;background:var(--panel);border:1.5px solid var(--line);
  border-radius:16px;padding:13px 16px;font-size:16.5px;line-height:1.3;transition:transform .12s ease-out,border-color .18s,background-color .18s}
#onb .opt:active{transform:scale(.975)}
#onb .opt .tick{width:22px;height:22px;flex:0 0 auto;border-radius:50%;border:1.5px solid var(--dim);display:flex;align-items:center;justify-content:center;transition:background-color .18s,border-color .18s}
#onb .opt.multi .tick{border-radius:7px}
#onb .opt .tick svg{width:12px;height:12px;fill:none;stroke:var(--bg);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:0}
#onb .opt.on{border-color:var(--ink)}
#onb .opt.on .tick{background:var(--ink);border-color:var(--ink);animation:opop .42s var(--pop)}
#onb .opt.on .tick svg{opacity:1}
@keyframes opop{0%{transform:scale(.82)}55%{transform:scale(1.06)}100%{transform:scale(1)}}
#onb .field{width:100%;font:inherit;font-size:17px;padding:15px 16px;border:1.5px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink);margin-top:10px;transition:border-color .18s}
#onb .field:focus{outline:none;border-color:var(--ink)}
/* What is stored: the same task, sealed. */
#onb .seen{background:var(--panel);border-radius:16px;padding:4px 16px;margin-top:12px;text-align:start}
#onb .seen div{padding:12px 0;border-bottom:1px solid var(--line)}
#onb .seen div:last-child{border:0}
#onb .seen span{display:block;font-size:12.5px;color:var(--dim);margin-bottom:2px}
#onb .seen code{font:13px/1.5 ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;color:var(--dim);word-break:break-all}
/* The card, in the assistant's look. Approved: green spreads from where Approve was pressed and the tick is drawn;
   dismissed: it sinks a little and dims. */
#onb .say{font-size:15px;color:var(--dim);margin:14px 0 0;text-align:start}
#onb .ocard{position:relative;overflow:hidden;background:var(--panel);border:1.5px solid var(--line);border-radius:18px;padding:15px 16px;margin-top:8px;text-align:start;
  transition:background-color .35s var(--ease),border-color .35s var(--ease),opacity .3s}
#onb .ocard>*{position:relative}
#onb .ocard.arrive{animation:oarrive .5s var(--ease)}
@keyframes oarrive{from{opacity:0;transform:scale(.96) translateY(8px)}}
#onb .ocard .hd{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:var(--dim);margin-bottom:6px;transition:color .3s}
#onb .ocard .hd i{width:18px;height:18px;border-radius:50%;background:var(--ok);display:none;align-items:center;justify-content:center}
#onb .ocard .hd i svg{width:10px;height:10px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#onb .ocard .what{font-size:17px;line-height:1.4;margin:0 0 2px;overflow-wrap:anywhere}
#onb .ocard .when{font-size:14px;color:var(--dim);margin:0}
#onb .ocard .when:empty{display:none}
#onb .ocard::before{content:'';position:absolute;inset:0;background:color-mix(in srgb,var(--ok) 11%,var(--panel));clip-path:circle(0 at 74% 82%)}
#onb .ocard.approved{border-color:var(--ok)}
#onb .ocard.approved::before{animation:owash .6s var(--ease) forwards}
@keyframes owash{to{clip-path:circle(150% at 74% 82%)}}
#onb .ocard.approved .hd i svg path{stroke-dasharray:12;animation:odraw .34s .16s var(--ease) both}
@keyframes odraw{from{stroke-dashoffset:12}}
#onb .ocard .hd span{animation:orise .38s var(--ease) both}
#onb .ocard.approved .hd{color:var(--ok)}
#onb .ocard.approved .hd i{display:flex;animation:opop .42s var(--pop)}
#onb .ocard.dismissed{opacity:.55}
#onb .orow{display:flex;gap:8px;margin-top:14px}
#onb .orow button{flex:1;height:48px;border-radius:14px;background:var(--raise);font-size:16px;transition:transform .12s ease-out,opacity .12s}
#onb .orow button:active{transform:scale(.97);opacity:.85}
#onb .orow button.primary,#onb .again button.primary{background:var(--ink);color:var(--bg);font-weight:600}
#onb .linkish{display:block;width:auto;margin:12px auto 0;padding:6px 4px;font-size:14.5px;font-weight:600;color:var(--ink);background:none;text-decoration:underline;text-underline-offset:3px}
#onb .linkish:active{opacity:.6}
/* The room, made: a row waits for him (a ring), works (a spinner, its words shimmering), and settles with a tick. */
#onb .steps{list-style:none;margin:6px auto 4px;padding:0;display:inline-flex;flex-direction:column;text-align:start;width:auto}
#onb .steps li{display:flex;align-items:center;gap:12px;padding:8px 0;font-size:17px;color:var(--dim);opacity:0;transform:translateY(6px);
  transition:opacity .2s var(--ease),transform .5s var(--ease),color .35s var(--ease)}
#onb .steps li.shown{opacity:1;transform:none}
#onb .steps li.wait,#onb .steps li.done{color:var(--ink)}
#onb .steps .ic{position:relative;width:22px;height:22px;flex:0 0 auto}
#onb .steps .ic>*{position:absolute;inset:0;border-radius:50%;transition:opacity .35s var(--ease);opacity:0}
#onb .steps .ring{border:2px solid var(--line);opacity:1}
#onb .steps li.wait .ring{border-color:var(--ink)}
#onb .steps .spin{border:2px solid var(--line);border-top-color:var(--ink);animation:ospin .7s linear infinite}
#onb .steps .ok{background:var(--ok);display:flex;align-items:center;justify-content:center}
#onb .steps .ok svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#onb .steps li.work .ring,#onb .steps li.done .ring{opacity:0}
#onb .steps li.work .spin{opacity:1}
#onb .steps li.done .ok{opacity:1;animation:opop .42s var(--pop)}
#onb .steps li.work .lbl{background:linear-gradient(90deg,var(--dim) 38%,var(--line) 50%,var(--dim) 62%) 0 0/250% 100%;
  -webkit-background-clip:text;background-clip:text;color:transparent;animation:oshimmer 1.8s linear infinite}
@keyframes ospin{to{transform:rotate(1turn)}}
@keyframes oshimmer{to{background-position:100% 0}}
/* The app's one sign-in form, drawn here (sheets.js signInForm), in the onboarding's look. */
#onb .signin{text-align:start;margin-top:14px}
#onb .signin label{display:block;font-size:13px;color:var(--dim);margin:12px 0 0}
#onb .signin input{display:block;width:100%;margin-top:6px;font:inherit;font-size:17px;padding:14px 16px;border:1.5px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink)}
#onb .signin input:focus{outline:none;border-color:var(--ink)}
#onb .signin .row{display:flex;gap:8px;margin-top:12px}
#onb .signin .row button{flex:1;height:52px;border-radius:16px;font-size:16.5px;background:var(--raise)}
#onb .signin .row button.primary{background:var(--ink);color:var(--bg);font-weight:600}
#onb .signin .row button:disabled{opacity:.45}
#onb .signin .terms{padding:10px 2px 0;font-size:13px;color:var(--dim);text-align:center}
#onb .signin .terms a,.terms a{color:inherit;text-underline-offset:2px}
#onb .onote{font-size:14.5px;color:var(--dim);margin:14px 0 0;text-align:start}
#onb .onote:empty{display:none}
#onb .onote.bad{color:var(--warn)}
#onb .again{display:flex;flex-direction:column;gap:8px;margin-top:12px}
#onb .again:empty{display:none}
#onb .again button{height:52px;border-radius:16px;font-size:16.5px;background:var(--raise)}
/* The one button: a filled circle with an arrow, and a ring around it that closes as the flow goes on. Always ink,
   always works — a question may be passed unanswered. */
#onbFoot{position:absolute;inset-inline:0;bottom:0;z-index:2;display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none;
  padding:34px 0 calc(22px + env(safe-area-inset-bottom,0px));background:linear-gradient(to bottom,transparent,var(--bg) 34px);transition:opacity .25s}
#onbFoot.off{opacity:0}
#onbFoot.off #onbGo{pointer-events:none}
#onbGo{pointer-events:auto;position:relative;width:76px;height:76px;border-radius:50%;touch-action:manipulation;transition:opacity .25s}
#onbGo>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#onbGo .oring{fill:none;stroke:var(--ink);stroke-width:2.2;stroke-linecap:round;transform:rotate(-90deg);transform-origin:38px 38px}
#onbGo .core{position:absolute;inset:13px;border-radius:50%;background:var(--ink);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px #00000029}
#onbGo .core svg{width:20px;height:20px;fill:none;stroke:var(--bg);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#onbGo:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
#onbGoLabel{font-size:13.5px;font-weight:500;color:var(--dim);min-height:20px;letter-spacing:.005em;transition:opacity .25s}
/* The welcome screen's way on: a wide button with its words inside, and under it the way for someone who has Keepwarden. */
#onbStart{position:absolute;inset-inline:26px;bottom:calc(74px + env(safe-area-inset-bottom,0px));height:56px;border-radius:16px;max-width:428px;margin:0 auto;
  background:var(--ink);color:var(--bg);font-size:17px;font-weight:600;letter-spacing:-.005em;box-shadow:0 6px 16px #00000029;
  opacity:0;pointer-events:none;touch-action:manipulation;transition:opacity .25s,transform .12s ease-out}
#onbStart:active{transform:scale(.975)}
#onbAlt{position:absolute;inset-inline:26px;bottom:calc(24px + env(safe-area-inset-bottom,0px));height:44px;font-size:15.5px;font-weight:500;color:var(--dim);pointer-events:auto}
#onbFoot.wide #onbStart{opacity:1;pointer-events:auto}
#onbFoot.wide #onbGo,#onbFoot.wide #onbGoLabel{opacity:0;pointer-events:none}
/* Put it on the home screen: no round button (the small way on under it), the browser's steps as rows with their icons. */
#onbFoot.bare #onbGo,#onbFoot.bare #onbGoLabel{display:none}
#onbFoot.bare{padding-top:62px}
@media (max-height:720px){#onb .art.home{display:none}#onb .oslide.bare{padding-top:calc(58px + env(safe-area-inset-top,0px))}}
#onb .art.home{width:72px;height:72px;margin-bottom:16px}
#onb .oslide.bare{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
#onb .sub.tight{font-size:17px;line-height:1.45;margin-bottom:12px}
#onb .howto{list-style:none;margin:8px 0 0;padding:4px 16px;background:var(--panel);border-radius:16px;text-align:start}
#onb .howto li{display:flex;align-items:center;gap:14px;padding:11px 0;border-bottom:1px solid var(--line)}
#onb .howto li:last-child{border:0}
#onb .howto .hic{width:36px;height:36px;flex:0 0 auto;border-radius:10px;background:var(--raise);display:grid;place-items:center}
#onb .howto .hic svg{width:21px;height:21px;fill:none;stroke:var(--ink);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#onb .howto .hic .fill{fill:var(--ink);stroke:none}
#onb .howto b{display:block;font-size:16px;font-weight:600;line-height:1.3}
#onb .howto small{display:block;font-size:13.5px;color:var(--dim);line-height:1.35;margin-top:2px}
#onb .howto li.now .hic{background:var(--ok)}
#onb .howto li.now .hic svg{stroke:#fff}
/* Reduce motion: nothing moves, screens cross-fade, what was animating shows its end state. */
@media (prefers-reduced-motion:reduce){
  #onb .enter,#onb .opt.on .tick,#onb .ocard.approved .hd i,#onb .steps li.done .ok,#onb .ocard.arrive,#onb .ocard .hd span,#onb .ocard.approved .hd i svg path{animation:none}
  #onb .ocard.approved::before{animation:none;clip-path:none}
  #onb .oslide{animation:ofade .2s ease}
  #onb .steps li{transform:none;transition:opacity .2s}
  #onb .steps .spin{animation:none;border-color:var(--dim)}
  #onb .steps li.work .lbl{animation:none;background:none;color:inherit}
  #onb .opt:active,#onb .orow button:active,#onbStart:active{transform:none}
}
/* The terms line in the account sheet (sheets.js termsLine). */
.sheet .terms{padding-top:10px}
