/* ==========================================================================
   Dhimson Support — V13 interface system
   The ONLY stylesheet loaded by support/base.html. It replaces the 30+ stacked
   V4–V12 override files. Presentation only: no workflow, permission or
   messaging behaviour lives here.

   Sections
     1  Fonts               7  Tables              13 Search, guide, modals
     2  Tokens              8  Status language     14 Pages (scoped .ds-page--*)
     3  Base                9  Forms               15 Legacy adapter (:where, zero specificity)
     4  Header & call dock 10  Data display        16 Responsive
     5  Layout & page head 11  Feedback states     17 Motion, reduced motion, print
     6  Cards & buttons    12  Runtime controls

   Brand: blue tile #315FCD and maroon wordmark #581934 sampled from the
   deployed header. Confirm against the approved logo file before release.
   ========================================================================== */

/* 1 ─ Fonts: Calibri when installed, bundled Carlito otherwise (SIL OFL 1.1, fonts/OFL-Carlito.txt) */
@font-face{font-family:"DS Calibri";src:local("Calibri"),url("fonts/carlito-regular.6c1a4433e436.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"DS Calibri";src:local("Calibri Bold"),local("Calibri-Bold"),url("fonts/carlito-bold.e17d4685f4fc.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"DS Calibri";src:local("Calibri Italic"),local("Calibri-Italic"),url("fonts/carlito-italic.d9a244ac1991.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"DS Calibri";src:local("Calibri Bold Italic"),local("Calibri-BoldItalic"),url("fonts/carlito-bold-italic.71b96b42546c.woff2") format("woff2");font-weight:700;font-style:italic;font-display:swap}

/* 2 ─ Tokens */
:root{
  /* brand */
  --ds-blue:#315FCD; --ds-blue-ink:#2550B4; --ds-blue-soft:#E9EFFC; --ds-blue-line:rgba(49,95,205,.28);
  --ds-wine:#581934; --ds-wine-soft:#F6EDF1;
  /* neutrals */
  --ds-page:#FFFFFF; --ds-surface:#F5F6F8; --ds-surface-2:#EEF0F3; --ds-surface-3:#E6E9EE;
  --ds-ink:#1E2430; --ds-muted:#4E5666; --ds-faint:#646C7B;
  --ds-line:rgba(30,36,48,.08); --ds-line-2:rgba(30,36,48,.16); --ds-line-input:rgba(30,36,48,.22);
  /* status (text colours meet 4.5:1 on their soft backgrounds) */
  --ds-green:#176B43; --ds-green-soft:#E5F3EB; --ds-green-dot:#2B9160;
  --ds-amber:#7E4E00; --ds-amber-soft:#FFF3DC; --ds-amber-dot:#C98500;
  --ds-red:#A3201B; --ds-red-soft:#FCEBEA; --ds-red-dot:#D0453D;
  --ds-grey-soft:#ECEEF2; --ds-grey-ink:#3D4452;
  /* neumorphic depth: light grey boxes on a white page */
  --ds-raise:-4px -4px 10px rgba(255,255,255,.95),4px 5px 14px rgba(30,36,48,.075);
  --ds-raise-sm:-2px -2px 6px rgba(255,255,255,.95),2px 3px 8px rgba(30,36,48,.08);
  --ds-raise-hover:-4px -4px 12px rgba(255,255,255,1),6px 8px 18px rgba(30,36,48,.11);
  --ds-press:inset 2px 2px 5px rgba(30,36,48,.09),inset -2px -2px 5px rgba(255,255,255,.9);
  --ds-pop:0 18px 44px rgba(30,36,48,.16);
  /* type */
  --ds-font:"DS Calibri",Calibri,Carlito,"Segoe UI",system-ui,sans-serif;
  --ds-mono:Consolas,"SFMono-Regular",Menlo,monospace;
  --ds-italic:italic;                       /* agreed design: Calibri italic throughout */
  --ds-t-xs:12px; --ds-t-sm:13px; --ds-t-md:14.5px; --ds-t-base:15px; --ds-t-lg:17px; --ds-t-h3:17px; --ds-t-h2:19px; --ds-t-h1:28px; --ds-t-num:30px;
  /* shape & space */
  --ds-r-card:16px; --ds-r-ctl:10px; --ds-r-pill:999px;
  --ds-max:1240px; --ds-gutter:clamp(16px,4vw,48px); --ds-gap:14px; --ds-gap-lg:20px;
  --ds-ctl:38px; --ds-ctl-sm:32px; --ds-header:64px;
  --ds-ease:cubic-bezier(.2,.7,.2,1);
}

/* 3 ─ Base */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;color-scheme:light;background:var(--ds-page)}
body.ds13{margin:0;background:var(--ds-page);color:var(--ds-ink);font-family:var(--ds-font);font-style:var(--ds-italic);font-size:var(--ds-t-base);line-height:1.45;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
:where(body.ds13) :where(h1,h2,h3,h4,h5,h6){font-family:var(--ds-font);font-style:var(--ds-italic);font-weight:700;color:var(--ds-ink);line-height:1.2;margin:0}
:where(body.ds13) :where(h1){font-size:var(--ds-t-h1)} :where(body.ds13) :where(h2){font-size:var(--ds-t-h2)} :where(body.ds13) :where(h3,h4){font-size:var(--ds-t-h3)} :where(body.ds13) :where(h5,h6){font-size:var(--ds-t-md)}
:where(body.ds13) :where(p){margin:0}
:where(body.ds13) :where(a){color:var(--ds-blue-ink);text-decoration-thickness:1px;text-underline-offset:2px}
:where(body.ds13) :where(a:hover){color:var(--ds-wine)}
:where(body.ds13) :where(small){font-size:var(--ds-t-sm)}
:where(body.ds13) :where(code,kbd,pre){font-family:var(--ds-mono);font-style:normal;font-size:.9em}
:where(body.ds13) :where(code){background:var(--ds-surface-2);border-radius:5px;padding:1px 5px;overflow-wrap:anywhere}
:where(body.ds13) :where(img,svg,canvas,video){max-width:100%}
:where(body.ds13) :where(button,input,select,textarea){font:inherit;color:inherit}
:where(body.ds13) :where(hr){border:0;border-top:1px solid var(--ds-line);margin:12px 0}
[hidden]{display:none!important}
body.ds13 :focus-visible{outline:3px solid var(--ds-blue);outline-offset:2px}
body.ds13 ::selection{background:var(--ds-blue-soft);color:var(--ds-ink)}
.ds-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ds-skip{position:absolute;left:12px;top:-60px;z-index:400;background:var(--ds-blue);color:#fff!important;padding:10px 14px;border-radius:10px;font-weight:700;text-decoration:none}
.ds-skip:focus{top:10px}
.ds-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ds-icon--sm{width:14px;height:14px;stroke-width:2.2}
.ds-icon--lg{width:22px;height:22px;stroke-width:1.8}

/* 4 ─ Header (single, sticky) */
.ds13-header{position:sticky;top:0;z-index:120;background:rgba(255,255,255,.96);backdrop-filter:saturate(1.3) blur(8px);border-bottom:1px solid var(--ds-line)}
.ds13-header__inner{max-width:calc(var(--ds-max) + 2 * var(--ds-gutter));margin:0 auto;padding:0 var(--ds-gutter);min-height:var(--ds-header);display:flex;align-items:center;gap:10px 18px}
.ds13-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ds-wine);flex:none}
.ds13-brand:hover{color:var(--ds-wine)}
.ds13-brand img{width:34px;height:34px;border-radius:9px;object-fit:contain;display:block}
.ds13-brand strong{font-size:19px;font-weight:700;letter-spacing:-.01em;white-space:nowrap}
.ds13-nav{display:flex;align-items:center;gap:2px;flex:1 1 auto;min-width:0}
.ds13-nav__link,.ds13-nav summary{display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:0 11px;border-radius:var(--ds-r-pill);color:var(--ds-ink);font-weight:700;font-size:var(--ds-t-md);text-decoration:none;white-space:nowrap;cursor:pointer;list-style:none;border:1px solid transparent;background:none}
.ds13-nav summary::-webkit-details-marker{display:none}
.ds13-nav__link:hover,.ds13-nav summary:hover{background:var(--ds-surface);color:var(--ds-ink)}
.ds13-nav__link[aria-current="page"],.ds13-nav details.is-current>summary{background:var(--ds-surface);color:var(--ds-wine);border-color:var(--ds-line);box-shadow:var(--ds-raise-sm)}
.ds13-nav details{position:relative}
.ds13-nav details[open]>summary{background:var(--ds-surface)}
.ds13-nav summary .ds-icon{transition:transform .18s var(--ds-ease)}
.ds13-nav details[open]>summary .ds-icon{transform:rotate(180deg)}
.ds13-menu{position:absolute;top:calc(100% + 8px);left:0;min-width:248px;max-width:min(340px,90vw);background:#fff;border:1px solid var(--ds-line);border-radius:14px;box-shadow:var(--ds-pop);padding:6px;z-index:130;display:flex;flex-direction:column}
.ds13-menu--right{left:auto;right:0}
.ds13-menu a,.ds13-menu button{display:flex;flex-direction:column;align-items:flex-start;gap:1px;width:100%;padding:8px 11px;border-radius:9px;color:var(--ds-ink);text-decoration:none;font-weight:700;font-size:var(--ds-t-md);background:none;border:0;text-align:left;cursor:pointer;font-style:var(--ds-italic)}
.ds13-menu a small,.ds13-menu button small{font-weight:400;color:var(--ds-faint);font-size:var(--ds-t-xs)}
.ds13-menu a:hover,.ds13-menu button:hover,.ds13-menu a[aria-current="page"]{background:var(--ds-surface);color:var(--ds-blue-ink)}
.ds13-menu hr{margin:6px 4px}
.ds13-menu form{margin:0}
.ds13-menu__head{padding:8px 11px 6px;display:flex;flex-direction:column}
.ds13-menu__head strong{font-size:var(--ds-t-md)}
.ds13-menu__head small{color:var(--ds-wine);font-weight:700;font-size:var(--ds-t-xs)}
.ds13-menu__label{padding:8px 11px 2px;font-size:var(--ds-t-xs);font-weight:700;color:var(--ds-faint)}
.ds13-menu .is-danger{color:var(--ds-red)}
.ds13-tools{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none}
.ds13-tool{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;min-width:36px;padding:0 12px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);font-weight:700;font-size:var(--ds-t-sm);cursor:pointer;text-decoration:none;font-style:var(--ds-italic);white-space:nowrap}
.ds13-tool:hover{color:var(--ds-blue-ink);box-shadow:var(--ds-raise-hover)}
.ds13-account summary{list-style:none}
.ds13-account summary::-webkit-details-marker{display:none}
.ds13-account{position:relative}
.ds13-avatar{width:26px;height:26px;border-radius:8px;background:var(--ds-blue);color:#fff;display:grid;place-items:center;font-size:12.5px;font-weight:700;flex:none}
.ds13-menu-toggle{display:none}
/* Global call dock — compact chip, expands in place */
.ds13-call{position:fixed;right:18px;bottom:18px;z-index:110;max-width:calc(100vw - 36px)}
.ds13-call>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 14px 6px 8px;border-radius:var(--ds-r-pill);background:#fff;border:1px solid var(--ds-line);box-shadow:var(--ds-pop);cursor:pointer}
.ds13-call>summary::-webkit-details-marker{display:none}
.ds13-call .global-call-dock-icon{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--ds-surface-2);color:var(--ds-ink);font-style:normal;font-size:15px}
.ds13-call[data-call-state="business-open"] .global-call-dock-icon,.ds13-call[data-call-state="queue-waiting"] .global-call-dock-icon{background:var(--ds-green-soft);color:var(--ds-green)}
.ds13-call[data-call-state="internal-active"] .global-call-dock-icon{background:var(--ds-blue);color:#fff}
.ds13-call .global-call-dock-title{display:flex;flex-direction:column;line-height:1.1}
.ds13-call .global-call-dock-title strong{font-size:var(--ds-t-md)}
.ds13-call .global-call-dock-title small{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds13-call .global-call-dock-state{font-size:var(--ds-t-xs);font-weight:700;padding:2px 9px;border-radius:var(--ds-r-pill);background:var(--ds-surface-2);color:var(--ds-grey-ink);white-space:nowrap}
.ds13-call .global-call-dock-body{position:absolute;right:0;bottom:calc(100% + 10px);width:min(360px,calc(100vw - 36px));background:#fff;border:1px solid var(--ds-line);border-radius:16px;box-shadow:var(--ds-pop);padding:14px;display:flex;flex-direction:column;gap:10px;font-size:var(--ds-t-sm)}
.ds13-call .global-call-session-status{display:flex;flex-direction:column;gap:2px}
.ds13-call .global-call-session-status span{color:var(--ds-faint);font-size:var(--ds-t-xs);font-weight:700}
.ds13-call .global-call-dock-metrics,.ds13-call .global-call-dock-locks{display:flex;flex-wrap:wrap;gap:6px}
.ds13-call .global-call-dock-metrics span,.ds13-call .global-call-dock-locks span{background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-pill);padding:2px 10px}
.ds13-call .global-call-dock-actions{display:flex;flex-wrap:wrap;gap:6px}
.ds13-call .global-call-dock-note{color:var(--ds-muted)}

/* 5 ─ Layout & page head */
.ds-main{max-width:calc(var(--ds-max) + 2 * var(--ds-gutter));margin:0 auto;padding:22px var(--ds-gutter) 96px;display:flex;flex-direction:column;gap:var(--ds-gap-lg);min-width:0}
.ds-main:focus{outline:none}
.ds-main>*{min-width:0}
.ds-page{display:flex;flex-direction:column;gap:var(--ds-gap-lg);min-width:0}
.ds-page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 20px}
.ds-page-head__text{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;gap:4px}
.ds-eyebrow{color:var(--ds-wine);font-weight:700;font-size:var(--ds-t-sm);letter-spacing:.01em}
.ds-title{font-size:var(--ds-t-h1);margin:0}
.ds-lede{color:var(--ds-muted);font-size:var(--ds-t-md);max-width:76ch}
.ds-page-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ds-subnav{display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0}
.ds-subnav a,.ds-subnav .ds-subnav__item{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 14px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);text-decoration:none;font-weight:700;font-size:var(--ds-t-sm);white-space:nowrap}
.ds-subnav a:hover{color:var(--ds-blue-ink);box-shadow:var(--ds-raise-hover)}
.ds-subnav a[aria-current="page"],.ds-subnav a.active{background:#fff;color:var(--ds-wine);border-color:rgba(88,25,52,.28);box-shadow:var(--ds-press)}
.ds-subnav b,.ds-count{display:inline-block;min-width:22px;text-align:center;font-size:var(--ds-t-xs);font-weight:700;padding:1px 7px;border-radius:var(--ds-r-pill);background:#fff;color:var(--ds-blue-ink);border:1px solid var(--ds-line)}
.ds-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);gap:var(--ds-gap-lg);align-items:start}
.ds-grid{display:grid;gap:var(--ds-gap);grid-template-columns:repeat(auto-fit,minmax(var(--ds-min,240px),1fr))}
.ds-grid--kpi{--ds-min:190px}
.ds-grid--tiles{--ds-min:260px;grid-template-columns:repeat(auto-fill,minmax(var(--ds-min),1fr))}
.ds-grid--wide{--ds-min:320px}
.ds-grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ds-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ds-row--between{justify-content:space-between}
.ds-row--end{justify-content:flex-end}
.ds-stack{display:flex;flex-direction:column;gap:var(--ds-gap)}
.ds-stack--sm{gap:8px}

/* 6 ─ Cards & buttons */
.ds-card{background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise);padding:18px 20px;display:flex;flex-direction:column;gap:12px;min-width:0}
.ds-card--flush{padding:0;gap:0;overflow:hidden}
.ds-card--tight{padding:12px 14px;gap:8px}
.ds-card--white{background:#fff}
.ds-card--warn{background:#FFFAF0;border-color:rgba(126,78,0,.22)}
.ds-card--danger{border-color:rgba(163,32,27,.24)}
.ds-card__head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 12px}
.ds-card__title{font-size:var(--ds-t-h2)}
.ds-card__sub{color:var(--ds-muted);font-size:var(--ds-t-sm)}
.ds-card__link{font-weight:700;font-size:var(--ds-t-sm);text-decoration:none;white-space:nowrap}
a.ds-card{text-decoration:none;color:var(--ds-ink);transition:box-shadow .2s var(--ds-ease),transform .2s var(--ds-ease)}
a.ds-card:hover{box-shadow:var(--ds-raise-hover);transform:translateY(-2px);color:var(--ds-ink)}
.ds-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:var(--ds-ctl);padding:0 15px;border-radius:var(--ds-r-ctl);font-family:var(--ds-font);font-style:var(--ds-italic);font-weight:700;font-size:var(--ds-t-md);line-height:1.1;border:1px solid var(--ds-line-2);background:var(--ds-surface);color:var(--ds-ink);box-shadow:var(--ds-raise-sm);cursor:pointer;text-decoration:none;white-space:nowrap;transition:box-shadow .15s var(--ds-ease),background .15s,color .15s}
.ds-btn:hover{box-shadow:var(--ds-raise-hover);color:var(--ds-blue-ink)}
.ds-btn:active{box-shadow:var(--ds-press)}
.ds-btn--primary{background:var(--ds-blue);border-color:var(--ds-blue);color:#fff;box-shadow:0 4px 12px rgba(49,95,205,.25)}
.ds-btn--primary:hover{background:var(--ds-blue-ink);color:#fff;box-shadow:0 6px 16px rgba(49,95,205,.3)}
.ds-btn--danger{background:var(--ds-red-soft);border-color:rgba(163,32,27,.25);color:var(--ds-red)}
.ds-btn--danger:hover{color:var(--ds-red);background:#F9E0DE}
.ds-btn--success{background:var(--ds-green-soft);border-color:rgba(23,107,67,.25);color:var(--ds-green)}
.ds-btn--success:hover{color:var(--ds-green)}
.ds-btn--ghost{background:transparent;border-color:transparent;box-shadow:none;color:var(--ds-blue-ink)}
.ds-btn--ghost:hover{background:var(--ds-surface);box-shadow:none}
.ds-btn--sm{min-height:var(--ds-ctl-sm);padding:0 11px;font-size:var(--ds-t-sm);border-radius:9px}
.ds-btn--block{width:100%}
.ds-btn[disabled],.ds-btn[aria-disabled="true"]{opacity:.55;cursor:not-allowed;box-shadow:none;filter:grayscale(.2)}
.ds-why{font-size:var(--ds-t-xs);color:var(--ds-amber);font-weight:700}

/* 7 ─ Tables */
.ds-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px;background:#fff;border:1px solid var(--ds-line)}
.ds-table{width:100%;border-collapse:separate;border-spacing:0;font-size:var(--ds-t-md)}
.ds-table th{text-align:left;font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-muted);background:var(--ds-surface);padding:9px 12px;border-bottom:1px solid var(--ds-line);white-space:nowrap}
.ds-table td{padding:10px 12px;border-bottom:1px solid var(--ds-line);vertical-align:middle}
.ds-table tbody tr:last-child td{border-bottom:0}
.ds-table tbody tr:hover td{background:#FAFBFC}
.ds-table td small,.ds-cell-sub{display:block;font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-table .ds-num{text-align:right;font-variant-numeric:tabular-nums}
.ds-table .ds-actions{text-align:right;white-space:nowrap}
.ds-table td .ds-actions-row,.ds-actions-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.ds-actions-row form{margin:0}
.ds-cell-title{font-weight:700;color:var(--ds-ink);text-decoration:none}
a.ds-cell-title:hover{color:var(--ds-blue-ink)}

/* 8 ─ Status language */
.ds-badge{display:inline-flex;align-items:center;gap:6px;font-size:var(--ds-t-xs);font-weight:700;border-radius:var(--ds-r-pill);padding:2px 9px;white-space:nowrap;background:var(--ds-grey-soft);color:var(--ds-grey-ink);font-style:var(--ds-italic)}
.ds-badge--blue{background:var(--ds-blue-soft);color:var(--ds-blue-ink)}
.ds-badge--green{background:var(--ds-green-soft);color:var(--ds-green)}
.ds-badge--amber{background:var(--ds-amber-soft);color:var(--ds-amber)}
.ds-badge--red{background:var(--ds-red-soft);color:var(--ds-red)}
.ds-badge--wine{background:var(--ds-wine-soft);color:var(--ds-wine)}
.ds-dot{width:8px;height:8px;border-radius:50%;flex:none;background:currentColor;opacity:.8}
.ds-state{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 11px;border-radius:var(--ds-r-pill);font-size:var(--ds-t-xs);font-weight:700;background:var(--ds-surface);border:1px solid var(--ds-line);color:var(--ds-grey-ink);white-space:nowrap}
.ds-state::before{content:"";width:7px;height:7px;border-radius:50%;background:#8A919E}
.ds-state.is-on::before{background:var(--ds-green-dot)} .ds-state.is-on{color:var(--ds-green)}
.ds-state.is-warn::before{background:var(--ds-amber-dot)} .ds-state.is-warn{color:var(--ds-amber)}
.ds-state.is-off::before{background:#8A919E}

/* 9 ─ Forms */
.ds-form{display:flex;flex-direction:column;gap:14px}
.ds-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-items:start}
.ds-form-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.ds-field--full,.ds-form-grid>.form-wide{grid-column:1/-1}
.ds-field{display:flex;flex-direction:column;gap:5px;min-width:0}
.ds-label{font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-ink)}
.ds-help{font-size:var(--ds-t-xs);color:var(--ds-faint);line-height:1.4}
.ds-error{font-size:var(--ds-t-xs);color:var(--ds-red);font-weight:700}
.ds-form-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center;padding-top:4px}
.ds-form-actions--start{justify-content:flex-start}
/* Every native control inside the app gets the same size, border and focus */
:where(body.ds13) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]),select,textarea){width:100%;min-height:var(--ds-ctl);padding:0 11px;border:1px solid var(--ds-line-input);border-radius:var(--ds-r-ctl);background:#fff;color:var(--ds-ink);font-size:var(--ds-t-md);font-style:normal;box-shadow:inset 1px 1px 3px rgba(30,36,48,.05);transition:border-color .15s,box-shadow .15s}
:where(body.ds13) :where(textarea){padding:8px 11px;min-height:76px;line-height:1.45;resize:vertical}
:where(body.ds13) :where(select){padding-right:30px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231E2430' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center}
:where(body.ds13) :where(select[multiple]){background-image:none;padding:6px;min-height:96px}
:where(body.ds13) :where(input,select,textarea)::placeholder{color:#8A909C;font-style:var(--ds-italic)}
:where(body.ds13) :where(input,select,textarea):focus{outline:none;border-color:var(--ds-blue);box-shadow:0 0 0 3px rgba(49,95,205,.16)}
:where(body.ds13) :where(input,select,textarea):disabled,:where(body.ds13) :where(input[readonly]){background:var(--ds-surface-2);color:var(--ds-faint);cursor:not-allowed}
:where(body.ds13) :where(input,select,textarea)[aria-invalid="true"]{border-color:var(--ds-red);box-shadow:0 0 0 3px rgba(163,32,27,.12)}
:where(body.ds13) :where(input[type="checkbox"],input[type="radio"]){width:18px;height:18px;min-height:0;margin:0;flex:none;accent-color:var(--ds-blue);vertical-align:-3px;cursor:pointer}
:where(body.ds13) :where(input[type="file"]){width:100%;font-size:var(--ds-t-sm);padding:7px;border:1px dashed var(--ds-line-input);border-radius:var(--ds-r-ctl);background:#fff}
:where(body.ds13) :where(input[type="file"])::file-selector-button{font:inherit;font-weight:700;margin-right:10px;border:1px solid var(--ds-line-2);background:var(--ds-surface);border-radius:8px;padding:5px 10px;cursor:pointer}
:where(body.ds13) :where(input[type="color"]){padding:3px;width:56px}
.ds-check{display:inline-flex;align-items:center;gap:9px;font-size:var(--ds-t-md);cursor:pointer;min-height:28px;line-height:1.3}
.ds-checks{display:flex;flex-wrap:wrap;gap:8px 18px}
.ds-fieldset{border:1px solid var(--ds-line-2);border-radius:12px;padding:10px 14px 12px;margin:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.ds-fieldset legend{font-size:var(--ds-t-sm);font-weight:700;padding:0 4px}
.ds-error-summary{border:1px solid rgba(163,32,27,.3);background:#FFF7F6;border-radius:12px;padding:10px 14px;font-size:var(--ds-t-md);display:flex;flex-direction:column;gap:3px}
.ds-error-summary strong{color:var(--ds-red)}
.ds-error-summary ul{margin:2px 0 0;padding-left:18px}

/* 10 ─ Data display */
.ds-kpi{position:relative;display:flex;flex-direction:column;gap:4px;padding:16px 18px;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise);text-decoration:none;color:var(--ds-ink);min-width:0;transition:box-shadow .2s var(--ds-ease),transform .2s var(--ds-ease)}
a.ds-kpi:hover{box-shadow:var(--ds-raise-hover);transform:translateY(-2px);color:var(--ds-ink)}
.ds-kpi__label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-muted)}
.ds-kpi__value{font-size:var(--ds-t-num);line-height:1.05;font-weight:700;color:var(--ds-ink);font-variant-numeric:tabular-nums}
.ds-kpi__note{font-size:var(--ds-t-xs);color:var(--ds-faint)}
a.ds-kpi .ds-kpi__note{color:var(--ds-blue-ink);font-weight:700}
.ds-kpi__icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#fff;color:var(--ds-blue);box-shadow:var(--ds-raise-sm);flex:none;transition:transform .25s var(--ds-ease)}
a.ds-kpi:hover .ds-kpi__icon,a.ds-tile:hover .ds-tile__icon{transform:rotate(-6deg) scale(1.06)}
.ds-tile{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise);text-decoration:none;color:var(--ds-ink);min-width:0;transition:box-shadow .2s var(--ds-ease),transform .2s var(--ds-ease)}
.ds-tile:hover{box-shadow:var(--ds-raise-hover);transform:translateY(-2px);color:var(--ds-ink)}
.ds-tile__icon{width:40px;height:40px;flex:none;border-radius:12px;background:#fff;color:var(--ds-blue);display:grid;place-items:center;box-shadow:var(--ds-raise-sm);transition:transform .25s var(--ds-ease)}
.ds-tile__text{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
.ds-tile__text strong{font-size:var(--ds-t-base);color:var(--ds-ink)}
.ds-tile__text small{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-tile__metric{font-size:var(--ds-t-xs);font-weight:700;color:var(--ds-blue-ink);background:#fff;border:1px solid var(--ds-line);border-radius:var(--ds-r-pill);padding:2px 9px;white-space:nowrap}
.ds-tile__arrow{color:var(--ds-faint);flex:none}
/* horizontal bars */
.ds-bars{display:flex;flex-direction:column;gap:6px}
.ds-bar{display:grid;grid-template-columns:minmax(110px,170px) minmax(0,1fr) 44px;gap:10px;align-items:center;font-size:var(--ds-t-sm);text-decoration:none;color:var(--ds-ink);padding:3px 4px;border-radius:8px}
a.ds-bar:hover{background:#fff}
.ds-bar__track{height:8px;border-radius:var(--ds-r-pill);background:var(--ds-surface-3);overflow:hidden}
.ds-bar__fill{display:block;height:100%;border-radius:var(--ds-r-pill);background:var(--ds-blue);width:calc(var(--v,0) * 1%);transform-origin:left;animation:ds-grow-x .7s var(--ds-ease) both}
.ds-bar strong{text-align:right;font-variant-numeric:tabular-nums}
.ds-bar meter,.ds-bar progress{width:100%;height:8px}
/* native meter/progress styled consistently */
body.ds13 meter,body.ds13 progress{-webkit-appearance:none;appearance:none;width:100%;height:8px;border:0;border-radius:var(--ds-r-pill);background:var(--ds-surface-3);overflow:hidden}
body.ds13 meter::-webkit-meter-bar{background:var(--ds-surface-3);border:0;border-radius:var(--ds-r-pill);height:8px}
body.ds13 meter::-webkit-meter-optimum-value,body.ds13 meter::-webkit-meter-suboptimum-value,body.ds13 meter::-webkit-meter-even-less-good-value{background:var(--ds-blue);border-radius:var(--ds-r-pill)}
body.ds13 meter::-moz-meter-bar{background:var(--ds-blue);border-radius:var(--ds-r-pill)}
body.ds13 progress::-webkit-progress-bar{background:var(--ds-surface-3);border-radius:var(--ds-r-pill)}
body.ds13 progress::-webkit-progress-value{background:var(--ds-wine);border-radius:var(--ds-r-pill)}
body.ds13 progress::-moz-progress-bar{background:var(--ds-wine);border-radius:var(--ds-r-pill)}
/* column chart */
.ds-cols{height:var(--h,170px);display:grid;grid-template-columns:repeat(var(--n,7),minmax(0,1fr));gap:10px;align-items:end}
.ds-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%;min-width:0}
.ds-col__val{font-size:var(--ds-t-xs);font-weight:700;color:var(--ds-ink);font-variant-numeric:tabular-nums}
.ds-col__track{width:100%;max-width:34px;flex:1;display:flex;align-items:flex-end;border-radius:8px 8px 4px 4px;background:var(--ds-surface-2)}
.ds-col__bar{display:block;width:100%;min-height:3px;border-radius:8px 8px 4px 4px;background:linear-gradient(180deg,#5A80DB,var(--ds-blue));transform-origin:bottom;animation:ds-grow-y .7s var(--ds-ease) both}
.ds-col__label{font-size:var(--ds-t-xs);color:var(--ds-faint);white-space:nowrap}
/* ring */
.ds-ring{--size:132px;width:var(--size);height:var(--size);border-radius:50%;display:grid;place-items:center;flex:none;background:conic-gradient(var(--ds-wine) 0 calc(var(--v,0) * 1%),var(--ds-surface-3) calc(var(--v,0) * 1%) 100%);box-shadow:var(--ds-raise-sm)}
.ds-ring__inner{width:78%;height:78%;border-radius:50%;background:var(--ds-surface);display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:var(--ds-press)}
.ds-ring__inner strong{font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.ds-ring__inner span{font-size:var(--ds-t-xs);color:var(--ds-faint)}
/* lists & definition lists */
.ds-list{display:flex;flex-direction:column}
.ds-list__row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 2px;border-bottom:1px solid var(--ds-line);text-decoration:none;color:var(--ds-ink);min-width:0}
.ds-list__row:last-child{border-bottom:0}
a.ds-list__row:hover{color:var(--ds-blue-ink)}
.ds-list__text{display:flex;flex-direction:column;min-width:0}
.ds-list__text strong{font-size:var(--ds-t-md)}
.ds-list__text small{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-dl{display:grid;grid-template-columns:minmax(100px,40%) 1fr;gap:7px 12px;margin:0;font-size:var(--ds-t-md)}
.ds-dl dt{color:var(--ds-faint);font-weight:700;font-size:var(--ds-t-sm)}
.ds-dl dd{margin:0;min-width:0;overflow-wrap:anywhere}
/* steps */
.ds-steps{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0;counter-reset:ds-step}
.ds-steps li{counter-increment:ds-step;display:inline-flex;align-items:center;gap:7px;padding:5px 12px 5px 6px;border-radius:var(--ds-r-pill);background:#fff;border:1px solid var(--ds-line);font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-muted)}
.ds-steps li::before{content:counter(ds-step);width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-size:11px;background:var(--ds-surface-2);color:var(--ds-ink);font-style:normal}
.ds-steps li.is-done{color:var(--ds-green)}
.ds-steps li.is-done::before{content:"✓";background:var(--ds-green-soft);color:var(--ds-green)}
/* collapsible section */
.ds-details{border:1px solid var(--ds-line);border-radius:12px;background:#fff}
.ds-details>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;cursor:pointer;font-weight:700;font-size:var(--ds-t-md)}
.ds-details>summary::-webkit-details-marker{display:none}
.ds-details>summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--ds-faint);border-bottom:2px solid var(--ds-faint);transform:rotate(45deg) translateY(-2px);transition:transform .2s var(--ds-ease);flex:none}
.ds-details[open]>summary::after{transform:rotate(-135deg) translateY(-2px)}
.ds-details__body{padding:2px 14px 14px;display:flex;flex-direction:column;gap:10px}

/* 11 ─ Feedback states: flash, notice, empty, denied, unavailable, loading */
.ds-flashes{display:flex;flex-direction:column;gap:8px}
.ds-flash{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-radius:12px;font-size:var(--ds-t-md);border:1px solid var(--ds-line);background:#fff;box-shadow:var(--ds-raise-sm)}
.ds-flash::before{content:"";width:8px;height:8px;border-radius:50%;margin-top:6px;flex:none;background:var(--ds-blue)}
.ds-flash.success{background:#F4FBF7;color:var(--ds-green);border-color:rgba(23,107,67,.25)} .ds-flash.success::before{background:var(--ds-green-dot)}
.ds-flash.warning{background:#FFFAF0;color:var(--ds-amber);border-color:rgba(126,78,0,.25)} .ds-flash.warning::before{background:var(--ds-amber-dot)}
.ds-flash.error,.ds-flash.danger{background:#FFF7F6;color:var(--ds-red);border-color:rgba(163,32,27,.3)} .ds-flash.error::before,.ds-flash.danger::before{background:var(--ds-red-dot)}
.ds-flash__body{flex:1}
.ds-flash__close{background:none;border:0;color:inherit;cursor:pointer;opacity:.7;padding:0 2px;font-size:18px;line-height:1}
.ds-notice{display:flex;gap:10px;align-items:flex-start;padding:10px 14px;border-radius:12px;background:#fff;border:1px solid var(--ds-line);font-size:var(--ds-t-md);color:var(--ds-ink)}
.ds-notice>.ds-icon{margin-top:2px;color:var(--ds-blue)}
.ds-notice--warn{background:#FFFAF0;border-color:rgba(126,78,0,.22)} .ds-notice--warn>.ds-icon{color:var(--ds-amber)}
.ds-notice--ok{background:#F4FBF7;border-color:rgba(23,107,67,.22)} .ds-notice--ok>.ds-icon{color:var(--ds-green)}
.ds-notice--lock{background:var(--ds-surface);border-color:var(--ds-line-2)}
.ds-notice strong{font-weight:700}
.ds-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:22px 16px;border:1px dashed var(--ds-line-2);border-radius:14px;background:rgba(255,255,255,.6);color:var(--ds-muted);font-size:var(--ds-t-md)}
.ds-empty__icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#fff;color:var(--ds-blue);box-shadow:var(--ds-raise-sm);margin-bottom:2px}
.ds-empty strong{color:var(--ds-ink);font-size:var(--ds-t-base)}
.ds-empty--sm{padding:14px 12px;flex-direction:row;text-align:left;justify-content:flex-start}
.ds-empty--sm .ds-empty__icon{width:30px;height:30px;margin:0}
.ds-state-page{max-width:640px;margin:16px auto;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:32px 28px}
.ds-state-page__icon{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:#fff;box-shadow:var(--ds-raise);color:var(--ds-wine)}
.ds-state-page__code{font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-wine)}
.ds-state-page__title{font-size:24px}
.ds-state-page__text{color:var(--ds-muted);max-width:52ch}
.ds-state-page__reason{font-size:var(--ds-t-sm);background:#fff;border:1px solid var(--ds-line);border-radius:10px;padding:8px 12px;color:var(--ds-ink);max-width:52ch}
.ds-skeleton{position:relative;overflow:hidden;background:var(--ds-surface-2);border-radius:8px;min-height:14px;color:transparent!important}
.ds-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent);animation:ds-shimmer 1.3s infinite}
[aria-busy="true"]{cursor:progress}

/* 12 ─ Runtime controls (existing AJAX contract: data-runtime-* hooks kept) */
.ds-wa-runtime-controls{display:flex;align-items:center;gap:6px}
.ds-wa-runtime-controls form{margin:0}
.ds-runtime-toggle{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 6px 0 12px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);font-weight:700;font-size:var(--ds-t-sm);cursor:pointer;font-style:var(--ds-italic)}
.ds-runtime-toggle:hover:not(:disabled){box-shadow:var(--ds-raise-hover)}
.ds-runtime-toggle:disabled{cursor:progress}
.ds-runtime-label{color:var(--ds-ink);white-space:nowrap}
.ds-runtime-switch{display:inline-flex;align-items:center;gap:6px;min-width:58px;height:26px;padding:0 4px 0 9px;border-radius:var(--ds-r-pill);background:var(--ds-surface-3);box-shadow:var(--ds-press)}
.ds-runtime-switch strong{font-size:11.5px;font-weight:700;color:var(--ds-grey-ink);font-style:normal;letter-spacing:.02em}
.ds-runtime-switch i{width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);margin-left:auto;transition:transform .2s var(--ds-ease)}
.ds-runtime-toggle[data-state="ON"] .ds-runtime-switch{background:var(--ds-green-soft)}
.ds-runtime-toggle[data-state="ON"] .ds-runtime-switch strong{color:var(--ds-green)}
.ds-runtime-toggle[data-state="ON"] .ds-runtime-switch i{background:var(--ds-green-dot)}
.ds-runtime-toggle[data-state="OFF"] .ds-runtime-switch strong{color:var(--ds-grey-ink)}
.ds-runtime-toggle[data-state="CHECKING"] .ds-runtime-switch strong{color:var(--ds-faint)}
.ds-runtime-toggle[data-state="UNAVAILABLE"] .ds-runtime-switch,.ds-runtime-toggle[data-state="ERROR"] .ds-runtime-switch{background:var(--ds-amber-soft)}
.ds-runtime-toggle[data-state="UNAVAILABLE"] .ds-runtime-switch strong,.ds-runtime-toggle[data-state="ERROR"] .ds-runtime-switch strong{color:var(--ds-amber)}
.dl-runtime-feedback{font-size:var(--ds-t-xs);color:var(--ds-amber);max-width:220px;line-height:1.2}
.dl-runtime-feedback:empty{display:none}
/* Read-only runtime + handoff strip (whatsapp_runtime_strip tag) */
.ds-wa-live-strip{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:var(--ds-t-xs)}
.ds-wa-live-strip>span{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 11px;border-radius:var(--ds-r-pill);background:#fff;border:1px solid var(--ds-line);color:var(--ds-muted)}
.ds-wa-live-strip b{font-weight:700;color:var(--ds-ink)}
.ds-wa-live-strip strong{font-weight:700}
.ds-wa-live-strip .state-on{color:var(--ds-green)} .ds-wa-live-strip .state-off{color:var(--ds-grey-ink)}
/* The header already shows the live switches to people who may change them: hide the duplicate service pills */
body.ds13:has(.ds13-header .ds-wa-runtime-controls) .ds-wa-live-strip>span:nth-child(-n+2){display:none}
body.ds13:has(.ds13-header .ds-wa-runtime-controls) .ds-wa-live-strip:not(:has(>span:nth-child(3))){display:none}

/* 13 ─ Global search overlay (built by global_search_navigate_v1.js) */
.ds-global-search-trigger{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 12px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);font-weight:700;font-size:var(--ds-t-sm);cursor:pointer;font-style:var(--ds-italic)}
.ds-global-search-trigger:hover{color:var(--ds-blue-ink);box-shadow:var(--ds-raise-hover)}
.ds-global-search-trigger svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.ds-search-backdrop{position:fixed;inset:0;z-index:300;background:rgba(30,36,48,.32);backdrop-filter:blur(3px);display:none;align-items:flex-start;justify-content:center;padding:9vh 16px 16px}
.ds-search-backdrop.is-open{display:flex}
.ds-search-dialog{width:min(680px,100%);max-height:78vh;display:flex;flex-direction:column;background:#fff;border-radius:18px;box-shadow:var(--ds-pop);overflow:hidden;font-family:var(--ds-font);font-style:var(--ds-italic)}
.ds-search-head{padding:14px 16px 10px;border-bottom:1px solid var(--ds-line);display:flex;flex-direction:column;gap:8px}
.ds-search-title-row{display:flex;justify-content:space-between;align-items:center}
.ds-search-title{font-weight:700;font-size:var(--ds-t-lg)}
.ds-search-close{border:0;background:var(--ds-surface);border-radius:8px;width:30px;height:30px;font-size:18px;cursor:pointer;color:var(--ds-ink)}
.ds-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--ds-line-input);border-radius:12px;padding:0 12px;background:#fff}
.ds-search-input-wrap svg{width:18px;height:18px;fill:none;stroke:var(--ds-faint);stroke-width:2.2;stroke-linecap:round;flex:none}
body.ds13 .ds-search-input-wrap .ds-search-input{border:0;box-shadow:none;padding:0;min-height:42px}
.ds-search-hint,.ds-search-footer{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-search-results{overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:4px}
.ds-search-results>div:not(.ds-search-result):not(.ds-search-empty){font-size:var(--ds-t-xs);font-weight:700;color:var(--ds-faint);padding:8px 8px 2px}
.ds-search-result{display:flex;gap:10px;align-items:flex-start;padding:9px 10px;border-radius:10px;cursor:pointer;color:var(--ds-ink);text-decoration:none}
.ds-search-result.is-active,.ds-search-result:hover{background:var(--ds-surface)}
.ds-search-result-icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--ds-blue-soft);color:var(--ds-blue-ink);font-weight:700;flex:none;font-style:normal;font-size:12px}
.ds-search-result-title{font-weight:700}
.ds-search-result-meta,.ds-search-result-location,.ds-search-result-desc{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-search-empty{padding:18px;text-align:center;color:var(--ds-muted);font-size:var(--ds-t-sm)}
.ds-search-footer{display:flex;justify-content:space-between;padding:8px 16px;border-top:1px solid var(--ds-line)}
/* Guide drawer (user_guide.js) */
.ds-user-guide-launcher{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 12px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);font-weight:700;font-size:var(--ds-t-sm);cursor:pointer;font-style:var(--ds-italic)}
.ds-user-guide-launcher:hover{color:var(--ds-blue-ink);box-shadow:var(--ds-raise-hover)}
.ds-user-guide-launcher-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round;display:block}
.ds-user-guide-overlay{position:fixed;inset:0;z-index:290;background:rgba(30,36,48,.32)}
.ds-user-guide-drawer{position:fixed;top:0;right:0;bottom:0;z-index:300;width:min(460px,100vw);background:#fff;box-shadow:var(--ds-pop);display:flex;flex-direction:column;font-family:var(--ds-font);font-style:var(--ds-italic);color:var(--ds-ink);animation:ds-slide-in .22s var(--ds-ease)}
body.ds-user-guide-open{overflow:hidden}
.ds-guide-header{padding:16px 18px 0;border-bottom:1px solid var(--ds-line);display:flex;flex-direction:column;gap:10px}
.ds-guide-brand-row{display:flex;justify-content:space-between;align-items:center}
.ds-guide-brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:var(--ds-t-xs);color:var(--ds-wine);letter-spacing:.04em}
.ds-guide-brand-icon{width:24px;height:24px;border-radius:7px;background:var(--ds-wine);color:#fff;display:grid;place-items:center;font-style:normal}
.ds-user-guide-close{border:0;background:var(--ds-surface);border-radius:8px;width:32px;height:32px;font-size:18px;cursor:pointer;color:var(--ds-ink)}
.ds-guide-heading h2{font-size:21px;margin:2px 0 4px}
.ds-guide-heading p,.ds-guide-purpose{color:var(--ds-muted);font-size:var(--ds-t-md)}
.ds-guide-kicker,.ds-guide-section-label,.ds-guide-mini-label,.ds-guide-next-label{font-size:var(--ds-t-xs);font-weight:700;color:var(--ds-wine)}
.ds-guide-location{display:flex;flex-direction:column;gap:1px;background:var(--ds-surface);border-radius:10px;padding:8px 12px;font-size:var(--ds-t-sm)}
.ds-guide-location span{color:var(--ds-faint);font-size:var(--ds-t-xs)}
.ds-guide-tabs{display:flex;gap:2px;overflow-x:auto}
.ds-guide-tab{border:0;background:none;padding:9px 12px;font-weight:700;font-size:var(--ds-t-sm);color:var(--ds-muted);border-bottom:3px solid transparent;cursor:pointer;white-space:nowrap;font-style:var(--ds-italic)}
.ds-guide-tab.is-active{color:var(--ds-ink);border-bottom-color:var(--ds-wine)}
.ds-guide-body{flex:1;overflow-y:auto;padding:16px 18px 24px}
.ds-guide-pane{display:flex;flex-direction:column;gap:14px}
.ds-guide-section{display:flex;flex-direction:column;gap:6px}
.ds-guide-start-list,.ds-guide-rule-list,.ds-guide-workflow-list,.ds-guide-permission-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ds-guide-start-list li{display:flex;gap:10px;align-items:flex-start;font-size:var(--ds-t-md)}
.ds-guide-start-list li>span{width:22px;height:22px;border-radius:50%;background:var(--ds-blue-soft);color:var(--ds-blue-ink);display:grid;place-items:center;font-size:12px;font-weight:700;flex:none;font-style:normal}
.ds-guide-next-card,.ds-guide-role-card,.ds-guide-workflow{background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}
.ds-guide-go-link{font-weight:700}
/* Access Center modals (access_center_v2.js toggles [hidden] and body classes) */
.ac4-modal,.as6-modal{position:fixed;inset:0;z-index:250;display:grid;place-items:center;padding:20px}
.ac4-modal-backdrop,.as6-modal-backdrop{position:absolute;inset:0;background:rgba(30,36,48,.38);backdrop-filter:blur(2px)}
.ac4-modal-card,.as6-modal-card{position:relative;width:min(640px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:var(--ds-pop);padding:20px;display:flex;flex-direction:column;gap:10px}
.as6-modal-card{width:min(900px,96vw)}
.ac4-modal-card header,.as6-modal-card header,.ac4-modal-card footer,.as6-modal-card footer{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.ac4-modal-card footer,.as6-modal-card footer{justify-content:flex-end}
.ac4-modal-x,.as6-close{border:0;background:var(--ds-surface);border-radius:8px;width:32px;height:32px;cursor:pointer;font-size:18px}
.ac4-modal-open,.as6-modal-open{overflow:hidden}
.template-field-hidden{display:none!important}
.danger-text{color:var(--ds-red)!important}
/* Native <dialog> confirm (dhimson-v13.js data-ds-confirm) */
.ds-dialog{border:0;padding:0;background:transparent;width:min(480px,calc(100vw - 32px));color:var(--ds-ink);font-family:var(--ds-font);font-style:var(--ds-italic)}
.ds-dialog::backdrop{background:rgba(30,36,48,.38);backdrop-filter:blur(2px)}
.ds-dialog__panel{background:#fff;border-radius:18px;box-shadow:var(--ds-pop);padding:22px;display:flex;flex-direction:column;gap:12px;animation:ds-pop .18s var(--ds-ease)}
.ds-dialog__title{font-size:21px}
.ds-dialog__text{color:var(--ds-muted)}

/* 14 ─ Pages ---------------------------------------------------------------- */
/* Dashboard */
.ds-page--dashboard .ds-chart-card{min-height:0}
.ds-page--dashboard .ds-progress{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.ds-page--dashboard .ds-progress__text{display:flex;flex-direction:column;gap:6px;flex:1;min-width:150px}
/* Chat Center: list | conversation | context */
.ds-page--chat{gap:14px}
.ds-chat-filters{display:flex;flex-wrap:wrap;gap:6px}
.ds-chat-filters a{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 11px;border-radius:var(--ds-r-pill);background:#fff;border:1px solid var(--ds-line);color:var(--ds-ink);font-weight:700;font-size:var(--ds-t-sm);text-decoration:none;white-space:nowrap}
.ds-chat-filters a b{font-size:11px;min-width:18px;text-align:center;padding:0 6px;border-radius:var(--ds-r-pill);background:var(--ds-surface-2);color:var(--ds-muted)}
.ds-chat-filters a small{font-size:11px;color:var(--ds-faint);font-weight:400}
.ds-chat-filters a[aria-current="page"]{background:var(--ds-blue);border-color:var(--ds-blue);color:#fff}
.ds-chat-filters a[aria-current="page"] b{background:rgba(255,255,255,.22);color:#fff}
.ds-chat-filters a[aria-current="page"] small{color:rgba(255,255,255,.8)}
.ds-chat{display:grid;grid-template-columns:minmax(240px,290px) minmax(0,1fr) minmax(260px,310px);gap:14px;align-items:stretch;height:clamp(560px,calc(100vh - 230px),900px)}
.ds-chat__col{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}
.ds-chat__colhead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;border-bottom:1px solid var(--ds-line)}
.ds-chat__colhead h2{font-size:var(--ds-t-lg)}
.ds-chat__scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.ds-chat__items{display:flex;flex-direction:column;gap:3px;padding:8px}
.ds-chat-item{display:flex;flex-direction:column;gap:2px;padding:9px 11px;border-radius:11px;text-decoration:none;color:var(--ds-ink);border:1px solid transparent}
.ds-chat-item:hover{background:#fff;color:var(--ds-ink)}
.ds-chat-item.active,.ds-chat-item[aria-current="page"]{background:#fff;border-color:var(--ds-line);box-shadow:var(--ds-raise-sm),inset 3px 0 0 var(--ds-blue)}
.ds-chat-item__top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.ds-chat-item__top strong{font-size:var(--ds-t-md)}
.ds-chat-item__top time{font-size:11.5px;color:var(--ds-faint);white-space:nowrap}
.ds-chat-item__meta{font-size:var(--ds-t-xs);color:var(--ds-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ds-chat-item__state{font-size:11.5px;color:var(--ds-faint)}
.ds-chat-item__state b{color:var(--ds-wine);font-weight:700}
.ds-chat__conv-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px 12px;padding:12px 16px;border-bottom:1px solid var(--ds-line)}
.ds-chat__conv-head>div:first-child{flex:1 1 220px;min-width:0}
.ds-chat__conv-head h2{font-size:var(--ds-t-lg)}
.ds-chat__conv-head p{font-size:var(--ds-t-xs);color:var(--ds-faint);overflow-wrap:anywhere}
.ds-chat__presence{display:flex;flex-wrap:wrap;gap:4px}
.ds-chat__policy{padding:7px 16px;font-size:var(--ds-t-xs);display:flex;flex-wrap:wrap;gap:2px 8px;border-bottom:1px solid var(--ds-line);background:var(--ds-amber-soft);color:var(--ds-amber)}
.ds-chat__policy.open{background:var(--ds-green-soft);color:var(--ds-green)}
.ds-chat__policy strong{font-weight:700}
.ds-messages{flex:1;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:9px;background:linear-gradient(180deg,#fff,var(--ds-page))}
.ds-msg{max-width:min(76%,600px);align-self:flex-start;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:14px 14px 14px 4px;padding:8px 12px;font-size:var(--ds-t-md);overflow-wrap:anywhere;box-shadow:var(--ds-raise-sm)}
.ds-msg p{margin:2px 0 0;white-space:pre-wrap}
.ds-msg.outbound{align-self:flex-end;background:var(--ds-blue);border-color:var(--ds-blue);color:#fff;border-radius:14px 14px 4px 14px;box-shadow:0 3px 10px rgba(49,95,205,.18)}
.ds-msg.redacted{opacity:.75;font-style:var(--ds-italic)}
.ds-msg .message-meta{font-size:11.5px;opacity:.78}
.ds-msg .translation-source{font-size:11.5px;opacity:.78;margin-top:3px}
.ds-composer{border-top:1px solid var(--ds-line);padding:10px 14px 12px;display:flex;flex-direction:column;gap:8px;background:#fff}
.ds-composer textarea{min-height:58px!important;max-height:180px}
.ds-composer__bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ds-composer__bar .ds-composer__lang{display:flex;align-items:center;gap:6px;font-size:var(--ds-t-xs);font-weight:700;color:var(--ds-muted);flex:1 1 180px;min-width:0}
.ds-composer__bar .ds-composer__lang select{min-height:32px;font-size:var(--ds-t-sm);flex:1;min-width:0}
.ds-composer__send{margin-left:auto}
.ds-composer .ds-details>summary{padding:6px 10px;font-size:var(--ds-t-sm)}
.ds-composer .language-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
.ds-composer .language-toolbar label{display:flex;flex-direction:column;gap:3px;font-size:var(--ds-t-xs);font-weight:700;flex:1 1 140px}
.customer-language-lock{display:inline-flex;flex-direction:column;justify-content:center;font-size:11.5px;color:var(--ds-faint);font-weight:700;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:9px;padding:3px 10px;min-height:var(--ds-ctl-sm)}
.customer-language-lock strong{font-size:var(--ds-t-sm);color:var(--ds-ink)}
.customer-language-note,.ai-assist-note,.template-variable-help{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-guard{border:1px solid rgba(126,78,0,.25);background:#FFFAF0;color:var(--ds-amber);border-radius:10px;padding:8px 12px;display:flex;flex-direction:column;gap:4px;font-size:var(--ds-t-sm)}
.ds-guard label{display:flex;gap:8px;align-items:flex-start;color:var(--ds-ink)}
.ds-chat__ctx-body{padding:12px 14px;display:flex;flex-direction:column;gap:12px}
.ds-chat__ctx-body form{margin:0;display:flex;flex-direction:column;gap:8px}
.ds-chat__actions{display:flex;flex-wrap:wrap;gap:6px}
.ds-chat__actions form{display:contents}
.ds-chat__ctx-body .ds-details{background:#fff}
.ds-chat-back{display:none}
/* WhatsApp Center */
.ds-wa-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--ds-gap-lg)}
.ds-wa-section{scroll-margin-top:calc(var(--ds-header) + 16px)}
.ds-wa-meta-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,280px);gap:var(--ds-gap-lg);align-items:start}
.ds-wa-truth{display:flex;flex-wrap:wrap;gap:6px}
/* Organization / module tiles share .ds-tile */
/* Auth pages */
body.ds13.ds13-auth{background:var(--ds-page)}
.ds-auth{min-height:100vh;display:grid;grid-template-columns:minmax(320px,1fr) minmax(340px,460px);gap:28px;align-items:center;max-width:1080px;margin:0 auto;padding:28px var(--ds-gutter)}
.ds-auth__story{display:flex;flex-direction:column;gap:16px;padding:36px;border-radius:24px;background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise)}
.ds-auth__story img{width:56px;height:56px;border-radius:14px;object-fit:contain}
.ds-auth__story h2{font-size:38px;line-height:1.08;color:var(--ds-ink)}
.ds-auth__story p{color:var(--ds-muted);font-size:var(--ds-t-base);max-width:42ch}
.ds-auth__story ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.ds-auth__story li{display:flex;gap:10px;align-items:center;font-size:var(--ds-t-md)}
.ds-auth__story li::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--ds-wine);flex:none}
.ds-auth__card{background:#fff;border:1px solid var(--ds-line);border-radius:22px;box-shadow:var(--ds-raise);padding:30px 28px;display:flex;flex-direction:column;gap:14px}
.ds-auth__card h1{font-size:28px}
.ds-auth__brand{display:flex;align-items:center;gap:10px;color:var(--ds-wine);font-weight:700;font-size:18px}
.ds-auth__brand img{width:36px;height:36px;border-radius:10px}
.ds-auth__card form{display:flex;flex-direction:column;gap:12px}
.ds-auth__card label:not(.ds-check){display:flex;flex-direction:column;gap:5px;font-size:var(--ds-t-sm);font-weight:700}
.ds-auth__foot{font-size:var(--ds-t-xs);color:var(--ds-faint);text-align:center}

/* 15 ─ Legacy adapter -------------------------------------------------------
   Zero-specificity (:where) styles for the V4–V12 class vocabulary still used
   by templates that were not restructured. Any .ds-* rule above wins.        */
:where(body.ds13 .ds-main) :where(.page-head,.ds4c-standard-head,.gov-ux-head,.e5-command,.g4f-page-head,.g5a-head,.chat-center-head,.ds-wa-page-head,.section-toolbar,.settings-page-head,.external-review-hero){display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:10px 20px}
:where(body.ds13 .ds-main) :where(.page-head,.ds4c-standard-head,.gov-ux-head,.e5-command,.g4f-page-head,.g5a-head)>div:first-child{flex:1 1 380px;min-width:0;display:flex;flex-direction:column;gap:4px}
:where(body.ds13 .ds-main) :where(.page-head,.gov-ux-head,.e5-command,.g4f-page-head,.g5a-head,.chat-center-head,.ds-wa-page-head) h1{font-size:var(--ds-t-h1)}
:where(body.ds13 .ds-main) :where(.eyebrow,.g4f-eyebrow,.g4f-kicker,.ds-wa-kicker,.kicker){display:block;color:var(--ds-wine);font-weight:700;font-size:var(--ds-t-sm);font-style:var(--ds-italic);text-transform:none;letter-spacing:.01em}
:where(body.ds13 .ds-main) :where(.muted,.helptext,.form-text,.text-muted){color:var(--ds-muted);font-size:var(--ds-t-md)}
:where(body.ds13 .ds-main) :where(small.muted,.helptext,.form-text){font-size:var(--ds-t-xs)}
:where(body.ds13 .ds-main) :where(.page-head-actions,.page-actions,.actions,.gov-ux-actions,.e5-actions,.g4f-head-actions,.account-v2-actions,.ds-wa-actions,.row-actions,.template-actions,.meta-workflow-actions){display:flex;flex-wrap:wrap;gap:8px;align-items:center}
:where(body.ds13 .ds-main) :where(.page-head-actions,.page-actions,.actions,.gov-ux-actions,.e5-actions,.g4f-head-actions,.ds-wa-actions,.row-actions,.template-actions) form{margin:0}
:where(body.ds13 .ds-main) :where(.back-link,.ds4c-back-link,.external-review-back){display:inline-flex;align-items:center;gap:4px;font-weight:700;font-size:var(--ds-t-sm);color:var(--ds-blue-ink);text-decoration:none;margin-bottom:2px}
/* containers → neumorphic box */
:where(body.ds13 .ds-main) :where(.card,.table-card,.form-card,.pc-form-card,.e5-table-card,.g4f-panel,.ds-wa-panel,.ds4c-table-card,.account-v2-card,.mfa-card,.ma1-card,.as6-card,.g4b-report-card,.automation-status-card,.ds4c-provider-card,.settings-section,.template-section-card,.ds4c-form-section,.pc-section,.ds-wa-truth-card,.g2-action-card,.gov-sample-card,.knowledge-asset-row){background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise);padding:18px 20px;min-width:0;display:flex;flex-direction:column;gap:12px}
:where(body.ds13 .ds-main) :where(.card,.ds-wa-panel,.g4f-panel,.settings-section) :where(.card){box-shadow:none;background:#fff;padding:14px 16px}
:where(body.ds13 .ds-main) :where(.card-head,.ds-wa-panel-head,.g4f-section-head,.section-head,.ac5-section-head,.as6-card-head){display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px 14px}
:where(body.ds13 .ds-main) :where(.card-head,.ds-wa-panel-head,.g4f-section-head,.section-head)>div:first-child{flex:1 1 260px;min-width:0;display:flex;flex-direction:column;gap:3px}
:where(body.ds13 .ds-main) :where(.card-head,.ds-wa-panel-head,.g4f-section-head,.section-head) p{color:var(--ds-muted);font-size:var(--ds-t-sm)}
:where(body.ds13 .ds-main) :where(.card-body){display:flex;flex-direction:column;gap:10px}
/* grids → auto-fit */
:where(body.ds13 .ds-main) :where(.module-grid,.ds4c-module-grid,.audit-grid,.gov-ux-guidance,.gov-samples,.settings-launch-grid,.settings-overview-grid,.ds4c-workspace-grid,.account-v2-grid,.automation-status-grid,.g4f-secondary-grid,.ds-wa-status-grid,.two-col,.ds4c-provider-kpis,.knowledge-readiness-list,.rc3-template-grid,.branding-settings-grid){display:grid;gap:var(--ds-gap);grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
:where(body.ds13 .ds-main) :where(.g4f-analysis-grid,.automation-layout){display:grid;gap:var(--ds-gap);grid-template-columns:minmax(0,1fr) minmax(260px,340px);align-items:start}
/* metric strips → compact KPI row */
:where(body.ds13 .ds-main) :where(.metric-strip,.ds4c-kpi-grid,.settings-metrics,.g4f-kpi-grid,.dl-summary-grid){display:grid;gap:var(--ds-gap);grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
:where(body.ds13 .ds-main) :where(.metric,.g4f-kpi,.g4b-metric,.ds4c-kpi,.dl-number-card,.settings-metrics>div,.g4f-ageing-item,.ds-wa-status-grid>article,.ds-wa-truth-grid>span,.ac5-number){display:flex;flex-direction:column;gap:3px;padding:14px 16px;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:14px;box-shadow:var(--ds-raise-sm);min-width:0;color:var(--ds-ink);text-decoration:none}
:where(body.ds13 .ds-main) :where(.metric,.settings-metrics>div,.g4f-ageing-item,.ac5-number) :where(b,strong){font-size:24px;line-height:1.1;font-weight:700;order:-1;font-variant-numeric:tabular-nums}
:where(body.ds13 .ds-main) :where(.g4f-kpi,.ds-wa-status-grid>article,.dl-number-card) :where(strong){font-size:24px;line-height:1.1;font-weight:700}
:where(body.ds13 .ds-main) :where(.metric,.g4f-kpi,.g4b-metric,.settings-metrics>div,.g4f-ageing-item,.ds-wa-status-grid>article) :where(span,small){font-size:var(--ds-t-xs);color:var(--ds-muted)}
:where(body.ds13 .ds-main) :where(.ds-wa-truth-grid){display:flex;flex-wrap:wrap;gap:8px}
:where(body.ds13 .ds-main) :where(.ds-wa-truth-grid>span){flex-direction:row;align-items:center;gap:8px;padding:6px 12px;border-radius:var(--ds-r-pill);font-size:var(--ds-t-sm)}
/* launch/module cards */
:where(body.ds13 .ds-main) :where(.module-card,.ds4c-module-card,.settings-launch-card,.settings-mini-card,.ds4c-workspace-card,.featured-module,.ds4c-governance-card){display:flex;flex-direction:column;gap:4px;padding:14px 16px;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise);color:var(--ds-ink);text-decoration:none;min-width:0;transition:box-shadow .2s var(--ds-ease),transform .2s var(--ds-ease)}
:where(body.ds13 .ds-main) :where(a.module-card,a.ds4c-module-card,a.settings-launch-card,a.settings-mini-card,a.ds4c-workspace-card,a.ds4c-governance-card):hover{box-shadow:var(--ds-raise-hover);transform:translateY(-2px);color:var(--ds-ink)}
:where(body.ds13 .ds-main) :where(.module-card,.ds4c-module-card,.settings-launch-card,.settings-mini-card,.ds4c-workspace-card,.ds4c-governance-card) :where(strong){font-size:var(--ds-t-base)}
:where(body.ds13 .ds-main) :where(.module-card,.ds4c-module-card,.settings-launch-card,.settings-mini-card,.ds4c-workspace-card,.ds4c-governance-card) :where(small,p){font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(.module-icon,.ds4c-module-icon,.settings-launch-card>span:first-child,.settings-mini-card>span:first-child,.ds4c-provider-icon,.g4b-report-icon,.g2-action-icon,.ds4c-kpi-icon,.ds4c-workspace-icon){width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#fff;color:var(--ds-blue);box-shadow:var(--ds-raise-sm);font-size:11px;font-weight:700;font-style:normal;margin-bottom:4px}
/* buttons: every <button> and a.button in the app */
:where(body.ds13 .ds-main) :where(button,.button,a.btn,.btn,.small-button,.link-button,.table-action,input[type="submit"]){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--ds-ctl);padding:0 14px;border-radius:var(--ds-r-ctl);border:1px solid var(--ds-blue);background:var(--ds-blue);color:#fff;font-family:var(--ds-font);font-style:var(--ds-italic);font-weight:700;font-size:var(--ds-t-md);line-height:1.1;text-decoration:none;cursor:pointer;white-space:nowrap;box-shadow:0 3px 10px rgba(49,95,205,.2);transition:box-shadow .15s var(--ds-ease),background .15s}
:where(body.ds13 .ds-main) :where(button,.button,.btn,input[type="submit"]):hover{background:var(--ds-blue-ink);color:#fff}
:where(body.ds13 .ds-main) :where(.secondary,.button.secondary,.btn-outline-primary,.btn-outline-secondary,.link-button,.table-action,.small-button,button.secondary){background:var(--ds-surface);border-color:var(--ds-line-2);color:var(--ds-ink);box-shadow:var(--ds-raise-sm)}
:where(body.ds13 .ds-main) :where(.secondary,.button.secondary,.btn-outline-primary,.btn-outline-secondary,.link-button,.table-action,.small-button,button.secondary):hover{background:#fff;color:var(--ds-blue-ink);box-shadow:var(--ds-raise-hover)}
:where(body.ds13 .ds-main) :where(.danger,.button.danger,.danger-soft,.btn-danger,.danger-link){background:var(--ds-red-soft);border-color:rgba(163,32,27,.25);color:var(--ds-red);box-shadow:none}
:where(body.ds13 .ds-main) :where(.danger,.button.danger,.danger-soft,.btn-danger):hover{background:#F9E0DE;color:var(--ds-red)}
:where(body.ds13 .ds-main) :where(.success-soft,.btn-success){background:var(--ds-green-soft);border-color:rgba(23,107,67,.25);color:var(--ds-green);box-shadow:none}
:where(body.ds13 .ds-main) :where(.small-button,.btn-sm,.table-action){min-height:var(--ds-ctl-sm);padding:0 11px;font-size:var(--ds-t-sm)}
:where(body.ds13 .ds-main) :where(.full,.btn-block){width:100%}
:where(body.ds13 .ds-main) :where(button,.button,.btn)[disabled],:where(body.ds13 .ds-main) :where(button,.button,.btn)[aria-disabled="true"],:where(body.ds13 .ds-main) :where(.disabled-action){opacity:.55;cursor:not-allowed;box-shadow:none;filter:grayscale(.25)}
:where(body.ds13 .ds-main) :where(.disabled-action){display:inline-flex;align-items:center;min-height:var(--ds-ctl-sm);padding:0 10px;border-radius:9px;background:var(--ds-surface-2);color:var(--ds-muted);font-size:var(--ds-t-xs)}
/* tables */
:where(body.ds13 .ds-main) :where(.table-wrap,.table-responsive,.ds-wa-table-wrap,.g4f-table-scroll){overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px;background:#fff;border:1px solid var(--ds-line);max-width:100%}
:where(body.ds13 .ds-main) :where(table){width:100%;border-collapse:separate;border-spacing:0;font-size:var(--ds-t-md)}
:where(body.ds13 .ds-main) :where(table) :where(th){text-align:left;font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-muted);background:var(--ds-surface);padding:9px 12px;border-bottom:1px solid var(--ds-line);white-space:nowrap;vertical-align:bottom}
:where(body.ds13 .ds-main) :where(table) :where(td){padding:10px 12px;border-bottom:1px solid var(--ds-line);vertical-align:middle;overflow-wrap:anywhere}
:where(body.ds13 .ds-main) :where(table) :where(tbody tr:last-child td){border-bottom:0}
:where(body.ds13 .ds-main) :where(table) :where(td small){display:block;font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(.table-wrap,.table-responsive,.ds-wa-table-wrap) :where(table){min-width:640px}
:where(body.ds13 .ds-main) :where(td.ds-wa-actions,td.e5-row-action,.row-actions){display:table-cell;white-space:nowrap}
:where(body.ds13 .ds-main) :where(td.ds-wa-actions) form{display:inline-block;margin:2px}
/* forms */
:where(body.ds13 .ds-main) :where(.form-grid,.ds4c-form-grid,.ds4c-analytics-grid){display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px 16px;align-items:start}
:where(body.ds13 .ds-main) :where(.ds4c-form-grid-3){grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
:where(body.ds13 .ds-main) :where(.form-field,.ds-wa-field,.g4f-field,.pw6-field,.ma1-field,.mb-3,.form-group){display:flex;flex-direction:column;gap:5px;min-width:0}
:where(body.ds13 .ds-main) :where(.form-field,.ds-wa-field) > label,:where(body.ds13 .ds-main) :where(.modern-form,.structured-form,.stack-form,.form-page form,.ds-auth__card form) label:not(.checkbox-label):not(.ds-check):not(.guard-confirm){font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-ink);display:flex;flex-direction:column;gap:5px}
:where(body.ds13 .ds-main) :where(.checkbox-field,.ds-wa-field.checkbox,.switch-row){flex-direction:row;align-items:flex-start;gap:9px;padding:10px 12px;border:1px solid var(--ds-line);border-radius:12px;background:#fff}
:where(body.ds13 .ds-main) :where(.checkbox-label){display:inline-flex;align-items:center;gap:9px;font-size:var(--ds-t-md);font-weight:700;cursor:pointer}
:where(body.ds13 .ds-main) :where(.ds-wa-field.checkbox) label{order:2;flex-direction:row;font-weight:700}
:where(body.ds13 .ds-main) :where(.field-error,.g4f-error,.errorlist){color:var(--ds-red);font-size:var(--ds-t-xs);font-weight:700;margin:0;padding:0;list-style:none}
:where(body.ds13 .ds-main) :where(.ds-wa-field) em{color:var(--ds-red);font-size:var(--ds-t-xs);font-weight:700;font-style:var(--ds-italic)}
:where(body.ds13 .ds-main) :where(.ds-wa-field) small{font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(.form-actions,.ds-wa-form-actions,.ds4c-sticky-actions,.step-nav){display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center;padding-top:6px}
:where(body.ds13 .ds-main) :where(.ds-wa-form-actions) span{margin-right:auto;font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(.modern-form,.structured-form,.ds4c-premium-form,.ds4c-provider-form,.automation-form,.ds-wa-meta-form){display:flex;flex-direction:column;gap:14px}
:where(body.ds13 .ds-main) :where(.ds-wa-meta-form){display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px 16px}
:where(body.ds13 .ds-main) :where(.ds-wa-meta-form>.ds-wa-form-actions){grid-column:1/-1}
:where(body.ds13 .ds-main) :where(.form-page,.wide-form-page,.narrow-page){display:flex;flex-direction:column;gap:var(--ds-gap-lg);max-width:980px;width:100%}
:where(body.ds13 .ds-main) :where(.narrow-page){max-width:640px}
:where(body.ds13 .ds-main) :where(.password-control){display:flex;gap:8px}
:where(body.ds13 .ds-main) :where(.password-control) input{flex:1}
:where(body.ds13 .ds-main) :where(fieldset){border:1px solid var(--ds-line-2);border-radius:12px;padding:10px 14px 12px;margin:0;min-width:0}
:where(body.ds13 .ds-main) :where(legend){font-size:var(--ds-t-sm);font-weight:700;padding:0 4px}
:where(body.ds13 .ds-main) :where(.span-2){grid-column:span 2}
/* Django 5 default field groups ({{ field.as_field_group }}) */
:where(body.ds13 .ds-main) :where(.ds4c-analytics-grid>div){display:flex;flex-direction:column;gap:5px;min-width:0}
:where(body.ds13 .ds-main) :where(.ds4c-analytics-grid>div) label{font-size:var(--ds-t-sm);font-weight:700}
/* status language */
:where(body.ds13 .ds-main) :where(.badge,.status-pill,.template-category-badge,.mcc-pill,.g4f-mode-pill,.filter-chip,.g4f-state,.ac5-state){display:inline-flex;align-items:center;gap:5px;font-size:var(--ds-t-xs);font-weight:700;border-radius:var(--ds-r-pill);padding:2px 9px;white-space:nowrap;background:var(--ds-grey-soft);color:var(--ds-grey-ink);border:0}
:where(body.ds13 .ds-main) :where(.badge,.status-pill).on,:where(body.ds13 .ds-main) :where(b.good,.good),:where(body.ds13 .ds-main) :where(.badge.success){background:var(--ds-green-soft);color:var(--ds-green)}
:where(body.ds13 .ds-main) :where(.badge,.status-pill).lock,:where(body.ds13 .ds-main) :where(.badge,.status-pill).warning,:where(body.ds13 .ds-main) :where(b.warn,.warn){background:var(--ds-amber-soft);color:var(--ds-amber)}
:where(body.ds13 .ds-main) :where(.badge,.status-pill).off{background:var(--ds-grey-soft);color:var(--ds-grey-ink)}
:where(body.ds13 .ds-main) :where(.badge.danger,.badge.error){background:var(--ds-red-soft);color:var(--ds-red)}
:where(body.ds13 .ds-main) :where(b.good,b.warn){display:inline-block;font-size:var(--ds-t-xs);padding:2px 9px;border-radius:var(--ds-r-pill)}
/* notices & empty */
:where(body.ds13 .ds-main) :where(.notice-box,.notice-inline,.notice,.alert,.ds-wa-callout,.guard-warning,.security-note,.blocker-row,.ok-row,.ds-settings-scope-note,.gov-sample-banner){display:block;padding:10px 14px;border-radius:12px;background:#fff;border:1px solid var(--ds-line);font-size:var(--ds-t-md);color:var(--ds-ink);line-height:1.45}
:where(body.ds13 .ds-main) :where(.notice-box.warning,.notice-inline.warning,.alert-warning,.guard-warning,.blocker-row,.gov-sample-banner){background:#FFFAF0;border-color:rgba(126,78,0,.22)}
:where(body.ds13 .ds-main) :where(.ok-row,.notice-box.success,.alert-success){background:#F4FBF7;border-color:rgba(23,107,67,.22)}
:where(body.ds13 .ds-main) :where(.ds-wa-callout){display:flex;flex-direction:column;gap:8px;align-items:flex-start}
:where(body.ds13 .ds-main) :where(.empty-state,.ds-wa-empty,.g4f-empty,.ac5-empty){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:18px 14px;border:1px dashed var(--ds-line-2);border-radius:12px;background:rgba(255,255,255,.65);color:var(--ds-muted);font-size:var(--ds-t-md)}
:where(body.ds13 .ds-main) :where(td) :where(.empty-state){border:0;background:none;padding:14px}
/* tabs */
:where(body.ds13 .ds-main) :where(.ds-workspace-tabs,.ds-wa-subnav,.ds-wa-tabs-final,.chat-status-tabs,.step-nav-tabs){display:flex;flex-wrap:wrap;gap:6px;background:none;border:0;padding:0;box-shadow:none}
:where(body.ds13 .ds-main) :where(.ds-workspace-tab,.ds-wa-subnav a,.chat-status-tab){display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 14px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);text-decoration:none;font-weight:700;font-size:var(--ds-t-sm);white-space:nowrap}
:where(body.ds13 .ds-main) :where(.ds-workspace-tab.active,.chat-status-tab.active,.ds-workspace-tab[aria-current="page"]){background:#fff;color:var(--ds-wine);border-color:rgba(88,25,52,.28);box-shadow:var(--ds-press)}
/* details / summary */
:where(body.ds13 .ds-main) :where(details.settings-section,details.side-details,details.ds4c-advanced-panel,details.ds4c-collapsible-section,.side-action-group>details){padding:0;gap:0;overflow:hidden}
:where(body.ds13 .ds-main) :where(details.settings-section,details.side-details,details.ds4c-advanced-panel,details.ds4c-collapsible-section,.side-action-group>details)>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;cursor:pointer;font-weight:700}
:where(body.ds13 .ds-main) :where(details)>summary::-webkit-details-marker{display:none}
:where(body.ds13 .ds-main) :where(details.settings-section)>summary small{display:block;font-weight:400;font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(details.settings-section)>summary>span,:where(body.ds13 .ds-main) :where(details.side-details)>summary>span{color:var(--ds-faint);transition:transform .2s var(--ds-ease)}
:where(body.ds13 .ds-main) :where(details[open])>summary>span{transform:rotate(180deg)}
:where(body.ds13 .ds-main) :where(.settings-section-body,.side-body){padding:4px 16px 16px;display:flex;flex-direction:column;gap:12px}
:where(body.ds13 .ds-main) :where(.side-action-group){display:flex;flex-direction:column;gap:8px}
:where(body.ds13 .ds-main) :where(.side-action-group>details){border:1px solid var(--ds-line);border-radius:12px;background:#fff}
:where(body.ds13 .ds-main) :where(.side-action-group>details)>form,:where(body.ds13 .ds-main) :where(.side-action-group>details)>div,:where(body.ds13 .ds-main) :where(.side-action-group>details)>span{margin:0 12px 12px}
:where(body.ds13 .ds-main) :where(.side-action-group>details)>form{display:flex;flex-direction:column;gap:8px}
:where(body.ds13 .ds-main) :where(.side-action-group>details)>summary{padding:10px 12px;font-size:var(--ds-t-sm)}
/* definition lists */
:where(body.ds13 .ds-main) :where(.detail-list,.account-v2-list,.as6-review-list){display:grid;grid-template-columns:minmax(96px,40%) 1fr;gap:6px 12px;margin:0;font-size:var(--ds-t-md)}
:where(body.ds13 .ds-main) :where(.detail-list,.account-v2-list) dt{color:var(--ds-faint);font-weight:700;font-size:var(--ds-t-sm)}
:where(body.ds13 .ds-main) :where(.detail-list,.account-v2-list) dd{margin:0;min-width:0;overflow-wrap:anywhere}
/* bars from older analytics */
:where(body.ds13 .ds-main) :where(.analytics-bars){display:flex;flex-direction:column;gap:8px}
:where(body.ds13 .ds-main) :where(.analytics-bar-row){display:flex;flex-direction:column;gap:4px}
:where(body.ds13 .ds-main) :where(.analytics-bar-row)>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:var(--ds-t-sm)}
:where(body.ds13 .ds-main) :where(.bar-track){height:8px;border-radius:var(--ds-r-pill);background:var(--ds-surface-3);overflow:hidden}
:where(body.ds13 .ds-main) :where(.bar-track) i{display:block;height:100%;background:var(--ds-blue);border-radius:var(--ds-r-pill);transform-origin:left;animation:ds-grow-x .7s var(--ds-ease) both}
:where(body.ds13 .ds-main) :where(.analytics-chart-shell) canvas{width:100%;height:auto;background:#fff;border-radius:12px;border:1px solid var(--ds-line)}
/* misc legacy helpers */
:where(body.ds13 .ds-main) :where(.flash-stack){display:flex;flex-direction:column;gap:8px}
:where(body.ds13 .ds-main) :where(.flash){padding:10px 14px;border-radius:12px;background:#fff;border:1px solid var(--ds-line)}
:where(body.ds13 .ds-main) :where(.flash.success){background:#F4FBF7;color:var(--ds-green)}
:where(body.ds13 .ds-main) :where(.flash.warning){background:#FFFAF0;color:var(--ds-amber)}
:where(body.ds13 .ds-main) :where(.flash.error){background:#FFF7F6;color:var(--ds-red)}
:where(body.ds13 .ds-main) :where(.ref-internal-page,.e5-page,.gov-ux-page,.g4f-analytics-page,.account-v2-page,.g5a-page,.ds-wa-page,.settings-page,.ds4c-organization-center,.rw1-settings,.g4b-settings-page){display:flex;flex-direction:column;gap:var(--ds-gap-lg);min-width:0}
:where(body.ds13 .ds-main) :where(.e5-search){display:flex;flex-direction:column;gap:5px;font-size:var(--ds-t-sm);font-weight:700;max-width:420px}
:where(body.ds13 .ds-main) :where(.section-toolbar,.filter-bar,.table-toolbar){display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
:where(body.ds13 .ds-main) :where(.ds-wa-flow,.flow-steps){display:flex;flex-wrap:wrap;gap:6px}
:where(body.ds13 .ds-main) :where(.ds-wa-flow) span{display:inline-flex;align-items:center;gap:7px;padding:5px 12px 5px 6px;border-radius:var(--ds-r-pill);background:#fff;border:1px solid var(--ds-line);font-size:var(--ds-t-sm);font-weight:700;color:var(--ds-muted)}
:where(body.ds13 .ds-main) :where(.ds-wa-flow) b{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--ds-surface-2);font-size:11px;font-style:normal}
:where(body.ds13 .ds-main) :where(.ds-wa-flow) .done{color:var(--ds-green)}
:where(body.ds13 .ds-main) :where(.ds-wa-flow) .done b{background:var(--ds-green-soft);color:var(--ds-green)}
:where(body.ds13 .ds-main) :where(.ds-wa-readiness,.g4f-guide-steps){margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:var(--ds-t-md)}
:where(body.ds13 .ds-main) :where(.g4f-guide-steps){padding:0}
:where(body.ds13 .ds-main) :where(.g4f-guide-steps)>div{display:flex;gap:10px;align-items:flex-start}
:where(body.ds13 .ds-main) :where(.g4f-guide-steps) b{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--ds-blue-soft);color:var(--ds-blue-ink);font-size:12px;flex:none}
:where(body.ds13 .ds-main) :where(.g4f-guide-steps) span{display:flex;flex-direction:column}
:where(body.ds13 .ds-main) :where(.g4f-guide-steps) small{color:var(--ds-faint);font-size:var(--ds-t-xs)}
:where(body.ds13 .ds-main) :where(.ds-v4b-page-marker){display:none}
/* Bootstrap-style utility classes used by a few templates */
:where(body.ds13 .ds-main) :where(.container-fluid,.container){width:100%;padding:0;margin:0}
:where(body.ds13 .ds-main) :where(.d-flex){display:flex} :where(body.ds13 .ds-main) :where(.justify-content-between){justify-content:space-between} :where(body.ds13 .ds-main) :where(.align-items-start){align-items:flex-start} :where(body.ds13 .ds-main) :where(.align-items-center){align-items:center}
:where(body.ds13 .ds-main) :where(.gap-2){gap:8px} :where(body.ds13 .ds-main) :where(.gap-3){gap:12px} :where(body.ds13 .ds-main) :where(.flex-wrap){flex-wrap:wrap}
:where(body.ds13 .ds-main) :where(.mb-0){margin-bottom:0} :where(body.ds13 .ds-main) :where(.mb-3){margin-bottom:12px} :where(body.ds13 .ds-main) :where(.mb-4){margin-bottom:16px} :where(body.ds13 .ds-main) :where(.mt-3){margin-top:12px}
:where(body.ds13 .ds-main) :where(.h5){font-size:var(--ds-t-lg);font-weight:700}
:where(body.ds13 .ds-main) :where(.text-end){text-align:right}
:where(body.ds13 .ds-main) :where(.row){display:flex;flex-wrap:wrap;gap:var(--ds-gap)} :where(body.ds13 .ds-main) :where(.row)>:where([class*="col"]){flex:1 1 260px;min-width:0}
/* Support-session "view as" banner */
.g5a-view-banner{background:var(--ds-amber-soft);color:var(--ds-amber);border-bottom:1px solid rgba(126,78,0,.2);font-size:var(--ds-t-sm)}
.g5a-view-banner>div{max-width:calc(var(--ds-max) + 2 * var(--ds-gutter));margin:0 auto;padding:6px var(--ds-gutter);display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center}
.g5a-view-banner form{max-width:calc(var(--ds-max) + 2 * var(--ds-gutter));margin:0 auto;padding:0 var(--ds-gutter) 6px}
.g5a-view-banner button{min-height:30px;padding:0 12px;border-radius:9px;border:1px solid rgba(126,78,0,.3);background:#fff;color:var(--ds-amber);font-weight:700;cursor:pointer}

/* 16 ─ Responsive */
@media (max-width:1180px){
  .ds-chat{grid-template-columns:minmax(220px,260px) minmax(0,1fr);height:auto}
  .ds-chat__col--ctx{grid-column:1/-1}
  .ds-chat__col--list,.ds-chat__col--conv{height:clamp(540px,calc(100vh - 230px),820px)}
}
@media (max-width:1100px){
  .ds13-nav{position:absolute;top:100%;left:0;right:0;flex-direction:column;align-items:stretch;gap:2px;background:#fff;border-bottom:1px solid var(--ds-line);box-shadow:var(--ds-pop);padding:10px var(--ds-gutter) 14px;display:none;max-height:calc(100vh - var(--ds-header));overflow-y:auto}
  .ds13-header.is-nav-open .ds13-nav{display:flex}
  .ds13-nav__link,.ds13-nav summary{min-height:42px;border-radius:10px;justify-content:space-between}
  .ds13-nav .ds13-menu{position:static;box-shadow:none;border:0;padding:0 0 4px 10px;min-width:0;max-width:none}
  .ds13-menu-toggle{display:inline-flex}
  .ds-split,:where(body.ds13 .ds-main) :where(.g4f-analysis-grid,.automation-layout){grid-template-columns:minmax(0,1fr)}
  .ds-wa-meta-grid{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:860px){
  :root{--ds-t-h1:24px;--ds-t-num:26px}
  .ds-chat{grid-template-columns:minmax(0,1fr)}
  .ds-chat__col--list,.ds-chat__col--conv{height:auto;max-height:none}
  .ds-chat[data-has-selection="1"] .ds-chat__col--list{display:none}
  .ds-chat[data-has-selection="1"] .ds-chat-back{display:inline-flex}
  .ds-chat__col--conv .ds-messages{max-height:62vh;min-height:280px}
  .ds-auth{grid-template-columns:1fr}
  .ds-auth__story{display:none}
  .ds-form-grid,.ds-form-grid--3{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
  :root{--ds-header:58px}
  .ds13-brand strong{display:none}
  .ds13-tools{gap:6px}
  .ds13-runtime__label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .ds-user-guide-launcher-label,.ds-search-label,.ds13-account-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .ds-main{padding-top:16px;gap:16px}
  .ds-card{padding:14px}
  .ds-grid--kpi,:where(body.ds13 .ds-main) :where(.metric-strip,.ds4c-kpi-grid,.settings-metrics,.g4f-kpi-grid,.dl-summary-grid){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .ds-kpi{padding:12px}
  .ds-cols{gap:6px}
  .ds-bar{grid-template-columns:minmax(80px,1fr) minmax(70px,1.3fr) 36px}
  .ds-msg{max-width:88%}
  .ds-dl,:where(body.ds13 .ds-main) :where(.detail-list,.account-v2-list){grid-template-columns:minmax(0,1fr)}
  .ds-dl dt,:where(body.ds13 .ds-main) :where(.detail-list,.account-v2-list) dt{margin-top:4px}
  :where(body.ds13 .ds-main) :where(.span-2){grid-column:auto}
  .ds13-call>summary .global-call-dock-title small,.ds13-call>summary .global-call-dock-state{display:none}
  .ds13-call>summary{padding:6px}
  .ds-composer__send{flex:1 1 100%}
  .ds-table--cards{min-width:0}
  .ds-table--cards thead{display:none}
  .ds-table--cards tr{display:block;border-bottom:1px solid var(--ds-line);padding:6px 0}
  .ds-table--cards tbody tr:last-child{border-bottom:0}
  .ds-table--cards td{display:flex;justify-content:space-between;gap:12px;border:0;padding:5px 12px;text-align:right}
  .ds-table--cards td::before{content:attr(data-label);font-weight:700;color:var(--ds-faint);font-size:var(--ds-t-xs);text-align:left}
  .ds-table--cards td:first-child{display:block;text-align:left}
  .ds-table--cards td:first-child::before{content:none}
}

/* 17 ─ Motion: one gentle entrance, no layout movement */
@keyframes ds-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes ds-grow-x{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes ds-grow-y{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes ds-shimmer{to{transform:translateX(100%)}}
@keyframes ds-pop{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
@keyframes ds-slide-in{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
.ds-in{animation:ds-rise .45s var(--ds-ease) both;animation-delay:var(--ds-delay,0ms)}
.ds-reveal>*{animation:ds-rise .45s var(--ds-ease) both}
.ds-reveal>*:nth-child(2){animation-delay:.04s}.ds-reveal>*:nth-child(3){animation-delay:.08s}.ds-reveal>*:nth-child(4){animation-delay:.12s}.ds-reveal>*:nth-child(5){animation-delay:.16s}.ds-reveal>*:nth-child(n+6){animation-delay:.2s}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  a.ds-card:hover,a.ds-kpi:hover,.ds-tile:hover{transform:none}
}
@media print{
  .ds13-header,.ds13-call,.ds-subnav,.ds-user-guide-drawer,.ds-search-backdrop{display:none!important}
  body.ds13{background:#fff}
  .ds-card,.ds-kpi,.ds-tile{box-shadow:none;break-inside:avoid}
}

/* password show/hide (added by dhimson-v13.js) */
.ds-pw{position:relative;display:block}
.ds-pw>input{padding-right:64px!important;width:100%}
.ds-pw__btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);min-height:28px;padding:0 10px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);color:var(--ds-ink);font:inherit;font-size:var(--ds-t-xs);font-weight:700;cursor:pointer}
.ds-pw__btn:hover{color:var(--ds-blue-ink)}
.ds-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* header service switches (super admin only) */
.ds13-runtime{position:relative}
.ds13-runtime>summary{list-style:none}
.ds13-runtime>summary::-webkit-details-marker{display:none}
.ds13-runtime__dot{width:9px;height:9px;border-radius:50%;background:var(--ds-surface-3);border:1px solid rgba(30,36,48,.18)}
.ds13-runtime:has([data-runtime-control="whatsapp"] [data-state="ON"]) .ds13-runtime__dot[data-for="whatsapp"],
.ds13-runtime:has([data-runtime-control="ai_reply"] [data-state="ON"]) .ds13-runtime__dot[data-for="ai_reply"]{background:var(--ds-green-dot);border-color:transparent}
.ds13-runtime:has([data-runtime-control="whatsapp"] [data-state="ERROR"]) .ds13-runtime__dot[data-for="whatsapp"],
.ds13-runtime:has([data-runtime-control="ai_reply"] [data-state="ERROR"]) .ds13-runtime__dot[data-for="ai_reply"]{background:var(--ds-red)}
.ds13-runtime__menu{min-width:280px;gap:6px;padding:8px}
.ds13-runtime__menu .ds-wa-runtime-controls{flex-direction:column;align-items:stretch}
.ds13-runtime__menu .ds-runtime-toggle{width:100%;flex-direction:row;align-items:center;justify-content:space-between;padding:6px 6px 6px 12px}
.ds13-runtime__menu .dl-runtime-feedback{font-size:var(--ds-t-xs);color:var(--ds-muted);padding:2px 4px;min-height:0}
.ds13-runtime__menu .dl-runtime-feedback:empty{display:none}
/* header fit: compact tool buttons below 1600px (labels stay readable to screen readers and search) */
.ds13-header .ds13-nav__link,.ds13-header .ds13-nav summary{color:var(--ds-ink)}
.ds13-header .ds13-nav__link[aria-current="page"],.ds13-header .ds13-nav details.is-current>summary{color:var(--ds-wine)}
@media (max-width:1599px){
  .ds13-tools .ds-user-guide-launcher-label,.ds13-tools .ds-search-label,.ds13-runtime__label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .ds13-tools .ds-user-guide-launcher,.ds13-tools .ds-global-search-trigger{padding:0;width:36px;justify-content:center}
}
/* compact call dock: icon only unless something needs attention */
.ds13-call>summary{padding:6px;gap:8px}
.ds13-call>summary .global-call-dock-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.ds13-call>summary .global-call-dock-state{display:none}
.ds13-call:is([data-call-state="queue-waiting"],[data-call-state="internal-active"],[data-call-state="transfer-pending"])>summary .global-call-dock-state{display:inline-block;background:var(--ds-amber-soft);color:var(--ds-amber)}
.ds13-call[open]>summary .global-call-dock-title{position:static;width:auto;height:auto;clip-path:none}
.ds13-call:is([data-call-state="queue-waiting"],[data-call-state="internal-active"],[data-call-state="transfer-pending"])>summary{padding-right:12px}
.ds-progress__text .ds-card__link{white-space:normal}
.ds-card__link{max-width:100%}
@media (max-width:640px){.ds-card.ds-card--flush{padding:0}}
.ds-chat-back{font-weight:700;text-decoration:none;font-size:var(--ds-t-sm);color:var(--ds-blue-ink);margin-bottom:2px}
.ds-steps.ds-wa-readiness{display:flex;flex-direction:row;flex-wrap:wrap}
@media (max-width:860px){.ds-hide-sm{display:none}}
.ds-avatar-lg{width:56px;height:56px;border-radius:16px;background:var(--ds-blue);color:#fff;display:grid;place-items:center;font-weight:700;font-size:20px;font-style:normal;flex:none;box-shadow:0 6px 16px rgba(49,95,205,.25)}
/* analytics filter (collapsible) */
.ds-filter>summary{list-style:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;cursor:pointer}
.ds-filter>summary::-webkit-details-marker{display:none}
.ds-filter[open]>summary{padding-bottom:6px;border-bottom:1px solid var(--ds-line)}
.ds-form-grid--filters{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.ds-field>label{font-size:var(--ds-t-sm);font-weight:700}
.ds-field .helptext{font-size:var(--ds-t-xs);color:var(--ds-faint)}
.ds-field .errorlist{list-style:none;margin:0;padding:0;color:var(--ds-red);font-size:var(--ds-t-xs);font-weight:700}
.ds-kpi--mini{padding:10px 12px;box-shadow:var(--ds-raise-sm)}
.ds-kpi--mini .ds-kpi__value{font-size:22px}
.ds-chart-shell canvas{width:100%;height:auto;max-height:360px;display:block}
.ds-guide-start-list li>div{flex:1;min-width:0}

/* 15b ─ Legacy form layouts → compact two-column grids (zero specificity) */
:where(body.ds13 .ds-main) :where(.gov-form-fields){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-items:start}
:where(body.ds13 .ds-main) :where(.gov-form-field){display:flex;flex-direction:column;gap:5px;min-width:0}
:where(body.ds13 .ds-main) :where(.gov-form-field:has(textarea)){grid-column:1/-1}
:where(body.ds13 .ds-main) :where(.gov-form-field:has(>input[type="checkbox"])){flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:9px}
:where(body.ds13 .ds-main) :where(.gov-form-field,.gov-form-section) label{font-size:var(--ds-t-sm);font-weight:700}
:where(body.ds13 .ds-main) :where(.gov-form-sections){display:flex;flex-direction:column;gap:var(--ds-gap)}
:where(body.ds13 .ds-main) :where(.gov-form-actions){display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
/* {{ form.as_p }} forms */
:where(body.ds13 .ds-main) :where(form:has(>p>label)){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;align-items:start}
:where(body.ds13 .ds-main) :where(form:has(>p>label))>:where(:not(p)){grid-column:1/-1}
:where(body.ds13 .ds-main) :where(form)>:where(p:has(>label)){display:flex;flex-direction:column;gap:5px;margin:0;min-width:0}
:where(body.ds13 .ds-main) :where(form)>:where(p:has(>label)) label{font-size:var(--ds-t-sm);font-weight:700}
:where(body.ds13 .ds-main) :where(form)>:where(p:has(textarea),p:has(select[multiple])){grid-column:1/-1}
:where(body.ds13 .ds-main) :where(form)>:where(p:has(>input[type="checkbox"])){flex-direction:row;align-items:center;gap:9px;flex-wrap:wrap}
:where(body.ds13 .ds-main) :where(form)>:where(p:has(>input[type="checkbox"])) .helptext{flex-basis:100%}
:where(body.ds13 .ds-main) :where(.helptext){font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(.errorlist){list-style:none;margin:0;padding:0;color:var(--ds-red);font-size:var(--ds-t-xs);font-weight:700}
/* People Center */
:where(body.ds13 .ds-main) :where(.p5-page){display:flex;flex-direction:column;gap:var(--ds-gap-lg)}
:where(body.ds13 .ds-main) :where(.p5-command){display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px 20px}
:where(body.ds13 .ds-main) :where(.p5-command)>div:first-child{flex:1 1 380px;display:flex;flex-direction:column;gap:4px}
:where(body.ds13 .ds-main) :where(.p5-command) h1{font-size:var(--ds-t-h1)}
:where(body.ds13 .ds-main) :where(.p5-command) p{color:var(--ds-muted)}
:where(body.ds13 .ds-main) :where(.p5-actions){display:flex;gap:8px;flex-wrap:wrap}
:where(body.ds13 .ds-main) :where(.p5-metrics){display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:var(--ds-gap)}
:where(body.ds13 .ds-main) :where(.p5-metrics)>div{display:flex;flex-direction:column-reverse;gap:4px;padding:14px 16px;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise)}
:where(body.ds13 .ds-main) :where(.p5-metrics) strong{font-size:22px}
:where(body.ds13 .ds-main) :where(.p5-metrics) span{font-size:var(--ds-t-sm);color:var(--ds-muted);font-weight:700}
:where(body.ds13 .ds-main) :where(.p5-directory){background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:var(--ds-r-card);box-shadow:var(--ds-raise);padding:18px 20px;display:flex;flex-direction:column;gap:12px}
:where(body.ds13 .ds-main) :where(.p5-directory-head) p{color:var(--ds-muted);font-size:var(--ds-t-sm)}
:where(body.ds13 .ds-main) :where(.p5-life){display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center}
:where(body.ds13 .ds-main) :where(.p5-life-label){font-size:var(--ds-t-xs);color:var(--ds-faint)}
:where(body.ds13 .ds-main) :where(.p5-row-actions){white-space:nowrap}
/* GET filter bars: label>span+control in a row */
:where(body.ds13 .ds-main) :where(form[method="get"]:has(>label>span)){display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end;background:var(--ds-surface);border:1px solid var(--ds-line);border-radius:14px;padding:12px 14px}
:where(body.ds13 .ds-main) :where(form[method="get"])>:where(label:has(>span)){display:flex;flex-direction:column;gap:4px;flex:1 1 180px;min-width:0;font-size:var(--ds-t-sm);font-weight:700}
:where(body.ds13 .ds-main) :where(form[method="get"])>:where(div:last-child){display:flex;gap:8px}
@media (max-width:860px){
  :where(body.ds13 .ds-main) :where(.gov-form-fields,form:has(>p>label)){grid-template-columns:minmax(0,1fr)}
}
/* app.js injected helpers (existing behaviour, restyled) */
.ui-w3-quick-nav{display:flex;justify-content:flex-end;gap:6px}
.ui-w3-quick-nav>a,.ui-w3-quick-label{display:none}
.ui-w3-quick-actions{display:flex;gap:6px}
.ui-w3-quick-actions button,.ui-w3-availability-nav a{min-height:30px;padding:0 12px;border-radius:var(--ds-r-pill);background:var(--ds-surface);border:1px solid var(--ds-line);box-shadow:var(--ds-raise-sm);color:var(--ds-ink);font:inherit;font-size:var(--ds-t-sm);font-weight:700;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center}
.ui-w3-quick-actions button:hover,.ui-w3-availability-nav a:hover{color:var(--ds-blue-ink)}
.ui-w3-availability-nav{display:flex;flex-wrap:wrap;gap:6px}
:where(body.ds13 .ds-main) :where(.branding-preview) img{max-width:140px;max-height:140px;width:auto;height:auto;display:block}
:where(body.ds13 .ds-main) :where(.branding-preview){display:grid;place-items:center;padding:18px;background:#fff;border:1px solid var(--ds-line);border-radius:14px}
:where(body.ds13 .ds-main) :where(.branding-settings-grid){display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,300px);gap:var(--ds-gap-lg);align-items:start}
@media (max-width:860px){:where(body.ds13 .ds-main) :where(.branding-settings-grid){grid-template-columns:minmax(0,1fr)}}

/* V13 Fix1: recording-specific presentation fixes; no workflow changes. */
body.ds13 .ds13-runtime__label{position:static;width:auto;height:auto;overflow:visible;clip:auto;clip-path:none;white-space:nowrap;font-size:12px;color:var(--ds-ink)}
body.ds13 .ds13-runtime__dot{background:#64748b;border-color:#64748b}
body.ds13 .g4b-reports-page .g4b-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
body.ds13 .g4b-reports-page .g4b-metric{display:flex;flex-direction:column;gap:4px;padding:14px;border-radius:14px;background:var(--ds-surface);box-shadow:var(--ds-raise-sm)}
body.ds13 .g4b-reports-page .g4b-metric strong{font-size:24px}
body.ds13 .g4b-reports-page .g4b-report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}
body.ds13 .g4b-reports-page .g4b-report-card{display:flex;flex-direction:column;gap:8px;margin:0;padding:16px;color:var(--ds-ink);text-decoration:none;min-width:0}
body.ds13 .g4b-reports-page .g4b-report-card small{color:var(--ds-muted);line-height:1.45}
body.ds13 .g4b-reports-page .g4b-report-card em{color:var(--ds-blue);font-weight:700;margin-top:auto}
body.ds13 .g4b-reports-page .g4b-report-icon{align-self:flex-start;padding:7px;border-radius:9px;color:var(--ds-blue);background:#fff}
body.ds13 .analytics-filter .ds-form-grid--filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0}
body.ds13 .ds13-readiness-details{margin-top:5px;font-size:13px}
body.ds13 .ds13-readiness-details summary{cursor:pointer;color:var(--ds-blue);font-weight:700}
body.ds13 .ds13-readiness-details[open]{max-height:180px;overflow:auto;padding-right:4px}
body.ds13 .ds13-readiness-details small{display:block;margin-top:8px}
body.ds13 .ds-wa-status-grid{align-items:start}
body.ds13 .ds-wa-status-grid>.ds-kpi{min-height:126px}
body.ds13 .ds-chat[data-has-selection="0"]{height:420px;min-height:0}
body.ds13 .ds-chat[data-has-selection="0"] .ds-empty{padding:18px;gap:8px}
@media(max-width:1100px){body.ds13 .g4b-reports-page .g4b-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body.ds13 .analytics-filter .ds-form-grid--filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){body.ds13 .g4b-reports-page .g4b-metrics,body.ds13 .analytics-filter .ds-form-grid--filters{grid-template-columns:repeat(2,minmax(0,1fr))}body.ds13 .ds-chat[data-has-selection="0"]{height:auto}body.ds13 .ds-chat[data-has-selection="0"] .ds-chat__col--conv{min-height:320px}}
@media(max-width:480px){body.ds13 .g4b-reports-page .g4b-report-grid,body.ds13 .analytics-filter .ds-form-grid--filters{grid-template-columns:minmax(0,1fr)}}
