:root{
  /* Match https://island-prairie-lagoon-vivid.grok.me — cool slate + globe, not purple. */
  --color-bg: oklch(98% 0.004 244);
  --color-surface: oklch(100% 0 0);
  --color-surface-2: oklch(96% 0.008 244);
  --color-text: oklch(24% 0.03 244);
  --color-text-secondary: oklch(46% 0.02 244);
  --color-text-muted: oklch(46% 0.02 244);
  --color-border: oklch(90% 0.012 244);
  --color-accent: oklch(38% 0.07 244);
  --color-accent-contrast: oklch(99% 0.005 200);

  --color-danger: oklch(50% 0.16 25);
  --color-birthday: oklch(52% 0.09 250);
  --color-done: oklch(42% 0.1 145);
  --color-on-duty: oklch(48% 0.07 195);
  --color-solo-night: oklch(50% 0.12 25);
  --color-date-night: oklch(48% 0.09 145);
  --color-meal: oklch(48% 0.08 70);
  --color-shelf: oklch(70% 0.06 65);
  /* Prometheus's fire: the one warm accent, kept to his button and page. */
  --color-ember: oklch(72% 0.19 52);
  --color-ember-deep: oklch(57% 0.21 36);
  /* A release's phases, in plan order (report.Phase.Slot): the dataviz
     reference categorical palette, validated adjacent-pair against this
     surface; phases always carry a visible label beside their color. */
  --phase-1: #257de0; --phase-2: #f47230; --phase-3: #00b894; --phase-4: #f2a600;
  --phase-5: #ee7fac; --phase-6: #008a17; --phase-7: #6a4ce2; --phase-8: #ec4647;

  --color-brand-ink: oklch(24% 0.03 244);
  --color-brand-globe: oklch(62% 0.087 203);
  --color-brand-globe-light: oklch(89% 0.063 186);
  --color-brand-arm: oklch(58% 0.083 233);

  --font-sans: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", serif;
  --font-size-h1: 1.875rem; --font-size-h2: 1.5rem; --font-size-h3: 1.125rem;
  --font-size-body: 1rem; --font-size-small: 0.875rem; --font-size-micro: 0.75rem;
  --line-height: 1.5;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 40px; --space-8: 48px;

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 20px; --radius-xl: 28px; --radius-full: 999px;

  --shadow-sm: 0 1px 3px oklch(0% 0 0 / 0.06);
  --shadow-md: 0 4px 16px oklch(0% 0 0 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0% 0 0 / 0.12);

  --nav-height: 64px;
  --tabbar-height: 64px;
  --sidebar-width: 200px;
}
@media (prefers-color-scheme: dark){
  :root{
    --color-bg: oklch(18% 0.02 244);
    --color-surface: oklch(24% 0.02 244);
    --color-surface-2: oklch(28% 0.022 244);
    --color-text: oklch(94% 0.01 244);
    --color-text-secondary: oklch(72% 0.016 244);
    --color-text-muted: oklch(72% 0.016 244);
    --color-border: oklch(36% 0.02 244);
    --color-accent: oklch(78% 0.05 200);
    --color-accent-contrast: oklch(16% 0.03 244);

    --color-danger: oklch(68% 0.17 25);
    --color-birthday: oklch(78% 0.13 60);
    --color-done: oklch(70% 0.12 145);
    --color-on-duty: oklch(70% 0.10 195);
    --color-solo-night: oklch(72% 0.13 235);
    --color-date-night: oklch(72% 0.15 350);
    --color-meal: oklch(72% 0.12 100);
    --color-shelf: oklch(40% 0.045 60);
    --color-ember: oklch(77% 0.17 56);
    --color-ember-deep: oklch(64% 0.2 40);
    --phase-1: #338ced; --phase-2: #e76624; --phase-3: #00a888; --phase-4: #d28e05;
    --phase-5: #e24d8b; --phase-6: #0aac23; --phase-7: #9887ef; --phase-8: #eb6263;

    --color-brand-ink: oklch(80% 0.05 244);
    --color-brand-globe: oklch(70% 0.09 203);
    --color-brand-globe-light: oklch(85% 0.06 186);
    --color-brand-arm: oklch(66% 0.08 233);

    --shadow-sm: 0 0 0 1px oklch(100% 0 0 / 0.05);
    --shadow-md: 0 0 0 1px oklch(100% 0 0 / 0.06), 0 6px 20px oklch(0% 0 0 / 0.45);
    --shadow-lg: 0 0 0 1px oklch(100% 0 0 / 0.08), 0 16px 40px oklch(0% 0 0 / 0.55);
  }
}

*,*::before,*::after{ box-sizing:border-box; }
body{ margin:0; font-family:var(--font-sans); background:var(--color-bg); color:var(--color-text); padding-bottom:calc(var(--tabbar-height) + 16px); }
h1,h2,h3{ margin:0 0 8px; font-weight:600; line-height:1.2; letter-spacing:-0.025em; font-family:var(--font-display); }
h1{ font-size:var(--font-size-h1); } h2{ font-size:var(--font-size-h2); } h3{ font-size:var(--font-size-h3); font-family:var(--font-sans); font-weight:600; letter-spacing:0; }
p{ margin:0 0 8px; font-size:var(--font-size-body); line-height:var(--line-height); color:var(--color-text-secondary); }
/* Links.
   Underline behaviour is split deliberately. In prose a link sits inline
   in a sentence, where colour alone is not a sufficient signal - anyone
   who cannot distinguish the accent from body text would have nothing to
   go on - so those keep an underline. In app chrome (back links, action
   rows, cards) position and weight already mark a link as interactive,
   and blanket underlines make the UI look like an unstyled document. */
a{ color:var(--color-accent); text-decoration:none; }
a:hover{ opacity:0.8; }

.prose a{
  text-decoration:underline;
  text-underline-offset:2px;
  text-decoration-thickness:1px;
  text-decoration-color:color-mix(in oklch, var(--color-accent) 45%, transparent);
}
.prose a:hover{ text-decoration-color:var(--color-accent); opacity:1; }

/* Embed card - a [[Wikilink]] in a note body that resolved to a real
   task/event/recipe renders as this instead of a bare <a>: the actual
   Apollo differentiator (docs/decisions/0006-apollo-not-obsidian.md: "a
   real preview, not a dropdown"). Unresolved or out-of-scope wikilinks
   still fall back to a plain .prose a link, so this only ever appears
   where there is a real fact to show. */
.embed-card{
  display:inline-flex; align-items:baseline; gap:6px;
  background:var(--color-surface-2); border:1px solid var(--color-border);
  border-radius:var(--radius-sm); padding:2px 10px;
  text-decoration:none; font-size:var(--font-size-small); line-height:1.6;
}
.embed-card:hover{ border-color:var(--color-accent); opacity:1; }
.embed-card-kind{ font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:var(--color-text-muted); }
.embed-card-title{ font-weight:600; color:var(--color-text); }
.embed-card-fact{ color:var(--color-text-muted); }

/* Back link - the "back to X" breadcrumb at the top of detail pages.
   Muted rather than accent: it is an escape hatch, not the point of the
   page, and 20 of these in accent blue competed with real actions. The
   arrow is drawn by the component so no call site can forget it or use a
   different glyph. */
.backlink{
  display:inline-flex; align-items:center; gap:6px;
  font-size:13px; font-weight:500;
  color:var(--color-text-muted);
  margin-bottom:var(--space-3);
}
.backlink::before{ content:"\2190"; font-size:14px; line-height:1; }
.backlink:hover{ color:var(--color-accent); opacity:1; }

/* Checkboxes and radios at a size a thumb can hit; browsers draw them
   at 13px. */
input[type=checkbox], input[type=radio]{ width:20px; height:20px; flex:none; accent-color:var(--color-accent); }
:focus{ outline:none; }
:focus-visible{ outline:2px solid var(--color-accent); outline-offset:2px; border-radius:4px; }
.container{ max-width:48rem; margin:0 auto; padding:20px 16px 16px; }
.hint{ font-size:var(--font-size-micro); color:var(--color-text-muted); }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:15px; font-weight:600; cursor:pointer;
  border-radius:var(--radius-md); border:1px solid transparent; min-height:44px; padding:0 16px; text-decoration:none; line-height:1;
  transition:transform .12s ease, opacity .12s ease, background-color .12s ease; }
.btn svg{ width:18px; height:18px; flex:none; }
.btn-primary{ background:var(--color-accent); color:var(--color-accent-contrast); border-radius:var(--radius-md); }
.btn-primary:hover{ opacity:0.9; }
.btn-secondary{ background:transparent; color:var(--color-text); border-color:var(--color-border); }
.btn-secondary:hover{ background:var(--color-surface-2); }
.btn-danger{ background:transparent; color:var(--color-danger); border-color:var(--color-danger); }
.btn-danger:hover{ background:color-mix(in oklch, var(--color-danger) 12%, transparent); }
.btn-icon{ display:inline-flex; align-items:center; justify-content:center; flex:none; width:44px; height:44px; padding:0; border-radius:var(--radius-full); background:transparent; color:var(--color-text-secondary); border:1px solid transparent; text-decoration:none; }
.btn-icon svg{ width:18px; height:18px; }
.btn-icon:hover{ background:var(--color-surface-2); }
.btn:disabled{ opacity:0.4; cursor:not-allowed; }
.btn-block{ width:100%; }

.field{ display:flex; flex-direction:column; gap:4px; margin-bottom:16px; }
.field > label,.field>span{ font-size:var(--font-size-small); font-weight:600; color:var(--color-text-secondary); }
.input,.select,.textarea{ width:100%; min-height:44px; font:inherit; font-size:16px; color:var(--color-text);
  background:var(--color-surface); border:1.5px solid var(--color-border); border-radius:var(--radius-md); padding:0 12px; margin-bottom:8px; }
.textarea{ padding:12px; min-height:96px; resize:vertical; line-height:1.4; }
.select{ appearance:none; background-image:linear-gradient(45deg,transparent 50%,var(--color-text-muted) 50%),linear-gradient(135deg,var(--color-text-muted) 50%,transparent 50%);
  background-position:calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size:5px 5px; background-repeat:no-repeat; padding-right:32px; }
.input:hover,.select:hover,.textarea:hover{ border-color:var(--color-text-muted); }
.input:focus-visible,.select:focus-visible,.textarea:focus-visible{ border-color:var(--color-accent); }

.list{ display:flex; flex-direction:column; gap:8px; list-style:none; margin:0 0 16px; padding:0; }
.row{ display:flex; align-items:center; gap:12px; background:var(--color-surface); border-radius:var(--radius-md); padding:12px; box-shadow:var(--shadow-sm); min-height:60px; }
.row-check{ flex:none; width:26px; height:26px; border-radius:var(--radius-sm); border:2px solid var(--color-border); background:transparent; display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition:transform .12s ease, background-color .12s ease, border-color .12s ease; }
.row-check svg{ width:16px; height:16px; opacity:0; color:var(--color-accent-contrast); }
.row.is-done .row-check{ background:var(--color-done); border-color:var(--color-done); }
.row.is-done .row-check svg{ opacity:1; }
.row-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; text-decoration:none; }
.row-title{ font-size:16px; font-weight:600; color:var(--color-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row.is-done .row-title{ text-decoration:line-through; color:var(--color-text-muted); font-weight:500; }
.row-meta{ font-size:var(--font-size-small); color:var(--color-text-muted); display:flex; gap:8px; align-items:center; }
/* A row that carries its own buttons, chips or a field: on a phone its
   text keeps the whole first line and the controls wrap under it, to the
   right (justify-content acts per line, so the first is untouched).
   Squeezed side by side they cut "16 piece Corn tortillas" to "16…".
   The body's basis is harmless on rows that don't wrap: it shrinks. */
@media (max-width:559px){
  .row:has(> .btn:not(.btn-icon), > .chip, > .select, > .u-contents > .btn:not(.btn-icon), > .u-contents > .input, > .u-contents > .select){ flex-wrap:wrap; justify-content:flex-end; row-gap:8px; }
  .row-body{ flex-basis:calc(100% - 38px); }
}
/* Small things that are tapped get an invisible halo out to about 44px
   (Apple's minimum target) without growing what you see: the row check
   (26px), a card's View all chevron (18px), the calendar's Today link. */
.row-check, .card-head .card-link, .calnav-label a{ position:relative; }
.row-check::after, .card-head .card-link::after, .calnav-label a::after{ content:""; position:absolute; inset:-9px; }
.card-head .card-link::after{ inset:-13px; }
.calnav-label a::after{ inset:-14px -6px; }

.badge{ display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; padding:4px 10px; border-radius:var(--radius-full); white-space:nowrap; }
.badge-birthday{ background:color-mix(in oklch, var(--color-birthday) 18%, var(--color-surface)); color:var(--color-birthday); }
.badge-solo_night{ background:color-mix(in oklch, var(--color-solo-night) 18%, var(--color-surface)); color:var(--color-solo-night); }
.badge-date_night{ background:color-mix(in oklch, var(--color-date-night) 18%, var(--color-surface)); color:var(--color-date-night); }
.badge-on_duty{ background:color-mix(in oklch, var(--color-on-duty) 18%, var(--color-surface)); color:var(--color-on-duty); }
.badge-general{ background:var(--color-surface-2); color:var(--color-text-secondary); }
.badge-danger{ background:color-mix(in oklch, var(--color-danger) 16%, var(--color-surface)); color:var(--color-danger); }
.dot{ width:9px; height:9px; border-radius:50%; flex:none; }
.dot-birthday{ background:var(--color-birthday); } .dot-solo_night{ background:var(--color-solo-night); }
.dot-date_night{ background:var(--color-date-night); } .dot-on_duty{ background:var(--color-on-duty); }
.dot-general{ background:var(--color-text-muted); }
/* holiday = computed reference overlay (internal/holiday), not a real
   household event - muted and dashed so it reads as informational, not
   something to tap/edit/delete like a real calendar item. */
.dot-holiday{ background:var(--color-text-muted); }
.calbanner-holiday{ background:var(--color-surface-2)!important; color:var(--color-text-secondary); border:1px dashed var(--color-border); cursor:default; }
/* work-hours = computed per-person overlay (a user pref, Store.WorkHours),
   not a real household event either - same non-interactive dashed
   treatment as holiday, colored with --color-on-duty so it reads as
   "busy/unavailable" rather than "informational" like holiday does. */
.calbanner-workhours{ background:color-mix(in oklch, var(--color-on-duty) 14%, var(--color-surface)); color:var(--color-on-duty); border:1px dashed var(--color-on-duty); cursor:default; }
/* focus = time blocked out to actually do a task (task detail -> "Block
   out time for this"), visually distinct from a real appointment. */
.dot-focus{ background:var(--color-accent); }
.dot-meal{ background:var(--color-meal); }
.badge-meal{ background:color-mix(in oklch, var(--color-meal) 18%, var(--color-surface)); color:var(--color-meal); }
.badge-focus{ background:color-mix(in oklch, var(--color-accent) 18%, var(--color-surface)); color:var(--color-accent); }

.cardgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin:0 0 16px; }
.tilegrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(88px,1fr)); gap:12px; margin:0 0 16px; }
.tile{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; text-align:center; text-decoration:none; color:var(--color-text); background:var(--color-surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); padding:18px 8px; min-height:88px; transition:box-shadow .15s ease, transform .15s ease; }
.tile:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.tile:hover .tile-icon{ color:var(--color-accent); }
.tile-icon{ display:flex; }
.tile-icon svg{ width:26px; height:26px; }
.tile-label{ font-size:12.5px; font-weight:600; line-height:1.25; }
.card{ background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-xl); box-shadow:none; overflow:hidden; display:flex; flex-direction:column; }
.all-group{ font-family:var(--font-sans); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:var(--color-text-muted); margin:20px 0 8px; }
/* All is a grid of tiles, four to a row on a phone (the way a phone's
   home screen reads), more on a wider screen. A phone shows names only;
   the one-line descriptions appear where there's room, and Find a page
   searches them either way. */
.all-filter{ margin:4px 0 4px; }
.all-grid{ list-style:none; margin:0 0 8px; padding:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.all-grid a{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:6px; height:100%; box-sizing:border-box; padding:10px 4px 8px; border:1px solid var(--color-border); border-radius:var(--radius-xl); background:var(--color-surface); text-decoration:none; color:var(--color-text); }
.all-grid a:hover{ background:var(--color-surface-2); }
.all-icon{ flex:none; display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:var(--radius-md); background:var(--color-surface-2); color:var(--color-accent); }
.all-icon svg{ width:20px; height:20px; }
@media (min-width:600px){ .all-grid{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; } .all-grid a{ padding:12px 6px 10px; } }
kbd{ font-family:var(--font-sans); font-size:12px; font-weight:600; padding:1px 6px; border:1px solid var(--color-border); border-bottom-width:2px; border-radius:5px; background:var(--color-surface); color:var(--color-text-secondary); }
.all-label{ display:block; max-width:100%; font-size:11.5px; font-weight:600; line-height:1.2; letter-spacing:-.01em; }
.all-hint{ display:none; }
@media (min-width:600px){ .all-label{ font-size:13px; } .all-hint{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:11px; line-height:1.3; color:var(--color-text-muted); } }
.dash-plan{ margin-top:12px; max-width:100%; }
.dash-card-body{ padding:0 16px 16px; min-width:0; }
.card > .list{ padding:0 16px 16px; margin-bottom:0; }
.card > .hint{ display:block; padding:0 16px 16px; margin-bottom:0; }
/* Empty-state for a dashboard card: the card's own icon, muted and small,
   next to the same one-line message .hint used to carry alone. A card
   with nothing in it still shows its identity instead of just blank text. */
.card-empty{ display:flex; align-items:center; gap:8px; padding:0 16px 16px; margin:0; color:var(--color-text-muted); font-size:var(--font-size-micro); }
/* Needs attention: one ranked list; a small tinted icon carries the
   urgency so the titles stay plain and scannable. */
/* .item-icon is every Today row's and tile's icon, so the cards read
   as one set; the card's icon comes from the household's spec. */
.attention-list .row{ gap:12px; }
.item-icon{ flex:none; display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:50%; background:var(--color-surface-2); color:var(--color-text-muted); }
.item-icon svg{ width:16px; height:16px; }
.item-dot-birthday{ color:var(--color-birthday); } .item-dot-solo_night{ color:var(--color-solo-night); }
.item-dot-date_night{ color:var(--color-date-night); } .item-dot-on_duty{ color:var(--color-on-duty); }
.item-dot-meal{ color:var(--color-meal); } .item-dot-focus{ color:var(--color-accent); }
.attention-danger .item-icon{ background:color-mix(in oklch, var(--color-danger) 14%, var(--color-surface)); color:var(--color-danger); }
.attention-danger .row-meta{ color:var(--color-danger); }
.attention-warn .item-icon{ background:color-mix(in oklch, var(--color-accent) 14%, var(--color-surface)); color:var(--color-accent); }
.attention-more{ padding:0 16px 14px; margin:0; }
.card-empty svg{ width:16px; height:16px; flex:none; opacity:.55; }
/* Standalone prose in a card - full padding on all sides, unlike .list
   and .hint above, because there is no card head providing the top space.
   Used for note bodies, which are the longest-form reading surface here. */
.card > .prose{ padding:var(--space-4); }
.card-media{ aspect-ratio:16/10; background:var(--color-surface-2); display:flex; align-items:center; justify-content:center; color:var(--color-text-muted); font-size:11px; }
.card-body{ padding:12px; display:flex; flex-direction:column; gap:6px; flex:1; }
.card-title{ font-size:16px; font-weight:700; text-decoration:none; color:var(--color-text); }
a.card-title:hover, .card-title a:hover{ color:var(--color-accent); }
.card-meta{ font-size:var(--font-size-small); color:var(--color-text-muted); display:flex; gap:8px; flex-wrap:wrap; }

.tabbar{ position:fixed; left:0; right:0; bottom:0; display:flex; align-items:stretch; background:var(--color-surface); border-top:1px solid var(--color-border); height:calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px)); padding-bottom:env(safe-area-inset-bottom, 0px); box-shadow:none; }
.tabbar-item{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--color-text-muted); font-size:11px; font-weight:500; text-decoration:none; min-height:56px; }
.tabbar-item svg{ width:20px; height:20px; }
.tabbar-item.is-active, .tabbar-item.is-hub-active{ color:var(--color-accent); font-weight:600; }
/* Opaque on purpose. It used to be 90% transparent with backdrop-filter
   blur, which on some browsers left a blurred, ghosted copy of the bar
   painted mid-page while scrolling any tall page (dashboard, People,
   All) - a stale compositing layer of the sticky, blurred bar. A solid
   bar can't show anything through it, so there's nothing to go stale. */
.topbar{ position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:12px; min-height:var(--nav-height); padding:12px 16px; padding-top:max(12px, env(safe-area-inset-top)); background:var(--color-bg); border-bottom:1px solid var(--color-border); }
.topbar-brand{ font-weight:600; font-size:18px; margin-right:auto; display:flex; align-items:center; gap:12px; min-width:0; color:var(--color-text); text-decoration:none; }
.topbar-brand-text{ display:flex; flex-direction:column; justify-content:center; min-width:0; line-height:1.15; }
.topbar-brand-name{ font-family:var(--font-display); font-weight:600; letter-spacing:-0.025em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar-brand-version{ font-family:var(--font-sans); font-weight:500; font-size:11px; letter-spacing:normal; color:var(--color-text-muted); margin-left:4px; }
.topbar-brand-sub{ font-size:12px; font-weight:500; font-family:var(--font-sans); color:var(--color-text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar-household{ color:var(--color-text-secondary); font-weight:600; }
.topbar-elsewhere{ border-top:4px solid var(--color-accent); }
.topbar-elsewhere .topbar-household{ background:var(--color-accent); color:var(--color-accent-contrast); padding:1px 7px; border-radius:999px; }
.topbar-brand svg{ width:40px; height:40px; flex:none; }
.topbar-brand img, .mark-clip{ width:40px; height:40px; border-radius:50%; object-fit:cover; background:var(--color-surface-2); flex:none; }
.topbar-hint{ font-size:13px; color:var(--color-text-muted); white-space:nowrap; }
.topbar-action{ display:flex; align-items:center; justify-content:center; width:44px; height:44px; color:var(--color-text-muted); flex:none; border-radius:var(--radius-md); }
/* Helios's sun: shown only while the droplet checks, ships or rolls back.
   It turns slowly; with reduced motion it pulses instead. */
.topbar-helios{ color:var(--color-ember); }
@media (prefers-reduced-motion:no-preference){ .topbar-helios svg{ animation:helios-turn 6s linear infinite; } }
@media (prefers-reduced-motion:reduce){ .topbar-helios svg{ animation:helios-pulse 2s ease-in-out infinite; } }
@keyframes helios-turn{ to{ transform:rotate(360deg); } }
@keyframes helios-pulse{ 50%{ opacity:.45; } }
.topbar-action svg{ width:20px; height:20px; }
/* On a phone with four top-bar buttons the brand had ~130px and cut
   both lines short ("Atlas v. O…", "Household ·…"). The release name is
   the first to go, and the mark, gap and buttons tighten a little, so
   whose pages these are and who is signed in both read. */
@media (max-width:559px){
  .topbar-brand{ gap:8px; }
  .topbar-brand-version{ display:none; }
  .topbar-brand img, .topbar-brand .mark-clip{ width:36px; height:36px; }
  .topbar{ gap:8px; }
  .topbar-action{ width:40px; } /* still 44px tall */
}
.quicknew{ position:relative; }
.quicknew summary{ list-style:none; cursor:pointer; }
.quicknew summary::-webkit-details-marker{ display:none; }
.quicknew-menu{ position:absolute; right:0; top:calc(100% + 6px); background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); box-shadow:var(--shadow-md); padding:6px; display:flex; flex-direction:column; min-width:160px; z-index:20; }
.quicknew-menu a{ padding:8px 10px; border-radius:var(--radius-sm); color:var(--color-text); text-decoration:none; font-size:14px; }
.quicknew-menu a:hover{ background:var(--color-surface-2); }
.quicknew-menu-head{ margin:6px 10px 2px; font-size:12px; font-weight:600; color:var(--color-text-muted); }
.quicknew-menu-note{ margin:2px 10px 6px; }
.quicknew-menu a.quicknew-menu-item{ display:flex; flex-direction:column; gap:2px; }
.quicknew-menu-item .hint{ font-size:12px; overflow-wrap:anywhere; }
.topbar-olympus .quicknew-menu{ min-width:240px; max-width:min(320px, calc(100vw - 32px)); }
.topbar-olympus summary{ position:relative; }
.topbar-count{ position:absolute; top:3px; right:1px; min-width:18px; height:18px; padding:0 5px; border-radius:var(--radius-full); background:var(--color-danger); color:var(--color-surface); font-size:11px; font-weight:700; line-height:18px; text-align:center; }
.topbar-count[hidden]{ display:none; }
/* The Olympus button's two counts: requests waiting (orange, top) and
   sessions let in now (green, bottom), each shown only while non-zero. */
.topbar-count-waiting{ background:var(--color-ember-deep); color:#fff; }
.topbar-count-live{ top:auto; bottom:3px; background:var(--color-done); color:#fff; }

.seg{ display:flex; gap:2px; background:var(--color-surface-2); border-radius:var(--radius-full); padding:3px; margin-bottom:12px; }
.seg-item{ flex:1; text-align:center; padding:7px 10px; border-radius:var(--radius-full); font-size:13px; font-weight:600; color:var(--color-text-secondary); text-decoration:none; white-space:nowrap; }
.seg-item.is-active{ background:var(--color-surface); color:var(--color-text); box-shadow:var(--shadow-sm); }
/* In-page tabs with no script: hidden radios, then a .seg bar of labels,
   then the panels, in that order. The nth radio checked shows the nth
   panel and marks the nth label. Two or three tabs. */
.tabs-radio{ position:absolute; opacity:0; width:1px; height:1px; pointer-events:none; }
.tabs .seg{ display:inline-flex; margin-bottom:8px; }
.tabs .seg-item{ flex:none; cursor:pointer; }
.tabs-panel{ display:none; }
.tabs-radio:nth-of-type(1):checked ~ .seg .seg-item:nth-child(1),
.tabs-radio:nth-of-type(2):checked ~ .seg .seg-item:nth-child(2),
.tabs-radio:nth-of-type(3):checked ~ .seg .seg-item:nth-child(3){ background:var(--color-surface); color:var(--color-text); box-shadow:var(--shadow-sm); }
.tabs-radio:nth-of-type(1):focus-visible ~ .seg .seg-item:nth-child(1),
.tabs-radio:nth-of-type(2):focus-visible ~ .seg .seg-item:nth-child(2),
.tabs-radio:nth-of-type(3):focus-visible ~ .seg .seg-item:nth-child(3){ outline:2px solid var(--color-accent); outline-offset:1px; }
.tabs-radio:nth-of-type(1):checked ~ .tabs-panels > .tabs-panel:nth-child(1),
.tabs-radio:nth-of-type(2):checked ~ .tabs-panels > .tabs-panel:nth-child(2),
.tabs-radio:nth-of-type(3):checked ~ .tabs-panels > .tabs-panel:nth-child(3){ display:block; }
/* Commands to copy: one per line, the box scrolls rather than wrapping. */
.cli{ margin:0; max-width:100%; overflow-x:auto; white-space:pre; font-size:12px; line-height:1.55; background:var(--color-surface-2); padding:10px 12px; border-radius:var(--radius-md); }

.callegend{ display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:10px; padding:10px 12px; background:var(--color-surface); border-radius:var(--radius-md); }
.callegend-item{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--color-text-secondary); }

.calnav{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.calnav-label{ display:flex; flex-direction:column; align-items:center; gap:2px; }
.calnav-label span{ font-weight:700; font-size:15.5px; }
.calnav-label a{ font-size:12px; font-weight:600; }

.calweekdays{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin-bottom:4px; }
.calweekday{ text-align:center; font-size:11px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; letter-spacing:0.03em; padding:2px 0; }
.calmonth{ display:flex; flex-direction:column; gap:4px; }
.calweek{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.calday{ display:flex; flex-direction:column; align-items:stretch; gap:2px; min-height:80px; min-width:0; padding:4px 3px; border:none; border-radius:var(--radius-sm); text-align:left; background:var(--color-surface); font:inherit; }
.calday-today{ background:color-mix(in oklch, var(--color-accent) 12%, var(--color-surface)); }
.calday-out{ opacity:0.4; }
.calday-num{ font-size:12px; font-weight:600; color:var(--color-text-secondary); margin-bottom:1px; align-self:flex-start; background:none; border:none; padding:0; cursor:pointer; font:inherit; }
.calday-today .calday-num{ font-weight:800; color:var(--color-accent); }
.calbanner{ display:block; width:100%; border-radius:5px; height:17px; color:var(--color-bg); font-size:10px; font-weight:700; line-height:17px; padding:0 5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; }
.calchip{ display:flex; align-items:center; gap:4px; font-size:10.5px; font-weight:600; color:var(--color-text-secondary); background:var(--color-surface-2); border-radius:5px; padding:1px 5px; overflow:hidden; width:100%; text-decoration:none; min-width:0; }
.calchip-text{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.caloverflow{ font-size:10.5px; font-weight:700; color:var(--color-accent); margin-top:1px; text-decoration:none; }
@media (max-width:479px){
  .calday{ min-height:64px; }
}

.calweekgrid{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; margin-bottom:6px; }
.calweek-header{ display:flex; flex-direction:column; align-items:center; gap:2px; }
.calweek-weekday{ font-size:10.5px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; }
.calweek-daynum{ font-size:15px; font-weight:700; width:26px; height:26px; line-height:26px; text-align:center; border-radius:50%; color:var(--color-text); }
.calweek-header-today .calweek-daynum{ background:var(--color-accent); color:var(--color-accent-contrast); }
.calweek-allday{ display:flex; flex-direction:column; gap:3px; min-height:8px; min-width:0; }
.calweek-col{ background:var(--color-surface); border-radius:var(--radius-md); padding:6px 4px; min-height:160px; min-width:0; display:flex; flex-direction:column; gap:4px; }
.calweek-event{ display:flex; flex-direction:column; gap:1px; padding:4px 5px; border-radius:var(--radius-sm); background:var(--color-surface-2); }
.calweek-event-time{ display:flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:var(--color-text-muted); }
.calweek-event-title{ font-size:12px; font-weight:600; color:var(--color-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calweek-event-link{ display:flex; flex-direction:column; gap:1px; }
/* A 1fr track's minimum is its content's min-content width, and event
   chips don't wrap, so one long title used to widen its column and push
   the whole page - header, tabs, filters - into a sideways scroll at
   phone width. minmax(0,1fr) above caps every column at its share.
   Below 640px the week becomes a top-to-bottom agenda instead: seven
   45px columns can't show an event title at all. */
/* In a week column a chip has room for a title if it may wrap - the
   single-line ellipsis left "6:00pm D..." on a desktop. Month cells keep
   the one-line chip; they're too short for more. */
.calweek-col .calchip{ align-items:flex-start; padding:3px 5px; }
.calweek-col .calchip .dot{ margin-top:4px; }
.calweek-col .calchip-text{ white-space:normal; overflow-wrap:break-word; hyphens:auto; line-height:1.3; }
.calagenda{ display:none; }
@media (max-width:639px){
  .calweek-columns{ display:none; }
  .calagenda{ display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
}
.calagenda-day{ display:grid; grid-template-columns:48px minmax(0,1fr); gap:10px; align-items:start; background:var(--color-surface); border-radius:var(--radius-md); padding:10px 12px; }
.calagenda-date{ display:flex; flex-direction:column; align-items:center; gap:2px; padding-top:2px; }
.calagenda-weekday{ font-size:10.5px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; }
.calagenda-daynum{ font-size:16px; font-weight:700; width:30px; height:30px; line-height:30px; text-align:center; border-radius:50%; color:var(--color-text); }
.calagenda-day.is-today .calagenda-daynum{ background:var(--color-accent); color:var(--color-accent-contrast); }
.calagenda-events{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.calagenda-event{ display:flex; align-items:baseline; gap:8px; padding:6px 8px; border-radius:var(--radius-sm); background:var(--color-surface-2); color:var(--color-text); text-decoration:none; min-width:0; }
.calagenda-event .dot{ align-self:center; }
.calagenda-time{ flex:none; font-size:12px; font-weight:600; color:var(--color-text-muted); font-variant-numeric:tabular-nums; }
.calagenda-title{ font-size:14px; font-weight:600; min-width:0; overflow-wrap:break-word; }
.calagenda-event.is-holiday, .calagenda-event.is-workhours{ background:transparent; border:1px dashed var(--color-border); color:var(--color-text-secondary); }
.calagenda-free{ font-size:13px; color:var(--color-text-muted); padding:6px 0; }

.sheet-backdrop{ position:fixed; inset:0; background:oklch(0% 0 0 / 0.55); display:flex; align-items:flex-end; justify-content:center; z-index:50; }
.sheet{ background:var(--color-surface); border-radius:var(--radius-lg) var(--radius-lg) 0 0; width:100%; max-width:520px; max-height:75vh; overflow-y:auto; padding:16px; box-shadow:var(--shadow-lg); }
.sheet-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.sheet-title{ font-size:16px; font-weight:700; }

.pillbar{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
/* On a phone a row of pills is one line that scrolls sideways (the chip
   row Material and Baymard describe), not three rows pushing the list
   off the first screen; the cut-off pill at the edge says there's more. */
@media (max-width:559px){
  .pillbar{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
  .pillbar::-webkit-scrollbar{ display:none; }
}
.pill{ display:inline-flex; align-items:center; gap:6px; padding:7px 13px; border-radius:var(--radius-full); font-size:13px; font-weight:600; background:var(--color-surface-2); color:var(--color-text-secondary); text-decoration:none; white-space:nowrap; border:none; cursor:pointer; }
.pill svg{ width:15px; height:15px; }
.pill.is-active{ background:var(--color-accent); color:var(--color-accent-contrast); }

.searchbar{ position:relative; margin-bottom:12px; }
.searchbar svg{ position:absolute; left:12px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:var(--color-text-muted); }
.searchbar .input{ padding-left:38px; }

.row-icon{ flex:none; width:40px; height:40px; border-radius:var(--radius-md); background:var(--color-surface-2); display:flex; align-items:center; justify-content:center; color:var(--color-text-secondary); }
.row-icon svg{ width:20px; height:20px; }

.uploadzone{ border:1.5px dashed var(--color-border); border-radius:var(--radius-lg); padding:24px 16px; text-align:center; color:var(--color-text-muted); display:flex; flex-direction:column; align-items:center; gap:10px; background:var(--color-surface-2); }
.uploadzone svg{ width:30px; height:30px; opacity:0.7; }
.uploadzone-actions{ display:flex; gap:8px; margin-top:2px; }

.empty{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px; padding:32px 16px; color:var(--color-text-muted); border:1.5px dashed var(--color-border); border-radius:var(--radius-lg); margin-bottom:16px; }
.empty-title{ font-size:15px; font-weight:600; color:var(--color-text-secondary); }
.alert{ display:flex; gap:10px; align-items:flex-start; padding:12px 14px; margin-bottom:16px; border-radius:var(--radius-md); border:1px solid var(--color-border); background:var(--color-surface-2); color:var(--color-text); font-size:14px; line-height:1.45; }
.alert strong{ display:block; margin-bottom:2px; }
.alert p{ margin:0; font-size:14px; color:var(--color-text-secondary); }
.alert a{ font-weight:600; }
.alert-danger{ border-color:color-mix(in oklch, var(--color-danger) 40%, var(--color-border)); background:color-mix(in oklch, var(--color-danger) 8%, var(--color-surface)); }
.alert-danger strong{ color:var(--color-danger); }
.toast{ position:fixed; left:50%; bottom:calc(84px + env(safe-area-inset-bottom)); transform:translate(-50%, 8px); z-index:1000; max-width:min(440px, calc(100vw - 32px)); padding:12px 16px; border-radius:var(--radius-md); background:var(--color-text); color:var(--color-bg); font-size:14px; line-height:1.4; box-shadow:0 8px 24px rgb(0 0 0 / .18); opacity:0; transition:opacity .18s ease, transform .18s ease; pointer-events:none; }
.toast.is-visible{ opacity:1; transform:translate(-50%, 0); }
@media (min-width:900px){ .toast{ bottom:24px; } }
.card-head{ display:flex; align-items:center; gap:6px; padding:12px 12px 4px; }
.drag-handle{ flex:none; width:28px; height:44px; margin:-6px 0; display:flex; align-items:center; justify-content:center; color:var(--color-text-muted); cursor:grab; }
[data-reorder-key] [draggable="true"].is-dragging{ opacity:0.45; }
[data-reorder-key] [draggable="true"].is-dragover{ box-shadow:0 0 0 2px var(--color-accent), var(--shadow-md); }
.hidden-tray{ max-width:640px; margin:0 auto 16px; }
.card{ margin-bottom:12px; }
/* Dashboard: 2-column from ~phone-landscape up, so the first card (Household
   Status) sits as half the top row instead of spanning full-width alone -
   single column stays below that, real phones in portrait. */
/* Two columns even on a phone - one long single-file scroll of cards was
   "boring and blah" (Alon). Cards are compact enough to pair up. */
/* Dashboard grid.
   Full-width is keyed off an explicit .card-wide class, not :first-child.
   The cards are drag-reorderable, so a positional rule meant whichever
   card you happened to drag to the top became a full-width banner - the
   treatment followed position rather than the card it was meant for. */
#dashStack{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3); align-items:start; }
#dashStack .card-wide{ grid-column:1 / -1; }
/* A floor, not a forced match: two cards in the same row keep their own
   natural height (an empty-state card stays short, a 5-item list stays
   tall) rather than one stretching to blank-pad itself up to the other's
   height, which looked worse than the mismatch it was meant to fix. The
   floor just keeps a near-empty card from reading as a broken sliver. */
#dashStack .card{ margin-bottom:0; min-height:0; }
/* Each Today card has its own hue (--card-h): a strip along its top, a
   wash behind its header, and its icons and tiles, so the cards read as
   different things at a glance instead of one grey block. */
:where(#dashStack .card){ --card-h:220; }
#dashStack .card{ --card-accent:oklch(54% 0.13 var(--card-h)); --card-tint:color-mix(in oklch, var(--card-accent) 13%, var(--color-surface));
  border-top:4px solid var(--card-accent); }
#dashStack .card-head{ background:linear-gradient(to bottom, color-mix(in oklch, var(--card-accent) 9%, transparent), transparent); padding-bottom:8px; }
#dashStack .card-head h3{ color:color-mix(in oklch, var(--card-accent) 55%, var(--color-text)); }
#dashStack .card-icon{ width:28px; height:28px; border-radius:50%; background:var(--card-accent); color:var(--color-surface); }
:where(#dashStack) .item-icon{ background:var(--card-tint); color:var(--card-accent); }
[data-card="attention"]{ --card-h:25; }
[data-card="familystatus"]{ --card-h:300; }
[data-card="presence"]{ --card-h:195; }
[data-card="grabs"]{ --card-h:165; }
[data-card="tasks"]{ --card-h:250; }
[data-card="todaysmenu"], [data-card="meals"]{ --card-h:65; }
[data-card="events"]{ --card-h:275; }
[data-card="birthdays"]{ --card-h:350; }
[data-card="shopping"]{ --card-h:145; }
[data-card="inventory"]{ --card-h:45; }
[data-card="reading"]{ --card-h:320; }
@media (prefers-color-scheme: dark){ #dashStack .card{ --card-accent:oklch(74% 0.12 var(--card-h)); } }
/* A date or a count in place of an icon: what the row is about, at a glance. */
.item-tile{ flex:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; width:44px; height:46px; border-radius:var(--radius-md);
  background:var(--card-tint, var(--color-surface-2)); color:var(--card-accent, var(--color-text)); line-height:1; }
.item-tile b{ font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; }
.item-tile small{ font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; opacity:.85; }
.item-tile.item-dot-meal{ color:var(--color-meal); } .item-tile.item-dot-birthday{ color:var(--color-birthday); }
.dash-yaml{ flex-direction:column; margin:0 0 var(--space-3); }
body.edit-mode details.edit-only{ display:block; }
.dash-yaml summary{ cursor:pointer; font-weight:600; padding:6px 0; }
.dash-yaml-text{ min-height:220px; padding:10px 12px; font:16px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space:pre; overflow:auto; tab-size:2; }
.dash-yaml-ok{ color:var(--color-done); font-weight:600; }
.dash-yaml-bad{ color:var(--color-danger); font-weight:600; }
/* Every Today list is a grid of data cards: one column in a half-width
   card or on a phone, several across a wide one (Needs attention). */
#dashStack .dash-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap:6px; margin-bottom:12px; }
#dashStack .dash-list .row{
  min-height:0;
  padding:8px 10px;
  box-shadow:none;
  border:1px solid var(--color-border);
}
#dashStack .dash-list .row-title,
#tasklist .row-title{
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.dash-duties{
  list-style:none;
  margin:0 0 12px;
  padding:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 16px;
}
.dash-duties li{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:8px;
  min-width:0;
  padding:8px 0;
  border-bottom:1px solid var(--color-border);
  font-size:var(--font-size-small);
}
.dash-duties span{ color:var(--color-text-muted); }
.dash-duties strong{
  font-weight:600;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
/* Today's snapshot and Who's home: one small data card per role or
   person, the same icon-and-text shape as the list rows. */
.dash-stats{ list-style:none; margin:0 0 12px; padding:0; display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:6px; }
.dash-stats li{ display:flex; align-items:center; gap:10px; min-width:0; padding:8px 10px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); }
.dash-stats div{ display:flex; flex-direction:column; min-width:0; }
.dash-stats span:not(.item-icon){ color:var(--color-text-muted); font-size:var(--font-size-micro); }
.dash-stats strong{ font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dash-duty-action{ margin:0 0 8px; }
/* One column on a phone: two side by side left each row's icon and
   title a few characters wide. */
@media (max-width:480px){
  #dashStack{ grid-template-columns:1fr; }
}
@media (max-width:360px){
  .dash-duties{ grid-template-columns:1fr; }
}

/* Section captions injected by renderSections() (layout.html) above each
   run of same-data-section cards - the dashboard's answer to "no
   sections, everything looks the same": Today / This week / Household /
   Reading, always spanning the full grid width regardless of where a
   card in that section currently sits. */
.dash-section-label{ grid-column:1 / -1; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--color-text-muted); margin:var(--space-2) 0 -2px; }
.dash-section-label:first-child{ margin-top:0; }
/* Applied by renderSections() (layout.html) to the last card of a
   section with an odd count - otherwise it sits alone in a grid row
   with an empty cell beside it, since the next section's caption forces
   a fresh row right after it. */
.dash-section-solo{ grid-column:1 / -1; }

/* Today's quick actions: equal buttons, icon over label, all on screen
   at any width (no sideways scrolling). */
.dash-actions{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(0, 1fr);
  gap:var(--space-2);
  margin:var(--space-3) 0 0;
  max-width:420px;
}
.dash-action{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  min-height:64px; padding:8px 4px;
  border:1px solid var(--color-border); border-radius:var(--radius-xl);
  background:var(--color-surface); color:var(--color-text);
  font-size:13px; font-weight:600; text-decoration:none; text-align:center;
  white-space:nowrap; /* a label never breaks; the buttons widen instead */
}
.dash-action svg{ width:22px; height:22px; color:var(--color-accent); }
.dash-action:hover{ border-color:var(--color-accent); color:var(--color-text); }
.dash-greeting .hint{ margin:0; }

/* Card heads carry a "View all" link; keep it quiet next to the title so
   the card's own content stays the loudest thing in the card. */
/* Per-card domain icon - every dashboard card head gets one via the
   dashCardHead "Icon" param, muted rather than colored per-domain, so the
   cards read as one cohesive set instead of a grab-bag of styles. */
.card-icon{ flex:none; width:24px; height:24px; border-radius:var(--radius-sm); background:var(--color-surface-2); color:var(--color-text-secondary); display:flex; align-items:center; justify-content:center; }
.card-icon svg{ width:14px; height:14px; }
.card-head h3{
  flex:1;
  margin:0;
  min-width:0;
  font-size:0.95rem;
  line-height:1.25;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
/* Edit mode already adds the drag handle and hide button into the header
   (edit-only, see .edit-only below) - stacking the new domain icon and
   "view all" chevron on top of those left four flex:none icons fighting
   a 2-line-wrapped title for space, truncating names like "Shopping
   Lists" down to "S.." right when you need to read them to know which
   card you're hiding or dragging. Hiding both while editing restores the
   original drag-handle+title+hide layout, which always had room. */
body.edit-mode .card-icon, body.edit-mode .card-head .card-link{ display:none; }

/* Trailing chevron on a row that is itself a real navigation link (task,
   book) - rows that are purely informational (an event, a shopping list
   count) get none, so the two no longer look identical and equally
   tappable when only one of them is. */
.row-chevron{ flex:none; display:flex; color:var(--color-text-muted); opacity:.6; }
.row-chevron svg{ width:16px; height:16px; }
/* Compact row - the dense key/value rows in the Household Status card,
   where a full 44px touch row would waste most of the card. Was three
   copies of the same two inline declarations. */
.row-compact{ padding:8px; min-height:auto; }
.row-compact .row-title{ font-size:14px; }

/* Hidden-card tray heading. */
.tray-label{ font-size:13px; font-weight:700; color:var(--color-text-secondary); margin-bottom:var(--space-2); }

/* Small layout utilities.
   Each of these replaced a declaration repeated 4-19 times across the
   templates. Kept deliberately few and named for intent rather than
   value - a full utility system would be a second design language
   competing with the components. One-off inline styles stay inline;
   only the genuinely repeated ones are worth a name. */
.u-contents{ display:contents; }          /* forms that shouldn't create a box */
.u-plain-link{ text-decoration:none; color:inherit; }
.u-flush{ margin-bottom:0; }
.u-stack{ margin-top:var(--space-2); }
.u-section{ margin-top:var(--space-5); }
.u-row-tight{ min-height:auto; padding:10px 12px; }
.u-inline-actions{ display:flex; align-items:center; gap:var(--space-2); margin-bottom:var(--space-4); }

/* Shared page chrome. Dashboard already had .dash-header; every other
   screen was inventing its own title block. Same job, one pair of classes. */
.page-head, .dash-header{ display:flex; align-items:flex-start; gap:var(--space-3); margin-bottom:var(--space-4); padding-bottom:var(--space-4); border-bottom:1px solid var(--color-border); }
.page-head > div, .dash-greeting{ flex:1; min-width:0; }
/* A persona's medallion (Iris, ...) beside its page title: an <img> of the
   static mark, round like the Atlas and Apollo marks. */
.persona-mark{ flex:none; width:48px; height:48px; border-radius:50%; display:block; }
.page-kicker, .dash-kicker, .apollo-eyebrow{
  margin:0 0 6px;
  font-size:var(--font-size-micro);
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--color-text-muted);
}
.page-head h1, .dash-greeting h1{
  margin:0;
  font-size:clamp(1.25rem, 5vw, 1.75rem);
  line-height:1.15;
}
.hstack{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); }
.vstack{ display:flex; flex-direction:column; align-items:stretch; gap:var(--space-2); }
.row.row-stack{ flex-direction:column; align-items:stretch; gap:8px; }
.grow{ flex:1; min-width:0; }
.w-money{ width:110px; }
.admin-index{ display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:var(--space-3); margin:0 0 var(--space-5); }
.admin-tile{ padding:16px; text-decoration:none; color:var(--color-text); min-height:96px; gap:6px; }
.admin-tile:hover{ border-color:var(--color-accent); }
.admin-tile strong{ font-size:15px; }
.admin-tile span{ font-size:var(--font-size-micro); color:var(--color-text-muted); }
/* Admin is five named sections (adminPage.html), each its own page. */
.admin-sections{ display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:var(--space-3); margin:0 0 var(--space-5); }
.admin-section{ flex-direction:row; align-items:center; gap:14px; padding:16px; text-decoration:none; color:var(--color-text); margin:0; }
.admin-section:hover{ border-color:var(--color-accent); }
.admin-section-icon{ flex:none; display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:var(--radius-md); background:var(--color-surface-2); color:var(--color-accent); }
.admin-section-icon svg{ width:20px; height:20px; }
.admin-section-mark{ background:none; border-radius:50%; overflow:hidden; }
.admin-section-mark img{ width:40px; height:40px; display:block; }
.admin-section-body{ flex:1; display:flex; flex-direction:column; gap:3px; min-width:0; }
.admin-section-body strong{ font-size:16px; }
.admin-section-body span{ font-size:13px; color:var(--color-text-muted); line-height:1.35; }
.admin-section-body .badge{ align-self:flex-start; margin-top:4px; }
@media (hover:none){ .kbd-hint{ display:none; } }
.admin-links{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:var(--space-3); margin-bottom:var(--space-4); }
.admin-links .admin-tile{ min-height:0; margin:0; }
/* Integrations: one card per service, with a jump row on top. */
.settings-card{ padding:16px; margin-bottom:var(--space-4); scroll-margin-top:calc(var(--nav-height) + 12px); }
.settings-card-title{ font-size:18px; margin:0 0 6px; }
.settings-card > .hint{ padding:0; margin-bottom:10px; }
.settings-jump{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 var(--space-4); }
.settings-jump a{ padding:6px 12px; border-radius:var(--radius-full); background:var(--color-surface-2); color:var(--color-text-secondary); font-size:13px; font-weight:600; text-decoration:none; }
.settings-jump a:hover{ color:var(--color-accent); }
.graph-canvas{ width:100%; max-width:800px; height:560px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); cursor:pointer; display:block; }
.hidden-block{ display:none; }

.fold{ margin:0 0 var(--space-3); }
.fold > summary{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  padding:0 12px;
  border:1px solid var(--color-border);
  border-radius:var(--radius-full);
  background:var(--color-surface);
  font-size:13px;
  font-weight:600;
  color:var(--color-text);
  list-style:none;
}
.fold > summary::-webkit-details-marker{ display:none; }
.fold[open] > summary{ margin-bottom:var(--space-2); }
.fold > summary::after{ content:"▾"; color:var(--color-text-muted); font-size:11px; }
.fold[open] > summary::after{ content:"▴"; }
.fold .apollo-presets{ margin:0 0 12px; }

/* A progress bar: the filled share is the span's width. */
.meter{ height:8px; border-radius:var(--radius-full); background:var(--color-surface-2); overflow:hidden; }
.meter > span{ display:block; height:100%; min-width:4px; background:var(--color-done); border-radius:inherit; }
.badge-done{ background:color-mix(in oklch, var(--color-done) 18%, var(--color-surface)); color:var(--color-done); }

/* Getting started (/start): stages of checkable steps. */
.start-summary{ padding:var(--space-4); gap:var(--space-2); }
.start-summary-head{ display:flex; justify-content:space-between; align-items:baseline; }
.start-summary .btn{ align-self:flex-start; }
.start-next{ margin:var(--space-1) 0 0; }
.start-stage{ margin:var(--space-4) 0 0; }
.start-stage > summary{ display:flex; align-items:center; gap:var(--space-2); cursor:pointer; list-style:none; padding:var(--space-2) 0; font-size:17px; font-weight:700; }
.start-stage > summary::-webkit-details-marker{ display:none; }
.start-stage-name{ flex:1; min-width:0; }
.start-stage[open] > summary{ margin-bottom:var(--space-2); }
.start-step{ align-items:flex-start; }
.start-step .row-title{ white-space:normal; }
.start-step .row-meta{ display:block; }
.start-step > form > .btn{ white-space:nowrap; }
.row.is-skipped{ opacity:.6; }
.row.is-skipped .row-title{ color:var(--color-text-muted); }
.start-banner-body{ flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
/* Create: a list's "+ New …" button, its form opening under it in a
   card. One pattern for every list, so a phone opens on the list and
   not on an empty form; it sits above the list, beside Filters. */
.create{ margin:0 0 var(--space-3); }
.create > summary{ list-style:none; }
.create > summary::-webkit-details-marker{ display:none; }
.create-body{ margin-top:var(--space-2); padding:16px; }
.create-body > :last-child{ margin-bottom:0; }
/* A list's tools in one row: Filters, then + New. One that's open takes
   the full width, so its panel isn't squeezed beside the other button. */
.list-tools{ display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; margin-bottom:var(--space-3); }
.list-tools > details{ margin:0; }
.list-tools > details[open]{ flex-basis:100%; }
.row .list-tools{ margin:0; }
/* A row's rarely used controls, folded behind a ⋯ so the row stays one line; open, they take their own line. */
.row:has(> .row-more[open]){ flex-wrap:wrap; }
.row-more > summary{ list-style:none; }
.row-more > summary::-webkit-details-marker{ display:none; }
.row-more[open]{ flex-basis:100%; display:flex; justify-content:flex-end; gap:8px; align-items:center; }
.row-more-body{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.row-edit > summary{ list-style:none; }
.row-edit > summary::-webkit-details-marker{ display:none; }
.row-edit > form{ margin-top:8px; }

.isbn-scan{ margin:12px 0 16px; padding:16px; }
.isbn-scan-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
.isbn-scan-head .page-kicker{ margin:0; }
.isbn-scan-video{
  width:100%;
  max-height:280px;
  object-fit:cover;
  border-radius:var(--radius-md);
  background:#111;
  margin:0 0 12px;
}
.isbn-scan-manual{ display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; margin:0 0 12px; }
.isbn-scan-manual .field{ flex:1; min-width:160px; margin:0; }
.isbn-scan-ask{ margin:12px 0; }
.isbn-scan-ask p{ margin:0 0 12px; }
.isbn-scan-cover{
  width:48px;
  height:72px;
  object-fit:cover;
  border-radius:var(--radius-sm);
  background:var(--color-surface-2);
  flex:none;
}
.isbn-scan-hit{ align-items:flex-start; gap:12px; }
.isbn-scan-hit .input{ margin:0 0 6px; }





/* "View all" is a chevron, not a text link - a card is only ~150px wide
   in the dashboard's 2-column grid, and "View all" as a word next to an
   icon and a title left no room for the title at all (three-letter
   truncation like "Sh..." for Shopping Lists was worse than the crowding
   it was meant to fix). A chevron reads as "there's more" without eating
   the header's only spare pixels either way. */
.card-head .card-link{ flex:none; display:flex; align-items:center; color:var(--color-text-muted); }
.card-head .card-link svg{ width:18px; height:18px; }
.card-head .card-link:hover{ color:var(--color-accent); }
@media (min-width:480px){ #dashStack{ grid-template-columns:1fr 1fr; } }

.sidebar-only{ display:none; }

/* Feedback for every click. Alon: "I don't know that a push was received"
   - without it a slow-feeling request gets clicked twice. htmx toggles
   .htmx-request on the element making the call. */
.page-progress{ position:fixed; top:0; left:0; right:0; height:3px; z-index:100; opacity:0; transition:opacity .15s; pointer-events:none; }
.page-progress.htmx-request{ opacity:1; }
.page-progress-bar{ height:100%; width:100%; background:var(--color-accent); transform-origin:left; animation:progress-slide 1.2s ease-in-out infinite; }
@keyframes progress-slide{ 0%{ transform:scaleX(0); } 50%{ transform:scaleX(.7); } 100%{ transform:scaleX(1); opacity:.3; } }

.btn:active{ transform:translateY(1px) scale(.97); }
.btn.htmx-request{ opacity:.65; pointer-events:none; position:relative; }
.btn.htmx-request::after{
  content:""; position:absolute; inset:0; margin:auto;
  width:14px; height:14px; border-radius:50%;
  border:2px solid currentColor; border-right-color:transparent;
  animation:spin .6s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.row-check:active{ transform:scale(.9); }
form.htmx-request .btn{ opacity:.65; }
/* Action bars wrap instead of squeezing buttons into a narrow column -
   the recipe page's buttons were stacking on top of each other. */
.actionbar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.actionbar form{ display:contents; }
.scalebar{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:4px; }
@media print{
  .no-print, .topbar, .tabbar{ display:none !important; }
  .container{ max-width:none; margin:0; padding:0; }
  body{ padding:0; background:#fff; color:#000; }
}
.topbar-search{ flex:1; max-width:280px; margin-left:auto; }
.topbar-search .input{ height:34px; margin:0; font-size:13px; }

/* Desktop layout: the app is phone-first (that's where it's mostly used),
   but a desktop window shouldn't be a phone-width column with a phone's
   bottom tab bar. Past 900px the same .tabbar markup becomes a left
   sidebar - CSS only, no separate desktop nav template to keep in sync -
   and the content column widens and shifts clear of it. */
@media (min-width:900px){
  body{ padding-bottom:0; }
  .tabbar{
    top:var(--nav-height); bottom:0; right:auto;
    width:var(--sidebar-width); height:auto;
    flex-direction:column; justify-content:flex-start;
    align-items:stretch; gap:2px; padding:12px 8px;
    border-top:none; border-right:1px solid var(--color-border);
    box-shadow:none;
  }
  .tabbar-item{
    flex:none; flex-direction:row; justify-content:flex-start;
    gap:10px; padding:8px 12px; font-size:14px; min-height:0;
    border-radius:var(--radius-md);
  }
  .tabbar-item:hover{ background:var(--color-surface-2); }
  .tabbar-item.is-active{ background:var(--color-surface-2); }
  .tabbar-item.is-hub-active:not(.is-active){ color:var(--color-text-muted); font-weight:500; }
  .sidebar-only{ display:flex; }
  .tabbar{ overflow-y:auto; }
  /* Below your Quick links, every page in All's groups, folded; the
     group holding this page starts open. */
  .sidebar-group.sidebar-only{ display:block; margin-top:6px; }
  .sidebar-group summary{ list-style:none; cursor:pointer; padding:8px 12px 4px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--color-text-muted); }
  .sidebar-group summary::-webkit-details-marker{ display:none; }
  .sidebar-group summary::after{ content:"+"; float:right; font-size:13px; }
  .sidebar-group[open] summary::after{ content:"\2212"; }
  .sidebar-group .tabbar-item{ padding:7px 12px; font-size:13.5px; }
  .sidebar-group .tabbar-item svg{ width:17px; height:17px; }
  /* Every item is visible in the sidebar, so "All" belongs at the end
     rather than stranded mid-list where the phone's 5-slot cut put it. */
  .more-item{ order:99; margin-top:auto; }
  /* The old rule set margin-left only, so the `margin-right:auto` from
     the base `margin:0 auto` survived - the container stuck to the left
     at 1100px wide and every pixel past that piled up on the right. On a
     1920px display that left ~600px of dead space, about 30% of the
     screen. The top bar is a direct child of <body> and is NOT fixed, so
     offsetting the body would have indented it too and opened a gap above
     the sidebar - the offset belongs on .container alone. */
  .container{
    max-width:1280px;
    /* Clear the sidebar on narrower desktops, but centre once the window
       is wide enough that the content no longer needs to hug it. Whichever
       is larger wins: the sidebar offset, or a true centring margin. */
    margin-left:max(calc(var(--sidebar-width) + 32px), calc((100% - 1280px) / 2));
    margin-right:auto;
    padding:24px 32px;
  }
  #dashStack{ grid-template-columns:1fr 1fr 1fr; }
  .cardgrid{ grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); }
}
[data-card].is-hidden{ display:none; }
.edit-only{ display:none; }
body.edit-mode .edit-only{ display:flex; }
body.edit-mode [data-reorder-key] [draggable="true"]{ cursor:grab; }

/* Small button - a real size step, not the same button shrunk to nothing:
   tighter padding/radius so it reads as secondary/inline (row actions,
   dashboard card edit forms) rather than a squashed primary button. Was
   applied 31 times with no definition at all before this pass. */
.btn-sm{ min-height:32px; padding:0 12px; font-size:13px; gap:6px; border-radius:var(--radius-sm); }
.btn-sm svg{ width:15px; height:15px; }

/* Markdown-rendered prose: recipe steps, report descriptions, note bodies.
   Named .prose rather than .recipe-steps because reports use it too - the
   old name described the first caller, not the thing. Longest-form
   reading surface in the app, so it earns its own rhythm rather than
   reusing body p/h styles as-is. */
.prose{ line-height:1.65; font-size:15.5px; color:var(--color-text-secondary); }
.prose > :first-child{ margin-top:0; }
.prose > :last-child{ margin-bottom:0; }
.prose p{ margin:0 0 14px; }
.prose strong{ color:var(--color-text); font-weight:700; }
.prose ul, .prose ol{ margin:0 0 14px; padding-left:24px; }
.prose li{ margin:5px 0; }
.prose li::marker{ color:var(--color-text-muted); }
.prose li.task-list-item{ list-style:none; margin-left:-8px; }
.prose .task-check{ display:inline; margin:0 6px 0 0; }
.prose .task-check-btn{
	display:inline-flex; align-items:center; justify-content:center;
	width:22px; height:22px; padding:0; border:1px solid var(--color-border);
	border-radius:4px; background:var(--color-surface); color:var(--color-text);
	font-size:14px; line-height:1; cursor:pointer;
}
.prose .task-check-btn[aria-pressed="true"]{ background:var(--color-surface-2); }
.prose h1, .prose h2, .prose h3{ margin:26px 0 10px; color:var(--color-text); }
.prose h1:first-child, .prose h2:first-child, .prose h3:first-child{ margin-top:0; }
.prose code{ background:var(--color-surface-2); color:var(--color-text); padding:2px 6px; border-radius:5px; font-size:0.88em; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.prose pre{ background:var(--color-surface-2); padding:14px 16px; border-radius:var(--radius-md); overflow-x:auto; border:1px solid var(--color-border); }
.prose pre code{ background:none; padding:0; }
.prose blockquote{ margin:0 0 14px; padding:4px 16px; border-left:3px solid var(--color-accent); color:var(--color-text-secondary); background:color-mix(in oklch, var(--color-accent) 6%, transparent); border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.prose del, .prose s{ text-decoration:line-through; }
.prose em{ font-style:italic; }
.prose img{ max-width:100%; height:auto; border-radius:var(--radius-md); margin:4px 0 14px; }
.prose hr{ border:none; border-top:1px solid var(--color-border); margin:22px 0; }
.prose table{ width:100%; border-collapse:collapse; margin:0 0 14px; font-size:14.5px; }
.prose th{ text-align:left; padding:8px 10px; border-bottom:2px solid var(--color-border); color:var(--color-text-secondary); font-weight:600; font-size:12.5px; text-transform:uppercase; letter-spacing:0.03em; }
.prose td{ text-align:left; padding:8px 10px; border-bottom:1px solid var(--color-border); }
.prose tr:last-child td{ border-bottom:none; }

/* Reply to highlighted text (noteSections): a button by the selection,
   then a dialog with the quote, a reply and an optional photo. */
.note-reply-btn{ position:fixed; z-index:20; box-shadow:var(--shadow-md); }
.note-reply-btn[hidden]{ display:none; }
.note-reply-btn svg{ width:15px; height:15px; }
.note-reply{
  width:min(32rem, calc(100vw - 32px)); padding:var(--space-5); border:1px solid var(--color-border);
  border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text); box-shadow:var(--shadow-lg);
}
.note-reply::backdrop{ background:oklch(0% 0 0 / 0.35); }
.note-reply h2{ font-size:var(--font-size-h3); margin:0; }
.note-reply form{ display:flex; flex-direction:column; gap:var(--space-3); }
.note-reply-quote{
  margin:0; padding:4px 12px; border-left:3px solid var(--color-accent); color:var(--color-text-secondary);
  max-height:8em; overflow:auto; white-space:pre-line; font-size:var(--font-size-small);
}
.note-reply textarea{ width:100%; min-height:4.5em; }
.note-reply-file{ font-size:13px; color:var(--color-text-muted); }
.apollo-complete{ position:relative; }
.apollo-complete-list{
  position:absolute; z-index:6; left:0; right:0; top:calc(100% - 28px);
  background:var(--color-surface); border:1px solid var(--color-border);
  border-radius:var(--radius-md); max-height:240px; overflow:auto;
  box-shadow:0 8px 24px color-mix(in oklch, var(--color-text) 12%, transparent);
}
.apollo-complete-list button{
  display:block; width:100%; text-align:left; padding:8px 12px;
  background:none; border:none; color:var(--color-text); font:inherit; cursor:pointer;
}
.apollo-complete-list button[aria-selected="true"],
.apollo-complete-list button:hover{ background:var(--color-surface-2); }

/* Inline select - a control that sits in a row alongside other actions
   rather than owning a full-width form field. */
.select-inline{ width:auto; min-width:120px; min-height:32px; padding:0 28px 0 10px; font-size:13px; }

/* Row actions - the controls on the right-hand side of a list row. */
.row-actions{ display:flex; gap:6px; align-items:center; }

/* Label that exists for screen readers only. Used where a control's
   purpose is obvious visually from its row but has no visible label of
   its own - hiding it with display:none would remove it from the
   accessibility tree too, which is the opposite of the intent. */
.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;
}

/* Filter bar - the search/status/effort/sort row above a list.
   Was four flex children with `flex:1 1 120px` and a wrapped Clear link,
   which on a 375px phone produced uneven half-width fields and a button
   stranded on its own line. A grid instead: one column on a phone, two on
   a large phone, everything in a row once there's desk-width for it. */
.filterbar{
  display:grid; grid-template-columns:1fr; gap:10px;
  padding:12px; margin-bottom:16px;
}
.filterbar .select, .pillbar .select{ max-width:180px; margin:0; }
.filterbar .btn{ width:100%; }
.filterbar .field{ margin:0; } /* the grid's gap spaces them; a margin pushed Clear below the selects */
@media (min-width:560px){
  .filterbar{ grid-template-columns:1fr 1fr; }
  .filterbar-search{ grid-column:1 / -1; }
}
/* A bar of short choices only (no search): two to a row on a phone,
   each as wide as its half, instead of a column of 180px selects. */
@media (max-width:899px){
  .filterbar-pairs{ grid-template-columns:1fr 1fr; align-items:end; }
  .filterbar-pairs .select{ max-width:none; }
}
@media (min-width:900px){
  .filterbar{ grid-template-columns:2fr 1fr 1fr 1.2fr auto; align-items:end; }
  .filterbar-search{ grid-column:auto; }
  .filterbar .btn{ width:auto; }
  .filterbar-pairs{ grid-template-columns:repeat(3, minmax(0, 220px)) auto; justify-content:start; }
}

/* The condition-row builder: shrug conditions and relationship-graph
   filters both use this same visual/interaction pattern (field + operator
   + value, addable/removable rows), kept visually adjacent to .filterbar
   above so the two read as one system. */
.cond-rows{ display:grid; gap:8px; margin-bottom:8px; }
.cond-row{ display:grid; grid-template-columns:1fr auto; gap:6px; align-items:center; }
.cond-row .select, .cond-row .input{ margin-bottom:0; }
@media (min-width:560px){
  /* The operator column (is / is not / contains / at least...) is a
     one-word choice - auto sizes it to its own content instead of a
     stretchy fraction of whatever's left, which on a wide desktop layout
     turned "is" into a field wide enough for a sentence. */
  .cond-row{ grid-template-columns:1.2fr auto 1.4fr auto; }
}

/* Scheduled tasks/events: still visible, greyed, excused from overdue nagging. */
.scheduled{ opacity:0.55; filter:grayscale(0.35); }
.chip{ font-size:11px; font-weight:700; padding:2px 8px; border-radius:var(--radius-full); background:var(--color-surface-2); color:var(--color-text-secondary); display:inline-block; white-space:nowrap; }
.chip-sched{ background:var(--color-surface-2); color:var(--color-text-muted); }
.banner-ask{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; padding:8px 10px; border-radius:var(--radius-sm); background:color-mix(in oklch, var(--color-accent) 12%, var(--color-surface)); font-size:13px; font-weight:600; }
.is-subtask{ margin-left:22px; min-height:48px; }
.taskboard{ display:flex; gap:10px; overflow-x:auto; padding-bottom:8px; margin-bottom:16px; }
.taskboard-col{ flex:1 0 160px; min-width:160px; background:var(--color-surface-2); border-radius:var(--radius-md); padding:10px; }
.taskboard-col h3{ font-size:13px; color:var(--color-text-muted); text-transform:uppercase; letter-spacing:0.04em; }
/* Kanban reuses .taskboard/.taskboard-col for the horizontal-scroll
   column layout - only the drag state and a wider desktop column are
   Kanban-specific (a "strategy meeting" board should use the room on a
   big screen, not stay phone-width). */
.kanban-card{ cursor:grab; }
.kanban-card.is-dragging{ opacity:0.45; }
.kanban-col.is-dragover{ box-shadow:0 0 0 2px var(--color-accent), var(--shadow-md); }
@media (min-width:900px){ .kanban-col{ flex-basis:260px; } }
/* Gantt: horizontal-bar timeline, positions computed in Go (buildTaskGantt)
   and set via inline left/width % - no charting library, just divs. */
.gantt{ overflow-x:auto; }
.gantt-axis{ position:relative; height:20px; margin-bottom:6px; font-size:11px; color:var(--color-text-muted); min-width:480px; }
.gantt-tick{ position:absolute; top:0; transform:translateX(-50%); white-space:nowrap; }
.gantt-body{ position:relative; min-width:480px; }
.gantt-today{ position:absolute; top:0; bottom:0; width:2px; background:var(--color-accent); z-index:1; }
.gantt-group{ margin-bottom:14px; }
.gantt-group h3{ font-size:13px; color:var(--color-text-muted); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:6px; }
.gantt-row{ position:relative; height:28px; }
.gantt-bar{ position:absolute; top:2px; height:24px; line-height:24px; padding:0 8px; background:var(--color-accent); color:var(--color-accent-contrast); border-radius:var(--radius-sm); font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; }
.gantt-bar.is-done{ opacity:0.5; text-decoration:line-through; }
.gantt-bar.is-overdue{ background:var(--color-danger); }
.calday-allday{ background:var(--color-surface); border-radius:var(--radius-md); padding:10px; margin-bottom:10px; display:flex; flex-direction:column; gap:6px; }
.caldaygrid{ display:flex; flex-direction:column; gap:2px; }
.calday-slot{ display:grid; grid-template-columns:64px 1fr; gap:8px; align-items:start; }
.calday-hour{ font-size:12px; font-weight:600; color:var(--color-text-muted); padding-top:8px; }
.calday-slotbody{ min-height:36px; }
.calday-slotempty{ display:block; border:1px dashed var(--color-border); border-radius:var(--radius-sm); padding:8px; color:var(--color-text-muted); font-size:12px; text-decoration:none; }
.calday-slotempty:hover{ background:var(--color-surface-2); }
.seg{ overflow-x:auto; }

/* Meal-plan week grid: days × slots, first-dow from household settings. */
.mealweek-nav{ display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:12px; }
.mealweek-title{ margin:0; font-size:16px; }
.mealweekgrid{ display:grid; grid-template-columns:minmax(64px,0.6fr) repeat(7,minmax(0,1fr)); gap:4px; margin-bottom:16px; }
.mealweek-corner{ min-height:36px; }
.mealweek-dayhead{ display:flex; flex-direction:column; align-items:center; gap:2px; padding:4px 0; }
.mealweek-weekday{ font-size:10.5px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; }
.mealweek-daynum{ font-size:15px; font-weight:700; width:26px; height:26px; line-height:26px; text-align:center; border-radius:50%; }
.mealweek-dayhead.is-today .mealweek-daynum{ background:var(--color-accent); color:var(--color-accent-contrast); }
.mealweek-slotlabel{ font-size:11px; font-weight:700; color:var(--color-text-muted); padding-top:8px; }
.mealweek-cell{ background:var(--color-surface); border-radius:var(--radius-sm); padding:6px; min-height:72px; min-width:0; display:flex; flex-direction:column; gap:4px; }
.mealweek-cell.is-shabbat{ background:color-mix(in oklch, var(--color-meal) 10%, var(--color-surface)); }
.mealweek-entry{ display:flex; flex-direction:column; align-items:stretch; gap:2px; background:var(--color-surface-2); border-radius:var(--radius-sm); padding:5px 6px; min-width:0; }
/* The title gets its own line and wraps rather than sharing a row with
   the chip and two icon buttons, which left it ~10px ("Q..."). */
.mealweek-entry-title{ font-size:12px; font-weight:600; line-height:1.3; overflow-wrap:break-word; hyphens:auto; }
.mealweek-entry-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:2px 4px; }
.mealweek-entry-meta .btn-icon{ width:28px; height:28px; min-height:28px; }
.mealweek-entry-meta .btn-icon svg{ width:15px; height:15px; }
.mealweek-shabbat{ font-size:12px; font-weight:700; color:var(--color-meal); }
.mealweek-add summary{ cursor:pointer; font-size:16px; font-weight:700; color:var(--color-text-muted); list-style:none; }
.mealweek-add summary::-webkit-details-marker{ display:none; }
.mealweek-add .select,.mealweek-add .input{ min-height:36px; font-size:13px; margin-bottom:4px; }
.mealweek-entry.audience-kids{ box-shadow:inset 3px 0 0 var(--color-birthday); }
.mealweek-entry.audience-grown-up{ box-shadow:inset 3px 0 0 var(--color-accent); }

/* Phone: the week as a day-by-day list (see mealplanweek.html). */
.mealdays{ display:none; }
@media (max-width:719px){
  .mealweekgrid{ display:none; }
  .mealdays{ display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
}
.mealday{ display:grid; grid-template-columns:48px minmax(0,1fr); gap:10px; align-items:start; background:var(--color-surface); border-radius:var(--radius-md); padding:10px 12px; }
.mealday-date{ display:flex; flex-direction:column; align-items:center; gap:2px; padding-top:2px; }
.mealday-weekday{ font-size:10.5px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; }
.mealday-daynum{ font-size:16px; font-weight:700; width:30px; height:30px; line-height:30px; text-align:center; border-radius:50%; }
.mealday.is-today .mealday-daynum{ background:var(--color-accent); color:var(--color-accent-contrast); }
.mealday-body{ display:flex; flex-direction:column; gap:8px; min-width:0; }
.mealday-slot{ display:flex; flex-direction:column; gap:4px; }
.mealday-slot.is-shabbat{ background:color-mix(in oklch, var(--color-meal) 10%, var(--color-surface)); border-radius:var(--radius-sm); padding:6px; }
.mealday-slotlabel{ font-size:11px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; letter-spacing:0.03em; }
.mealday .mealweek-entry{ flex-direction:row; align-items:center; justify-content:space-between; gap:8px; padding:6px 8px; }
.mealday .mealweek-entry-title{ font-size:14px; }
.mealday .mealweek-entry-meta{ flex:none; }
.mealday-free{ font-size:13px; color:var(--color-text-muted); }
.mealday-add summary{ cursor:pointer; font-size:14px; font-weight:600; color:var(--color-accent); list-style:none; }
.mealday-add summary::-webkit-details-marker{ display:none; }
.mealday-add form{ display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.mealday-add .select, .mealday-add .input{ margin:0; }

.mealplancart{ background:var(--color-surface); border-radius:var(--radius-md); padding:12px; margin-bottom:16px; box-shadow:var(--shadow-sm); }
.mealplancart-exits{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }

/* Shopping continuum: ordered is in-flight, not the same as have/done. */
.row.is-ordered{ box-shadow:inset 3px 0 0 var(--color-accent); }
.row.is-ordered .row-check{ border-color:var(--color-accent); background:color-mix(in oklch, var(--color-accent) 16%, var(--color-surface)); }
.row.is-ordered .row-title{ font-style:italic; }
.chip-ordered{ background:color-mix(in oklch, var(--color-accent) 16%, var(--color-surface)); color:var(--color-accent); }

/* Apollo Library sits in the same Atlas skin as Tasks/Admin. No second palette. */
.apollo-page{ padding:0 0 24px; }
.apollo-header{ display:flex; align-items:center; gap:12px; padding-bottom:16px; border-bottom:1px solid var(--color-border); margin-bottom:20px; }
.apollo-wordmark{ display:inline-flex; align-items:center; gap:10px; color:var(--color-text)!important; font-family:var(--font-display); font-size:1.5rem; font-weight:600; letter-spacing:-.025em; }
.apollo-library-mark{ display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:var(--color-brand-globe); overflow:hidden; }
.apollo-library-mark img{ width:28px; height:28px; object-fit:cover; display:block; }
.apollo-header-context{ margin-left:auto; color:var(--color-text-muted); font-size:var(--font-size-micro); letter-spacing:.06em; text-transform:uppercase; }
.apollo-hero{ max-width:760px; margin-bottom:20px; }
.apollo-hero.page-head{ flex-direction:column; align-items:stretch; border-bottom:none; padding-bottom:0; }
.apollo-lede{ color:var(--color-text-secondary); max-width:58ch; }
.apollo-search{ display:flex; gap:8px; margin-top:16px; }
.apollo-search .input{ flex:1; margin:0; }
.apollo-sections{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 24px; padding-bottom:14px; border-bottom:1px solid var(--color-border); }
.apollo-sections a{ padding:6px 12px; border:1px solid var(--color-border); border-radius:var(--radius-full); font-size:var(--font-size-small); color:var(--color-text-secondary); background:var(--color-surface); }
.apollo-sections a.is-active{ background:var(--color-accent); border-color:var(--color-accent); color:var(--color-accent-contrast); }
.apollo-sections-internal{ align-items:center; margin-top:-12px; }
.apollo-sections-internal a{ border-style:dashed; }
.apollo-sections-label{ font-size:12px; font-weight:600; color:var(--color-text-muted); margin-right:4px; }
.apollo-presets{ display:flex; flex-wrap:wrap; gap:8px; margin:-12px 0 20px; }
.apollo-presets a{ font-size:var(--font-size-small); color:var(--color-text-secondary); padding:6px 0; }
.apollo-presets a.is-active{ color:var(--color-accent); font-weight:650; }
.apollo-filters{ margin-bottom:20px; }
.apollo-results-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; }
.apollo-results-head h2{ margin:0; font-size:var(--font-size-h2); }
.apollo-result-count{ color:var(--color-text-muted); font-size:var(--font-size-small); }
.apollo-section{ margin-bottom:20px; }
.apollo-section h3{ color:var(--color-text-muted); font-family:var(--font-sans); font-size:var(--font-size-micro); letter-spacing:.08em; text-transform:uppercase; }
.apollo-note-list{ list-style:none; margin:0; padding:0; border-top:1px solid var(--color-border); }
.apollo-note-list li{ border-bottom:1px solid var(--color-border); }
.apollo-note-list li > a{ display:flex; align-items:center; gap:12px; min-height:56px; padding:10px 4px; color:var(--color-text); }
.apollo-note-list li > a:hover{ color:var(--color-accent); }
.apollo-note-tags{ display:flex; flex-wrap:wrap; gap:6px; padding:0 4px 10px; }
.apollo-note-title{ flex:1; font-weight:600; }
/* Title over its summary, arrow on the right: a narrow phone column never
   squeezes the title into a word per line. */
.apollo-note-list li > a{ display:grid; grid-template-columns:1fr auto; column-gap:12px; row-gap:2px; }
.apollo-note-list li > a > *{ grid-column:1; }
.apollo-note-list li > a > .apollo-note-arrow{ grid-column:2; grid-row:1 / span 2; }
.apollo-note-meta:empty{ display:none; }
/* A rule's name wraps rather than hiding its second half. */
.shrug-row .row-title{ white-space:normal; }
.apollo-note-meta{ color:var(--color-text-muted); font-size:var(--font-size-small); }
.apollo-note-arrow{ color:var(--color-text-muted); font-size:18px; }
.apollo-empty{ padding:24px 0; border-top:1px solid var(--color-border); }
.apollo-empty p,.apollo-notice{ color:var(--color-text-secondary); }
.apollo-notice{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:-8px 0 16px; font-size:var(--font-size-small); }
.apollo-support summary{ cursor:pointer; color:var(--color-accent); font-size:var(--font-size-small); font-weight:650; }
.apollo-support{ margin-top:16px; padding-top:14px; border-top:1px solid var(--color-border); }
.apollo-backlink{ display:inline-flex; margin-bottom:16px; color:var(--color-accent)!important; font-size:var(--font-size-small); font-weight:650; }
.apollo-article,.apollo-editor{ max-width:760px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); padding:24px clamp(16px,4vw,32px) 28px; }
.apollo-read{ display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,340px); gap:24px; align-items:start; }
.apollo-read .apollo-article,.apollo-read .apollo-editor{ max-width:none; }
.apollo-prose{ font-size:1.0625rem; line-height:1.75; color:var(--color-text); max-width:66ch; }
.apollo-prose p{ margin:0 0 1.05em; color:var(--color-text); }
.apollo-prose h1,.apollo-prose h2,.apollo-prose h3{ font-family:var(--font-display); }
.apollo-graph-pane{ position:sticky; top:12px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); padding:14px 14px 16px; }
.apollo-graph-pane h2{ font-size:var(--font-size-h3); margin:0 0 4px; }
.apollo-neighbor-card.is-self{ border-color:var(--color-accent); background:color-mix(in oklch, var(--color-accent) 8%, var(--color-bg)); }
.apollo-neighbor-cards{ list-style:none; margin:14px 0 0; padding:0; display:grid; gap:8px; }
.apollo-neighbor-card{ display:flex; flex-direction:column; gap:2px; padding:10px 12px; border:1px solid var(--color-border); border-radius:var(--radius-sm); background:var(--color-bg); color:var(--color-text)!important; }
.apollo-neighbor-card:hover{ border-color:var(--color-accent); }
.apollo-neighbor-card.is-plain{ pointer-events:none; }
.apollo-neighbor-kind,.apollo-neighbor-rel{ color:var(--color-text-muted); font-size:var(--font-size-micro); letter-spacing:.04em; text-transform:uppercase; }
.apollo-neighbor-title{ font-weight:650; }
@media (max-width:860px){ .apollo-read{ grid-template-columns:1fr; } .apollo-graph-pane{ position:static; } }
.apollo-article-header{ margin-bottom:20px; }
.apollo-article .prose{ color:var(--color-text); max-width:68ch; }
.apollo-article .prose a{ color:var(--color-accent); }
.apollo-editor{ max-width:840px; }
.apollo-note-editor{ min-height:360px; height:auto; padding:0; font-family:ui-monospace,monospace; font-size:13px; overflow:auto; }
.apollo-note-body{ min-height:360px; width:100%; font-family:ui-monospace,monospace; font-size:13px; line-height:1.45; background:var(--color-surface); color:var(--color-text); border:1px solid var(--color-border); border-radius:var(--radius-sm); padding:12px; }
@media (max-width:520px){ .apollo-header-context{ display:none; } .apollo-search{ flex-direction:column; } .apollo-search .btn{ width:100%; } .apollo-results-head{ display:block; } .apollo-result-count{ display:block; margin-top:4px; } }

/* Let's hang. */
.hang-form{ padding:16px; gap:4px; margin-bottom:var(--space-4); }
.hang-form-title{ font-size:18px; margin:0 0 8px; }
.hang-who{ display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:8px; }
.hang-kinds{ display:flex; flex-wrap:wrap; gap:6px; }
.hang-kind input{ position:absolute; opacity:0; pointer-events:none; }
.hang-kind span{ display:inline-block; padding:8px 14px; border:1px solid var(--color-border); border-radius:var(--radius-full); font-size:14px; font-weight:600; color:var(--color-text-secondary); background:var(--color-surface); cursor:pointer; }
.hang-kind input:checked + span{ background:var(--color-accent); border-color:var(--color-accent); color:var(--color-accent-contrast); }
.hang-kind input:focus-visible + span{ outline:2px solid var(--color-accent); outline-offset:2px; }
.hang-slots{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:6px; }
.hang-slots .input{ margin:0; }
.hang-link{ flex-direction:row; align-items:center; gap:8px; padding:10px; margin-bottom:8px; }
.hang-link .input{ flex:1; margin:0; }
.hang-notice{ padding:12px 14px; margin-bottom:14px; border-radius:var(--radius-md); background:var(--color-surface-2); border:1px solid var(--color-border); }
.hang-notice p{ margin:2px 0 0; color:var(--color-text-secondary); font-size:14px; }
.hang-notice.is-danger{ border-color:color-mix(in oklch, var(--color-danger) 40%, var(--color-border)); background:color-mix(in oklch, var(--color-danger) 8%, var(--color-surface)); }
.hang-notice.is-danger strong{ color:var(--color-danger); }
/* A guest's other answer: the times only while suggesting times. */
.hang-reply:has(input[name=reply][value=counter]:not(:checked)) .hang-reply-times{ display:none; }
@media (max-width:519px){ .hang-who{ grid-template-columns:1fr; } }

/* Command-K palette (layout.html). */
.palette{ position:fixed; inset:0; z-index:200; display:flex; justify-content:center; align-items:flex-start; padding:12vh 16px 16px; }
.palette[hidden]{ display:none; }
.palette-backdrop{ position:absolute; inset:0; background:oklch(0% 0 0 / 0.4); }
.palette-panel{ position:relative; width:min(560px, 100%); max-height:min(70vh, 560px); display:flex; flex-direction:column; background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-lg); box-shadow:0 24px 60px rgb(0 0 0 / .25); overflow:hidden; }
.palette-input-row{ display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--color-border); color:var(--color-text-muted); }
.palette-input-row svg{ width:18px; height:18px; flex:none; }
.palette-input{ flex:1; min-width:0; border:none; outline:none; background:transparent; font:inherit; font-size:16px; color:var(--color-text); }
.palette-list{ list-style:none; margin:0; padding:6px; overflow-y:auto; }
.palette-group{ padding:8px 10px 4px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--color-text-muted); }
.palette-item{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:9px 10px; border-radius:var(--radius-sm); cursor:pointer; }
.palette-item.is-active{ background:var(--color-surface-2); }
.palette-label{ font-size:14.5px; font-weight:600; color:var(--color-text); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.palette-hint{ flex:none; max-width:45%; font-size:12.5px; color:var(--color-text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.palette-close{ flex:none; font:inherit; font-size:12px; font-weight:600; padding:2px 8px; border:1px solid var(--color-border); border-bottom-width:2px; border-radius:5px; background:var(--color-surface); color:var(--color-text-secondary); cursor:pointer; }
.palette-answer{ border-top:1px solid var(--color-border); padding:10px; overflow-y:auto; max-height:45vh; font-size:14px; color:var(--color-text); }
.palette-answer[hidden]{ display:none; }
.palette-answer > .card{ margin:0; }
/* Quick capture's answer: what Themis filed and its Undo, or her question. */
.capture-result{ padding:12px 14px; }
.capture-result .page-kicker{ margin:0 0 2px; }
.capture-line{ margin:0; font-size:15px; overflow-wrap:anywhere; }
.capture-result .hint{ padding:0; }
.capture-detail{ margin:4px 0 0; }
.capture-ask-label{ margin:10px 0 0; }
.capture-ask-label + .capture-choices{ margin-top:6px; }
.capture-choices{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.capture-choices form{ margin:0; }
html.palette-open{ overflow:hidden; }
@media (max-width:519px){ .palette{ padding-top:8px; } .palette-panel{ max-height:calc(100vh - 16px); } .palette-hint{ display:none; } }

/* Near-duplicate recipes on /recipes. */
.similar-recipes{ padding:16px; margin-bottom:var(--space-4); border-color:color-mix(in oklch, var(--color-accent) 35%, var(--color-border)); }
.similar-title{ font-size:17px; margin:0 0 2px; }
.similar-recipes > .hint{ padding:0; margin:0; }
.similar-pair{ display:flex; flex-direction:column; gap:8px; padding:12px 0 0; margin-top:12px; border-top:1px solid var(--color-border); }
.similar-options{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; }
.similar-option{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:10px 12px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface-2); }
.similar-name{ font-weight:700; }
.similar-pair > form .btn{ align-self:flex-start; }

/* Plan my week: the week's calendar, menu and tasks, one row per day. */
.planweek-nav{ display:flex; align-items:center; justify-content:center; gap:12px; margin:4px 0 10px; }
.planweek-label{ display:flex; flex-direction:column; align-items:center; font-size:16px; }
.planweek-summary{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-bottom:14px; }
.planweek-summary .chip{ text-decoration:none; }
.chip-nudge{ background:color-mix(in oklch, var(--color-accent) 14%, var(--color-surface)); color:var(--color-accent); font-weight:700; }
.planweek-days{ display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.planweek-day{ display:grid; grid-template-columns:48px minmax(0,1fr); gap:10px; align-items:start; background:var(--color-surface); border-radius:var(--radius-md); padding:10px 12px; }
.planweek-date{ display:flex; flex-direction:column; align-items:center; gap:2px; padding-top:2px; }
.planweek-weekday{ font-size:10.5px; font-weight:700; color:var(--color-text-muted); text-transform:uppercase; }
.planweek-daynum{ font-size:16px; font-weight:700; width:30px; height:30px; line-height:30px; text-align:center; border-radius:50%; }
.planweek-day.is-today .planweek-daynum{ background:var(--color-accent); color:var(--color-accent-contrast); }
.planweek-items{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.planweek-item{ display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:var(--radius-sm); background:var(--color-surface-2); color:var(--color-text); text-decoration:none; min-width:0; }
.planweek-when{ flex:none; font-size:12px; font-weight:600; color:var(--color-text-muted); min-width:56px; }
.planweek-title{ flex:1; min-width:0; font-size:14px; font-weight:600; overflow-wrap:break-word; }
.planweek-who{ flex:none; font-size:12px; color:var(--color-text-muted); }
.planweek-check{ flex:none; width:14px; height:14px; border:1.5px solid var(--color-text-muted); border-radius:4px; margin:0 21px 0 3px; }
.planweek-free{ font-size:13px; color:var(--color-text-muted); padding:6px 0; }
.planweek-add{ padding:16px; gap:10px; }
.planweek-row{ display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap:6px; }
.planweek-row .input, .planweek-row .select{ margin:0; }
@media (max-width:519px){ .planweek-row{ grid-template-columns:1fr 1fr; } .planweek-row .input{ grid-column:1 / -1; } }

/* Platform > Connections: the AI provider form and test results;
   ai-check-line is also the household's one-line status on its
   Connections page. */
.ai-form-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:8px; align-items:end; }
.ai-form-row .field{ margin-bottom:0; }
.ai-check-line{ margin:0; }
.ai-check-line.is-ok{ color:var(--color-done); }
.ai-check-line.is-bad{ color:var(--color-danger); overflow-wrap:anywhere; }
.ai-facts{ display:grid; grid-template-columns:max-content minmax(0,1fr); gap:4px 12px; margin:0 0 12px; font-size:14px; }
.ai-facts dt{ color:var(--color-text-muted); }
.ai-facts dd{ margin:0; overflow-wrap:anywhere; }

/* Connection cards (Platform > Connections, Household > Connections): a
   title with its connected/not badge, sections inside one card, and a
   form row that wraps at phone width. */
.conn-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.conn-head .settings-card-title{ margin:0; }
.badge-ok{ background:color-mix(in oklch, var(--color-done) 16%, var(--color-surface)); color:var(--color-done); }
.conn-subtitle{ font-size:15px; margin:16px 0 6px; padding-top:12px; border-top:1px solid var(--color-border); scroll-margin-top:calc(var(--nav-height) + 12px); }
.conn-row{ display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; margin-bottom:12px; }
.conn-row .field{ flex:1 1 200px; margin-bottom:0; }
.conn-details{ margin-top:12px; font-size:14px; }
.conn-details summary{ cursor:pointer; color:var(--color-text-secondary); font-weight:600; }

/* Run logs (runPage, aiCallPage, Apollo run pages). Warn is amber, error
   is the danger red; both read in light and dark. */
:root{ --color-run-warn: oklch(55% 0.13 70); }
@media (prefers-color-scheme: dark){ :root{ --color-run-warn: oklch(78% 0.13 75); } }
.log-toolbar{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); margin:0 0 var(--space-3); }
.log-pre{ background:var(--color-surface-2); border-radius:var(--radius-md); padding:var(--space-3); margin:0; overflow:auto; max-height:75vh; font-size:12.5px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.run-summary{ margin:var(--space-2) 0 0; }
.run-links{ gap:var(--space-2); }
.run-status{ text-transform:uppercase; letter-spacing:.04em; font-size:11px; }
.run-status-ok{ color:var(--color-done); }
.run-status-warn{ color:var(--color-run-warn); }
.run-status-error{ color:var(--color-danger); }
.run-status-running{ color:var(--color-accent); }
.run-warn-text{ color:var(--color-run-warn); }
.run-error-text{ color:var(--color-danger); overflow-wrap:anywhere; }

.run-timeline{ list-style:none; margin:0; padding:0 0 0 var(--space-5); position:relative; }
.run-timeline::before{ content:""; position:absolute; left:7px; top:6px; bottom:6px; width:2px; background:var(--color-border); border-radius:2px; }
.run-step{ position:relative; padding:0 0 var(--space-4); scroll-margin-top:calc(var(--nav-height, 56px) + 12px); }
.run-step::before{ content:""; position:absolute; left:calc(-1 * var(--space-5) + 2px); top:5px; width:12px; height:12px; border-radius:50%; background:var(--color-surface); border:2px solid var(--color-done); box-sizing:border-box; }
.run-step-warn::before{ border-color:var(--color-run-warn); background:var(--color-run-warn); }
.run-step-error::before{ border-color:var(--color-danger); background:var(--color-danger); }
.run-step:target{ background:var(--color-surface-2); border-radius:var(--radius-sm); }
.run-step-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px var(--space-2); }
.run-step-head time{ font-variant-numeric:tabular-nums; font-weight:600; }
.run-step-offset, .run-step-dur{ color:var(--color-text-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.run-step-action{ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13px; }
.run-step-anchor{ margin-left:auto; color:var(--color-text-muted); font-size:12px; text-decoration:none; }
.run-step-detail{ margin-top:4px; color:var(--color-text-secondary); font-size:13.5px; white-space:pre-wrap; overflow-wrap:anywhere; }
.run-step-link{ display:inline-block; margin-top:4px; font-size:13px; }

/* The same timeline look on an Apollo "Actions" note, whose steps are a
   rendered markdown ordered list. */
.run-timeline-md ol{ list-style:none; margin:0; padding:0 0 0 var(--space-5); position:relative; counter-reset:none; }
.run-timeline-md ol::before{ content:""; position:absolute; left:7px; top:6px; bottom:6px; width:2px; background:var(--color-border); border-radius:2px; }
.run-timeline-md ol > li{ position:relative; padding:0 0 var(--space-3); white-space:pre-line; overflow-wrap:anywhere; }
.run-timeline-md ol > li::before{ content:""; position:absolute; left:calc(-1 * var(--space-5) + 2px); top:6px; width:12px; height:12px; border-radius:50%; background:var(--color-surface); border:2px solid var(--color-done); box-sizing:border-box; }
.run-timeline-md ol > li.run-step-warn::before{ border-color:var(--color-run-warn); background:var(--color-run-warn); }
.run-timeline-md ol > li.run-step-error::before{ border-color:var(--color-danger); background:var(--color-danger); }
.run-log-md pre{ line-height:1.45; font-size:12.5px; max-height:75vh; white-space:pre-wrap; overflow-wrap:anywhere; }
.run-log-md pre code{ line-height:inherit; font-size:inherit; }

/* Iris page: filter, outcome chips, bulk move, views. */
.select-sm{ width:auto; padding:6px 30px 6px 10px; font-size:13px; min-height:0; }
.iris-filter{ padding:12px 16px; margin:0; }
.iris-filter-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:0 var(--space-3); }
.iris-chips{ margin-bottom:var(--space-2); }
.iris-views{ max-width:360px; }
.iris-bulk{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); margin:0 0 var(--space-2); }
.row.iris-row{ flex-direction:row; align-items:flex-start; gap:var(--space-3); }
/* Meta mixes text and a sender link; as flex items they split into columns. */
.iris-row .row-meta{ display:block; line-height:1.45; }
.iris-check{ margin-top:4px; width:18px; height:18px; flex:none; }
.iris-actions{ margin-top:var(--space-2); }
.iris-actions > summary{ cursor:pointer; font-size:13px; color:var(--color-text-secondary); margin-bottom:var(--space-2); }
/* A data table: .table inside a .table-wrap that scrolls sideways on a phone. */
.iris-table-wrap, .table-wrap{ overflow-x:auto; border:1px solid var(--color-border); border-radius:var(--radius-md); }
.iris-table, .table{ width:100%; min-width:640px; border-collapse:collapse; font-size:13.5px; }
.iris-table td:nth-child(4){ min-width:220px; }
.iris-table th, .iris-table td, .table th, .table td{ text-align:left; padding:8px 10px; border-bottom:1px solid var(--color-border); vertical-align:top; }
.iris-table th, .table th{ font-size:12px; color:var(--color-text-muted); font-weight:600; background:var(--color-surface-2); }
.iris-table tr:last-child td, .table tr:last-child td{ border-bottom:none; }
/* People: fits a phone without scrolling sideways; Email shows from 600px. */
.people-table{ min-width:0; font-size:14px; }
.people-table td{ vertical-align:middle; }
.people-name{ display:block; font-weight:600; color:var(--color-text); text-decoration:none; }
.people-login{ display:block; font-size:12px; color:var(--color-text-muted); }
.people-edit{ text-align:right; white-space:nowrap; width:1%; }
.people-email{ display:none; overflow-wrap:anywhere; }
@media (min-width:600px){ .people-email{ display:table-cell; } }
.people-editor > td{ background:var(--color-surface-2); }

/* Inventory: a table to slice. On a phone the place sits under the name
   and the wide columns (Where, Updated) fold away. */
.inv-add{ display:grid; grid-template-columns:1fr 4.5rem; gap:8px; margin:0 0 12px; }
.inv-add [name=name]{ grid-column:1 / -1; }
@media (min-width:600px){ .inv-add{ grid-template-columns:2fr 5rem 1fr 1fr auto; } .inv-add [name=name]{ grid-column:auto; } }
.inv-search{ margin:0 0 10px; }
.inv-count{ font-weight:500; opacity:.7; }
.inv-shown{ margin:0 0 6px; }
.inv-table{ min-width:0; font-size:14px; }
.inv-table td{ vertical-align:middle; }
.inv-name{ font-weight:600; color:var(--color-text); }
.inv-place-narrow{ display:block; font-size:12px; }
.inv-qty{ white-space:nowrap; }
.inv-n{ display:inline-block; min-width:2.5em; text-align:center; }
.inv-step{ width:30px; height:30px; font-size:18px; }
.inv-actions{ text-align:right; width:1%; }
.inv-table tr.is-low .inv-n{ color:var(--color-danger); font-weight:700; }
.inv-tools{ margin-top:12px; }
.col-wide{ display:none; }
@media (min-width:600px){ .col-wide{ display:table-cell; } .inv-place-narrow{ display:none; } }
.people-form{ display:flex; flex-wrap:wrap; gap:8px 10px; align-items:flex-end; margin:4px 0 8px; }
.people-form .field{ display:flex; flex-direction:column; gap:4px; flex:1 1 10rem; min-width:0; font-size:12px; color:var(--color-text-muted); margin:0; }
.people-hint{ flex-basis:100%; margin:0 0 8px; font-size:12px; }
.people-removed{ margin-top:12px; }
.people-removed > summary{ cursor:pointer; padding:6px 0; }
.iris-nowrap{ white-space:nowrap; }
.iris-preview-list{ margin:4px 0 0; padding-left:18px; font-size:13.5px; }

/* Shrug editor: the arrow between When / And / Then. Icons are sized by
   their container, and this one had none, so it rendered page-wide. */
/* The Shrug editor (shrugEditor.html): Basic is three steps, Advanced is the YAML. */
button.seg-item{ border:0; background:none; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
button.seg-item:disabled{ opacity:.45; cursor:not-allowed; }
.shrug-views{ max-width:280px; }
.shrug-step{ padding:16px; margin-bottom:4px; }
.shrug-step-when{ border-left:3px solid var(--color-accent); }
.shrug-step-then{ border-left:3px solid var(--color-done); }
.shrug-step-label{ display:block; margin-bottom:8px; font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--color-text-secondary); }
.shrug-step .hint{ margin:6px 0 0; }
.shrug-step-optional{ font-weight:500; letter-spacing:0; text-transform:none; color:var(--color-text-muted); }
#action-fields{ margin-top:8px; }
.shrug-yaml{ min-height:300px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13px; tab-size:2; }
.shrug-yaml-ok{ display:flex; align-items:center; gap:6px; margin:0 0 var(--space-3); font-size:14px; font-weight:600; color:var(--color-done); }
.shrug-yaml-ok svg{ width:16px; height:16px; }
.shrug-problems{ margin:4px 0 0; padding-left:18px; font-size:13.5px; overflow-wrap:anywhere; }
.shrug-ref{ font-size:13.5px; color:var(--color-text-secondary); overflow-wrap:anywhere; }
.shrug-ref ul{ padding-left:18px; }
.shrug-save{ margin-top:12px; }
.shrug-step-arrow{ display:flex; justify-content:center; padding:2px 0; color:var(--color-text-muted); }
.shrug-step-arrow svg{ width:20px; height:20px; }

/* Iris page: read-only list of the Shrugs that run on Iris mail. */
.iris-shrug.is-off{ opacity:.7; }
.iris-shrug-badges{ display:flex; gap:6px; margin-top:2px; }
.iris-shrug-rule{ display:grid; grid-template-columns:max-content 1fr; gap:4px 12px; margin:8px 0; font-size:13.5px; }
.iris-shrug-rule dt{ color:var(--color-text-muted); font-weight:600; }
.iris-shrug-rule dd{ margin:0; overflow-wrap:anywhere; }
.iris-shrug .row-title{ white-space:normal; }

/* Approvals: a proposal row stacks its summary, preview and buttons,
   and its summary wraps rather than cutting off. */
.proposal{ flex-direction:column; align-items:stretch; gap:6px; }
.proposal .row-title{ white-space:normal; overflow-wrap:anywhere; }
.proposal .log-pre{ max-height:220px; }

/* Shrug runs: last-run peek on the list, last run card and expandable
   history on a Shrug's page. */
.shrug-last-run{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--color-text-secondary); margin-top:2px; min-width:0; }
.shrug-last-run span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shrug-last-run-card{ padding:16px; margin-bottom:var(--space-3); }
.shrug-last-run-head{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; margin-bottom:8px; }
.shrug-last-run-card .run-timeline{ margin-top:var(--space-3); }
.shrug-history-title{ margin:var(--space-4) 0 var(--space-2); font-size:15px; }
.shrug-history{ gap:6px; }
.shrug-run{ list-style:none; background:var(--color-surface); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); }
.shrug-run > details > summary{ display:flex; align-items:center; gap:8px; padding:10px 12px; cursor:pointer; min-width:0; }
.shrug-run-when{ font-variant-numeric:tabular-nums; font-size:13px; white-space:nowrap; }
.shrug-run-summary{ font-size:13px; color:var(--color-text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.shrug-run-body{ padding:0 12px 12px; }
.shrug-run-more{ list-style:none; }

/* Make a Shrug from this email. */
.iris-email-card{ padding:12px 16px; margin-bottom:var(--space-4); }
.iris-email-card .row-meta{ display:block; margin:2px 0 0; }
.iris-criteria fieldset{ border:none; padding:0; margin:0 0 var(--space-3); }
.iris-criteria legend{ font-weight:600; margin-bottom:var(--space-2); }
.iris-criterion{ display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--color-surface); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); margin-bottom:6px; cursor:pointer; }
.iris-criterion input{ width:18px; height:18px; flex:none; }
.iris-criterion-label{ flex:1; min-width:0; overflow-wrap:anywhere; }
.iris-criterion .hint{ white-space:nowrap; font-size:12.5px; }
.iris-criteria-count{ margin:0 0 var(--space-3); min-height:1.5em; }
.iris-shrug-when{ margin:0 0 var(--space-3); }

/* One page for every kind (entityPage.html): header, actions, body and
   the kind's own sections on the left; Connections and Activity beside
   it on a wide screen, below it on a phone. */
.entity-page{ max-width:1120px; }
.entity-head{ margin-bottom:var(--space-4); padding-bottom:var(--space-4); border-bottom:1px solid var(--color-border); }
.entity-kicker{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 6px; font-size:var(--font-size-micro); font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--color-text-muted); }
.entity-kicker a{ display:inline-flex; align-items:center; gap:6px; color:inherit; text-decoration:none; }
.entity-kicker a:hover{ color:var(--color-accent); }
.entity-kicker .badge{ letter-spacing:0; text-transform:none; }
.entity-context{ font-weight:600; letter-spacing:.04em; }
.entity-context::before{ content:"\00b7"; margin-right:8px; }
.entity-kind-icon{ display:inline-flex; width:16px; height:16px; flex:none; }
.entity-kind-icon svg{ width:16px; height:16px; }
.entity-head h1{ margin:0; font-size:clamp(1.375rem, 5.5vw, 2rem); line-height:1.15; overflow-wrap:anywhere; }
.entity-props{ display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px 16px; margin:var(--space-4) 0 0; }
.entity-props div{ min-width:0; }
.entity-props dt{ font-size:var(--font-size-micro); color:var(--color-text-muted); margin:0 0 2px; }
.entity-props dd{ margin:0; font-size:var(--font-size-small); font-weight:600; color:var(--color-text); overflow-wrap:anywhere; }
.entity-props dd a{ color:var(--color-accent); }
.entity-tags{ margin:var(--space-3) 0 0; }
.entity-actions{ margin-bottom:var(--space-4); }
#entity-flash:empty{ display:none; }
.entity-layout{ display:grid; grid-template-columns:minmax(0, 1fr); gap:var(--space-5); align-items:start; }
@media (min-width:900px){ .entity-layout{ grid-template-columns:minmax(0, 1fr) minmax(260px, 340px); } }
.entity-main{ min-width:0; }
.entity-body{ color:var(--color-text); max-width:68ch; margin-bottom:var(--space-5); }
.entity-body a{ color:var(--color-accent); }
.entity-hero{ display:block; width:100%; max-height:320px; object-fit:cover; border-radius:var(--radius-lg); margin:0 0 var(--space-4); }
.entity-section{ margin:0 0 var(--space-5); }
.entity-section > h2{ font-size:var(--font-size-h3); margin:0 0 var(--space-2); }
details.entity-section > summary, .entity-edit > summary, .entity-link-add > summary{ cursor:pointer; color:var(--color-accent); font-size:var(--font-size-small); font-weight:650; padding:6px 0; }
details.entity-section[open] > summary, .entity-edit[open] > summary{ margin-bottom:var(--space-2); }
.entity-edit{ margin:0 0 var(--space-5); padding-top:var(--space-3); border-top:1px solid var(--color-border); }
.entity-form-row{ display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; }
.entity-callout{ padding:12px; margin-bottom:12px; text-align:left; }
.entity-callout p{ margin:0 0 8px; font-size:13px; }
.entity-comment{ flex-direction:column; align-items:stretch; gap:4px; padding:10px 12px; }
.entity-side{ display:flex; flex-direction:column; gap:var(--space-4); min-width:0; }
.entity-panel{ background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); padding:14px 14px 16px; }
.entity-panel > h2{ font-size:var(--font-size-h3); margin:0 0 var(--space-2); }
.entity-group{ display:flex; align-items:center; gap:6px; margin:var(--space-3) 0 4px; font-family:var(--font-sans); font-size:var(--font-size-micro); font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--color-text-muted); }
.entity-links{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; }
.entity-links li{ display:flex; align-items:center; gap:4px; }
.entity-link{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; padding:8px 10px; min-height:44px; justify-content:center; border-radius:var(--radius-sm); background:var(--color-bg); color:var(--color-text); text-decoration:none; }
.entity-link:hover{ background:var(--color-surface-2); color:var(--color-accent); }
.entity-link-title{ font-weight:600; font-size:var(--font-size-small); overflow-wrap:anywhere; }
.entity-link-rel{ font-size:var(--font-size-micro); color:var(--color-text-muted); }
.entity-link-add{ margin-top:var(--space-3); }
.entity-link-add .select, .entity-link-add .input{ margin-bottom:6px; }
.entity-link-results{ display:flex; flex-direction:column; gap:4px; }
.entity-timeline{ list-style:none; margin:0; padding:0 0 0 14px; border-left:2px solid var(--color-border); display:flex; flex-direction:column; gap:10px; }
.entity-timeline li{ position:relative; display:flex; flex-direction:column; gap:2px; }
.entity-timeline li::before{ content:""; position:absolute; left:-20px; top:6px; width:10px; height:10px; border-radius:50%; background:var(--color-surface); border:2px solid var(--color-brand-globe); }
.entity-timeline-what{ font-size:var(--font-size-small); font-weight:600; overflow-wrap:anywhere; }
.entity-timeline-meta{ font-size:var(--font-size-micro); color:var(--color-text-muted); }
.entity-timeline form{ margin-top:4px; }
@media print{ .entity-side, .entity-actions, .entity-edit{ display:none; } }

/* The one box, as a field on a page: Today's quick capture, and Apollo's
   or a collection's search. It opens the Command-K palette (layout.html). */
.capture-box{ display:flex; align-items:center; gap:10px; min-height:48px; padding:10px 14px; margin:0 0 14px; border:1px solid var(--color-border); border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text-muted); text-decoration:none; font-size:15px; box-shadow:var(--shadow-sm); }
.capture-box:hover{ border-color:var(--color-accent); color:var(--color-text); }
.capture-box svg{ width:18px; height:18px; flex:none; color:var(--color-accent); }
.capture-box span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.capture-box kbd{ flex:none; }
@media (hover:none){ .capture-box kbd{ display:none; } }

/* Home: the household's collections, one card each. */
.home-grid{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
@media (min-width:720px){ .home-grid{ grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); } }
.home-card{ display:flex; align-items:center; gap:12px; height:100%; min-height:72px; padding:14px; box-sizing:border-box; color:var(--color-text); }
.home-card:hover{ border-color:var(--color-accent); }
.home-card-icon{ flex:none; display:flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:var(--radius-md); background:var(--color-surface-2); color:var(--color-accent); }
.home-card-icon svg{ width:20px; height:20px; }
.home-card-text{ display:flex; flex-direction:column; min-width:0; }
.home-card-label{ font-weight:600; }
.home-card-hint{ font-size:13px; color:var(--color-text-muted); overflow:hidden; text-overflow:ellipsis; }

/* Plan's day view: today's items in the week view's rows. */
.plan-day{ margin-bottom:14px; }

/* Prometheus (decision 0025): the flame button on every page, its nudge,
   and his chat at /prometheus. Warm ember is his alone, so the button
   reads as "the helper" against the slate everywhere else. */
body:has(.prom-fab-wrap){ padding-bottom:calc(var(--tabbar-height) + 84px); }
.prom-fab-wrap{ position:fixed; right:16px; bottom:calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px) + 14px); z-index:40; display:flex; flex-direction:row-reverse; align-items:flex-end; gap:10px; pointer-events:none; }
.prom-fab{ pointer-events:auto; flex:none; width:58px; height:58px; border-radius:50%; display:grid; place-items:center; color:oklch(99% 0.01 80); text-decoration:none;
  background:radial-gradient(circle at 34% 28%, var(--color-ember), var(--color-ember-deep) 78%);
  box-shadow:var(--shadow-lg), 0 0 0 5px color-mix(in oklch, var(--color-ember) 16%, transparent); transition:transform .15s ease, box-shadow .15s ease; }
.prom-fab svg{ width:27px; height:27px; overflow:visible; }
.prom-fab:hover{ transform:translateY(-2px) scale(1.04); box-shadow:var(--shadow-lg), 0 0 0 7px color-mix(in oklch, var(--color-ember) 22%, transparent); }
.prom-fab:active{ transform:scale(.95); }
.prom-fab:focus-visible{ outline:3px solid var(--color-accent); outline-offset:3px; }
.prom-nudge{ pointer-events:auto; position:relative; max-width:min(260px, calc(100vw - 110px)); margin-bottom:6px; padding:11px 32px 11px 14px; background:color-mix(in oklch, var(--color-ember) 12%, var(--color-surface)); color:var(--color-text); border:1.5px solid var(--color-ember); border-radius:18px 18px 6px 18px; box-shadow:var(--shadow-md); font-size:14px; line-height:1.4; }
.prom-nudge:not([hidden]){ animation:prom-pop .28s cubic-bezier(.2,.9,.3,1.2); }
.prom-nudge-text{ color:var(--color-text); text-decoration:none; }
.prom-nudge-text{ font-weight:600; }
.prom-nudge-text:hover{ color:var(--color-ember-deep); }
/* Anything that opens Prometheus wears his ember, so he reads as one
   character wherever he turns up. */
.btn.btn-prometheus{ color:oklch(99% 0.01 80); border-color:transparent; background:radial-gradient(circle at 30% 20%, var(--color-ember), var(--color-ember-deep) 85%); box-shadow:0 2px 10px color-mix(in oklch, var(--color-ember) 30%, transparent); }
.btn.btn-prometheus:hover{ filter:brightness(1.06); }
.prom-title h1{ color:var(--color-ember-deep); }
.prom-msg-his .prom-bubble{ border-left:3px solid var(--color-ember); }
.prom-composer:focus-within{ border-color:var(--color-ember) !important; }
a.prom-link{ color:var(--color-ember-deep); font-weight:600; }
.prom-nudge-close{ position:absolute; top:4px; right:6px; padding:2px 6px; border:none; background:none; color:var(--color-text-muted); font-size:18px; line-height:1; cursor:pointer; }
@keyframes prom-pop{ from{ opacity:0; transform:translateY(6px) scale(.96); } to{ opacity:1; transform:none; } }
@keyframes prom-flicker{ 0%,100%{ transform:scaleY(1) rotate(0); } 35%{ transform:scaleY(1.07) rotate(-2deg); } 70%{ transform:scaleY(.95) rotate(2deg); } }
@keyframes prom-glow{ 0%,100%{ box-shadow:0 0 0 0 color-mix(in oklch, var(--color-ember) 45%, transparent); } 50%{ box-shadow:0 0 0 7px color-mix(in oklch, var(--color-ember) 0%, transparent); } }
@keyframes prom-bounce{ 0%,80%,100%{ transform:translateY(0); opacity:.4; } 40%{ transform:translateY(-4px); opacity:1; } }
@media (prefers-reduced-motion:no-preference){
  .prom-fab svg path:first-child, .prom-hello-mark svg path:first-child, .prom-avatar.is-lit svg path:first-child{ transform-origin:50% 100%; transform-box:fill-box; animation:prom-flicker 2.6s ease-in-out infinite; }
  .prom-avatar.is-lit{ animation:prom-glow 1.6s ease-in-out infinite; }
}
@media (min-width:900px){ body:has(.prom-fab-wrap){ padding-bottom:84px; } .prom-fab-wrap{ right:24px; bottom:24px; } }
@media print{ .prom-fab-wrap{ display:none; } }

.prom{ display:grid; grid-template-columns:minmax(0,1fr); height:calc(100dvh - var(--nav-height) - var(--tabbar-height) - env(safe-area-inset-bottom, 0px) - 40px); min-height:440px; }
.prom-main{ display:flex; flex-direction:column; min-width:0; min-height:0; }
.prom-head{ display:flex; align-items:center; gap:10px; padding:0 0 12px; border-bottom:1px solid var(--color-border); }
.prom-title{ flex:1; min-width:0; }
.prom-title h1{ margin:0; font-size:1.375rem; }
.prom-subtitle{ margin:0; font-size:var(--font-size-small); color:var(--color-text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.prom-icon-btn{ flex:none; display:inline-grid; place-items:center; width:38px; height:38px; border-radius:50%; border:1px solid var(--color-border); background:var(--color-surface); color:var(--color-text-secondary); cursor:pointer; text-decoration:none; }
.prom-icon-btn:hover{ color:var(--color-accent); border-color:var(--color-accent); }
.prom-icon-btn svg{ width:18px; height:18px; }
.prom-head-action{ margin:0; }
.prom-avatar{ flex:none; display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:oklch(99% 0.01 80); background:radial-gradient(circle at 34% 28%, var(--color-ember), var(--color-ember-deep) 78%); }
.prom-avatar svg{ width:24px; height:24px; overflow:visible; }
.prom-avatar-sm{ width:30px; height:30px; margin-top:2px; }
.prom-avatar-sm svg{ width:17px; height:17px; }

.prom-log{ flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:16px; padding:18px 2px 12px; }
.prom-msg{ display:flex; gap:8px; max-width:100%; }
.prom-msg-mine{ flex-direction:column; align-items:flex-end; gap:3px; }
.prom-msg-mine .prom-bubble{ max-width:min(85%, 34rem); padding:10px 14px; border-radius:18px 18px 6px 18px; background:var(--color-accent); color:var(--color-accent-contrast); font-size:15px; line-height:1.45; white-space:pre-wrap; overflow-wrap:anywhere; }
.prom-reply{ display:flex; flex-direction:column; gap:8px; min-width:0; max-width:min(calc(100% - 38px), 40rem); }
.prom-msg-his .prom-bubble{ padding:12px 15px; border-radius:6px 18px 18px 18px; background:var(--color-surface); border:1px solid var(--color-border); color:var(--color-text); font-size:15px; overflow-wrap:anywhere; }
.prom-bubble.prose{ line-height:1.55; }
.prom-bubble.prose p{ margin:0 0 10px; color:var(--color-text); }
.prom-bubble.prose ul, .prom-bubble.prose ol{ margin:0 0 10px; padding-left:20px; }
.prom-bubble.prose > :last-child{ margin-bottom:0; }
.prom-bubble.prose a{ color:var(--color-accent); font-weight:600; }
.prom-error{ color:var(--color-danger); }
.prom-time{ font-size:var(--font-size-micro); color:var(--color-text-muted); }
.prom-meta{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; padding:0 4px; }
.prom-did{ font-size:13px; color:var(--color-text-secondary); }
.prom-did summary{ cursor:pointer; color:var(--color-text-muted); font-size:12.5px; font-weight:600; list-style:none; }
.prom-did summary::-webkit-details-marker{ display:none; }
.prom-did summary::before{ content:"\25B8"; display:inline-block; margin-right:5px; transition:transform .15s; }
.prom-did[open] summary::before{ transform:rotate(90deg); }
.prom-did[open]{ flex-basis:100%; }
.prom-steps{ list-style:none; margin:8px 0 6px; padding:0; display:flex; flex-direction:column; gap:5px; font-size:13px; color:var(--color-text-secondary); }
.prom-step{ display:flex; gap:8px; align-items:baseline; }
.prom-step::before{ content:""; flex:none; width:7px; height:7px; border-radius:50%; background:var(--color-border); transform:translateY(-1px); }
.prom-step-did::before{ background:var(--color-done); }
.prom-step-suggested::before{ background:var(--color-ember); }
.prom-step-snag::before{ background:var(--color-danger); }
.prom-steps-live{ margin:10px 0 0; }
.prom-steps-live .prom-step:last-child{ color:var(--color-text); animation:prom-pop .3s ease-out; }
.prom-dots{ display:inline-flex; gap:4px; vertical-align:middle; }
.prom-dots i{ width:7px; height:7px; border-radius:50%; background:var(--color-ember); animation:prom-bounce 1.2s infinite ease-in-out; }
.prom-dots i:nth-child(2){ animation-delay:.15s; } .prom-dots i:nth-child(3){ animation-delay:.3s; }
.prom-working-label{ margin-left:8px; font-size:14px; color:var(--color-text-muted); }
.prom-proposals{ border:1px solid color-mix(in oklch, var(--color-ember) 45%, var(--color-border)); background:color-mix(in oklch, var(--color-ember) 7%, var(--color-surface)); border-radius:16px; padding:10px 12px 4px; }
.prom-proposals-label{ margin:0 0 4px; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--color-ember-deep); }
.prom-proposals .list{ margin:0; padding:0; }
.prom-proposals .row{ padding-left:0; padding-right:0; background:none; border:none; }

.prom-hello{ margin:auto; max-width:32rem; padding:12px 8px; text-align:center; }
.prom-hello-mark{ display:grid; place-items:center; width:76px; height:76px; margin:0 auto 14px; border-radius:50%; color:oklch(99% 0.01 80); background:radial-gradient(circle at 34% 28%, var(--color-ember), var(--color-ember-deep) 78%); box-shadow:0 10px 30px color-mix(in oklch, var(--color-ember) 35%, transparent); }
.prom-hello-mark svg{ width:40px; height:40px; overflow:visible; }
.prom-hello h2{ font-size:1.5rem; margin:0 0 6px; }
.prom-hello p{ margin:0 0 16px; }
.prom-warn{ color:var(--color-danger); font-size:14px; }
.prom-starters{ display:grid; grid-template-columns:1fr; gap:8px; text-align:left; }
.prom-starter{ display:block; width:100%; padding:12px 14px; border:1px solid var(--color-border); border-radius:14px; background:var(--color-surface); color:var(--color-text); font:inherit; font-size:14.5px; text-align:left; cursor:pointer; transition:border-color .15s, transform .15s; }
.prom-starter:hover{ border-color:var(--color-ember); transform:translateY(-1px); }
@media (min-width:560px){ .prom-starters{ grid-template-columns:1fr 1fr; } }

.prom-composer{ display:flex; align-items:flex-end; gap:8px; margin-top:6px; padding:7px 7px 7px 14px; background:var(--color-surface); border:1px solid var(--color-border); border-radius:26px; box-shadow:var(--shadow-sm); }
.prom-composer:focus-within{ border-color:var(--color-accent); }
.prom-composer textarea{ flex:1; min-width:0; max-height:160px; padding:9px 0; border:none; outline:none; resize:none; background:transparent; color:var(--color-text); font:inherit; font-size:16px; line-height:1.4; }
.prom-send{ flex:none; display:grid; place-items:center; width:40px; height:40px; border:none; border-radius:50%; color:oklch(99% 0.01 80); background:radial-gradient(circle at 34% 28%, var(--color-ember), var(--color-ember-deep) 78%); cursor:pointer; transition:opacity .15s, transform .15s; }
.prom-send svg{ width:19px; height:19px; }
.prom-send:disabled{ opacity:.35; cursor:default; }
.prom-send:not(:disabled):active{ transform:scale(.94); }
.prom-foot{ margin:6px 0 0; text-align:center; font-size:var(--font-size-micro); color:var(--color-text-muted); }

.prom-threads{ position:fixed; z-index:60; top:0; bottom:0; left:0; width:min(320px, 84vw); display:flex; flex-direction:column; gap:10px; padding:20px 14px; background:var(--color-surface); border-right:1px solid var(--color-border); box-shadow:var(--shadow-lg); transform:translateX(-105%); transition:transform .22s ease; }
.prom.threads-open .prom-threads{ transform:none; }
.prom-scrim{ position:fixed; inset:0; z-index:55; background:oklch(0% 0 0 / 0.35); }
.prom-threads-head{ display:flex; align-items:center; justify-content:space-between; font-weight:700; font-size:15px; }
.prom-thread-items{ flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
.prom-thread{ display:flex; flex-direction:column; gap:1px; padding:9px 10px; border-radius:var(--radius-md); color:var(--color-text); text-decoration:none; }
.prom-thread:hover{ background:var(--color-surface-2); }
.prom-thread.is-current{ background:color-mix(in oklch, var(--color-ember) 12%, var(--color-surface)); }
.prom-thread-title{ font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.prom-thread-when{ font-size:var(--font-size-micro); color:var(--color-text-muted); }
.prom-thread-empty{ padding:8px 10px; }
.prom-threads-foot{ margin:0; }
@media (min-width:900px){
  .prom{ grid-template-columns:250px minmax(0,1fr); gap:24px; height:calc(100dvh - var(--nav-height) - 48px); }
  .prom-threads{ position:static; z-index:auto; width:auto; padding:0 16px 0 0; transform:none; box-shadow:none; background:none; transition:none; }
  .prom-threads-toggle, .prom-scrim{ display:none; }
}

.dash-household{ align-items:center; flex-wrap:wrap; gap:8px; }
.dash-household form{ margin:0; }
.dash-note-body{ padding:0 16px 16px; font-size:14.5px; }

/* Customize navigation: the first four (the bar) and the next four
   (Quick links) are marked down the left edge. */
.nav-order-list li:nth-child(-n+4){ box-shadow:inset 3px 0 0 var(--color-accent); }
.nav-order-list li:nth-child(n+5):nth-child(-n+8){ box-shadow:inset 3px 0 0 var(--color-brand-globe); }

/* Books: covers standing on a shelf per status, scrolled sideways. A
   book with no cover gets a drawn one in its own colour (--hue). Where
   the browser has scroll-driven animations, a cover half past either
   edge turns away, like flipping through a bookcase. */
.shelf-views{ margin-bottom:var(--space-2); }
.shelf{ margin:var(--space-4) 0 var(--space-5); }
.shelf-label{ font-size:var(--font-size-h3); margin:0 0 var(--space-1); display:flex; align-items:baseline; gap:var(--space-2); }
.shelf-count{ font-size:var(--font-size-small); font-weight:400; color:var(--color-text-muted); }
.shelf-row{
  display:flex; gap:var(--space-3); align-items:flex-end;
  overflow-x:auto; scroll-snap-type:x proximity; scrollbar-width:none;
  padding:var(--space-4) var(--space-2) 14px;
  background:linear-gradient(to top, var(--color-shelf) 0 12px, transparent 12px);
  border-radius:0 0 var(--radius-sm) var(--radius-sm);
  perspective:900px;
}
.shelf-row::-webkit-scrollbar{ display:none; }
.shelf-book{
  position:relative; flex:none; width:104px; aspect-ratio:2/3; overflow:hidden;
  display:flex; flex-direction:column; justify-content:space-between; gap:var(--space-1);
  padding:10px 8px 10px 14px; border-radius:3px 6px 6px 3px; scroll-snap-align:center;
  background:linear-gradient(90deg, oklch(0% 0 0 / 0.28) 0 4px, oklch(100% 0 0 / 0.12) 4px 6px, transparent 6px), oklch(46% 0.09 var(--hue));
  color:oklch(97% 0.015 var(--hue)); text-decoration:none; font-family:var(--font-display);
  box-shadow:0 2px 4px oklch(0% 0 0 / 0.2), 0 8px 18px oklch(0% 0 0 / 0.18);
  transition:translate .2s ease, box-shadow .2s ease;
}
.shelf-book:hover, .shelf-book:focus-visible{ translate:0 -8px; box-shadow:0 4px 8px oklch(0% 0 0 / 0.22), 0 16px 28px oklch(0% 0 0 / 0.24); }
.shelf-book img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.shelf-book-title{ font-size:14px; font-weight:600; line-height:1.2; overflow-wrap:break-word; hyphens:auto; display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.shelf-book-author{ font-family:var(--font-sans); font-size:11px; opacity:0.85; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shelf-book:has(.shelf-book-tag){ padding-top:30px; }
.shelf-book-tag{ position:absolute; z-index:1; top:6px; right:6px; padding:2px 6px; border-radius:var(--radius-full); font:600 10px/1.3 var(--font-sans); background:oklch(0% 0 0 / 0.62); color:oklch(100% 0 0); max-width:calc(100% - 12px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (min-width:720px){ .shelf-book{ width:128px; } }
@media (prefers-reduced-motion:no-preference){
  @supports (animation-timeline: view()){
    .shelf-book{ animation:shelf-turn linear both; animation-timeline:view(inline); }
    @keyframes shelf-turn{
      entry 0%{ transform:rotateY(32deg) scale(0.9); }
      entry 100%, exit 0%{ transform:none; }
      exit 100%{ transform:rotateY(-32deg) scale(0.9); }
    }
  }
}
