/* The owner page's shell, sign-in screens and first core screens (Today, Needs you, Jobs, one job), from the spec's
   Components and States, on the surface's tokens (tokens.css). The icons are served from the page's own static folder;
   an icon is a CSS mask over its SVG, so it takes the colour of its text. No style attribute anywhere: script styles
   through classes and the CSSOM only. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; scroll-padding-bottom: calc(56px + env(safe-area-inset-bottom) + var(--space-2)); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
p { margin: 0; }
a { color: inherit; }
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

/* ---------- icons: Lucide, self-hosted, one CSS mask each (only the spec's names) */
.ico {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.i-house { --icon: url(../static/house.svg); }
.i-inbox { --icon: url(../static/inbox.svg); }
.i-hard-hat { --icon: url(../static/hard-hat.svg); }
.i-lightbulb { --icon: url(../static/lightbulb.svg); }
.i-send { --icon: url(../static/send.svg); }
.i-settings { --icon: url(../static/settings.svg); }
.i-menu { --icon: url(../static/menu.svg); }
.i-bell { --icon: url(../static/bell.svg); }
.i-wifi-off { --icon: url(../static/wifi-off.svg); }
.i-arrow-left { --icon: url(../static/arrow-left.svg); }
.i-chevron-right { --icon: url(../static/chevron-right.svg); }
.i-check { --icon: url(../static/check.svg); }
.i-sun { --icon: url(../static/sun.svg); }
.i-moon { --icon: url(../static/moon.svg); }
.i-monitor { --icon: url(../static/monitor.svg); }
.i-circle-check { --icon: url(../static/circle-check.svg); }
.i-circle-alert { --icon: url(../static/circle-alert.svg); }
.i-triangle-alert { --icon: url(../static/triangle-alert.svg); }
.i-clock { --icon: url(../static/clock.svg); }
.i-hourglass { --icon: url(../static/hourglass.svg); }
.i-lock { --icon: url(../static/lock.svg); }
.i-eye-off { --icon: url(../static/eye-off.svg); }
.i-undo-2 { --icon: url(../static/undo-2.svg); }
.i-quote { --icon: url(../static/quote.svg); }
.i-file-text { --icon: url(../static/file-text.svg); }
.i-mail { --icon: url(../static/mail.svg); }
.i-pen-line { --icon: url(../static/pen-line.svg); }
.i-list-checks { --icon: url(../static/list-checks.svg); }
.i-clipboard-check { --icon: url(../static/clipboard-check.svg); }
.i-message-square { --icon: url(../static/message-square.svg); }
.i-flag { --icon: url(../static/flag.svg); }
.i-users { --icon: url(../static/users.svg); }
.i-receipt { --icon: url(../static/receipt.svg); }
.i-activity { --icon: url(../static/activity.svg); }
.i-calendar { --icon: url(../static/calendar.svg); }
.i-message-circle { --icon: url(../static/message-circle.svg); }
/* the Specialists screen's (spec 2026-10-28-specialists-catalogue, "Icons (Lucide)") */
.i-search { --icon: url(../static/search.svg); }
.i-calculator { --icon: url(../static/calculator.svg); }
.i-scroll-text { --icon: url(../static/scroll-text.svg); }
.i-brick-wall { --icon: url(../static/brick-wall.svg); }
.i-droplets { --icon: url(../static/droplets.svg); }
.i-zap { --icon: url(../static/zap.svg); }
.i-fan { --icon: url(../static/fan.svg); }
.i-mountain { --icon: url(../static/mountain.svg); }
.i-thermometer { --icon: url(../static/thermometer.svg); }
.i-flame { --icon: url(../static/flame.svg); }
.i-palette { --icon: url(../static/palette.svg); }
.i-megaphone { --icon: url(../static/megaphone.svg); }
.i-swatch-book { --icon: url(../static/swatch-book.svg); }
.i-shield-plus { --icon: url(../static/shield-plus.svg); }
.i-id-card { --icon: url(../static/id-card.svg); }
.i-globe { --icon: url(../static/globe.svg); }
.i-compass { --icon: url(../static/compass.svg); }
.i-layers { --icon: url(../static/layers.svg); }
.i-plus { --icon: url(../static/plus.svg); }
.i-puzzle { --icon: url(../static/puzzle.svg); }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 30;
  padding: var(--space-2) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line-input);
  border-radius: var(--radius-md);
}
.skip:focus { top: var(--space-2); }

/* ---------- buttons */
button {
  font: inherit;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: none;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
button:active { transform: translateY(1px); }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.secondary { background: var(--surface); border-color: var(--line-input); }
.secondary:hover, .quiet:hover { background: var(--surface-2); }
.quiet { color: var(--ink-2); padding: 0 var(--space-2); }
.wide { width: 100%; }
button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- the shell: phone first (under 768 px) */
.rail { display: none; }
.frame { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand actions" "fresh fresh";
  align-items: center;
  gap: 0 var(--space-3);
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.phone-brand { grid-area: brand; display: flex; align-items: center; gap: var(--space-2); min-width: 0;
               font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-weight: 650; font-size: var(--text-lg); }
.logo { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
        border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent);
        font-family: var(--font-display); font-size: var(--text-md); font-weight: 700; box-shadow: 0 0 0 3px var(--accent-ring); }
.top-actions { grid-area: actions; display: flex; align-items: center; gap: var(--space-2); }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
        border-radius: var(--radius-pill); color: var(--ink-2); text-decoration: none; }
.bell:hover { background: var(--surface-2); }
.bell .badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; }
.initial { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
           border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fresh { grid-area: fresh; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); }
.fresh .dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--line-input); flex: none; }
.fresh.is-ok .dot { background: var(--ok); }
.fresh.is-stale { color: var(--warn); }
.fresh.is-stale .dot { background: var(--warn); }

.content {
  max-width: var(--content-max);
  padding: var(--space-5) var(--space-4) calc(56px + env(safe-area-inset-bottom) + var(--space-8));
}
main { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.region { min-height: 160px; }

.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--bad-soft);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.banner > .ico { width: 24px; height: 24px; color: var(--bad); }
.banner-words { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.banner-title { font-weight: 700; font-size: var(--text-md); color: var(--ink); }
.waits { color: var(--bad); }

.more-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--radius-lg); }
.more-list li + li { border-top: 1px solid var(--line); }
.more-list a { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: var(--space-3) var(--space-4);
               text-decoration: none; }
.more-list a:hover { background: var(--surface-2); }
.more-name { font-weight: 600; }
.more-line { font-size: var(--text-sm); color: var(--muted); }

.device { display: flex; flex-direction: column; gap: var(--space-1); }
.device-label { font-weight: 600; }
.person { font-size: var(--text-sm); color: var(--muted); }
.device-phone { padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.device-phone button { align-self: flex-start; margin-top: var(--space-2); }
.who { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }

/* More as a sheet over the page, under 768 px (the More place draws the same list in the page) */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgb(15 23 42 / 0.5); }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-height: 88vh;
  overflow-y: auto;
  padding: var(--space-2) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgb(15 23 42 / 0.25);
  animation: sheet-in 0.2s ease-out;
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.grab { flex: none; align-self: center; width: 40px; height: 4px; border-radius: var(--radius-pill); background: var(--line-input); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabs a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 0 var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
}
.tabs .name { white-space: nowrap; }
.tabs .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a.pending { visibility: hidden; }
.shell { scroll-padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

/* ---------- tablet: the 84 px rail, labels only until the icons land (768 to 1099 px) */
@media (min-width: 768px) {
  .tabs, .phone-brand, .device-phone, .sheet, .scrim { display: none !important; }
  .topbar { border-bottom: 1px solid var(--line); }
  .content { padding: var(--space-5) var(--space-8) var(--space-10); }
  html { scroll-padding-top: 72px; scroll-padding-bottom: 0; }
  .rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: var(--rail-narrow);
    padding: var(--space-4) var(--space-2);
    overflow-y: auto;
    background: var(--side);
    color: var(--side-ink);
    border-right: 1px solid var(--side-edge);
  }
  .frame { margin-left: var(--rail-narrow); }
  .brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); min-width: 0; padding: var(--space-2) 0;
           font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-weight: 650; font-size: var(--text-xs); text-align: center; }
  .brand-text { display: flex; flex-direction: column; min-width: 0; }
  .brand-sub { display: none; }
  .places { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
  .places a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 60px;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--side-muted);
  }
  .places .badge { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; }
  .places a:hover { background: var(--side-selected); color: var(--side-ink); }
  .places a[aria-current="page"] { background: var(--side-selected); color: var(--side-ink); }
  .business, .records { border-top: 1px solid var(--side-edge); padding: var(--space-2) 0 0; }
  .group { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rail :focus-visible { outline-color: var(--side-ink); }
  .rail .mark { color: var(--side-muted); }
  .rail .device { margin-top: auto; border-top: 1px solid var(--side-edge); padding-top: var(--space-3); align-items: center; font-size: var(--text-xs); text-align: center; }
  .rail .who { flex-direction: column; }
  .rail .initial { background: var(--side-selected); color: var(--side-ink); }
  .rail .person, .rail .device-label { color: var(--side-muted); font-weight: 400; }
  .rail .device button { color: var(--side-ink); font-size: var(--text-xs); padding: 0 var(--space-1); }
  .rail .device button:hover { background: var(--side-selected); }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "fresh actions"; background: var(--surface); }
  .fresh { margin: 0; }
  h1 { font-size: var(--text-2xl); }
}

/* ---------- desk: the 248 px rail (1100 px and up) */
@media (min-width: 1100px) {
  .rail { width: var(--rail-wide); padding: var(--space-5) var(--space-3); }
  .frame { margin-left: var(--rail-wide); }
  .brand { flex-direction: row; align-items: center; gap: var(--space-3); font-size: var(--text-lg); text-align: left; padding: var(--space-1) var(--space-3) var(--space-4); }
  .brand-sub { display: block; font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 400; letter-spacing: 0; color: var(--side-muted); }
  .places a { flex-direction: row; justify-content: flex-start; gap: var(--space-3); min-height: 44px; padding: 0 var(--space-3);
              font-size: var(--text-md); font-weight: 500; text-align: left; color: var(--side-muted); }
  .places a:hover, .places a[aria-current="page"] { color: var(--side-ink); }
  .places .name { flex: 1; }
  .places .badge { position: static; min-width: 22px; height: 22px; padding: 0 var(--space-2); }
  .places a[aria-current="page"] { font-weight: 600; }
  .business, .records { border: none; padding: var(--space-3) 0 0; }
  .group { position: static; width: auto; height: auto; overflow: visible; clip-path: none; padding: 0 var(--space-3) var(--space-2);
           font-size: var(--text-xs); font-weight: 700; color: var(--side-muted); }
  .rail .device { margin-left: var(--space-1); margin-right: var(--space-1); padding: var(--space-4) var(--space-2) 0; align-items: flex-start; font-size: var(--text-sm); text-align: left; }
  .rail .who { flex-direction: row; }
  .rail .device button { align-self: flex-start; font-size: var(--text-sm); }
}

/* ---------- the screens: shared parts */
.head { display: flex; flex-direction: column; gap: var(--space-1); }
.lead { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: var(--space-1); align-self: flex-start; min-height: var(--tap);
        color: var(--accent); font-weight: 600; text-decoration: none; }
.back .ico { width: 16px; height: 16px; }
.note { color: var(--muted); }
h2 { margin: 0; font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; line-height: var(--leading-tight); }
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
.section-head .count { color: var(--muted); font-size: var(--text-sm); }
.section-head .more-link { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap);
                           color: var(--accent); font-size: var(--text-sm); font-weight: 600; }
.more-link .ico { width: 16px; height: 16px; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }

.panel {
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
a.panel { display: block; text-decoration: none; }
a.panel:hover, .ask:hover { border-color: var(--line-input); }

.locked { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); background: var(--surface-2);
          border-radius: var(--radius-lg); color: var(--ink-2); }
.locked .ico { color: var(--muted); }

.skeletons { display: flex; flex-direction: column; gap: var(--space-4); }
.skeleton { border-radius: var(--radius-lg); background: var(--surface-2); animation: pulse 1.4s ease-in-out infinite; }
.skeleton.tabs-bar { height: 48px; max-width: 260px; }
.skeleton.card-block { height: 180px; }
.skeleton.ring-block { height: 220px; }
.skeleton.head-line { height: 36px; max-width: 420px; }
.skeleton.tile-row { height: 96px; }
.skeleton.row-block { height: 64px; }
@keyframes pulse { 50% { opacity: 0.55; } }

.empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-10) var(--space-4); text-align: center; }
.empty-ring { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: var(--radius-pill);
              border: 3px solid var(--ok); color: var(--ok); background: var(--ok-soft); }
.empty-ring .ico { width: 32px; height: 32px; }
.empty-title { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-xl); font-weight: 650; }
.empty-line { color: var(--muted); }

/* ---------- Needs you */
.segmented { display: inline-flex; align-self: flex-start; gap: var(--space-1); padding: var(--space-1); background: var(--surface-2);
             border-radius: var(--radius-pill); max-width: 100%; }
.seg { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 0 var(--space-4); border-radius: var(--radius-pill); color: var(--ink-2); }
.seg.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-count, .chip-count { color: var(--muted); font-size: var(--text-xs); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.region > .segmented + .chips { margin-top: var(--space-3); }
.region > .segmented ~ .feed { margin-top: var(--space-4); }
.chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 36px; background: var(--surface); border: 1px solid var(--line-input);
        border-radius: var(--radius-pill); font-weight: 500; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.is-on .chip-count { color: var(--on-accent); }
.feed { display: flex; flex-direction: column; gap: var(--space-4); max-width: 820px; }

.ask { display: flex; flex-direction: column; gap: var(--space-3); border-radius: var(--radius-lg); }
.ask-head { display: flex; align-items: center; gap: var(--space-3); }
.ask-kind { font-size: var(--text-sm); font-weight: 700; }
.kicon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-md);
         flex: none; }
.kicon .ico { width: 20px; height: 20px; }
.k-approval { background: var(--accent-soft); color: var(--accent); }
.k-draft { background: var(--info-soft); color: var(--info); }
.k-confirm { background: var(--warn-soft); color: var(--warn); }
.ask-title { margin: 0; font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; line-height: var(--leading-tight); }
.ask-line { color: var(--ink-2); }
.ask-line + .ask-line { padding-top: var(--space-3); border-top: 1px solid var(--line); }

.quote { padding: var(--space-3) var(--space-4); background: var(--surface-2); border-radius: var(--radius-md); }
.quote-label { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); color: var(--muted);
               font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.quote-label .ico { width: 16px; height: 16px; }
.quote pre { margin: 0; font-family: var(--font-quote); font-size: var(--text-sm); white-space: pre-wrap; overflow-wrap: anywhere; }

.btns { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btns button { border-radius: var(--radius-pill); }
.answer { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
.answer.is-ok { background: var(--ok-soft); color: var(--ink); }
.answer.is-ok > .ico { color: var(--ok); margin-top: 2px; }
/* An approval that expired unanswered (app.js draws it with the clock, an answered one with the check): neutral, not success. */
.answer.is-ok:has(> .i-clock) { background: var(--surface-2); }
.answer.is-ok > .i-clock { color: var(--ink-2); }
.answer.is-bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.answer-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.answer-who { font-weight: 600; }
.answer-note { color: var(--ink-2); font-size: var(--text-sm); }
/* An answer's own optional button (Withdraw, Keep these without asking): small, dashed, never full width, after an "Optional" tag. */
.btns.is-optional { align-items: center; margin-top: var(--space-1); }
.optional-tag { color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.btns.is-optional button { flex: 0 0 auto; background: none; border-style: dashed; color: var(--ink-2); font-weight: 500; font-size: var(--text-sm); }
.btns.is-optional button:hover { background: var(--surface-2); }
.empty .action { margin-top: var(--space-2); }

/* ---------- Today, and the job parts it shares with Jobs */
.button { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; min-height: var(--tap);
          padding: 0 var(--space-4); border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.today { display: flex; flex-direction: column; gap: var(--space-8); }
.eyebrow { margin: 0; color: var(--muted); font-size: var(--text-md); }
.eyebrow:not([hidden]) + h1 { font-size: var(--text-hero); }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.home-left, .home-right { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.panel-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.panel-head h2 { margin: 0; }
.count-chip { padding: 2px var(--space-3); border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent-text);
              font-size: var(--text-sm); font-weight: 700; }
.waits-list { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.waits-list .button { align-self: stretch; }
.button.primary { border-radius: var(--radius-pill); }

/* the assistant's face, beside Home's greeting and headline (no note and no voice control is built) */
.face { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border-radius: 50%;
        background: linear-gradient(145deg, var(--accent-hi), var(--accent)); border: 3px solid var(--surface); color: var(--on-accent);
        font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700; box-shadow: 0 0 0 4px var(--accent-ring), 0 8px 24px var(--glow); }
.head.has-face { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-4); row-gap: var(--space-1); }
.head.has-face > .head-face { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.head.has-face > .eyebrow { grid-column: 2; grid-row: 1; }
.head.has-face > h1 { grid-column: 2; grid-row: 2; }
.head.has-face > .lead { grid-column: 1 / -1; grid-row: 3; }

/* the headline tiles, each a link to its place */
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
a.home-tile { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; padding: var(--space-4); text-decoration: none;
              background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
a.home-tile:hover { border-color: var(--line-input); }
a.home-tile .tile-label { display: flex; align-items: center; gap: var(--space-2); color: var(--muted); font-size: var(--text-sm); }
a.home-tile .tile-label .ico { width: 18px; height: 18px; color: var(--accent); }
a.home-tile .tile-figure { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-2xl); font-weight: 650;
                           overflow-wrap: anywhere; }
a.home-tile .tile-line { color: var(--muted); font-size: var(--text-sm); }

/* the ring of open jobs by stage */
.stages-body { display: flex; align-items: center; gap: var(--space-6); }
.donut { position: relative; display: flex; align-items: center; justify-content: center; flex: none; width: 132px; height: 132px; }
.donut svg { position: absolute; inset: 0; }
.donut-in { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.donut-num { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-num); font-weight: 650; }
.donut-cap { margin-top: var(--space-1); color: var(--muted); font-size: var(--text-xs); }
.arc.c1 { stroke: var(--chart-1); } .stages-key.c1 { background: var(--chart-1); }
.arc.c2 { stroke: var(--chart-2); } .stages-key.c2 { background: var(--chart-2); }
.arc.c3 { stroke: var(--chart-3); } .stages-key.c3 { background: var(--chart-3); }
.arc.c4 { stroke: var(--chart-4); } .stages-key.c4 { background: var(--chart-4); }
.arc.c5 { stroke: var(--chart-5); } .stages-key.c5 { background: var(--chart-5); }
.arc.c6 { stroke: var(--chart-6); } .stages-key.c6 { background: var(--chart-6); }
.stages-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0;
                 font-size: var(--text-sm); color: var(--ink-2); }
.stages-legend li { display: flex; align-items: center; gap: var(--space-2); }
.stages-key { width: 10px; height: 10px; flex: none; border-radius: 3px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1) var(--space-3);
          font-size: var(--text-sm); color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: var(--space-2); }
.key { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.empty.compact { padding: var(--space-6) var(--space-4); }
.ask-rows { list-style: none; margin: 0; padding: 0; }
.ask-rows li + li { border-top: 1px solid var(--line); }
.ask-row { display: flex; align-items: center; gap: var(--space-3); min-height: 62px; padding: var(--space-2) 0; text-decoration: none; }
.ask-row:hover .ask-row-title { text-decoration: underline; }
.ask-row > .ico { color: var(--muted); width: 18px; height: 18px; }
.ask-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ask-row-title { font-weight: 600; }
.ask-row-sub { color: var(--muted); font-size: var(--text-sm); }

.job-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
a.job-card { display: flex; flex-direction: column; gap: var(--space-3); position: relative; }
.job-grid .job-card > .ico { display: none; }
.job-top { display: flex; align-items: center; gap: var(--space-3); }
.job-names { min-width: 0; }
.job-title { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; line-height: var(--leading-tight); }
.job-sub { color: var(--muted); font-size: var(--text-sm); }
.job-child { margin-top: var(--space-1); }
.pie-square { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 64px; height: 64px;
              border-radius: var(--radius-md); background: var(--surface-2); }
.pie { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px;
       border-radius: 50%; background: conic-gradient(var(--accent) 0 var(--pct, 0%), var(--line) var(--pct, 0%) 100%); }
.pie.is-wait { background: conic-gradient(var(--warn) 0 var(--pct, 0%), var(--line) var(--pct, 0%) 100%); }
.pie::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface-2); }
.pie-in { position: relative; font-size: var(--text-xs); font-weight: 700; }
/* the status chip: 24 px round, icon and words */
.flag { display: inline-flex; align-self: flex-start; align-items: center; gap: var(--space-1); min-height: 24px; max-width: 100%;
        padding: 0 var(--space-3) 0 var(--space-2); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; }
.flag .ico { width: 16px; height: 16px; }
.job-note { color: var(--muted); font-size: var(--text-sm); }
.stage-bar { display: flex; gap: 3px; }
.stage-bar span { flex: 1; height: 5px; border-radius: var(--radius-pill); background: var(--surface-2); }
.stage-bar span.is-on { background: var(--accent); }
.stage-bar.is-wait span.is-on { background: var(--warn); }
.flag.is-wait { background: var(--warn-soft); color: var(--warn); }
.flag.is-ok { background: var(--ok-soft); color: var(--ok); }
.flag.is-plain { background: var(--surface-2); color: var(--ink-2); }
.cost { display: flex; justify-content: space-between; gap: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.cost-evidence { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: 400; font-variant-numeric: normal; }
.cost-evidence > .ico { width: 16px; height: 16px; }
.cost-evidence-note { font-size: var(--text-sm); }
.motion > .cost-evidence-note { margin-bottom: var(--space-3); }
.needs-evidence { color: var(--warn); font-weight: 600; }
.track { height: 8px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.bar-fill { width: var(--w, 0%); height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.bar-fill.is-over { background: var(--bad); }

.found .stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.section-head .count-chip { align-self: center; }
.plan-calendar { margin-bottom: var(--space-3); }
.plan-calendar h3 { margin: 0; font-size: var(--text-md); }
.plan-calendar .plan-row { min-height: 0; overflow-wrap: anywhere; }
.plan-rows { list-style: none; margin: 0; padding: 0; }
.plan-row { display: flex; align-items: center; gap: var(--space-3); min-height: 62px; padding: var(--space-2) 0; }
.plan-row + .plan-row { border-top: 1px solid var(--line); }
.plan-mark { width: 22px; height: 22px; flex: none; border: 2px solid var(--line-input); border-radius: 50%; }
.plan-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.plan-title { font-weight: 500; }
.plan-sub { color: var(--muted); font-size: var(--text-sm); }
.chip-flag { flex: none; padding: 2px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; }
.chip-flag.is-today { background: var(--accent-soft); color: var(--accent-text); }
.chip-flag.is-late { display: inline-flex; align-items: center; gap: var(--space-1); background: var(--bad-soft); color: var(--bad); }
.chip-flag .ico { width: 14px; height: 14px; }
a.found-row { display: flex; align-items: flex-start; gap: var(--space-3); background: var(--surface-2); box-shadow: none; border-color: transparent; }
.found-row > .ico { color: var(--accent); margin-top: 2px; }
.found-text { font-weight: 600; min-width: 0; }
.health { display: grid; grid-template-columns: 10px minmax(0, 1fr); align-items: center;
          gap: var(--space-1) var(--space-3); padding: var(--space-4) var(--space-5); }
.health .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.health.is-stopped .dot { background: var(--warn); }
.health.is-bad .dot { background: var(--bad); }
.health-text { grid-column: 2; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.health-text strong { color: var(--ink); font-size: var(--text-md); }

@media (min-width: 768px) {
  .home-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .face { width: 56px; height: 56px; font-size: var(--text-2xl); }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1100px) {
  .home-top { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .home-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eyebrow:not([hidden]) + h1 { font-size: var(--text-hero-desk); }
}

@media (max-width: 767px) {
  .today { gap: var(--space-6); }
  .home-top { gap: var(--space-6); }
  .stages-body { gap: var(--space-4); }
  .job-grid { grid-template-columns: minmax(0, 1fr); }
  .go-wide, .waits-list .button { align-self: stretch; }
  .btns button { flex: 1 1 auto; }
  .seg { padding: 0 var(--space-3); font-size: 13px; }
  .panel { padding: var(--space-4); }
}

/* ---------- Jobs */
.jobs-page, .jobs-body { display: flex; flex-direction: column; gap: var(--space-4); }
.search { display: flex; align-items: center; gap: var(--space-3); height: 44px; padding: 0 var(--space-4); background: var(--surface-2);
          border: 1px solid var(--line); border-radius: var(--radius-pill); }
.search .ico { width: 18px; height: 18px; flex: none; color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font: inherit; }
.search input:focus-visible { outline: none; }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-line { margin: calc(-1 * var(--space-2)) 0 0; color: var(--muted); font-size: var(--text-sm); }
.search-line:empty { display: none; }
.skeleton.search-bar { height: 44px; border-radius: var(--radius-pill); }
.job-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.job-list .job-card { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: var(--space-3); }
.job-list .job-card > .ico { display: none; }
.job-list .job-card > .flag { justify-self: start; }
/* the chip on the left, the cost on the right; when the two do not fit, the cost drops under the chip and stays right */
.job-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.job-meta .flag { flex: none; align-self: center; justify-self: start; }
.job-meta .cost { margin-left: auto; justify-content: flex-end; text-align: right; gap: var(--space-2); }
.more-jobs { align-self: center; }
@media (min-width: 768px) { .job-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .job-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- one job */
.job-page { display: flex; flex-direction: column; gap: var(--space-6); }
.job-head { display: flex; align-items: center; gap: var(--space-4); }
.job-head-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.job-head-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.job-head .flag { align-self: auto; }
.job-panel, .job-overview { display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.job-page > .segmented { align-self: stretch; }
.job-page > .segmented .seg { flex: 1; min-width: 0; }
@media (max-width: 767px) { .job-page > .segmented .seg { flex: 1 1 auto; padding: 0 var(--space-2); white-space: nowrap; } }
.job-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); align-items: start; }
@media (min-width: 1100px) { .job-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* a unit of work's child, set in under the unit's own track: part of the build, not a second job page */
.child-block { display: flex; flex-direction: column; gap: var(--space-4); padding-left: var(--space-4); border-left: 2px solid var(--line); }
.child-title { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--tap); color: var(--accent); text-decoration: none; }
.child-title:hover { text-decoration: underline; }
.child-title .ico, .job-child .ico { width: 16px; height: 16px; }
.job-child { display: flex; align-items: center; gap: var(--space-1); }
/* the child's money and timeline headings are h3 under its h2: drawn as the h2 is */
.child-block .panel h3 { margin: 0; font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; line-height: var(--leading-tight); }
.child-block .history h3 { margin-bottom: var(--space-4); }
.stages h2, .stages h3 { margin-bottom: var(--space-3); }
.stage-track { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stage { position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 44px; padding: var(--space-2) 0; text-align: left;
         font-size: var(--text-sm); color: var(--muted); }
.stage + .stage::before { content: ""; position: absolute; top: -50%; left: 13px; width: 2px; height: 100%; background: var(--line-input); }
.stage.is-done + .stage::before, .stage.is-now::before { background: var(--accent); }
.stage-dot { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
             background: var(--surface); border: 2px solid var(--line-input); color: var(--on-accent); }
.stage-dot .ico { width: 16px; height: 16px; }
.stage.is-done .stage-dot { background: var(--accent); border-color: var(--accent); }
.stage.is-now .stage-dot { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.stage.is-now .stage-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.stage.is-now { color: var(--ink); font-weight: 700; }
.stage-name { max-width: 100%; padding: 0 var(--space-1); }
.stage-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.stage-head .flag { margin: 0; }
.wait-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
             background: var(--warn-soft); color: var(--warn); font-size: var(--text-sm); font-weight: 600; }
.wait-chip .ico { width: 16px; height: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.tile { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); min-width: 0; }
.tile.is-wait { background: var(--warn-soft); }
.tile.is-wait .tile-label { color: var(--warn); }
.tile-label { color: var(--muted); font-size: var(--text-sm); }
.tile-figure { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; }
.evidence { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; }
.ev + .ev { border-top: 1px solid var(--line); }
.ev .ico { margin-top: 2px; }
.ev.is-met .ico { color: var(--ok); }
.ev.is-wait .ico { color: var(--warn); }
.ev.is-pending .ico { color: var(--muted); }
.ev-text { display: flex; flex-direction: column; min-width: 0; }
.ev-state { color: var(--muted); font-size: var(--text-sm); }
.money .section-head { align-items: baseline; }
.kind { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-3); }
.kind-line { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.kind-name { font-weight: 600; }
.kind-figure, .kind-line .needs-evidence { align-self: baseline; }
.kind-figure { font-size: var(--text-sm); color: var(--ink-2); }
.kind-figure.is-over { color: var(--bad); font-weight: 600; }
.kind .track { height: 12px; }
.money .needs-evidence { margin-top: var(--space-3); }
.money .kind-line .needs-evidence { margin-top: 0; }
.history h2, .people h2 { margin-bottom: var(--space-4); }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.timeline::before { content: ""; position: absolute; left: 17px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li { position: relative; }
.day { padding-left: 52px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.event { display: flex; gap: var(--space-3); }
.event-tile { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
              border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink-2); }
.event-tile .ico { width: 18px; height: 18px; }
.event-body { min-width: 0; }
.event-title { font-weight: 600; }
.event-time { color: var(--muted); font-size: var(--text-sm); }
.event-note { margin-top: var(--space-1); white-space: pre-wrap; }
.people-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.person-row { display: flex; align-items: center; gap: var(--space-3); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
          background: var(--surface-2); font-size: var(--text-sm); font-weight: 700; }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 600; }
.person-role { color: var(--muted); font-size: var(--text-sm); }

/* ---------- Found and Sent */
.found-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.found-tiles .tile-label { overflow-wrap: normal; }
.tiles.is-stats .tile { padding: var(--space-4) var(--space-5); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
                        border-radius: var(--radius-lg); }
.tiles.is-stats .tile-figure { font-size: var(--text-2xl); }
.tiles.is-stats .tile.is-warn .tile-figure { color: var(--warn); }
.tiles.is-stats .tile.is-warn .tile-label { display: flex; align-items: center; gap: var(--space-2); }
.tiles.is-stats .tile.is-warn .tile-label .ico { width: 16px; height: 16px; color: var(--warn); }
@media (max-width: 767px) {
  .found-tiles .tile { padding: var(--space-4) var(--space-3); }
  .found-tiles .tile.is-warn .tile-label { flex-wrap: wrap; align-items: flex-start; }
  .found-tiles .tile.is-warn .tile-label .ico { flex: none; margin-top: 2px; }
}
.tile-line { color: var(--muted); font-size: var(--text-sm); }
.region > .tiles + .feed { margin-top: var(--space-4); }
.finding-list { max-width: none; }
/* a finding is a card: the who chip and the title on the left, the worth on the right, then the evidence line and the buttons */
.finding { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-2) var(--space-4); }
.finding-main { display: contents; }
.finding-who { grid-column: 1; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px;
               padding: 0 var(--space-3) 0 var(--space-2); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; }
.finding-who.is-rule { background: var(--surface-2); color: var(--ink-2); }
.finding-who.is-ai { background: var(--accent-soft); color: var(--accent-text); }
.finding-who .ico { width: 16px; height: 16px; }
.finding-title { grid-column: 1; grid-row: 2; overflow-wrap: anywhere; text-wrap: balance; }
.finding-based, .finding-chat { grid-column: 1 / -1; color: var(--ink-2); }
.finding-chat { font-size: var(--text-sm); color: var(--muted); }
.finding-worth { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-1); text-align: right; }
.worth-label { color: var(--muted); font-size: var(--text-xs); }
.worth-figure { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 700; }
.finding-worth .needs-evidence { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 24px; padding: 0 var(--space-3) 0 var(--space-2);
                                 border-radius: var(--radius-pill); background: var(--warn-soft); color: var(--warn); font-size: var(--text-sm); }
.finding-worth .needs-evidence .ico { width: 16px; height: 16px; }
.finding .btns { grid-column: 1 / -1; width: 100%; }
.finding .answer { grid-column: 1 / -1; align-self: stretch; }
.more-findings { width: 100%; }
@media (max-width: 767px) {
  .finding .btns button { flex: 1 1 0; }
  .finding-worth { grid-row: 1; }
  .finding-title { grid-column: 1 / -1; }
}
@media (max-width: 399px) {
  .finding-who { grid-column: 1 / -1; }
  .finding-worth { grid-row: 2; }
  .finding-title { grid-row: 3; }
}
@media (min-width: 768px) { .more-findings { width: auto; } }
@media (min-width: 1100px) {
  .finding-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.spend-label { margin-bottom: var(--space-1); color: var(--muted); font-size: var(--text-sm); }
.spend-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin-bottom: var(--space-3); }
.spend-line { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 700; }
.spend-calls { color: var(--muted); font-size: var(--text-sm); }
.spend .track { height: 12px; }
/* Sent: the spend card first, then the list; side by side from 1100 px, the list taking the whole width when there is no spend card */
.sent-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.sent-day { margin: var(--space-4) 0 var(--space-2); color: var(--muted); font-family: inherit; font-size: var(--text-xs); font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.04em; }
.sent-day:first-child { margin-top: 0; }
.sent-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.sent-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.sent-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sent-title { font-weight: 600; overflow-wrap: anywhere; text-wrap: balance; }
.sent-sub { color: var(--muted); font-size: var(--text-sm); }
.sent-row.is-undone .sent-title { text-decoration: line-through; color: var(--ink-2); }
.sent-state { display: inline-flex; align-items: center; gap: var(--space-1); flex: none; min-height: 24px; padding: 0 var(--space-3); border-radius: var(--radius-pill);
              background: var(--surface-2); color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; }
.sent-state .ico { width: 16px; height: 16px; }
.sent-state.is-bad { background: var(--bad-soft); color: var(--bad); }
.sent-state.is-chat { background: var(--accent-soft); color: var(--accent-text); }
.sent-state:has(.ico) { padding-left: var(--space-2); }
@media (max-width: 767px) {
  .sent-row { display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: var(--space-3) var(--space-4); }
  .sent-state { grid-column: 2; justify-self: start; }
}
@media (min-width: 1100px) {
  .sent-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .sent-grid > :not(.spend) { grid-column: 1 / -1; grid-row: 1; }
  .sent-grid > .spend { grid-column: 2; grid-row: 1; }
  .sent-grid > .spend + * { grid-column: 1; }
}

/* ---------- Specialists, and Settings' "Your business" card (spec 2026-10-28-specialists-catalogue) */
.your-business { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
                 box-shadow: var(--shadow-1); }
.your-business h2 { color: var(--ink); font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 700;
                    text-transform: none; padding: var(--space-5) var(--space-5) var(--space-1); margin: 0; }
.your-business .more-list { border: 0; border-radius: 0; background: none; }
.your-business .more-list a { min-height: 56px; padding: var(--space-2) var(--space-5); }
.your-business .more-tile { width: 40px; height: 40px; border-radius: 50%; }
@media (min-width: 1100px) { .your-business { max-width: 560px; } }

/* Settings' Appearance card (row 2026-11-12-page-appearance-card): one panel, one column at every width, under Your business */
.appearance { display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 1100px) { .appearance { max-width: 560px; } }
.appearance h2 { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 700; margin: 0; }
.appearance h3 { font-size: var(--text-md); font-weight: 700; margin: 0; }
.appearance-label { color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; margin-top: var(--space-2); }
/* the three modes share one row and never wrap to a second; "Match my device" stays whole at 320 */
.appearance-modes { align-self: stretch; }
.appearance-modes .seg { flex: 1 1 auto; white-space: nowrap; min-width: 0; justify-content: center; padding: 0 var(--space-2); text-align: center; }
.appearance-modes .seg .ico { width: 18px; height: 18px; }
@media (max-width: 374px) { .appearance-modes .seg .ico { display: none; } }
.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 64px)); gap: var(--space-2); }
.swatch { display: inline-flex; align-items: center; flex-direction: column; gap: var(--space-1); min-width: 0; padding: var(--space-1); padding-inline: 0; border-radius: var(--radius-md); color: var(--ink-2); }
.swatch-dot { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
              border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch.is-on .swatch-dot { box-shadow: 0 0 0 2px var(--ink); }
.swatch.is-on { color: var(--ink); }
.swatch-dot .ico { width: 18px; height: 18px; color: var(--surface); }
.swatch-name { font-size: var(--text-xs); }
.sw-cobalt { background: var(--swatch-cobalt); }
.sw-spruce { background: var(--swatch-spruce); }
.sw-harbor { background: var(--swatch-harbor); }
.sw-clay { background: var(--swatch-clay); }
.sw-plum { background: var(--swatch-plum); }
.appearance-said { color: var(--ink-2); font-size: var(--text-sm); }  /* kept in the layout when empty, so it is read when it speaks */
.appearance-business { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding-top: var(--space-4);
                       border-top: 1px solid var(--line); margin-top: var(--space-2); }
.more-list a.more-row { flex-direction: row; align-items: center; gap: var(--space-3); }
.more-tile { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
             border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink-2); }
.more-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.more-row > .ico { width: 18px; height: 18px; color: var(--muted); }

/* the team's faces: the assistant first, then the own specialists; two across below 1100 px (the assistant's card the full width) */
.sp-faces { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.sp-face { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); min-width: 0; padding: var(--space-5) var(--space-4); text-align: center;
           background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.sp-face .face { width: 84px; height: 84px; font-size: var(--text-3xl); }
.sp-face.is-assistant { grid-column: 1 / -1; flex-direction: row; text-align: left; gap: var(--space-5); }
.sp-face.is-assistant .face { width: 96px; height: 96px; }
.sp-face-text { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); flex: 1 1 auto; min-width: 0; }
.sp-face.is-assistant .sp-face-text { align-items: flex-start; }
.sp-face-text .sp-chip { margin-top: auto; }
.sp-face-text .sp-chat { justify-content: center; text-align: left; }
.face-specialist { background: var(--accent-soft); color: var(--accent); }
.sp-pointer, .sp-coming-line, .sp-chat { display: flex; align-items: flex-start; gap: var(--space-2); }
.sp-pointer .ico, .sp-coming-line .ico, .sp-chat .ico, .sp-chip .ico, .sp-coming .ico { width: 16px; height: 16px; margin-top: 2px; }
.sp-pointer { color: var(--muted); font-size: var(--text-sm); margin-bottom: var(--space-6); }
.sp-also { padding: var(--space-5); }
.sp-also > .section-head { margin-bottom: var(--space-2); }
.sp-tier > .section-head > h3 { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; margin: 0; }
.sp-tier + .sp-tier { margin-top: var(--space-6); }
.sp-tier .section-head { margin-bottom: var(--space-1); }
.chip-flag.sp-coming { display: inline-flex; align-items: center; gap: var(--space-1); background: var(--surface-2); color: var(--ink-2); }
.chip-flag.sp-coming .ico { margin-top: 0; }
.sp-tier-line { color: var(--muted); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.sp-rows { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.sp-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 232px; align-items: start; gap: var(--space-4);
          padding: var(--space-4) var(--space-5); }
.sp-row + .sp-row { border-top: 1px solid var(--line); }
.sp-tile { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
           border-radius: var(--radius-md); background: var(--surface-2); color: var(--ink-2); }
.sp-tile.is-included { background: var(--accent-soft); color: var(--accent); }
.sp-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-name { margin: 0; font-family: var(--font-ui); letter-spacing: normal; font-size: var(--text-md); font-weight: 600; line-height: var(--leading-tight); }
.sp-does { color: var(--ink-2); }
.sp-coming-line { margin-top: var(--space-1); color: var(--ink-2); font-size: var(--text-sm); }
.sp-side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.sp-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-3); border-radius: var(--radius-pill);
           font-size: var(--text-sm); font-weight: 600; }
.sp-chip .ico { margin-top: 0; }
.sp-chip.is-included { background: var(--ok-soft); color: var(--ok); }
.sp-chip.is-ready { background: var(--ok-soft); color: var(--ok); }
.sp-chip.is-coming, .sp-chip.is-available { background: var(--surface-2); color: var(--ink-2); }
.sp-chip.is-add-on { background: var(--info-soft); color: var(--info); }
.sp-chat { color: var(--muted); font-size: var(--text-sm); }
.sp-empty { display: flex; align-items: flex-start; gap: var(--space-4); }
.sp-empty-title { font-family: var(--font-display); letter-spacing: var(--tracking-tight); font-size: var(--text-lg); font-weight: 650; }
.sp-locked { display: flex; align-items: flex-start; gap: var(--space-3); }
.sp-locked > .ico { width: 24px; height: 24px; color: var(--muted); }
.sp-locked-words { display: flex; flex-direction: column; gap: var(--space-1); color: var(--ink-2); }
.sp-locked-title { font-weight: 700; color: var(--ink); }
.sp-sk-faces { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.sp-sk-item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-5) var(--space-4);
              background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.skeleton.sp-sk-face { width: 84px; height: 84px; border-radius: 50%; }
.skeleton.sp-sk-bar { width: 70%; height: 14px; border-radius: var(--radius-pill); }
.skeleton.sp-sk-bar.is-short { width: 45%; }
.sp-sk-tier { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-4); }
.sp-sk-tier .skeleton.card-block { height: 240px; }
.skeleton.sp-sk-heading { height: 22px; width: 180px; max-width: 100%; border-radius: var(--radius-pill); }
@media (min-width: 768px) {
  .sp-side { align-items: flex-end; text-align: right; }
  .sp-side .sp-chat { justify-content: flex-end; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .sp-row { grid-template-columns: 36px minmax(0, 1fr) 200px; }
}
@media (min-width: 1100px) {
  .sp-faces, .sp-sk-faces { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sp-face.is-assistant { grid-column: auto; flex-direction: column; text-align: center; gap: var(--space-3); }
  .sp-face.is-assistant .face { width: 84px; height: 84px; }
  .sp-face.is-assistant .sp-face-text { align-items: center; }
}
@media (max-width: 767px) {
  .sp-row { grid-template-columns: 36px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4); }
  .sp-side { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
}

/* ---------- the sign-in screens: a dark splash (signin.html carries data-mode="dark"), the mark and the title, one card, no navigation */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-4);
  background: radial-gradient(ellipse at top, var(--splash-hi), var(--splash) 70%);
}
.splash-brand { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.splash-brand .face { width: 112px; height: 112px; }
.splash-brand .face .ico { width: 48px; height: 48px; }
.splash-brand p { color: var(--ink); font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; }
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 380px;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  color: var(--ink-2);
}
.card h1 { color: var(--ink); }
.card .note { font-size: var(--text-sm); }
.card form { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.card label { font-weight: 600; color: var(--ink); }
.card input {
  width: 100%;
  min-height: 56px;
  padding: 0 var(--space-4);
  font: inherit;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-input);
  border-radius: var(--radius-sm);
}
.card input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: var(--text-sm); font-weight: 600; }
.card button { margin-top: var(--space-2); }

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