/* OfficeTamed design tokens.
   Extracted from datatamed.com (site.css) on 13 July 2026 so the two products are visibly siblings,
   and evolved on 24 July 2026 into a fuller premium system (teal-biased neutrals, a type & spacing
   scale, hairline structure over heavy shadows, a soft focus ring, and reusable component classes).

   RULES OF THE ROAD
   - Every colour is a token. Do not hand-pick a raw hex in a page or a rule; add it here, harmonised.
   - Every existing class name and every existing --ot-* variable still resolves. Names were refined in
     place, never renamed or deleted, so pages that reference them keep working.
   - Sizes and spacing come off the scales below. Snap to a step; don't invent a 13.5px / 11px one-off. */
:root {
  /* ── Brand — kept verbatim (the founder's teal/mint/amber) ─────────────────────────────── */
  --ot-teal:        #3d8f93;
  --ot-teal-dark:   #2c6669;
  --ot-teal-lite:   #d4eaeb;
  --ot-teal-050:    #eef6f6;   /* softer than -lite for large fills / washes */
  --ot-teal-ring:   rgba(61,143,147,.20);   /* low-alpha teal for the focus halo */

  --ot-mint:        #2ec19a;
  --ot-mint-lite:   #e0f6ef;
  --ot-mint-dark:   #0e7a5f;   /* names the on-call / success green used across the components below */
  --ot-mint-border: #bfe9da;   /* mint hairline (e.g. the success-notice border) */

  --ot-amber:       #bf8700;
  --ot-amber-lite:  #fff3d1;
  --ot-amber-dark:  #7a5a00;   /* names the amber text colour used across the components below */
  --ot-amber-border:#eeddaa;   /* names the amber hairline that was hand-typed in ~6 places */
  --ot-amber-hover: #ffe9ad;   /* names the amber-pill hover fill */

  /* Danger — a muted brick/terracotta tuned to sit with teal/mint/amber. Reserve for GENUINE errors
     (failed sign-in, invalid invite), so amber is freed for its real 'awaiting a human' meaning. */
  --ot-danger:      #b0473c;
  --ot-danger-lite: #f8e7e3;
  --ot-danger-dark: #8c362d;   /* AA text on --ot-danger-lite */
  --ot-danger-border:#e7c6bf;

  /* ── Neutral ramp — cool greys nudged a few degrees onto the brand hue (~185°), so every surface
        reads as related to the mark instead of generic slate. Paper → ink. ────────────────────── */
  --ot-n-0:   #ffffff;   /* raised card surface        */
  --ot-n-25:  #f4f8f7;   /* app canvas / inset well    */
  --ot-n-50:  #eef4f3;   /* table head, preview, fills */
  --ot-n-100: #e6edec;   /* subtle fill                */
  --ot-n-200: #dbe3e2;   /* hairline border            */
  --ot-n-300: #c6d1cf;   /* strong divider / input edge*/
  --ot-n-400: #94a3a0;   /* placeholder / faint icon   */
  --ot-n-500: #6c7a77;   /* muted text                 */
  --ot-n-600: #53615e;   /* secondary text             */
  --ot-n-700: #3a4643;   /* strong body                */
  --ot-n-800: #1e2a28;   /* headings / primary ink     */
  --ot-n-900: #131d1b;   /* strongest ink              */

  /* ── Legacy names re-pointed onto the ramp — pages inherit the refinement for free ─────────── */
  --ot-white:       var(--ot-n-0);
  --ot-light:       var(--ot-n-25);
  --ot-border:      var(--ot-n-200);
  --ot-border-strong: var(--ot-n-300);
  --ot-text:        var(--ot-n-800);
  --ot-text-mid:    var(--ot-n-600);
  --ot-mid:         var(--ot-n-500);

  /* Dark surfaces kept for the .tag.dark chip (and a future dark theme). */
  --ot-dark:        #0d1117;
  --ot-dark-2:      #161b22;
  --ot-dark-3:      #21262d;
  --ot-border-dk:   #30363d;

  /* ── Spacing scale (4px base). Snap every gap/margin/padding to a step. ────────────────────── */
  --ot-space-1: 4px;   --ot-space-2: 8px;   --ot-space-3: 12px;  --ot-space-4: 16px;
  --ot-space-5: 24px;  --ot-space-6: 32px;  --ot-space-7: 48px;  --ot-space-8: 64px;

  /* ── Type scale (px — html stays at 14px so nothing reflows) ───────────────────────────────── */
  --ot-fs-eyebrow: 11px;   /* uppercase kicker, table head, micro-label */
  --ot-fs-cap:     12px;   /* captions, meta                            */
  --ot-fs-sm:      13px;   /* secondary body                            */
  --ot-fs-body:    14px;   /* body                                      */
  --ot-fs-lead:    15px;   /* page lede, intro                          */
  --ot-fs-md:      16px;   /* card title                                */
  --ot-fs-lg:      18px;   /* subsection / empty-state headline         */
  --ot-fs-title:   26px;   /* page title (h1)                           */
  --ot-fs-display: 30px;   /* auth welcome, hero stat number            */

  --ot-fw-medium:   500;
  --ot-fw-semibold: 600;
  --ot-fw-bold:     700;
  --ot-fw-heavy:    800;

  --ot-lh-tight: 1.15;   --ot-lh-snug: 1.4;   --ot-lh-body: 1.55;
  --ot-tracking-tight:   -0.02em;   /* large headings         */
  --ot-tracking-eyebrow:  0.08em;   /* uppercase kickers      */

  /* ── Radii — an intentional scale, one notch between each surface ──────────────────────────── */
  --ot-radius-xs:   6px;    /* tags, tiny controls  */
  --ot-radius-sm:   8px;    /* inputs, buttons      */
  --ot-radius-md:   10px;   /* nested surfaces      */
  --ot-radius:      12px;   /* cards (unchanged)    */
  --ot-radius-lg:   16px;   /* feature panels       */
  --ot-radius-pill: 100px;  /* status/badges only   */

  /* ── Depth — tight, layered, ink-tinted (not pure black). Hairlines do the structural work;
        --ot-shadow is now a whisper so resting cards read crisp, not floaty. Elevation is earned:
        reserve --ot-shadow-md for hover and --ot-shadow-lg for modals / the auth card. ────────── */
  --ot-shadow-xs: 0 1px 2px rgba(19,29,27,.05);
  --ot-shadow-sm: 0 1px 2px rgba(19,29,27,.05), 0 1px 1px rgba(19,29,27,.03);
  --ot-shadow:    0 1px 2px rgba(19,29,27,.05), 0 1px 3px rgba(19,29,27,.04);   /* was 0 4px 24px */
  --ot-shadow-md: 0 6px 16px rgba(19,29,27,.07), 0 1px 3px rgba(19,29,27,.05);
  --ot-shadow-lg: 0 12px 32px rgba(19,29,27,.12), 0 2px 6px rgba(19,29,27,.06);

  /* ── Focus — one soft teal halo across every control (replaces hard 2px outlines) ──────────── */
  --ot-ring: 0 0 0 3px var(--ot-teal-ring);

  --ot-ease: cubic-bezier(.2,.6,.2,1);
  --ot-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { font-size: 14px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { margin: 0; font-family: var(--ot-font); color: var(--ot-text); background: var(--ot-light);
       font-size: var(--ot-fs-sm); line-height: var(--ot-lh-body); }

/* Tabular figures for money, counts and times so columns of numbers line up. */
.tnum { font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   APP CHROME (P1-02): a top bar for signed-in users, and the page body inset.
   Hairline instead of a drop shadow; a real active-nav marker.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
/* A collapsible left sidebar for signed-in users; the page body sits to its right. Collapse is CSS-only
   (a peer checkbox, .ot-nav-cb) so it needs no interactivity; on mobile the rail becomes an off-canvas drawer. */
.ot-shell { display: flex; align-items: stretch; min-height: 100vh; }
.ot-sidebar { flex: 0 0 244px; width: 244px; display: flex; flex-direction: column; background: var(--ot-white);
              border-right: 1px solid var(--ot-border); position: sticky; top: 0; height: 100vh; overflow-y: auto;
              transition: flex-basis .18s var(--ot-ease), width .18s var(--ot-ease), transform .2s var(--ot-ease); z-index: 30; }

.ot-side-head { display: flex; align-items: center; gap: var(--ot-space-2); padding: var(--ot-space-4) var(--ot-space-4) var(--ot-space-3); }
.ot-brand { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.ot-brand img { display: block; width: auto; }
.ot-brand-full { height: 26px; }
.ot-brand-compact { display: none !important; width: 30px !important; height: 30px; }
.ot-brand-mobile { height: 24px; }
.ot-brand-public { height: 28px; }
.ot-collapse { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
               width: 30px; height: 30px; border-radius: var(--ot-radius-sm); color: var(--ot-mid); cursor: pointer;
               transition: background .15s var(--ot-ease), color .15s var(--ot-ease); }
.ot-collapse:hover { background: var(--ot-n-50); color: var(--ot-text); }

.ot-side-nav { display: flex; flex-direction: column; padding: var(--ot-space-2) var(--ot-space-3); overflow-y: auto; }
.ot-nav-group { display: flex; flex-direction: column; gap: 2px; }
.ot-nav-group + .ot-nav-group { margin-top: var(--ot-space-4); }
.ot-nav-group-label { display: flex; align-items: center; gap: 6px; padding: 0 var(--ot-space-3) var(--ot-space-1);
                      font-size: var(--ot-fs-eyebrow); font-weight: var(--ot-fw-bold);
                      letter-spacing: var(--ot-tracking-eyebrow); text-transform: uppercase; color: var(--ot-n-400); }
/* Small glyph a group label may carry (e.g. the Settings cog). Lighter than the 20px nav-item icons. */
.ot-group-ico { flex: 0 0 auto; width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ot-nav-item { display: flex; align-items: center; gap: var(--ot-space-3); padding: 9px var(--ot-space-3); border-radius: var(--ot-radius-sm);
               color: var(--ot-text-mid); text-decoration: none; font-size: var(--ot-fs-sm); font-weight: var(--ot-fw-semibold); white-space: nowrap;
               transition: background .15s var(--ot-ease), color .15s var(--ot-ease); }
.ot-nav-item:hover { background: var(--ot-n-50); color: var(--ot-text); }
.ot-nav-item.active { background: var(--ot-teal-050); color: var(--ot-teal-dark); }
.ot-ico { flex: 0 0 20px; width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ot-nav-label { overflow: hidden; }

.ot-side-foot { margin-top: auto; padding: var(--ot-space-3); border-top: 1px solid var(--ot-border);
                display: flex; align-items: center; gap: var(--ot-space-2); }
.ot-side-user { min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit;
                border-radius: var(--ot-radius-sm); padding: 5px 8px; margin: -5px -8px;
                transition: background .15s var(--ot-ease); }
a.ot-side-user:hover { background: var(--ot-n-50); }
.ot-side-user b { font-size: var(--ot-fs-sm); color: var(--ot-text); font-weight: var(--ot-fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-side-user span { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); }
.ot-signout { margin-left: auto; flex: 0 0 auto; }
.ot-signout .pill { padding: 7px 9px; }

.ot-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
/* When the main hosts the Desk chat, the shell pins to the viewport and the PAGE stops scrolling — the
   thread scrolls instead. The height is DERIVED, never enumerated: the mobile bar, the allowance banner,
   and any future chrome in .ot-content keep their natural height and the Desk gets the true remainder,
   so nothing here goes stale when the layout grows a row (review, #268 — a calc() that subtracted
   .ot-main's paddings missed both the mobile bar and the banner, and reintroduced the scrollbar it
   existed to remove). */
.ot-shell:has(.desk-chat) { height: 100vh; height: 100dvh; }
.ot-shell:has(.desk-chat) .ot-content { min-height: 0; }
.ot-shell:has(.desk-chat) .ot-main { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.ot-mobile-bar { display: none; align-items: center; gap: var(--ot-space-3); position: sticky; top: 0; z-index: 25;
                 background: var(--ot-white); border-bottom: 1px solid var(--ot-border); padding: 10px var(--ot-space-4); }
.ot-burger { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
             border-radius: var(--ot-radius-sm); color: var(--ot-text); cursor: pointer; }
.ot-burger:hover { background: var(--ot-n-50); }
.ot-backdrop { display: none; }
.ot-nav-cb { position: absolute; width: 1px; height: 1px; opacity: 0; }
/* Keyboard focus lands on the visually-hidden checkbox; surface a ring on whichever visible toggle is showing. */
.ot-nav-cb:focus-visible ~ .ot-shell .ot-collapse,
.ot-nav-cb:focus-visible ~ .ot-shell .ot-burger { box-shadow: var(--ot-ring); }

.ot-main { max-width: 1080px; width: 100%; margin: 0 auto; padding: 32px 32px 64px; }
.ot-main--plain { max-width: none; padding: 0; }

/* Desktop collapse: checked → an icon-only rail (labels, group titles, wordmark and footer text fold away). */
.ot-nav-cb:checked ~ .ot-shell .ot-sidebar { flex-basis: 70px; width: 70px; }
.ot-nav-cb:checked ~ .ot-shell .ot-brand-full,
.ot-nav-cb:checked ~ .ot-shell .ot-nav-label,
.ot-nav-cb:checked ~ .ot-shell .ot-nav-group-label,
.ot-nav-cb:checked ~ .ot-shell .ot-side-user { display: none; }
.ot-nav-cb:checked ~ .ot-shell .ot-side-head { flex-direction: column; gap: var(--ot-space-2); padding-inline: 0; }
.ot-nav-cb:checked ~ .ot-shell .ot-brand-compact { display: block !important; }
.ot-nav-cb:checked ~ .ot-shell .ot-collapse { margin-left: 0; transform: scaleX(-1); }
.ot-nav-cb:checked ~ .ot-shell .ot-nav-item { justify-content: center; padding-inline: 0; }
.ot-nav-cb:checked ~ .ot-shell .ot-side-foot { justify-content: center; padding-inline: 0; }
.ot-nav-cb:checked ~ .ot-shell .ot-signout { margin-left: 0; }

/* Unclassed content links in the page body pick up the palette instead of default browser blue.
   Anything with its own class (.pill, .ot-link, .auth-link, …) is untouched. */
.ot-main a:not([class]) { color: var(--ot-teal-dark); text-decoration: none; font-weight: var(--ot-fw-semibold); }
.ot-main a:not([class]):hover { color: var(--ot-teal); text-decoration: underline; }
.ot-link { color: var(--ot-teal-dark); text-decoration: none; font-weight: var(--ot-fw-semibold);
           transition: color .15s var(--ot-ease); }
.ot-link:hover { color: var(--ot-teal); text-decoration: underline; }

/* App-wide pause notice (slice 4b): shown across every page when the office is out of allowance. */
.ot-allowance-banner { background: var(--ot-amber-lite); border-bottom: 1px solid var(--ot-amber-border);
  color: var(--ot-amber-dark); padding: 10px 24px; font-size: var(--ot-fs-sm); text-align: center; }
.ot-allowance-banner a { color: var(--ot-amber-dark); font-weight: var(--ot-fw-bold); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   PAGE HEADER — eyebrow → title → lede. Retires the copy-pasted inline <h1 style>/<p style>.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-page-head { margin: 0 0 var(--ot-space-6); }
.ot-eyebrow { display: inline-block; margin: 0 0 var(--ot-space-2); font-size: var(--ot-fs-eyebrow);
  font-weight: var(--ot-fw-bold); text-transform: uppercase; letter-spacing: var(--ot-tracking-eyebrow);
  color: var(--ot-teal-dark); }
.ot-title { margin: 0; font-size: var(--ot-fs-title); font-weight: var(--ot-fw-bold);
  letter-spacing: var(--ot-tracking-tight); line-height: var(--ot-lh-tight); color: var(--ot-n-900); }
.ot-subtitle { margin: var(--ot-space-2) 0 0; max-width: 62ch; font-size: var(--ot-fs-lead);
  line-height: var(--ot-lh-snug); color: var(--ot-text-mid); }

/* Section rhythm — deliberate gap between groups, a confident section head. */
.ot-section { margin-top: var(--ot-space-7); }
.ot-section-head { margin: 0 0 var(--ot-space-4); font-size: var(--ot-fs-md); font-weight: var(--ot-fw-heavy);
  letter-spacing: -.01em; color: var(--ot-n-900); }
.ot-section-head--ruled { padding-bottom: var(--ot-space-3); border-bottom: 1px solid var(--ot-border); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   AUTH — sign-in / registration / invite cards (P1-02). Highest polish per pixel.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% -10%, var(--ot-teal-050) 0%, var(--ot-light) 60%); }
.auth-brand { display: block; width: auto; height: 32px; margin: 0 auto var(--ot-space-4); }
.auth-card { width: 100%; max-width: 400px; box-sizing: border-box; background: var(--ot-white);
  border: 1px solid var(--ot-border); border-radius: var(--ot-radius); box-shadow: var(--ot-shadow-lg);
  padding: 32px 30px; }
.auth-title { margin: 0 0 var(--ot-space-2); font-size: var(--ot-fs-display); font-weight: var(--ot-fw-bold);
  letter-spacing: var(--ot-tracking-tight); line-height: var(--ot-lh-tight); color: var(--ot-n-900); }
.auth-sub { margin: 0 0 var(--ot-space-5); font-size: var(--ot-fs-lead); line-height: var(--ot-lh-snug);
  color: var(--ot-text-mid); }
.auth-label { display: block; font-size: var(--ot-fs-cap); font-weight: var(--ot-fw-semibold);
  color: var(--ot-text-mid); margin: 0 0 var(--ot-space-2); }
.auth-input { display: block; width: 100%; box-sizing: border-box; margin-top: var(--ot-space-2);
  padding: 10px 12px; font-size: var(--ot-fs-body); font-family: inherit; color: var(--ot-text);
  border: 1px solid var(--ot-border-strong); border-radius: var(--ot-radius-sm); background: var(--ot-white);
  transition: border-color .15s var(--ot-ease), box-shadow .15s var(--ot-ease); }
.auth-input::placeholder { color: var(--ot-n-400); }
.auth-input:focus { outline: none; border-color: var(--ot-teal); box-shadow: var(--ot-ring); }
.auth-alt { margin: var(--ot-space-5) 0 0; font-size: var(--ot-fs-cap); color: var(--ot-text-mid);
  text-align: center; }
.auth-link { color: var(--ot-teal-dark); font-weight: var(--ot-fw-semibold); text-decoration: none;
  transition: color .15s var(--ot-ease); }
.auth-link:hover { color: var(--ot-teal); text-decoration: underline; }
/* Legacy amber error box, now fully tokenised. For genuine failures prefer `.ot-notice danger`. */
.auth-error { background: var(--ot-amber-lite); border: 1px solid var(--ot-amber-border);
  color: var(--ot-amber-dark); border-radius: var(--ot-radius-sm); padding: 10px 12px;
  font-size: var(--ot-fs-cap); line-height: var(--ot-lh-snug); margin: 0 0 var(--ot-space-4); }
.auth-error ul { margin: 0; padding-left: 18px; }   /* tame the ValidationSummary bullet list */

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   PRESENCE — the signature element: a staffed office carries a live status on every card.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: var(--ot-fs-eyebrow); font-weight: var(--ot-fw-semibold); border-radius: var(--ot-radius-pill);
  padding: 4px 10px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.status.working  { background: var(--ot-teal-lite); color: var(--ot-teal-dark); }
.status.working .dot  { background: var(--ot-teal); animation: ot-pulse 1.8s infinite; }
.status.oncall   { background: var(--ot-mint-lite); color: var(--ot-mint-dark); }
.status.oncall .dot   { background: var(--ot-mint); animation: ot-pulse 1.2s infinite; }
.status.approval { background: var(--ot-amber-lite); color: var(--ot-amber-dark); }
.status.approval .dot { background: var(--ot-amber); }
.status.idle     { background: var(--ot-n-50); color: var(--ot-mid); }
.status.idle .dot     { background: var(--ot-mid); }
/* Something this employee did FAILED, or its connection is broken — both mean "nobody else is coming to tell
   the owner", so they read as danger rather than as another shade of busy. Neither pulses: a pulse says
   "happening now", and these two are stuck, not working. */
.status.attention { background: var(--ot-danger-lite); color: var(--ot-danger-dark); }
.status.attention .dot { background: var(--ot-danger); }
.status.blocked  { background: var(--ot-danger-lite); color: var(--ot-danger-dark); }
.status.blocked .dot  { background: var(--ot-danger); }

@keyframes ot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61,143,147,.45); }
  70%  { box-shadow: 0 0 0 6px rgba(61,143,147,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,143,147,0); }
}
@media (prefers-reduced-motion: reduce) { .status .dot { animation: none !important; } }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   CARDS — one canonical surface, plus the existing named cards refined onto the same vocabulary.
   Hairline at rest; lift is earned on hover (interactive cards only).
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-card { background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius);
  box-shadow: var(--ot-shadow); padding: var(--ot-space-4); }
.ot-card--flush { padding: 0; }
.ot-card--hover { transition: box-shadow .18s var(--ot-ease), transform .18s var(--ot-ease),
  border-color .18s var(--ot-ease); }
.ot-card--hover:hover { box-shadow: var(--ot-shadow-md); transform: translateY(-2px);
  border-color: var(--ot-border-strong); }

/* Desk — staff card. Flex column so the status pill pins to a common baseline across a row. */
.desk { display: flex; flex-direction: column; min-height: 124px; background: var(--ot-white);
  border: 1px solid var(--ot-border); border-radius: var(--ot-radius); box-shadow: var(--ot-shadow);
  padding: 16px; transition: box-shadow .18s var(--ot-ease), transform .18s var(--ot-ease),
  border-color .18s var(--ot-ease); }
.desk .status { margin-top: auto; align-self: flex-start; }
.desk:hover { box-shadow: var(--ot-shadow-md); transform: translateY(-2px); border-color: var(--ot-border-strong); }
/* The current / non-interactive desk: a clear resting emphasis, no false hover-lift. */
.desk.is-current { border-color: var(--ot-teal); background: var(--ot-teal-050); }
.desk.is-current:hover { box-shadow: var(--ot-shadow); transform: none; border-color: var(--ot-teal); }
.desk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-weight: var(--ot-fw-bold); background: var(--ot-teal-lite); color: var(--ot-teal-dark); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   BADGES / CHIPS / TAGS — capsule shapes; the round pill means 'token', not 'action'.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--ot-white);
  border: 1px solid var(--ot-border); border-radius: var(--ot-radius-pill); padding: 7px 14px;
  font-size: var(--ot-fs-cap); font-weight: var(--ot-fw-semibold); }
.chip.amber { border-color: var(--ot-amber-border); background: var(--ot-amber-lite); color: var(--ot-amber-dark); }

/* Small status/label badge (e.g. 'Owner', 'Connected', '3 waiting'). */
.ot-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--ot-radius-pill);
  font-size: var(--ot-fs-eyebrow); font-weight: var(--ot-fw-bold); padding: 3px 10px; white-space: nowrap; }
.ot-badge.teal    { background: var(--ot-teal-lite);   color: var(--ot-teal-dark); }
.ot-badge.mint    { background: var(--ot-mint-lite);   color: var(--ot-mint-dark); }
.ot-badge.amber   { background: var(--ot-amber-lite);  color: var(--ot-amber-dark); }
.ot-badge.danger  { background: var(--ot-danger-lite); color: var(--ot-danger-dark); }
.ot-badge.neutral { background: var(--ot-n-50);        color: var(--ot-text-mid); }

/* Medium badges (Demo): teal for email/LinkedIn/calendar, dark for X, mint for a ticket, amber for CRM. */
.tag { margin-left: auto; font-size: var(--ot-fs-eyebrow); font-weight: var(--ot-fw-bold); white-space: nowrap;
  border-radius: var(--ot-radius-pill); padding: 3px 11px; }
.tag.teal  { background: var(--ot-teal-lite);  color: var(--ot-teal-dark); }
.tag.dark  { background: var(--ot-dark);       color: var(--ot-white); }
.tag.mint  { background: var(--ot-mint-lite);  color: var(--ot-mint-dark); }
.tag.amber { background: var(--ot-amber-lite); color: var(--ot-amber-dark); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   BUTTONS — `.pill` evolved to a confident soft rectangle (radius-sm). Primary = solid teal,
   secondary = ghost, attention = amber. `.lg` for hero CTAs (≥44px), `.sm` for inline compact.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.pill { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--ot-radius-sm); font-family: inherit; font-size: var(--ot-fs-cap);
  font-weight: var(--ot-fw-semibold); line-height: 1; padding: 9px 15px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s var(--ot-ease),
  border-color .15s var(--ot-ease), box-shadow .15s var(--ot-ease); }
.pill.sm { padding: 6px 12px; font-size: var(--ot-fs-eyebrow); }
.pill.lg { padding: 12px 20px; font-size: var(--ot-fs-body); min-height: 44px; }
.pill.solid { background: var(--ot-teal); color: var(--ot-white); box-shadow: var(--ot-shadow-xs); }
.pill.solid:hover { background: var(--ot-teal-dark); }
.pill.ghost { background: var(--ot-white); border-color: var(--ot-border-strong); color: var(--ot-text); }
.pill.ghost:hover { background: var(--ot-n-50); border-color: var(--ot-n-400); }
.pill.amber { background: var(--ot-amber-lite); border-color: var(--ot-amber-border); color: var(--ot-amber-dark); }
.pill.amber:hover { background: var(--ot-amber-hover); }
.pill.quiet { background: transparent; color: var(--ot-text-mid); }   /* de-emphasised (e.g. Reject) */
.pill.quiet:hover { background: var(--ot-n-50); color: var(--ot-text); }
.pill.danger { background: var(--ot-danger-lite); border-color: var(--ot-danger-border); color: var(--ot-danger-dark); }   /* irreversible actions (e.g. DSAR erase) */
.pill.danger:hover { background: var(--ot-danger); color: var(--ot-white); }
.pill:disabled { opacity: .5; cursor: default; box-shadow: none; }
.pill:focus-visible { outline: none; box-shadow: var(--ot-ring); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   FORM CONTROLS — one field system. `.ot-field` mirrors `.auth-input`; `.ot-field-label` sits above it.
   (Note: `.ot-label` is a muted caption used by the Out-tray — it is NOT a form label; use these.)
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-field { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: var(--ot-fs-body);
  color: var(--ot-text); background: var(--ot-white); border: 1px solid var(--ot-border-strong);
  border-radius: var(--ot-radius-sm); padding: 9px 12px;
  transition: border-color .15s var(--ot-ease), box-shadow .15s var(--ot-ease); }
.ot-field::placeholder { color: var(--ot-n-400); }
.ot-field:hover { border-color: var(--ot-n-400); }
.ot-field:focus { outline: none; border-color: var(--ot-teal); box-shadow: var(--ot-ring); }
.ot-field--mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--ot-fs-sm); }
.ot-field-label { display: block; font-size: var(--ot-fs-cap); font-weight: var(--ot-fw-semibold);
  color: var(--ot-text-mid); margin: 0 0 var(--ot-space-2); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   STAT / METRIC — the product's proof-of-value (Floor counts, Billing balances) as confident tiles.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--ot-space-3); }
.ot-stat { display: flex; flex-direction: column; gap: 6px; padding: var(--ot-space-4); background: var(--ot-white);
  border: 1px solid var(--ot-border); border-radius: var(--ot-radius); box-shadow: var(--ot-shadow); }
.ot-stat-num { font-size: var(--ot-fs-display); font-weight: var(--ot-fw-heavy);
  letter-spacing: var(--ot-tracking-tight); line-height: 1; color: var(--ot-n-900); font-variant-numeric: tabular-nums; }
.ot-stat-label { font-size: var(--ot-fs-eyebrow); font-weight: var(--ot-fw-bold); text-transform: uppercase;
  letter-spacing: .05em; color: var(--ot-text-mid); }
.ot-stat-sub { font-size: var(--ot-fs-cap); color: var(--ot-mid); }
/* The one metric that is a call to action (awaiting approval) — amber, tied to the desks below. */
.ot-stat.amber { background: var(--ot-amber-lite); border-color: var(--ot-amber-border); }
.ot-stat.amber .ot-stat-num, .ot-stat.amber .ot-stat-label { color: var(--ot-amber-dark); }
/* Shown only when it is non-zero (see Floor.razor): a permanent zero trains the owner to ignore the one
   tile that means something their staff did has failed. */
.ot-stat.danger { background: var(--ot-danger-lite); border-color: var(--ot-danger-border); }
.ot-stat.danger .ot-stat-num, .ot-stat.danger .ot-stat-label { color: var(--ot-danger-dark); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   NOTICE — one banner component with semantic variants. Colour carries meaning:
   info/teal = calm FYI, success/mint = it worked, warn/amber = act with care, danger = it failed.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-notice { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm); padding: 10px 14px;
  font-size: var(--ot-fs-cap); line-height: var(--ot-lh-snug); margin: 0 0 var(--ot-space-4); }
.ot-notice.info    { background: var(--ot-teal-050);   border-color: var(--ot-teal-lite);   color: var(--ot-teal-dark); }
.ot-notice.success { background: var(--ot-mint-lite);  border-color: var(--ot-mint-border);  color: var(--ot-mint-dark); }
.ot-notice.warn    { background: var(--ot-amber-lite); border-color: var(--ot-amber-border); color: var(--ot-amber-dark); }
.ot-notice.danger  { background: var(--ot-danger-lite);border-color: var(--ot-danger-border);color: var(--ot-danger-dark); }
.ot-notice a { color: inherit; font-weight: var(--ot-fw-bold); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   TABLE — shared surface. Sticky uppercase head, quiet row hover, right-aligned tabular numbers.
   `.people-table` / `.admin-table` may migrate onto this; both currently duplicate it scoped.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-table-wrap { background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius);
  box-shadow: var(--ot-shadow); overflow-x: auto; }
.ot-table { width: 100%; border-collapse: collapse; font-size: var(--ot-fs-sm); }
.ot-table th, .ot-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--ot-border);
  white-space: nowrap; }
.ot-table thead th { background: var(--ot-n-50); color: var(--ot-text-mid); font-weight: var(--ot-fw-bold);
  font-size: var(--ot-fs-eyebrow); text-transform: uppercase; letter-spacing: .05em; }
.ot-table tbody tr { transition: background .12s var(--ot-ease); }
.ot-table tbody tr:hover td { background: var(--ot-n-25); }
.ot-table tbody tr:last-child td { border-bottom: none; }
.ot-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Admin-console primitives, promoted to GLOBAL so /billing, /admin/keys and /admin/credits render them
   (they were defined only in AdminHome's scoped stylesheet and silently did nothing off that page).
   Tokenised throughout. AdminHome's scoped copy still wins on its own markup; values match. */
.admin-card { background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius);
  box-shadow: var(--ot-shadow); overflow-x: auto; }
.admin-card--pad { padding: 20px 22px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--ot-fs-sm); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--ot-border);
  white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table thead th { background: var(--ot-n-50); color: var(--ot-text-mid); font-weight: var(--ot-fw-bold);
  font-size: var(--ot-fs-eyebrow); text-transform: uppercase; letter-spacing: .05em; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-h2 { margin: var(--ot-space-6) 0 var(--ot-space-3); font-size: var(--ot-fs-md);
  font-weight: var(--ot-fw-heavy); letter-spacing: -.01em; color: var(--ot-n-900); }
.admin-notice { background: var(--ot-amber-lite); border: 1px solid var(--ot-amber-border);
  color: var(--ot-amber-dark); border-radius: var(--ot-radius-sm); padding: 10px 12px;
  font-size: var(--ot-fs-cap); margin: 0 0 var(--ot-space-4); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   EMPTY STATE — a considered rest state, not missing content. Optional on-brand glyph medallion.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-empty { text-align: center; padding: var(--ot-space-8) var(--ot-space-5); background: var(--ot-white);
  border: 1px dashed var(--ot-border-strong); border-radius: var(--ot-radius); }
.ot-empty--bare { background: transparent; border: 0; }
.ot-empty-icon { width: 48px; height: 48px; margin: 0 auto var(--ot-space-3); display: grid; place-items: center;
  border-radius: 50%; background: var(--ot-teal-050); color: var(--ot-teal-dark); }
/* Auto side-margins so the heading centres: it inherits max-width:44ch from `.ot-empty p`, and margin:0 would
   pin that narrower block to the LEFT (only its text centred) while the icon and subtext — which use margin:0 auto
   — sit centred, leaving the heading adrift to one side. */
.ot-empty .big { font-size: var(--ot-fs-lg); font-weight: var(--ot-fw-bold); color: var(--ot-n-900); margin: 0 auto var(--ot-space-2); }
.ot-empty p { color: var(--ot-text-mid); margin: 0 auto; max-width: 44ch; }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   SKELETON — shimmer placeholder for loading states (desks, table rows, cards).
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-skeleton { position: relative; overflow: hidden; background: var(--ot-n-50);
  border-radius: var(--ot-radius-sm); }
.ot-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: ot-shimmer 1.4s infinite; }
@keyframes ot-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ot-skeleton::after { animation: none; } }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   OUT-TRAY — the supervision surface (P1-05). Cards for each waiting action, grouped by employee.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-group { margin-bottom: var(--ot-space-6); }
.ot-group-head { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--ot-space-3); }
.ot-item { background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius);
  box-shadow: var(--ot-shadow); padding: 16px 18px; margin-bottom: var(--ot-space-3); }
.ot-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--ot-space-2); }
.ot-type { font-size: var(--ot-fs-eyebrow); font-weight: var(--ot-fw-bold); text-transform: uppercase;
  letter-spacing: .05em; color: var(--ot-text-mid); }
.ot-label { font-size: var(--ot-fs-cap); color: var(--ot-text-mid); }
.ot-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--ot-fs-body); line-height: var(--ot-lh-body);
  background: var(--ot-n-25); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm); padding: 12px 14px; }
/* A proposed action rendered as the thing it is, rather than as one slab of pre-wrap text. Every colour here
   is an existing token; no new hue was introduced. */
.ot-preview-doc-title { font-size: var(--ot-fs-body); font-weight: 600; color: var(--ot-text-strong);
  margin: 0 0 var(--ot-space-2); overflow-wrap: anywhere; }

/* The email an owner is being asked to approve: who it goes to and what it says, told apart. The head is a
   description list because that is what it is — labelled values, not a table and not a heading. */
.ot-preview-email { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm); overflow: hidden; }
.ot-preview-email-head { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--ot-space-3);
  margin: 0; padding: 10px 14px; background: var(--ot-n-50); border-bottom: 1px solid var(--ot-border);
  font-size: var(--ot-fs-cap); }
.ot-preview-email-head dt { color: var(--ot-text-mid); text-transform: uppercase; letter-spacing: .05em; }
.ot-preview-email-head dd { margin: 0; color: var(--ot-text-strong); overflow-wrap: anywhere; }
/* An address the office GUESSED from a name. Amber, because it is a "check this" and not a "something broke". */
.ot-preview-email-inferred { display: inline-block; margin-left: var(--ot-space-2); padding: 1px 6px;
  border-radius: 999px; background: var(--ot-amber-lite); color: var(--ot-amber-dark);
  border: 1px solid var(--ot-amber-border); font-size: var(--ot-fs-cap); }
/* pre-line, not pre-wrap: the paragraph breaks are real elements now, and this only preserves the single
   newlines a model puts inside one — a sign-off over two lines stays over two lines. */
.ot-preview-email-body { padding: 12px 14px; background: var(--ot-n-25); white-space: pre-line;
  overflow-wrap: anywhere; font-size: var(--ot-fs-body); line-height: var(--ot-lh-body); }
.ot-preview-email-body p { margin: 0 0 var(--ot-space-3); }
.ot-preview-email-body p:last-child { margin-bottom: 0; }

.ot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--ot-space-3); }
.ot-actions .spacer { margin-left: auto; }   /* push a de-emphasised Reject away from the affirmative pair */
/* One logical decision covering many actions (ADR-0048). The teal badge and the count line say plainly how
   much one click releases; the member list is scrollable because a four-figure series is a valid request. */
.ot-group-card { border-left: 3px solid var(--ot-teal); }
.ot-group-card-head { display: flex; align-items: center; gap: var(--ot-space-2); margin-bottom: var(--ot-space-2); }
.ot-group-members { list-style: none; margin: var(--ot-space-2) 0 0; padding: 0; display: flex; flex-direction: column;
  gap: 6px; max-height: 320px; overflow-y: auto; }
/* An approved action whose execution then failed — a soft danger accent so it reads "needs another look",
   not alarm. The reason line carries the run's FailureReason (e.g. WordPress's own rejection message). */
.ot-item--failed { border-left: 3px solid var(--ot-danger); }
.ot-fail-reason { margin-top: var(--ot-space-2); font-size: var(--ot-fs-cap); line-height: var(--ot-lh-body);
  color: var(--ot-danger-dark); background: var(--ot-danger-lite); border: 1px solid var(--ot-danger-border);
  border-radius: var(--ot-radius-sm); padding: 8px 12px; overflow-wrap: anywhere; }
/* An uncertain-outcome warning above the retry — a timeout may have sent, so "Try again anyway" could duplicate.
   Amber, not danger: it's a caution the owner acts on, not the failure itself (which the reason line carries). */
.ot-fail-warn { margin-top: var(--ot-space-2); font-size: var(--ot-fs-cap); line-height: var(--ot-lh-body);
  color: var(--ot-amber-dark); background: var(--ot-amber-lite); border: 1px solid var(--ot-amber-border);
  border-radius: var(--ot-radius-sm); padding: 8px 12px; overflow-wrap: anywhere; }
.ot-schedule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--ot-space-3);
  padding: 10px 12px; background: var(--ot-n-25); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm); }
.ot-schedule-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ot-fs-cap); color: var(--ot-mid); }
.ot-schedule-input { border: 1px solid var(--ot-border-strong); border-radius: var(--ot-radius-xs);
  padding: 5px 8px; font: inherit; color: var(--ot-text); background: var(--ot-white); }
.ot-schedule-error { font-size: var(--ot-fs-cap); color: var(--ot-amber-dark); }
.ot-edit { width: 100%; box-sizing: border-box; min-height: 130px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--ot-fs-cap);
  border: 1px solid var(--ot-border-strong); border-radius: var(--ot-radius-sm); padding: 11px 13px;
  transition: border-color .15s var(--ot-ease), box-shadow .15s var(--ot-ease); }
.ot-edit:focus { outline: none; border-color: var(--ot-teal); box-shadow: var(--ot-ring); }

/* "The email being replied to" — an inset quotation of the original message, above the draft it answers.
   Deliberately quieter than the draft preview: the draft is the thing being decided, this is the context. */
.ot-source-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 var(--ot-space-2);
  padding: 4px 8px 4px 4px; border: 0; background: transparent; cursor: pointer; border-radius: var(--ot-radius-xs);
  font-family: inherit; font-size: var(--ot-fs-cap); font-weight: var(--ot-fw-semibold); color: var(--ot-text-mid);
  transition: background .15s var(--ot-ease), color .15s var(--ot-ease); }
.ot-source-toggle:hover { background: var(--ot-n-50); color: var(--ot-text); }
.ot-source-toggle:focus-visible { outline: none; box-shadow: var(--ot-ring); }
.ot-source-toggle .ot-ico { flex: 0 0 16px; width: 16px; height: 16px; }

.ot-source { border-left: 3px solid var(--ot-border-strong); background: var(--ot-n-25);
  border-radius: 0 var(--ot-radius-sm) var(--ot-radius-sm) 0; padding: 12px 14px; margin: 0 0 var(--ot-space-3); }
.ot-source-head { display: flex; align-items: baseline; gap: var(--ot-space-3); flex-wrap: wrap;
  font-size: var(--ot-fs-cap); color: var(--ot-text); }
.ot-source-subject { font-weight: var(--ot-fw-semibold); font-size: var(--ot-fs-sm); color: var(--ot-n-900);
  margin: 2px 0 var(--ot-space-2); }
.ot-source-email-preview { display: block; width: 100%; height: 260px; border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius-xs); background: var(--ot-white); }
.ot-email-view-toggle { display: flex; gap: 2px; margin: 0 0 var(--ot-space-2); }
.ot-email-view-toggle button { border: 1px solid var(--ot-border); background: var(--ot-white); color: var(--ot-text-mid);
  padding: 4px 8px; font: inherit; font-size: var(--ot-fs-cap); cursor: pointer; }
.ot-email-view-toggle button:first-child { border-radius: var(--ot-radius-xs) 0 0 var(--ot-radius-xs); }
.ot-email-view-toggle button:last-child { border-radius: 0 var(--ot-radius-xs) var(--ot-radius-xs) 0; }
.ot-email-view-toggle button.active { background: var(--ot-teal-050); border-color: var(--ot-teal); color: var(--ot-teal-dark); }
.ot-email-view-toggle button:focus-visible { outline: none; box-shadow: var(--ot-ring); position: relative; }
.ot-source-none { margin: 0; font-size: var(--ot-fs-cap); color: var(--ot-mid); font-style: italic; }

/* Autonomy dial. Selects/inputs now share the app-wide field treatment incl. the teal focus ring. */
.ot-dial { background: var(--ot-n-25); border: 1px solid var(--ot-border); border-radius: var(--ot-radius);
  padding: 12px 16px; margin: 0 0 var(--ot-space-3); }
.ot-dial-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 0; }
.ot-dial select, .ot-dial input { font-family: inherit; font-size: var(--ot-fs-cap); color: var(--ot-text);
  background: var(--ot-white); border: 1px solid var(--ot-border-strong); border-radius: var(--ot-radius-sm);
  padding: 7px 10px; transition: border-color .15s var(--ot-ease), box-shadow .15s var(--ot-ease); }
.ot-dial select:focus, .ot-dial input:focus { outline: none; border-color: var(--ot-teal); box-shadow: var(--ot-ring); }
.ot-dial input[type=checkbox] { width: auto; padding: 0; }

/* Content calendar (P1-09 slice 4): a back link, and the list of upcoming post times on a calendar card. */
.ot-back { font-size: var(--ot-fs-cap); color: var(--ot-text-mid); text-decoration: none; }
.ot-back:hover { color: var(--ot-text); }
.ot-occurrences { list-style: none; margin: var(--ot-space-1) 0 0; padding: 0; display: flex; flex-direction: column;
  gap: 4px; font-size: var(--ot-fs-cap); color: var(--ot-text-mid); }
.ot-occurrences time { font-variant-numeric: tabular-nums; }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   PUBLIC DEMO OUT-TRAY (P1-14): a drafted email rendered as an email, a post as a post.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.draft { max-width: 560px; }
.draft-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: var(--ot-space-2); }
.draft-who { font-weight: var(--ot-fw-bold); font-size: var(--ot-fs-sm); }

.mail { border: 1px solid var(--ot-border); border-radius: var(--ot-radius); overflow: hidden;
  background: var(--ot-white); box-shadow: var(--ot-shadow); }
.mail-head { display: flex; align-items: center; gap: 11px; padding: 12px 16px;
  background: var(--ot-n-50); border-bottom: 1px solid var(--ot-border); }
.mail-from { font-weight: var(--ot-fw-bold); font-size: var(--ot-fs-sm); }
.mail-addr { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); }
.mail-fields { padding: 11px 16px; border-bottom: 1px solid var(--ot-border); }
.mail-to { font-size: var(--ot-fs-cap); color: var(--ot-text-mid); }
.mail-to b { color: var(--ot-text); font-weight: var(--ot-fw-semibold); }
.mail-subject { font-weight: var(--ot-fw-bold); font-size: var(--ot-fs-lead); margin-top: var(--ot-space-1); }
.mail-body { padding: 15px 16px; font-size: var(--ot-fs-body); line-height: var(--ot-lh-body);
  white-space: pre-wrap; overflow-wrap: anywhere; }

.post { border: 1px solid var(--ot-border); border-radius: var(--ot-radius); background: var(--ot-white);
  box-shadow: var(--ot-shadow); padding: 16px 18px; }
.post-head { display: flex; align-items: center; gap: 11px; margin-bottom: var(--ot-space-3); }
.post-author { font-weight: var(--ot-fw-bold); font-size: var(--ot-fs-sm); }
.post-meta { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); }
.post-body { font-size: var(--ot-fs-body); line-height: var(--ot-lh-body); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Draft cards for the other mediums (ticket, CRM update, calendar invite) reuse the .post shell. */
.card-line { font-weight: var(--ot-fw-bold); font-size: var(--ot-fs-body); margin: 2px 0 var(--ot-space-1); }
.card-sub { font-size: var(--ot-fs-cap); color: var(--ot-text-mid); margin-bottom: var(--ot-space-2); }
.card-sub b { color: var(--ot-text); font-weight: var(--ot-fw-semibold); }

/* Card title / caption for settings-style cards (provider names, plan names) — distinct from .mail-*. */
.ot-card-title { font-size: var(--ot-fs-md); font-weight: var(--ot-fw-semibold); color: var(--ot-n-900);
  letter-spacing: -.01em; }
.ot-card-sub { font-size: var(--ot-fs-cap); color: var(--ot-text-mid); }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   PUBLIC SITE (P1-14): the legal/pricing pages, their shared header, and the one shared footer
   rendered for every unauthenticated route (MainLayout's NotAuthorized branch — covers those pages,
   the demo page, and sign-in/register/invite). Long-form legal prose, pricing tiers/packs and the
   savings calculator live here too.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-public-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--ot-space-3); max-width: 1080px; margin: 0 auto; padding: var(--ot-space-5) var(--ot-space-5) 0; }
.ot-public-header-nav { display: flex; align-items: center; gap: var(--ot-space-4); flex-wrap: wrap; }
.ot-public-header-nav a:not(.pill) { color: var(--ot-text-mid); text-decoration: none; font-size: var(--ot-fs-sm);
  font-weight: var(--ot-fw-semibold); transition: color .15s var(--ot-ease); }
.ot-public-header-nav a:not(.pill):hover { color: var(--ot-teal-dark); }

.ot-public-main { max-width: 1080px; margin: 0 auto; padding: var(--ot-space-6) var(--ot-space-5) var(--ot-space-8); }

.ot-public-footer { border-top: 1px solid var(--ot-border); margin-top: var(--ot-space-7); padding: var(--ot-space-6) var(--ot-space-5); }
.ot-public-footer-inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: var(--ot-space-5); }
.ot-public-footer-brand p { margin: var(--ot-space-1) 0 0; font-size: var(--ot-fs-cap); color: var(--ot-mid); max-width: 36ch; }
.ot-brand-footer { display: block; width: auto; height: 24px; }
.ot-public-footer-nav { display: flex; flex-wrap: wrap; gap: var(--ot-space-4); }
.ot-public-footer-nav a { color: var(--ot-text-mid); text-decoration: none; font-size: var(--ot-fs-sm); font-weight: var(--ot-fw-semibold); }
.ot-public-footer-nav a:hover { color: var(--ot-teal-dark); text-decoration: underline; }
.ot-public-footer-legal { max-width: 1080px; margin: var(--ot-space-5) auto 0; font-size: var(--ot-fs-cap); color: var(--ot-mid); }

/* Long-form legal prose — a comfortable measure, breathing room between sections. */
.ot-prose { max-width: 72ch; font-size: var(--ot-fs-body); line-height: var(--ot-lh-body); color: var(--ot-text); }
.ot-prose h2 { margin: var(--ot-space-6) 0 var(--ot-space-2); font-size: var(--ot-fs-lg); font-weight: var(--ot-fw-heavy); color: var(--ot-n-900); }
.ot-prose h3 { margin: var(--ot-space-4) 0 var(--ot-space-2); font-size: var(--ot-fs-md); font-weight: var(--ot-fw-bold); color: var(--ot-n-900); }
.ot-prose p { margin: 0 0 var(--ot-space-3); }
.ot-prose ul, .ot-prose ol { margin: 0 0 var(--ot-space-3); padding-left: 20px; }
.ot-prose li { margin-bottom: var(--ot-space-1); }
.ot-prose strong { color: var(--ot-n-900); }
.ot-prose table { border-collapse: collapse; width: 100%; margin: 0 0 var(--ot-space-4); font-size: var(--ot-fs-sm); }
.ot-prose th, .ot-prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--ot-border); vertical-align: top; }
.ot-prose thead th { background: var(--ot-n-50); font-weight: var(--ot-fw-bold); font-size: var(--ot-fs-eyebrow);
  text-transform: uppercase; letter-spacing: .05em; color: var(--ot-text-mid); }
/* An unresolved fact a founder/legal reviewer needs to fill in before this page is final. */
.ot-todo { display: inline-block; background: var(--ot-amber-lite); border: 1px solid var(--ot-amber-border);
  border-radius: var(--ot-radius-xs); padding: 1px 6px; font-size: var(--ot-fs-cap); color: var(--ot-amber-dark);
  font-weight: var(--ot-fw-semibold); }

/* Pricing tiers and top-up packs (Rate Card v2.0, read live off Plan.Sellable / TopUpPack.All). */
.ot-pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--ot-space-4); }
.ot-price-card { display: flex; flex-direction: column; gap: var(--ot-space-3); background: var(--ot-white);
  border: 1px solid var(--ot-border); border-radius: var(--ot-radius-lg); box-shadow: var(--ot-shadow); padding: var(--ot-space-5); }
.ot-price-card.featured { border-color: var(--ot-teal); box-shadow: var(--ot-shadow-md); }
.ot-price-name { font-size: var(--ot-fs-md); font-weight: var(--ot-fw-heavy); color: var(--ot-n-900); }
.ot-price-amount { font-size: var(--ot-fs-display); font-weight: var(--ot-fw-heavy); letter-spacing: var(--ot-tracking-tight); color: var(--ot-n-900); }
.ot-price-amount small { font-size: var(--ot-fs-sm); font-weight: var(--ot-fw-semibold); color: var(--ot-mid); }
.ot-price-alt { font-size: var(--ot-fs-cap); color: var(--ot-mid); }
.ot-price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px;
  font-size: var(--ot-fs-sm); color: var(--ot-text-mid); }
.ot-price-list li::before { content: "✓ "; color: var(--ot-teal); font-weight: var(--ot-fw-bold); }
.ot-pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--ot-space-3); }

/* Savings calculator (a small static JS include drives it — see wwwroot/js/pricing-calculator.js). */
.ot-calc-card { background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow); padding: var(--ot-space-5); }
.ot-calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--ot-space-4); margin-bottom: var(--ot-space-5); }
.ot-calc-field label { display: block; font-size: var(--ot-fs-cap); font-weight: var(--ot-fw-semibold); color: var(--ot-text-mid); margin-bottom: var(--ot-space-2); }
.ot-calc-hint { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); margin-top: 4px; }
.ot-calc-result { background: var(--ot-teal-050); border: 1px solid var(--ot-teal-lite); border-radius: var(--ot-radius); padding: var(--ot-space-4); }
.ot-calc-result-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ot-space-3); padding: 6px 0; }
.ot-calc-result-row + .ot-calc-result-row { border-top: 1px dashed var(--ot-teal-lite); }
.ot-calc-headline { font-size: var(--ot-fs-lg); font-weight: var(--ot-fw-heavy); color: var(--ot-teal-dark); margin: 0 0 var(--ot-space-3); }
.ot-calc-assumptions { margin-top: var(--ot-space-4); font-size: var(--ot-fs-cap); color: var(--ot-mid); }
.ot-calc-assumptions summary { cursor: pointer; font-weight: var(--ot-fw-semibold); color: var(--ot-text-mid); }
.ot-calc-assumptions ul { margin: var(--ot-space-2) 0 0; padding-left: 18px; }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   THE CRM SURFACE (ADR-0040): the records browse tab bar, the pipeline board, and the form
   builder's field-picker rows. Built entirely from existing tokens/components elsewhere in this
   file (.ot-card, .ot-badge, .pill, .ot-field) plus the few new shapes below.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ot-border); margin: 0 0 var(--ot-space-5); }
.ot-tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; background: transparent;
  font-family: inherit; font-size: var(--ot-fs-sm); font-weight: var(--ot-fw-semibold); color: var(--ot-text-mid);
  cursor: pointer; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s var(--ot-ease), border-color .15s var(--ot-ease); }
.ot-tab:hover { color: var(--ot-text); }
.ot-tab.active { color: var(--ot-teal-dark); border-bottom-color: var(--ot-teal); }
.ot-tab .count { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); }

/* Pipeline board — a horizontally-scrolling row of stage columns, each a native HTML5 drag/drop target
   (no JS interop: dragstart/dragover/drop are plain DOM events Blazor already exposes). */
.ot-board { display: flex; gap: var(--ot-space-4); align-items: flex-start; overflow-x: auto; padding-bottom: var(--ot-space-3); }
.ot-board-col { flex: 0 0 260px; width: 260px; background: var(--ot-n-25); border: 1px solid var(--ot-border);
  border-radius: var(--ot-radius); padding: var(--ot-space-3); min-height: 120px; transition: background .15s var(--ot-ease), border-color .15s var(--ot-ease); }
.ot-board-col.drag-over { background: var(--ot-teal-050); border-color: var(--ot-teal); }
.ot-board-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: var(--ot-space-3); }
.ot-board-col-title { font-size: var(--ot-fs-cap); font-weight: var(--ot-fw-bold); text-transform: uppercase;
  letter-spacing: .04em; color: var(--ot-text-mid); }
.ot-board-col-total { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); font-variant-numeric: tabular-nums; }
.ot-board-card { background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm);
  box-shadow: var(--ot-shadow-xs); padding: 10px 12px; margin-bottom: var(--ot-space-2); cursor: grab;
  transition: box-shadow .15s var(--ot-ease), border-color .15s var(--ot-ease), opacity .15s var(--ot-ease); }
.ot-board-card:hover { box-shadow: var(--ot-shadow-md); border-color: var(--ot-border-strong); }
.ot-board-card.dragging { opacity: .4; }
.ot-board-card-title { font-weight: var(--ot-fw-semibold); font-size: var(--ot-fs-sm); color: var(--ot-n-900);
  margin-bottom: 4px; overflow-wrap: anywhere; }
.ot-board-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); }
.ot-board-empty { font-size: var(--ot-fs-cap); color: var(--ot-mid); font-style: italic; padding: var(--ot-space-2) 0; }

/* Field-manager / form-builder rows — a compact ordered list with reorder/archive controls. */
.ot-flist { display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-flist-row { display: flex; align-items: center; gap: var(--ot-space-3); background: var(--ot-white);
  border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm); padding: 8px 12px; }
.ot-flist-row.archived { opacity: .55; }
.ot-flist-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ot-flist-name { font-weight: var(--ot-fw-semibold); font-size: var(--ot-fs-sm); color: var(--ot-n-900); }
.ot-flist-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }

/* Record-detail activity feed. */
.ot-activity { display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-activity-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ot-space-3);
  padding: 10px 12px; background: var(--ot-white); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-sm); }
.ot-activity-body { font-size: var(--ot-fs-sm); color: var(--ot-text); }
.ot-activity-meta { font-size: var(--ot-fs-eyebrow); color: var(--ot-mid); margin-top: 2px; }

/* ─────────────────────────────────────────────────────────────────────────────────────────────
   Narrow screens. Desktop-first above; below 640px the top bar wraps and insets tighten.
   ───────────────────────────────────────────────────────────────────────────────────────────── */
.ot-time-readout { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
/* Timekeeping clock (#442): static by design. The hand's angle is set per render from real elapsed minutes, so
   it moves once a minute and never animates — nothing here for prefers-reduced-motion to switch off. */
.ot-time-clock { display: inline-flex; width: 28px; height: 28px; flex: 0 0 28px; }
.ot-clock-face { position: relative; display: block; width: 28px; height: 28px; border: 2px solid var(--ot-teal); border-radius: 50%; background: var(--ot-white); }
.ot-clock-face::after { content: ''; position: absolute; inset: 4px; border: 1px solid var(--ot-border); border-radius: 50%; }
.ot-clock-hand { position: absolute; left: 50%; bottom: 50%; z-index: 1; display: block; width: 2px; height: 9px; border-radius: 2px; background: var(--ot-teal-dark); transform-origin: 50% 100%; transform: translateX(-50%) rotate(var(--ot-clock-angle, 0deg)); }
.ot-clock-pause { position: absolute; left: 50%; top: 50%; z-index: 1; display: block; width: 8px; height: 10px; box-sizing: border-box; border-left: 3px solid var(--ot-teal-dark); border-right: 3px solid var(--ot-teal-dark); transform: translate(-50%, -50%); }
.ot-time-clock.paused .ot-clock-face { border-color: var(--ot-border); }

@media (max-width: 640px) {
  /* The rail becomes an off-canvas drawer: hidden by default, slid in when the burger checks #ot-nav-cb,
     with a tap-to-close backdrop. It ignores the desktop icon-rail collapse rules entirely. */
  .ot-mobile-bar { display: flex; }
  .ot-sidebar { position: fixed; inset: 0 auto 0 0; height: 100dvh; flex-basis: 260px; width: 260px;
                transform: translateX(-100%); box-shadow: var(--ot-shadow-lg); }
  .ot-collapse { display: none; }
  .ot-nav-cb:checked ~ .ot-shell .ot-sidebar { flex-basis: 260px; width: 260px; transform: translateX(0); }
  .ot-nav-cb:checked ~ .ot-shell .ot-brand-full,
  .ot-nav-cb:checked ~ .ot-shell .ot-nav-label,
  .ot-nav-cb:checked ~ .ot-shell .ot-nav-group-label,
  .ot-nav-cb:checked ~ .ot-shell .ot-side-user { display: flex; }
  .ot-nav-cb:checked ~ .ot-shell .ot-side-head { flex-direction: row; padding-inline: var(--ot-space-4); }
  .ot-nav-cb:checked ~ .ot-shell .ot-brand-full { display: block; }
  .ot-nav-cb:checked ~ .ot-shell .ot-brand-compact { display: none !important; }
  .ot-nav-cb:checked ~ .ot-shell .ot-nav-item,
  .ot-nav-cb:checked ~ .ot-shell .ot-side-foot { justify-content: flex-start; padding-inline: var(--ot-space-3); }
  .ot-nav-cb:checked ~ .ot-shell .ot-signout { margin-left: auto; }
  .ot-nav-cb:checked ~ .ot-shell .ot-backdrop { display: block; position: fixed; inset: 0; z-index: 20;
                background: color-mix(in srgb, var(--ot-n-900) 45%, transparent); }
  .ot-main { padding: 20px 14px 48px; }
  .auth-wrap { padding: 16px; }
  .auth-card { padding: 26px 22px; }
  .ot-title { font-size: 22px; }
  .auth-title { font-size: 26px; }
  .desk-grid { grid-template-columns: 1fr; }
  .ot-public-header { padding: var(--ot-space-4) var(--ot-space-4) 0; }
  .ot-public-main { padding: var(--ot-space-5) var(--ot-space-4) var(--ot-space-7); }
  .ot-public-footer { padding: var(--ot-space-5) var(--ot-space-4); }
}
