/* ============================================================================
 *  Filename:     vesta.css
 *  Description:  Vesta design system — Electric-Precision tokens, app shell and
 *                components (per specs/ui/0005). Self-hosted fonts; Bootstrap is
 *                remapped onto these tokens for crispy forms.
 *  License:      Proprietary © 2026 Lyn Sören Matten.
 *  Design:       concepts/clickdummy-electric-precision.html (pinned CI, E.1)
 * ========================================================================== */

/* ---------- Self-hosted fonts (woff2 via @fontsource; url() rewritten by
 *            ManifestStaticFilesStorage at collectstatic time) ---------- */
@font-face{font-family:'Outfit';font-style:normal;font-weight:400;font-display:swap;
  src:url("../fonts/outfit/outfit-latin-400-normal.23191c444b9e.woff2") format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:500;font-display:swap;
  src:url("../fonts/outfit/outfit-latin-500-normal.c5138e4c72ea.woff2") format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:600;font-display:swap;
  src:url("../fonts/outfit/outfit-latin-600-normal.778dd8bec372.woff2") format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:700;font-display:swap;
  src:url("../fonts/outfit/outfit-latin-700-normal.6a0674c3b77b.woff2") format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:400;font-display:swap;
  src:url("../fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.79936b18df9f.woff2") format('woff2')}
@font-face{font-family:'IBM Plex Mono';font-style:normal;font-weight:500;font-display:swap;
  src:url("../fonts/ibm-plex-mono/ibm-plex-mono-latin-500-normal.b1c8a895f5fd.woff2") format('woff2')}

/* ---------- Design tokens (Electric Precision) ---------- */
:root{
  --f-brand:'Outfit',system-ui,-apple-system,'Segoe UI',sans-serif;
  --f-ui:'Outfit',system-ui,-apple-system,'Segoe UI',sans-serif;
  --f-mono:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;

  --bg:#eef2f7; --surface:#ffffff; --surface-2:#f8fafc; --elevated:#ffffff;
  --border:#e2e8f0; --border-strong:#cbd5e1; --ink:#0f172a; --muted:#64748b; --faint:#94a3b8;
  --accent:#6366f1; --accent-hover:#4f46e5; --accent-ink:#ffffff; --accent-soft:#eef2ff; --accent-line:#c7d2fe;
  --good:#059669; --good-soft:#d1fae5; --warn:#b45309; --warn-soft:#fef3c7;
  --crit:#e11d48; --crit-soft:#ffe4e6; --info:#6366f1; --info-soft:#eef2ff;
  --q1:#e11d48; --q1-soft:#ffe4e6; --q2:#6366f1; --q2-soft:#eef2ff;
  --q3:#b45309; --q3-soft:#fef3c7; --q4:#64748b; --q4-soft:#eef2f7;
  --grad:linear-gradient(135deg,#6366f1,#8b5cf6);

  --shadow-sm:0 1px 2px rgba(24,32,45,.06),0 1px 3px rgba(24,32,45,.05);
  --shadow-md:0 4px 12px rgba(24,32,45,.10),0 2px 4px rgba(24,32,45,.06);
  --shadow-lg:0 18px 48px rgba(24,32,45,.20);
  --radius:12px; --radius-sm:9px; --radius-lg:16px;
  --sidebar:250px;
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#0b1120; --surface:#0f172a; --surface-2:#1e293b; --elevated:#1e293b;
    --border:#22304a; --border-strong:#334155; --ink:#e2e8f0; --muted:#94a3b8; --faint:#64748b;
    --accent:#818cf8; --accent-hover:#a78bfa; --accent-ink:#0b1120; --accent-soft:#232a4d; --accent-line:#3b3f7a;
    --good:#34d399; --good-soft:#0f2e26; --warn:#fbbf24; --warn-soft:#332a12;
    --crit:#fb7185; --crit-soft:#3a1a22; --info:#818cf8; --info-soft:#1e2440;
    --q1:#fb7185; --q1-soft:#3a1a22; --q2:#818cf8; --q2-soft:#1e2440;
    --q3:#fbbf24; --q3-soft:#332a12; --q4:#94a3b8; --q4-soft:#1e293b;
    --shadow-sm:0 1px 2px rgba(0,0,0,.4);
    --shadow-md:0 6px 16px rgba(0,0,0,.45);
    --shadow-lg:0 20px 52px rgba(0,0,0,.6);
  }
}
:root[data-theme="light"]{
  --bg:#eef2f7; --surface:#ffffff; --surface-2:#f8fafc; --elevated:#ffffff;
  --border:#e2e8f0; --border-strong:#cbd5e1; --ink:#0f172a; --muted:#64748b; --faint:#94a3b8;
  --accent:#6366f1; --accent-hover:#4f46e5; --accent-ink:#ffffff; --accent-soft:#eef2ff; --accent-line:#c7d2fe;
  --good:#059669; --good-soft:#d1fae5; --warn:#b45309; --warn-soft:#fef3c7;
  --crit:#e11d48; --crit-soft:#ffe4e6; --info:#6366f1; --info-soft:#eef2ff;
  --q1:#e11d48; --q1-soft:#ffe4e6; --q2:#6366f1; --q2-soft:#eef2ff;
  --q3:#b45309; --q3-soft:#fef3c7; --q4:#64748b; --q4-soft:#eef2f7;
  --shadow-sm:0 1px 2px rgba(24,32,45,.06),0 1px 3px rgba(24,32,45,.05);
  --shadow-md:0 4px 12px rgba(24,32,45,.10),0 2px 4px rgba(24,32,45,.06);
  --shadow-lg:0 18px 48px rgba(24,32,45,.20);
}
:root[data-theme="dark"]{
  --bg:#0b1120; --surface:#0f172a; --surface-2:#1e293b; --elevated:#1e293b;
  --border:#22304a; --border-strong:#334155; --ink:#e2e8f0; --muted:#94a3b8; --faint:#64748b;
  --accent:#818cf8; --accent-hover:#a78bfa; --accent-ink:#0b1120; --accent-soft:#232a4d; --accent-line:#3b3f7a;
  --good:#34d399; --good-soft:#0f2e26; --warn:#fbbf24; --warn-soft:#332a12;
  --crit:#fb7185; --crit-soft:#3a1a22; --info:#818cf8; --info-soft:#1e2440;
  --q1:#fb7185; --q1-soft:#3a1a22; --q2:#818cf8; --q2-soft:#1e2440;
  --q3:#fbbf24; --q3-soft:#332a12; --q4:#94a3b8; --q4-soft:#1e293b;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow-md:0 6px 16px rgba(0,0,0,.45);
  --shadow-lg:0 20px 52px rgba(0,0,0,.6);
}

/* ---------- Bootstrap remap: crispy forms inherit our tokens ---------- */
:root{
  --bs-body-bg:var(--bg); --bs-body-color:var(--ink);
  --bs-border-color:var(--border); --bs-border-radius:8px;
  --bs-primary:var(--accent); --bs-primary-rgb:99,102,241;
  --bs-link-color:var(--accent); --bs-link-hover-color:var(--accent-hover);
  --bs-font-sans-serif:var(--f-ui); --bs-body-font-family:var(--f-ui);
  --bs-secondary-color:var(--muted);
}
.form-control,.form-select{
  background:var(--surface-2);border:1px solid var(--border);color:var(--ink);
  border-radius:8px;font-size:13px;
}
.form-control:focus,.form-select:focus{
  border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:var(--surface);
}
.form-label{font-size:11.5px;font-weight:600;color:var(--muted);letter-spacing:.02em}
.btn-primary{--bs-btn-bg:var(--accent);--bs-btn-border-color:var(--accent);
  --bs-btn-hover-bg:var(--accent-hover);--bs-btn-hover-border-color:var(--accent-hover);
  --bs-btn-color:var(--accent-ink);--bs-btn-hover-color:var(--accent-ink)}

/* ---------- Base ---------- */
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--f-ui);font-size:14px;line-height:1.5;
  -webkit-font-smoothing:antialiased}
button{font-family:inherit}
::selection{background:var(--accent-soft);color:var(--ink)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
a{color:var(--accent)}

/* ---------- App shell ---------- */
.app{display:grid;grid-template-columns:var(--sidebar) 1fr;height:100vh;overflow:hidden}
.sidebar{background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;
  min-height:0;position:relative;overflow:hidden}
.sidebar::before{content:"";position:absolute;top:-50px;left:-50px;width:240px;height:240px;
  background:radial-gradient(circle,rgba(99,102,241,.12) 0%,transparent 70%);pointer-events:none;z-index:0}
.brand,.nav,.sidebar-foot{position:relative;z-index:1}
.brand{display:flex;align-items:center;gap:11px;padding:18px 20px 16px;text-decoration:none;color:inherit}
.brand-mark{width:34px;height:34px;border-radius:9px;flex:none;background:var(--grad);
  box-shadow:0 4px 14px rgba(99,102,241,.4);display:grid;place-items:center}
/* ⚠ Two rules lived here and both belonged to the mark that was replaced in #145:
   a 19px size, and `path{fill:#fff}` to whiten the old flame. The second was the
   bug: a CSS `fill` beats a presentation attribute, so it painted the new flame
   white *and* filled the V, which is drawn as a stroke with `fill="none"`. The
   result was a solid white wedge with a notch where the flame should be — visible
   on every page, and invisible to a suite that asserts markup and geometry and
   never a colour. `test_the_mark_renders_its_own_fills` is the guard. */
.brand-name{font-family:var(--f-ui);font-size:22px;font-weight:700;letter-spacing:-.5px;line-height:1}
.brand-sub{font-family:var(--f-mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--faint);margin-top:3px}
/* The running version, under the wordmark. It was only in the footer and as a
   counter beside "Release notes" — the footer is below the fold on a long list,
   and the counter slot means "how many" everywhere else in this nav, so a
   version number there read as a quantity. With several environments this is
   the fastest way to tell which build one is looking at, which is why it goes
   where the eye already lands. */
.brand-ver{font-family:var(--f-mono);font-size:10.5px;font-weight:700;color:var(--accent);
  letter-spacing:.06em;margin-top:2px;text-transform:none}

.nav{padding:6px 12px;display:flex;flex-direction:column;gap:2px;overflow-y:auto;flex:1;min-height:0}
.nav-label{font-family:var(--f-mono);font-size:10.5px;letter-spacing:.13em;text-transform:uppercase;
  color:var(--faint);padding:14px 10px 6px}
.nav-item{display:flex;align-items:center;gap:11px;padding:8px 10px;border-radius:var(--radius-sm);
  color:var(--muted);cursor:pointer;border:none;background:none;width:100%;text-align:left;font-size:13.5px;
  position:relative;transition:background .12s,color .12s;text-decoration:none}
.nav-item:hover{background:var(--surface-2);color:var(--ink)}
.nav-item.active{background:var(--accent-soft);color:var(--accent);font-weight:600}
.nav-item.active::before{content:"";position:absolute;left:-12px;top:6px;bottom:6px;width:3px;
  border-radius:0 3px 3px 0;background:var(--grad)}
.nav-item svg{width:17px;height:17px;flex:none}
.nav-item .count{margin-left:auto;font-size:11.5px;color:var(--faint);font-variant-numeric:tabular-nums;
  background:var(--surface-2);border:1px solid var(--border);border-radius:20px;padding:1px 7px}
.nav-item.active .count{background:var(--surface);border-color:var(--accent-line);color:var(--accent)}
.spacedot{width:11px;height:11px;border-radius:3px;flex:none}

.sidebar-foot{border-top:1px solid var(--border);padding:12px;display:flex;align-items:center;gap:10px}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--grad);color:#fff;display:grid;
  place-items:center;font-size:12px;font-weight:600;flex:none}
.sidebar-foot .who{font-size:12.5px;font-weight:600;line-height:1.2}
.sidebar-foot .role{font-size:11px;color:var(--faint)}

/* ---------- Main ---------- */
.main{display:flex;flex-direction:column;min-width:0;min-height:0}
.topbar{height:60px;flex:none;display:flex;align-items:center;gap:14px;padding:0 22px;
  border-bottom:1px solid var(--border);background:var(--surface)}
.view-title{font-size:17px;font-weight:650;letter-spacing:-.01em}
.view-title small{display:block;font-size:11.5px;font-weight:400;color:var(--faint);letter-spacing:0}
.search{margin-left:8px;flex:1;max-width:420px;position:relative}
.search input{width:100%;height:36px;border-radius:8px;border:1px solid var(--border);background:var(--surface-2);
  padding:0 12px 0 34px;color:var(--ink);font-size:13px}
.search input::placeholder{color:var(--faint)}
/* The whole-page views wrap the box in a real GET form (#237). `form` carries a
   bottom margin in some UA stylesheets, which would shift the topbar. */
.search form{margin:0}
/* A box on a view with no search must not look able — see _topbar.html. */
.search input[readonly]{cursor:not-allowed;opacity:.55}
/* "A search is narrowing this view", above the board and the calendar grid. */
.search-active{margin:0 0 10px;font-size:12px;color:var(--muted)}
.search-active a{margin-left:8px;color:var(--accent)}
/* Why a quadrant is empty, inside the quadrant whose emptiness it explains. */
.no-match{margin:4px 2px;font-size:12px;color:var(--faint);font-style:italic}
.search svg{position:absolute;left:11px;top:9px;width:16px;height:16px;color:var(--faint)}
.topbar-spacer{flex:1}
.iconbtn{width:36px;height:36px;border-radius:8px;border:1px solid var(--border);background:var(--surface);
  color:var(--muted);display:grid;place-items:center;cursor:pointer;transition:.12s}
.iconbtn:hover{color:var(--ink);border-color:var(--border-strong);background:var(--surface-2)}
.iconbtn svg{width:17px;height:17px}

.btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 14px;border-radius:8px;
  border:1px solid transparent;font-size:13px;font-weight:600;cursor:pointer;transition:.12s;white-space:nowrap;
  text-decoration:none}
.btn svg{width:16px;height:16px}
.btn-primary{background:var(--grad);color:var(--accent-ink);box-shadow:0 4px 12px rgba(99,102,241,.28)}
.btn-primary:hover{filter:brightness(1.06)}
.btn-ghost{background:var(--surface);border-color:var(--border);color:var(--ink)}
.btn-ghost:hover{background:var(--surface-2);border-color:var(--border-strong)}
.btn-sm{height:30px;padding:0 10px;font-size:12px}
.btn.is-default{color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}

.content{flex:1;overflow-y:auto;min-height:0}
/* NB: not `.fade` — that collides with Bootstrap's `.fade{opacity:0}` utility. */
.view{padding:22px;animation:vfade .18s ease}
@keyframes vfade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.view{animation:none}*{transition:none!important}}

/* ---------- Generic bits ---------- */
.row{display:flex;gap:16px}
/* Six tiles, one row (#99). The step down to 3 is deliberate rather than left to
   wrapping: six columns that reflow to 4+2 put two tiles alone on a second row and
   read as a mistake, while 3+3 reads as a layout. */
.grid-tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}
@media(max-width:1320px){.grid-tiles{grid-template-columns:repeat(3,1fr)}}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm)}
.card-pad{padding:16px 18px}
.card-hd{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border)}
.card-hd h3{margin:0;font-size:13px;font-weight:650;letter-spacing:.01em}
.card-hd .link{font-size:12px;color:var(--accent);cursor:pointer;font-weight:600}

.tile{padding:15px 16px;position:relative;overflow:hidden}
/* A tile that links somewhere must not look like a sentence with a hyperlink in
   it: the global `a{color:var(--accent)}` plus the browser underline recoloured
   the label, the number and the caption, so three tiles read differently from the
   fourth purely because they happened to be clickable (#10). */
a.tile{text-decoration:none;color:inherit;display:block}
a.tile:hover{border-color:var(--accent)}
a.tile .k,a.tile .v,a.tile .d{color:inherit}
a.tile .k{color:var(--muted)}
a.tile .d{color:var(--faint)}
.tile .k{font-family:var(--f-mono);font-size:11.5px;color:var(--muted);font-weight:600;letter-spacing:.03em;
  display:flex;align-items:center;gap:7px}
.tile .v{font-size:30px;font-weight:700;letter-spacing:-.02em;margin-top:6px;font-variant-numeric:tabular-nums;line-height:1}
.tile .d{font-size:11.5px;color:var(--faint);margin-top:5px}
.tile .dot{width:9px;height:9px;border-radius:3px;flex:none}
.tile.accent .v{background:var(--grad);-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;color:transparent}
.tile.crit .v{color:var(--crit)} .tile.warn .v{color:var(--warn)} .tile.good .v{color:var(--good)}

/* pills / badges / chips */
.pill{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:2px 9px;
  border-radius:20px;line-height:1.6;white-space:nowrap}
.pill .pd{width:6px;height:6px;border-radius:50%}
.st-todo{background:var(--surface-2);color:var(--muted);border:1px solid var(--border)}
.st-in_progress{background:var(--info-soft);color:var(--info)}
.st-blocked{background:var(--crit-soft);color:var(--crit)}
.st-backlog{background:var(--surface-2);color:var(--faint);border:1px solid var(--border)}
.st-done{background:var(--good-soft);color:var(--good)}
.st-cancelled{background:var(--surface-2);color:var(--faint);text-decoration:line-through}

.prio{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;color:var(--muted)}
.prio i{width:8px;height:8px;border-radius:2px;display:inline-block}
.prio.low i{background:var(--q4)} .prio.medium i{background:var(--info)}
.prio.high i{background:var(--warn)} .prio.critical i{background:var(--crit)}

.chip{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:1px 8px;border-radius:6px;
  background:var(--surface-2);border:1px solid var(--border);color:var(--muted)}
.chip.tag::before{content:"#";color:var(--faint)}

.src{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:var(--muted)}
.src .g{width:19px;height:19px;border-radius:5px;display:grid;place-items:center;font-size:10px;font-weight:700;color:#fff;flex:none}
.src.you .g{background:linear-gradient(150deg,#5a6c86,#3d4a5f)}
.src.n8n .g{background:#EA4B71}
.src.claude .g{background:#C15F3C}
.src.script .g{background:#4B5563;font-family:var(--f-mono)}

.due{font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap}
.due.soon{color:var(--warn);font-weight:600}
.due.over{color:var(--crit);font-weight:700}

/* ---------- Tasks table ---------- */
.filterbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.seg{display:inline-flex;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:3px;gap:2px}
.seg button,.seg a{border:none;background:none;color:var(--muted);font-size:12px;font-weight:600;
  padding:5px 11px;border-radius:6px;cursor:pointer;text-decoration:none;white-space:nowrap;
  display:inline-flex;align-items:center}
.seg button.on,.seg a.on{background:var(--accent-soft);color:var(--accent)}
.seg a:hover{color:var(--ink)}
.select{height:34px;border:1px solid var(--border);background:var(--surface);border-radius:8px;color:var(--ink);
  font-size:12.5px;padding:0 30px 0 11px;cursor:pointer;appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat:no-repeat;background-position:right 10px center}
.filter-count{margin-left:auto;font-size:12px;color:var(--faint)}

.tablewrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm)}
table.tasks{width:100%;border-collapse:collapse;font-size:13px;min-width:820px}
table.tasks th{text-align:left;font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.06em;
  color:var(--faint);font-weight:600;padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface-2);position:sticky;top:0;z-index:1}
table.tasks td{padding:11px 14px;border-bottom:1px solid var(--border);vertical-align:middle}
table.tasks tr:last-child td{border-bottom:none}
table.tasks tbody tr{cursor:pointer;transition:background .1s}
table.tasks tbody tr:hover{background:var(--surface-2)}
/* Row actions stay on one line. Two buttons wrapped inside a 150px cell made every
   settings row 83px tall, and in German ("Deaktivieren") they wrapped on every row
   rather than on a few — the column was sized for English (#131). */
.rowactions{display:flex;gap:6px;justify-content:flex-end;align-items:center;white-space:nowrap}
.rowactions form{display:inline;margin:0}
.t-title{font-weight:600;color:var(--ink);display:flex;align-items:center;gap:8px}
.t-sub{font-size:11.5px;color:var(--faint);margin-top:2px}
.flag{width:16px;height:16px;flex:none}
.flag.imp{color:var(--accent)} .flag.urg{color:var(--crit)}
.checkbox{width:17px;height:17px;border-radius:5px;border:1.7px solid var(--border-strong);cursor:pointer;flex:none;
  display:grid;place-items:center;background:var(--surface)}
.checkbox:hover{border-color:var(--accent)}
.checkbox.done{background:var(--good);border-color:var(--good)}
.checkbox svg{width:11px;height:11px;color:#fff;opacity:0}
.checkbox.done svg{opacity:1}

/* ---------- Eisenhower board ---------- */
.board-tools{display:flex;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.axislabel{font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--faint);font-weight:600}
.board{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto;gap:14px}
.quad{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column;min-height:210px;transition:border-color .12s,background .12s}
/* The board is a comparison surface — scrolling to reach Q3/Q4 defeats it. The
   grid takes the height the viewport has left and each quadrant scrolls inside
   itself, so all four stay on screen however long the lists get. */
.view.view-fill{display:flex;flex-direction:column;height:100%;min-height:0;padding-bottom:14px}
/* minmax(0,1fr), not 1fr: a plain 1fr is minmax(auto,1fr) and never shrinks
   below its content, so one busy quadrant pushed the grid past the window. */
/* ⚠ #248 put a wrapper between `.view-fill` and the grid, and `flex:1` only means
   something to a flex child — so without this the board's four quadrants stopped
   fitting and the page scrolled, which is the defect spec 0004 exists to prevent and
   which `test_all_four_quadrants_fit_without_scrolling` caught. The pane re-exports
   the column it interrupted: the toolbar and the banner stay auto-height, the grid
   takes the rest. */
.view-fill #board-pane,.view-fill #calendar-pane{display:flex;flex-direction:column;flex:1;min-height:0}
.view-fill .board{flex:1;min-height:0;grid-template-rows:minmax(0,1fr) minmax(0,1fr)}
.view-fill .quad{min-height:0}
/* Same for the calendar grids: the month keeps six equal week rows and the week
   keeps seven full-height columns, each scrolling inside itself. */
.view-fill .cal-scroll{flex:1;min-height:0;display:flex;flex-direction:column}
.view-fill .cal-month,.view-fill .cal-week{flex:1;min-height:0}
.view-fill .cal-month{grid-auto-rows:minmax(0,1fr)}
.view-fill .cal-week{grid-template-rows:minmax(0,1fr)}
.view-fill .cal-day,.view-fill .cal-wcol{min-height:0;overflow:hidden}
.view-fill .cal-evs{overflow-y:auto}
.view-fill .cal-wcbody{overflow-y:auto;min-height:0}
.quad.dragover{border-color:var(--accent);background:var(--accent-soft)}
.quad-hd{padding:12px 15px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:9px}
.quad-hd .qbar{width:4px;height:26px;border-radius:3px;flex:none}
.quad-hd .qt{font-size:13px;font-weight:700}
.quad-hd .qs{font-family:var(--f-mono);font-size:11px;color:var(--faint)}
.quad-hd .qn{margin-left:auto;font-size:12px;color:var(--faint);font-variant-numeric:tabular-nums;font-weight:600}
.q1 .qbar{background:var(--q1)} .q2 .qbar{background:var(--q2)} .q3 .qbar{background:var(--q3)} .q4 .qbar{background:var(--q4)}
.q1 .qt{color:var(--q1)} .q2 .qt{color:var(--q2)} .q3 .qt{color:var(--q3)} .q4 .qt{color:var(--q4)}
.quad-body{padding:11px;display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
  gap:9px;align-content:start;flex:1;overflow-y:auto}
.tcard{background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--q4);
  border-radius:var(--radius-sm);padding:10px 12px;cursor:grab;box-shadow:var(--shadow-sm);
  transition:box-shadow .12s,transform .12s;touch-action:none;user-select:none;-webkit-user-select:none}
.tcard.ghost{box-shadow:var(--shadow-lg);transform:rotate(1.5deg);cursor:grabbing}
.tcard:hover{box-shadow:var(--shadow-md)}
.tcard:active{cursor:grabbing}
.tcard.dragging{opacity:.4}
.tcard.q1{border-left-color:var(--q1)} .tcard.q2{border-left-color:var(--q2)} .tcard.q3{border-left-color:var(--q3)} .tcard.q4{border-left-color:var(--q4)}
.tcard .tc-title{font-weight:600;font-size:13px;line-height:1.35}
.tcard .tc-meta{display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}
.tcard .tc-space{font-size:11px;color:var(--faint)}
.empty-hint{color:var(--faint);font-size:12px;text-align:center;padding:22px 8px;border:1.5px dashed var(--border);border-radius:var(--radius-sm)}

/* ---------- Calendar / agenda ---------- */
.agenda{display:flex;flex-direction:column;gap:16px;max-width:760px}
.day-hd{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.day-hd .dn{font-size:14px;font-weight:700}
.day-hd .dd{font-size:12px;color:var(--faint)}
.day-hd .dtag{margin-left:auto;font-size:11px;font-weight:600;color:var(--accent);background:var(--accent-soft);padding:2px 9px;border-radius:20px}
.agenda-item{display:flex;align-items:center;gap:12px;padding:11px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer}
.agenda-item:hover{background:var(--surface-2)}
.agenda-item .time{font-size:12px;font-variant-numeric:tabular-nums;color:var(--muted);width:52px;flex:none}
.agenda-item .bar{width:3px;align-self:stretch;border-radius:3px;flex:none}
.cal-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.cal-nav{display:flex;align-items:center;gap:6px}
.cal-title{font-size:15px;font-weight:650;margin-left:auto}
.cal-scroll{overflow-x:auto}
.cal-weekhead{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:6px;min-width:700px}
.cal-weekhead div{font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--faint);font-weight:600;text-align:center;padding:2px}
.cal-month{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;min-width:700px}
.cal-day{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);min-height:106px;padding:7px 8px;display:flex;flex-direction:column;gap:4px}
.cal-day.out{background:var(--surface-2);opacity:.5}
.cal-day.today{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.cal-daynum{font-size:12px;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums}
.cal-day.today .cal-daynum{color:var(--accent)}
.cal-evs{display:flex;flex-direction:column;gap:3px;overflow:hidden}
.cal-ev{font-size:11px;padding:2px 6px;border-radius:5px;background:var(--surface-2);border-left:3px solid var(--q4);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.55}
.cal-ev:hover{background:var(--accent-soft)}
.cal-ev.q1{border-left-color:var(--q1)} .cal-ev.q2{border-left-color:var(--q2)} .cal-ev.q3{border-left-color:var(--q3)} .cal-ev.q4{border-left-color:var(--q4)}
.cal-ev.done{text-decoration:line-through;color:var(--faint)}
.cal-more{font-size:10.5px;color:var(--faint);padding-left:4px}
.cal-week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;min-width:760px}
.cal-wcol{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);min-height:340px;display:flex;flex-direction:column}
.cal-wcol.today{border-color:var(--accent)}
.cal-wchd{padding:8px 10px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.cal-wchd .wd{font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--faint);font-weight:600}
.cal-wchd .dn{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.cal-wchd .dn.t{color:var(--accent)}
.cal-wcbody{padding:8px;display:flex;flex-direction:column;gap:6px}
.cal-wcard{border:1px solid var(--border);border-left:3px solid var(--q4);border-radius:6px;padding:6px 9px;cursor:pointer;background:var(--surface)}
.cal-wcard:hover{background:var(--surface-2)}
.cal-wcard.q1{border-left-color:var(--q1)} .cal-wcard.q2{border-left-color:var(--q2)} .cal-wcard.q3{border-left-color:var(--q3)} .cal-wcard.q4{border-left-color:var(--q4)}
.cal-wcard.done .wt{text-decoration:line-through;color:var(--faint)}
.cal-wcard .wt{font-weight:600;font-size:12px;line-height:1.35}
.cal-wcard .wm{font-size:10.5px;color:var(--faint);margin-top:2px}
.cal-empty{color:var(--faint);font-size:11px;text-align:center;padding:10px}

/* ---------- Settings ---------- */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:18px}
.tabs button,.tabs a{border:none;background:none;color:var(--muted);font-size:13px;font-weight:600;
  padding:10px 14px;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;text-decoration:none}
.tabs button.on,.tabs a.on{color:var(--accent);border-bottom-color:var(--accent)}
.tabs a:hover{color:var(--ink)}
.settings-pane{display:none} .settings-pane.on{display:block}
.listcard{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);margin-bottom:10px}
.listcard .ic{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;color:#fff;font-weight:700;flex:none}
.listcard .nm{font-weight:650;font-size:13.5px}
.listcard .meta{font-size:12px;color:var(--faint);margin-top:2px}
.key{font-family:var(--f-mono);font-size:12px;background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:3px 8px;color:var(--muted)}
table.plain{width:100%;border-collapse:collapse;font-size:13px}
table.plain th{text-align:left;font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--faint);font-weight:600;padding:9px 12px;border-bottom:1px solid var(--border)}
table.plain td{padding:11px 12px;border-bottom:1px solid var(--border)}

/* ---------- Drawer ---------- */
.scrim{position:fixed;inset:0;background:rgba(15,18,24,.42);opacity:0;pointer-events:none;transition:opacity .2s;z-index:40}
.scrim.show{opacity:1;pointer-events:auto}
/* Task detail, rendered into the shared modal (#65). It replaced a slide-in
   drawer; these rules carry the drawer's look across so nothing had to be
   redesigned, with the shell chrome dropped because the modal supplies it. */
.task-detail{display:flex;flex-direction:column;min-height:0}
.detail-body{overflow-y:auto;min-height:0}
.detail-foot{margin-top:18px;padding-top:14px;border-top:1px solid var(--border);display:flex;gap:9px;flex-wrap:wrap}
.detail-foot .btn{flex:1 1 auto;min-width:150px}
/* Full width, and the button under the box rather than beside it — a two-line
   textarea squeezed next to a button is the shape the first version had, and it
   invited one-word comments. */
.comment-form{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.comment-form textarea{width:100%;border:1px solid var(--border);background:var(--surface-2);border-radius:8px;color:var(--ink);font-family:inherit;font-size:13px;padding:9px 11px;resize:vertical;min-height:62px}
.comment-form button{align-self:flex-end}
.meta-grid{display:grid;grid-template-columns:96px 1fr;gap:11px 14px;align-items:center;font-size:13px}

/* The inline property controls (#110). Every one of them fills the value column and
   stops at the same right edge, so the block reads as a form. Before this each select
   sized itself to its own text and the column was ragged — "Mittel" half the width of
   a timestamp — which is what made a working feature look unfinished.
   `min-width:0` because a grid item's automatic minimum is its content, so a long tag
   name or an RRULE would otherwise push the column wider than the modal. */
.meta-grid .inline-field{width:100%;max-width:280px;min-width:0}
/* The chevron is drawn by `.select` as a background image; a date, time or text input
   has no menu to open, so it would be a promise of one. */
.meta-grid input.inline-field{background-image:none;padding-right:11px;cursor:text}
/* Date and time share the column: the date needs the room, the time is fixed-width. */
.due-pair{display:flex;gap:8px;max-width:280px}
.due-pair .inline-field{max-width:none}
.due-pair input[type=date]{flex:1 1 auto}
/* 124px, not 96: a browser in a 12-hour locale renders "03:02 AM" and the narrower
   track cut it to "03:02 A" — measured in a screenshot, not in a test, because no
   assertion I would have thought to write says "the text fits". */
.due-pair input[type=time]{flex:0 0 124px}
/* A multiple select is a list box, so the fixed `.select` height would crop it. */
/* Tags as chips you click (#113). The `<select multiple>` this replaces showed three
   of seventeen tags and needed Ctrl-clicking to keep the first one selected.
   The checkbox itself is hidden rather than removed: it still carries the value that
   `hx-include` posts, and it keeps the control reachable by keyboard. */
/* Folded away until asked for (#113): closed, the row shows only what the task
   carries. A `<details>` rather than a second overlay — the detail is already in the
   one shared modal, and #65 exists to stop one opening another. */
/* Click-to-edit for the title and the description (#115). A hidden checkbox switches
   the two states: the label around the text checks it, the ✕ is a second label that
   unchecks it. No handler, and nothing that has to know how the panel is swapped —
   confirming re-renders the panel and the fresh markup starts unchecked. */
/* While the detail panel is open it carries the title itself, so the shared heading
   would say the same words twice. The heading goes and the bar shrinks to hold the ✕ —
   hiding the text alone left a tall empty stripe that reads as a rendering fault. */
#modal:has(#task-detail) [data-modal-title]{display:none}
#modal:has(#task-detail) .modal-hd{padding-top:8px;padding-bottom:8px;border-bottom:none;
  justify-content:flex-end}

.editswitch{position:absolute;opacity:0;width:0;height:0}
.editable{position:relative;margin-bottom:4px}
.editable-edit{display:none}
.editswitch:checked ~ .editable-view{display:none}
.editswitch:checked ~ .editable-edit{display:flex;gap:6px;align-items:flex-start}
.editable-view{display:block;cursor:text;border-radius:8px;padding:2px 4px;margin:-2px -4px;
  transition:background .12s}
.editable-view:hover{background:var(--surface-2)}
.title-view{font-size:15px;font-weight:650;line-height:1.35}
.editable .editfield{flex:1;height:auto;min-height:34px;padding:7px 11px;cursor:text;
  background-image:none;font:inherit;font-size:13px}
.editable textarea.editfield{line-height:1.6;resize:vertical}
/* Green tick, red cross — the two answers, told apart by colour as well as by shape. */
.editable .iconbtn{width:30px;height:30px;flex:none;font-size:14px;line-height:1;
  border-radius:8px;border:1px solid var(--border);background:var(--surface);cursor:pointer}
.editable .iconbtn.ok{color:var(--good);border-color:var(--good)}
.editable .iconbtn.ok:hover{background:var(--good);color:#fff}
.editable .iconbtn.cancel{color:var(--crit);border-color:var(--crit);display:grid;
  place-items:center}
.editable .iconbtn.cancel:hover{background:var(--crit);color:#fff}
.desc.empty{color:var(--faint);font-style:italic}

/* The quiet half of the properties (#115) — the rows nobody opens a task to change. */
.moreprops{margin:2px 0 4px}
.moreprops summary{list-style:none;cursor:pointer;font-family:var(--f-mono);font-size:11px;
  text-transform:uppercase;letter-spacing:.05em;color:var(--faint);font-weight:600;padding:6px 0}
.moreprops summary::-webkit-details-marker{display:none}
.moreprops summary:hover{color:var(--muted)}
.moreprops summary::after{content:" ▾"}
.moreprops[open] summary::after{content:" ▴"}

/* Completing sits in the header row beside the status control (#116) — it is a status
   change, and at the top it is reachable without scrolling past everything else.
   `margin-left:auto` rather than a spacer, so it holds the right edge however many
   pills are in front of it. */
.btn.btn-done{margin-left:auto;height:34px;font-weight:650;white-space:nowrap}

.tagpick{max-width:280px}
.tagpick summary{display:flex;flex-wrap:wrap;gap:5px;align-items:center;cursor:pointer;
  list-style:none;min-height:24px;padding:2px 22px 2px 0;position:relative;border-radius:6px}
.tagpick summary::-webkit-details-marker{display:none}
/* The caret is the only thing saying this row can be opened, so it is drawn rather
   than left to the browser's default triangle, which the flex summary suppresses. */
.tagpick summary::after{content:"";position:absolute;right:6px;top:50%;width:7px;height:7px;
  margin-top:-5px;border-right:1.5px solid var(--faint);border-bottom:1.5px solid var(--faint);
  transform:rotate(45deg);transition:transform .15s}
.tagpick[open] summary::after{transform:rotate(-135deg);margin-top:-2px}
.tagpick summary:hover{background:var(--accent-soft)}
.tagpick summary .none{color:var(--faint)}
.tagpick .tagchips{margin-top:8px;padding-top:8px;border-top:1px solid var(--border)}

.tagchips{display:flex;flex-wrap:wrap;gap:6px;max-width:280px}
.newtag{display:inline-block;margin-top:6px}
.newtag input{font:inherit;padding:3px 8px;border:1px dashed var(--line);border-radius:999px;background:transparent;color:inherit;min-width:140px}
.newtag input:focus{border-style:solid;outline:none}
.tagchip{display:inline-flex;align-items:center;cursor:pointer}
.tagchip input{position:absolute;opacity:0;width:0;height:0}
.tagchip span{display:inline-block;padding:3px 9px;border-radius:999px;font-size:11.5px;
  border:1px solid var(--border);color:var(--muted);background:var(--surface);
  transition:background .12s,border-color .12s,color .12s;user-select:none}
.tagchip:hover span{border-color:var(--accent);color:var(--ink)}
/* Assigned has to be obvious at a glance, which is the whole point of the change:
   a border alone reads as "hovered", so the fill carries it. */
.tagchip input:checked + span{background:var(--accent-soft);border-color:var(--accent);
  color:var(--accent);font-weight:600}
/* Keyboard focus has nowhere to land once the box is visually hidden. */
.tagchip input:focus-visible + span{outline:2px solid var(--accent);outline-offset:2px}
.meta-grid .lbl{font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--faint);font-weight:600}
.section-t{font-family:var(--f-mono);font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--faint);font-weight:700;margin:20px 0 10px}
.subtask{display:flex;align-items:center;gap:10px;padding:7px 0;font-size:13px}
.subtask.done span{color:var(--faint);text-decoration:line-through}
.activity{display:flex;gap:11px;padding:9px 0}
.activity .av{width:26px;height:26px;border-radius:6px;flex:none;display:grid;place-items:center;font-size:10px;font-weight:700;color:#fff}
.activity .at{font-size:12.5px;line-height:1.45}
/* What a change touched (#114) — field names, and values only where a value is not
   content. Between the verb and the timestamp, so the eye reads what/then/when. */
.activity .asum{font-size:12px;color:var(--muted);line-height:1.45;margin-top:1px}
/* A comment is a different kind of row from a change (#120): somebody wrote it, and the
   text is the point. Boxed and accent-marked so the eye separates the two kinds without
   reading them — a thread of bare lines gave no clue which was which. */
.activity.comment > div{flex:1;min-width:0}
.activity.comment .cbody{margin-top:3px;padding:8px 11px;border-radius:0 10px 10px 10px;
  background:var(--surface-2);border:1px solid var(--border);font-size:13px;line-height:1.55;
  overflow-wrap:anywhere}
/* The older entries, folded (#114). Summary styled like a quiet link rather than a
   control: it reveals, it does not change anything. */
.olderact{margin-bottom:6px}
.olderact summary{list-style:none;cursor:pointer;font-size:12px;color:var(--accent);
  padding:4px 0;font-weight:600}
.olderact summary::-webkit-details-marker{display:none}
.olderact summary:hover{text-decoration:underline}
.activity .aw{font-size:11px;color:var(--faint);margin-top:1px}
/* Boxed (#114). As bare prose between the status pills and the property grid there
   was nothing to say where the description began or ended — reported as exactly that.
   The rail rather than a full border: a box would read as another card in a panel
   that already has several, while a left edge says "this block is quoted content".
   `overflow-wrap` because a description can carry a URL with no break opportunity. */
/* `display:block` because since #115 the read view is a `<span>` inside the label
   that switches to the editor — inline, the padding and the rail collapse. */
.desc{display:block;font-size:13px;line-height:1.6;color:var(--ink);background:var(--surface-2);
  border-left:3px solid var(--border);border-radius:0 8px 8px 0;padding:10px 12px;
  margin:0 0 4px;overflow-wrap:anywhere}
.desc > :first-child{margin-top:0}
.desc > :last-child{margin-bottom:0}
.desc code{font-family:var(--f-mono);font-size:12px;background:var(--surface-2);padding:1px 5px;border-radius:4px}

/* ---------- Modal ---------- */
.modal-wrap{position:fixed;inset:0;display:grid;place-items:center;z-index:60;padding:20px;opacity:0;pointer-events:none;transition:opacity .18s}
.modal-wrap.show{opacity:1;pointer-events:auto}
/* ⚠ `position`, `top`, `left` and `height` are overrides, not decoration.
   Bootstrap owns `.modal` too — `position:fixed;top:0;left:0;height:100%` — and
   this rule only ever countermanded `width` and `display`. So every modal in
   Vesta has been pinned to the top-left corner and stretched to full height
   since the class was chosen, quick-create included; the detail panel simply
   made it big enough to notice. `position:static` hands the element back to the
   wrapper's `place-items:center`. */
.modal{position:static;top:auto;left:auto;height:auto;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);width:min(560px,96vw);max-height:90vh;overflow:hidden;display:flex;flex-direction:column;transform:translateY(8px) scale(.98);transition:transform .18s}
/* The detail carries a properties grid and an activity thread, so it needs
   more room than a form — and it must not stretch to the full height when
   there is little in it, which is what left a tall empty panel. */
.modal:has(.task-detail){width:min(680px,96vw)}
.modal-body{flex:0 1 auto}
.modal-wrap.show .modal{transform:none}
.modal-hd{padding:17px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.modal-hd h3{margin:0;font-size:15px;font-weight:680}
.modal-body{padding:18px 20px;overflow-y:auto}
.modal-foot{padding:14px 20px;border-top:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:9px;background:var(--surface-2)}
.field{margin-bottom:14px}
.field label{display:block;font-size:11.5px;font-weight:600;color:var(--muted);margin-bottom:6px;letter-spacing:.02em}
.field input,.field textarea,.field select{width:100%;border:1px solid var(--border);background:var(--surface-2);border-radius:8px;color:var(--ink);font-family:inherit;font-size:13px;padding:9px 11px}
.field textarea{resize:vertical;min-height:62px}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.toggle-row{display:flex;gap:10px}
.togchip{flex:1;border:1px solid var(--border);border-radius:8px;padding:9px;text-align:center;font-size:12.5px;font-weight:600;color:var(--muted);cursor:pointer;background:var(--surface-2)}
.togchip.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
/* Prose by default: a flex .hint turns every inline <strong>/<code> into its own
   block and tears the sentence apart. The icon row is its own variant. */
.hint{font-size:11.5px;color:var(--faint);margin-top:7px}
/* The icon is one item, the text must be another — wrap it in a <span>. */
.hint-icon{display:flex;align-items:flex-start;gap:6px}
.hint svg{width:14px;height:14px;color:var(--warn);flex:none;margin-top:2px}

/* ---------- Toast ---------- */
.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(20px);z-index:80;
  background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;padding:11px 18px;border-radius:10px;box-shadow:var(--shadow-lg);
  opacity:0;pointer-events:none;transition:.2s;display:flex;align-items:center;gap:9px}
.toast.show{opacity:1;transform:translateX(-50%)}
.toast svg{width:16px;height:16px;color:var(--good)}

/* ---------- Dashboard helpers ---------- */
.mini-quad{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.mini-quad .mq{border-radius:7px;padding:10px 11px;position:relative}
.mini-quad .mq .mqn{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1}
.mini-quad .mq .mql{font-family:var(--f-mono);font-size:10.5px;font-weight:600;margin-top:3px}
.mq.q1{background:var(--q1-soft)} .mq.q1 .mqn,.mq.q1 .mql{color:var(--q1)}
.mq.q2{background:var(--q2-soft)} .mq.q2 .mqn,.mq.q2 .mql{color:var(--q2)}
.mq.q3{background:var(--q3-soft)} .mq.q3 .mqn,.mq.q3 .mql{color:var(--q3)}
.mq.q4{background:var(--q4-soft)} .mq.q4 .mqn,.mq.q4 .mql{color:var(--q4)}
.abar{display:flex;flex-direction:column;gap:11px}
.abar .arow{display:flex;align-items:center;gap:11px;font-size:12.5px}
.abar .an{width:120px;flex:none;color:var(--muted);display:flex;align-items:center;gap:7px}
.abar .track{flex:1;height:8px;border-radius:5px;background:var(--surface-2);overflow:hidden}
.abar .fill{height:100%;border-radius:5px}
.abar .av{width:26px;text-align:right;font-variant-numeric:tabular-nums;color:var(--faint);flex:none}

.cols-2{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}
.cols-2b{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.stack{display:flex;flex-direction:column;gap:16px}

/* ---------- Responsive ---------- */
@media(max-width:1080px){.grid-tiles{grid-template-columns:repeat(2,1fr)}.cols-2,.cols-2b{grid-template-columns:1fr}}
@media(max-width:860px){
  :root{--sidebar:64px}
  .brand-name,.brand-sub,.nav-label,.nav-item span.lbl,.nav-item .count,.sidebar-foot .who,.sidebar-foot .role{display:none}
  .nav-item{justify-content:center;padding:10px}
  .brand{justify-content:center;padding:16px 0}
  .board{grid-template-columns:1fr}
  /* One column cannot show four quadrants at once — give the page back its scroll. */
  .view.view-fill{display:block;height:auto}
  .view-fill .board{grid-template-rows:auto auto}
  .view-fill .quad{min-height:210px}
  .view-fill .cal-day{min-height:106px}
  .view-fill .cal-wcol{min-height:340px}
  .search{display:none}
}

/* --- App footer (spec 0005): quiet line carrying the legal links + version --- */
.appfoot{display:flex;align-items:center;gap:14px;flex-wrap:wrap;
  padding:9px 22px;border-top:1px solid var(--border);background:var(--surface);
  font-size:11.5px;color:var(--faint);flex:none}
.appfoot-links{display:flex;gap:14px}
.appfoot-links a{color:var(--faint);text-decoration:none}
.appfoot-links a:hover{color:var(--ink);text-decoration:underline}
/* Tabular figures so the version does not jitter between releases. */
.appfoot-version{margin-left:auto;font-family:var(--f-mono);font-variant-numeric:tabular-nums}

/* A colour picker inherits .form-control's full width and reads as a black slab;
   size it like the swatch it is. */
input[type="color"].form-control{width:56px;height:34px;padding:3px;cursor:pointer}
/* Settings cards stack their rows, so the flex row default of .listcard fights them. */
.listcard.stackable{display:block}

/* ---------- Board: keyboard fallback (spec 0004) ---------- */
/* The drag is pointer-only, so every card also carries a quadrant picker. It
   stays out of the way until the card is hovered or something inside it takes
   focus — tabbing to the select reveals it, so it is reachable without a mouse. */
.card-move{display:flex;gap:6px;align-items:center;margin-top:9px;opacity:0;max-height:0;
  overflow:hidden;transition:opacity .12s ease,max-height .12s ease}
.tcard:hover .card-move,.tcard:focus-within .card-move{opacity:1;max-height:40px}
.select-sm{font-size:11px;padding:3px 6px;height:auto;flex:1;min-width:0}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* --- Admin-authored legal text (spec 0005, #22) --------------------------- */
/* Scoped to the rendered container, because it styles HTML a person pasted in
   rather than markup this project wrote. The image rule is not cosmetic: an
   image pasted at native size overflows the card and takes the page layout with
   it on a phone. */
.richtext img { max-width: 100%; height: auto; }
.richtext > :first-child { margin-top: 0; }
.richtext > :last-child { margin-bottom: 0; }
/* Sized to the design, not left at the browser default. Unstyled, an `h2` in
   this card renders at 32px while the page's own `<h1>` is the 11px `.section-t`
   eyebrow — so every section heading shouted over the title of the page it was
   in. Matches `.view-title` (17px) and steps down from there. */
.richtext h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; margin: 22px 0 8px; line-height: 1.3; }
.richtext h3 { font-size: 14.5px; font-weight: 650; margin: 18px 0 6px; line-height: 1.35; }
.richtext h4 { font-size: 13px; font-weight: 650; margin: 16px 0 6px; line-height: 1.4; }
.richtext { font-size: 13.5px; line-height: 1.6; }
.richtext p, .richtext ul, .richtext ol { margin: 0 0 12px; }
.richtext ul, .richtext ol { padding-left: 22px; }
.richtext a { color: var(--accent); }
.richtext table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.richtext th, .richtext td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; }

/* --- List paging (#80) ---------------------------------------------------
   The pager sits in the last row of the table body, so it is swapped together
   with the rows it describes. Left: where you are and what the filter hides.
   Right: the controls. They stack on a narrow screen rather than colliding. */
.pager-row td { padding: 12px 16px; border-top: 1px solid var(--border); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pager-status { color: var(--muted); font-size: 13px; }

.pager-hint {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip-bg, rgba(127, 127, 127, .12));
  font-size: 12px;
}

.pager-controls { display: flex; align-items: center; gap: 8px; }

.pager-page { font-size: 13px; color: var(--muted); min-width: 9ch; text-align: center; }

/* A disabled arrow stays visible on purpose: removing it would shift the
   controls sideways between pages, so the button you just used moves out
   from under the pointer. */
.pager-controls .btn[disabled] { opacity: .4; cursor: default; }

/* --- A row on its way out of the filter (#58) ----------------------------
   Ticking a task off keeps its row as the undo opportunity, while the count
   above already reports what still matches. Without a mark the two read as
   contradicting each other; dimmed, the row explains the difference itself. */
.task-row.leaving { opacity: .55; }
.task-row.leaving:hover { opacity: 1; }
/* Device pairing (spec 0019). The QR has to be scannable from a phone held at a
   normal distance, so it is sized in absolute terms rather than relative to the
   card — and it keeps a white quiet zone in dark mode, because an inverted QR
   does not scan. */
.pairing-qr{display:inline-block;background:#fff;padding:10px;border-radius:8px;line-height:0}
.pairing-qr svg{width:180px;height:180px;display:block}
.pairing-code{display:inline-block;font-family:var(--f-mono);font-size:22px;letter-spacing:.12em;
  padding:8px 12px;background:var(--surface-2);border-radius:8px}
/* The account chip is a link now (#134): it opens the person's own settings, while
   sign-out stays a separate control beside it. Laid out as a row so the avatar and
   the two lines keep the spacing they had when this was a plain div. */
.sidebar-foot .account{display:flex;align-items:center;gap:10px;flex:1;min-width:0;
  text-decoration:none;color:inherit;border-radius:10px;padding:4px;margin:-4px;
  transition:background .12s}
.sidebar-foot .account:hover{background:var(--surface-2)}
/* Renaming an access key in place (#137): the field and its button on one line, so
   the row keeps the height it had when the name was plain text. */
.rowrename{display:flex;gap:6px;align-items:center;margin:0}
.rowrename .input{flex:1;min-width:0}

/* ======================================================================
   The Vesta mark, and the launch intro (#145)
   ====================================================================== */

/* The mark carries its own gradient plate now, so `.brand-mark` only sizes it.
   Before #145 the plate was a CSS background on this box and the SVG held a white
   flame — which is why the three inline copies could drift without looking broken. */
/* 22.37% is the mark's own corner, the figure `LogoMark` uses in the app. It was
   9px here — 26.5% of 34px — so the clip cut inside the artwork's own curve and the
   mark read rounder and smaller than the one on the phone. One radius, stated once. */
.brand-mark{width:34px;height:34px;border-radius:22.37%;flex:none;background:none;
  box-shadow:0 4px 14px rgba(79,70,229,.38);display:block;overflow:hidden}
.brand-mark .logo-mark{width:100%;height:100%;display:block}

/* ---------------------------------------------------------------- the intro
   Timings mirror LaunchIntro.run() in the iOS app, which sequences with awaits:
   150 ms hold, the logo springs in over 700 ms, burst + flash at 410 ms, the
   letters rise from 750 ms, the flight starts at 1850 ms and takes 750 ms.
   Total ~2.65 s. Each element carries its own delay rather than one shared
   keyframe track, so a timing can be read and changed where it applies. */
/* #247: `display:none`, so the overlay is never PAINTED rather than painted and then
   removed. Set from a blocking <head> script before the body is parsed, so the rule is
   already in force when `#launch-intro` arrives. Opt-IN: with no scripting at all the
   attribute is absent, the intro plays, and the keyframes end on `visibility:hidden` —
   the no-JS path `_launch_intro.html` promises.
   ⚠ Reduced motion is NOT repeated here. The block near the end of this file already
   hides the intro for it, and does two more things besides — without its
   `body:has(#launch-intro) .sidebar .brand-mark` companion a hidden overlay still
   matches `:has()` and holds the sidebar mark invisible for 2.55 s. A second, shorter
   copy of that rule here would read as the complete answer and be the incomplete one. */
html[data-intro="skip"] .intro{display:none}
.intro{position:fixed;inset:0;z-index:3000;overflow:hidden;
  animation:intro-end 0s linear 2.65s forwards}
@keyframes intro-end{to{visibility:hidden}}   /* also stops it taking clicks */

.intro-bg{position:absolute;inset:0;background:linear-gradient(180deg,#4f46e5,#312e81);
  animation:intro-fade .75s ease 1.85s forwards}
@keyframes intro-fade{to{opacity:0}}

.intro-ring{position:absolute;left:50%;top:50%;width:170px;height:170px;margin:-85px 0 0 -85px;
  border:3px solid rgba(251,191,36,.9);border-radius:50%;transform:scale(.6);opacity:.9;
  animation:intro-ring 1.1s ease-out .41s forwards}
.intro-ring:nth-of-type(2){animation-delay:.53s}
.intro-ring:nth-of-type(3){animation-delay:.65s}
@keyframes intro-ring{to{transform:scale(3.4);opacity:0}}

/* --x/--y are the landing offsets; set per ember in the template with the same
   deterministic formula the app uses, so both scatter identically. */
.intro-ember{position:absolute;left:50%;top:50%;width:var(--sz);height:var(--sz);
  border-radius:50%;animation:intro-ember var(--dur) ease-out .41s forwards}
@keyframes intro-ember{from{transform:translate(-50%,-50%);opacity:1}
  to{transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y)));opacity:0}}

.intro-flash{position:absolute;inset:0;background:#fff;opacity:0;
  animation:intro-flash .43s ease .41s forwards}
@keyframes intro-flash{19%{opacity:.75}to{opacity:0}}

/* Two animations on one element: the spring-in, then the flight. `--fly-*` default to
   the sidebar mark's own place — 20px padding + 17px half of 34px — so the landing is
   right with no JS at all; vesta.js replaces them with the measured rect. */
.intro-logo{position:absolute;left:50%;top:50%;width:168px;height:168px;margin:-84px 0 0 -84px;
  --fly-x:calc(37px - 50vw);--fly-y:calc(35px - 50vh);--fly-s:.2024;
  animation:intro-in .7s cubic-bezier(.34,1.56,.64,1) .15s both,
            intro-fly .75s cubic-bezier(.33,1.1,.68,1) 1.85s forwards}
.intro-logo .logo-mark{width:100%;height:100%;display:block;
  filter:drop-shadow(0 18px 40px rgba(0,0,0,.35))}
/* ⚠ Both keyframe sets use the SAME transform function list, and `intro-fly` states
   its `from` rather than inheriting it. Mismatched lists make the browser decompose
   and interpolate a matrix, which neither reads as a scale nor ends where the
   components say it should. */
@keyframes intro-in{from{transform:translate(0,0) scale(.15);opacity:0}
  to{transform:translate(0,0) scale(1);opacity:1}}
@keyframes intro-fly{from{transform:translate(0,0) scale(1)}
  to{transform:translate(var(--fly-x),var(--fly-y)) scale(var(--fly-s))}}

.intro-word{position:absolute;left:0;right:0;top:50%;margin-top:126px;
  display:flex;justify-content:center;gap:6px;
  animation:intro-fade .4s ease 1.85s forwards}
.intro-word span{font-family:var(--f-ui);font-size:46px;font-weight:800;letter-spacing:-.01em;
  color:#fff;opacity:0;transform:translateY(26px);
  animation:intro-letter .5s cubic-bezier(.34,1.56,.64,1) .75s both}
.intro-word span:nth-child(2){animation-delay:.81s}
.intro-word span:nth-child(3){animation-delay:.87s}
.intro-word span:nth-child(4){animation-delay:.93s}
.intro-word span:nth-child(5){animation-delay:.99s}
@keyframes intro-letter{to{opacity:1;transform:translateY(0)}}

/* The hand-off. Without this the sidebar mark sits there in plain view while its
   copy is still flying towards it — two logos on screen at once, which is the thing
   the flight exists to avoid. iOS fades its toolbar mark in for the same reason.
   `:has()` rather than a class, so nothing has to be set or unset: the rule applies
   exactly while the overlay is in the document, and stops the moment it is removed.
   The mark reappears at 2.55 s, just under the flying copy and just before it lands. */
body:has(#launch-intro) .sidebar .brand-mark{opacity:0;
  animation:intro-handoff 0s linear 2.55s forwards}
@keyframes intro-handoff{to{opacity:1}}

/* Reduce Motion skips it outright, as in the app — not a slower version of it.
   `display:none` rather than `visibility`, so nothing animates at all. The global
   rule above kills transitions; an animation needs saying separately. */
@media (prefers-reduced-motion:reduce){
  .intro{display:none}
  .intro *{animation:none!important}
  /* ⚠ The overlay is only hidden, not gone, so `:has()` above still matches and
     would hold the sidebar mark invisible for 2.55 s — a blank corner on a page
     that is meant to show no animation at all. Scripts normally remove the element
     first; this covers the case where they do not. */
  body:has(#launch-intro) .sidebar .brand-mark{opacity:1;animation:none}
}

/* ======================================================================
   The personal account area (#146, spec 0021)
   ====================================================================== */

/* Its own menu, deliberately not the Settings tab bar. */
.acct{display:grid;grid-template-columns:252px 1fr;gap:20px;align-items:start;max-width:1000px}
.submenu{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:8px;box-shadow:var(--shadow-sm);position:sticky;top:0}
.submenu .sub-label{font-family:var(--f-mono);font-size:10px;letter-spacing:.13em;
  text-transform:uppercase;color:var(--faint);padding:10px 10px 6px}
.submenu a,.submenu button{display:flex;align-items:center;gap:9px;min-width:0;width:100%;
  text-align:left;border:0;background:none;padding:9px 10px;border-radius:var(--radius-sm);
  color:var(--muted);font-weight:500;cursor:pointer;text-decoration:none;font-size:14px}
.submenu a:hover,.submenu button:hover{background:var(--surface-2);color:var(--ink)}
.submenu a.on{background:var(--accent-soft);color:var(--accent);font-weight:600}
.submenu svg{width:17px;height:17px;flex:none}
.submenu hr{border:0;border-top:1px solid var(--border);margin:8px 4px}
.submenu .danger{color:var(--crit)}
.submenu .danger:hover{background:rgba(225,29,72,.08);color:var(--crit)}
.acct-panel{min-width:0}

/* Label/value rows, shared by the panels. */
/* ⚠ `.srow`, NOT `.row` — Bootstrap owns `.row` as its grid row and sets
   `flex-wrap:wrap` on it plus `width:100%` on every child. The label and its control
   therefore each took the full width and stacked, which looked like a missing flex
   rule and was a collision. The same trap is already recorded a few hundred lines up
   for `.fade`; this is the second time it has cost something. */
.rows{display:flex;flex-direction:column}
.rows .srow{display:flex;align-items:center;gap:14px;padding:11px 0;
  border-bottom:1px solid var(--border)}
.rows .srow:last-child{border-bottom:0}
.rows .lbl{flex:1;min-width:0}
.rows .lbl b{display:block;font-weight:600}
.rows .lbl span{display:block;color:var(--muted);font-size:12.5px}

/* ⚠ The segmented control is NOT redefined here. `.seg` has existed since the
   calendar's day/week/month switch (see above), and a second definition further
   down the file silently half-overrode the first — a different padding, different
   separators, and whichever rule came later winning per property. `vesta.js` sets
   `.on` from the stored value rather than from the last click, so the control shows
   what is actually in force. */

@media(max-width:860px){
  .acct{grid-template-columns:1fr}
  .submenu{position:static}
}

/* --- selection + bulk bar in the task list (#202, spec 0023) -------------- */
/* ⚠ `.rowselect`, not `.checkbox`. That class still means "complete this" on the
   subtask list in the task window, and one selector meaning two things in two
   places has already cost a wrong test. Round rather than square, so the two read
   as different controls at a glance and not only by position. */
.rowselect{width:17px;height:17px;border-radius:50%;border:1.7px solid var(--border-strong);
  cursor:pointer;flex:none;display:grid;place-items:center;background:var(--surface)}
.rowselect:hover{border-color:var(--accent)}
.rowselect:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.rowselect.on{background:var(--accent);border-color:var(--accent)}
.rowselect svg{width:11px;height:11px;color:#fff;opacity:0}
.rowselect.on svg{opacity:1}
tr.task-row.selected{background:color-mix(in srgb,var(--accent) 9%,transparent)}

.bulkbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px;padding:10px 12px;
  border:1px solid var(--border-strong);border-radius:10px;background:var(--surface)}
.bulkbar[hidden]{display:none}
.bulk-count{font-weight:600;white-space:nowrap}
.bulk-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.bulk-due{display:flex;align-items:center;gap:6px;white-space:nowrap}
/* The three counts. `has-refused` is a tint, not a colour swap: a partial result is
   the normal outcome here, so it must not read as an error. */
.bulk-result{flex-basis:100%;font-size:.9em}
.bulk-result.has-refused{color:var(--warn,#b45309)}
.bulk-why{opacity:.75}
.bulk-none{margin-top:4px;font-weight:600}
@media (max-width:640px){
  .bulkbar{gap:8px}
  .bulk-acts{width:100%}
  .bulk-acts .select,.bulk-acts .btn{flex:1 1 auto}
}
