/* Team AI design system — extracted verbatim from public/index.html
 * source: AustralianChristianArts/acha-team-ai @ b254d94
 * generated by .design-sync/extract-ds.mjs — do not hand-edit; re-extract instead. */

/* ── @font-face (urls rewritten to ./fonts/) ── */
/* @ds-font-face-dropped: unresolvable src */
/* @ds-font-face-dropped: unresolvable src */
/* @ds-font-face-dropped: unresolvable src */
/* @ds-font-face-dropped: unresolvable src */
/* @ds-font-face-dropped: unresolvable src */
/* @ds-font-face-dropped: unresolvable src */

/* ── design tokens (every :root scope, in document order) ── */
/* :root — from <style id="(inline)"> */
:root {
      /* Light-only app — opt out of Android Chrome auto-dark inversion. */
      color-scheme: only light;
      /* AChA 2026 canonical palette */
      --black:     #000000;
      --white:     #FFFFFF;
      --teal:      #6E9C9C;  /* Dusty Teal — primary accent */
      --teal-light:#f0f6f6;  /* teal at 8% (hover/highlight tint) */
      --teal-text: #4F7474;  /* AA teal for TEXT under 24px — #6E9C9C is 3.04:1 on white; keep it for headings >=24px, rings, fills */
      /* Part D consistency 6 (2026-08-01): SEVEN kicker/heading micro-specs
         collapsed to TWO. Every uppercase section label reads these. */
      --kicker-size: 11px; /* @kind font */ --kicker-weight: 600; /* @kind font */ --kicker-track: 0.1em; /* @kind font */
      --section-head-size: 13px; /* @kind font */ --section-head-weight: 700; /* @kind font */ --section-head-track: 0.07em; /* @kind font */
      /* ── Foundations (DESIGN-SYSTEM-STANDARD.md, 2026-08-01) ──────────────
         Named scales. New code MUST use these; existing raw values migrate
         surface-by-surface as each is visually verified. */
      --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
      --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
      --fs-1: 11px; --fs-2: 12px; --fs-3: 13px; --fs-4: 14px;
      --fs-5: 15px; --fs-6: 17px; --fs-7: 22px; --fs-8: 28px;
      /* Layer ladder — structural surfaces only; the 5590–10000 one-off
         escalations are catalogued in the standard for the visual pass. */
      --z-header: 60; /* @kind other */ --z-nav: 100; /* @kind other */ --z-overlay: 200; /* @kind other */ --z-menu: 400; /* @kind other */
      --z-sheet: 1000; /* @kind other */ --z-toast: 4600; /* @kind other */ --z-login: 5000; /* @kind other */ --z-debug: 99999; /* @kind other */
      --focus-ring: 0 0 0 2px var(--white), 0 0 0 4px var(--teal); /* @kind shadow */
      --o-dim: 0.55; /* @kind other */ --o-soft: 0.72; /* @kind other */ --o-strong: 0.85; /* @kind other */
      --teal-dark: #5A8585;  /* 2026-05-25: brand-consistent hover darker.
                                Was: ad-hoc var(--teal-dark) (bright cyan-aqua —
                                off-brand) and #5d8f8f (close but not
                                canonical). All teal hovers route here now. */
      --taupe:     #C5BDA2;  /* Light Taupe — secondary backgrounds, accents */
      --taupe-soft:#EFE9D8;  /* taupe wash for subtle backgrounds (code, table rows) */
      --olive:     #C9CE55;  /* Olive Yellow — THE urgency colour (2026-08-01): anything urgent or due today carries the olive family; sparing everywhere else */
      --olive-text: #5C6410; /* AA olive ink — urgent/today TEXT reads olive too (raw --olive fails contrast under 24px) */
      --crimson:   #9B0D0D;  /* Crimson Red — passion accent (max one use) */
      --off-white: var(--white);  /* collapsed 2026-08-01: ONE white everywhere — no paper-vs-white drift */
      --paper:     var(--white);  /* alias — the ground IS --white. Element backgrounds are only ever
                                --white, --dusty / --dusty-deep, or a semantic wash. Never a second near-white. */
      --dusty:      #EEF4F4;  /* Dusty Teal wash — card / panel / hub surface on the white ground */
      --dusty-deep: #DFEBEB;  /* deeper dusty — hover + selected tints and pill washes on dusty surfaces */
      --border:    #E2E2E2;
      --text:      #111111;
      --muted:     #6b6b6b; /* WCAG AA on white = 4.5:1 contrast. Was #888 = 3.5:1, failed Lighthouse audit. */
      /* Semantic colours — derived from the brand palette, NOT from generic web greens/reds.
         Per brand-guidelines.md the palette is Pure White / Deep Black / Dusty Teal / Light Taupe
         primary; Olive Yellow + Crimson Red as accents. We map success → teal (cool, calm,
         on-brand) and error → crimson. Avoids the off-brand greens (var(--success)) and pinks (var(--error-bg))
         the bot was using. Light tints stay within the same hue family for visual cohesion. */
      --success:    #4F7A7A;  /* darker teal for AA contrast on success badges */
      --success-bg: var(--dusty-deep);  /* deep enough to read on dusty cards */
      --success-border: var(--teal);
      /* Per Ryan 2026-05-12: do NOT use red anywhere in the UI.
         Crimson stays defined so legacy CSS doesn't break, but every active
         use point now maps to a non-red colour. Errors / destructive states
         use Deep Black for the text + Olive-Dark warm-brown for the warning
         background, keeping the cue visible without the red palette. */
      --error:        #000000;   /* Deep Black — was Crimson Red, removed */
      --error-bg:     var(--taupe-soft);   /* taupe-soft — was crimson-soft pink */
      --error-border: #84591b;   /* olive-dark — was Crimson */
      --warning:      var(--olive-text);   /* 2026-08-01: warnings are OLIVE too — same AA olive ink as urgent/today */
      --warning-bg:   #FBF7DA;   /* olive at ~10%, soft sun wash */
      --warning-border: var(--olive);
      /* 2026-06-10 brand sweep — semantic "info/waiting" family (was off-palette
         purple #6b1aa5 on #f3e8fd in task statuses + queues). Calm taupe family,
         AA contrast, consistent with the no-generic-web-colours rule above. */
      --info:         #5C5340;   /* deep warm taupe — AA on --info-bg and white */
      --info-bg:      var(--taupe-soft);   /* taupe-soft wash */
      --info-border:  var(--taupe);
      /* 2026-06-10: --warm-amber was referenced 3x but never defined, so the
         off-brand orange #c2410c fallback was rendering. Defined on-brand. */
      --warm-amber:   var(--olive-text); /* follows the olive warning ink */
      /* 2026-08-01: dark rail RETIRED ("never use the dark theme, even on the
         sidebar" — Ryan). The rail is now a dusty light surface; the active
         chat lifts to white, same language as card hover. Token names kept
         so existing rail CSS keeps working. */
      --sidebar-bg:    var(--dusty);
      --sidebar-text:  var(--text);
      --sidebar-muted: var(--muted);
      --sidebar-hover: var(--dusty-deep);
      --sidebar-active: var(--white);
      --sidebar-border: var(--border);
      --font-heading: 'NeueRegrade', 'Helvetica Neue', Helvetica, Arial, sans-serif;
      --font-body:    'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif;

      /* ── Apple HIG design tokens (added 2026-05-12) ───────────────────────
         Layered on top of AChA brand colours and fonts (NOT replacing them).
         Sourced from Apple Human Interface Guidelines:
           • Generous radius scale (cards 12, sheets 16, pills 22)
           • Soft multi-layer shadows (no harsh drop shadows)
           • Apple's standard motion curve (ease-out-quart)
           • Frosted-glass surfaces on sticky / floating elements
           • Hairline dividers (1px / 0.5px) at reduced opacity
           • Modular spacing rhythm (4/8/12/16/24/32/48)
           • Min 44pt touch targets on interactive surfaces */
      --radius-xs:  4px;
      --radius-sm:  8px;
      --radius-md:  12px;   /* default for cards */
      --radius-lg:  16px;   /* sheets, modals */
      --radius-xl:  22px;   /* pill buttons, search bars */
      --radius-full: 9999px;
      --radius-panel: var(--radius-lg);   /* panels + hub groups share 16 with sheets — concentric with the 12px cards they contain (was 14, too close to card 12 to read) */
      --radius-item: 6px;   /* nested menu items (menu 8 minus 2px inset) */
      --fab-offset: 88px;   /* bottom clearance so the task FAB floats ABOVE the chat widget */

      --shadow-xs: 0 1px 2px rgba(17, 17, 17, 0.04);
      --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.04), 0 1px 4px rgba(17, 17, 17, 0.04);
      --shadow-md: 0 2px 4px rgba(17, 17, 17, 0.04), 0 4px 12px rgba(17, 17, 17, 0.06);
      --shadow-lg: 0 4px 8px rgba(17, 17, 17, 0.05), 0 12px 28px rgba(17, 17, 17, 0.09);
      --shadow-xl: 0 8px 16px rgba(17, 17, 17, 0.06), 0 24px 48px rgba(17, 17, 17, 0.12);
      --shadow-focus: 0 0 0 4px rgba(110, 156, 156, 0.22); /* teal halo */

      --ease-out:    cubic-bezier(0.32, 0.72, 0, 1); /* @kind other */     /* Apple's ease-out-quart */
      --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
      --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* @kind other */  /* very subtle overshoot */
      --duration-fast:   180ms; /* @kind other */
      --duration-normal: 280ms; /* @kind other */
      --duration-slow:   400ms; /* @kind other */

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

      --hairline:        1px solid rgba(0, 0, 0, 0.08); /* @kind other */
      --hairline-strong: 1px solid rgba(0, 0, 0, 0.14); /* @kind other */
      --hairline-dark:   1px solid rgba(255, 255, 255, 0.10); /* @kind other */

      --glass-bg:        rgba(255, 255, 255, 0.72);
      --glass-bg-dark:   rgba(23, 23, 23, 0.72);
      --glass-blur:      saturate(180%) blur(20px); /* @kind other */

      --tap-min: 44px; /* iOS HIG minimum touch target */

      /* ── The Threshold brand palette (added 2026-05-17) ────────────────────
         New tokens for the wait-state composition and bot-reply signature.
         These layer on top of (not replacing) the existing AChA palette. */
      --ink:       #0D0D0F;   /* darkest text + neume strokes (Voice) */
      --midnight:  #16243C;   /* deep blue for Benesh body marks */
      --gold-leaf: #C19A4C;   /* warm gold for te'amim Word marks + status */
      --stone:     #AB9F93;   /* muted warm grey for staff lines + Geresh badge */
      --sandstone: #DCC8B0;   /* lighter sandstone wash, hover/idle states */
      --font-serif: Georgia, 'Times New Roman', serif;
    }

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
/* :root — from <style id="(inline)"> */
:root {
        --hairline: 0.5px solid rgba(0, 0, 0, 0.12); /* @kind other */
        --hairline-strong: 0.5px solid rgba(0, 0, 0, 0.18); /* @kind other */
        --hairline-dark: 0.5px solid rgba(255, 255, 255, 0.14); /* @kind other */
      }
}

/* :root — from <style id="(inline)"> */
:root {
      /* Surfaces — map to existing brand colours but with cleaner names */
      --surface-base:    var(--paper);
      --surface-raised:  var(--dusty);
      --surface-overlay: var(--white);
      --surface-tint:    rgba(110, 156, 156, 0.06);

      /* Borders — two tiers only */
      --border-subtle:   rgba(17, 17, 17, 0.08);
      --border-strong:   var(--border);

      /* Text — three tiers */
      --text-primary:    var(--text);
      --text-secondary:  #4a4a4a;
      --text-muted:      var(--muted);

      /* State accents — only two: accent (teal) and urgent (olive/warning) */
      --accent:          var(--teal);
      --accent-soft:     var(--dusty-deep);
      --accent-border:   var(--teal);
      --urgent:          var(--warning);
      --urgent-soft:     var(--warning-bg);
      --urgent-border:   var(--warning-border);

      /* Row density (compact / standard / comfortable) */
      --row-py: 12px;
      --row-px: 16px;
      --row-gap: 10px;
      --chip-py: 3px;
      --chip-px: 8px;
      --chip-fs: 11px;

      /* Motion (already defined above — alias for clarity) */
      --t-fast:    var(--duration-fast); /* @kind other */
      --t-normal:  var(--duration-normal); /* @kind other */
      --easing:    var(--ease-out); /* @kind other */
    }

/* ── canonical component layer — <style id="acha-visual-refresh"> verbatim ── */
/* ── AChA visual refresh (Ryan approved 2026-08-01, "every bit"). One
     language on every surface: the signature Dusty-Teal → Olive-Yellow band
     under each view masthead, white card panels floating on the off-white
     ground, one kicker rhythm. The chat MESSAGE column deliberately keeps
     its flat reading surface — the critique's best screen. Late-in-cascade
     by design: this block is the new law over the earlier flat skins. ── */
  .ms-welcome-band, .acha-band {
    height: 6px; border-radius: 999px;
    background: linear-gradient(90deg, var(--teal), var(--olive));
  }
  #ms-welcome .ms-welcome-band { margin: 10px 0 14px; max-width: 460px; }
  /* View mastheads carry the band as a full-width closing stroke. */
  .tasks-view-header { flex-wrap: wrap; border-bottom: 0; }
  .tasks-view-header::after, .forms-hub-head::after {
    content: ''; display: block; width: 100%; height: 5px; border-radius: 999px;
    background: linear-gradient(90deg, var(--teal), var(--olive));
    margin-top: 10px;
  }
  .forms-hub-head { flex-wrap: wrap; }
  /* Home panels float as white cards on the ground. */
  #messages > #role-chips, #messages > #chips, #home-forms-widget,
  #ambient-person-panel, #parallel-work-strip {
    background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-panel);
    box-shadow: var(--shadow-xs);
    padding: var(--sp-4); margin: var(--sp-3) auto 0; max-width: 660px;
  }
  #messages > #role-chips[hidden], #home-forms-widget[hidden],
  #ambient-person-panel[hidden], #parallel-work-strip[hidden] { display: none; }
  body.mobile-shell #messages > #role-chips, body.mobile-shell #messages > #chips,
  body.mobile-shell #home-forms-widget { margin-left: 14px; margin-right: 14px; padding: 12px 14px; }
  /* Tasks: rows become cards. */
  .task-card {
    background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-md);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4); margin-bottom: var(--sp-3);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
  }
  .task-card:hover { background: var(--white); border-color: var(--teal); box-shadow: var(--shadow-md); }
  .task-card.ms-task-row { border-radius: var(--radius-md); margin-bottom: var(--sp-2); }
  .task-section-heading { border-bottom: 0; }
  /* Forms hub: each form is a card. */
  .form-hub-card {
    background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-md);
    border-bottom: 1px solid var(--border);
    padding: var(--sp-4); margin-bottom: var(--sp-3);
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
  }
  .form-hub-card:last-child { border-bottom: 1px solid var(--border); }
  .form-hub-card.is-mine { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--teal); }
  /* Urgency edge — the olive twin of the teal "yours" edge: urgent or due today. */
  .task-card.is-today, .form-hub-card.is-today { margin-left: 0; padding-left: 16px; border-left: 3px solid var(--olive); }
  /* ONE back affordance everywhere ("standardise everything, including all
     back features" — Ryan 2026-08-01): chevron + label, 44px, teal-text ink,
     quiet pill; hover fills with the tint. Applies to the Tasks/Forms header
     back, the knowledge-base back, and the flow engine's Back chip. */
  .tasks-back-btn, .info-back-btn, .flow-chip-back {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px;
    background: transparent; border: 1px solid transparent;
    color: var(--teal-text); font-weight: 600; font-size: 13.5px; cursor: pointer;
  }
  .tasks-back-btn:hover, .info-back-btn:hover, .flow-chip-back:hover:not(:disabled) {
    background: var(--dusty-deep); border-color: var(--teal); color: var(--success);
  }
  /* Selection + placeholder conventions (standard: Miscellaneous). */
  ::selection { background: var(--dusty-deep); color: var(--text); }
  ::placeholder { color: var(--muted); opacity: 1; }
  /* Focus baseline (standard: Accessibility): every interactive element
     shows a ring on keyboard focus. Component-specific :focus-visible rules
     earlier in the cascade still win where they exist. */
  button:focus-visible, a:focus-visible, [role="button"]:focus-visible,
  input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
  }
  /* ── Canonical component classes (DESIGN-SYSTEM-STANDARD.md slices 3–5).
     The three-step button scale and three chip primitives for all NEW code;
     existing per-surface skins migrate onto these with eyes on each screen. */
  .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 var(--sp-4); border-radius: 999px;
    background: var(--teal); color: var(--white); border: 1px solid var(--teal);
    font-family: var(--font-body); font-size: var(--fs-4); font-weight: 600; cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
  }
  .btn-primary:hover { background: var(--teal-dark, #5A8585); }
  .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 var(--sp-4); border-radius: 999px;
    background: transparent; color: var(--success); border: 1px solid var(--teal);
    font-family: var(--font-body); font-size: var(--fs-4); font-weight: 600; cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
  }
  .btn-secondary:hover { background: var(--dusty-deep); }
  .btn-quiet {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 var(--sp-3); border-radius: 999px;
    background: transparent; color: var(--teal-text); border: 1px solid transparent;
    font-family: var(--font-body); font-size: var(--fs-4); font-weight: 600; cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  }
  .btn-quiet:hover { background: var(--dusty-deep); color: var(--success); }
  .btn-primary:disabled, .btn-secondary:disabled, .btn-quiet:disabled {
    opacity: var(--o-dim); cursor: not-allowed;
  }
  /* Chip primitives (state pill / meta tag / action pill). */
  .pill-state { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-1); font-weight: 600; }
  .pill-state.is-urgent { background: var(--warning-bg); color: var(--olive-text); box-shadow: inset 0 0 0 1px var(--olive); }
  .tag-meta   { display: inline-block; padding: 2px 8px;  border-radius: var(--radius-xs); font-size: var(--fs-1); color: var(--muted); background: var(--taupe-soft); }
  .pill-action{ display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--sp-3); border-radius: 999px; font-size: var(--fs-2); font-weight: 600; border: 1px solid var(--border); background: var(--white); cursor: pointer; transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
  .pill-action:hover { border-color: var(--teal); background: var(--dusty-deep); color: var(--success); }
  /* Input state conventions (standard: Components/inputs). */
  .field-error-text { font-size: var(--fs-2); color: var(--error); font-weight: 600; margin-top: var(--sp-1); }
  .field-helper-text { font-size: var(--fs-2); color: var(--muted); margin-top: var(--sp-1); }
  input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--warning) !important; }
  /* ── Entity chips — a shape grammar so kinds read at a glance (2026-08-01):
     people = pill + initial disc · status = tinted pill (.pill-state) ·
     tags = soft rectangle (.tag-meta) · actions = bordered white pill (.pill-action) ·
     dates = bare tracked micro-type, no container. Shape carries the kind;
     colour is never the only cue. "//" (.meta-sep) separates inline metadata runs. */
  .chip-person { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px 2px 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--white); font-size: var(--fs-2); font-weight: 600; color: var(--text); }
  .chip-person .chip-avatar { width: 18px; height: 18px; border-radius: 999px; background: var(--dusty-deep); color: var(--teal-text); font-family: var(--font-heading); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .chip-person.is-mine { border-color: var(--teal); }
  .chip-person.is-mine .chip-avatar { background: var(--teal); color: var(--white); }
  .chip-date { display: inline-flex; align-items: baseline; gap: 4px; font-size: var(--fs-1); font-weight: 600; letter-spacing: var(--kicker-track); text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .chip-date.is-due, .chip-date.is-today { color: var(--olive-text); }
  .chip-date strong, .select-field strong { font-weight: 700; } /* weekday names (Mon, Fri…) always bold */
  .chip-date.is-due::before, .chip-date.is-today::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--olive); align-self: center; }
  .meta-sep { color: var(--teal); font-weight: 600; padding: 0 2px; user-select: none; }
  /* Tools hub groups become cards on the ground, same as everything else. */
  #tools-hub-view .ms-hub-group {
    background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-panel);
    box-shadow: var(--shadow-xs); margin: 0 0 var(--sp-3); overflow: hidden;
  }
  /* ── Icon conventions (2026-08-01): one visual voice for every glyph.
     Inline SVG or sprite <use>, stroke 1.75 currentColor, no fills, no
     coloured icons — icons are quiet typographic marks. 16px base. */
  .icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
  .icon-sm { width: 13px; height: 13px; vertical-align: -2px; }
  .icon-md { width: 18px; height: 18px; vertical-align: -4px; }
  /* 2026-08-01: icons are PAINTED with the band gradient by default (Ryan: "fill
     all icons with the gradient"). Stroke paint uses a url ref with a currentColor
     fallback — include the defs snippet ONCE per page:
     <svg width="0" height="0" style="position:absolute" aria-hidden="true"><defs>
     <linearGradient id="acha-icon-grad" x1="0" y1="0" x2="1" y2="0">
     <stop offset="0" stop-color="#6E9C9C"/><stop offset="1" stop-color="#C9CE55"/>
     </linearGradient></defs></svg>
     Icons INSIDE filled buttons, pills and the FAB keep currentColor — a gradient
     glyph on a teal fill is illegible. */
  .icon { stroke: url(#acha-icon-grad) currentColor; }
  .btn-primary .icon, .btn-secondary .icon, .btn-quiet .icon, .pill-action .icon,
  .task-fab .icon, .chip-remove .icon { stroke: currentColor; }
  /* ── Footer bar (2026-08-01): the bottom navigation surface. White (raised)
     on the dusty/white scheme, hairline top edge, 44px tabs. Active tab uses
     the dusty wash + teal-text ink — colour never alone. */
  .footer-bar {
    position: sticky; bottom: 0; z-index: var(--z-nav);
    display: flex; align-items: stretch; justify-content: space-around; gap: var(--sp-1);
    background: var(--white); border-top: 1px solid var(--border);
    padding: var(--sp-1) var(--sp-2) calc(var(--sp-1) + env(safe-area-inset-bottom, 0px));
  }
  .footer-tab {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 44px; min-width: 44px; padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-sm);
    background: transparent; border: 0; color: var(--muted);
    font-family: var(--font-body); font-size: var(--fs-1); font-weight: 600; cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
  }
  .footer-tab:hover { background: var(--dusty); color: var(--text); }
  .footer-tab.is-active, .footer-tab[aria-current="page"] { background: var(--dusty); color: var(--teal-text); }
  /* ── Site idioms brought into the product (2026-08-01, from australianchristianarts.com):
     the big-number stat, the "01 ·" numbered index, and the quiet progress meter. */
  .stat { display: flex; flex-direction: column; gap: 2px; }
  .stat-number { font-family: var(--font-heading); font-size: var(--fs-8); font-weight: 700; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
  .stat-label { font-size: var(--fs-2); font-weight: 600; color: var(--muted); }
  .stat.is-today .stat-number { color: var(--olive-text); }
  .card-index { font-size: var(--kicker-size); font-weight: var(--kicker-weight); letter-spacing: var(--kicker-track); text-transform: uppercase; color: var(--teal-text); font-variant-numeric: tabular-nums; }
  .card-index::after { content: " ·"; color: var(--muted); }
  .progress { height: 6px; border-radius: 999px; background: var(--dusty-deep); overflow: hidden; }
  .progress-fill { height: 100%; border-radius: 999px; background: var(--teal); transition: width var(--duration-normal) var(--ease-out); }
  .progress.is-today .progress-fill { background: var(--olive); }
  /* ── Task FAB (2026-08-01): the round floating task button. Fixed bottom-LEFT,
     lifted --fab-offset so it sits ABOVE the chat widget. Round = touchable;
     it expands upward into a 16px dusty panel (concentric: white 8px rows inside).
     Olive badge = due-today count, per the urgency rule. */
  .task-fab-wrap { position: fixed; left: var(--sp-5); bottom: var(--fab-offset); z-index: var(--z-overlay); display: flex; flex-direction: column-reverse; align-items: flex-start; gap: var(--sp-2); }
  .task-fab {
    position: relative; width: 56px; height: 56px; border-radius: 999px;
    background: var(--teal); color: var(--white); border: 1px solid var(--teal);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: background var(--duration-fast) var(--ease-out);
  }
  .task-fab:hover { background: var(--teal-dark); }
  .task-fab .icon { width: 22px; height: 22px; vertical-align: 0; transition: transform var(--duration-fast) var(--ease-out); }
  .task-fab-badge {
    position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--olive); color: var(--text);
    font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid var(--paper);
  }
  .task-fab-panel {
    width: 300px; max-width: calc(100vw - 48px);
    background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-panel);
    box-shadow: var(--shadow-xl); padding: var(--sp-3);
    transform-origin: bottom left; opacity: 0; transform: translateY(8px) scale(0.98); pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
  }
  .task-fab-wrap.is-open .task-fab-panel { opacity: 1; transform: none; pointer-events: auto; }
  .task-fab-wrap.is-open .task-fab .icon { transform: rotate(45deg); }
  .task-fab-row {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: var(--sp-2) var(--sp-3); margin-top: var(--sp-2); min-height: 44px;
    font-size: var(--fs-3); font-weight: 600; cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  }
  .task-fab-row:hover { border-color: var(--teal); box-shadow: var(--shadow-xs); }
  .task-fab-row.is-today { border-left: 3px solid var(--olive); }
  @media (prefers-reduced-motion: reduce) {
    .task-fab, .task-fab .icon, .task-fab-panel, .task-fab-row { transition: none; }
  }
  /* ── Pickers (2026-08-01): one menu anatomy for every dropdown — select fields,
     people pickers, song selectors, date pickers. Menus 8px, items 6px
     (concentric); white raised surfaces; today = olive, selected = teal. */
  .menu { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: var(--sp-1); min-width: 220px; }
  .menu-head { font-size: var(--kicker-size); font-weight: var(--kicker-weight); letter-spacing: var(--kicker-track); text-transform: uppercase; color: var(--muted); padding: var(--sp-1) var(--sp-2); }
  .menu-sep { height: 1px; background: var(--border); border: 0; margin: var(--sp-1) 0; }
  .menu-item { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 36px; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-item); font-family: var(--font-body); font-size: var(--fs-3); font-weight: 500; color: var(--text); background: transparent; border: 0; cursor: pointer; text-align: left; transition: background var(--duration-fast) var(--ease-out); }
  .menu-item:hover { background: var(--dusty); }
  .menu-item.is-selected { background: var(--dusty); color: var(--teal-text); font-weight: 600; }
  .menu-item-rich { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 48px; padding: var(--sp-2); }
  .menu-item-rich .menu-item-title { font-family: var(--font-heading); font-size: var(--fs-4); font-weight: 600; }
  .menu-item-meta { font-size: var(--fs-1); font-weight: 500; color: var(--muted); }
  .menu-search { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2) var(--sp-2); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-1); color: var(--muted); }
  .menu-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 16px; font-family: var(--font-body); color: var(--text); background: transparent; }
  .select-field { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-3); border-radius: var(--radius-sm); background: transparent; border: 1px solid var(--border); font-family: var(--font-body); font-size: 16px; color: var(--text); cursor: pointer; transition: border-color var(--duration-fast) var(--ease-out); }
  .select-field:hover { border-color: var(--teal); }
  .select-field .icon { color: var(--muted); }
  .select-field .select-placeholder { color: var(--muted); }
  .picker-field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); min-height: 44px; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: transparent; border: 1px solid var(--border); cursor: text; }
  .picker-field:focus-within { border-color: var(--teal); box-shadow: var(--shadow-focus); }
  .picker-field input { border: 0; outline: 0; flex: 1; min-width: 110px; font-size: 16px; font-family: var(--font-body); color: var(--text); background: transparent; }
  .chip-remove { width: 16px; height: 16px; border-radius: 999px; border: 0; padding: 0; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; }
  .chip-remove:hover { color: var(--text); background: var(--dusty-deep); }
  /* Calendar / date picker */
  .cal { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: var(--sp-3); width: 280px; }
  .cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); font-family: var(--font-heading); font-size: var(--fs-4); font-weight: 600; }
  .cal-nav { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border); background: var(--white); color: var(--teal-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
  .cal-nav:hover { background: var(--dusty); border-color: var(--teal); }
  .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
  .cal-dow { font-size: var(--fs-1); font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 0; }
  .cal-day { position: relative; min-height: 32px; border-radius: 999px; border: 0; background: transparent; font-family: var(--font-body); font-size: var(--fs-2); font-weight: 500; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; transition: background var(--duration-fast) var(--ease-out); }
  .cal-day:hover { background: var(--dusty); }
  .cal-day.is-muted { color: var(--muted); }
  .cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--olive); font-weight: 700; }
  .cal-day.is-selected { background: var(--teal); color: var(--white); font-weight: 600; }
  .cal-day.is-in-range { background: var(--dusty-deep); border-radius: 0; }
  .cal-day.has-event::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 3px; width: 4px; height: 4px; border-radius: 999px; background: var(--teal); }
  .cal-day.is-selected.has-event::after { background: var(--white); }
  /* ── Live ring (2026-08-01): the ONE band gradient, revolving around a button
     that is actively working or featured. The only other sanctioned gradient use.
     Implemented as a spinning conic ::before under an inset ::after — animates
     transform only (no custom-property animation). */
  @keyframes acha-revolve { to { transform: translate(-50%, -50%) rotate(360deg); } }
  .btn-secondary.is-live, .btn-quiet.is-live, .pill-action.is-live, .select-field.is-live, .task-fab.is-live {
    position: relative; overflow: hidden; isolation: isolate; border-color: transparent; background: transparent;
  }
  .btn-secondary.is-live::before, .btn-quiet.is-live::before, .pill-action.is-live::before, .select-field.is-live::before, .task-fab.is-live::before {
    content: ''; position: absolute; z-index: -2; left: 50%; top: 50%; width: 220%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: conic-gradient(var(--teal), var(--olive), var(--teal));
    animation: acha-revolve 2.8s linear infinite;
  }
  .btn-secondary.is-live::after, .btn-quiet.is-live::after, .pill-action.is-live::after, .select-field.is-live::after {
    content: ''; position: absolute; z-index: -1; inset: 1.5px; border-radius: 999px; background: var(--white);
  }
  .btn-secondary.is-live:hover::after, .btn-quiet.is-live:hover::after, .pill-action.is-live:hover::after { background: var(--dusty-deep); }
  .task-fab.is-live::after { content: ''; position: absolute; z-index: -1; inset: 2px; border-radius: 999px; background: var(--teal); }
  /* ── Tools hub (2026-08-01): misc tools as a tile grid. */
  .tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--sp-3); }
  .tool-tile { background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-4); display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); cursor: pointer; text-align: left; font-family: var(--font-body); transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
  .tool-tile:hover { background: var(--white); border-color: var(--teal); box-shadow: var(--shadow-md); }
  .tool-tile-icon { width: 36px; height: 36px; border-radius: 999px; background: var(--white); border: 1px solid var(--border); color: var(--teal-text); display: inline-flex; align-items: center; justify-content: center; flex: none; transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
  .tool-tile:hover .tool-tile-icon { background: var(--dusty); border-color: var(--teal); }
  .tool-tile-name { font-family: var(--font-heading); font-size: var(--fs-4); font-weight: 600; color: var(--text); }
  .tool-tile-desc { font-size: var(--fs-2); color: var(--muted); }
  /* ── Settings (2026-08-01): dusty groups of white 44px rows; the switch is teal-when-on. */
  .settings-group { background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-panel); padding: var(--sp-3); margin-bottom: var(--sp-4); }
  .settings-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); min-height: 44px; margin-top: var(--sp-2); }
  .settings-label { font-size: var(--fs-4); font-weight: 600; }
  .settings-help { font-size: var(--fs-2); color: var(--muted); margin-top: 1px; }
  .switch { position: relative; width: 40px; height: 24px; flex: none; border-radius: 999px; background: var(--dusty-deep); border: 1px solid var(--border); cursor: pointer; padding: 0; transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
  .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 999px; background: var(--white); box-shadow: var(--shadow-xs); transition: transform var(--duration-fast) var(--ease-out); }
  .switch.is-on { background: var(--teal); border-color: var(--teal); }
  .switch.is-on::after { transform: translateX(16px); }
  /* ── Chat thread (2026-08-01): user turns are dusty cards; assistant turns keep
     the flat reading surface (deliberate — the critique's best screen). */
  .msg-row { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-4); max-width: 660px; }
  .msg-label { display: flex; align-items: baseline; gap: var(--sp-2); font-size: var(--fs-2); font-weight: 600; }
  .msg-label-name { font-family: var(--font-heading); }
  .msg-time { color: var(--muted); font-weight: 500; font-size: var(--fs-1); font-variant-numeric: tabular-nums; }
  .msg-body { font-size: var(--fs-5); line-height: 1.6; }
  .msg-row.user .msg-body { background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); }
  .msg-actions { display: flex; gap: var(--sp-1); }
  .msg-action { min-height: 32px; display: inline-flex; align-items: center; gap: 4px; padding: 0 var(--sp-2); border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-family: var(--font-body); font-size: var(--fs-1); font-weight: 600; cursor: pointer; transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
  .msg-action:hover { background: var(--dusty); color: var(--teal-text); }
  .tool-badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-2) 0; }
  .tool-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: 999px; background: var(--dusty); border: 1px solid var(--border); font-size: var(--fs-1); font-weight: 600; color: var(--teal-text); }
  .tool-badge.is-running { border-color: var(--teal); }
  .tool-spinner { width: 10px; height: 10px; border-radius: 999px; border: 1.5px solid var(--teal); border-top-color: transparent; animation: acha-spin 0.9s linear infinite; }
  @keyframes acha-spin { to { transform: rotate(360deg); } }
  .thinking-dots { display: inline-flex; gap: 4px; padding: var(--sp-2) 0; }
  .thinking-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--teal); animation: acha-pulse 1.2s var(--ease-in-out) infinite; }
  .thinking-dots span:nth-child(2) { animation-delay: 0.15s; } .thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes acha-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
  .chat-error { background: var(--error-bg); border: 1px solid var(--border); border-left: 3px solid var(--error-border); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-3); max-width: 660px; }
  .chat-error-lead { font-weight: 600; color: var(--error); }
  .chat-error-detail { color: var(--muted); font-size: var(--fs-2); margin-top: 2px; }
  @media (prefers-reduced-motion: reduce) { .tool-spinner, .thinking-dots span { animation: none; } }
  /* ── Composer (2026-08-01): same background as the app (no second surface),
     defined by its hairline; round quiet buttons; teal send. */
  .composer { max-width: 660px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-2) var(--sp-3); transition: border-color var(--duration-fast) var(--ease-out); }
  .composer:focus-within { border-color: var(--teal); box-shadow: var(--shadow-focus); }
  .composer-input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; font-family: var(--font-body); color: var(--text); resize: none; max-height: 140px; line-height: 1.5; padding: var(--sp-2) var(--sp-1); }
  .composer-row { display: flex; align-items: center; gap: var(--sp-1); }
  .composer-btn { width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
  .composer-btn:hover { background: var(--dusty); color: var(--teal-text); }
  .composer-send { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--teal); background: var(--teal); color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-left: auto; transition: background var(--duration-fast) var(--ease-out); }
  .composer-send:hover { background: var(--teal-dark); }
  .composer-hint { font-size: var(--fs-1); color: var(--muted); margin-top: var(--sp-1); }
  .composer-hint kbd { font-family: var(--font-body); font-weight: 700; color: var(--text); }
  .file-chip { display: inline-flex; align-items: center; gap: var(--sp-2); background: var(--dusty); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-1) var(--sp-2); font-size: var(--fs-2); font-weight: 600; }
  .file-chip-meta { color: var(--muted); font-weight: 500; }
  .menu-kbd { margin-left: auto; font-size: var(--fs-1); color: var(--muted); }
  .queue-panel { border-top: 1px solid var(--border); margin-top: var(--sp-2); padding-top: var(--sp-2); display: flex; flex-direction: column; gap: var(--sp-1); }
  .queue-item { display: flex; gap: var(--sp-2); align-items: baseline; font-size: var(--fs-2); color: var(--muted); }
  .queue-num { font-family: var(--font-heading); font-weight: 700; color: var(--teal-text); font-variant-numeric: tabular-nums; }
  .voice-bar { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 32px; padding: 0 var(--sp-3); border-radius: 999px; background: var(--dusty); border: 1px solid var(--teal); font-size: var(--fs-2); font-weight: 600; color: var(--teal-text); }
  .voice-pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--teal); animation: acha-pulse 1.2s var(--ease-in-out) infinite; }
  @media (prefers-reduced-motion: reduce) { .voice-pulse { animation: none; } }
  /* ── Sidebar rail (2026-08-01): LIGHT dusty rail (dark rail retired). Active item
     lifts to white with the 2px teal indicator; badges are teal, never red. */
  .rail { width: 240px; background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; padding: var(--sp-3); gap: 2px; }
  .rail-item { display: flex; align-items: center; gap: var(--sp-2); min-height: 36px; padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-item); font-family: var(--font-body); font-size: var(--fs-3); font-weight: 500; color: var(--sidebar-text); background: transparent; border: 0; border-left: 2px solid transparent; cursor: pointer; text-align: left; width: 100%; transition: background var(--duration-fast) var(--ease-out); }
  .rail-item:hover { background: var(--sidebar-hover); }
  .rail-item.is-active { background: var(--sidebar-active); border-left-color: var(--teal); font-weight: 600; box-shadow: var(--shadow-xs); }
  .rail-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: var(--white); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
  .rail-time { margin-left: auto; font-size: var(--fs-1); color: var(--sidebar-muted); font-variant-numeric: tabular-nums; }
  .rail-unread { width: 6px; height: 6px; border-radius: 999px; background: var(--teal); flex: none; }
  .rail-footer { margin-top: auto; border-top: 1px solid var(--sidebar-border); padding-top: var(--sp-2); display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; cursor: pointer; }
  .rail-avatar { width: 32px; height: 32px; border-radius: 999px; background: var(--dusty-deep); color: var(--teal-text); font-family: var(--font-heading); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .rail-footer-name { font-size: var(--fs-3); font-weight: 600; }
  .rail-footer-sub { font-size: var(--fs-1); color: var(--sidebar-muted); }
  @media (prefers-reduced-motion: reduce) {
    .is-live::before, .task-fab.is-live::before { animation: none; }
    .switch::after, .tool-tile { transition: none; }
  }
