/* ---- Halofy design tokens (honoring NEW Halofy Design System/tokens) ---- */
  /* docs/design/console-design-language.md and /console/design-language are supplemental
     implementation references. NEW Halofy Design System remains the canonical
     source for mineral surfaces, evergreen ink, typography and brand assets. */

  @font-face{
    font-family:"Inter";
    src:url("assets/fonts/InterVariable.woff2") format("woff2");
    font-weight:100 900;
    font-style:normal;
    font-display:swap;
  }
  :root{
    --evergreen:#123a2e; --evergreen-hover:#0e2f25; --olive:#7f9366;
    --sage:#c7d7b2; --neutral-soft:#eef0f2; --sage-soft:var(--neutral-soft); --rust:#e83c00; --gold:#f4d35e;
    --slate:#5b6b82; --ink:#0b0d0b; --canvas:#fff; --panel:#fff; --surface-soft:#fff; --mineral:#f3f6ee;
    --muted:#596455; --muted-2:#53604f; --line:#d9dfcf; --stone:#e6e6e1;
    --evergreen-rgb:18 58 46;
    --metal:radial-gradient(circle at 18% 12%,rgb(243 246 238/22%),transparent 22%),
            radial-gradient(circle at 82% 88%,rgb(199 215 178/18%),transparent 30%),
            linear-gradient(150deg,#0b0d0b 0%,#0e2f25 34%,#123a2e 56%,#1d4f3f 78%,#0e2f25 100%);
    --font-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    --font-display:var(--font-sans); --font-body:var(--font-sans);
    --font-cta:var(--font-sans);
    --font-mono:var(--font-sans);
    --font-brand:var(--font-sans);
    --text-h1:34px; --text-h2:24px; --text-body-size:16px; --text-small:13px; --text-label:12px;
    --r-xs:6px; --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:20px; --r-pill:999px;
    --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px;
    --s8:64px; --s9:96px;
    --space-text:var(--s2); --space-group:var(--s4); --space-section:var(--s5);
    --panel-padding:var(--s5); --panel-radius:var(--r-lg);
    --subpanel-padding:var(--s4); --subpanel-radius:var(--r-md);
    --section-title-size:16px; --section-subtitle-size:13px;
    --sh-1:0 1px 0 rgba(15,24,16,.04);
    --sh-2:0 8px 22px -16px rgba(15,24,16,.18);
    --sh-3:0 18px 48px -24px rgba(15,24,16,.16);
    --sh-4:0 30px 70px -36px rgba(15,24,16,.22);
    --metal-shadow:0 18px 44px rgb(var(--evergreen-rgb)/24%),
      inset 0 1px 0 rgb(243 246 238/24%);
    --focus:0 0 0 3px rgb(var(--evergreen-rgb)/16%);
    --ease:cubic-bezier(.2,.7,.2,1); --ease-enter:cubic-bezier(.16,1,.3,1);
    /* One chevron for every dropdown on the platform. Dark surfaces swap the
       light variant onto --select-chevron instead of redefining the geometry. */
    --chevron-ink:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23123a2e' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.6 4.6 3.4 3.4 3.4-3.4'/%3E%3C/svg%3E");
    --chevron-light:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23f3f6ee' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.6 4.6 3.4 3.4 3.4-3.4'/%3E%3C/svg%3E");
    --select-chevron:var(--chevron-ink);
  }

  /* ---- Halofy Design Language (docs/design/console-design-language.md) -----
     The canonical palette, elevation and type scale for every NEW or
     REFACTORED surface. Deliberately a SEPARATE block from the legacy tokens
     above and deliberately ADDITIVE: nothing here overrides an existing token,
     so no shipped screen re-renders because this block exists. Where a legacy
     token already carries the right value the alias points straight at it.

     The rail nav is frozen, and S3 Scoped memory / S4 Policies / S5 Memory are
     already built to this language — do not restyle them. See the
     "Do not disturb" section of docs/design/console-design-language.md.

     Known divergences the legacy tokens have NOT been migrated to (changing
     them would repaint every screen and breaks console-design-system.test.ts —
     do not "fix" them casually): --ink #0b0d0b vs --dl-text #111827,
     --canvas #fff vs --dl-page #fafafa, --muted #596455 vs --dl-ink-2 #6b7280. */
  :root{
    /* Evergreen ramp — the only hue family. One family per chart, never a
       rainbow palette. The shell uses a neutral metallic black; evergreen
       remains the in-page action colour. */
    --dl-rail:#050607;                    /* solid fallback + dark edge      */
    --dl-rail-metal:
      radial-gradient(circle,rgb(255 255 255/9%) 0 .65px,transparent .85px) 0 0/8px 8px,
      radial-gradient(circle at 18% -20%,rgb(255 255 255/13%),transparent 32%),
      linear-gradient(118deg,#030405 0%,#15181b 28%,#070809 52%,#1b1e21 74%,#050607 100%);
    --dl-primary:#0f3d2e;                  /* primary button, active ink      */
    --dl-primary-hover:#14503c;
    --dl-mid:#1a5a42;                      /* gradient partner for send FAB   */
    --dl-brand:#2e6b52;                    /* source chips, live dots, series */
    --dl-soft:#5d9b7c;
    --dl-pale:#a9c18c;
    --dl-wash:#eaf1ec;                     /* selected pill / user bubble bg  */
    --dl-wash-line:#d5e3da;
    --dl-wash-hover:#dfeae3;
    --dl-row-selected:#f7faf8;

    /* Neutrals — a single 8-step gray, top to bottom. */
    --dl-text:#111827;                     /* primary ink, tooltip/toast bg   */
    --dl-ink-1:#374151;                    /* secondary body, table cells     */
    --dl-ink-2:#6b7280;                    /* helper text, inactive tab       */
    --dl-ink-3:#9ca3af;                    /* meta, eyebrow, placeholder icon */
    --dl-disabled:#d1d5db;
    --dl-border:var(--line);               /* #d9dfcf — every card + control  */
    --dl-border-soft:#eef0f3;              /* tier-2 elevated card border     */
    --dl-hairline:var(--mineral);          /* #f3f6ee — row + section rules   */
    --dl-page:#fafafa;                     /* page bg, tier-3 inset fill      */

    /* Status — a fg/bg pair per state. Never a colored icon chip; icon chips
       stay neutral (--dl-hairline on --dl-ink-1). */
    --dl-ok-fg:#067647;      --dl-ok-bg:#ecfdf3;
    --dl-warn-fg:#b54708;    --dl-warn-bg:#fffaeb;  --dl-warn-line:#fedf89;
    --dl-bad-fg:#b42318;     --dl-bad-bg:#fef3f2;   --dl-bad-line:#fda29b;
    --dl-bad-hover-bg:#fee4e2; --dl-bad-solid-hover:#912018;
    --dl-neutral-fg:var(--dl-ink-1); --dl-neutral-bg:var(--dl-hairline);
    --dl-live:#12b76a;                     /* pulse dot only                  */
    --dl-alert-icon:#f97066;               /* error glyph ON the dark toast   */

    /* Radii — the geometry ladder. Controls 10, cards 14, modal 16,
       composer 18, everything round 999. */
    --dl-r-xs:5px; --dl-r-sm:7px; --dl-r-md:8px; --dl-r-lg:10px;
    --dl-r-xl:12px; --dl-r-card:14px; --dl-r-modal:16px; --dl-r-composer:18px;
    --dl-r-pill:999px;

    /* Elevation — five tiers, and they do not mix. A card is tier 1 unless it
       lifts on hover, in which case it is tier 2 for its whole life. */
    --dl-e1:0 1px 2px rgb(16 24 40/4%);
    --dl-e2:0 1px 2px rgb(16 24 40/5%),0 4px 12px rgb(16 24 40/5%);
    --dl-e2-hover:0 2px 4px rgb(16 24 40/6%),0 10px 24px rgb(16 24 40/10%);
    --dl-e-inset:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%);
    --dl-e-popover:0 8px 24px rgb(16 24 40/12%);
    --dl-e-tooltip:0 4px 12px rgb(16 24 40/20%);
    --dl-e-toast:0 8px 24px rgb(16 24 40/25%);
    --dl-e-modal:0 24px 64px rgb(16 24 40/20%);
    --dl-e-send:0 4px 12px rgb(15 61 46/35%);
    --dl-e-composer:0 2px 4px rgb(16 24 40/5%),0 14px 40px rgb(18 58 46/10%);
    --dl-focus:0 0 0 3px rgb(15 61 46/12%);
    --dl-focus-bad:0 0 0 3px rgb(180 35 24/8%);

    /* Supplemental component type scale. Production inherits --font-sans from
       the canonical Halofy token block above. */
    --dl-t-hero:26px; --dl-t-title:22px; --dl-t-card:15px; --dl-t-body:13px;
    --dl-t-control:12.5px; --dl-t-meta:11px; --dl-t-eyebrow:10px;
    --dl-w-display:650; --dl-w-strong:600; --dl-w-body:500;
    --dl-track-tight:-.02em;               /* 22px and up                     */
    --dl-track-snug:-.01em;                /* 15px card titles                */
    --dl-track-eyebrow:.16em;              /* mono eyebrow, uppercase         */

    /* Black shell palette: warm white primary ink, silver-muted secondary
       ink, and translucent white interaction states. */
    --dl-rail-ink:#f5f7f5;
    --dl-rail-ink-70:rgb(245 247 245/76%);
    --dl-rail-ink-55:rgb(245 247 245/62%);
    --dl-rail-ink-45:rgb(245 247 245/48%);
    --dl-rail-fill:rgb(255 255 255/4%);
    --dl-rail-fill-active:rgb(255 255 255/12%);
    --dl-rail-line:rgb(255 255 255/14%);
    --dl-rail-icon-active:#dce9d4;
    --dl-shell-control:#d4d7d8;
    --dl-shell-control-hover:#c8ccce;
    --dl-shell-control-line:#b9bec0;
  }
  *{box-sizing:border-box}
  html{scrollbar-gutter:stable}
  body{margin:0;background:var(--canvas);color:var(--ink);font-family:var(--font-body);
    font-size:var(--text-body-size);line-height:1.55;-webkit-font-smoothing:antialiased}
  a{color:inherit}
  h1,h2,h3,h4{margin:0;text-wrap:balance;letter-spacing:-.02em;font-weight:500}
  .eyebrow{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.16em;text-transform:uppercase;
    color:var(--muted-2);font-weight:500}
  .num{font-variant-numeric:tabular-nums}

  /* ---- app shell: metallic black chrome + light-neutral stage ---- */
  .app{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh}
  .mobile-topbar,.mobile-nav-backdrop,.mobile-nav-close.halo-icon-control{display:none}
  .rail{background:var(--dl-rail-metal);background-color:var(--dl-rail);color:var(--dl-rail-ink);display:flex;flex-direction:column;
    position:sticky;top:0;height:100vh;padding:var(--s3) 10px;gap:var(--s1);z-index:30;overflow:hidden;
    border-right:1px solid var(--dl-rail-line);
    box-shadow:8px 0 28px -24px rgb(0 0 0/58%)}
  .brand{display:flex;align-items:center;gap:10px;padding:0 var(--s2) var(--s2);border-bottom:1px solid var(--dl-rail-line);margin-bottom:var(--s1)}
  /* The orb is the complete brand mark in the navigation shell. */
  .brand .mark{width:24px;height:24px;flex:none;object-fit:contain}
  .brand b{font-family:var(--font-brand);font-weight:600;font-size:16px;line-height:16px;letter-spacing:-.01em}
  .brand small{display:block;font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.16em;
    text-transform:uppercase;color:var(--dl-rail-ink-55);opacity:.85;margin-top:1px}
  /* The mark and the wordmark are one target back to Home. Reset to the brand's
     own type, not a control's: it must stay visually identical to the static
     lockup it replaced. Disabled while Home is out of reach (setup gate). */
  .brand-home{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;
    cursor:pointer;border-radius:var(--r-sm);transition:opacity .12s}
  .brand-home:hover{opacity:.82}
  .brand-home:focus-visible{box-shadow:var(--focus)}
  .brand-home:disabled{cursor:default;opacity:1}
  #rail-nav{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding-right:2px;
    scrollbar-width:thin;scrollbar-color:var(--olive) transparent}
  .navsection{display:grid;gap:4px;margin:0 0 6px}
  .navgroup{all:unset;box-sizing:border-box;width:100%;min-height:34px;padding:7px 10px;
    display:flex;align-items:center;justify-content:space-between;gap:var(--s2);
    border:1px solid var(--dl-rail-line);border-radius:var(--r-sm);
    background:var(--dl-rail-fill);color:var(--dl-rail-ink-55);cursor:pointer;
    font:600 var(--text-label)/16px var(--font-mono);letter-spacing:.14em;text-transform:uppercase;
    box-shadow:inset 0 1px 0 rgb(255 255 255/8%),0 1px 2px rgb(0 0 0/26%);
    transition:background .12s,border-color .12s,color .12s,box-shadow .12s}
  .navgroup:hover{border-color:rgb(255 255 255/24%);background:rgb(255 255 255/8%);color:var(--dl-rail-ink)}
  .navgroup:focus-visible{outline:none;box-shadow:0 0 0 3px rgb(220 233 212/28%)}
  .navgroup[aria-expanded="true"]{border-color:var(--dl-shell-control-line);background:var(--dl-shell-control);color:var(--ink);
    box-shadow:0 2px 6px rgb(0 0 0/32%)}
  .navgroup-heading{display:flex;align-items:center;gap:7px;min-width:0}
  .navgroup-symbol{display:grid;place-items:center;flex:none;color:var(--dl-rail-icon-active)}
  .navgroup-symbol svg{width:14px;height:14px}
  .navgroup-icon{width:16px;height:16px;flex:none;color:var(--dl-rail-ink-55)}
  .navgroup[aria-expanded="true"] .navgroup-symbol{color:var(--evergreen)}
  .navgroup[aria-expanded="true"] .navgroup-icon{color:var(--muted)}
  .navgroup-icon__vertical{opacity:1;transform-origin:center;transition:opacity .12s ease,transform .12s ease}
  .navgroup[aria-expanded="true"] .navgroup-icon__vertical{opacity:0;transform:scaleY(.2)}
  .nav{display:flex;flex-direction:column;gap:1px;padding:2px 0}
  .nav[hidden]{display:none}
  .nav button{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:11px;padding:9px var(--s2);border-radius:var(--r-sm);
    cursor:pointer;color:var(--dl-rail-ink-70);font-size:14px;font-weight:500;line-height:20px;
    transition:background .12s,color .12s,box-shadow .12s}
  .nav button svg{width:17px;height:17px;flex:none;opacity:.85}
  .nav button:hover{background:rgb(255 255 255/8%);color:var(--dl-rail-ink)}
  .nav button[aria-busy="true"]{cursor:wait;opacity:.72}
  .nav button.on{background:var(--dl-shell-control);color:var(--ink);font-weight:500;
    box-shadow:0 2px 6px rgb(0 0 0/32%)}
  .nav button.on svg{opacity:1;color:var(--evergreen)}
  .nav button:focus-visible{box-shadow:var(--focus)}
  /* Setup status on the rail: match the adjacent nav label's type and
     line height instead of rendering a second, oversized pill in the row.
     The collapsed rail keeps its dedicated notification-dot treatment below. */
  #rail-nav .setup-badge{flex:none;min-width:0;max-width:48px;margin-left:auto;padding:0;gap:0;
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    color:var(--gold);border:0;background:transparent;
    font:inherit;letter-spacing:inherit;text-transform:none;line-height:inherit}
  #rail-nav .setup-badge .dot{display:none}
  .rail-help{position:relative;min-height:136px;padding:12px;overflow:hidden;flex:none;
    border:1px solid rgb(243 246 238/16%);border-radius:var(--r-md);color:var(--mineral);
    background:linear-gradient(180deg,rgb(5 11 10/8%) 0%,rgb(5 11 10/72%) 49%,rgb(5 11 10/96%) 100%),
      url("assets/footer-planet.webp") center 34%/cover no-repeat;
    box-shadow:inset 0 1px 0 rgb(243 246 238/10%),0 16px 30px -24px rgb(0 0 0/86%)}
  .rail-help__copy,.rail-help__links{position:relative;z-index:1}
  .rail-help__copy h2{font-family:var(--font-cta);font-size:14px;font-weight:600;line-height:18px;letter-spacing:-.01em}
  .rail-help__copy p{margin:1px 0 8px;color:rgb(243 246 238/72%);font-size:11px;line-height:16px}
  .rail-help__links{display:grid;gap:5px}
  .rail-help__action{min-height:30px;padding:6px 8px;display:grid;grid-template-columns:14px minmax(0,1fr) 12px;
    align-items:center;gap:7px;border:1px solid rgb(243 246 238/14%);border-radius:var(--r-xs);
    background:rgb(5 11 10/72%);color:rgb(243 246 238/90%);font-size:11px;font-weight:600;line-height:16px;
    text-decoration:none;transition:background .12s,border-color .12s,color .12s}
  .rail-help__action>svg{width:14px;height:14px;color:var(--sage)}
  .rail-help__action>.rail-help__chevron{width:12px;height:12px;color:rgb(243 246 238/54%)}
  .rail-help__action:hover{border-color:rgb(199 215 178/38%);background:rgb(18 58 46/88%);color:var(--mineral)}
  .rail-help__action:focus-visible{outline:none;box-shadow:0 0 0 2px var(--sage)}
  .railfoot{margin-top:auto;padding-top:var(--s3);border-top:1px solid var(--dl-rail-line);
    display:flex;align-items:center;gap:10px;min-width:0;flex:none}
  .railfoot .av{position:relative;width:30px;height:30px;overflow:hidden;border-radius:var(--r-pill);background:var(--sage);color:var(--evergreen);
    display:grid;place-items:center;font-weight:600;font-size:13px;flex:none}
  .railfoot .who{font-size:var(--text-small);line-height:1.4;min-width:0;flex:1}
  .railfoot .who span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .railfoot .who small{display:block;font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.12em;
    text-transform:uppercase;color:var(--dl-rail-ink-55);opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .railfoot #logout{flex:none;display:inline-flex;align-items:center;gap:6px;color:var(--dl-rail-ink);
    background:var(--dl-rail-fill);border:1px solid var(--dl-rail-line)}
  .railfoot #logout svg{width:14px;height:14px;flex:none}
  .railfoot #logout:hover{background:rgb(255 255 255/9%);color:var(--dl-rail-ink)}
  .railfoot #logout:focus-visible{box-shadow:var(--focus)}

  /* ---- rail collapse: desktop-only icon rail with hover tooltips ---- */
  .rail-collapse{all:unset;margin-left:auto;width:26px;height:26px;border-radius:var(--r-xs);
    display:grid;place-items:center;cursor:pointer;color:var(--dl-rail-ink-70);
    border:1px solid var(--dl-rail-line);background:var(--dl-rail-fill);
    transition:background .12s,color .12s}
  .rail-collapse:hover{background:rgb(255 255 255/10%);color:var(--dl-rail-ink)}
  .rail-collapse:focus-visible{box-shadow:var(--focus)}
  .rail-collapse svg{width:14px;height:14px;transition:transform .18s ease}
  @media(min-width:861px){
    .app{transition:grid-template-columns .18s ease}
    #rail-nav{overflow-y:hidden;padding-right:0}
    .navsection{gap:2px;margin-bottom:5px}
    .navgroup{min-height:30px;padding:5px var(--s2);font-size:11px;line-height:15px}
    .nav{gap:0}
    .nav button{min-height:29px;gap:9px;padding:5px var(--s2);font-size:13px;line-height:18px}
    .nav button svg{width:15px;height:15px}
    .railfoot{display:none}
    body.rail-collapsed .app{grid-template-columns:68px minmax(0,1fr)}
    body.rail-collapsed .rail{padding-inline:10px}
    body.rail-collapsed .brand{flex-direction:column;gap:10px;padding-inline:0}
    body.rail-collapsed .brand b{display:none}
    body.rail-collapsed .rail-collapse{margin-left:0}
    body.rail-collapsed .rail-collapse svg{transform:rotate(180deg)}
    body.rail-collapsed .navsection{gap:3px;margin-bottom:7px}
    body.rail-collapsed .navgroup{width:38px;min-height:34px;padding:0;margin:0 auto;justify-content:center}
    body.rail-collapsed .navgroup-label{display:none}
    body.rail-collapsed .navgroup-icon{display:none}
    body.rail-collapsed .nav{padding:2px 0}
    body.rail-collapsed .nav button{position:relative;justify-content:center;padding:10px 0}
    body.rail-collapsed .nav button .lbl{display:none}
    body.rail-collapsed .rail-help{width:44px;min-height:auto;align-self:center;padding:4px;background:rgb(5 11 10/42%)}
    body.rail-collapsed .rail-help__copy{display:none}
    body.rail-collapsed .rail-help__links{gap:4px}
    body.rail-collapsed .rail-help__action{width:34px;min-height:34px;padding:0;display:flex;justify-content:center}
    body.rail-collapsed .rail-help__action>span:not(.sr-only),
    body.rail-collapsed .rail-help__action>.rail-help__chevron{display:none}
    /* Id-qualified so this dot form outranks the expanded-rail badge rule. */
    body.rail-collapsed #rail-nav .setup-badge{position:absolute;top:4px;right:4px;width:9px;height:9px;
      min-width:9px;max-width:9px;margin:0;padding:0;gap:0;overflow:hidden;box-sizing:border-box;
      border:2px solid var(--dl-rail);background:var(--gold);color:transparent;font-size:0;
      pointer-events:none}
    body.rail-collapsed #rail-nav .setup-badge .dot{display:none}
    body.rail-collapsed .railfoot{flex-direction:column;gap:8px}
    body.rail-collapsed .railfoot .who{display:none}
    body.rail-collapsed .railfoot #logout{width:30px;height:30px;padding:0;justify-content:center;
      border-radius:var(--r-xs)}
    body.rail-collapsed .railfoot #logout span{display:none}
  }
  /* Fixed so collapsed-rail labels clear both the sticky rail and its
     independently scrollable navigation viewport. JS anchors and clamps the
     tooltip to the active icon without allowing it to cover interactions. */
  .rail-tooltip{position:fixed;z-index:90;max-width:calc(100vw - 16px);padding:7px 10px;
    border-radius:var(--r-xs);background:var(--ink);box-shadow:var(--sh-3);color:var(--mineral);
    font:500 12px/1 var(--font-display);letter-spacing:0;text-transform:none;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis;pointer-events:none;opacity:0;visibility:hidden;
    transform:translateX(-4px);transition:opacity .12s ease,transform .12s ease,visibility .12s ease}
  .rail-tooltip[data-open="true"]{opacity:1;visibility:visible;transform:translateX(0)}
  @media(max-height:820px) and (min-width:861px){
    #rail-nav{overflow-y:auto;padding-right:2px}
    .navsection{gap:2px;margin-bottom:4px}
    .navgroup{min-height:27px;padding:3px var(--s2);font-size:10px;line-height:13px}
    .nav button{min-height:25px;gap:9px;padding:4px var(--s2);font-size:13px;line-height:17px}
    .nav button svg{width:15px;height:15px}
  }
  @media(max-width:860px){.rail-collapse.halo-icon-control{display:none}}

  .stage{min-width:0;width:100%;padding:0 var(--s7) var(--s6);max-width:none;margin:0;background:var(--dl-page)}
  #screen-content{width:100%;max-width:1184px;margin-inline:auto}
  /* One step above the in-content popover tier (z-index:20 - space picker,
     home query filter, skill filter, metric tooltips). They are absolutely
     positioned inside #screen-content, which comes AFTER this bar in the DOM,
     so at an equal z-index the popover won the tie and painted over the sticky
     header as soon as the page scrolled. Stays below the rail (30), the S5
     preview banner (30), and the mobile drawer (40). */
  .workspace-bar{position:sticky;top:0;z-index:21;min-height:56px;margin:0 calc(0px - var(--s7)) var(--s5);
    padding:0 var(--s7);display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,360px) minmax(0,1fr);
    align-items:center;gap:var(--s4);background:var(--dl-rail-metal);background-color:var(--dl-rail);
    border-bottom:1px solid rgb(255 255 255/16%);box-shadow:0 6px 18px -18px rgb(0 0 0/78%)}
  .workspace-context{grid-column:1;display:flex;align-items:center;gap:var(--s2);min-width:0;color:var(--dl-rail-ink);font-size:var(--text-small);font-weight:500}
  .workspace-context>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* The mark matches the organization name's line box: one line, one height. */
  .workspace-org-mark{position:relative;flex:none;display:grid;place-items:center;width:20px;height:20px;overflow:hidden;
    border:1px solid rgb(255 255 255/18%);border-radius:var(--r-xs);background:rgb(255 255 255/9%);
    font:600 9px/1 var(--font-display);letter-spacing:.02em;color:var(--dl-rail-ink)}
  .workspace-org-mark img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:inherit}
  .workspace-org-mark img[hidden]{display:none}
  .workspace-search{all:unset;grid-column:2;box-sizing:border-box;width:50%;min-width:180px;min-height:34px;padding:6px 10px;justify-self:center;
    display:flex;align-items:center;gap:var(--s2);color:var(--ink);background:#fff;border:1px solid var(--dl-shell-control-line);
    border-radius:var(--r-sm);font-size:var(--text-small);cursor:pointer;transition:border-color .12s,background .12s}
  .workspace-search[hidden]{display:none}
  .workspace-search:hover{background:var(--mineral);border-color:var(--dl-shell-control-line);color:var(--ink)}
  .workspace-search:focus-visible{box-shadow:var(--focus);border-color:var(--evergreen)}
  .workspace-search svg{width:15px;height:15px;flex:none}
  .workspace-search span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .workspace-search kbd{margin-left:auto;padding:1px 6px;border:1px solid var(--line);border-radius:var(--r-xs);
    background:var(--neutral-soft);font:500 11px var(--font-mono);color:var(--muted);box-shadow:none}
  .workspace-account{grid-column:3;position:relative;margin-left:auto;justify-self:end;min-width:0;display:flex;align-items:center;gap:var(--s3)}
  .workspace-notification-trigger{all:unset;box-sizing:border-box;position:relative;width:32px;height:32px;border-radius:var(--r-xs);
    display:grid;place-items:center;color:var(--dl-rail-ink);cursor:pointer}
  .workspace-notification-trigger[hidden]{display:none}
  .workspace-notification-trigger:hover{background:rgb(255 255 255/9%);color:var(--dl-rail-ink)}
  .workspace-notification-trigger:focus-visible{box-shadow:var(--focus)}
  .workspace-notification-trigger svg{width:18px;height:18px}
  .workspace-notification-count{position:absolute;top:-4px;right:-5px;min-width:17px;height:17px;padding:0 4px;border:2px solid var(--dl-rail);
    border-radius:var(--r-pill);display:grid;place-items:center;background:var(--rust);color:white;font:700 9px/1 var(--font-mono)}
  .workspace-notification-count[hidden]{display:none}
  .workspace-account-trigger{all:unset;box-sizing:border-box;width:180px;min-width:0;max-width:180px;height:36px;padding:3px 10px 3px 4px;
    border:1px solid var(--dl-shell-control-line);border-radius:var(--r-sm);display:flex;align-items:center;gap:8px;background:var(--dl-shell-control);
    box-shadow:0 2px 6px rgb(0 0 0/32%);cursor:pointer}
  .workspace-account-trigger:hover{border-color:var(--dl-shell-control-line);background:var(--dl-shell-control-hover)}
  .workspace-account-trigger:focus-visible{box-shadow:var(--focus)}
  .workspace-account-trigger .av{position:relative;width:30px;height:30px;overflow:hidden;border-radius:var(--r-pill);display:grid;place-items:center;
    background:var(--evergreen);color:var(--mineral);font-size:12px;font-weight:600;flex:none}
  .workspace-account-copy{display:grid;min-width:0;flex:1;text-align:left;line-height:1.15}
  .workspace-account-copy>span,.workspace-account-copy>small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .workspace-account-copy>span{color:var(--ink);font-size:11.5px;font-weight:600}
  .workspace-account-copy>small{margin-top:2px;color:var(--muted);font-size:9px;font-weight:500;text-transform:capitalize}
  .identity-av-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
  .identity-av-image[hidden]{display:none}
  .workspace-account-menu{position:absolute;right:0;top:calc(100% + var(--s2));z-index:40;width:220px;padding:var(--s2);
    border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);box-shadow:var(--sh-3)}
  .workspace-account-menu[hidden]{display:none}
  .workspace-account-summary{min-width:0;padding:var(--s2) var(--s2) var(--s3);border-bottom:1px solid var(--line);
    margin-bottom:var(--s2);font-size:var(--text-small);line-height:1.3}
  .workspace-account-summary span,.workspace-account-summary small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .workspace-account-summary small{margin-top:2px;font-family:var(--font-mono);font-size:10px;letter-spacing:.12em;
    text-transform:uppercase;color:var(--muted-2)}
  .workspace-account-action{all:unset;box-sizing:border-box;width:100%;min-height:38px;padding:8px var(--s2);
    display:flex;align-items:center;gap:var(--s2);border-radius:var(--r-sm);color:var(--ink);
    font-size:var(--text-small);cursor:pointer}
  .workspace-account-action:hover{background:var(--sage-soft);color:var(--evergreen)}
  .workspace-account-action:focus-visible{box-shadow:inset var(--focus)}
  .workspace-account-action svg{width:16px;height:16px;flex:none;color:var(--muted-2)}
  /* The drawer is Home's Overview card at drawer scale. Everything visual comes
     from Home's own primitives (.home-overview scope, .home-panel,
     .home-overview-list/-row/-row-icon); the rules below add only what Home has
     no equivalent of — a button reset, because these rows navigate, and tighter
     padding for a 380px panel. No new colours, no new type scale. */
  .source-wizard-dialog.notification-center__dialog{width:min(380px,100vw)}
  .notification-center__dialog .console-right-panel__body{padding:var(--s3);background:var(--canvas)}
  /* White surface, light-grey rows, set by remapping Home's two surface
     variables rather than overriding element by element — --dl-page is the
     design language's tier-3 inset fill, i.e. a box inside a white card.
     Both classes are required: .home-overview sets these same variables on
     this element and is declared later, so one class loses on source order. */
  .home-overview.notification-center__scope{--home-panel:var(--canvas);--home-canvas:var(--dl-page)}
  .notification-center__scope{display:grid;gap:var(--s3)}
  .notification-center__scope .home-panel{padding:14px}
  .notification-center__scope .home-panel>.home-panel-head:first-child{padding:0 4px 10px}
  .notification-center__scope .home-overview-row{width:100%;font-family:inherit;text-align:left;
    cursor:pointer;box-shadow:none}
  .notification-center__scope .home-overview-row:hover{background:color-mix(in srgb,var(--ink) 4%,var(--dl-page))}
  .notification-center__scope .home-overview-row:focus-visible{outline:none;box-shadow:var(--focus)}
  /* The chip sits on a grey row, so it inverts to white and keeps the hairline
     edge rather than carrying Home's sage wash into a neutral surface. */
  .notification-center__scope .home-overview-row-icon{background:var(--canvas);border:1px solid var(--line);color:var(--muted)}
  .alert-provider-logo{width:18px;height:18px;object-fit:contain}
  .notification-center__scope .home-card-empty{min-height:88px;margin:0;font-size:var(--text-small)}
  /* Quiet by default: clearing is a convenience next to a count, not an action
     that should compete with the rows it would remove. */
  .notification-center__clear{all:unset;box-sizing:border-box;cursor:pointer;padding:2px 6px;border-radius:var(--r-xs);
    color:var(--home-faint);font-family:inherit;font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap}
  .notification-center__clear:hover{background:var(--sage-soft);color:var(--evergreen)}
  .notification-center__clear:focus-visible{box-shadow:var(--focus)}
  .notification-center__copy{display:grid;gap:1px;min-width:0}
  .notification-center__copy>*{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .notification-center__copy strong{font-size:13px;font-weight:600;line-height:1.35}
  .notification-center__loading,.notification-center__empty,.notification-center__unavailable{padding:var(--s4);border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);color:var(--muted);font-size:var(--text-small)}
  .notification-center__empty{text-align:center}
  .notification-center__empty p{margin:var(--s2) 0 0}
  .notification-center__unavailable{margin-bottom:var(--s3);border-color:color-mix(in srgb,var(--gold) 34%,var(--line));background:color-mix(in srgb,var(--gold) 8%,var(--panel));color:var(--ink)}
  .breadcrumbs{width:100%;max-width:1184px;min-height:28px;display:flex;align-items:center;
    margin:0 auto var(--s2);padding:0;background:transparent;border:0}
  .breadcrumbs:empty{display:none}
  .breadcrumbs ol{list-style:none;display:flex;align-items:center;gap:var(--s2);min-width:0;margin:0;padding:0;
    overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  .breadcrumbs ol::-webkit-scrollbar{display:none}
  .breadcrumbs li{display:inline-flex;align-items:center;gap:var(--s2);min-width:0;color:var(--muted-2);font-size:12px}
  .breadcrumbs button{all:unset;cursor:pointer;border-radius:var(--r-xs);padding:3px 2px;color:var(--muted-2)}
  .breadcrumbs button:hover{color:var(--evergreen);background:var(--sage-soft)}
  .breadcrumbs button:focus-visible{box-shadow:var(--focus);color:var(--evergreen)}
  .breadcrumb-separator{color:var(--muted-2);font-family:var(--font-mono)}
  .breadcrumb-current{color:var(--ink);font-weight:600;overflow:hidden;text-overflow:ellipsis;max-width:34ch}
  .breadcrumb-home{display:inline-flex;align-items:center;gap:6px}
  .breadcrumb-home svg{width:14px;height:14px;flex:none}
  @media(max-width:860px){
    .app{display:block}
    .mobile-topbar{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
      min-height:calc(var(--s7) + var(--s3));
      position:sticky;top:0;z-index:20;padding:var(--s3) var(--s5);background:rgb(255 255 255/94%);
      border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}
    .mobile-brand{display:flex;align-items:center;gap:var(--s2);font-family:var(--font-brand);font-weight:600}
    .mobile-brand img{width:24px;height:24px;object-fit:contain}
    .mobile-brand .brand-home{gap:var(--s2)}
    .mobile-nav-toggle{font:inherit;font-size:var(--text-small);font-weight:600;color:var(--mineral);background:var(--evergreen);min-height:44px;
      border:0;border-radius:var(--r-pill);padding:8px 12px;display:inline-flex;align-items:center;gap:7px;cursor:pointer}
    .mobile-nav-toggle svg{width:17px;height:17px}
    .mobile-nav-toggle:focus-visible,.mobile-nav-close:focus-visible{box-shadow:0 0 0 3px var(--sage)}
     .rail{position:fixed;inset:0 auto 0 0;z-index:40;width:min(84vw,320px);height:100dvh;
       transform:translateX(-120%);visibility:hidden;pointer-events:none;transition:transform .2s ease,visibility .2s;
       box-shadow:none}
    body.nav-open{overflow:hidden}
     body.nav-open .rail{transform:translateX(0);visibility:visible;pointer-events:auto;box-shadow:var(--sh-3)}
    .mobile-nav-close{margin-left:auto;width:44px;height:44px;border:1px solid var(--line);
      border-radius:var(--r-xs);color:var(--evergreen);background:var(--panel);cursor:pointer;
      place-items:center;flex:none}
    body.nav-open .mobile-nav-close{display:grid}
    .mobile-nav-close svg{width:16px;height:16px}
    .mobile-nav-backdrop{position:fixed;inset:0;z-index:30;border:0;background:rgb(11 13 11/56%);
      opacity:0;visibility:hidden;pointer-events:none;transition:opacity .2s ease,visibility .2s;cursor:pointer}
    body.nav-open .mobile-nav-backdrop{display:block;opacity:1;visibility:visible;pointer-events:auto}
    .stage{padding:var(--s5)}
    .workspace-bar{display:none}
    .breadcrumbs{margin:0 auto var(--s2);padding:0}
    .breadcrumb-current{max-width:22ch}
  }
  .screen{display:none;animation:fade .2s ease}
  .screen.on{display:block}
  .screen-flow{display:grid;gap:var(--space-section)}
  .screen-flow>*{min-width:0;margin-block:0!important}
  @keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
  @media(prefers-reduced-motion:reduce){.screen{animation:none}.rail,.mobile-nav-backdrop,.app,.rail-collapse svg{transition:none}}
  @media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;
    animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

  /* Route pending state: skeleton screen in the shape of a typical console page. */
  .page-loader{display:block}
  .page-skeleton{display:grid;gap:var(--s5);align-content:start}
  .page-skeleton__head{display:grid;gap:var(--s2);justify-items:start;
    padding-bottom:var(--s3);border-bottom:1px solid var(--line)}
  .page-skeleton__stats{display:grid;gap:var(--s4);grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
  .page-skeleton__stat{display:grid;gap:var(--s2);align-content:start;min-height:86px;
    background:var(--panel);border:1px solid var(--line);border-radius:var(--r-md);padding:var(--s4) var(--s5)}
  .page-skeleton__card{display:grid;gap:var(--s3);align-content:start;
    background:var(--panel);border:1px solid var(--line);border-radius:var(--r-lg);padding:var(--s5)}
  .skel{display:block;position:relative;overflow:hidden;background:var(--stone);border-radius:var(--r-xs)}
  .skel::after{content:"";position:absolute;inset:0;transform:translateX(-100%);
    background:linear-gradient(90deg,transparent,rgb(255 255 255/65%),transparent);
    animation:skel-shimmer 1.6s ease-in-out infinite}
  .skel--eyebrow{width:96px;height:11px}
  .skel--title{width:min(340px,60%);height:30px;border-radius:var(--r-sm)}
  .skel--sub{width:min(480px,80%);height:13px}
  .skel--stat-k{width:72px;height:10px}
  .skel--stat-v{width:96px;height:26px;border-radius:var(--r-sm)}
  .skel--card-title{width:40%;height:14px}
  .skel--line{width:100%;height:12px}
  .skel--line--80{width:80%}
  .skel--line--60{width:60%}
  @keyframes skel-shimmer{to{transform:translateX(100%)}}
  @media(prefers-reduced-motion:reduce){
    .skel::after{animation:none!important}
  }

  /* ---- Context Fabric: the sign-in / boot animation (console/fabric.js) ----
     A woven thread field pinched through one node - the same specimen the
     marketing site draws for Context Fabric. Threads breathe on a staggered
     delay so the sheet ripples instead of sliding; light packets travel the
     same paths but are only visible near the waist (the spark gradient is
     transparent at both edges), so the motion reads as sources converging on
     one identity. Geometry lives in fabric.js; every animation lives here. */
  .fabric{display:grid;justify-items:center;gap:var(--s4)}
  .fabric--page{align-content:center;min-height:min(58vh,460px);padding:var(--s6) 0}
  .fabric-art{width:100%;max-width:340px}
  .fabric-art svg{display:block;width:100%;height:auto}
  .fabric-weave{filter:drop-shadow(0 0 8px rgb(255 255 255/56%))
    drop-shadow(0 14px 28px rgb(var(--evergreen-rgb)/12%))}
  .fabric-thread{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke;
    animation:fabric-breathe 7s var(--ease) infinite;
    animation-delay:calc(var(--i) * -180ms)}
  .fabric-spark{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke;
    stroke-dasharray:.09 .91;animation:fabric-travel 3.6s linear infinite;
    animation-delay:calc(var(--i) * -103ms)}
  .fabric-spark--rev{animation-direction:reverse}
  .fabric-halo{animation:fabric-glow 4.6s var(--ease) infinite}
  .fabric-ring{fill:none;stroke:rgb(var(--evergreen-rgb)/30%);stroke-width:1;
    vector-effect:non-scaling-stroke;transform-box:fill-box;transform-origin:center;
    animation:fabric-ring 3s var(--ease) infinite}
  .fabric-core{transform-box:fill-box;transform-origin:center;
    filter:drop-shadow(0 0 12px rgb(255 255 255/80%)) drop-shadow(0 0 26px rgb(199 215 178/60%));
    animation:fabric-pulse 3s var(--ease) infinite}
  .fabric-status{margin:0;font-family:var(--font-mono);font-size:var(--text-label);
    letter-spacing:.16em;text-transform:uppercase;color:var(--muted-2)}
  @keyframes fabric-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-2.5px)}}
  @keyframes fabric-travel{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
  @keyframes fabric-glow{0%,100%{opacity:.55}50%{opacity:1}}
  @keyframes fabric-ring{0%{transform:scale(.72);opacity:.6}72%,100%{transform:scale(1.7);opacity:0}}
  @keyframes fabric-pulse{0%,100%{transform:scale(.94);opacity:.92}50%{transform:scale(1.07);opacity:1}}
  /* The app-wide reduced-motion rule collapses animations to their end frame,
     which for a travelling dash is a half-drawn thread. Drop the moving layers
     outright and keep the static weave. */
  @media(prefers-reduced-motion:reduce){
    .fabric-flow,.fabric-ring{display:none}
  }

  .head{display:flex;min-height:72px;justify-content:space-between;align-items:flex-start;gap:var(--s3);
    padding:0 0 var(--s4);margin:0!important}
  .head .eyebrow{display:none}
  .head h1{font-size:var(--text-h1);line-height:1.08;font-weight:500;letter-spacing:-.025em}
  .head p{margin:var(--space-text) 0 0;color:var(--muted);font-size:var(--text-body-size);max-width:60ch}
  .head .acts{display:flex;align-items:center;gap:var(--s2);flex:none;flex-wrap:wrap;justify-content:flex-end}

  /* ---- primitives ---- */
  .btn{all:unset;box-sizing:border-box;font-family:var(--font-cta);font-weight:500;font-size:14px;cursor:pointer;
    min-height:40px;padding:8px 15px;border:1px solid transparent;border-radius:var(--r-pill);display:inline-flex;
    align-items:center;justify-content:center;gap:7px;transition:transform .06s,background .12s,border-color .12s,
    box-shadow .12s;white-space:nowrap;letter-spacing:.005em;word-spacing:.04em}
  .btn:active{transform:translateY(1px)}
  .btn:focus-visible{box-shadow:var(--focus)}
  .btn:disabled{opacity:.72;cursor:not-allowed;border-color:var(--line);background:var(--stone);color:var(--muted)}
  .btn svg{width:15px;height:15px}
  .btn--solid{background:var(--evergreen);color:var(--mineral)}
  .btn--solid:hover{background:var(--evergreen-hover)}
  .btn--primary{background:var(--evergreen);color:var(--mineral);box-shadow:var(--sh-1),var(--sh-2)}
  .btn--primary:hover{background:var(--evergreen-hover)}
  .btn--outline{border-color:rgb(var(--evergreen-rgb)/28%);color:var(--evergreen);background:transparent}
  .btn--outline:hover{background:var(--sage-soft)}
  .btn--ghost{color:var(--evergreen)}
  .btn--ghost:hover{background:var(--sage-soft)}
  .btn--sage{background:var(--sage);color:var(--evergreen)}
  .btn--sm{min-height:36px;padding:6px 11px;font-size:var(--text-small)}
  .btn--danger{color:var(--rust);border:1px solid rgb(232 60 0/28%);background:var(--panel)}
  .btn--danger:hover{background:rgb(232 60 0/6%)}

  .card{background:var(--panel);border:1px solid var(--line);border-radius:var(--panel-radius);
    padding:var(--panel-padding);box-shadow:var(--sh-1),var(--sh-2)}
  .card > h3{font-size:var(--section-title-size);line-height:1.25;margin-bottom:var(--space-text)}
  .card .sub{color:var(--muted);font-size:var(--section-subtitle-size);line-height:1.5;margin-bottom:var(--space-group)}

  .grid{display:grid;gap:var(--s4)}
  .g4{grid-template-columns:repeat(4,1fr)} .g3{grid-template-columns:repeat(3,1fr)}
  .g2{grid-template-columns:repeat(2,1fr)}
  @media(max-width:1180px){.g4{grid-template-columns:repeat(2,1fr)}}
  @media(max-width:960px){.g3,.g2{grid-template-columns:1fr}}

  .stat{background:var(--panel);border:1px solid var(--line);border-radius:var(--r-md);padding:var(--s4) var(--s5)}
  .stat-label{display:flex;align-items:center;gap:6px;min-width:0}
  .stat .k{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.14em;text-transform:uppercase;color:var(--muted-2)}
  .stat .v{font-size:34px;font-weight:600;letter-spacing:-.03em;margin-top:6px;display:flex;align-items:baseline;gap:9px}
  .stat--secondary .v{font-size:28px}
  .stat .v .d{font-size:var(--text-label);font-weight:500;font-family:var(--font-mono)}
  .up{color:var(--olive)} .down{color:var(--rust)} .good{color:#3f7d54}

  /* Shared summary metric used by Home and Usage. Keep this contract beside
     the base stat primitive so the renderer's metric-card DOM cannot fall
     back to unbounded inline-SVG sizing. */
  .metric-card{--metric-tone:var(--evergreen);min-width:0;display:flex;flex-direction:column;gap:var(--s3)}
  .metric-card-head{min-height:38px;display:flex;align-items:center;justify-content:flex-start;gap:var(--s3)}
  .metric-card-label{min-width:0;display:block;flex:1}
  .metric-card-icon{width:38px;height:38px;display:grid;place-items:center;flex:none;
    border:1px solid color-mix(in srgb,var(--metric-tone) 18%,var(--line));border-radius:var(--r-sm);
    background:color-mix(in srgb,var(--metric-tone) 10%,var(--panel));color:var(--metric-tone)}
  .metric-card-icon svg{width:18px;height:18px}
  .metric-card-shell{min-height:72px;padding:var(--s3) var(--s4);display:flex;flex:1;flex-direction:column;
    justify-content:space-between;gap:var(--s2);border:1px solid var(--line);border-radius:var(--r-md);
    background:var(--surface-soft);box-shadow:var(--sh-1)}
  .metric-card-shell .v{margin:0}
  .metric-card-cap{--cap-tone:var(--muted);min-width:0;display:-webkit-box;
    -webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;
    overflow-wrap:anywhere;color:var(--cap-tone);font-size:var(--text-small);line-height:1.4}
  .metric-card-cap--warn{--cap-tone:#8a6d1f}
  .metric-card--spend{--metric-tone:var(--olive)}
  .metric-card--people,.metric-card--query{--metric-tone:var(--evergreen)}
  .metric-card--memory{--metric-tone:var(--slate)}
  .metric-card--source{--metric-tone:#5d7750}

  .pill{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:var(--text-label);
    letter-spacing:.1em;text-transform:uppercase;padding:3px 9px;border-radius:var(--r-pill);
    border:1px solid var(--line);color:var(--muted);background:var(--panel);font-weight:500}
  .setup-badge{min-width:0;max-width:116px;margin-left:auto;overflow:hidden;text-overflow:ellipsis;
    white-space:nowrap;flex:none}
  .pill .dot{width:6px;height:6px;border-radius:50%;background:currentColor}
  .pill--ok{color:#3f7d54;border-color:rgb(63 125 84/28%);background:rgb(199 215 178/22%)}
  .pill--live{color:#2f7d54;border-color:rgb(63 125 84/30%)}
  .pill--live .dot{background:#3f7d54;animation:blink 2s infinite}
  .pill--warn{color:#8a6d1f;border-color:rgb(244 211 94/45%);background:rgb(244 211 94/14%)}
  .pill--crit{color:var(--rust);border-color:rgb(232 60 0/32%);background:rgb(232 60 0/7%)}
  @keyframes blink{50%{opacity:.35}}
  @media(prefers-reduced-motion:reduce){.pill--live .dot{animation:none}}
  .tag{font-family:var(--font-mono);font-size:var(--text-label);color:var(--muted);background:var(--mineral);
    border:1px solid var(--line);border-radius:var(--r-xs);padding:2px 7px}
  .badge{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.08em;text-transform:uppercase;
    padding:2px 8px;border-radius:var(--r-xs);font-weight:600}
  .badge--role{background:var(--evergreen);color:var(--mineral)}

  table{width:100%;border-collapse:collapse;font-size:14px}
  th{text-align:left;font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.13em;text-transform:uppercase;
    color:var(--muted-2);font-weight:500;padding:0 var(--s3) var(--s2);border-bottom:1px solid var(--line)}
  td{padding:12px var(--s3);border-bottom:1px solid var(--line);vertical-align:middle}
  tr:last-child td{border-bottom:none}
  .tblwrap{overflow-x:auto;border-radius:var(--r-lg)}
  .person-avatar{position:relative;display:inline-grid;place-items:center;width:30px;height:30px;
    overflow:hidden;vertical-align:middle;border:1px solid rgb(var(--evergreen-rgb)/18%);
    border-radius:50%;background:var(--sage-soft);color:var(--evergreen);
    box-shadow:0 0 0 2px var(--panel);font:600 10px/1 var(--font-mono);letter-spacing:.03em}
  .person-avatar__fallback{position:absolute;inset:0;display:grid;place-items:center}
  .person-avatar__image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:var(--sage-soft)}
  .person-avatar__image[hidden]{display:none}
  .person-avatar-cell{width:1%;min-width:52px;white-space:nowrap;vertical-align:middle}
  .person-avatar-date{display:inline-block;margin-left:9px;vertical-align:middle}
  .conflict-scan-section{display:grid;gap:var(--space-group);align-content:start}
  /* Conflict evidence is read by non-technical reviewers: prose, not a terminal. */
  .conflict-diff th[scope=row]{text-align:left;color:var(--muted-2);font-weight:500;white-space:nowrap}
  .conflict-diff td{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
  .conflict-quote{min-width:0;padding:var(--s4);border:1px solid var(--line);
    border-left:3px solid var(--olive);border-radius:var(--r-sm);background:var(--mineral)}
  .conflict-quote__src{font-size:11px;letter-spacing:.08em;text-transform:uppercase;
    color:var(--muted-2);margin-bottom:var(--s2)}
  .conflict-quote__text{margin:0 0 var(--s2);line-height:1.55;overflow-wrap:anywhere}
  /* The decision is the point of the card, so it is separated and led by the question. */
  .conflict-decide{display:grid;gap:var(--s2);margin-top:var(--s4);padding-top:var(--s4);
    border-top:1px solid var(--line)}
  .conflict-decide__ask{font-weight:600}
  .conflict-finding-card{display:grid;gap:var(--space-group);padding:var(--s5)}
  .conflict-finding-card>.sub{margin:0}
  .conflict-finding-card__comparison{min-width:0}
  .conflict-finding-card>.compact-disclosure,.conflict-finding-card>.conflict-decide{margin:0}
  @media(max-width:620px){.conflict-finding-card{padding:var(--s4)}}
  tbody tr{transition:background .12s var(--ease)}
  tbody tr:hover{background:rgb(var(--evergreen-rgb)/4%)}
  td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
  .subtle{color:var(--muted-2)}
  .audit-when,.audit-id{white-space:nowrap}.audit-result{min-width:180px;max-width:36rem;white-space:normal;overflow-wrap:anywhere}
  .audit-copy{all:unset;cursor:pointer;margin-left:5px;padding:3px 6px;border:1px solid var(--line);
    border-radius:var(--r-pill);color:var(--evergreen);font:600 10px var(--font-mono)}
  .audit-copy:focus-visible{box-shadow:var(--focus)}
  /* S8 numbered pager: Previous / page numbers with an ellipsis / Next. */
  .audit-pager{display:flex;align-items:center;justify-content:center;gap:var(--s3);
    margin-top:var(--s3);flex-wrap:wrap}
  .audit-pager__pages{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
  .audit-pager__page{all:unset;box-sizing:border-box;min-width:32px;min-height:32px;padding:0 8px;
    display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;
    border-radius:var(--r-xs);color:var(--evergreen);font:600 13px var(--font-mono);cursor:pointer}
  button.audit-pager__page:hover{background:var(--sage-soft)}
  button.audit-pager__page:focus-visible{outline:none;box-shadow:var(--focus)}
  .audit-pager__page.is-current{background:var(--evergreen);color:var(--mineral);cursor:default}
  .audit-pager__gap{color:var(--muted-2);padding:0 2px;font:600 13px var(--font-mono)}
  @media (max-width:640px){.audit-pager__page{min-width:40px;min-height:40px}}

  .field{margin-bottom:var(--s4)}
  .field label{display:block;font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.13em;
    text-transform:uppercase;color:var(--muted-2);margin-bottom:6px}
  .model-field-label{display:flex;align-items:center;gap:5px;margin-bottom:6px}
  .model-field-label label{margin:0}
  .model-field-label .heading-info{width:16px;height:16px;margin-left:0}
  .model-field-label .heading-info svg{width:14px;height:14px}
  /* line-height is pinned so a mono input, a body input and a native select
     that sit on one row all resolve to the same box height. */
  .input,.select{width:100%;font-family:var(--font-body);font-size:14px;line-height:1.45;padding:10px 12px;
    border:1px solid rgb(var(--evergreen-rgb)/18%);border-radius:var(--r-sm);background:var(--panel);color:var(--ink)}
  .input:focus,.select:focus{outline:none;border-color:var(--evergreen);box-shadow:var(--focus)}
  .hint{font-size:var(--text-small);color:var(--muted-2);margin-top:5px}
  /* Inline field validation: message sits under its input so drawer forms never
     surface errors on the blurred page behind them. */
  .field-error{font-size:var(--text-small);color:var(--rust);margin:5px 0 0}
  .field-error:empty{display:none}
  .input.input--invalid{border-color:var(--rust)}
  .input.input--invalid:focus{border-color:var(--rust);box-shadow:0 0 0 3px rgb(232 60 0/12%)}

  /* ---- One dropdown for the whole console ---------------------------------
     Every <select> shares this treatment: the closed control is drawn by Halo
     (native chrome off, one chevron, one hover/focus state), and where the
     browser supports base-select the open picker is drawn by Halo too, so the
     list stops falling back to the grey OS listbox. Browsers without
     base-select keep the styled closed control and their native list. */
  .select,select.input,.copilot-history-view,.copilot-model-select{
    appearance:none;-webkit-appearance:none;background-image:var(--select-chevron);
    background-repeat:no-repeat;background-position:right var(--s3) center;background-size:12px 12px;
    padding-right:calc(var(--s3) * 2 + 12px);cursor:pointer;
    transition:border-color .12s var(--ease),background-color .12s var(--ease),box-shadow .12s var(--ease)}
  .select:hover:not(:disabled),select.input:hover:not(:disabled){border-color:var(--olive)}
  .select:disabled,select.input:disabled{cursor:not-allowed;opacity:.62}
  /* base-select rules carry a type selector so per-screen single-class tweaks
     (compact chips, borderless inline selects) cannot re-introduce the
     background chevron padding once the browser draws a real picker icon. */
  @supports (appearance:base-select){
    select.select,select.input,select.copilot-history-view,select.copilot-model-select{
      appearance:base-select;background-image:none;padding-right:var(--s3);
      align-items:center;gap:var(--s2);justify-content:space-between;text-align:left}
    select.copilot-model-select{padding-right:0;gap:5px}
    select.copilot-history-view{padding-right:10px;gap:6px}
    .source-schedule select.select{padding-right:7px;gap:5px}
    .select::picker-icon,select.input::picker-icon,
    .copilot-history-view::picker-icon,.copilot-model-select::picker-icon{
      width:12px;height:12px;flex:none;color:var(--muted-2);
      content:var(--select-chevron);transition:transform .16s var(--ease)}
    .select:open::picker-icon,select.input:open::picker-icon,
    .copilot-history-view:open::picker-icon,.copilot-model-select:open::picker-icon{transform:rotate(180deg)}
    .select selectedcontent,select.input selectedcontent,
    .copilot-history-view selectedcontent,.copilot-model-select selectedcontent{
      min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .select::picker(select),select.input::picker(select),
    .copilot-history-view::picker(select),.copilot-model-select::picker(select){
      appearance:base-select;box-sizing:border-box;min-width:anchor-size(width);
      max-height:min(320px,52dvh);margin-top:6px;padding:5px;overflow-y:auto;
      border:1px solid var(--line);border-radius:var(--r-md);background:var(--dl-page);
      box-shadow:var(--sh-2),var(--sh-3);scrollbar-width:thin;
      opacity:0;translate:0 -4px;
      transition:opacity .14s var(--ease),translate .14s var(--ease),
        overlay .14s allow-discrete,display .14s allow-discrete}
    .select:open::picker(select),select.input:open::picker(select),
    .copilot-history-view:open::picker(select),.copilot-model-select:open::picker(select){opacity:1;translate:0 0}
    @starting-style{
      .select:open::picker(select),select.input:open::picker(select),
      .copilot-history-view:open::picker(select),.copilot-model-select:open::picker(select){opacity:0;translate:0 -4px}
    }
    .select option,select.input option,.copilot-history-view option,.copilot-model-select option{
      display:flex;align-items:center;gap:var(--s2);min-height:34px;padding:7px 10px;
      border-radius:var(--r-xs);color:var(--ink);font:14px/1.4 var(--font-body);
      text-transform:none;letter-spacing:normal;cursor:pointer}
    .select option:hover,select.input option:hover,
    .copilot-history-view option:hover,.copilot-model-select option:hover{background:var(--sage-soft)}
    .select option:focus,select.input option:focus,
    .copilot-history-view option:focus,.copilot-model-select option:focus{
      outline:none;background:var(--sage-soft);color:var(--evergreen)}
    .select option:checked,select.input option:checked,
    .copilot-history-view option:checked,.copilot-model-select option:checked{
      color:var(--evergreen);font-weight:600}
    .select option::checkmark,select.input option::checkmark,
    .copilot-history-view option::checkmark,.copilot-model-select option::checkmark{
      order:1;margin-left:auto;color:var(--evergreen)}
    .select option:disabled,select.input option:disabled{color:var(--muted-2);cursor:not-allowed}
    /* Grouped providers (S12) keep the platform's eyebrow treatment instead of
       the UA's bold black group label. */
    .select optgroup,select.input optgroup{display:block;padding:var(--s2) 10px 3px;
      color:var(--muted-2);font:600 var(--text-label)/1.4 var(--font-mono);
      letter-spacing:.12em;text-transform:uppercase}
    .select optgroup legend,select.input optgroup legend{padding:0;color:inherit;font:inherit}
    .select optgroup option,select.input optgroup option{
      font:14px/1.4 var(--font-body);letter-spacing:normal;text-transform:none}
  }
  /* Kept as separate rules: one unknown pseudo-element invalidates the whole
     selector list, which would drop the plain-element rule with it. */
  @media(prefers-reduced-motion:reduce){
    .select,select.input,.copilot-history-view,.copilot-model-select{transition:none}
    .select::picker-icon{transition:none}
    .select::picker(select){transition:none}
  }
  .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0}

  .compact-disclosure{margin:0;background:var(--panel);border:1px solid var(--line);
    border-radius:var(--r-lg);box-shadow:var(--sh-1),var(--sh-2);overflow:hidden}
  .compact-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
    min-height:44px;padding:10px var(--s4);cursor:pointer;color:var(--evergreen);font:500 14px var(--font-cta);
    list-style:none;transition:background .12s var(--ease)}
  .compact-disclosure>summary::-webkit-details-marker{display:none}
  .compact-disclosure>summary::after{content:"";width:24px;height:24px;display:grid;place-items:center;
    flex:none;border:1px solid rgb(var(--evergreen-rgb)/18%);border-radius:var(--r-pill);font:500 16px var(--font-body);
    transition:transform .16s var(--ease)}
  .compact-disclosure>summary:hover{background:rgb(var(--evergreen-rgb)/5%)}
  .compact-disclosure>summary:focus-visible{outline:none;box-shadow:inset var(--focus)}
  .compact-disclosure>summary>span:not(.pill):first-child{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px;overflow:hidden}
  .compact-disclosure>summary>span:not(.pill):first-child small{display:block;color:var(--muted-2);font:400 var(--text-small)/1.4 var(--font-body)}
  .oauth-client-summary-copy{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px;overflow:hidden}
  .oauth-client-summary-copy .mono{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .oauth-client>summary>.pill{flex:none}
  .compact-disclosure[open]>summary::after{transform:none}
  .compact-disclosure__body{padding:var(--s4);border-top:1px solid var(--line)}
  .analytics-method{margin-bottom:var(--space-group)}
  .compact-disclosure.card{padding:0}
  .card .compact-disclosure{box-shadow:none}
  @media(max-width:480px){
    .compact-disclosure>summary{align-items:flex-start;flex-wrap:wrap}
    .compact-disclosure>summary>span:not(.pill):first-child{flex-basis:calc(100% - 40px);order:1}
    .compact-disclosure>summary::after{order:2}
    .compact-disclosure>summary>.pill{order:3;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  }

  /* Home: dense operational overview inspired by mature enterprise consoles. */
  .home-overview{font-size:var(--text-body-size)}
  .home-overview .home-text-xs{font-size:var(--text-label)}
  .home-overview .home-text-sm{font-size:var(--text-small)}
  .home-overview .home-score{font-size:34px}
  .home-overview>.screen-flow{gap:var(--s4)}
  .home-overview .head{margin-bottom:0;padding-bottom:var(--s4)}
  .home-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:var(--s3);
    overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none}
  .home-metrics .metric-card{position:relative;min-height:116px;
    padding:var(--s4);display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);
    border-radius:var(--r-md);box-shadow:var(--sh-1)}
  .home-metrics .metric-card:hover,.home-metrics .metric-card:focus-within{z-index:5}
  .home-metrics .metric-card-head{align-items:flex-start;justify-content:space-between;min-height:30px}
  .home-metrics .metric-card-label{display:flex;align-items:flex-start;gap:6px}
  .home-metrics .metric-card .k{min-width:0;font-size:var(--text-label);font-weight:600;line-height:1.2;letter-spacing:.1em;white-space:normal}
  .home-metrics .metric-card .v{font-size:29px;line-height:1;margin-top:var(--s4);padding-right:52px;letter-spacing:-.035em}
  .metric-info{position:relative;width:16px;height:16px;display:grid;place-items:center;flex:none;
    border-radius:var(--r-pill);color:var(--muted-2);cursor:help;outline:none}
  .metric-info svg{width:14px;height:14px}
  .metric-info:focus-visible{box-shadow:var(--focus);color:var(--evergreen)}
  .metric-info::after{content:attr(data-tip);position:absolute;z-index:20;left:50%;bottom:calc(100% + 9px);
    width:max-content;max-width:min(220px,calc(100vw - 32px));padding:8px 10px;border-radius:var(--r-xs);
    background:var(--ink);color:var(--mineral);box-shadow:var(--sh-3);font:12px/1.4 var(--font-body);
    letter-spacing:0;text-transform:none;white-space:normal;pointer-events:none;opacity:0;visibility:hidden;
    transform:translate(-50%,4px);transition:opacity .12s var(--ease),transform .12s var(--ease),visibility .12s}
  .metric-info::before{content:"";position:absolute;z-index:21;left:50%;bottom:calc(100% + 5px);
    width:8px;height:8px;background:var(--ink);opacity:0;visibility:hidden;pointer-events:none;
    transform:translateX(-50%) rotate(45deg);transition:opacity .12s var(--ease),visibility .12s}
  .metric-info:hover::after,.metric-info:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
  .metric-info:hover::before,.metric-info:focus-visible::before{opacity:1;visibility:visible}
  .heading-info{position:relative;width:18px;height:18px;display:inline-grid;place-items:center;vertical-align:.08em;
    margin-left:7px;border-radius:var(--r-pill);color:var(--muted-2);cursor:help;outline:none}
  .heading-info svg{width:15px;height:15px}
  .heading-info:focus-visible{box-shadow:var(--focus);color:var(--evergreen)}
  .heading-info::after{content:attr(data-tip);position:absolute;z-index:30;left:50%;bottom:calc(100% + 9px);
    width:max-content;max-width:min(280px,calc(100vw - 32px));padding:8px 10px;border-radius:var(--r-xs);
    background:var(--ink);color:var(--mineral);box-shadow:var(--sh-3);font:12px/1.4 var(--font-body);
    letter-spacing:0;text-transform:none;white-space:normal;pointer-events:none;opacity:0;visibility:hidden;
    transform:translate(-50%,4px);transition:opacity .12s var(--ease),transform .12s var(--ease),visibility .12s}
  .heading-info::before{content:"";position:absolute;z-index:31;left:50%;bottom:calc(100% + 5px);
    width:8px;height:8px;background:var(--ink);opacity:0;visibility:hidden;pointer-events:none;
    transform:translateX(-50%) rotate(45deg);transition:opacity .12s var(--ease),visibility .12s}
  .heading-info:hover::after,.heading-info:focus-visible::after{opacity:1;visibility:visible;transform:translate(-50%,0)}
  .heading-info:hover::before,.heading-info:focus-visible::before{opacity:1;visibility:visible}
  @media(max-width:640px){
    .heading-info::after{position:fixed;left:16px;right:16px;bottom:16px;width:auto;max-width:none;
      transform:translateY(4px)}
    .heading-info:hover::after,.heading-info:focus-visible::after{transform:translateY(0)}
    .heading-info::before{display:none}
  }
  .home-metrics .metric-card-icon{position:absolute;right:var(--s4);top:50%;width:40px;height:40px;
    transform:translateY(-50%);
    border:1px solid color-mix(in srgb,var(--metric-tone) 18%,var(--line));border-radius:var(--r-sm);
    background:color-mix(in srgb,var(--metric-tone) 10%,#fff);color:var(--metric-tone)}
  .home-metrics .metric-card-icon svg{width:20px;height:20px}
  .home-dashboard{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:var(--s4);align-items:stretch}
  .home-panel{min-width:0;padding:20px;background:var(--panel);border:1px solid var(--line);
    border-radius:var(--r-md);box-shadow:var(--sh-1)}
  .home-panel>.between:first-child{min-height:30px}
  .home-panel>.between:first-child h3{font-size:16px;line-height:1.25;font-weight:600;letter-spacing:-.015em}
  .home-health{grid-column:span 7}
  .home-writes{grid-column:span 5}
  .home-overview-card{grid-column:span 5}
  .home-top-queries{grid-column:span 7}
  .home-lookups{grid-column:span 7}
  .home-usage{grid-column:span 5}
  .home-leaderboard-identity{display:flex;align-items:center;gap:9px;min-width:0}
  .home-avatar{position:relative;width:30px;height:30px;display:grid;place-items:center;flex:none;overflow:hidden;border:1px solid rgb(var(--evergreen-rgb)/14%);
    border-radius:var(--r-sm);font:600 10px var(--font-mono);letter-spacing:.04em;color:var(--evergreen);background:var(--sage-soft)}
  .home-avatar__image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
  .home-avatar__image[hidden]{display:none}
  .home-avatar svg{width:15px;height:15px}
  .home-avatar--team{background:#f4f6ef}
  .home-avatar--agent{color:var(--slate);background:rgb(91 107 130/9%);border-color:rgb(91 107 130/16%)}
  .home-card-body>div{min-width:0}
  .home-card-foot{margin-top:var(--s3);padding-top:var(--s3);border-top:1px solid var(--line)}
  .home-card-foot--full{margin-top:auto}
  .home-card-foot .btn[aria-label]{min-width:30px;min-height:30px;width:30px;height:30px;padding:0}
  .home-range-control{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);
    border-radius:var(--r-pill);background:var(--mineral);box-shadow:inset 0 1px 2px rgb(15 24 16/4%)}
  .home-range-control .home-range-option{min-height:30px;padding:5px 12px;border:0;border-radius:var(--r-pill);
    background:transparent;color:var(--muted);box-shadow:none;font-size:12px;white-space:nowrap}
  .home-range-control .home-range-option:hover{background:var(--panel);color:var(--evergreen)}
  .home-range-control .home-range-option.is-active{background:var(--evergreen);color:var(--mineral);
    box-shadow:0 2px 5px rgb(var(--evergreen-rgb)/18%)}
  .home-health,.home-writes,.home-overview-card,.home-top-queries{display:flex;flex-direction:column}
  .home-health-scoreline{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s3);margin-top:var(--s3)}
  .home-health-scoreline .home-score{font-size:30px;line-height:1}
  .home-health-meter{display:grid;gap:var(--s2);margin-top:var(--s2)}
  .home-health-meter-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s3);flex-wrap:wrap}
  .home-health-meter-score{display:inline-flex;align-items:baseline;gap:var(--s2)}
  .home-health-meter-score .home-score{font-size:30px;line-height:1}
  .home-health-trend{margin-left:auto;white-space:nowrap}
  .home-health-track{height:10px;overflow:hidden;border:1px solid rgb(var(--evergreen-rgb)/12%);
    border-radius:var(--r-pill);background:var(--mineral)}
  .home-health-fill{display:block;width:var(--home-health-progress);height:100%;border-radius:inherit;
    background:var(--evergreen);transition:width .24s var(--ease)}
  .home-health-trend{font:500 11px var(--font-mono);white-space:nowrap}
  .home-health-trend--up{color:var(--ok)}
  .home-health-trend--down{color:var(--rust)}
  .home-factor-list{display:grid;margin-top:var(--s4);border-top:1px solid var(--line)}
  .home-factor-row{padding:var(--s3) 0;border-bottom:1px solid var(--line)}
  .home-factor-head{display:flex;align-items:center;justify-content:space-between;gap:var(--s3)}
  .home-factor-title{display:flex;align-items:center;gap:7px;min-width:0;font-size:13px}
  .home-factor-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .home-factor-weight{padding:2px 6px;border-radius:var(--r-pill);background:var(--sage-soft);color:var(--evergreen);
    font:600 9px var(--font-mono);letter-spacing:.05em}
  .home-factor-value{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex:none;font-size:12px}
  .home-factor-value .tag{padding:2px 6px;border-radius:var(--r-pill);background:var(--mineral);color:var(--muted);
    font:500 9px var(--font-mono);text-transform:uppercase;letter-spacing:.05em}
  .home-factor-chart{margin-top:9px}
  .home-factor-track{position:relative;height:8px;overflow:hidden;border-radius:var(--r-pill);background:var(--line-soft,var(--line))}
  .home-factor-track>span{position:absolute;inset:0 auto 0 0;border-radius:inherit;background:var(--evergreen)}
  .home-factor-track i{position:absolute;z-index:1;top:0;bottom:0;width:1px;background:rgb(255 255 255/72%)}
  .home-factor-track i:nth-of-type(1){left:25%}
  .home-factor-track i:nth-of-type(2){left:50%}
  .home-factor-track i:nth-of-type(3){left:75%}
  .home-writes-body{display:grid;grid-template-columns:minmax(120px,42%) 1fr;align-items:center;gap:var(--s4);margin:auto 0;padding:var(--s5) 0}
  .home-writes-donut{position:relative;width:min(100%,180px);aspect-ratio:1;margin:auto}
  .home-writes-donut svg{display:block;width:100%;height:100%;transform:rotate(-90deg)}
  .home-writes-track{stroke:var(--mineral)}
  .home-writes-segment{stroke-linecap:butt;cursor:default}
  .home-writes-segment--1{stroke:var(--evergreen)}
  .home-writes-segment--2{stroke:var(--olive)}
  .home-writes-segment--3{stroke:var(--slate)}
  .home-writes-segment--4{stroke:var(--gold)}
  .home-writes-center{position:absolute;inset:27%;display:flex;flex-direction:column;align-items:center;justify-content:center;
    z-index:1;border-radius:50%;background:var(--panel);text-align:center;box-shadow:0 0 0 1px var(--line);pointer-events:none}
  .home-writes-center strong{font-size:25px;line-height:1}
  .home-writes-center span{margin-top:4px;color:var(--muted);font:500 9px var(--font-mono);text-transform:uppercase;letter-spacing:.05em}
  .home-writes-tooltip{position:absolute;z-index:2;top:50%;left:50%;display:grid;gap:4px;width:max-content;max-width:160px;
    padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--panel);box-shadow:var(--sh-3);
    opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,-44%) scale(.98);
    transition:opacity .12s var(--ease),transform .12s var(--ease),visibility .12s var(--ease);text-align:left}
  .home-writes-tooltip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.25}
  .home-writes-tooltip span{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:11px;line-height:1.2;white-space:nowrap}
  .home-writes-tooltip b{color:var(--ink);font-weight:650}
  .home-writes-tooltip i{font-style:normal;color:var(--muted-2)}
  .home-writes-donut:has(.home-writes-segment--1:hover) .home-writes-tooltip--1,
  .home-writes-donut:has(.home-writes-segment--2:hover) .home-writes-tooltip--2,
  .home-writes-donut:has(.home-writes-segment--3:hover) .home-writes-tooltip--3,
  .home-writes-donut:has(.home-writes-segment--4:hover) .home-writes-tooltip--4,
  .home-writes-body:has(.home-writes-legend-row--1:hover) .home-writes-tooltip--1,
  .home-writes-body:has(.home-writes-legend-row--2:hover) .home-writes-tooltip--2,
  .home-writes-body:has(.home-writes-legend-row--3:hover) .home-writes-tooltip--3,
  .home-writes-body:has(.home-writes-legend-row--4:hover) .home-writes-tooltip--4,
  .home-writes-body:has(.home-writes-legend-row--1:focus-visible) .home-writes-tooltip--1,
  .home-writes-body:has(.home-writes-legend-row--2:focus-visible) .home-writes-tooltip--2,
  .home-writes-body:has(.home-writes-legend-row--3:focus-visible) .home-writes-tooltip--3,
  .home-writes-body:has(.home-writes-legend-row--4:focus-visible) .home-writes-tooltip--4{
    opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
  .home-writes-legend{display:grid;gap:var(--s2);min-width:0}
  .home-writes-legend-row{display:grid;grid-template-columns:24px 8px minmax(0,1fr) auto auto;align-items:center;gap:7px;min-width:0}
  .home-writes-legend-row:focus-visible{outline:2px solid var(--evergreen);outline-offset:2px}
  .home-writes-legend-row .home-avatar{width:24px;height:24px;border-radius:7px}
  .home-writes-legend-row .home-avatar svg{width:12px;height:12px}
  .home-writes-dot{width:8px;height:8px;border-radius:50%}
  .home-writes-dot--1{background:var(--evergreen)}
  .home-writes-dot--2{background:var(--olive)}
  .home-writes-dot--3{background:var(--slate)}
  .home-writes-dot--4{background:var(--gold)}
  .home-writes-team{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
  .home-card-empty{display:grid;place-items:center;min-height:180px;margin:var(--s4) 0;padding:var(--s4);border:1px dashed var(--line);
    border-radius:var(--r-sm);color:var(--muted);font-size:13px;text-align:center}
  .home-overview-list{display:grid;margin-top:var(--s3)}
  .home-overview-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:48px;
    border-bottom:1px solid var(--line);font-size:13px}
  .home-overview-row:last-child{border-bottom:0}
  .home-overview-row-icon{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--line);border-radius:var(--r-sm);
    background:var(--mineral);color:var(--evergreen)}
  .home-overview-row-icon svg{width:15px;height:15px}
  .home-overview-row strong{font-size:16px}
  .home-top-queries-head{align-items:flex-start!important}
  .home-query-filter-wrap{position:relative;flex:none}
  .home-query-filter-button{gap:6px;min-width:30px;justify-content:center}
  .home-query-filter-button svg{width:14px;height:14px}
  .home-query-filter-menu{position:absolute;z-index:20;top:calc(100% + 6px);right:0;min-width:150px;padding:5px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--panel);box-shadow:var(--sh-4)}
  .home-query-filter-menu[hidden]{display:none}
  .home-query-filter-option{all:unset;box-sizing:border-box;width:100%;min-height:34px;padding:7px 9px;display:flex;align-items:center;
    justify-content:space-between;gap:var(--s3);border-radius:7px;color:var(--ink);font-size:12px;cursor:pointer}
  .home-query-filter-option:hover,.home-query-filter-option:focus-visible{background:var(--sage-soft);color:var(--evergreen)}
  .home-health .compact-disclosure{border-radius:var(--r-sm)}
  .home-health-trigger{all:unset;box-sizing:border-box;width:100%;min-height:44px;margin-top:var(--s3);
    padding:10px var(--s4);display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral);color:var(--evergreen);
    font:500 14px var(--font-cta);cursor:pointer;transition:background .12s var(--ease),border-color .12s var(--ease)}
  .home-health-trigger:hover{border-color:var(--olive);background:var(--sage-soft)}
  .home-health-trigger:focus-visible{box-shadow:var(--focus)}
  .home-health-trigger svg{width:16px;height:16px;flex:none}
  .home-health-trigger-icon{width:30px;height:30px;display:grid;place-items:center;flex:none;
    border:1px solid rgb(var(--evergreen-rgb)/20%);border-radius:var(--r-pill);background:var(--panel)}
  .home-health-drawer{box-sizing:border-box;position:fixed;inset:0 0 0 auto;width:min(480px,100vw);max-width:none;height:100dvh;max-height:none;
    margin:0;padding:0;border:0;border-left:1px solid var(--line);background:var(--panel);color:var(--ink);
    box-shadow:-24px 0 72px -38px rgb(5 11 10/60%);overflow:hidden}
  .home-health-drawer[open]{display:flex;flex-direction:column;animation:home-drawer-in .18s var(--ease-enter)}
  .home-health-drawer::backdrop{background:rgb(5 11 10/38%);backdrop-filter:blur(2px)}
  .home-health-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s4);
    padding:var(--s5);border-bottom:1px solid var(--line);background:var(--panel)}
  .home-health-drawer-head h2{font-size:22px;line-height:1.2;letter-spacing:-.02em}
  .home-health-drawer-head p{margin:6px 0 0;color:var(--muted);font-size:var(--text-small);line-height:1.5}
  .home-health-drawer-close{all:unset;box-sizing:border-box;width:36px;height:36px;display:grid;place-items:center;flex:none;
    border:1px solid var(--line);border-radius:var(--r-xs);background:var(--mineral);color:var(--evergreen);cursor:pointer}
  .home-health-drawer-close:hover{border-color:var(--olive);background:var(--sage-soft)}
  .home-health-drawer-close:focus-visible{box-shadow:var(--focus)}
  .home-health-drawer-close svg{width:17px;height:17px}
  .home-health-drawer-body{min-height:0;overflow-y:auto;overflow-x:hidden;padding:var(--s5)}
  .home-health-drawer-summary{display:flex;align-items:baseline;gap:var(--s2);margin-bottom:var(--s5);
    padding:var(--s4);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
  .home-health-drawer-summary .home-score{font-size:34px}
  .home-health-drawer-list{display:grid;gap:var(--s4)}
  .home-health-drawer-list>.row{padding-bottom:var(--s4);border-bottom:1px solid var(--line)}
  .home-health-drawer-list>.row:last-child{padding-bottom:0;border-bottom:0}
  .home-health-drawer-list .home-text-xs{overflow:visible!important;text-overflow:clip!important;white-space:normal!important}
  @keyframes home-drawer-in{from{opacity:.75;transform:translateX(22px)}to{opacity:1;transform:none}}
  @media(prefers-reduced-motion:reduce){.home-health-drawer[open]{animation:none}}
  .home-usage{display:flex;flex-direction:column}
  .home-usage .btn--outline{white-space:normal;text-align:center}
  .home-usage-head{gap:var(--s3)}
  .home-usage-head h3{display:flex;align-items:center;gap:7px;min-width:0}
  .home-usage-main{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:var(--s3);margin-top:var(--s3)}
  .home-usage-amount{display:grid;justify-items:center;gap:4px;text-align:center}
  .home-usage-label{color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
  .home-usage-amount .num{font-size:28px;line-height:1;letter-spacing:-.025em}
  .home-cap-ring{--home-cap-ring-tone:var(--evergreen);position:relative;width:min(100%,190px);aspect-ratio:1;display:grid;place-items:center;flex:none}
  .home-cap-ring--warn{--home-cap-ring-tone:var(--gold)}
  .home-cap-ring--crit{--home-cap-ring-tone:var(--rust)}
  .home-cap-ring svg{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;transform:rotate(-90deg)}
  .home-cap-ring circle{fill:none;stroke-width:22}
  .home-cap-ring-track{stroke:var(--line-soft,var(--line))}
  .home-cap-ring-fill{stroke:var(--home-cap-ring-tone);stroke-linecap:round}
  .home-cap-ring-value{position:relative;z-index:1;display:grid;place-items:center;color:var(--ink);text-align:center}
  .home-cap-ring-value strong{font-size:32px;font-weight:650;line-height:1;letter-spacing:-.02em}
  .home-cap-ring-value span{margin-top:5px;color:var(--muted);font-size:12px;line-height:1.35}
  .home-usage-footer{margin-top:auto;padding-top:var(--s5)}
  .home-cap-summary{display:flex;align-items:center;justify-content:flex-end;gap:var(--s3);padding-top:var(--s4);border-top:1px solid var(--line)}
  .home-cap-editor{display:grid;grid-template-columns:minmax(150px,1fr) auto auto;align-items:end;gap:var(--s3);padding-top:var(--s4);border-top:1px solid var(--line)}
  .home-cap-editor[hidden],.home-cap-summary[hidden]{display:none}
  .home-cap-field{min-width:0}
  .home-cap-field label{display:block;margin-bottom:6px}
  .home-cap-field .input{width:100%;min-width:0}
  .home-cap-status{align-self:center;max-width:180px;line-height:1.35}
  .home-cap-actions{display:flex;align-items:center;gap:var(--s2)}
  @media(max-width:1180px){
    .home-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
    .home-health,.home-writes,.home-overview-card,.home-top-queries{grid-column:span 6}
    .home-lookups,.home-usage{grid-column:span 6}
  }
  @media(max-width:960px){
    .home-dashboard{grid-template-columns:1fr}
    .home-health,.home-writes,.home-overview-card,.home-top-queries,.home-lookups,.home-usage{grid-column:1}
  }
  @media(max-width:860px){
    .home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
    .home-cap-editor{grid-template-columns:1fr}
    .home-cap-status{max-width:none}
    .home-cap-actions{justify-content:flex-end}
  }
  @media(max-width:560px){
    .home-metrics{grid-template-columns:1fr}
    .home-metrics .metric-card{min-height:108px}
    .home-panel{padding:var(--s4)}
    .home-range-control{width:100%;overflow-x:auto}
    .home-range-control .home-range-option{flex:1}
    .home-factor-head{align-items:flex-start;flex-direction:column;gap:7px}
    .home-factor-value{width:100%;justify-content:flex-start}
    .home-writes-body{grid-template-columns:1fr}
  }

  /* Home visual contract: prototype composition in the Halofy mineral /
     evergreen product language. */
  body:has(.home-overview) .stage{--s7:40px;padding-bottom:64px;background:var(--canvas)}
  body:has(.home-overview) #screen-content{width:100%;max-width:1160px}
  .home-overview{--home-canvas:var(--surface-soft);--home-panel:var(--panel);--home-border:var(--line);--home-text:var(--ink);
    --home-muted:var(--muted);--home-faint:var(--muted-2);--home-soft:var(--sage-soft);--home-green:var(--evergreen);
    color:var(--home-text);font-family:var(--font-body)}
  .home-overview>.screen-flow{gap:18px}
  .home-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
  .home-head-copy{display:flex;flex-direction:column;gap:4px}
  .home-breadcrumb{color:var(--home-muted);font-size:12px;font-weight:600;letter-spacing:.02em}
  .home-head h1{margin:0;color:var(--home-text);font-size:var(--text-h1);font-weight:500;line-height:1.08;letter-spacing:-.025em}
  .home-head-actions{display:flex;align-items:center;gap:10px}
  .home-range-control{gap:2px;padding:3px;border:1px solid #dfe3e7;border-radius:var(--r-md);background:var(--neutral-soft);box-shadow:none}
  .home-range-control .home-range-option{min-height:0;padding:6px 14px;border:0;border-radius:8px;background:transparent;
    color:#6b7280;font:500 13px/1.2 var(--font-cta)}
  .home-range-control .home-range-option:hover{background:#e5e7eb;color:#374151}
  .home-range-control .home-range-option.is-active{background:var(--home-panel);color:var(--home-text);box-shadow:0 1px 2px rgb(16 24 40/8%)}

  .home-metrics{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
  .home-metrics .metric-card{min-height:0;padding:18px;gap:14px;border:1px solid var(--home-border);border-radius:var(--r-md);
    background:var(--home-panel);box-shadow:var(--sh-1),var(--sh-2)}
  .home-metrics .metric-card-head{min-height:30px;align-items:center;justify-content:flex-start;gap:9px}
  .home-metrics .metric-card-label{display:block;flex:1;min-width:0}
  .home-metrics .metric-card .k{color:var(--home-muted);font-family:var(--font-mono);font-size:var(--text-label);
    font-weight:500;line-height:1.25;letter-spacing:.12em;text-transform:uppercase}
  .home-metrics .metric-card-icon{position:static;width:28px;height:28px;flex:none;transform:none;border:1px solid rgb(var(--evergreen-rgb)/12%);
    border-radius:var(--r-sm);background:var(--home-soft);color:var(--metric-tone)}
  .home-metrics .metric-card-icon svg{width:14px;height:14px}
  .home-metrics .metric-card .metric-info{margin-left:auto;color:var(--home-faint)}
  .home-metrics .metric-card .metric-info:hover,.home-metrics .metric-card .metric-info:focus-visible{color:var(--home-green)}
  .home-metrics .metric-card .metric-info::after{top:calc(100% + 8px);right:-8px;bottom:auto;left:auto;width:max-content;
    max-width:240px;padding:6px 10px;border-radius:var(--r-sm);background:var(--ink);color:#f3f6ee;
    box-shadow:var(--sh-3);font:500 11px/1.4 var(--font-body);
    transform:translateY(-4px)}
  .home-metrics .metric-card .metric-info::before{display:none}
  .home-metrics .metric-card .metric-info:hover::after,.home-metrics .metric-card .metric-info:focus-visible::after{transform:none}
  .home-metrics .metric-card-shell{display:flex;flex:1;flex-direction:column;justify-content:center;gap:10px;padding:12px 14px;
    border:1px solid var(--home-border);border-radius:var(--r-md);background:var(--home-canvas);box-shadow:var(--sh-1)}
  .home-metrics .metric-card .v{margin:0;padding:0;color:var(--home-text);font-size:26px;font-weight:600;line-height:1;letter-spacing:-.02em}

  .home-dashboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}
  .home-health,.home-writes,.home-overview-card,.home-top-queries,.home-lookups,.home-usage{grid-column:auto}
  .home-panel{min-width:0;padding:20px;border:1px solid var(--home-border);border-radius:var(--r-lg);background:var(--home-panel);
    box-shadow:var(--sh-1),var(--sh-2)}
  .home-panel>.home-panel-head:first-child{min-height:0;padding:0 4px 14px}
  .home-panel>.home-panel-head:first-child h3{margin:0;color:var(--home-text);font-size:15px;font-weight:600;line-height:1.25;letter-spacing:-.01em}
  .home-panel-meta{color:var(--home-faint);font-size:12px;font-weight:500;white-space:nowrap}
  .home-panel-head-actions{display:flex;align-items:center;gap:8px}
  .home-overview .pill{padding:3px 10px;border-radius:var(--r-pill);font-family:var(--font-mono);font-size:11px;
    font-weight:500;line-height:1.2;letter-spacing:.1em;text-transform:uppercase}
  .home-card-foot{margin-top:14px;padding:12px 4px 0;border-top:1px solid var(--home-border)}
  .home-card-link{width:100%;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;
    border:1px solid var(--home-border);border-radius:var(--r-sm);background:var(--home-panel);color:var(--home-text);
    font:500 13px/1.2 var(--font-cta);cursor:pointer}
  .home-card-link:hover{background:var(--home-soft);color:var(--home-green)}
  .home-card-link:focus-visible{outline:none;box-shadow:var(--focus)}
  .home-card-link svg{width:14px;height:14px;flex:none;color:var(--home-faint)}

  .home-health-scoreline{margin-top:0;padding:0 4px 4px}
  .home-health-scoreline .home-score{font-size:34px;font-weight:650;letter-spacing:-.02em}
  .home-health-trend{font-family:var(--font-body);font-size:12px;font-weight:600}
  .home-health-meter{display:none}
  .home-factor-list{gap:18px;margin-top:0;padding:10px 4px 0;border:0}
  .home-factor-row{padding:0;border:0}
  .home-factor-title{gap:7px;font-size:12.5px;font-weight:600}
  .home-factor-title b{font-weight:600}
  .home-factor-title .pill{padding:2px 7px;font-size:10px}
  .home-factor-value{gap:4px;color:var(--home-text);font-size:12px}
  .home-factor-value .num{font-weight:650}
  .home-factor-chart{margin-top:6px}
  .home-factor-track{height:8px;background:var(--home-soft)}
  .home-factor-track>span{background:var(--home-green)}
  .home-factor-track i{display:none}
  .home-writes-body{grid-template-columns:210px minmax(0,1fr);gap:28px;margin:auto 0;padding:4px 4px 0}
  .home-writes-donut{width:210px;height:210px}
  .home-writes-track{stroke:var(--home-soft)}
  .home-writes-segment{stroke-width:22;transition:stroke-width .15s,filter .15s}
  .home-writes-segment:hover,
  .home-writes-body:has(.home-writes-legend-row--1:hover) .home-writes-segment--1,
  .home-writes-body:has(.home-writes-legend-row--2:hover) .home-writes-segment--2,
  .home-writes-body:has(.home-writes-legend-row--3:hover) .home-writes-segment--3,
  .home-writes-body:has(.home-writes-legend-row--4:hover) .home-writes-segment--4,
  .home-writes-body:has(.home-writes-legend-row--1:focus-visible) .home-writes-segment--1,
  .home-writes-body:has(.home-writes-legend-row--2:focus-visible) .home-writes-segment--2,
  .home-writes-body:has(.home-writes-legend-row--3:focus-visible) .home-writes-segment--3,
  .home-writes-body:has(.home-writes-legend-row--4:focus-visible) .home-writes-segment--4{
    stroke-width:30;outline:none;filter:drop-shadow(0 1px 2px rgb(15 61 46/22%))}
  .home-writes-segment--1{stroke:#0f3d2e}.home-writes-segment--2{stroke:#2e6b52}
  .home-writes-segment--3{stroke:#5d9b7c}.home-writes-segment--4{stroke:#a9c18c}
  .home-writes-center{inset:0;background:transparent;box-shadow:none}
  .home-writes-center strong{font-size:32px;font-weight:650;letter-spacing:-.02em}
  .home-writes-center span{max-width:120px;margin-top:5px;color:var(--home-muted);font:400 12px/1.35 var(--font-body);text-transform:none;letter-spacing:0}
  .home-writes-legend{gap:6px}
  .home-writes-legend-row{grid-template-columns:10px minmax(0,1fr) auto auto;gap:10px;padding:9px 12px;
    border:1px solid var(--home-border);border-radius:var(--r-md);background:var(--home-canvas);
    transition:border-color .15s var(--ease),background .15s var(--ease),box-shadow .15s var(--ease),transform .15s var(--ease)}
  .home-writes-legend-row:hover{border-color:var(--olive);background:var(--home-panel);box-shadow:var(--sh-2);transform:translateY(-1px)}
  .home-writes-dot{width:10px;height:10px;border-radius:3px}
  .home-writes-dot--1{background:#0f3d2e}.home-writes-dot--2{background:#2e6b52}
  .home-writes-dot--3{background:#5d9b7c}.home-writes-dot--4{background:#a9c18c}
  .home-writes-team{font-size:13px;font-weight:500}
  .home-writes-legend-row>.num{color:var(--home-faint);font-size:12px;font-weight:400}
  .home-writes-legend-row>.home-text-xs{color:var(--home-text);font-size:13px;font-weight:600}

  .home-overview-list{gap:8px;margin-top:0;padding:0 4px}
  .home-overview-row{grid-template-columns:30px minmax(0,1fr) auto;gap:10px;min-height:0;padding:10px 12px;
    border:1px solid var(--home-border)!important;border-radius:var(--r-md);background:var(--home-canvas);
    box-shadow:var(--sh-1);font-size:14px;font-weight:500}
  .home-overview-row-icon{width:30px;height:30px;border:0;border-radius:var(--r-sm);background:var(--home-soft);color:var(--home-green)}
  .home-overview-row strong{font-size:14px;font-weight:600}

  .home-query-filter-button{width:30px;height:30px;padding:0;display:grid;place-items:center;border:1px solid var(--home-border);
    border-radius:var(--r-sm);background:var(--home-panel);color:var(--home-muted);cursor:pointer}
  .home-query-filter-button:hover{background:var(--home-soft);color:var(--home-green)}
  .home-query-filter-button:focus-visible{outline:none;box-shadow:var(--focus)}
  .home-query-filter-button svg{width:14px;height:14px}
  .home-query-filter-menu{top:calc(100% + 6px);padding:5px;border-color:var(--home-border);border-radius:var(--r-md);
    background:var(--home-panel);box-shadow:var(--sh-3)}
  .home-top-queries .home-card-body{gap:8px!important;margin-top:0!important;padding:0 4px}
  .home-top-queries .home-card-body>div{padding:10px 12px;border:1px solid var(--home-border);border-radius:var(--r-md);
    background:var(--home-canvas);box-shadow:var(--sh-1)}
  .home-top-queries .home-card-body>div>div:last-child{display:none}
  .home-top-queries .home-card-foot .btn{width:28px;height:28px;min-width:28px;min-height:28px;border:1px solid var(--home-border);
    border-radius:var(--r-sm);background:var(--home-panel);color:var(--home-muted)}

  .home-lookups{display:flex;flex-direction:column}
  .home-lookups .home-card-body{display:flex;flex:1;flex-direction:column;min-height:0}
  .home-lookup-pills{display:flex;flex-wrap:nowrap;gap:8px;padding:0 4px;overflow-x:auto;
    overscroll-behavior-inline:contain;scrollbar-width:thin}
  .home-lookup-pills .pill{flex:0 0 auto;padding:4px 9px;border-radius:8px;white-space:nowrap;
    letter-spacing:0;text-transform:none}
  .home-recent-queries-label{padding:14px 4px 8px;color:var(--home-faint);font-size:11.5px;font-weight:600}
  .home-recent-queries{display:flex;flex:1;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:12px;padding:0 4px}
  .home-query-bubble{max-width:100%;padding:7px 12px;display:inline-flex;align-items:center;gap:8px;
    border:1px solid var(--home-border);border-radius:14px 14px 14px 4px;background:var(--home-canvas);font-size:12.5px;line-height:1.45}
  .home-query-bubble>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .home-query-bubble-copy{display:grid;gap:1px}
  .home-query-bubble-label{color:var(--home-muted);font:500 10px var(--font-mono);letter-spacing:.12em;text-transform:uppercase}
  .home-query-bubble-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .home-lookups-empty{margin-top:14px;padding:0 4px}
  .home-lookups .home-card-foot{margin-top:18px}
  .home-lookups .home-card-link{width:auto;padding:6px 12px;border-radius:8px;font-size:12.5px}
  .home-lookups .home-card-link svg{display:none}

  .home-usage-main{margin-top:0;padding:0 4px}
  .home-usage-amount .num{font-size:26px;font-weight:650;letter-spacing:-.02em}
  .home-cap-ring{width:min(100%,190px)}
  .home-cap-ring-track{stroke:var(--home-soft)}
  .home-cap-ring-value{color:var(--home-text)}
  .home-usage-footer{padding-top:14px}
  .home-cap-summary{padding:12px 4px 0;border-top:1px solid var(--home-border)}
  .home-cap-summary .btn{min-height:0;padding:6px 12px;border:1px solid var(--home-border);border-radius:var(--r-sm);
    background:var(--home-panel);color:var(--home-text);font:500 12.5px/1.2 var(--font-cta)}
  .home-cap-editor{border-top-color:var(--home-border)}
  .home-cap-editor .btn--solid{background:var(--home-green);color:#f3f6ee;border-radius:var(--r-sm)}

  @media(max-width:1180px){
    .home-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  }
  @media(max-width:960px){
    .home-dashboard{grid-template-columns:1fr}
    .home-health,.home-writes,.home-overview-card,.home-top-queries,.home-lookups,.home-usage{grid-column:1}
  }
  @media(max-width:760px){
    .home-head{align-items:flex-start;flex-direction:column}
    .home-head-actions,.home-range-control{width:100%}
    .home-range-control{overflow-x:auto}
    .home-range-control .home-range-option{flex:1;white-space:nowrap}
    .home-writes-body{grid-template-columns:1fr}
  }
  @media(max-width:620px){
    .home-metrics{grid-template-columns:1fr}
    .home-panel{padding:16px}
  }
  @media(max-width:860px){
    .head{min-height:0;align-items:flex-start;flex-direction:column}
    .head .acts{width:100%;flex-wrap:wrap}
    .memory-scope-trigger{min-height:44px}
  }
  @media(max-width:640px){.g4{grid-template-columns:1fr}}

  /* Normal-zoom desktop density. This keeps the 1249px-wide browser view at
     the same useful information density as the previous 80% zoomed view,
     without scaling the document or weakening mobile touch targets. */
  @media(min-width:861px) and (max-width:1400px){
    .app{grid-template-columns:200px minmax(0,1fr)}
    .rail{padding:10px 8px}
    .brand{gap:8px;padding:0 6px 7px}
    .brand .mark{width:24px;height:24px}
    .brand b{font-size:14px;line-height:14px}
    .rail-collapse{width:24px;height:24px}
    .navgroup{min-height:27px;padding:4px 7px;font-size:10px;line-height:13px}
    .navgroup-icon{width:14px;height:14px}
    .nav button{min-height:25px;gap:8px;padding:4px 7px;font-size:12px;line-height:17px}
    .nav button svg{width:14px;height:14px}
    .rail-help{min-height:120px;padding:10px}
    .rail-help__copy h2{font-size:13px;line-height:17px}
    .rail-help__copy p{margin-bottom:6px;font-size:10px;line-height:14px}
    .rail-help__links{gap:4px}
    .rail-help__action{min-height:28px;padding:5px 7px;font-size:10px;line-height:15px}
    .stage{padding-right:32px;padding-left:32px;padding-bottom:26px}
    .workspace-bar{min-height:48px;margin:0 -32px 20px;padding:0 32px}
    .workspace-search{min-height:30px;padding:5px 9px;font-size:12px}
    .workspace-notification-trigger{width:28px;height:28px}
    .workspace-account-trigger{width:160px;max-width:160px;height:32px;padding:2px 8px 2px 3px;gap:7px}
    .workspace-account-trigger .av{width:26px;height:26px;font-size:10px}
    .workspace-account-copy>span{font-size:10.5px}
    .workspace-account-copy>small{font-size:8.5px}
    body:has(.home-overview) .stage{--s7:32px;padding-bottom:52px}
  }

  @media(min-width:1181px) and (max-width:1400px){
    .home-overview>.screen-flow{gap:14px}
    .home-head{gap:12px}
    .home-head-copy{gap:3px}
    .home-head h1{font-size:var(--text-h1)}
    .home-range-control .home-range-option{padding:5px 11px;font-size:13px}
    .home-metrics{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
    .home-metrics .metric-card{padding:14px;gap:10px;border-radius:var(--r-md)}
    .home-metrics .metric-card-head{min-height:24px;gap:7px}
    .home-metrics .metric-card .k{font-size:var(--text-label)}
    .home-metrics .metric-card-icon{width:24px;height:24px;border-radius:7px}
    .home-metrics .metric-card-icon svg{width:13px;height:13px}
    .home-metrics .metric-card .metric-info{width:14px;height:14px}
    .home-metrics .metric-card-shell{gap:8px;padding:10px 11px;border-radius:10px}
    .home-metrics .metric-card .v{font-size:21px;white-space:nowrap;overflow-wrap:normal}
    .home-dashboard{gap:14px}
    .home-panel{padding:16px;border-radius:12px}
    .home-panel>.home-panel-head:first-child{padding:0 2px 11px}
    .home-panel>.home-panel-head:first-child h3{font-size:13px}
    .home-panel-meta{font-size:10px}
    .home-overview .pill{padding:2px 8px;font-size:10px}
    .home-card-foot{margin-top:11px;padding:10px 2px 0}
    .home-card-link{padding:8px 10px;border-radius:8px;font-size:11px}
    .home-health-scoreline{padding:0 2px 3px}
    .home-health-scoreline .home-score{font-size:28px}
    .home-factor-list{gap:14px;padding:8px 2px 0}
    .home-factor-title{font-size:11px}
    .home-factor-chart{margin-top:5px}
    .home-writes-body{grid-template-columns:172px minmax(0,1fr);gap:20px;padding:3px 2px 0}
    .home-writes-donut{width:172px;height:172px}
    .home-writes-center strong{font-size:26px}
    .home-writes-center span{font-size:10px}
    .home-writes-legend-row{gap:8px;padding:7px 9px;border-radius:8px}
    .home-writes-team{font-size:11px}
    .home-writes-legend-row>.home-text-xs{font-size:11px}
    .home-overview-list{gap:6px;padding:0 2px}
    .home-overview-row{padding:8px 10px;border-radius:10px;font-size:12px}
    .home-overview-row strong{font-size:12px}
    .home-top-queries .home-card-body{gap:6px!important;padding:0 2px}
    .home-top-queries .home-card-body>div{padding:8px 10px;border-radius:10px}
    .home-lookup-pills,.home-recent-queries,.home-lookups-empty{padding-right:2px;padding-left:2px}
    .home-recent-queries-label{padding:11px 2px 6px;font-size:10px}
    .home-query-bubble{padding:6px 10px;font-size:11px}
    .home-usage-main{padding:0 2px}
    .home-usage-amount .num{font-size:22px}
    .home-cap-ring{width:min(100%,172px)}
    .home-cap-ring-value strong{font-size:26px}
    .home-cap-ring-value span{font-size:10px}
  }

  .auth-shell{min-height:100dvh;display:grid;place-items:stretch;padding:0;
    background:var(--panel);overflow-x:hidden}
  .auth-shell::before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.5;
    background-image:radial-gradient(rgb(18 58 46/12%) .7px,transparent .7px);
    background-size:10px 10px;background-repeat:no-repeat;mask-image:radial-gradient(ellipse at 92% 8%,#000,transparent 44%)}
  .auth-frame{position:relative;z-index:1;display:grid;grid-template-columns:minmax(400px,2fr) minmax(0,3fr);grid-template-areas:"auth story";
    width:100%;min-height:100dvh;border:0;border-radius:0;
    background:var(--panel);overflow:hidden;box-shadow:none}
  /* Keep the established metallic evergreen story on sign-in; authenticated
     shell chrome uses its own neutral metallic-black treatment. */
  .auth-story{grid-area:story;position:relative;isolation:isolate;display:flex;flex-direction:column;min-width:0;padding:38px 42px 34px;
    overflow:hidden;background:var(--metal);background-color:var(--evergreen);color:var(--mineral)}
  .auth-clouds{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none}
  .auth-story::before,.auth-story::after{content:"";position:absolute;border-radius:50%;pointer-events:none}
  .auth-story::before{width:300px;height:300px;right:-170px;top:-160px;border:1px solid rgb(199 215 178/10%)}
  .auth-story::after{display:none}
  .auth-story-brand{position:relative;z-index:1;display:flex;align-items:center;gap:9px}
  .auth-story-brand img{width:20px;height:20px;object-fit:contain}
  .auth-story-brand b{display:block;color:var(--mineral);font:600 17px var(--font-brand);line-height:20px;letter-spacing:-.015em}
  .auth-story-copy{position:relative;z-index:1;margin:0 0 var(--s5)}
  .auth-story-copy h2{max-width:none;margin:0;color:var(--mineral);font-size:clamp(18px,2.16vw,24px);
    line-height:1.03;letter-spacing:-.035em;text-align:center}
  .auth-story-copy h2 span{display:block;white-space:nowrap}

  /* ---- login stream --------------------------------------------------------
     Three lanes of tool marks drift horizontally past a fixed Halo mark: the
     memory layer everything flows through. Each lane holds the SAME chip set
     twice and translates exactly -50%, which lands on the identical frame, so
     the loop is seamless without JavaScript - login.html keeps exactly one
     inline script, the auth flow. Lanes alternate direction and run at
     different speeds so the field never reads as one sliding block. */
  .auth-stream{position:relative;z-index:1;flex:1;min-height:0;display:flex;flex-direction:column;
    justify-content:center;gap:var(--s4);margin:0 -42px;overflow:hidden;
    mask-image:linear-gradient(90deg,transparent,#000 16%,#000 84%,transparent);
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 16%,#000 84%,transparent)}
  .auth-stream-lane{position:relative;display:flex;flex:none;
    border-top:1px solid rgb(199 215 178/8%);border-bottom:1px solid rgb(199 215 178/8%);
    padding:9px 0}
  .auth-stream-belt{display:flex;width:max-content;
    animation:auth-stream-run var(--dur) linear infinite}
  .auth-stream-set{display:flex;align-items:center;gap:var(--gap);padding-right:var(--gap)}
  .auth-stream-lane--edge{--dur:88s;--gap:24px;--chip:46px}
  .auth-stream-lane--main{--dur:68s;--gap:28px;--chip:60px}
  .auth-stream-lane--main .auth-stream-belt{animation-direction:reverse}
  .auth-stream-chip{flex:none;display:grid;place-items:center;width:var(--chip);height:var(--chip);
    border-radius:50%;border:1px solid rgb(199 215 178/16%);
    background:radial-gradient(circle at 32% 26%,#252a26,#0b0d0b 74%);
    box-shadow:0 10px 20px -12px rgb(4 12 9/85%),0 2px 5px -2px rgb(4 12 9/55%),
      inset 0 1px 0 rgb(243 246 238/16%),inset 0 -8px 14px -10px rgb(199 215 178/26%)}
  .auth-stream-chip img{width:42%;height:42%;object-fit:contain;filter:brightness(0) invert(1);opacity:.86}
  /* The lanes run behind the mark; the glow keeps them from crowding it. */
  .auth-stream-glow{position:absolute;left:50%;top:50%;width:270px;height:270px;pointer-events:none;
    transform:translate(-50%,-50%);border-radius:50%;
    background:radial-gradient(circle,rgb(18 58 46/96%) 0%,rgb(18 58 46/78%) 34%,transparent 70%);
    animation:auth-stream-breathe 9s var(--ease) infinite}
  .auth-stream-core{position:absolute;left:50%;top:50%;width:92px;height:92px;
    transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:50%;
    border:1px solid rgb(199 215 178/28%);background:radial-gradient(circle at 34% 26%,#252a26,#0b0d0b 74%);
    box-shadow:0 22px 48px -18px rgb(4 12 9/90%),0 0 0 10px rgb(199 215 178/5%),
      0 0 46px rgb(199 215 178/18%),inset 0 1px 0 rgb(243 246 238/26%)}
  .auth-stream-core img{width:52%;height:52%;object-fit:contain}
  @keyframes auth-stream-run{to{transform:translateX(var(--auth-stream-shift,-50%))}}
  @keyframes auth-stream-breathe{
    0%,100%{opacity:.86;transform:translate(-50%,-50%) scale(.97)}
    50%{opacity:1;transform:translate(-50%,-50%) scale(1.04)}}
  @media(prefers-reduced-motion:reduce){
    .auth-stream-belt,.auth-stream-glow{animation:none}
  }

  .auth-card{grid-area:auth;display:flex;flex-direction:column;justify-content:center;align-self:center;justify-self:center;
    width:min(420px,calc(100% - 48px));max-width:420px;min-height:0;padding:var(--s5);
    border:1px solid var(--line);border-radius:var(--r-lg);background:#fff;box-shadow:var(--sh-4)}
  .auth-brand{border-bottom:1px solid var(--line);padding:0 0 var(--s4);margin:0 0 var(--s5)}
  .auth-brand b{color:var(--ink)}
  .auth-brand small{color:var(--muted-2)}
  .auth-card h1:focus{outline:none}
  .auth-card > h1{font-size:30px;margin-bottom:var(--s2)}
  .auth-form{display:grid;gap:var(--s3)}
  .auth-form .field{margin-bottom:0}
  .auth-error{color:var(--rust);display:none;margin:0}
  .auth-submit{width:100%;justify-content:center}
  /* Sign-in controls are the widest, most-clicked targets on the platform, so
     they run one size up from the in-app primitives: 48px rows, the card
     radius instead of the pill, and a lift on hover. */
  .auth-card .input{min-height:46px;border-radius:var(--r-md);padding:12px 14px;font-size:14.5px;
    background:color-mix(in srgb,var(--panel) 84%,var(--sage-soft));
    box-shadow:inset 0 1px 2px rgb(15 24 16/5%);
    transition:border-color .12s var(--ease),box-shadow .12s var(--ease),background .12s var(--ease)}
  .auth-card .input:hover:not(:focus){border-color:rgb(var(--evergreen-rgb)/32%)}
  .auth-card .input:focus{background:var(--panel);box-shadow:var(--focus),inset 0 1px 2px rgb(15 24 16/5%)}
  .auth-card .auth-submit{min-height:48px;border-radius:var(--r-md);font-size:14.5px}
  /* Metallic black, the same shell finish as the rail and the workspace bar, so
     every sign-in CTA reads as Halofy chrome rather than an in-page evergreen
     action. Hover and active wash the shared token instead of restating the
     ramp, so the rail and these buttons can never drift apart. */
  .auth-card .btn--solid,.auth-card .btn--primary{border-color:transparent;
    color:var(--dl-rail-ink);
    background:var(--dl-rail-metal);background-color:var(--dl-rail);
    box-shadow:inset 0 1px 0 rgb(255 255 255/16%),inset 0 -1px 0 rgb(0 0 0/38%),
      0 1px 2px rgb(5 6 7/22%),0 12px 24px -14px rgb(5 6 7/72%)}
  .auth-card .btn--solid:hover,.auth-card .btn--primary:hover{transform:translateY(-1px);
    background:linear-gradient(rgb(255 255 255/10%),rgb(255 255 255/10%)),var(--dl-rail-metal);
    background-color:var(--dl-rail);
    box-shadow:inset 0 1px 0 rgb(255 255 255/22%),inset 0 -1px 0 rgb(0 0 0/38%),
      0 2px 4px rgb(5 6 7/24%),0 18px 34px -16px rgb(5 6 7/78%)}
  .auth-card .btn--solid:active,.auth-card .btn--primary:active{transform:translateY(1px);
    background:linear-gradient(rgb(0 0 0/18%),rgb(0 0 0/18%)),var(--dl-rail-metal);
    background-color:var(--dl-rail);
    box-shadow:inset 0 2px 5px rgb(0 0 0/46%)}
  .auth-card .btn--outline{border-radius:var(--r-md);background:var(--panel);box-shadow:var(--sh-1),var(--sh-2)}
  .auth-card .btn--outline:hover{transform:translateY(-1px);box-shadow:var(--sh-1),var(--sh-3)}
  /* One "or" rule, and it disappears with the providers it separates. */
  #login-form:has(#sso-toggle[hidden]):has(#github-signin[hidden]) .auth-divider--providers{display:none}
  /* Unified sign-in (Google + automatically resolved email credentials) */
  /* Pending state: the Context Fabric, then the status line. Sized so the form
     side does not jump between the loading view and the sign-in controls. */
  .auth-loading{display:grid;justify-items:center;align-content:center;gap:var(--s5);
    min-height:320px;padding:var(--s4) 0}
  .auth-loading .fabric-art{max-width:300px}
  #sso-pending h1,#sso-forgot h1,#sso-recovery h1,#native-title{font-size:30px;
    line-height:1.08;letter-spacing:-.035em;margin-bottom:var(--s2);color:var(--evergreen)}
  #login-form > .sub,#sso-pending .sub,#sso-forgot .sub,#sso-recovery .sub{margin-bottom:var(--s4)}
  .auth-divider{display:flex;align-items:center;gap:10px;color:var(--muted-2)}
  .auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:var(--line)}
  .auth-divider span{font-family:var(--font-mono);font-size:10px;letter-spacing:.13em;text-transform:uppercase}
  .auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;border-radius:var(--r-2,10px);background:#eceeeb}
  .auth-tab{all:unset;box-sizing:border-box;text-align:center;cursor:pointer;padding:7px 10px;border-radius:8px;
    font-family:var(--font-display);font-size:13px;font-weight:500;color:var(--muted)}
  .auth-tab:focus-visible{box-shadow:var(--focus)}
  .auth-tab.is-active{background:var(--panel);color:var(--ink);box-shadow:var(--sh-1)}
  #email-auth{display:grid;gap:var(--s3)}
  #email-auth[hidden]{display:none}
  #email-auth>.field:first-of-type{padding-top:var(--s1)}
  .auth-link{all:unset;box-sizing:border-box;cursor:pointer;font-size:12.5px;color:var(--evergreen);
    justify-self:start;text-decoration:underline;text-underline-offset:3px}
  .auth-link:focus-visible{box-shadow:var(--focus)}
  .auth-link--dim{color:var(--muted-2);justify-self:center;text-decoration:none}
  .auth-link--dim:hover{color:var(--ink)}
  .google-signin{all:unset;box-sizing:border-box;position:relative;display:block;width:100%;min-height:48px;padding:12px 46px;
    border:1px solid var(--line);border-radius:var(--r-md);color:var(--ink);
    background:linear-gradient(180deg,var(--panel) 0%,color-mix(in srgb,var(--panel) 88%,var(--stone)) 100%);
    font-family:var(--font-display);font-size:14px;font-weight:600;text-align:center;cursor:pointer;
    box-shadow:inset 0 1px 0 #fff,0 1px 2px rgb(15 24 16/8%),0 8px 18px -12px rgb(15 24 16/28%);
    transition:transform .12s var(--ease),background .12s var(--ease),border-color .12s var(--ease),
      box-shadow .12s var(--ease)}
  .google-signin[hidden]{display:none}
  .google-signin:hover{border-color:#cfd3cc;transform:translateY(-1px);
    background:linear-gradient(180deg,var(--panel) 0%,var(--stone) 100%);
    box-shadow:inset 0 1px 0 #fff,0 2px 4px rgb(15 24 16/8%),0 14px 26px -14px rgb(15 24 16/34%)}
  .google-signin:active{transform:translateY(0);
    box-shadow:inset 0 1px 2px rgb(15 24 16/10%),0 1px 2px rgb(15 24 16/8%)}
  .google-signin:focus-visible{outline:2px solid var(--evergreen);outline-offset:2px;box-shadow:var(--sh-1)}
  .google-signin:disabled{opacity:.75;cursor:not-allowed;border-color:var(--line);background:var(--stone);color:var(--muted)}
  .google-signin__mark{position:absolute;top:50%;left:16px;width:18px;height:18px;transform:translateY(-50%)}
  .auth-status{color:var(--muted);display:none;margin:0}
  .auth-terms{font-family:var(--font-mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;
    color:var(--muted-2);text-align:center;line-height:1.7}
  @media(max-width:840px){
    .auth-shell{padding:0}
    .auth-frame{grid-template-columns:1fr;grid-template-areas:"story" "auth";min-height:100dvh}
    .auth-story{min-height:260px;padding:30px 34px}
    /* The stacked story panel is a banner, not a stage: the lanes lose the
       height that made them read as streams, so they leave rather than shrink. */
    .auth-stream{display:none}
    .auth-story-copy{margin:34px 0 22px}
    .auth-story-copy h2{max-width:none;font-size:20.4px}
    .auth-card{margin-block:var(--s6)}
  }
  @media(max-width:560px){
    .auth-shell{display:block;padding:0;background:var(--panel)}
    .auth-frame{min-height:100dvh;border:0;border-radius:0;box-shadow:none}
    .auth-story{min-height:146px;padding:20px var(--s5)}
    .auth-story-copy{margin:auto 0 0}
    .auth-story-copy h2{max-width:none;font-size:14.4px;line-height:1.05}
    .auth-card{width:calc(100% - 32px);margin-block:var(--s5);padding:28px var(--s5);justify-content:flex-start}
    .auth-brand{display:none}
  }

  .toggle{display:inline-flex;align-items:center;gap:9px;cursor:pointer;font-size:13.5px}
  .toggle input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);white-space:nowrap;border:0}
  .toggle .track{width:38px;height:22px;border-radius:var(--r-pill);background:var(--stone);position:relative;transition:background .15s;flex:none}
  .toggle .track::after{content:"";position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;
    background:#fff;box-shadow:var(--sh-1);transition:transform .15s}
  .toggle input:checked + .track{background:var(--evergreen)}
  .toggle input:checked + .track::after{transform:translateX(16px)}
  .toggle input:focus-visible + .track{box-shadow:var(--focus)}
  .toggle:has(input:disabled){cursor:not-allowed;opacity:.58}

  .inherit{font-family:var(--font-mono);font-size:10px;letter-spacing:.06em;color:var(--muted-2)}
  .inherit b{color:var(--olive)}
  .sevbar{width:3px;align-self:stretch;border-radius:2px;flex:none}

  .row{display:flex;gap:var(--s3);align-items:center}
  .filter-strip{display:flex;align-items:center;flex-wrap:wrap;gap:var(--s2);min-width:0}
  .filter-strip--scroll{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;padding-bottom:2px;
    scrollbar-width:thin;scrollbar-color:var(--olive) transparent}
  .filter-strip--scroll>*{flex:none}
  .between{display:flex;justify-content:space-between;align-items:center;gap:var(--s3)}
  .stack{display:flex;flex-direction:column;gap:var(--s4)}
  .mono{font-family:var(--font-mono)}
  .snippet{background:var(--ink);color:#cfe3d3;font-family:var(--font-mono);font-size:12px;line-height:1.6;
    padding:var(--s4);border-radius:var(--r-sm);overflow-x:auto;white-space:pre}
  .textarea{min-height:86px;resize:vertical;line-height:1.5}
  .copilot-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:var(--s4);align-items:start}
  @media(max-width:1040px){.copilot-layout{grid-template-columns:1fr}}
  .copilot-chat,.copilot-evidence{min-width:0}
  .chat-window{height:460px;overflow:auto;border:1px solid var(--line);border-radius:var(--r-md);
    background:var(--mineral);padding:var(--s4);margin-top:var(--s4);display:flex;flex-direction:column;gap:var(--s3)}
  .chat-msg{display:flex;min-width:0;flex-direction:column;gap:5px;max-width:88%}
  .chat-msg--user{align-self:flex-end}
  .chat-msg--assistant{align-self:flex-start}
  .chat-meta{font-family:var(--font-mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted-2)}
  .chat-bubble{min-width:0;max-width:100%;border:1px solid var(--line);border-radius:var(--r-md);padding:var(--s3) var(--s4);
    background:var(--panel);font-size:14px;overflow-wrap:anywhere}
  .chat-msg--user .chat-bubble{background:var(--evergreen);color:var(--mineral);border-color:var(--evergreen)}
  .chat-line{margin:0 0 6px;overflow-wrap:anywhere}
  .chat-line:last-child{margin-bottom:0}
  .chat-line--bullet{position:relative;padding-left:16px}
  .chat-line--bullet::before{content:"";position:absolute;left:2px;top:.7em;width:5px;height:5px;border-radius:50%;background:currentColor}
  .chat-spacer{height:6px}
  .copilot-prompts{flex-wrap:wrap;margin-top:var(--s4)}
  .copilot-composer{margin-top:var(--s4)}
  .chat-input{min-height:72px}
  .copilot-write-control{align-items:flex-start;margin:10px 0 12px}
  .copilot-write-control>span:last-child{display:grid;gap:2px}
  .copilot-write-control small{color:var(--muted);font-size:11px;line-height:1.35}
  .copilot-runtime-trace{display:grid;gap:8px;margin:var(--s3) 0 var(--s5);padding:0;list-style:none}
  .copilot-runtime-trace li{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:9px}
  .copilot-runtime-trace li>div{display:grid;gap:2px;min-width:0}
  .copilot-runtime-trace b{font-size:12px;text-transform:capitalize}
  .copilot-runtime-trace small{overflow-wrap:anywhere;color:var(--muted);font-size:11px;line-height:1.35}
  .copilot-evidence-head{padding-top:var(--s4);border-top:1px solid var(--line)}
  .copilot-profile-field{margin:var(--s4) 0 0}
  .model-runtime-grid{margin-bottom:var(--s4)}
  .model-deployment-form{max-width:680px;margin:0 auto}
  .model-deployment-form>[data-model-new-provider-fields][hidden]{display:none}
  .model-deployment-form .model-advanced{margin-bottom:var(--s3)}
  .model-deployment-form .model-default-note{margin:-8px 0 var(--s4)}
  .model-runtime-table{margin-bottom:var(--s4)}
  .model-control-section{margin-bottom:var(--s4);padding:0;overflow:hidden}
  .model-section-head{min-height:72px;padding:var(--s4) var(--s5);border-bottom:1px solid var(--line)}
  .model-section-head h3{margin:0 0 3px}
  .model-section-head .sub{font-size:12px}
  .model-entity-list{display:grid}
  .model-provider-row,.model-profile-row{display:flex;align-items:stretch;min-width:0;border-bottom:1px solid var(--line)}
  .model-provider-row:last-child,.model-profile-row:last-child{border-bottom:0}
  .model-row-main{display:grid;grid-template-columns:36px minmax(150px,1fr) 20px minmax(180px,1.2fr) auto 16px;
    align-items:center;gap:12px;min-width:0;min-height:64px;width:100%;padding:10px var(--s5);border:0;background:transparent;
    color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background .16s ease}
  .model-profile-row .model-row-main{grid-template-columns:36px minmax(180px,1.25fr) minmax(180px,1fr) auto 16px}
  .model-row-main:hover{background:rgb(18 58 46/3.5%)}
  .model-row-main:focus-visible{position:relative;z-index:1;outline:none;box-shadow:inset var(--focus)}
  .model-row-identity,.model-row-brands>span:last-child,.model-row-via>span{display:grid;min-width:0;gap:2px}
  .model-row-identity strong,.model-row-identity span,.model-row-brands strong,.model-row-brands small,.model-row-via span{
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .model-row-identity strong,.model-row-brands strong{font-size:13px;font-weight:600}
  .model-row-identity span,.model-row-brands small,.model-row-via{color:var(--muted);font-size:11px}
  .model-row-link,.model-row-chevron{color:var(--muted-2);font-size:18px;text-align:center}
  .model-row-brands,.model-row-via{display:flex;align-items:center;gap:9px;min-width:0}
  .model-brand-stack{display:flex;flex:none;padding-left:6px}
  .model-brand-stack .model-brand-mark{margin-left:-6px;border-color:var(--panel);box-shadow:0 0 0 1px var(--line)}
  .model-brand-mark{position:relative;display:grid;place-items:center;width:34px;height:34px;flex:none;overflow:hidden;
    border:1px solid var(--line);border-radius:9px;background:var(--mineral);color:var(--evergreen);
    font:600 9px/1 var(--font-mono);letter-spacing:-.03em}
  .model-brand-mark img{display:block;width:18px;height:18px;object-fit:contain}
  .model-brand-mark svg{display:block;width:19px;height:19px}
  .model-brand-mark--compact{width:22px;height:22px;border-radius:6px;font-size:7px}
  .model-brand-mark--compact img,.model-brand-mark--compact svg{width:13px;height:13px}
  .model-brand-mark--azure{border-color:rgb(0 120 212/20%);background:rgb(0 120 212/7%);color:#0067b8}
  .model-brand-mark--openai{background:#f3f5f2;color:#101a17}
  .model-brand-mark--anthropic{background:#f6f0e8}
  .model-brand-mark--google,.model-brand-mark--google_cloud{background:#f5f8ff}
  .model-assistant-switch{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:104px;padding:0 var(--s5) 0 10px;
    border:0;border-left:1px solid var(--line);background:transparent;color:var(--muted);font:inherit;cursor:pointer}
  .model-assistant-switch>span{position:relative;width:30px;height:17px;flex:none;border-radius:99px;background:var(--stone);transition:background .16s ease}
  .model-assistant-switch>span::after{content:"";position:absolute;left:3px;top:3px;width:11px;height:11px;border-radius:50%;background:#fff;
    box-shadow:0 1px 3px rgb(18 58 46/25%);transition:transform .16s ease}
  .model-assistant-switch[aria-checked="true"]>span{background:var(--evergreen)}
  .model-assistant-switch[aria-checked="true"]>span::after{transform:translateX(13px)}
  .model-assistant-switch em{font-style:normal;font-size:11px}
  .model-assistant-switch:focus-visible{outline:none;box-shadow:inset var(--focus)}
  .model-detail-drawer .console-right-panel__body{display:grid;align-content:start;gap:var(--s5)}
  .model-detail-hero{display:flex;align-items:center;gap:12px;padding-bottom:var(--s4);border-bottom:1px solid var(--line)}
  .model-detail-hero>div{display:grid;min-width:0;gap:3px}
  .model-detail-hero strong{font-size:14px}
  .model-detail-hero span{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
  .model-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4);margin:0}
  .model-detail-grid>div{min-width:0}
  .model-detail-grid dt{margin-bottom:4px;color:var(--muted);font:500 10px var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
  .model-detail-grid dd{margin:0;overflow-wrap:anywhere;font-size:12.5px;line-height:1.45}
  .model-detail-inline-brand{display:flex;align-items:center;gap:7px}
  .model-detail-section{display:grid;gap:10px;padding-top:var(--s4);border-top:1px solid var(--line)}
  .model-detail-section>label{font-size:12px;font-weight:600}
  .model-detail-section .input{max-width:180px}
  .model-detail-model{display:flex;align-items:center;gap:9px;min-width:0;padding:8px 0;border-bottom:1px solid var(--line)}
  .model-detail-model:last-child{border-bottom:0}
  .model-detail-model>span{display:grid;min-width:0;gap:2px}
  .model-detail-model strong,.model-detail-model small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .model-detail-model strong{font-size:12.5px}.model-detail-model small{color:var(--muted);font-size:10.5px}
  .model-detail-actions{display:flex;align-items:center;min-height:30px}
  .model-danger-zone{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);margin-top:var(--s3);padding:var(--s4);
    border:1px solid rgb(232 60 0/20%);border-radius:var(--r-sm);background:rgb(232 60 0/4%)}
  .model-danger-zone>div{display:grid;gap:3px}.model-danger-zone strong{font-size:12.5px}.model-danger-zone span{color:var(--muted);font-size:11px;line-height:1.4}
  .model-status{min-height:20px;margin:-12px 0 var(--s3);font-size:12px;color:var(--muted)}
  .model-notice{margin-top:var(--s2);padding:8px 10px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--mineral);color:var(--muted);font-size:12px}
  .model-notice--error{border-color:rgb(232 60 0/28%);background:rgb(232 60 0/6%);color:var(--rust)}
  .model-check{display:flex;align-items:center;gap:9px;margin:0 0 var(--s4);font-size:13.5px}
  .model-check input{width:17px;height:17px;accent-color:var(--evergreen)}
  .model-check input:focus-visible{box-shadow:var(--focus)}
  .model-id{font-size:11px}
  @media(max-width:840px){
    .model-row-main,.model-profile-row .model-row-main{grid-template-columns:34px minmax(0,1fr) auto;padding-inline:var(--s4)}
    .model-row-link,.model-row-brands,.model-row-via,.model-row-main>.pill{display:none}
    .model-assistant-switch{min-width:76px;padding-right:var(--s4)}
    .model-assistant-switch em{display:none}
    .model-section-head{padding-inline:var(--s4)}
    .model-detail-grid{grid-template-columns:1fr}
    .model-danger-zone{align-items:flex-start;flex-direction:column}
  }

  /* S12 AI Models main-page reference */
  body[data-console-screen="s12"] #screen-content.screen-flow>.card.model-control-section{
    margin-bottom:0;padding:20px 20px 10px;overflow:hidden;border:1px solid #e5e7eb;border-radius:14px;
    background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04);font-family:var(--font-sans);color:#111827
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-section-head{
    min-height:0;padding:0 4px 12px;border:0;flex-wrap:wrap;gap:12px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-section-head h3{
    margin:0 0 1px;color:#111827;font-size:15px;font-weight:600;line-height:1.35;letter-spacing:-.01em
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-section-head .sub{
    color:#6b7280;font-size:11.5px;line-height:1.45
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-section-head .eyebrow{
    color:#9ca3af;font:650 10.5px/1.3 var(--font-sans);letter-spacing:.06em;text-transform:uppercase
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-provider-row,
  body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row{
    display:flex;align-items:center;gap:12px;min-width:0;padding:12px 10px;border:0;border-top:1px solid #f3f4f6;
    border-radius:8px;background:transparent;transition:background .15s ease
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row{padding-block:11px}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-provider-row:hover,
  body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row:hover{background:#f9fafb}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main{
    display:grid;grid-template-columns:34px minmax(150px,1.2fr) 16px minmax(180px,1.2fr) auto 16px;
    align-items:center;gap:12px;min-width:0;min-height:34px;width:100%;padding:0;border:0;background:transparent;
    color:#111827;font-family:var(--font-sans);text-align:left;cursor:pointer
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row .model-row-main{
    grid-template-columns:34px minmax(180px,1.1fr) minmax(180px,1fr) auto 16px;flex:1;width:auto
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main:hover{background:transparent}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-identity{gap:1px}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-identity strong{
    color:#111827;font-size:13px;font-weight:600;line-height:1.35
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-identity>span{
    color:#6b7280;font-size:11.5px;line-height:1.35
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row .model-row-identity>span{
    color:#9ca3af;font-size:11px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-link{
    color:#d1d5db;font-size:15px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-chevron{
    color:#9ca3af;font-size:16px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-brands,
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-via{gap:9px}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-brands strong{
    color:#111827;font-size:12.5px;font-weight:600
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-brands small{
    color:#9ca3af;font-size:11px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-via{
    gap:7px;color:#6b7280;font-size:12px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-via strong{color:#374151;font-weight:600}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-brand-mark{
    width:34px;height:34px;border:0;border-radius:10px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-provider-row .model-brand-mark--compact{
    width:22px;height:22px;border-radius:7px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row .model-brand-mark--compact{
    width:20px;height:20px;border-radius:6px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-brand-mark--compact img,
  body[data-console-screen="s12"] #screen-content .model-control-section .model-brand-mark--compact svg{width:11px;height:11px}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-brand-stack .model-brand-mark{
    border:1.5px solid #fff;box-shadow:none
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main>.pill{
    font-family:var(--font-sans);font-weight:650;line-height:1.3;text-transform:none
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main>.pill--ok{
    gap:6px;padding:3px 10px;border:0;background:#ecfdf3;color:#067647;font-size:11px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main>.pill--ok .dot{
    width:6px;height:6px;background:#12b76a
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main>.pill--live{
    gap:6px;padding:2px 9px;border:1px solid #d5e3da;background:#eaf1ec;color:#0f3d2e;font-size:10.5px
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main>.pill--live .dot{
    width:5px;height:5px;background:#2e6b52
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch{
    display:flex;align-items:center;justify-content:flex-start;gap:8px;width:96px;min-width:96px;padding:0;border:0;
    background:transparent;color:#9ca3af;font-family:var(--font-sans);cursor:pointer
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch>span{
    position:relative;width:32px;height:19px;flex:none;border-radius:999px;background:#e5e7eb;transition:background .15s ease
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch>span::after{
    content:"";position:absolute;top:2.5px;left:2.5px;width:14px;height:14px;border-radius:999px;background:#fff;
    box-shadow:0 1px 2px rgba(16,24,40,.2);transition:transform .15s ease
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch[aria-checked="true"]>span{background:#0f3d2e}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch[aria-checked="true"]>span::after{transform:translateX(13px)}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch em{
    color:#9ca3af;font-size:12px;font-style:normal;font-weight:600;line-height:1.35
  }
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch[aria-checked="true"] em{color:#111827}
  body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch:focus-visible{
    outline:2px solid var(--evergreen);outline-offset:4px;border-radius:4px;box-shadow:none
  }
  @media(max-width:840px){
    body[data-console-screen="s12"] #screen-content .model-control-section{padding:16px 16px 8px}
    body[data-console-screen="s12"] #screen-content .model-control-section .model-section-head{padding:0 0 12px}
    body[data-console-screen="s12"] #screen-content .model-control-section .model-provider-row,
    body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row{gap:8px;padding:10px 4px}
    body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main,
    body[data-console-screen="s12"] #screen-content .model-control-section .model-profile-row .model-row-main{
      grid-template-columns:34px minmax(0,1fr) auto
    }
    body[data-console-screen="s12"] #screen-content .model-control-section .model-row-link,
    body[data-console-screen="s12"] #screen-content .model-control-section .model-row-brands,
    body[data-console-screen="s12"] #screen-content .model-control-section .model-row-via,
    body[data-console-screen="s12"] #screen-content .model-control-section .model-row-main>.pill{display:none}
    body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch{width:32px;min-width:32px}
    body[data-console-screen="s12"] #screen-content .model-control-section .model-assistant-switch em{display:none}
  }
  /* end S12 AI Models main-page reference */
  .diff-add{background:rgb(199 215 178/30%);color:#2f5d3f;padding:1px 3px;border-radius:3px}
  .diff-del{background:rgb(232 60 0/9%);color:#a13000;text-decoration:line-through;padding:1px 3px;border-radius:3px}
  .step{display:flex;gap:var(--s4);padding:var(--s4) 0;border-bottom:1px solid var(--line)}
  .step:last-child{border-bottom:none}
  .step .n{width:26px;height:26px;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;
    font-family:var(--font-mono);font-size:12px;color:var(--muted);flex:none}
  .step.done .n{background:var(--sage);border-color:var(--sage);color:var(--evergreen)}
  .step.now .n{background:var(--evergreen);border-color:var(--evergreen);color:var(--mineral)}
  .spark{display:block}
  .legend{display:flex;gap:var(--s4);flex-wrap:wrap;font-size:12px;color:var(--muted);margin-top:var(--s3)}
  .legend i{width:9px;height:9px;border-radius:2px;display:inline-block;margin-right:5px;vertical-align:middle}

  /* S5 memory topology - four-column multi-hop routing graph. Node cards and
     the SVG ribbon layer share the same fractional coordinates (--x/--y/--w
     against a 1000×460 viewBox with preserveAspectRatio:none), so links stay
     glued to their nodes at any viewport width. */
  .memory-topology{margin:0 0 var(--s6)}
  .memory-topology-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s5);margin-bottom:var(--s3)}
  .memory-topology-head h2{font-size:20px}
  .memory-topology-card{position:relative;overflow:hidden;border:1px solid var(--line);
    border-radius:var(--r-lg);background:radial-gradient(circle at 10% 0%,rgb(199 215 178/16%),transparent 36%),
    radial-gradient(circle at 88% 100%,rgb(127 147 102/12%),transparent 32%),var(--panel);
    color:var(--ink);box-shadow:0 16px 40px -34px rgb(18 58 46/35%)}
  .memory-topology-card::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.06;
    background-image:linear-gradient(rgb(18 58 46/22%) 1px,transparent 1px),linear-gradient(90deg,rgb(18 58 46/22%) 1px,transparent 1px);
    background-size:34px 34px;background-repeat:no-repeat;mask-image:radial-gradient(ellipse at 50% 42%,#000 34%,transparent 80%)}
  .memory-topology-bar{position:relative;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:var(--s4);
    min-height:38px;padding:8px var(--s4);border-bottom:1px solid var(--line);background:rgb(18 58 46/4%);
    color:var(--muted);font:500 10.5px var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
  .memory-topology-bar span:first-child{display:inline-flex;align-items:center;gap:7px;color:var(--evergreen)}
  .memory-topology-bar i{width:6px;height:6px;border-radius:50%;background:var(--olive);box-shadow:0 0 0 4px rgb(127 147 102/16%)}
  .memory-topology-viewport{position:relative;height:460px;isolation:isolate}

  /* ribbon layer - solid ribbons; the only motion is a soft pulse segment
     travelling each path (no dashed strokes) */
  .memory-topology-links{position:absolute;z-index:1;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
  .memory-topology-link{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke;transition:opacity .35s ease}
  .memory-topology-link--glow{stroke:rgb(18 58 46);opacity:.07}
  .memory-topology-link--core{opacity:.55}
  .memory-topology-link--pulse{opacity:.85;stroke-dasharray:12 88;animation:memory-topology-route 5.5s linear infinite}
  .memory-topology-link--primary{stroke:url(#memory-topology-flow)}
  .memory-topology-link--pending{stroke:color-mix(in srgb,var(--gold) 62%,#5b4a00)}
  .memory-topology-link--alert{stroke:color-mix(in srgb,var(--rust) 72%,transparent)}
  .memory-topology-link--quiet{stroke:rgb(18 58 46/16%)}
  @keyframes memory-topology-route{to{stroke-dashoffset:-100}}
  .memory-topology-viewport[data-focus] .memory-topology-link{opacity:.06}
  .memory-topology-viewport[data-focus] .memory-topology-link--glow{opacity:.02}
  .memory-topology-viewport[data-focus] .memory-topology-link--core.is-on{opacity:.75}
  .memory-topology-viewport[data-focus] .memory-topology-link--pulse.is-on{opacity:1}
  .memory-topology-viewport[data-focus] .memory-topology-link--glow.is-on{opacity:.14}
  .memory-topology-viewport[data-focus] .memory-topology-node-hit{opacity:.42}
  .memory-topology-viewport[data-focus] .memory-topology-node-hit.is-on{opacity:1;border-color:rgb(18 58 46/70%)}

  /* stages collapse to their children on desktop; nodes place themselves */
  .memory-topology-stage,.memory-topology-stage-body,.memory-topology-source-list{display:contents}
  .memory-topology-source-list{margin:0;padding:0;list-style:none}
  .memory-topology-stage header{position:absolute;z-index:3;top:18px;left:var(--x);width:var(--w);display:flex;align-items:flex-start;gap:8px}
  .memory-topology-stage header>span{width:22px;height:22px;display:grid;place-items:center;flex:none;border:1px solid rgb(18 58 46/24%);
    border-radius:50%;color:var(--muted);font:500 9.5px var(--font-mono)}
  .memory-topology-stage header div{min-width:0}
  .memory-topology-stage h3{overflow:hidden;color:var(--ink);font-size:13px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
  .memory-topology-stage header p{margin:3px 0 0;color:var(--muted-2);font:10.5px/1.35 var(--font-mono)}

  .memory-topology-cell{position:absolute;z-index:2;left:var(--x);top:var(--y);width:var(--w);min-width:0;
    margin:0;transform:translateY(-50%);list-style:none}
  .memory-topology-node-hit{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:3px 10px;width:100%;
    padding:10px 11px;border:1px solid rgb(18 58 46/55%);border-radius:var(--r-sm);
    background:linear-gradient(160deg,#17291f,#0b1613);color:var(--mineral);font:inherit;text-align:left;cursor:pointer;
    box-shadow:0 10px 22px -16px rgb(18 58 46/55%);
    transition:border-color .25s ease,opacity .3s ease,box-shadow .25s ease}
  .memory-topology-node-hit:hover{border-color:rgb(18 58 46/85%);box-shadow:0 12px 26px -14px rgb(18 58 46/60%)}
  .memory-topology-node-hit:focus-visible{outline:none;box-shadow:var(--focus)}
  .memory-topology-node-copy{min-width:0;line-height:1.25}
  .memory-topology-node-copy b,.memory-topology-node-copy small,.memory-topology-node-copy em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .memory-topology-node-copy b{font-size:11.5px;font-weight:500;color:rgb(243 246 238/90%)}
  .memory-topology-node-copy small{margin-top:1px;font-size:10.5px;color:rgb(243 246 238/55%)}
  .memory-topology-node-copy em{margin-top:3px;color:rgb(199 215 178/66%);font:normal 10.5px var(--font-mono);letter-spacing:.05em;text-transform:uppercase}
  .memory-topology-node-chip{justify-self:end;padding:2px 7px;border-radius:var(--r-pill);background:rgb(199 215 178/11%);
    color:rgb(199 215 178/85%);font:600 10px var(--font-mono);letter-spacing:.05em;white-space:nowrap}
  .memory-topology-node-chip--pct{background:var(--sage);color:#12241c}

  .memory-topology-source-mark{width:28px;height:28px;display:grid;place-items:center;border:1px solid rgb(199 215 178/26%);
    border-radius:6px;background:rgb(199 215 178/5%);color:rgb(199 215 178/84%);font:500 10px var(--font-mono)}
  .memory-topology-source-state{justify-self:end;display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border-radius:var(--r-pill);
    background:rgb(5 11 10/55%);border:1px solid rgb(199 215 178/13%);color:rgb(243 246 238/68%);font:500 10px/1.4 var(--font-mono);white-space:nowrap}
  .memory-topology-source-state::before{content:"";width:5px;height:5px;flex:none;border-radius:50%;background:rgb(243 246 238/28%)}
  .memory-topology-source-state--ok::before{background:var(--sage)}
  .memory-topology-source-state--pending::before{background:var(--gold)}
  .memory-topology-source-state--bad::before,.memory-topology-source-state--disabled::before{background:var(--rust)}
  .memory-topology-source-state--paused::before{background:var(--olive)}
  .memory-topology-source-more,.memory-topology-source-empty{padding:10px 11px;border:1px dashed rgb(18 58 46/28%);border-radius:var(--r-sm);
    color:var(--muted);font:10.5px/1.4 var(--font-mono)}

  .memory-topology-node-icon,.memory-topology-agent-mark{position:relative;width:28px;height:28px;display:block;border:1px solid rgb(199 215 178/25%);border-radius:7px}
  .memory-topology-node-icon::before,.memory-topology-node-icon::after,.memory-topology-agent-mark::before,.memory-topology-agent-mark::after{
    content:"";position:absolute;inset:8px;border:1px solid var(--sage);transform:rotate(45deg)}
  .memory-topology-node-icon::after,.memory-topology-agent-mark::after{inset:11px;background:var(--sage)}
  .memory-topology-node-icon i,.memory-topology-agent-mark i{display:none}
  .memory-topology-route-mark{width:26px;height:26px;margin-left:1px;border:1px solid rgb(199 215 178/23%);border-radius:50%;
    background:radial-gradient(circle,var(--sage) 0 2px,transparent 2.5px),conic-gradient(from 45deg,transparent,rgb(199 215 178/18%),transparent)}
  .memory-topology-node--agent .memory-topology-node-hit{border-color:rgb(18 58 46/80%);
    background:linear-gradient(120deg,#1d4f3f,#0b1613 62%)}
  .memory-topology-node--agent .memory-topology-agent-mark{box-shadow:0 0 0 5px rgb(199 215 178/5%)}

  .memory-topology-metrics{position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0;padding:0;
    border-top:1px solid var(--line);background:rgb(18 58 46/3%);list-style:none}
  .memory-topology-metrics li{min-width:0;min-height:82px;padding:12px var(--s4);border-right:1px solid var(--line)}
  .memory-topology-metrics li:last-child{border-right:0}
  .memory-topology-metrics small,.memory-topology-metrics b,.memory-topology-metrics span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .memory-topology-metrics small{color:var(--muted);font:10px var(--font-mono);letter-spacing:.13em;text-transform:uppercase}
  .memory-topology-metrics b{margin-top:4px;color:var(--ink);font-size:15px;font-weight:500}
  .memory-topology-metrics span{margin-top:2px;color:var(--muted-2);font-size:10.5px}
  .memory-topology-unavailable{min-height:168px;display:flex;align-items:center;justify-content:center;gap:var(--s4);padding:var(--s5);text-align:left}
  .memory-topology-unavailable>.memory-topology-node-icon{position:relative;z-index:1;flex:none;border-color:rgb(18 58 46/35%)}
  .memory-topology-unavailable>div{position:relative;z-index:1;max-width:520px}
  .memory-topology-unavailable h3{font-size:18px;color:var(--ink)}
  .memory-topology-unavailable p{margin:var(--space-text) 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}

  @media(max-width:1240px) and (min-width:1100px){
    .memory-topology-stage header p{display:none}
    .memory-topology-node-hit{padding-inline:9px}
  }
  @media(max-width:1099px) and (min-width:721px){
    .memory-topology-links{display:none}
    .memory-topology-viewport{display:grid;height:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto;
      gap:42px 32px;padding:var(--s4)}
    .memory-topology-stage{display:block;position:relative;min-width:0}
    .memory-topology-stage-body,.memory-topology-source-list{display:flex;flex-direction:column;gap:8px;min-height:0}
    .memory-topology-stage header{position:static;width:auto;margin-bottom:var(--s3)}
    .memory-topology-cell{position:static;width:auto;transform:none}
    .memory-topology-stage--01{grid-column:1;grid-row:1}
    .memory-topology-stage--02{grid-column:2;grid-row:1}
    .memory-topology-stage--03{grid-column:2;grid-row:2}
    .memory-topology-stage--04{grid-column:1;grid-row:2}
    .memory-topology-stage--01::after,.memory-topology-stage--02::after,.memory-topology-stage--03::after{
      position:absolute;color:rgb(18 58 46/45%);font:20px/1 var(--font-mono)}
    .memory-topology-stage--01::after{content:"→";right:-26px;top:50%}
    .memory-topology-stage--02::after{content:"↓";right:50%;bottom:-32px}
    .memory-topology-stage--03::after{content:"←";left:-26px;top:50%}
    .memory-topology-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
    .memory-topology-metrics li{border-bottom:1px solid var(--line)}
    .memory-topology-metrics li:nth-child(even){border-right:0}
    .memory-topology-metrics li:nth-last-child(-n+2){border-bottom:0}
  }
  @media(max-width:720px){
    .memory-topology-head{align-items:flex-start;flex-direction:column;gap:var(--s3)}
    .memory-topology-bar{align-items:flex-start;flex-direction:column;gap:3px;padding:10px var(--s4)}
    .memory-topology-links{display:none}
    .memory-topology-viewport{display:grid;height:auto;grid-template-columns:1fr;gap:0;padding:var(--s4)}
    .memory-topology-stage{display:block;position:relative;min-width:0;padding-bottom:34px}
    .memory-topology-stage:last-child{padding-bottom:0}
    .memory-topology-stage:not(:last-child)::before{content:"";position:absolute;left:10px;bottom:6px;width:1px;height:20px;background:rgb(18 58 46/30%)}
    .memory-topology-stage:not(:last-child)::after{content:"";position:absolute;left:7px;bottom:5px;width:7px;height:7px;border-right:1px solid var(--evergreen);border-bottom:1px solid var(--evergreen);transform:rotate(45deg)}
    .memory-topology-stage-body,.memory-topology-source-list{display:flex;flex-direction:column;gap:var(--s2);min-height:0}
    .memory-topology-stage header{position:static;width:auto;min-height:0;margin-bottom:var(--s3)}
    .memory-topology-cell{position:static;width:auto;transform:none}
    .memory-topology-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
    .memory-topology-metrics li{min-height:76px;border-bottom:1px solid var(--line)}
    .memory-topology-metrics li:nth-child(even){border-right:0}
    .memory-topology-metrics li:nth-last-child(-n+2){border-bottom:0}
    .memory-topology-unavailable{min-height:160px;text-align:center;flex-direction:column}
  }
  @media(prefers-reduced-motion:reduce){
    .memory-topology-link{animation:none}
    .memory-topology-link--pulse{opacity:0}
  }

  /* S5 memory graph - central governed-memory hub with truthful live leaves. */
  .memory-graph{margin:0 0 var(--s6)}
  .memory-graph-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s5);margin-bottom:var(--s3)}
  .memory-graph-shell{--memory-tier-l0:var(--gold);--memory-tier-l1:var(--sage);
    --memory-tier-l2:var(--olive);--memory-tier-l3:var(--slate);position:relative;overflow:hidden;
    border:1px solid #e5e7eb;border-radius:var(--r-lg);background:#07110e;color:var(--mineral);
    box-shadow:0 1px 2px rgb(16 24 40/4%),0 5px 14px rgb(16 24 40/5%)}
  .memory-graph-toolbar{position:relative;z-index:5;display:flex;align-items:center;gap:6px;min-height:48px;padding:6px var(--s3);
    overflow-x:auto;border-bottom:1px solid #e5e7eb;background:#fff;color:#111827;scrollbar-width:thin}
  .memory-graph-toolbar>span{margin-right:5px;color:#6b7280;font:600 12px var(--font-sans);letter-spacing:0;text-transform:none}
  .memory-graph-filter{--filter-color:var(--sage);min-height:36px;display:inline-flex;align-items:center;gap:6px;flex:none;padding:5px 8px 5px 5px;border:1px solid #e5e7eb;
    border-radius:var(--r-sm);background:#fff;color:#111827;font:600 12px var(--font-sans);cursor:pointer;box-shadow:0 1px 2px rgb(16 24 40/4%);
    transition:background .2s ease,border-color .2s ease,color .2s ease}
  .memory-graph-filter:hover{border-color:#9ca3af;background:#f9fafb}
  .memory-graph-filter:focus-visible{outline:none;border-color:var(--evergreen);box-shadow:var(--focus)}
  .memory-graph-filter[data-kind="backend"]{--filter-color:var(--olive)}
  .memory-graph-filter[data-kind="knowledge"]{--filter-color:var(--sage)}
  .memory-graph-filter[data-kind="skill"]{--filter-color:var(--slate)}
  .memory-graph-filter[data-kind="retrieval"]{--filter-color:var(--gold)}
  .memory-graph-filter[data-kind="agent"]{--filter-color:var(--sage)}
  .memory-graph-filter[data-kind="policy"]{--filter-color:var(--gold)}
  .memory-graph-filter-icon{display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:var(--r-xs);
    background:color-mix(in srgb,var(--filter-color) 22%,#fff);color:color-mix(in srgb,var(--filter-color) 72%,var(--ink));font-style:normal}
  .memory-graph-filter-icon svg{width:12px;height:12px}
  .memory-graph-filter-label{color:inherit}
  .memory-graph-filter-count{color:#6b7280;font:500 11px var(--font-mono)}
  .memory-graph-filter.is-off{border-color:transparent;background:transparent;color:var(--muted-2);box-shadow:none;opacity:.58}.memory-graph-filter.is-off .memory-graph-filter-icon{background:var(--stone);color:var(--muted-2)}
  .memory-graph-layout{display:grid;grid-template-columns:minmax(0,1fr) 264px;min-height:800px}
  /* The plane fills whatever height the row takes (a long inspector makes the
     row taller); the graph itself keeps its authored 800px composition and
     centres inside it, so a tall panel never leaves a stranded black column. */
  .memory-graph-viewport{position:relative;min-width:0;height:auto;min-height:800px;overflow:hidden;isolation:isolate;outline:none;background:#07110e}
  .memory-graph-viewport:focus-visible{box-shadow:inset 0 0 0 2px rgb(199 215 178/42%)}
  .memory-graph-grid{position:absolute;inset:0;opacity:.2;pointer-events:none;
    background-image:radial-gradient(circle,rgb(199 215 178/24%) 0 1px,transparent 1.2px);
    background-size:26px 26px;mask-image:radial-gradient(ellipse at 50% 48%,#000 12%,transparent 88%)}
  .memory-graph-cluster{position:absolute;z-index:0;left:var(--cluster-x);top:var(--cluster-y);width:var(--cluster-w);height:var(--cluster-h);
    --cluster-color:199 215 178;border:0;border-radius:50%;background:radial-gradient(ellipse,rgb(var(--cluster-color)/7%),rgb(var(--cluster-color)/2%) 46%,transparent 72%);
    transform:translate(-50%,-50%);pointer-events:none}
  .memory-graph-cluster--backend{--cluster-color:127 147 102}
  .memory-graph-cluster--skill{--cluster-color:91 107 130}
  .memory-graph-cluster--policy,.memory-graph-cluster--retrieval{--cluster-color:244 211 94}
  .memory-graph-cluster--agent{--cluster-color:243 246 238}
  .memory-graph-cluster--nested{opacity:.35}
  .memory-graph-links{position:absolute;z-index:1;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
  .memory-graph-edge{fill:none;stroke:rgb(199 215 178/20%);stroke-width:1;stroke-linecap:round;vector-effect:non-scaling-stroke;
    transition:opacity .3s ease;opacity:.62}
  .memory-graph-edge--source{stroke:rgb(127 147 102/46%);stroke-width:1.1;opacity:.18}
  .memory-graph-edge--provenance{stroke:rgb(127 147 102/40%);stroke-width:1;opacity:0}
  .memory-graph-edge--update{stroke:rgb(244 211 94/58%);stroke-width:1.4}
  .memory-graph-edge--branch{stroke:rgb(199 215 178/38%);stroke-width:1.25}
  .memory-graph-edge--memory{stroke:rgb(199 215 178/14%);stroke-width:.8}
  .memory-graph-edge--memory.is-on{stroke:rgb(199 215 178/44%)}
  .memory-graph-edge--branch[data-to-kind="policy"]{stroke:rgb(244 211 94/38%)}
  .memory-graph-edge--branch[data-to-kind="backend"]{stroke:rgb(127 147 102/42%)}
  .memory-graph-edge--branch[data-to-kind="skill"]{stroke:rgb(91 107 130/46%)}
  .memory-graph-edge--branch[data-to-kind="agent"]{stroke:rgb(243 246 238/35%)}
  .memory-graph-edge--pulse{stroke:rgb(243 246 238/72%);stroke-width:1.5;stroke-dasharray:5 95;opacity:.65;
    animation:memory-graph-flow 9s linear infinite;animation-delay:var(--edge-delay)}
  .memory-graph-edge--pulse.memory-graph-edge--update{stroke:var(--gold)}
  @keyframes memory-graph-flow{to{stroke-dashoffset:-100}}
  .memory-graph-node{position:absolute;z-index:3;left:var(--x);top:var(--y);
    transform:translate(calc(-50% + var(--drag-x,0px)),calc(-50% + var(--drag-y,0px)));
    transition:opacity .28s ease,filter .28s ease;animation:memory-graph-breathe 5.5s ease-in-out infinite;animation-delay:var(--node-delay)}
  .memory-graph-node.is-dragging,.memory-graph-node.is-returning{z-index:8;animation-play-state:paused;will-change:transform}
  @keyframes memory-graph-breathe{50%{filter:brightness(1.13)}}
  .memory-graph-node-hit{position:relative;display:grid;place-items:center;width:14px;height:14px;padding:0;border:1px solid rgb(199 215 178/38%);
    border-radius:50%;background:rgb(8 24 18/96%);color:var(--mineral);font:inherit;cursor:grab;touch-action:none;user-select:none;
    box-shadow:0 0 0 4px rgb(199 215 178/4%),0 0 13px rgb(199 215 178/12%);
    transition:border-color .2s ease,background .2s ease,opacity .25s ease,transform .2s ease,box-shadow .2s ease}
  .memory-graph-node-hit::before{content:"";position:absolute;width:44px;height:44px;border-radius:50%}
  .memory-graph-node-hit:hover{z-index:5;border-color:rgb(243 246 238/76%);transform:scale(1.18)}
  .memory-graph-node.is-dragging .memory-graph-node-hit{cursor:grabbing;transform:scale(1.18)}
  .memory-graph-node-hit:focus-visible{z-index:6;outline:none;box-shadow:0 0 0 4px rgb(199 215 178/27%),0 0 18px rgb(199 215 178/32%)}
  .memory-graph-dot{width:5px;height:5px;border-radius:50%;background:var(--sage);box-shadow:0 0 8px rgb(199 215 178/68%)}
  .memory-graph-node-copy{position:absolute;left:calc(100% + 7px);top:50%;width:max-content;max-width:180px;pointer-events:none;transform:translateY(-50%);line-height:1.2;text-align:left}
  .memory-graph-node-copy b,.memory-graph-node-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 1px 4px #000,0 0 9px #000}
  .memory-graph-node-copy b{color:rgb(243 246 238/88%);font-size:10px;font-weight:600}
  .memory-graph-node-copy small{height:0;margin-top:2px;color:rgb(243 246 238/58%);font:9px var(--font-mono);opacity:0;transition:opacity .16s ease}
  .memory-graph-node-hit:hover .memory-graph-node-copy small,.memory-graph-node-hit:focus-visible .memory-graph-node-copy small{height:auto;opacity:1}
  .memory-graph-node:hover,.memory-graph-node:focus-within{z-index:12}
  .memory-graph-node--expandable,.memory-graph-node--expandable:hover,.memory-graph-node--expandable:focus-within{z-index:13}
  .memory-graph-tooltip{position:absolute;z-index:20;left:50%;bottom:calc(100% + 13px);display:flex;flex-direction:column;width:230px;max-width:min(230px,65vw);padding:11px 12px;border:1px solid rgb(199 215 178/24%);border-radius:8px;background:rgb(9 20 18/97%);box-shadow:0 12px 30px rgb(0 0 0/38%);color:rgb(243 246 238/72%);font:11px/1.45 var(--font-sans);text-align:left;pointer-events:none;opacity:0;visibility:hidden;transform:translate(-50%,5px);transition:opacity .14s ease,transform .14s ease,visibility .14s ease}
  .memory-graph-tooltip::after{content:"";position:absolute;left:50%;bottom:-5px;width:8px;height:8px;border-right:1px solid rgb(199 215 178/24%);border-bottom:1px solid rgb(199 215 178/24%);background:rgb(9 20 18/97%);transform:translateX(-50%) rotate(45deg)}
  .memory-graph-tooltip b,.memory-graph-tooltip span,.memory-graph-tooltip small{display:block;width:100%}.memory-graph-tooltip b{margin-bottom:4px;color:var(--mineral);font-size:12px;font-weight:600}.memory-graph-tooltip small{margin-top:6px;color:rgb(243 246 238/45%);font:9px/1.4 var(--font-mono)}
  .memory-graph-node-hit:hover .memory-graph-tooltip,.memory-graph-node-hit:focus-visible .memory-graph-tooltip{pointer-events:auto;opacity:1;visibility:visible;transform:translate(-50%,0)}
  .memory-graph-node-hit[data-tooltip-align="start"] .memory-graph-tooltip{left:0;transform:translate(0,5px)}.memory-graph-node-hit[data-tooltip-align="start"]:hover .memory-graph-tooltip,.memory-graph-node-hit[data-tooltip-align="start"]:focus-visible .memory-graph-tooltip{transform:translate(0,0)}.memory-graph-node-hit[data-tooltip-align="start"] .memory-graph-tooltip::after{left:14px}
  .memory-graph-node-hit[data-tooltip-align="end"] .memory-graph-tooltip{right:0;left:auto;transform:translate(0,5px)}.memory-graph-node-hit[data-tooltip-align="end"]:hover .memory-graph-tooltip,.memory-graph-node-hit[data-tooltip-align="end"]:focus-visible .memory-graph-tooltip{transform:translate(0,0)}.memory-graph-node-hit[data-tooltip-align="end"] .memory-graph-tooltip::after{right:14px;left:auto}
  .memory-graph-node-hit[data-tooltip-placement="below"] .memory-graph-tooltip{top:calc(100% + 13px);bottom:auto}.memory-graph-node-hit[data-tooltip-placement="below"] .memory-graph-tooltip::after{top:-5px;bottom:auto;border:0;border-top:1px solid rgb(199 215 178/24%);border-left:1px solid rgb(199 215 178/24%)}
  .memory-graph-node--hub .memory-graph-node-hit{width:22px;height:22px;border-color:rgb(199 215 178/72%);background:var(--evergreen);box-shadow:0 0 0 5px rgb(199 215 178/6%),0 0 20px rgb(127 147 102/38%)}
  .memory-graph-node--hub .memory-graph-dot{width:8px;height:8px;background:var(--mineral);box-shadow:0 0 11px rgb(243 246 238/70%)}
  .memory-graph-node--hub .memory-graph-node-copy b{font-size:12px}
  .memory-graph-node--branch .memory-graph-node-hit{width:14px;height:14px;border-color:rgb(199 215 178/52%);box-shadow:0 0 0 4px rgb(199 215 178/4%),0 0 14px rgb(199 215 178/16%)}
  .memory-graph-node--branch .memory-graph-dot{width:5px;height:5px}
  .memory-graph-node--branch .memory-graph-node-copy b{font-size:11px}
  .memory-graph-expand-icon{position:absolute;left:calc(100% + 3px);top:-8px;width:14px;height:14px;border:1px solid rgb(199 215 178/42%);
    border-radius:50%;background:#07110e;color:var(--sage);box-shadow:0 0 0 3px rgb(7 17 14/84%),0 2px 9px rgb(0 0 0/28%);
    pointer-events:none;transition:background .18s ease,border-color .18s ease,color .18s ease}
  .memory-graph-expand-icon::before,.memory-graph-expand-icon::after{content:"";position:absolute;left:50%;top:50%;width:7px;height:1px;
    border-radius:1px;background:currentColor;transform:translate(-50%,-50%);transition:opacity .18s ease,transform .18s ease}
  .memory-graph-expand-icon::after{transform:translate(-50%,-50%) rotate(90deg)}
  .memory-graph-node-hit[aria-expanded="true"] .memory-graph-expand-icon{border-color:var(--sage);background:var(--sage);color:var(--evergreen)}
  .memory-graph-node-hit[aria-expanded="true"] .memory-graph-expand-icon::after{opacity:0;transform:translate(-50%,-50%) rotate(90deg) scaleX(0)}
  .memory-graph-node-hit:hover .memory-graph-expand-icon,.memory-graph-node-hit:focus-visible .memory-graph-expand-icon{border-color:var(--mineral)}
  .memory-graph-node[data-kind="backend"] .memory-graph-dot{background:var(--olive);box-shadow:0 0 9px rgb(127 147 102/66%)}
  .memory-graph-node[data-kind="knowledge"] .memory-graph-dot{background:var(--sage)}
  .memory-graph-node[data-kind="skill"] .memory-graph-dot{background:var(--slate);box-shadow:0 0 8px rgb(91 107 130/68%)}
  .memory-graph-node[data-kind="agent"] .memory-graph-dot{background:var(--mineral);box-shadow:0 0 8px rgb(243 246 238/62%)}
  .memory-graph-node[data-kind="policy"] .memory-graph-dot{background:var(--gold);box-shadow:0 0 9px rgb(244 211 94/62%)}
  .memory-graph-source-state{position:absolute;left:calc(100% + 7px);top:calc(50% + 13px);color:rgb(243 246 238/50%);font:8px var(--font-mono);white-space:nowrap;pointer-events:none}
  .memory-graph-node--source .memory-graph-source-state{opacity:0}
  .memory-graph-source-state--ok{color:var(--sage)}.memory-graph-source-state--pending{color:var(--gold)}
  .memory-graph-source-state--bad,.memory-graph-source-state--disabled{color:var(--rust)}.memory-graph-source-state--paused{color:var(--olive)}
  .memory-graph-node--source .memory-graph-node-hit,.memory-graph-node--skill .memory-graph-node-hit,.memory-graph-node--route .memory-graph-node-hit{width:12px;height:12px}
  .memory-graph-node--knowledge-base .memory-graph-node-hit,.memory-graph-node--tier .memory-graph-node-hit{width:16px;height:16px}
  .memory-graph-node--file .memory-graph-node-hit,.memory-graph-node--agent .memory-graph-node-hit,.memory-graph-node--memory .memory-graph-node-hit{width:9px;height:9px;box-shadow:none}
  .memory-graph-node--memory-rollup .memory-graph-node-hit{width:13px;height:13px;border:1px solid rgb(199 215 178/48%);box-shadow:0 0 0 5px rgb(199 215 178/7%)}
  .memory-graph-node--policy .memory-graph-node-hit{width:12px;height:12px}
  .memory-graph-node--common-memory .memory-graph-node-hit,.memory-graph-node--company-memory .memory-graph-node-hit,.memory-graph-node--pin-summary .memory-graph-node-hit{width:11px;height:11px}
  .memory-graph-node--source .memory-graph-node-copy,.memory-graph-node--knowledge-base .memory-graph-node-copy,.memory-graph-node--skill .memory-graph-node-copy,.memory-graph-node--policy .memory-graph-node-copy,.memory-graph-node--route .memory-graph-node-copy,.memory-graph-node--common-memory .memory-graph-node-copy,.memory-graph-node--company-memory .memory-graph-node-copy,.memory-graph-node--pin-summary .memory-graph-node-copy,.memory-graph-node--file .memory-graph-node-copy,.memory-graph-node--agent .memory-graph-node-copy,.memory-graph-node--memory .memory-graph-node-copy,.memory-graph-node--memory-rollup .memory-graph-node-copy{
    left:50%;top:auto;bottom:calc(100% + 8px);padding:6px 8px;border:1px solid rgb(199 215 178/18%);border-radius:7px;
    background:rgb(5 13 10/96%);opacity:0;visibility:hidden;transform:translate(-50%,4px)}
  .memory-graph-node--source .memory-graph-node-copy{
    left:calc(100% + 7px);top:50%;bottom:auto;padding:0;border:0;background:transparent;
    opacity:1;visibility:visible;transform:translateY(-50%)}
  .memory-graph-node--tier[data-tier="L0"]{--tier-color:var(--memory-tier-l0)}
  .memory-graph-node--tier[data-tier="L1"]{--tier-color:var(--memory-tier-l1)}
  .memory-graph-node--tier[data-tier="L2"]{--tier-color:var(--memory-tier-l2)}
  .memory-graph-node--tier[data-tier="L3"]{--tier-color:var(--memory-tier-l3)}
  .memory-graph-node--tier .memory-graph-dot{background:var(--tier-color);box-shadow:0 0 9px color-mix(in srgb,var(--tier-color) 72%,transparent)}
  .memory-graph-node[data-tier="L0"] .memory-graph-dot{background:var(--memory-tier-l0)}
  .memory-graph-node[data-tier="L1"] .memory-graph-dot{background:var(--memory-tier-l1)}
  .memory-graph-node[data-tier="L2"] .memory-graph-dot{background:var(--memory-tier-l2)}
  .memory-graph-node[data-tier="L3"] .memory-graph-dot{background:var(--memory-tier-l3);box-shadow:none}
  .memory-graph-share{position:absolute;left:calc(100% + 7px);top:calc(50% + 12px);color:var(--gold);font:600 8px var(--font-mono);white-space:nowrap;opacity:0}
  .memory-graph-node.is-collapsed,.memory-graph-edge.is-collapsed{opacity:0;visibility:hidden;pointer-events:none}
  .memory-graph-node.is-filtered,.memory-graph-edge.is-filtered{opacity:0;pointer-events:none}
  .memory-graph-viewport[data-focus] .memory-graph-edge{opacity:.05}.memory-graph-viewport[data-focus] .memory-graph-edge.is-on{opacity:.92}
  .memory-graph-viewport[data-focus] .memory-graph-node-hit{opacity:.28}.memory-graph-viewport[data-focus] .memory-graph-node-hit.is-on{opacity:1;border-color:rgb(199 215 178/52%)}
  .memory-graph-legend{position:relative;z-index:4;display:flex;flex-direction:column;padding:var(--s4);border-left:1px solid #e5e7eb;background:#fff;color:#111827}
  .memory-graph-panel{min-width:0}.memory-graph-panel[hidden]{display:none!important}
  /* The overview scrolls inside the legend instead of stretching to it, so the
     lane key sits under the counts rather than pinned against the bottom edge. */
  .memory-graph-panel--overview{display:flex;flex:1;min-height:0;flex-direction:column;gap:var(--s4);overflow-y:auto;scrollbar-width:thin}
  .memory-graph-panel-title{color:var(--ink);font:600 12px var(--font-sans);letter-spacing:0;text-transform:none}
  .memory-graph-panel--details{height:100%;overflow-y:auto;scrollbar-width:thin}.memory-graph-panel-back{display:inline-flex;align-items:center;align-self:flex-start;gap:7px;margin:0 0 var(--s4);padding:0;border:0;background:none;color:var(--muted-2);font:10px var(--font-mono);cursor:pointer}.memory-graph-panel-back:hover{color:var(--evergreen)}.memory-graph-panel-back:focus-visible{outline:2px solid var(--evergreen);outline-offset:4px;border-radius:2px}
  .memory-graph-panel-heading>span{color:var(--evergreen);font:9px/1.3 var(--font-mono);letter-spacing:.12em;text-transform:uppercase}.memory-graph-panel-heading h3{margin:6px 0 0;color:var(--ink);font-size:18px;font-weight:550;line-height:1.2;overflow-wrap:anywhere}.memory-graph-panel-heading p{margin:5px 0 0;color:var(--muted-2);font:10px/1.4 var(--font-mono)}
  .memory-graph-panel-summary{margin:var(--s4) 0;color:var(--muted);font-size:11.5px;line-height:1.55}.memory-graph-panel-meta{display:grid;gap:9px;margin:0;padding:12px 0;border-block:1px solid var(--line)}.memory-graph-panel-meta div{display:grid;grid-template-columns:58px minmax(0,1fr);gap:8px}.memory-graph-panel-meta dt{color:var(--muted-2);font:9px var(--font-mono);text-transform:uppercase}.memory-graph-panel-meta dd{margin:0;color:var(--ink);font-size:10.5px;overflow-wrap:anywhere}
  .memory-graph-panel-connections{padding-top:var(--s4)}.memory-graph-panel-connections>div{display:flex;flex-direction:column;gap:3px}.memory-graph-panel-connections>div span{color:var(--muted-2);font:9px var(--font-mono);text-transform:uppercase}.memory-graph-panel-connections>div b{color:var(--ink);font-size:11px;font-weight:500}.memory-graph-children{display:grid;gap:8px;margin:12px 0 0;padding:0;list-style:none}.memory-graph-child{display:grid;grid-template-columns:9px minmax(0,1fr);align-items:center;gap:8px}.memory-graph-child-dot{width:6px;height:6px;border-radius:50%;background:var(--sage)}.memory-graph-child-dot[data-kind="backend"]{background:var(--olive)}.memory-graph-child-dot[data-kind="skill"]{background:var(--slate)}.memory-graph-child-dot[data-kind="policy"]{background:var(--gold)}.memory-graph-child b,.memory-graph-child small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.memory-graph-child b{color:var(--ink);font-size:10.5px;font-weight:500}.memory-graph-child small{margin-top:1px;color:var(--muted-2);font:8.5px var(--font-mono)}.memory-graph-panel-empty,.memory-graph-panel-more{margin:10px 0 0;color:var(--muted-2);font-size:10px}.memory-graph-panel-more{font-family:var(--font-mono)}
  /* Legend counts: the kind's own colour as an icon, label, number on the end. */
  .memory-graph-statlist{display:grid;gap:8px;margin:8px 0 0;padding:0;list-style:none}
  .memory-graph-stat{--stat-color:var(--sage);display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;
    gap:10px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:var(--r-sm);
    background:#f9fafb;box-shadow:0 1px 2px rgb(16 24 40/4%)}
  .memory-graph-stat[data-kind="backend"]{--stat-color:var(--olive)}
  .memory-graph-stat[data-kind="skill"]{--stat-color:var(--slate)}
  .memory-graph-stat[data-kind="policy"]{--stat-color:var(--gold)}
  .memory-graph-stat[data-kind="agent"]{--stat-color:var(--evergreen)}
  .memory-graph-stat-icon{display:grid;place-items:center;width:26px;height:26px;border-radius:8px;
    background:color-mix(in srgb,var(--stat-color) 20%,#fff);color:color-mix(in srgb,var(--stat-color) 72%,var(--ink))}
  .memory-graph-stat-label{min-width:0;color:var(--ink);font-size:12.5px;font-weight:500;line-height:1.35}
  .memory-graph-stat b{color:var(--ink);font:500 15px var(--font-mono);font-variant-numeric:tabular-nums}
  .memory-graph-key{display:flex;flex-direction:column;gap:10px;padding-top:var(--s4);border-top:1px solid #e5e7eb;
    color:var(--muted);font-size:11.5px}
  .memory-graph-key span{display:flex;align-items:center;gap:8px}.memory-graph-key-dot{width:9px;height:9px;border:2px solid var(--sage);border-radius:50%}
  .memory-graph-key-dot--older{width:7px;height:7px;border-color:var(--slate)}.memory-graph-key-line{width:20px;height:1px;flex:none;background:rgb(199 215 178/40%)}
  .memory-graph-key-line--source{background:var(--olive)}.memory-graph-key-line--update{background:var(--gold)}
  /* One lane per row: tier-tinted icon, tier code, name, and what it holds. */
  .memory-graph-lane{display:grid;grid-template-columns:26px auto minmax(0,1fr);align-items:center;column-gap:8px;margin:0}
  .memory-graph-lane>i[data-tier]{grid-row:1/span 2;display:grid;place-items:center;width:26px;height:26px;border-radius:8px;
    background:color-mix(in srgb,var(--tier-key) 20%,#fff);color:color-mix(in srgb,var(--tier-key) 72%,var(--ink))}
  .memory-graph-lane b{grid-row:1;min-width:19px;color:var(--ink);font:600 10px var(--font-mono)}
  .memory-graph-lane em{grid-row:1;overflow:hidden;color:var(--ink);font-size:12.5px;font-style:normal;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
  .memory-graph-lane small{grid-column:2/-1;grid-row:2;margin-top:2px;color:var(--muted);font:11px/1.45 var(--font-sans)}
  .memory-graph-tier-key i[data-tier="L0"]{--tier-key:var(--memory-tier-l0)}
  .memory-graph-tier-key i[data-tier="L1"]{--tier-key:var(--memory-tier-l1)}
  .memory-graph-tier-key i[data-tier="L2"]{--tier-key:var(--memory-tier-l2)}
  .memory-graph-tier-key i[data-tier="L3"]{--tier-key:var(--memory-tier-l3)}
  .memory-graph-key-edge{display:flex;align-items:center;gap:8px;margin:2px 0 0;color:var(--muted);font-size:11.5px}
  /* Viewport transform: clusters, edges and nodes zoom and pan together while
     the dotted backdrop, the control stack and the hint stay pinned. */
  .memory-graph-canvas{position:absolute;left:0;right:0;top:50%;height:800px;
    transform:translate(var(--pan-x,0px),calc(-50% + var(--pan-y,0px))) scale(var(--zoom,1));transform-origin:50% 50%;
    transition:transform .16s ease-out;will-change:transform}
  .memory-graph-viewport.is-panning{cursor:grabbing}
  .memory-graph-viewport.is-panning .memory-graph-canvas{transition:none}
  .memory-graph-controls{position:absolute;z-index:6;top:12px;right:12px;display:flex;flex-direction:column;
    border:1px solid rgb(199 215 178/16%);border-radius:var(--r-sm);background:rgb(5 11 10/86%);overflow:hidden}
  .memory-graph-control{position:relative;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-bottom:1px solid rgb(199 215 178/12%);
    background:none;color:rgb(243 246 238/72%);font:400 15px var(--font-mono);cursor:pointer;transition:background .18s ease,color .18s ease}
  .memory-graph-control:last-child{border-bottom:0}
  .memory-graph-control:hover:not(:disabled){background:rgb(199 215 178/12%);color:var(--mineral)}
  .memory-graph-control:focus-visible{outline:none;box-shadow:inset 0 0 0 2px rgb(199 215 178/42%)}
  .memory-graph-control:disabled{color:rgb(243 246 238/24%);cursor:not-allowed}
  .memory-graph-control-tip{position:absolute;right:calc(100% + 7px);top:50%;transform:translateY(-50%);padding:4px 7px;border:1px solid rgb(199 215 178/16%);
    border-radius:var(--r-sm);background:rgb(5 11 10/94%);color:var(--mineral);font:500 10px var(--font-sans);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .12s ease}
  .memory-graph-control:hover .memory-graph-control-tip,.memory-graph-control:focus-visible .memory-graph-control-tip{opacity:1}
  .memory-graph-hint{position:absolute;z-index:5;left:0;right:0;bottom:0;margin:0;padding:9px var(--s4);
    background:linear-gradient(to top,rgb(5 11 10/82%),transparent);color:rgb(243 246 238/40%);font:9.5px var(--font-mono);text-align:center}
  .memory-graph.is-fullscreen .memory-graph-shell{position:fixed;z-index:70;inset:16px;display:flex;flex-direction:column;margin:0}
  .memory-graph.is-fullscreen .memory-graph-layout{flex:1;min-height:0}
  .memory-graph.is-fullscreen .memory-graph-viewport{height:100%}
  /* Full screen is the one place the composition should use all the room. */
  .memory-graph.is-fullscreen .memory-graph-canvas{height:100%}
  /* Search matches: dim the rest of the canvas, keep every hit lit. */
  .memory-graph-viewport.is-searching .memory-graph-node{opacity:.16}
  .memory-graph-viewport.is-searching .memory-graph-node.is-match{opacity:1}
  .memory-graph-viewport.is-searching .memory-graph-node.is-match .memory-graph-node-hit{border-color:rgb(244 211 94/72%);box-shadow:0 0 0 4px rgb(244 211 94/16%)}
  .memory-graph-viewport.is-searching .memory-graph-edge{opacity:.06}
  .memory-graph-stats{margin:5px 0 0;color:var(--muted);font:500 12.5px/1.4 var(--font-sans)}
  .memory-graph-head .pill{font:600 12px var(--font-sans);letter-spacing:0;text-transform:none}
  /* Space picker: the spaces the server authorized, nothing invented. */
  /* Rides in the title row's action slot - on its own line it left an empty
     band down the left of the page between the title and the graph. */
  .memory-scope{position:relative;display:flex;flex:none;justify-content:flex-end}
  .memory-scope-trigger{min-height:36px;display:inline-flex;align-items:center;gap:9px;padding:8px 12px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--panel);color:var(--ink);font-size:13px;cursor:pointer}
  .memory-scope-trigger:hover{border-color:var(--evergreen)}
  .memory-scope-trigger:focus-visible{outline:none;box-shadow:var(--focus)}
  .memory-scope-trigger>span{color:var(--muted-2);font:10px var(--font-mono);letter-spacing:.1em;text-transform:uppercase}
  .memory-scope-trigger>b{font-weight:600}
  .memory-scope-menu{position:absolute;z-index:20;top:calc(100% + 6px);right:0;min-width:236px;display:grid;gap:1px;padding:6px;
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--panel);box-shadow:var(--sh-1),var(--sh-2)}
  .memory-scope-menu[hidden]{display:none}
  /* The pick is optimistic: the trigger already shows the new space while the
     scoped graph is still in flight, so it has to read as pending. */
  .memory-scope.is-loading{cursor:progress}
  .memory-scope.is-loading .memory-scope-trigger{opacity:.62;animation:blink 1.1s ease-in-out infinite}
  .memory-scope-option{min-height:40px;display:flex;align-items:center;gap:9px;width:100%;padding:8px 9px;border:0;border-radius:var(--r-sm);
    background:none;color:var(--ink);font-size:13px;text-align:left;cursor:pointer}
  .memory-scope-option:hover{background:var(--mist)}
  .memory-scope-option:focus-visible{outline:none;box-shadow:var(--focus)}
  .memory-scope-tick{width:14px;height:14px;flex:none;border:1px solid var(--line);border-radius:3px}
  .memory-scope-option[aria-selected="true"] .memory-scope-tick{border-color:var(--evergreen);background:var(--evergreen);
    box-shadow:inset 0 0 0 3px var(--panel)}
  .memory-scope-option[aria-selected="true"]{font-weight:600}
  /* Find a node: search over the loaded graph, matches lit on the canvas. */
  .memory-graph-find{padding-bottom:var(--s4);margin-bottom:var(--s4);border-bottom:1px solid #e5e7eb}
  .memory-graph-find-field{position:relative;display:block}
  .memory-graph-find-input{width:100%;min-height:38px;padding:8px 30px 8px 10px;border:1px solid #e5e7eb;border-radius:var(--r-sm);
    background:#fff;color:#111827;font:12px var(--font-sans)}
  .memory-graph-find-input::placeholder{color:var(--muted-2)}
  .memory-graph-find-input:focus-visible{outline:none;border-color:var(--olive);box-shadow:var(--focus)}
  .memory-graph-find-field kbd{position:absolute;right:8px;top:50%;transform:translateY(-50%);padding:2px 5px;border:1px solid #e5e7eb;
    border-radius:3px;color:var(--muted-2);font:9px var(--font-mono)}
  .memory-graph-find-input:focus-visible~kbd{opacity:0}
  .memory-graph-find-results{display:grid;gap:2px;margin:8px 0 0;padding:0;max-height:196px;overflow-y:auto;list-style:none;scrollbar-width:thin}
  .memory-graph-find-result,.memory-graph-link{display:grid;grid-template-columns:8px minmax(0,1fr);align-items:center;gap:8px;width:100%;padding:7px 8px;
    border:0;border-radius:var(--r-sm);background:none;color:inherit;text-align:left;cursor:pointer;transition:background .15s ease}
  .memory-graph-find-result:hover,.memory-graph-link:hover{background:var(--sage-soft)}
  .memory-graph-find-result:focus-visible,.memory-graph-link:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--evergreen)}
  .memory-graph-find-result b,.memory-graph-link b{overflow:hidden;color:var(--ink);font-size:10.5px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
  .memory-graph-find-result small,.memory-graph-link small{grid-column:2;color:var(--muted-2);font:8.5px var(--font-mono);text-transform:uppercase}
  .memory-graph-link small{grid-row:1}.memory-graph-link b{grid-column:2;grid-row:2}
  .memory-graph-find-status{margin:8px 0 0;color:var(--muted-2);font:9.5px var(--font-mono)}
  .memory-graph-panel-links{padding-top:var(--s4)}
  .memory-graph-panel-linkhead{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-top:12px}
  .memory-graph-panel-linkhead:first-child{margin-top:0}
  .memory-graph-panel-linkhead span{color:var(--muted-2);font:9px var(--font-mono);text-transform:uppercase}
  .memory-graph-panel-linkhead b{color:var(--ink);font:500 11px var(--font-mono)}
  .memory-graph-linklist{display:grid;gap:1px;margin:5px 0 0;padding:0;list-style:none}
  .memory-graph-linklist[hidden]{display:none}
  .memory-graph-unavailable{min-height:180px;display:flex;align-items:center;justify-content:center;gap:var(--s3);padding:var(--s5);text-align:left}
  .memory-graph-unavailable h3{color:var(--mineral);font-size:17px}.memory-graph-unavailable p{margin:var(--space-text) 0 0;color:rgb(243 246 238/48%);font-size:12px}
  @media(max-width:960px){.memory-graph-layout{grid-template-columns:1fr}.memory-graph-legend{display:block;border-top:1px solid var(--line);border-left:0}.memory-graph-panel--overview{overflow:visible}.memory-graph-panel--details{max-height:360px}
    .memory-graph-statlist{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .memory-graph-key{flex-direction:row;flex-wrap:wrap;gap:12px 16px}.memory-graph-key .memory-graph-panel-title{flex-basis:100%}
    .memory-graph-lane{flex:1 1 200px}.memory-graph-key-edge{flex-basis:100%}}
  @media(max-width:720px){.memory-graph-head{align-items:flex-start;flex-direction:column;gap:var(--s3)}
    .memory-graph-toolbar{padding-inline:10px}.memory-graph-layout{display:block;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin}
    .memory-graph-viewport{min-width:600px}.memory-graph-tooltip{width:50vw;max-width:160px}.memory-graph-node-hit[data-tooltip-align="center"] .memory-graph-tooltip{transform:translate(-58%,5px)}.memory-graph-node-hit[data-tooltip-align="center"]:hover .memory-graph-tooltip,.memory-graph-node-hit[data-tooltip-align="center"]:focus-visible .memory-graph-tooltip{transform:translate(-58%,0)}
    .memory-graph-statlist{grid-template-columns:minmax(0,1fr)}}
  @media(prefers-reduced-motion:reduce){.memory-graph-edge,.memory-graph-node{animation:none}.memory-graph-node,.memory-graph-edge,.memory-graph-node-hit{transition:none}}


  /* S7 knowledge review sync activity. Knowledge Operations deliberately rides
     Home's shell, type ramp, cards and metric strip; these rules cover only
     compositions Home does not have: operation steps, review/activity rows,
     and the shared management right-panel bodies. */
  .knowledge-operations{font-family:var(--content-font,var(--font-body))}
  .knowledge-operations>.screen-flow{gap:18px}
  .knowledge-operations .knowledge-metrics{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
  .knowledge-operations .knowledge-metrics .v{font-size:clamp(20px,2vw,26px);overflow-wrap:anywhere}
  .knowledge-operations .knowledge-metrics .metric-card-shell:has(.knowledge-metric-value-only){justify-content:center}
  .knowledge-operations .knowledge-metrics .v:has(.knowledge-metric-value-only){display:flex;flex:1;align-items:center;
    justify-content:flex-start;min-height:48px;overflow:visible}
  .knowledge-metric-value-only{display:block;font-size:clamp(34px,3vw,42px);font-weight:650;line-height:1;
    letter-spacing:-.035em;font-variant-numeric:tabular-nums}
  /* A text state ("Team scoped", "Unavailable") is not a measurement: body
     size and muted, so it reads as a note rather than a broken figure. */
  .knowledge-metric-text{display:block;color:var(--home-muted,#6b7280);font-size:13px;font-weight:600;
    line-height:1.35;letter-spacing:0}
  .knowledge-dashboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
  .knowledge-update-card,.knowledge-health-card{display:flex;min-height:100%;flex-direction:column}
  .knowledge-operation-steps,.knowledge-update-preview{display:grid;gap:8px;margin-top:14px;padding:0 4px}
  .knowledge-operation-step{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:10px;
    padding:10px 12px;border:1px solid var(--home-border,var(--line));border-radius:var(--r-md);
    background:var(--home-canvas,var(--surface-soft));box-shadow:var(--sh-1)}
  .knowledge-operation-step>.home-overview-row-icon{font:650 11px/1 var(--font-mono)}
  .knowledge-operation-step>div{display:grid;min-width:0;gap:2px}
  .knowledge-operation-step strong{color:var(--home-text,var(--ink));font-size:13px;font-weight:600;line-height:1.35}
  .knowledge-operation-step span:last-child{line-height:1.4}

  .knowledge-review-lane,.knowledge-activity-lane{grid-column:1/-1}
  .knowledge-review-list,.knowledge-activity-list{display:grid;padding:0 4px}
  .knowledge-review-row,.knowledge-activity-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;
    align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--home-border,var(--line))}
  .knowledge-review-row:last-child,.knowledge-activity-row:last-child{border-bottom:0}
  .knowledge-review-row>.home-overview-row-icon,.knowledge-activity-row>.home-overview-row-icon{align-self:start;margin-top:1px}
  .knowledge-review-row>.home-overview-row-icon svg{width:15px;height:15px}
  .knowledge-review-copy{min-width:0}
  .knowledge-review-head{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
  .knowledge-review-head strong{min-width:0;overflow:hidden;color:var(--home-text,var(--ink));font-size:13px;
    font-weight:600;text-overflow:ellipsis;white-space:nowrap}
  .knowledge-review-head .heading-info{flex:none}
  .knowledge-review-row>.home-card-link{width:auto;padding:7px 11px;border-radius:8px;font-size:12px;gap:7px}
  .knowledge-review-row>.home-card-link svg{width:13px;height:13px}
  .knowledge-activity-row>div:nth-child(2){display:grid;min-width:0;gap:3px}
  .knowledge-activity-row strong{overflow:hidden;color:var(--home-text,var(--ink));font-size:13px;font-weight:600;
    text-overflow:ellipsis;white-space:nowrap}
  .knowledge-activity-state{display:grid;min-width:128px;justify-items:end;gap:5px}
  .knowledge-unavailable-row{display:grid;gap:4px;margin:0 4px;padding:16px;border:1px dashed var(--home-border,var(--line));
    border-radius:var(--r-md);background:var(--home-canvas,var(--surface-soft));color:var(--home-muted,var(--muted));font-size:12.5px}
  .knowledge-unavailable-row strong{color:var(--home-text,var(--ink));font-size:13px}

  .source-wizard-dialog.knowledge-operations-drawer{width:min(560px,100vw);border-left-color:var(--content-border,var(--line))}
  .knowledge-operations-drawer.console-right-panel__dialog>.source-wizard-head{padding:22px 24px 16px}
  .knowledge-operations-drawer .source-wizard-head h3{max-width:430px;overflow:hidden;font-size:18px;line-height:1.3;
    text-overflow:ellipsis;white-space:nowrap}
  .knowledge-operations-drawer .console-right-panel__body{display:flex;flex-direction:column;gap:18px;padding:0 24px 24px;
    color:var(--content-text,var(--ink));font-family:var(--content-font,var(--font-body))}
  .knowledge-drawer-copy{margin:0;color:var(--content-muted,var(--muted));font-size:13px;line-height:1.55}
  .knowledge-drawer-copy p{margin:0}
  .knowledge-update-preview{margin:0;padding:0}
  .knowledge-index-note{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--content-border,var(--line));
    border-radius:var(--r-md);background:var(--content-inset,var(--surface-soft));font-size:12.5px;line-height:1.45}
  .knowledge-index-note strong{color:var(--content-text,var(--ink));font-size:13px}
  .knowledge-index-note span{color:var(--content-muted,var(--muted))}
  .knowledge-drawer-actions,.knowledge-proposal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .knowledge-sync-status,.knowledge-proposal-status{min-height:18px;font-size:12px}

  .knowledge-health-summary{display:flex;align-items:baseline;gap:8px;padding-bottom:16px;border-bottom:1px solid var(--content-border,var(--line))}
  .knowledge-health-summary>.num{font-size:34px;font-weight:650;line-height:1;letter-spacing:-.02em}
  .knowledge-health-summary>.pill{margin-left:auto}
  .knowledge-health-details{display:grid;gap:14px}
  .knowledge-health-detail{display:grid;gap:8px;padding:14px;border:1px solid var(--content-border,var(--line));
    border-radius:var(--r-md);background:var(--content-inset,var(--surface-soft));box-shadow:var(--content-shadow,var(--sh-1))}
  .knowledge-health-detail-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
  .knowledge-health-detail-head>div{display:flex;align-items:center;gap:8px;min-width:0}
  .knowledge-health-detail-head strong{font-size:13px;font-weight:600}
  .knowledge-health-detail-head>.num{font-size:16px;font-weight:650}
  .knowledge-health-detail p{margin:0;color:var(--content-muted,var(--muted));font-size:12px;line-height:1.5}
  .knowledge-health-detail .btn{justify-self:start}

  .knowledge-proposal-detail{display:flex;flex-direction:column;gap:16px}
  .knowledge-proposal-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--content-muted,var(--muted));font-size:11.5px}
  .knowledge-proposal-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .knowledge-proposal-compare section{min-width:0;padding:12px;border:1px solid var(--content-border,var(--line));
    border-radius:var(--r-md);background:var(--content-inset,var(--surface-soft))}
  .knowledge-proposal-compare section>span{display:block;color:var(--content-faint,var(--muted-2));font:600 10px/1.3 var(--font-mono);
    letter-spacing:.08em;text-transform:uppercase}
  .knowledge-proposal-compare p{margin:8px 0 0;color:var(--content-body,var(--ink));font-size:12.5px;line-height:1.55;white-space:pre-wrap}
  .knowledge-proposal-detail textarea{resize:vertical;min-height:150px;line-height:1.55}
  .knowledge-proposal-actions>.subtle{flex-basis:100%;line-height:1.45}

  @media(max-width:960px){
    .knowledge-dashboard{grid-template-columns:1fr}
    .knowledge-review-lane,.knowledge-activity-lane{grid-column:1}
  }
  @media(max-width:680px){
    .knowledge-operations>.screen-flow{gap:14px}
    .knowledge-review-row,.knowledge-activity-row{grid-template-columns:30px minmax(0,1fr);align-items:start}
    .knowledge-review-row>.home-card-link,.knowledge-activity-state{grid-column:2;justify-self:start;justify-items:start}
    .knowledge-review-head strong{white-space:normal}
    .knowledge-proposal-compare{grid-template-columns:1fr}
    .knowledge-operations-drawer .console-right-panel__body{padding:0 16px 20px}
  }
  @media(min-width:1181px) and (max-width:1400px){
    .knowledge-operations>.screen-flow{gap:14px}
    .knowledge-dashboard{gap:14px}
    .knowledge-operation-steps{gap:6px;margin-top:11px;padding:0 2px}
    .knowledge-operation-step{padding:8px 10px;border-radius:10px}
    .knowledge-operation-step strong,.knowledge-review-head strong,.knowledge-activity-row strong{font-size:11.5px}
    .knowledge-review-row,.knowledge-activity-row{padding:10px 0}
  }

  /* S6 sources - plain-language connection management. */
  .source-screen [data-source-page-content]{min-width:0;display:grid;gap:var(--space-section)}
  .source-screen [data-source-page-content]>*{min-width:0;margin-block:0}
  .source-screen [data-source-flow-panel]:not([hidden]){min-width:0;display:grid;gap:var(--space-group)}
  .source-screen [data-source-flow-panel]>*{margin-block:0}
  .source-screen .head,.source-screen .card,.source-screen .source-browser{margin-bottom:0}
  .source-sync-card h2{font-size:18px}
  .source-sync-card .tblwrap{margin-top:var(--s4)}
  .source-sync-notice{margin-top:var(--s3);padding:9px 12px;border-radius:var(--r-sm);background:var(--sage-soft);
    color:var(--muted);font-size:13px}
  .source-sync-state{display:grid;justify-items:start;gap:5px;max-width:320px}
  .source-sync-message{font-size:13px;font-weight:600;color:var(--ink)}
  .source-sync-help{color:var(--muted);font-size:12px;line-height:1.45}
  .source-technical-details{max-width:100%;color:var(--muted-2);font-size:11px}
  .source-technical-details summary{width:max-content;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
  .source-technical-details code{display:block;max-width:300px;margin-top:5px;padding:7px 9px;overflow-wrap:anywhere;
    border-radius:var(--r-xs);background:var(--mineral);font:10.5px/1.45 var(--font-mono)}
  .source-page-search{position:relative;display:block;width:min(320px,34vw)}
  .source-page-search svg{position:absolute;left:13px;top:50%;width:17px;height:17px;transform:translateY(-50%);color:var(--muted-2);pointer-events:none}
  .source-page-search input{width:100%;height:44px;border:1px solid var(--line);border-radius:var(--r-pill);
    background:var(--panel);color:var(--ink);font:14px var(--font-display);padding:0 16px 0 41px}
  .source-page-search input::placeholder{color:var(--muted-2)}
  .source-page-search input:focus{outline:none;border-color:var(--olive);box-shadow:var(--focus)}
  .source-browser{margin:0}
  .source-category-tabs{display:flex;flex-wrap:wrap;gap:var(--s2);overflow:visible;padding:0;margin:0}
  .source-catalog-disclosure>.compact-disclosure__body{display:grid;gap:var(--s4);padding:var(--s5)}
  .source-catalog-disclosure .source-page-search{width:min(360px,100%)}
  .source-catalog-disclosure .source-category-tabs{row-gap:var(--s2);column-gap:var(--s2);padding-block:var(--s1)}
  .source-category-tabs::-webkit-scrollbar{height:6px}
  .source-category-tabs::-webkit-scrollbar-track{background:transparent}
  .source-category-tabs::-webkit-scrollbar-thumb{background:var(--olive);border-radius:var(--r-pill)}
  .source-category-tab{min-height:38px;min-width:0;display:inline-flex;align-items:center;gap:var(--s2);flex:none;
    border:1px solid var(--line);border-radius:var(--r-pill);background:var(--panel);color:var(--ink);
    padding:7px 11px;font-family:var(--font-display);cursor:pointer;transition:border-color .14s,background .14s,transform .08s}
  .source-category-tab:hover{border-color:var(--olive);background:var(--sage-soft)}
  .source-category-tab:active{transform:translateY(1px)}
  .source-category-tab:focus-visible{outline:none;box-shadow:var(--focus)}
  .source-category-tab.is-active{border-color:var(--evergreen);background:var(--evergreen);color:var(--mineral)}
  .source-category-icon{display:none}
  .source-category-icon svg{width:16px;height:16px}
  .source-category-label{font-size:13px;font-weight:500;white-space:nowrap}
  .source-category-count{min-width:24px;border-radius:var(--r-pill);background:var(--sage-soft);padding:1px 7px;
    text-align:center;font-size:11px;color:var(--muted)}
  .source-category-tab.is-active .source-category-count{background:rgb(243 246 238/16%);color:var(--mineral)}
  .source-category-summary{position:relative;display:flex;align-items:center;justify-content:space-between;gap:var(--s5);
    margin:0;padding:var(--s5);border:1px solid var(--line);border-radius:var(--r-lg);
    background:var(--panel);color:var(--ink);box-shadow:var(--sh-1),var(--sh-2)}
  .source-summary-copy{max-width:650px}
  .source-summary-eyebrow,.source-category{font-family:var(--font-mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase}
  .source-summary-eyebrow{display:none}
  .source-category-summary h2{font-size:18px}
  .source-category-summary p{margin:3px 0 0;color:var(--muted);font-size:13px}
  .source-summary-stats{display:flex;align-items:center;gap:var(--s4);min-width:0}
  .source-summary-stats>div{display:flex;align-items:baseline;gap:5px;color:var(--muted);font-size:12px;white-space:nowrap}
  .source-summary-stats strong{order:-1;font-size:19px;line-height:1;font-weight:600;color:var(--ink)}
  .source-summary-stats .is-connected strong{color:var(--evergreen)}
  .source-results-line{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);margin:0 2px;
    color:var(--muted-2);font-size:12.5px}
  .source-governed-label{display:inline-flex;align-items:center;gap:7px;font-family:var(--font-mono);font-size:9.5px;
    letter-spacing:.1em;text-transform:uppercase;color:var(--evergreen)}
  .source-governed-label svg{width:15px;height:15px}
  .source-connector-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:var(--s5)}
  .source-connector-card{min-width:0;min-height:250px;display:flex;flex-direction:column;gap:var(--s4);overflow:hidden;
    border:1px solid var(--line);border-radius:var(--r-lg);background:var(--panel);color:var(--ink);
    padding:var(--s5);content-visibility:auto;contain-intrinsic-size:auto 260px;
    box-shadow:var(--sh-1),var(--sh-2);transition:transform .16s,border-color .16s,box-shadow .16s}
  .source-connector-card[data-connected-count]:not([data-connected-count="0"]){border-color:rgb(63 125 84/38%);
    background:color-mix(in srgb,var(--panel) 84%,var(--sage-soft))}
  .source-connector-card:hover{transform:translateY(-2px);border-color:var(--olive);box-shadow:var(--sh-1),var(--sh-3)}
  .source-connector-card:focus-within{outline:none;box-shadow:var(--focus)}
  .source-connector-top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s3)}
  .source-logo{position:relative;width:50px;height:50px;display:grid;place-items:center;flex:none;overflow:hidden;
    border:1px solid var(--line);
    border-radius:var(--r-md);background:var(--mineral);color:var(--evergreen);box-shadow:none;
    font-family:var(--font-brand);font-size:16px;font-weight:600;letter-spacing:-.03em}
  .source-logo-fallback{position:absolute;inset:0;display:grid;place-items:center}
  .source-logo-image{position:absolute;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);
    object-fit:contain;background:var(--mineral)}
  .source-logo-image[hidden]{display:none}
  .source-logo[data-logo-kind="glyph"]{background:var(--sage-soft);color:var(--evergreen)}
  .source-logo svg{width:23px;height:23px}
  .source-connected-badge,.source-available-badge{display:inline-flex;align-items:center;gap:6px;border-radius:var(--r-pill);
    padding:4px 9px;font-family:var(--font-mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase}
  .source-connected-badge{border:1px solid rgb(63 125 84/30%);background:var(--sage-soft);color:#315f42}
  .source-connected-badge i{width:6px;height:6px;border-radius:50%;background:#3f7d54}
  .source-available-badge{border:1px solid var(--line);font-size:12px;line-height:1.4;color:var(--muted)}
  .source-connector-copy .source-category{display:block;color:var(--muted-2);margin-bottom:6px}
  .source-connector-copy h3{font-size:20px;color:var(--ink)}
  .source-connector-copy p{min-height:40px;margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
  .source-data-points{display:grid;gap:6px;margin:var(--s3) 0 0;padding:0;list-style:none}
  .source-data-points li{display:flex;align-items:center;gap:8px;color:rgb(243 246 238/56%);font-size:11.5px}
  .source-data-points i{width:4px;height:4px;border-radius:50%;background:var(--sage);flex:none}
  .source-connections{display:grid;gap:8px;margin:0;padding:0;list-style:none}
  .source-connections>li,.source-standalone-list>li{min-width:0}
  .source-connection{min-width:0;border:1px solid var(--line);border-radius:var(--r-md);
    background:var(--mineral);padding:var(--s3);color:var(--ink);box-shadow:var(--sh-1)}
  .source-connection-head{display:flex;align-items:flex-start;gap:9px}
  .source-connection-brand{position:relative;width:40px;height:40px;flex:none}
  .source-connection-brand .source-logo{width:40px;height:40px;font-size:13px}
  .source-connection-brand .source-logo svg{width:18px;height:18px}
  .source-connection-brand .source-logo-image{inset:5px;width:calc(100% - 10px);height:calc(100% - 10px)}
  .source-connection-brand .source-connection-state{position:absolute;right:-6px;bottom:-6px;width:17px;height:17px;
    border-radius:50%;background:var(--mineral);border:1px solid var(--line)}
  .source-connection-brand .source-connection-state svg{width:10px;height:10px}
  .source-connection-state{width:20px;height:20px;display:grid;place-items:center;flex:none;color:var(--muted)}
  .source-connection-state svg{width:17px;height:17px}
  .source-connection-state.pill--ok,.source-connection-state.pill--live{color:#3f7d54}
  .source-connection-state.pill--warn{color:#8a6d1f}
  .source-connection-state.pill--crit{color:var(--rust)}
  .source-connection-identity{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px}
  .source-connection-identity h4{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;letter-spacing:-.01em}
  .source-connection-identity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:1.4;
    color:var(--muted);letter-spacing:.04em;text-transform:none}
  .source-connection .pill{flex:none}
  .source-connection-error{display:grid;justify-items:start;gap:5px;margin:8px 0 var(--space-group);padding:9px 11px;border-left:2px solid var(--rust);background:rgb(232 60 0/5%);
    color:var(--ink);font-size:11px;line-height:1.45;overflow-wrap:anywhere}
  .source-connection-error .source-sync-state{max-width:none}
  .source-connection>.compact-disclosure{margin-top:var(--s3)}
  .source-connection-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 0}
  .source-connection-details>div{min-width:0;padding:7px 9px;border-radius:var(--r-sm);background:var(--panel)}
  .source-connection-details dt{display:block;margin-bottom:3px;font-family:var(--font-mono);font-size:12px;
    line-height:1.4;color:var(--muted-2);letter-spacing:.08em;text-transform:uppercase}
  .source-connection-details dd{margin:0;font-size:11px;color:var(--ink)}
  .source-connection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:9px}
  /* S21 channel connections compose source-connection with children S6 never
     nests (state-pill row, OAuth row, stacked disclosures). Give that variant
     the standard vertical rhythm from the spacing scale. */
  /* The connected/new sub-tab panels each wrap one or more cards; keep the
     screen-flow section rhythm inside them. */
  .s21-tab-panel{display:grid;gap:var(--space-section);align-content:start}
  .s21-tab-panel[hidden]{display:none}
  body[data-console-screen="s21"] .source-standalone-list{
    grid-template-columns:repeat(auto-fill,minmax(360px,1fr))}
  body[data-console-screen="s21"] .source-standalone-list>li{display:flex}
  .s21-connection{display:flex;flex-direction:column;width:100%;height:100%}
  .s21-connection .source-connection-identity{align-self:center}
  .s21-connection .source-connection-identity h4{font-size:16px;line-height:1.35}
  .s21-connection>.row{flex-wrap:wrap;margin-top:var(--space-text)}
  .s21-connection>.compact-disclosure{margin-top:var(--s3)}
  .s21-connection>.compact-disclosure+.compact-disclosure{margin-top:var(--space-text)}
  .s21-connection>.compact-disclosure>summary>span:not(.pill):first-child>b,
  .s21-connection>.compact-disclosure>summary>span:not(.pill):first-child>small{
    display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .s21-provider-steps>.compact-disclosure__body{font-size:13px;line-height:1.5}
  .s21-connection>.source-connection-actions{margin-top:auto;padding-top:var(--s3)}
  .source-connection .btn--outline,.source-connection .btn--ghost{border:1px solid var(--line);background:var(--panel);color:var(--evergreen)}
  .source-connection .btn--solid{background:var(--evergreen);color:var(--mineral)}
  .source-connection .btn:hover{background:var(--sage-soft);color:var(--evergreen)}
  .source-schedule{display:flex;align-items:center;gap:5px}
  .source-schedule .select{min-width:82px;padding:5px 20px 5px 7px;border-color:var(--line);
    background-color:var(--panel);background-position:right 5px center;background-size:10px 10px;
    color:var(--ink);font-size:10px}
  .source-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
  .source-card-footer{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s3);margin-top:auto;padding-top:var(--s2);
    border-top:1px solid var(--line)}
  .source-card-meta{display:flex;flex-direction:column;gap:2px;font-family:var(--font-mono);font-size:12px;
    line-height:1.4;color:rgb(243 246 238/62%);letter-spacing:.08em;text-transform:uppercase}
  .source-card-action{all:unset;min-height:32px;box-sizing:border-box;display:inline-flex;align-items:center;gap:7px;
    padding:6px 4px;color:var(--evergreen);font-family:var(--font-display);
    font-size:12.5px;font-weight:600;cursor:pointer}
  .source-card-action:hover{color:var(--evergreen-hover)}
  .source-card-action:focus-visible{border-radius:var(--r-xs);box-shadow:var(--focus)}
  .source-card-action svg{width:15px;height:15px;transition:transform .14s}
  .source-card-action:hover svg{transform:translateX(2px)}
  @media(prefers-reduced-motion:reduce){
    .source-category-tab{transition:none}
    .source-category-tab:active{transform:none}
    .source-connector-card,.source-card-action svg{transition:none}
    .source-connector-card:hover,.source-card-action:hover svg{transform:none}
  }
  .source-catalog-empty{grid-column:1/-1;padding:var(--s5);text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:var(--r-md)}
  .source-standalone{margin:0;padding:var(--s5);border:1px solid var(--line);border-radius:var(--r-lg);background:var(--panel)}
  .source-standalone-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s4);margin-bottom:var(--s4)}
  .source-standalone-head-actions{display:flex;align-items:flex-end;flex-direction:column;gap:var(--s2)}
  .source-standalone-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:var(--s2)}
  .source-bulk-update-status{max-width:260px;text-align:right;font-size:12px}
  .source-standalone-head .source-category{color:var(--muted-2)}
  .source-standalone-head h2{margin-top:4px;font-size:20px}
  .source-standalone-head p{margin:var(--space-text) 0 0;color:var(--muted);font-size:13px}
  .source-scope-filter{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
    margin-bottom:var(--s4);padding-bottom:var(--s3);border-bottom:1px solid var(--line)}
  .source-scope-filter .filter-strip{margin:0;flex:1;min-width:0}
  .source-scope-filter .subtle{flex:none;font-size:12px;white-space:nowrap}
  /* Connected backends are small boxes, not full-width cards: the page shows
     the estate at a glance and every detail lives in the drawer a box opens. */
  .source-standalone-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(212px,1fr));
    gap:var(--s3);margin:0;padding:0;list-style:none}
  .source-tile{box-sizing:border-box;display:grid;grid-template-columns:40px minmax(0,1fr);
    gap:7px 10px;width:100%;min-width:0;padding:12px;border:1px solid var(--line);
    border-radius:var(--r-md);background:var(--mineral);color:var(--ink);text-align:left;
    font-family:inherit;box-shadow:var(--sh-1);cursor:pointer;
    transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}
  .source-tile:hover{border-color:var(--sage);box-shadow:var(--sh-2);transform:translateY(-1px)}
  .source-tile:focus-visible{outline:none;box-shadow:var(--focus)}
  .source-tile[aria-expanded="true"]{border-color:var(--evergreen);box-shadow:var(--sh-2)}
  .source-tile-identity{grid-column:2;display:flex;min-width:0;flex-direction:column;gap:2px}
  .source-tile-name{overflow:hidden;font-size:13px;font-weight:600;letter-spacing:-.01em;
    text-overflow:ellipsis;white-space:nowrap}
  .source-tile-scope{overflow:hidden;color:var(--muted);font-size:12px;line-height:1.4;
    text-overflow:ellipsis;white-space:nowrap}
  .source-tile-status{grid-column:2;justify-self:end;align-self:end;max-width:100%;overflow:hidden;
    padding:0;border:0!important;border-radius:0;background:transparent!important;box-shadow:none;
    font:500 10px/1.3 var(--font-body);letter-spacing:0;
    text-overflow:ellipsis;text-transform:none;white-space:nowrap}
  @media(prefers-reduced-motion:reduce){
    .source-tile{transition:none}
    .source-tile:hover{transform:none}
  }
  .source-file-register{margin-top:var(--s5);padding-top:var(--s4);border-top:1px solid var(--line)}
  .source-file-register-head{align-items:flex-start;margin-bottom:var(--s3)}
  .source-file-register-head h3{margin-top:4px;font-size:17px}
  .source-file-register-note{margin-top:var(--s2)}
  body.source-modal-open{overflow:hidden}
  .source-wizard-overlay[hidden]{display:none!important}
  .source-wizard-overlay{position:fixed;inset:0;z-index:80;display:flex;justify-content:flex-end;align-items:stretch;padding:0}
  .source-wizard-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgb(5 11 10/72%);
    backdrop-filter:blur(7px);cursor:pointer}
  .source-wizard-dialog{position:relative;z-index:1;width:min(760px,100vw);height:100dvh;
    max-height:none;overflow:auto;padding:var(--s5);border:0;border-left:1px solid #e5e7eb;
    border-radius:0;background:#fff;color:#111827;font-family:var(--font-sans);
    box-shadow:-24px 0 64px -40px rgb(16 24 40/36%);animation:source-drawer-enter .2s var(--ease-enter)}
  .source-wizard-head{align-items:flex-start;padding-bottom:var(--s4);border-bottom:1px solid #e5e7eb;background:#fff}
  .source-wizard-head h3{margin-top:3px;color:#111827;font-size:24px}
  .source-wizard-head p{margin:var(--space-text) 0 0;color:#6b7280;font-size:13px}
  .source-wizard-head [data-wizard-focus]:focus{outline:none}
  .console-right-panel__dialog{display:flex;flex-direction:column;padding:0;overflow:hidden}
  .console-right-panel__dialog>.source-wizard-head{flex:none;margin:0;padding:var(--s5)}
  .console-right-panel__context{display:flex;align-items:center;gap:6px;min-height:18px}
  .console-right-panel__nav-icon{width:18px;height:18px;display:grid;place-items:center;flex:none;color:var(--evergreen)}
  .console-right-panel__nav-icon[hidden]{display:none}
  .console-right-panel__nav-icon svg{width:16px;height:16px}
  .console-right-panel__body{min-height:0;overflow:auto;padding:var(--s5);background:#fff}
  .console-right-panel__body>:first-child{margin-top:0}
  .console-right-panel__body>:last-child{margin-bottom:0}
  .source-wizard-close{min-height:40px;display:inline-flex;align-items:center;gap:7px;border:1px solid #e5e7eb;
    border-radius:var(--r-pill);background:#fff;color:#374151;padding:7px 12px;
    font:500 12.5px var(--font-display);cursor:pointer}
  .source-wizard-close:hover{border-color:#9ca3af;background:#f9fafb}
  .source-wizard-close:focus-visible{outline:none;box-shadow:var(--focus)}
  .source-wizard-close svg{width:15px;height:15px}
  /* Back sits next to Close, and its label names the destination, so a
     drilled-down dialog says where leaving it puts you. */
  .source-wizard-head-acts{flex:none;align-items:center;gap:var(--s2);flex-wrap:wrap;justify-content:flex-end}
  .source-wizard-back{min-height:40px;max-width:220px;padding:7px 12px;border:1px solid #e5e7eb;
    border-radius:var(--r-pill);background:#fff;color:#374151}
  .source-wizard-back:hover{border-color:#9ca3af;background:#f9fafb}
  .source-wizard-back span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .source-wizard-back svg{width:15px;height:15px;flex:none}
  @media(max-width:560px){
    .source-wizard-head-acts{gap:6px}
    .source-wizard-back{max-width:150px}
  }
  .source-knowledge-dialog{width:min(780px,calc(100vw - 48px))}
  .source-knowledge-form-dialog{width:min(620px,100vw)}
  .source-knowledge-form{margin-top:var(--s4)}
  .source-scope-label{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.13em;
    text-transform:uppercase;color:var(--muted-2);margin-bottom:6px}
  .source-scope-static{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);min-height:42px;
    padding:9px 12px;border:1px solid rgb(var(--evergreen-rgb)/18%);border-radius:var(--r-sm);background:var(--mineral)}
  .source-scope-static strong{font-size:14px;font-weight:500}.source-scope-static small{color:var(--muted-2);font-size:11.5px}
  .source-access-control{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--s2);align-items:center}
  .source-inline-team{margin-top:var(--s2);padding:var(--s3);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
  .source-inline-team[hidden]{display:none}.source-inline-team .hint{min-height:16px;margin-top:var(--s1)}
  .source-knowledge-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3);margin-top:var(--s4)}
  .source-knowledge-option{min-width:0;min-height:190px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;
    padding:var(--s4);border:1px solid #d1d5db;border-radius:var(--r-md);background:var(--neutral-soft);color:#111827;
    font:inherit;text-align:left;cursor:pointer;transition:border-color .14s,background .14s,transform .14s}
  .source-knowledge-option:hover{border-color:#9ca3af;background:#e5e7eb;transform:translateY(-2px)}
  .source-knowledge-option:focus-visible{outline:none;box-shadow:var(--focus)}
  .source-knowledge-option .source-category,.source-knowledge-option strong{color:#111827}
  .source-knowledge-option strong{font-size:16px;line-height:1.3}
  .source-knowledge-option small{color:#111827;font-size:12px;line-height:1.5}
  .source-knowledge-option-action{display:inline-flex;align-items:center;gap:7px;margin-top:auto;color:var(--evergreen);font-size:12px;font-weight:600}
  .source-knowledge-option-action svg{width:14px;height:14px}
  .source-wizard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s5);margin-top:var(--s4)}
  .source-wizard-dialog h4{margin-bottom:var(--s3)}.source-wizard-dialog .field{margin-bottom:var(--s3)}
  .source-points{display:grid;gap:8px;margin-bottom:var(--s4)}
  .source-point,.source-trust{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:var(--r-sm);padding:10px;background:var(--mineral);font-size:12px}
  .source-point input,.source-trust input{width:16px;height:16px;accent-color:var(--evergreen);margin-top:2px;flex:none}
  .source-point span,.source-trust span{display:flex;flex-direction:column;gap:3px}.source-point small,.source-trust small,.source-trust>span{color:var(--muted);line-height:1.4}
  .source-trust--warn{border-color:rgb(244 211 94/55%);background:rgb(244 211 94/10%);margin-bottom:var(--s3)}
  .source-wizard-trusts{display:grid;gap:var(--s3)}
  .source-wizard-trusts .source-trust{margin:0;padding:var(--s3)}
  .source-trust--stack{display:grid;gap:var(--s2)}
  .source-trust--stack>span{display:block}
  .source-wizard-actions,.source-row-actions{display:flex;gap:7px;align-items:center}.source-wizard-actions{margin-top:var(--s4);border-top:1px solid var(--line);padding-top:var(--s3)}
  /* -- Knowledge-base register: unfiltered totals, a filter strip, then one
     card row per base. Rows are gapped cards drawn with a real table so the
     column headers stay real headers; the detail dialog owns everything else. -- */
  .kb-manager{display:grid;gap:var(--s4)}
  .kb-manager>.source-standalone-head{margin-bottom:0}
  .kb-stats{gap:var(--s3)}
  .kb-stats .stat{padding:var(--s3) var(--s4);border-radius:var(--r-md)}
  .kb-stats .stat .v{font-size:26px;margin-top:2px}
  .kb-filters{gap:var(--s2)}
  .kb-filters .kb-search{flex:1 1 240px;min-width:200px;width:auto}
  .kb-filters .kb-filter{flex:0 1 auto;width:auto;min-width:132px;font-size:13px;padding-block:8px}
  .kb-filters .kb-clear{margin-left:auto;color:var(--evergreen);text-decoration:underline}
  .kb-wrap{overflow-x:auto;border:0;background:transparent}
  .kb-table{min-width:860px;width:100%;border-collapse:separate;border-spacing:0 var(--s2)}
  .kb-table th{padding:0 var(--s4) 4px;text-align:left;color:var(--muted-2);
    font:500 9.5px var(--font-mono);letter-spacing:.12em;text-transform:uppercase}
  .kb-table th:nth-child(3),.kb-table th:nth-child(4){text-align:right}
  .kb-row{cursor:pointer}
  .kb-row>td{padding:var(--s3) var(--s4);vertical-align:middle;background:var(--panel);
    border-top:1px solid var(--line);border-bottom:1px solid var(--line);
    transition:border-color .12s var(--ease),background .12s var(--ease)}
  .kb-row>td:first-child{border-left:1px solid var(--line);border-radius:var(--r-md) 0 0 var(--r-md)}
  .kb-row>td:last-child{border-right:1px solid var(--line);border-radius:0 var(--r-md) var(--r-md) 0}
  /* Rows are cards, so the global "last row loses its rule" reset must not
     strip the bottom edge off the final card. */
  .kb-table tbody tr:last-child>td{border-bottom:1px solid var(--line)}
  .kb-row:hover>td{border-color:var(--olive);background:var(--sage-soft)}
  .kb-row:focus-within>td{border-color:var(--evergreen)}
  .kb-row-main{display:flex;align-items:center;gap:var(--s3);min-width:0}
  .kb-mark{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:var(--r-sm);
    background:var(--sage-soft);color:var(--evergreen);font:500 11px var(--font-mono)}
  .kb-mark--sensitive{background:rgb(244 211 94/22%);color:#8a6d1f}
  .kb-row-text{display:grid;gap:2px;min-width:0}
  .kb-row-open,.kb-row-purpose{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .kb-row-open{border:0;background:transparent;padding:0;color:var(--ink);text-align:left;cursor:pointer;
    font:600 14.5px var(--font-display)}
  .kb-row-open:hover{text-decoration:underline}
  .kb-row-open:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--r-xs)}
  .kb-row-purpose{color:var(--muted);font-size:12.5px}
  .kb-row-chevron{width:28px;color:var(--muted-2);text-align:right}
  .kb-row-chevron svg{width:16px;height:16px}
  .kb-pager{display:flex;align-items:center;justify-content:center;gap:var(--s3)}
  .kb-pager-label{color:var(--muted-2);font-size:11px;letter-spacing:.1em;text-transform:uppercase}
  .kb-item-note{margin:0}

  /* Knowledge-base detail dialog: facts grid, then the items inside the base. */
  .kb-detail-dialog{width:min(760px,100vw)}
  /* Doubled class: the shared .source-file-meta grid is declared later in the
     sheet, so the four-up fact grid has to out-specify it, not just follow it. */
  .source-file-meta.kb-detail-facts{grid-template-columns:repeat(4,minmax(0,1fr))}
  .source-file-meta.kb-detail-facts>div{grid-template-columns:1fr;gap:4px;align-items:start;padding:var(--s3) var(--s4)}
  .source-file-meta.kb-detail-facts>div:nth-child(odd),
  .source-file-meta.kb-detail-facts>div:nth-child(even){padding-inline:var(--s4);border-left:0}
  .source-file-meta.kb-detail-facts>div:not(:nth-child(4n+1)){border-left:1px solid var(--line)}
  .kb-detail-facts dd{font-size:14px;font-weight:600}
  .kb-detail-facts .pill{white-space:nowrap}
  .kb-detail-items-head{align-items:center;margin-top:var(--s5)}
  .kb-detail-items-head .kb-file-search{width:180px;font-size:13px;padding-block:7px}
  .kb-item-list{display:flex;flex-direction:column;margin-top:var(--s3);border:1px solid var(--line);
    border-radius:var(--r-md);overflow:hidden;background:var(--paper)}
  .kb-item{display:grid;grid-template-columns:minmax(0,2.2fr) .8fr .7fr .9fr minmax(0,1fr);gap:var(--s3);
    align-items:center;width:100%;padding:var(--s2) var(--s4);border:0;border-top:1px solid var(--line);
    background:transparent;color:var(--ink);font:inherit;text-align:left}
  .kb-item:first-child{border-top:0}
  .kb-item--open{cursor:pointer}
  .kb-item--open:hover{background:var(--sage-soft)}
  .kb-item--open:focus-visible{outline:none;box-shadow:inset var(--focus)}
  .kb-item-main{display:grid;gap:1px;min-width:0}
  .kb-item-theme,.kb-item-file,.kb-item-team{display:block;max-width:100%;overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap}
  .kb-item-theme{font-size:13.5px;font-weight:600}
  .kb-item-file{color:var(--muted-2);font-size:11px}
  .kb-item-type{font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;color:var(--muted-2)}
  .kb-item-size,.kb-item-team{color:var(--muted);font-size:12.5px}
  .kb-item-upload-state{display:grid;justify-items:start;gap:0;min-width:0;color:var(--muted);font-size:10.5px}
  .kb-item-upload-state .company-upload-steps{padding:4px 0 0}
  .kb-item-failure{display:block;grid-column:1/-1;padding-top:6px;border-top:1px solid rgb(232 60 0/12%);
    min-width:0;color:var(--rust);font-size:11.5px;line-height:1.4;overflow-wrap:anywhere;white-space:normal}
  .kb-detail-actions-spacer{flex:1}
  /* Delete stays quiet until hovered. */
  .knowledge-delete{gap:6px;color:var(--rust)}
  .knowledge-delete:hover{background:rgb(232 60 0/7%)}
  .knowledge-delete svg{width:14px;height:14px}
  .source-delete-dialog{width:min(460px,100vw)}
  .source-delete-body{margin:var(--s4) 0 0;color:var(--muted);font-size:var(--text-small);line-height:1.55}
  .source-delete-dialog .source-wizard-actions{justify-content:flex-end}
  .source-delete-dialog [data-delete-status]{flex:1;color:var(--rust);font-size:12px}
  .source-file-remove{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s3);
    margin-top:var(--s4);padding-top:var(--s4);border-top:1px solid var(--line)}
  .source-file-remove p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
  .source-file-detail-dialog{width:min(720px,calc(100vw - 48px))}
  .source-file-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:var(--s4) 0 0;border-top:1px solid var(--line)}
  .source-file-meta>div{display:grid;grid-template-columns:minmax(90px,.8fr) minmax(0,1.2fr);gap:var(--s3);align-items:center;padding:var(--s3) 0;border-bottom:1px solid var(--line)}
  .source-file-meta>div:nth-child(odd){padding-right:var(--s4)}.source-file-meta>div:nth-child(even){padding-left:var(--s4);border-left:1px solid var(--line)}
  .source-file-meta dt,.source-file-detail-copy span{color:var(--muted-2);font:500 9px var(--font-mono);letter-spacing:.11em;text-transform:uppercase}
  .source-file-meta dd{min-width:0;margin:0;color:var(--ink);overflow-wrap:anywhere}
  .source-file-detail-copy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4);padding:var(--s4) 0;border-bottom:1px solid var(--line)}
  .source-file-detail-copy p{margin:6px 0 0;color:var(--ink);line-height:1.55;overflow-wrap:anywhere}
  .source-file-replace{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.8fr);gap:var(--s4);margin-top:var(--s4);padding:var(--s4);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
  .source-file-replace h4{margin:0}.source-file-replace>div>p{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
  .source-file-replace .field{margin:0}.source-file-replace .source-wizard-actions{grid-column:1/-1;margin-top:0}
  .source-file-replace .source-wizard-actions [data-replacement-status]{flex:1;color:var(--muted);font-size:12px}
  .source-file-replace input[type="file"]{padding:1px 12px 1px 1px;cursor:pointer}
  .source-file-replace input[type="file"]::file-selector-button{min-height:40px;margin-right:10px;padding:8px 15px;border:0;
    background:var(--evergreen);color:var(--mineral);border-radius:var(--r-pill);font-family:var(--font-cta);font-size:14px;font-weight:500;
    letter-spacing:.005em;word-spacing:.04em;cursor:pointer;transition:background .12s}
  .source-file-replace input[type="file"]:hover::file-selector-button{background:var(--evergreen-hover)}
  .company-upload-dialog{display:flex;flex-direction:column;width:min(640px,100vw);padding:0;overflow:hidden;background:#fff}
  .company-upload-dialog>.source-wizard-head{flex:none;margin:0;padding:22px var(--s5) var(--s4)}
  .company-upload-dialog>.source-wizard-head h3{font-size:22px;letter-spacing:-.02em}
  .company-upload-body{min-height:0;overflow-y:auto;padding:var(--s5);background:#fff}
  .company-upload-server-note{display:grid;grid-template-columns:36px minmax(0,1fr);gap:var(--s3);align-items:start;
    margin-bottom:var(--s4);padding:var(--s3);border:1px solid #e5e7eb;border-radius:var(--r-md);background:#fafafa}
  .company-upload-server-mark{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#fff;color:var(--evergreen);box-shadow:inset 0 0 0 1px #e5e7eb}
  .company-upload-server-mark svg{width:19px;height:19px}
  .company-upload-server-note strong{font-size:13px;font-weight:600}.company-upload-server-note p{margin:3px 0 0;color:var(--muted);font-size:12px;line-height:1.45}
  .company-upload-section{margin-top:var(--s3);padding:var(--s4);border:1px solid #e5e7eb;border-radius:var(--r-md);background:#fff;box-shadow:var(--sh-1)}
  .company-upload-section:first-of-type{margin-top:0}
  .company-upload-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s3);margin-bottom:var(--s4)}
  .company-upload-section-head>div{display:flex;align-items:center;gap:9px}.company-upload-section-head>div>span{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#f3f4f6;color:var(--evergreen);font:600 9px var(--font-mono)}
  .company-upload-section-head h4{margin:0;font-size:14px;line-height:25px}.company-upload-section-head small{padding-top:5px;color:var(--muted-2);font-size:11px}
  .company-upload-section>.field:last-child{margin-bottom:0}
  .company-upload-picker{display:flex;align-items:center;gap:var(--s3);min-height:62px;padding:10px 12px;border:1px dashed #d1d5db;border-radius:var(--r-sm);background:#fafafa;cursor:pointer;transition:border-color .12s,background .12s}
  .company-upload-picker:hover{border-color:var(--evergreen);background:#f9fafb}
  .company-upload-picker:focus-within{box-shadow:var(--focus)}
  .company-upload-picker-icon{width:24px;height:24px;display:grid;place-items:center;flex:none;border-radius:50%;background:var(--evergreen);color:var(--mineral);font-size:16px;font-weight:300}
  .company-upload-picker>span:last-child{display:grid;gap:2px}.company-upload-picker strong{color:var(--evergreen);font-size:13px}.company-upload-picker small{color:var(--muted);font-size:11.5px}
  .company-upload-file-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
  .company-upload-queue{display:grid;gap:var(--s2)}
  .company-upload-empty{padding:var(--s4);border:1px dashed #d1d5db;border-radius:var(--r-sm);background:#fafafa;color:var(--muted);font-size:12px;text-align:center}
  .source-upload-title-row{display:grid;grid-template-columns:34px minmax(0,.9fr) minmax(190px,1.1fr);gap:var(--s3);align-items:center;padding:var(--s3);border:1px solid #e5e7eb;border-radius:var(--r-sm);background:#fafafa}
  .source-upload-title-row label{display:grid;gap:5px}
  .source-upload-title-row label>span{color:var(--muted-2);font:500 9px var(--font-mono);letter-spacing:.11em;text-transform:uppercase}
  .company-upload-file-mark{width:34px;height:34px;display:grid;place-items:center;flex:none;border:1px solid #e5e7eb;border-radius:var(--r-sm);background:#fff;color:var(--evergreen);font:600 8px var(--font-mono);letter-spacing:.04em}
  .company-upload-file-identity{display:grid;gap:2px;min-width:0}.company-upload-file-identity strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;font-weight:600}.company-upload-file-identity small{color:var(--muted-2);font-size:10.5px}
  .company-upload-row{display:grid;grid-template-columns:34px minmax(130px,1fr) auto auto;
    gap:var(--s3);align-items:center;min-height:58px;padding:var(--s3);border:1px solid #e5e7eb;border-radius:var(--r-sm);background:#fafafa}
  .company-upload-name{display:block}
  .company-upload-status{min-width:0;color:var(--muted);font-size:12px;line-height:1.35}
  .company-upload-steps{display:inline-flex;align-items:center;gap:4px;padding:8px 0}
  .company-upload-step{position:relative;display:block;width:11px;height:4px;border-radius:var(--dl-r-pill);
    background:var(--dl-disabled);outline:none;transition:width .16s var(--ease),background .16s var(--ease)}
  .company-upload-step.is-complete{background:var(--dl-ok-fg)}
  .company-upload-step.is-active{width:14px;background:var(--dl-brand)}
  .company-upload-step.is-failed{width:14px;background:var(--rust)}
  .company-upload-step:focus-visible{box-shadow:var(--dl-focus)}
  .company-upload-step-tip{position:absolute;left:50%;bottom:calc(100% + 9px);z-index:12;width:max-content;max-width:210px;
    padding:7px 9px;border-radius:var(--dl-r-sm);background:var(--dl-text);color:#fff;box-shadow:var(--dl-e-tooltip);
    font-size:11px;line-height:1.35;opacity:0;pointer-events:none;transform:translate(-50%,4px);transition:opacity .12s,transform .12s}
  .company-upload-step-tip::after{content:"";position:absolute;top:100%;left:50%;margin-left:-4px;border:4px solid transparent;border-top-color:var(--dl-text)}
  .company-upload-step-tip b,.company-upload-step-tip span{display:block}.company-upload-step-tip b{font-weight:600}.company-upload-step-tip span{margin-top:2px;color:rgb(255 255 255/72%)}
  .company-upload-step:hover .company-upload-step-tip,.company-upload-step:focus-visible .company-upload-step-tip{opacity:1;transform:translate(-50%,0)}
  .company-upload-footer{flex:none;justify-content:flex-end;min-height:72px;margin:0;padding:var(--s3) var(--s5);border-top:1px solid #e5e7eb;background:#fff}
  .company-upload-footer [data-upload-summary]{flex:1;color:var(--muted);font-size:12px}
  .knowledge-base-empty{padding:13px 14px;border:1px dashed var(--line);border-radius:12px;color:var(--muted);background:var(--paper)}
  .source-row-actions{flex-wrap:wrap}.source-error{max-width:280px;margin-top:5px;color:var(--rust)}
  @keyframes source-drawer-enter{from{opacity:.82;transform:translateX(32px)}to{opacity:1;transform:translateX(0)}}
  @media(prefers-reduced-motion:reduce){.source-wizard-dialog{animation:none}.source-knowledge-option{transition:none}.source-knowledge-option:hover{transform:none}}
  @media(max-width:900px){
    .source-category-summary{align-items:stretch;flex-direction:column}
    .source-summary-stats{min-width:0;width:100%}
  }
  @media(max-width:680px){
    body[data-console-screen="s21"] .source-standalone-list{grid-template-columns:1fr}
    .source-screen .head .acts{width:100%}
    .source-page-search{width:100%}
    .source-category-tabs{flex-wrap:nowrap;overflow-x:auto;margin-right:calc(var(--s5) * -1);padding:1px var(--s5) var(--s2) 1px;
      scrollbar-width:thin;scrollbar-color:var(--olive) transparent;scroll-snap-type:x proximity}
    .source-category-tab{min-width:max-content;scroll-snap-align:start}
    .source-sync-card .between{align-items:flex-start;flex-wrap:wrap}
    .source-sync-card .tblwrap{overflow:visible}
    .source-sync-card table,.source-sync-card tbody{display:block}
    .source-sync-card thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
      clip-path:inset(50%);white-space:nowrap;border:0}
    .source-sync-card tbody{display:grid;gap:var(--s3);margin-top:var(--s4)}
    .source-sync-card tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3);
      padding:var(--s3);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
    .source-sync-card tbody td{display:grid;align-content:start;gap:4px;min-width:0;padding:0;border:0;text-align:left}
    .source-sync-card tbody td::before{content:attr(data-label);font:500 9px var(--font-mono);letter-spacing:.11em;
      text-transform:uppercase;color:var(--muted-2)}
    .source-sync-card tbody td[data-label="Status"]{grid-column:1/-1;padding-top:var(--s2);border-top:1px solid var(--line)}
    .source-category-summary{padding:var(--s4)}
    .source-summary-stats{grid-template-columns:1fr 1fr}
    .source-connector-grid{grid-template-columns:1fr}
    .source-connector-card{min-height:0;padding:var(--s4)}
    .source-connection-head{flex-wrap:wrap}
    .source-connection-head .pill{margin-left:49px}
    .source-connection-details{grid-template-columns:1fr}
    .source-card-footer,.source-standalone-head{align-items:flex-start;flex-direction:column}
    .source-standalone-head-actions{align-items:flex-start}
    .source-standalone-controls{justify-content:flex-start}
    .source-bulk-update-status{text-align:left}
    .source-scope-filter{align-items:flex-start;flex-direction:column;gap:var(--s2)}
    .source-file-register-head{align-items:flex-start;flex-direction:column;gap:var(--s2)}
    .source-file-register .tblwrap{overflow:visible}
    .source-file-register table,.source-file-register tbody{display:block}
    .source-file-register thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
      clip-path:inset(50%);white-space:nowrap;border:0}
    .source-file-register tbody{display:grid;gap:var(--s3)}
    .source-file-register tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3);
      padding:var(--s3);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
    .source-file-register tbody td{display:grid;align-content:start;gap:4px;min-width:0;padding:0;border:0;text-align:left}
    .source-file-register tbody td::before{content:attr(data-label);font:500 9px var(--font-mono);letter-spacing:.11em;
      text-transform:uppercase;color:var(--muted-2)}
    .source-file-register tbody td[data-label="File"],.source-file-register tbody td[data-label="Purpose"],
    .source-file-register tbody td[data-label="Uploaded"]{grid-column:1/-1}
    .source-card-action{min-height:44px}
    .source-wizard-dialog{width:100vw;padding:var(--s4);border-left:0;border-radius:0}
    .console-right-panel__dialog{padding:0}
    .console-right-panel__dialog>.source-wizard-head,.console-right-panel__body{padding:var(--s4)}
    .source-wizard-head>.row{align-items:flex-end;flex-direction:column-reverse}
    .source-knowledge-options{grid-template-columns:1fr}
    .source-knowledge-option{min-height:132px}
    .source-wizard-grid{grid-template-columns:1fr}
    .kb-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
    .kb-filters .kb-search,.kb-filters .kb-filter{flex:1 1 100%;min-width:0}
    .kb-filters .kb-clear{margin-left:0}
    .kb-wrap{overflow:visible}
    .kb-table,.kb-table>tbody{display:block;min-width:0}
    .kb-table>thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
      clip-path:inset(50%);white-space:nowrap;border:0}
    .kb-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3);padding:var(--s3);
      border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);margin-bottom:var(--s2)}
    .kb-row>td{display:grid;align-content:start;gap:4px;min-width:0;padding:0;border:0;text-align:left}
    .kb-row>td::before{content:attr(data-label);font:500 9px var(--font-mono);
      letter-spacing:.11em;text-transform:uppercase;color:var(--muted-2)}
    .kb-row>td[data-label="Knowledge base"]{grid-column:1/-1}
    .kb-row>td[data-label="Knowledge base"]::before{content:none}
    .kb-row:hover>td,.kb-row:focus-within>td{background:transparent}
    .kb-row>td.kb-row-chevron{display:none}
    .source-file-meta.kb-detail-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
    .source-file-meta.kb-detail-facts>div:not(:nth-child(4n+1)){border-left:0}
    .source-file-meta.kb-detail-facts>div:nth-child(even){border-left:1px solid var(--line)}
    .kb-detail-items-head{align-items:flex-start;flex-direction:column}
    .kb-detail-items-head .row{width:100%}
    .kb-detail-items-head .kb-file-search{flex:1;width:auto}
    .kb-item{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:6px}
    .kb-item-main{grid-column:1/-1}
    .source-file-remove{flex-direction:column;align-items:flex-start}
    .source-file-meta,.source-file-detail-copy,.source-file-replace{grid-template-columns:1fr}
    .source-file-meta>div:nth-child(odd),.source-file-meta>div:nth-child(even){padding-inline:0;border-left:0}
    .source-file-replace .source-wizard-actions{grid-column:auto;align-items:stretch;flex-direction:column}
    .source-file-replace .source-wizard-actions .btn{width:100%}
    .company-upload-dialog{padding:0}.company-upload-dialog>.source-wizard-head,.company-upload-body{padding:var(--s4)}
    .company-upload-section-head{display:grid}.company-upload-section-head small{padding:0 0 0 34px}
    .source-upload-title-row{grid-template-columns:34px minmax(0,1fr)}.source-upload-title-row label{grid-column:1/-1}
    .company-upload-row{grid-template-columns:34px minmax(0,1fr)}.company-upload-steps{grid-column:2;grid-row:2}.company-upload-row>.btn{grid-column:2;justify-self:start}
    .company-upload-footer{padding:var(--s3) var(--s4)}
  }

  /* S3 agent badge control room - exact access, alerts, and approvals */
  /* S3 scoped-memory badge creation stays subordinate to the form fields. */
  .scope-memory-create-action .btn{min-height:32px;padding:4px 10px;font-size:12px}
  .scope-memory-create-hint{font-size:var(--text-label);line-height:1.4}
  .m8a-issue{margin-bottom:var(--s6);padding:0;overflow:hidden}
  .m8a-issue-head{align-items:flex-start;gap:var(--s5);padding:var(--s5) var(--s5) var(--s4)}
  .m8a-issue-head h2,.m8a-section-head h2{font-size:24px;letter-spacing:-.02em}
  .m8a-issue-head p,.m8a-section-head p{max-width:66ch;margin:var(--space-text) 0 0;color:var(--muted);font-size:13.5px;line-height:1.5}
  .m8a-assurance{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;flex:none}
  .m8a-assurance span{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--line);
    border-radius:var(--r-pill);background:var(--mineral);color:var(--evergreen);font:600 10px var(--font-mono);
    letter-spacing:.08em;text-transform:uppercase}
  .m8a-assurance span:first-child::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--evergreen)}
  .m8a-boundary{display:flex;align-items:center;gap:12px;padding:11px var(--s5);border-block:1px solid rgb(181 102 62/25%);
    background:rgb(181 102 62/7%);font-size:12px;color:var(--muted)}
  .m8a-boundary b{flex:none;color:var(--rust);font:600 10px var(--font-mono);letter-spacing:.1em;text-transform:uppercase}
  .m8a-issue-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .m8a-step{min-width:0;margin:0;padding:var(--s5);border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .m8a-step:nth-child(2n){border-right:0}
  .m8a-step legend{display:flex;align-items:center;gap:9px;width:100%;margin-bottom:var(--s4);padding:0;
    color:var(--ink);font-size:17px;font-weight:600}
  .m8a-step legend span{width:27px;height:27px;display:grid;place-items:center;border:1px solid var(--olive);
    border-radius:50%;background:var(--sage-soft);color:var(--evergreen);font:600 10px var(--font-mono)}
  .m8a-step .field:last-child{margin-bottom:0}
  .m8a-step textarea.input{min-height:72px;resize:vertical;line-height:1.5}
  .m8a-field-label{display:block;margin-bottom:7px;font:500 10px var(--font-mono);letter-spacing:.13em;text-transform:uppercase;color:var(--muted)}
  .m8a-checks{display:grid;gap:7px}
  .m8a-checks--inline{grid-template-columns:repeat(3,minmax(0,1fr))}
  .m8a-check{display:flex;align-items:flex-start;gap:9px;min-height:42px;padding:9px 10px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--mineral);font-size:12.5px;line-height:1.35;cursor:pointer}
  .m8a-check:has(input:checked){border-color:var(--olive);background:var(--sage-soft)}
  .m8a-check input{width:16px;height:16px;flex:none;margin-top:1px;accent-color:var(--evergreen)}
  .m8a-fields-2,.m8a-fields-3{display:grid;gap:var(--s3)}
  .m8a-fields-2{grid-template-columns:repeat(2,minmax(0,1fr))}.m8a-fields-3{grid-template-columns:repeat(3,minmax(0,1fr))}
  .m8a-step--review{display:flex;flex-direction:column}.m8a-step--review .btn{align-self:flex-start;margin-top:auto}
  .m8a-effective{display:grid;gap:0;margin-bottom:var(--s4);border:1px solid var(--line);border-radius:var(--r-md);overflow:hidden}
  .m8a-effective>div{display:grid;grid-template-columns:125px minmax(0,1fr);gap:12px;padding:10px 12px;border-bottom:1px solid var(--line)}
  .m8a-effective>div:last-child{border-bottom:0}
  .m8a-effective span{font:500 10px var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
  .m8a-effective b{font-size:12.5px;font-weight:500;line-height:1.4}
  .m8a-issued{margin-bottom:var(--s4);border-color:var(--olive);box-shadow:0 18px 45px -34px var(--evergreen)}

  .m8a-control{margin:var(--s6) 0}
  .m8a-section-head{align-items:flex-end;gap:var(--s5);margin-bottom:var(--s4)}
  .m8a-agent-list{display:grid;gap:var(--s3)}
  .m8a-agent{padding:0;overflow:hidden}
  .m8a-agent>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);padding:var(--s4) var(--s5);cursor:pointer;list-style:none}
  .m8a-agent>summary::-webkit-details-marker{display:none}
  .m8a-agent>summary::after{content:"";width:26px;height:26px;display:grid;place-items:center;flex:none;margin-left:3px;
    border:1px solid var(--line);border-radius:50%;font:500 16px var(--font-mono);color:var(--muted)}
  .m8a-agent[open]>summary::after{content:"";transform:none}
  .m8a-agent>summary:hover{background:var(--sage-soft)}
  .m8a-agent-title{display:flex;align-items:center;gap:12px;min-width:0}
  .m8a-agent-title h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
  .m8a-agent-title .mono{display:block;margin-top:3px;color:var(--muted);font-size:10px}
  .m8a-agent-mark{width:36px;height:36px;display:grid;place-items:center;flex:none;border-radius:10px;background:var(--evergreen);color:var(--sage);font:600 12px var(--font-mono)}
  .m8a-agent-summary{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto;color:var(--muted);font-size:11px}
  .m8a-state{display:inline-flex;align-items:center;gap:6px;width:max-content;padding:4px 7px;border-radius:var(--r-pill);
    font:600 9px var(--font-mono);letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}
  .m8a-state::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
  .m8a-state--within{background:rgb(28 84 66/9%);color:var(--evergreen)}
  .m8a-state--waiting{background:rgb(181 151 74/13%);color:#81691f}
  .m8a-state--blocked{background:rgb(181 102 62/11%);color:var(--rust)}
  .m8a-agent-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-top:1px solid var(--line)}
  .m8a-agent-body>section{min-width:0;padding:var(--s4) var(--s5);border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .m8a-agent-body>section:nth-child(2n){border-right:0}
  .m8a-agent-body h4{margin-bottom:var(--s3);font-size:13px}
  .m8a-agent-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:var(--s4);padding:var(--s3) var(--s5)}
  .m8a-grant{display:grid;gap:8px}.m8a-kv{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;font-size:11.5px;line-height:1.45}
  .m8a-kv span{color:var(--muted)}.m8a-kv b{font-weight:500;overflow-wrap:anywhere}
  .m8a-field-list{display:grid;gap:5px;margin:5px 0 0;padding:10px 0 0;border-top:1px solid var(--line);list-style:none}
  .m8a-field-list li{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;font-size:10.5px;color:var(--muted)}
  .m8a-field-list b{color:var(--ink);font-weight:500;overflow-wrap:anywhere}
  .m8a-feed{display:grid;gap:8px}.m8a-feed-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:10px;
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
  .m8a-feed-item--blocked{border-color:rgb(181 102 62/22%);background:rgb(181 102 62/5%)}
  .m8a-feed-item>div:first-child{display:grid;gap:5px;min-width:0}
  .m8a-feed-item b{font-size:12px;line-height:1.35}.m8a-feed-item small{color:var(--muted);font-size:10.5px;line-height:1.4;overflow-wrap:anywhere}
  .m8a-feed-item p{margin:2px 0 0;color:var(--muted);font-size:11px;line-height:1.4}
  .m8a-feed-item .row{flex:none;flex-wrap:wrap;justify-content:flex-end}
  .m8a-timeline{display:grid;gap:0}.m8a-timeline article{display:grid;grid-template-columns:12px minmax(0,1fr);gap:10px;position:relative;padding-bottom:12px}
  .m8a-timeline article:last-child{padding-bottom:0}.m8a-timeline article>i{width:8px;height:8px;margin-top:5px;border:2px solid var(--panel);border-radius:50%;background:var(--olive);box-shadow:0 0 0 1px var(--olive)}
  .m8a-timeline article:not(:last-child)::before{content:"";position:absolute;left:3px;top:13px;bottom:0;width:1px;background:var(--line)}
  .m8a-timeline article>div{display:grid;gap:4px;min-width:0}.m8a-timeline b{font-size:11.5px;font-weight:500}.m8a-timeline small{color:var(--muted);font-size:10.5px;line-height:1.4;overflow-wrap:anywhere}
  .m8a-empty-line{margin:0;color:var(--muted);font-size:12px}.m8a-empty{text-align:center}.m8a-empty p{margin:var(--space-text) 0 0;color:var(--muted);font-size:13px}
  .m8a-people-row{margin-top:var(--s5)}

  @media(max-width:900px){
    .m8a-issue-grid,.m8a-agent-body{grid-template-columns:1fr}
    .m8a-step,.m8a-step:nth-child(2n),.m8a-agent-body>section,.m8a-agent-body>section:nth-child(2n){border-right:0}
    .m8a-agent-summary>span:not(.m8a-state){display:none}
  }
  @media(max-width:680px){
    .m8a-issue-head,.m8a-section-head,.m8a-agent>summary,.m8a-agent-footer{align-items:flex-start;flex-direction:column}
    .m8a-issue-head,.m8a-step,.m8a-agent-body>section{padding:var(--s4)}
    .m8a-boundary{align-items:flex-start;flex-direction:column;padding:var(--s3) var(--s4)}
    .m8a-assurance{justify-content:flex-start}.m8a-fields-2,.m8a-fields-3,.m8a-checks--inline{grid-template-columns:1fr}
    .m8a-agent>summary{position:relative;padding:var(--s4);padding-right:50px}
    .m8a-agent>summary::after{position:absolute;right:var(--s4);top:var(--s4)}
    .m8a-agent-summary{justify-content:flex-start;margin-left:48px}
    .m8a-agent-footer{padding:var(--s3) var(--s4)}
    .m8a-kv,.m8a-field-list li,.m8a-effective>div{grid-template-columns:1fr;gap:3px}
    .m8a-feed-item{flex-direction:column}.m8a-feed-item .row{justify-content:flex-start}
  }

  /* =========================================================================
     S4 Policies — one-for-one with the supplied console prototype.

     Every value below (spacing, radius, weight, colour) is the prototype's
     own, kept literal rather than mapped onto the platform tokens: this screen
     is meant to read exactly as the design does. Two consequences worth
     knowing: the neutral ramp here is the prototype's (#111827…#f9fafb), not
     --ink/--muted/--line, and the dense pill labels sit at 10.5–11.5px, under
     the platform's 12px label floor.

     Everything is scoped to .policy-screen so it cannot leak onto a screen
     that still speaks the platform's own language.
     ========================================================================= */
  .policy-screen{width:100%;max-width:1160px;min-width:0;margin:0 auto;gap:18px;color:#111827}
  body[data-console-screen] #screen-content>.policy-screen.screen-flow{gap:18px}

  /* Policies keeps its inline info icon and action styling inside the shared
     platform header geometry. */
  .policy-title{display:flex;align-items:center;gap:8px}
  .policy-screen .policy-page-head .acts{display:flex;align-items:center;gap:10px}
  .policy-screen .metric-info{color:#d1d5db}
  .policy-screen .metric-info:hover,.policy-screen .metric-info:focus-visible{color:#9ca3af}

  /* Two buttons and one ghost, reused everywhere on the screen. */
  .policy-primary{border:none;background:#0f3d2e;color:#fff;border-radius:10px;padding:9px 16px;
    font-family:inherit;font-size:13px;font-weight:600;line-height:1.2;cursor:pointer;
    transition:background .12s var(--ease)}
  .policy-primary:hover{background:#14503c}
  .policy-primary:focus-visible{outline:2px solid #0f3d2e;outline-offset:2px}
  .policy-primary[disabled]{background:#e5e7eb;color:#9ca3af;cursor:default}
  .policy-ghost{border:1px solid #e5e7eb;background:#fff;color:#374151;border-radius:10px;padding:6px 14px;
    font-family:inherit;font-size:12px;font-weight:600;line-height:1.35;cursor:pointer;
    transition:background .12s var(--ease),border-color .12s var(--ease)}
  .policy-ghost:hover:not([disabled]){background:#f9fafb;border-color:#d1d5db}
  .policy-ghost:focus-visible{outline:2px solid #0f3d2e;outline-offset:2px}
  .policy-ghost[disabled]{color:#9ca3af;cursor:default}
  .policy-flag{display:flex;align-items:center;gap:6px;border:1px solid #fedf89;background:#fffaeb;color:#b54708;
    border-radius:999px;padding:5px 12px;font-family:inherit;font-size:11px;font-weight:650;cursor:pointer}
  .policy-flag:hover{background:#fef7e0}
  .policy-flag:focus-visible{outline:2px solid #b54708;outline-offset:2px}

  /* The library section is a stack, not a block: the stat strip, the read-only
     notice and the register card sit on the screen's own 18px section rhythm.
     Without this they render flush against each other. */
  .policy-library{display:grid;gap:18px;min-width:0}
  .policy-library>*{min-width:0}

  /* Stat strip: the shared metric card already carries the prototype's
     composition (28px chip, 12px label, inset value shell). */
  .policy-summary{margin:0;gap:12px}
  .policy-summary--stale{grid-template-columns:1fr}
  /* The strip sits on the same white page as the register card, so the cards
     carry their own elevation: a deeper lift on the card silhouette than the
     premium layer's shared --content-shadow-lift, and a shallow one on the
     inset value shell. The long prefix is what outranks that layer - matching
     it exactly would only tie, and it wins ties by sitting later in the sheet.
     Scoped to the strip so Home and Usage keep their treatment. */
  body[data-console-screen] #screen-content .policy-screen .policy-summary .metric-card{
    box-shadow:0 1px 2px rgb(16 24 40/6%),0 12px 26px -18px rgb(16 24 40/28%)}
  .policy-summary .metric-card-shell{box-shadow:0 2px 4px rgb(16 24 40/8%),0 8px 18px -12px rgb(18 58 46/20%)}
  .policy-screen .metric-card-cap--crit{--cap-tone:#b42318}
  /* The shared card's value is 26px (Home, S15); the prototype's is 24px. */
  .policy-screen .metric-card .v{font-size:24px}

  /* Two labels sit below the platform's 12px readability floor because the
     prototype puts them there: the state/standing dot-pills at 10.5px and the
     intake flow strip at 11px. Deliberate, and the only place this screen
     overrides the floor — delete these two rules to hand them back to it. */
  .policy-screen .policy-state{font-size:10.5px}
  .policy-screen .policy-flow{font-size:11px}

  /* Every section is the same white card. */
  .policy-panel{border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:20px 20px 16px;
    box-shadow:0 1px 2px rgb(16 24 40/4%);min-width:0}
  .policy-panel__head{display:flex;align-items:center;justify-content:space-between;gap:12px;
    flex-wrap:wrap;padding:0 4px 14px}
  .policy-panel__title{display:flex;align-items:center;gap:7px;min-width:0}
  .policy-panel__title h2,.policy-panel__title h3{font-size:15px;font-weight:600;letter-spacing:-.01em}
  /* Search is the head's only control now, so it holds the top right corner
     even when the title wraps. */
  .policy-panel__controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;
    flex-wrap:wrap;margin-left:auto}
  .policy-digest{flex:none;border:1px solid #e5e7eb;background:#f9fafb;border-radius:999px;padding:3px 10px;
    color:#374151;font-family:var(--font-mono);font-size:11px;font-weight:650;white-space:nowrap}

  .policy-search{display:flex;align-items:center;gap:8px;width:230px;max-width:100%;box-sizing:border-box;
    border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:7px 10px}
  .policy-search:focus-within{border-color:#0f3d2e}
  .policy-search svg{width:13px;height:13px;flex:none;color:#9ca3af}
  .policy-search input{flex:1;min-width:0;border:none;outline:none;background:transparent;
    font-family:inherit;font-size:12.5px;color:#111827}
  .policy-search input::placeholder{color:#9ca3af}

  /* One pill-tab shape for the register's state cuts and compliance's
     document tabs. Solid green when live, plain white otherwise. */
  .policy-pill-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
  .policy-pill-tab{border:1px solid #e5e7eb;background:#fff;color:#374151;border-radius:999px;padding:5px 13px;
    font-family:inherit;font-size:12px;font-weight:600;line-height:1.35;cursor:pointer;white-space:nowrap;
    transition:background .12s var(--ease),border-color .12s var(--ease),color .12s var(--ease)}
  .policy-pill-tab:hover{background:#f9fafb;border-color:#d1d5db}
  .policy-pill-tab.is-active{background:#0f3d2e;border-color:#0f3d2e;color:#fff}
  .policy-pill-tab:focus-visible{outline:2px solid #0f3d2e;outline-offset:2px}
  .policy-tabs__meta{margin-left:4px;color:#9ca3af;font-size:11.5px}

  .policy-field{display:flex;flex-direction:column;gap:5px;min-width:0;margin:0}
  .policy-field>label{color:#6b7280;font-size:11.5px;font-weight:600;letter-spacing:.01em}
  .policy-field .subtle{color:#9ca3af;font-weight:500}
  .policy-req{color:#b42318}
  /* A select keeps the platform's .select class (one dropdown treatment,
     one chevron token); .policy-control only re-skins it to the prototype's
     geometry. The extra class in the selector is what outranks the workspace
     input rule further down the sheet. */
  .policy-screen .policy-field .policy-control{box-sizing:border-box;width:100%;min-width:0;min-height:0;
    border:1px solid #e5e7eb;border-radius:10px;background-color:#fff;padding:8px 12px;
    font-family:inherit;font-size:12.5px;font-weight:500;color:#111827;outline-color:#0f3d2e;box-shadow:none}
  .policy-screen .policy-field select.policy-control{font-weight:600;cursor:pointer}
  .policy-screen .policy-field .policy-control::placeholder{color:#9ca3af}
  .policy-screen .policy-field .policy-control:hover:not(:disabled){border-color:#d1d5db}
  .policy-screen .policy-field .policy-control:focus{border-color:#0f3d2e;outline:none;
    box-shadow:0 0 0 3px rgb(15 61 46/12%)}
  .policy-screen .policy-field .policy-control:disabled{background-color:#f9fafb;color:#6b7280;cursor:not-allowed}
  .policy-control.num{font-variant-numeric:tabular-nums}
  .policy-hint{color:#9ca3af;font-size:11px;line-height:1.45}

  /* The register and every other list: a stack of row cards on one grid, in a
     horizontal scroller so a narrow stage scrolls the table, not the page. */
  .policy-register{min-width:0}
  .policy-rowscroll{max-width:100%;overflow-x:auto}
  .policy-rowset{min-width:950px}
  .policy-rowset--candidates{min-width:820px}
  .policy-rowset--agents{min-width:700px}
  .policy-rows{display:flex;flex-direction:column;gap:8px}
  .policy-rowhead,.policy-row{display:grid;gap:10px;align-items:center}
  .policy-rowhead{padding:0 12px 8px;color:#9ca3af;font-size:10.5px;font-weight:650;letter-spacing:.06em}
  .policy-rowhead>span{white-space:nowrap}
  .policy-rowhead .num{text-align:right}
  .policy-rowhead abbr{text-decoration:none}
  .policy-row{padding:9px 12px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
    box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%);transition:background .12s var(--ease)}
  .policy-row:hover{background:#f5f6f7}
  .policy-row>*{min-width:0}
  .policy-row--register{grid-template-columns:minmax(210px,2.3fr) 88px minmax(100px,1fr) 52px 96px 116px 92px 30px}
  .policy-row--candidate{grid-template-columns:minmax(210px,2.2fr) minmax(140px,1.3fr) 60px minmax(150px,1fr) 128px}
  .policy-row--agent{grid-template-columns:minmax(170px,1.7fr) 122px 76px 64px 84px 110px}
  .policy-row__ident{display:flex;align-items:center;gap:10px;min-width:0}
  .policy-chip{width:28px;height:28px;flex:none;display:flex;align-items:center;justify-content:center;
    border-radius:8px;background:#f3f4f6;color:#52525b}
  .policy-chip svg{width:13px;height:13px}
  .policy-row__text{display:flex;flex-direction:column;gap:1px;min-width:0}
  .policy-row__text strong{font-size:12.5px;font-weight:600;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .policy-row__text small{color:#9ca3af;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .policy-row__fail{color:#b42318;font-size:10.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .policy-row__cell{font-size:12px;font-weight:500;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .policy-row__cell.num{text-align:right;font-variant-numeric:tabular-nums}
  .policy-row__cell.strong{font-size:12.5px;font-weight:650;color:#111827}
  .policy-row__when{color:#6b7280;font-size:11.5px;font-variant-numeric:tabular-nums}
  .policy-row__signal{color:#6b7280;font-weight:400;font-size:11.5px}
  .policy-row__act{display:flex;justify-content:flex-end}
  .policy-row__act .policy-ghost{border-radius:9px;padding:6px 12px;font-size:11.5px;color:#111827;white-space:nowrap}
  .policy-bypass{color:#b42318;font-weight:650}
  .policy-row__delete{width:26px;height:26px;display:flex;align-items:center;justify-content:center;padding:0;
    border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#9ca3af;cursor:pointer;
    transition:background .12s var(--ease),color .12s var(--ease),border-color .12s var(--ease)}
  .policy-row__delete svg{width:12px;height:12px}
  .policy-row__delete:hover{background:#fef3f2;border-color:#fecdca;color:#b42318}
  .policy-row__delete:focus-visible{outline:2px solid #b42318;outline-offset:2px}
  .policy-row__delete[disabled]{opacity:.5;cursor:default}

  /* State and guardrail pills. Both are the prototype's dot-pill; the
     guardrail one is a button, because that is where the level is changed. */
  .policy-state{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:2px 9px;
    border:1px solid;font-size:10.5px;font-weight:650;line-height:1.5;white-space:nowrap;
    font-family:inherit;letter-spacing:0;text-transform:none}
  .policy-state i{width:5px;height:5px;border-radius:999px;background:currentColor}
  .policy-state--active{color:#067647;background:#ecfdf3;border-color:#abefc6}
  .policy-state--processing{color:#6b7280;background:#f9fafb;border-color:#e5e7eb}
  .policy-state--needs_review{color:#b54708;background:#fffaeb;border-color:#fedf89}
  .policy-state--failed{color:#b42318;background:#fef3f2;border-color:#fecdca}
  .policy-state--unregistered{color:#6b7280;background:#f9fafb;border-color:#e5e7eb}
  .policy-state--acknowledged{color:#067647;background:#ecfdf3;border-color:#abefc6}
  .policy-state--served{color:#374151;background:#f9fafb;border-color:#e5e7eb}
  .policy-state--stale{color:#b54708;background:#fffaeb;border-color:#fedf89}
  .policy-state--bypassed{color:#b42318;background:#fef3f2;border-color:#fecdca}
  .policy-state--never-served{color:#6b7280;background:#f9fafb;border-color:#e5e7eb}
  .policy-level{display:inline-flex;align-items:center;border-radius:999px;padding:2px 9px;border:1px solid;
    font-family:inherit;font-size:10.5px;font-weight:650;line-height:1.5;white-space:nowrap;cursor:default}
  .policy-level--required{color:#0f3d2e;background:#eaf1ec;border-color:#d5e3da}
  .policy-level--advisory{color:#6b7280;background:#f9fafb;border-color:#e5e7eb}
  .policy-level--flip{cursor:pointer}
  .policy-level--flip:hover{filter:brightness(.97)}
  .policy-level--flip:focus-visible{outline:2px solid #0f3d2e;outline-offset:2px}
  .policy-level--flip[disabled]{opacity:.6;cursor:default}

  .policy-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 20px;
    color:#9ca3af;font-size:13px;text-align:center}
  .policy-empty p,.policy-error p{max-width:65ch;margin:var(--space-text) 0 0;color:#6b7280;
    font-size:12px;line-height:1.45}
  .policy-empty p{max-width:60ch;color:#9ca3af}
  .policy-loading{padding:28px 20px;color:#9ca3af;font-size:13px;text-align:center}
  .policy-error{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;
    border:1px solid #fecdca;border-left:3px solid #b42318;border-radius:12px;background:#fffbfa}
  .policy-error h3{font-size:13.5px;font-weight:650;color:#111827}
  .policy-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;
    margin-top:14px;padding:12px 4px 0;border-top:1px solid #f3f4f6;color:#6b7280;font-size:11.5px}
  .policy-pagination>div{display:flex;gap:8px}
  .policy-readonly{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid #e5e7eb;
    border-radius:12px;background:#f9fafb}
  .policy-adoption .policy-hint{padding:12px 4px 0}
  .policy-adoption-status:not(:empty){padding:12px 4px 0;color:#6b7280;font-size:12px}

  /* Compliance: four tiles, then the tab strip, then one agent ledger. */
  .policy-compliance{margin-top:0;padding:20px}
  .policy-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding-bottom:16px}
  .policy-tile{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border:1px solid #f3f4f6;
    border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)}
  .policy-tile__k{color:#6b7280;font-size:11px;font-weight:600}
  .policy-tile__v{color:#111827;font-size:20px;font-weight:650;line-height:1;letter-spacing:-.02em}
  .policy-tile--crit .policy-tile__v{color:#b42318}
  .policy-compliance-tabs{padding:0 0 12px}
  .policy-compliance-doc{min-width:0}
  .policy-feed{margin-top:14px;padding:12px 4px 0;border-top:1px solid #f3f4f6}
  .policy-feed__head{padding-bottom:8px;color:#9ca3af;font-size:10.5px;font-weight:650;
    letter-spacing:.06em;text-transform:uppercase}
  .policy-feed ol{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}
  .policy-feed li{display:flex;align-items:baseline;gap:5px;min-width:0;color:#374151;font-size:12px}
  .policy-feed li b{flex:none;color:#111827;font-weight:650}
  .policy-feed__verb{flex:none;font-weight:500}
  .policy-feed__verb--ok{color:#067647}
  .policy-feed__verb--bad{color:#b42318;font-weight:650}
  .policy-feed__verb--neutral{color:#6b7280}
  .policy-feed__doc{min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .policy-feed time{flex:none;margin-left:auto;color:#9ca3af;font-size:11px;font-variant-numeric:tabular-nums}

  /* Runtime dials: a chevron disclosure over two soft panels and a save row.
     The platform's +/- disclosure marker is deliberately overridden here — the
     prototype uses a chevron that turns down when the section opens. */
  .policy-runtime{margin-top:0;overflow:hidden;border:1px solid #e5e7eb;border-radius:14px;background:#fff;
    box-shadow:0 1px 2px rgb(16 24 40/4%)}
  .policy-runtime>summary{display:flex;align-items:center;gap:12px;padding:18px 20px;cursor:pointer;list-style:none}
  .policy-runtime>summary::-webkit-details-marker{display:none}
  .policy-runtime>summary:hover{background:#fafafa}
  .policy-screen .policy-runtime>summary>i{width:13px;height:13px;flex:none;border:0;border-radius:0;
    background:var(--chevron-ink) center/13px 13px no-repeat;transform:rotate(-90deg);
    transition:transform .15s var(--ease)}
  .policy-screen .policy-runtime[open]>summary>i{transform:rotate(0)}
  .policy-screen .policy-runtime>summary:hover>i{background-color:transparent}
  /* The disclosure title is one row: the subtext moved into the info tooltip,
     so the chevron, the title and the icon share a single baseline instead of
     the chevron centring against a two-line stack. */
  .policy-runtime>summary span{display:flex;align-items:center;gap:7px;min-width:0;flex:1}
  .policy-runtime>summary b{color:#111827;font-size:15px;font-weight:600;letter-spacing:-.01em}
  .policy-screen .policy-runtime>summary .heading-info{flex:none}
  .policy-runtime-body{padding:0 20px 20px;display:flex;flex-direction:column;gap:14px}
  .policy-dials{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .policy-dial-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid #f3f4f6;
    border-radius:12px;background:#fafafa}
  .policy-dial-card__title{color:#111827;font-size:12.5px;font-weight:650}
  /* Uppercase is a paint, not the label: the markup keeps sentence case so a
     screen reader is not handed six shouted acronyms. */
  .policy-dial-card .policy-field>label{color:#9ca3af;font-size:10.5px;font-weight:650;
    letter-spacing:.06em;text-transform:uppercase}
  .policy-screen .policy-dial-card .policy-field .policy-control{padding:7px 10px}
  .policy-switch{gap:9px;font-size:12px;font-weight:500;color:#374151}
  .policy-switch .track{width:30px;height:17px;background:#d1d5db}
  .policy-switch .track::after{top:2.5px;left:2.5px;width:12px;height:12px}
  .policy-switch input:checked + .track{background:#0f3d2e}
  .policy-switch input:checked + .track::after{transform:translateX(13px)}
  .policy-runtime-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}
  .policy-status{min-height:18px;color:#6b7280;font-size:12px;font-weight:600}
  .policy-runtime-foot .policy-primary{padding:8px 16px;font-size:12.5px}

  /* Intake drawer: the platform's right-side panel, with the prototype's flow
     strip, dashed dropzone and stacked fields inside it. */
  .policy-add-drawer .console-right-panel__body{padding:20px 28px;background:#fff}
  .policy-intake{display:flex;flex-direction:column;gap:16px;color:#111827}
  .policy-intake__sub{color:#9ca3af;font-size:11.5px}
  .policy-flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:#374151;font-size:11px;font-weight:600}
  .policy-flow span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
  .policy-flow b{width:17px;height:17px;display:flex;align-items:center;justify-content:center;flex:none;
    border-radius:999px;background:#eaf1ec;color:#0f3d2e;font-size:9.5px;font-weight:700}
  .policy-flow i{color:#d1d5db;font-size:11px;font-style:normal}
  .policy-upload-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
  .policy-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:8px;padding:22px 16px;border:1px dashed #d1d5db;border-radius:12px;background:#fafafa;
    text-align:center;cursor:pointer;transition:border-color .12s var(--ease)}
  .policy-dropzone:hover,.policy-dropzone:focus-within{border-color:#9ca3af}
  .policy-dropzone svg{width:20px;height:20px;color:#9ca3af}
  .policy-dropzone__name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    color:#9ca3af;font-size:12.5px;font-weight:500}
  .policy-dropzone__name.is-chosen{color:#111827}
  .policy-dropzone__hint{color:#9ca3af;font-size:11px}
  .policy-dropzone__input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
  .policy-upload-status:not(:empty){color:#6b7280;font-size:12px;font-weight:600}
  .policy-upload-status[role="alert"]{color:#b42318}
  .policy-intake-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;
    margin-top:16px;padding-top:14px;border-top:1px solid #f3f4f6}
  .policy-intake-actions .policy-ghost{padding:8px 16px;font-size:12.5px}
  .policy-intake-actions .policy-primary{padding:8px 16px;font-size:12.5px}

  @media(max-width:1180px){
    .policy-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  }
  @media(max-width:960px){
    .policy-dials{grid-template-columns:minmax(0,1fr)}
    .policy-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  }
  @media(max-width:860px){
    .policy-pill-tab,.policy-ghost,.policy-primary,.policy-flag{min-height:44px}
    .policy-row__delete{width:34px;height:34px}
  }
  @media(max-width:720px){
    .policy-library{gap:14px}
    .policy-page-head,.policy-panel__head,.policy-runtime-foot{align-items:flex-start;flex-direction:column}
    .policy-panel,.policy-compliance{padding:16px}
    .policy-panel__controls,.policy-search{width:100%}
    .policy-pill-tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
    .policy-pill-tab{flex:none}
    .policy-error,.policy-pagination{align-items:flex-start;flex-direction:column}
    .policy-runtime>summary{padding:16px}
    .policy-runtime-body{padding:0 16px 16px}
    .policy-add-drawer .console-right-panel__body{padding:16px}
  }
  @media(max-width:420px){
    .policy-summary{grid-template-columns:1fr}
    .policy-tiles{grid-template-columns:1fr}
  }

  /* =========================================================================
     PREMIUM LAYER - light mineral stage, Inter display type, and the
     S10 copilot ask-your-memory surface. Class contracts unchanged.
     ========================================================================= */
  [hidden]{display:none!important}
  h1,h2,h3,.stat .v,.brand b{font-family:var(--font-brand)}
  ::selection{background:rgb(199 215 178/45%)}
  .head h1{font-size:var(--text-h1);letter-spacing:-.025em}
  .app,.auth-shell{position:relative;z-index:1}

  /* S17 connected apps - outcome-led connection journey and calm lifecycle register. */
  .oauth-screen{width:100%;max-width:1040px;margin:0 auto}
  .oauth-screen>.head p{max-width:66ch;color:var(--muted)}
  .oauth-journey{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(0,1.6fr);
    margin:0 0 var(--s4);padding:0;overflow:hidden;border-color:rgb(var(--evergreen-rgb)/16%)}
  .oauth-journey__intro{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:var(--s5);
    border-right:1px solid var(--line);background:var(--sage-soft)}
  .oauth-journey__intro .eyebrow{margin-bottom:var(--s2);font-size:11px;color:var(--evergreen)}
  .oauth-journey__intro h2{font-size:22px;line-height:1.18;color:var(--evergreen)}
  .oauth-journey__intro p{margin:var(--s3) 0 0;color:var(--muted);font-size:13px;line-height:1.55}
  .oauth-journey__guide{margin-top:var(--s4);text-decoration:none}
  .oauth-journey__steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:var(--s5);list-style:none}
  .oauth-journey__steps li{position:relative;display:flex;align-items:flex-start;gap:var(--s3);min-width:0;padding:0 var(--s4)}
  .oauth-journey__steps li:first-child{padding-left:0}
  .oauth-journey__steps li:last-child{padding-right:0}
  .oauth-journey__steps li+li{border-left:1px solid var(--line)}
  .oauth-journey__steps li>div{display:grid;gap:5px;min-width:0}
  .oauth-journey__steps b{font-size:13px;line-height:1.35;color:var(--ink)}
  .oauth-journey__steps li>div>span{color:var(--muted);font-size:12px;line-height:1.45}
  .oauth-step-number{width:24px;height:24px;display:grid;place-items:center;flex:none;border:1px solid var(--olive);
    border-radius:var(--r-pill);background:var(--panel);color:var(--evergreen);font:600 11px var(--font-mono)}
  .oauth-endpoint{display:block;max-width:100%;padding:6px 8px;border:1px solid rgb(var(--evergreen-rgb)/14%);
    border-radius:var(--r-xs);background:var(--mineral);color:var(--evergreen);font:500 11px/1.35 var(--font-mono);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:all}
  .oauth-status-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 var(--s4);
    padding:0;border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);box-shadow:var(--sh-1)}
  .oauth-status-overview>div{min-width:0;padding:var(--s2) var(--s4)}
  .oauth-status-overview>div+div{border-left:1px solid var(--line)}
  .oauth-status-overview dt{font:500 10px/1.3 var(--font-mono);letter-spacing:.11em;text-transform:uppercase;color:var(--muted)}
  .oauth-status-overview dd{display:flex;align-items:baseline;gap:var(--s2);min-width:0;margin:4px 0 0}
  .oauth-status-overview strong{color:var(--evergreen);font:500 22px/1 var(--font-brand);font-variant-numeric:tabular-nums}
  .oauth-status-overview dd span{overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
  .oauth-security{margin-bottom:var(--s5)}
  .oauth-security .compact-disclosure{box-shadow:none}
  .oauth-security .compact-disclosure__body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0}
  .oauth-security .compact-disclosure__body>div{display:grid;gap:4px;padding:var(--s4)}
  .oauth-security .compact-disclosure__body>div+div{border-left:1px solid var(--line)}
  .oauth-security b{font-size:13px;font-weight:600;color:var(--evergreen)}
  .oauth-security span{color:var(--muted);font-size:12px;line-height:1.5}

  .oauth-create{max-width:820px;margin:0 0 var(--s6)!important}
  .oauth-create>.compact-disclosure__body{display:grid;gap:var(--s4);padding:var(--s5)}
  .oauth-create>.compact-disclosure__body>.sub{margin:0;padding:var(--s3) var(--s4);border-left:2px solid var(--olive);
    border-radius:0 var(--r-xs) var(--r-xs) 0;background:var(--sage-soft);color:var(--muted)}
  .oauth-create .field{min-width:0;margin:0}
  .oauth-create .m8a-checks{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s2)}
  .oauth-create .m8a-check{min-height:76px;padding:var(--s3);background:var(--panel)}
  .oauth-create .m8a-check:has(input:checked){box-shadow:inset 3px 0 0 var(--olive)}
  .oauth-advanced{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
  .oauth-advanced>summary{padding:var(--s3) 0;cursor:pointer;list-style:none;color:var(--evergreen);font:500 13px var(--font-cta)}
  .oauth-advanced>summary::-webkit-details-marker{display:none}
  .oauth-advanced>summary::after{content:"+";float:right;color:var(--muted);font:400 18px/1 var(--font-body)}
  .oauth-advanced[open]>summary::after{content:"−"}
  .oauth-advanced__body{display:grid;grid-template-columns:220px minmax(0,1fr);gap:var(--s4);padding:0 0 var(--s4)}
  .oauth-create [data-action="oauth-client-submit"]{justify-self:start}

  .oauth-group{margin:0 0 var(--s5)}
  .oauth-group__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s4);margin-bottom:var(--s3)}
  .oauth-group__head h2{font-size:20px;line-height:1.25}
  .oauth-group__head p{max-width:74ch;margin:4px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}
  .oauth-group__count{min-width:28px;height:28px;display:grid;place-items:center;flex:none;border:1px solid var(--line);
    border-radius:var(--r-pill);background:var(--panel);color:var(--evergreen);font:600 11px var(--font-mono)}
  .oauth-empty{display:flex;align-items:center;gap:var(--s3);min-height:72px;padding:var(--s4);border:1px dashed rgb(var(--evergreen-rgb)/18%);
    border-radius:var(--r-md);background:#fff}
  .oauth-empty__mark{width:34px;height:34px;display:grid;place-items:center;flex:none;border-radius:var(--r-pill);
    background:var(--sage-soft);color:var(--evergreen);font:600 16px var(--font-body)}
  .oauth-empty>div{display:grid;gap:2px}
  .oauth-empty b{font-size:13px;font-weight:600;color:var(--evergreen)}
  .oauth-empty span{color:var(--muted);font-size:12px}
  .oauth-client{margin-bottom:var(--s2)!important;box-shadow:var(--sh-1)}
  .oauth-client>summary{min-height:58px;padding:var(--s3) var(--s4)}
  .oauth-client-summary-copy>b{font-size:14px;font-weight:600;color:var(--evergreen)}
  .oauth-client-summary-copy .mono{font-size:11px;color:var(--muted-2)}
  .oauth-client-summary-copy .badge{display:inline-flex;margin-right:5px;font-family:var(--font-body);vertical-align:middle}
  .oauth-client>.compact-disclosure__body{padding:var(--s4) var(--s5) var(--s5)}
  .oauth-client .m8a-grant{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--s5);row-gap:0}
  .oauth-client .m8a-kv{min-width:0;padding:8px 0;border-bottom:1px solid rgb(var(--evergreen-rgb)/8%)}
  .oauth-client .compact-disclosure__body>.row{margin-top:var(--s4)}

  .oauth-archive{margin:0 0 var(--s6);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
  .oauth-archive>summary{display:flex;min-height:48px;align-items:center;justify-content:space-between;gap:var(--s3);
    padding:var(--s2) 0;cursor:pointer;list-style:none;color:var(--evergreen);font:600 15px/1.3 var(--font-cta)}
  .oauth-archive>summary::-webkit-details-marker{display:none}
  .oauth-archive__meta{display:flex;align-items:center;gap:var(--s3);color:var(--muted);font:400 18px/1 var(--font-body)}
  .oauth-archive[open] .oauth-archive__meta>span:last-child{transform:rotate(45deg)}
  .oauth-archive__meta>span:last-child{transition:transform .12s ease}
  .oauth-archive__body{padding:var(--s3) 0 var(--s2)}

  @media(max-width:1120px){
    .oauth-journey{grid-template-columns:1fr}
    .oauth-journey__intro{flex-direction:row;align-items:center;justify-content:space-between;gap:var(--s4);padding:var(--s4);
      border-right:0;border-bottom:1px solid var(--line)}
    .oauth-journey__guide{margin-top:0}
    .oauth-journey__steps{padding:var(--s4)}
    .oauth-client .m8a-grant{grid-template-columns:1fr}
  }
  @media(max-width:680px){
    .oauth-screen>.head .acts,.oauth-screen>.head .acts .btn{width:100%}
    .oauth-screen>.head .acts .btn{justify-content:center}
    .oauth-journey__steps{grid-template-columns:1fr;gap:0}
    .oauth-journey__steps li{padding:var(--s3) 0}
    .oauth-journey__steps li+li{border-left:0;border-top:1px solid var(--line)}
    .oauth-journey__intro{align-items:flex-start;flex-direction:column}
    .oauth-journey__guide{margin-top:var(--s3)}
    .oauth-status-overview{grid-template-columns:1fr}
    .oauth-status-overview>div+div{border-left:0;border-top:1px solid var(--line)}
    .oauth-security .compact-disclosure__body{grid-template-columns:1fr}
    .oauth-security .compact-disclosure__body>div+div{border-left:0;border-top:1px solid var(--line)}
    .oauth-create .m8a-checks,.oauth-advanced__body{grid-template-columns:1fr}
    .oauth-group__head p{max-width:58ch}
    .oauth-client>.compact-disclosure__body{padding:var(--s4)}
  }

  /* -- S10 copilot: full-height chat+history card; memory activity is a
     separate section below it, so the chat is never truncated and the page
     scrolls to the activity instead (WhatsApp/Claude-style split). -- */
  /* The max-width lives on the board, not the stage: the head has to span the
     full content column to line up with every other screen's title, while the
     chat card below stays in its own measured column. */
  .copilot-stage{width:100%}
  .copilot-board{display:flex;width:100%;max-width:1180px;margin:0 auto;flex-direction:column;gap:var(--s4)}
  .copilot-workbench{display:grid;grid-template-columns:minmax(204px,236px) minmax(0,1fr);
    grid-template-rows:minmax(0,1fr);
    height:min(840px,calc(100dvh - 152px));min-height:680px;overflow:hidden;
    border:1px solid var(--line);border-radius:var(--r-lg);background:var(--panel);
    box-shadow:var(--sh-1),var(--sh-2)}
  .copilot-history{grid-column:1;grid-row:1;
    display:flex;min-width:0;min-height:0;flex-direction:column;padding:var(--s3);
    border-right:1px solid var(--line);background:rgb(var(--evergreen-rgb)/2%)}
  .copilot-history-head{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
    padding:2px 2px var(--s3)}
  .copilot-history-head h2{margin-top:2px;font-size:18px;letter-spacing:-.015em}
  .copilot-history-view-label{display:block;line-height:1}
  /* The Chats/Routines select is also the rail's heading, so it wears the
     title's presence: larger type and pill padding in place of the old h2. */
  .copilot-history-view{max-width:180px;padding:9px 36px 9px 16px;border:1px solid var(--line);
    border-radius:var(--r-pill);background-color:var(--panel);background-position:right 12px center;
    color:var(--evergreen);font:600 15px/1.25 var(--font-mono);letter-spacing:.1em;
    text-transform:uppercase;cursor:pointer}
  .copilot-history-view:hover{border-color:var(--olive);background-color:var(--sage-soft)}
  .copilot-history-view:focus-visible{outline:none;box-shadow:var(--focus)}
  .copilot-new-chat,.copilot-new-routine{all:unset;box-sizing:border-box;display:grid;width:36px;height:36px;
    place-items:center;flex:none;cursor:pointer;border:1px solid var(--line);border-radius:var(--r-xs);
    background:var(--panel);color:var(--evergreen);transition:background .12s,border-color .12s,transform .08s}
  .copilot-new-chat:hover,.copilot-new-routine:hover{border-color:var(--olive);background:var(--sage-soft)}
  .copilot-new-chat:active,.copilot-new-routine:active{transform:translateY(1px)}
  .copilot-new-chat:focus-visible,.copilot-new-routine:focus-visible{box-shadow:var(--focus)}
  .copilot-new-chat svg,.copilot-new-routine svg,.copilot-history-search svg{width:16px;height:16px}
  .copilot-history-search{display:flex;align-items:center;gap:8px;margin-bottom:var(--s3);padding:8px 10px;
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--panel);color:var(--muted-2)}
  .copilot-history-search:focus-within{border-color:var(--evergreen);box-shadow:var(--focus)}
  .copilot-history-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;
    color:var(--ink);font:13px/1.4 var(--font-body)}
  .copilot-history-search input::placeholder{color:var(--muted-2)}
  .copilot-history-list{display:flex;min-height:0;flex:1;flex-direction:column;gap:3px;
    overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
  .copilot-history-item{all:unset;box-sizing:border-box;display:flex;min-width:0;flex-direction:column;
    gap:3px;padding:10px;border-radius:var(--r-sm);cursor:pointer;transition:background .12s,box-shadow .12s}
  .copilot-history-item:hover{background:var(--sage-soft)}
  .copilot-history-item.is-active{background:var(--sage-soft);box-shadow:inset 2px 0 0 var(--evergreen)}
  .copilot-history-item:focus-visible{box-shadow:var(--focus)}
  .copilot-history-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500}
  .copilot-history-item small{color:var(--muted-2);font:10px/1.4 var(--font-mono);
    letter-spacing:.12em;text-transform:uppercase}
  .copilot-history-empty{margin:auto 0;padding:var(--s5) var(--s2);color:var(--muted-2);
    text-align:center;font-size:var(--text-small)}
  .copilot-history>.copilot-clear{margin-top:var(--s2);align-self:flex-start}
  /* One prompt, one schedule line, a status dot, and real controls. The card
     was 163px of repeated text with 25px-tall flat-text buttons, Delete five
     pixels from Pause. */
  .copilot-routine-item{display:flex;align-items:flex-start;gap:6px;padding:9px 9px 9px 10px;
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--panel)}
  .copilot-routine-item.is-selected{border-color:var(--evergreen);
    box-shadow:inset 2px 0 0 var(--evergreen)}
  .copilot-routine-item.is-paused .copilot-routine-prompt{color:var(--muted)}
  .copilot-routine-select{all:unset;box-sizing:border-box;display:flex;align-items:flex-start;
    gap:8px;min-width:0;flex:1;border-radius:var(--r-xs);cursor:pointer}
  .copilot-routine-select:hover .copilot-routine-prompt{color:var(--evergreen)}
  .copilot-routine-select:focus-visible{box-shadow:var(--focus)}
  .copilot-routine-dot{width:7px;height:7px;flex:none;margin-top:5px;border-radius:50%;
    background:var(--evergreen)}
  .copilot-routine-dot.is-paused{background:var(--muted-2)}
  .copilot-routine-dot.is-failed{background:var(--rust)}
  .copilot-routine-body{display:grid;gap:3px;min-width:0;flex:1}
  .copilot-routine-prompt{min-width:0;display:-webkit-box;overflow:hidden;font-size:12.5px;
    font-weight:500;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:2;
    overflow-wrap:anywhere}
  /* One clipped line: a long zone or weekday used to wrap the card to three. */
  .copilot-routine-when{overflow:hidden;color:var(--muted-2);font:10px/1.5 var(--font-mono);
    text-overflow:ellipsis;white-space:nowrap}
  .copilot-routine-when b{font-weight:600}
  .copilot-routine-failed{color:var(--rust)}
  .copilot-routine-actions{display:flex;align-items:center;gap:6px;flex:none}
  /* A real target on desktop too — the old controls only reached 44px under
     the mobile breakpoint, and were 25px tall everywhere else. */
  .copilot-routine-more{flex:none;width:30px;height:30px}
  .copilot-routine-more svg{width:15px;height:15px}
  .copilot-routine-menu{position:fixed;margin:0;padding:5px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--panel);box-shadow:var(--shadow-pop,0 8px 24px rgba(0,0,0,.12));
    min-width:150px}
  .copilot-routine-menu::backdrop{background:transparent}
  .copilot-routine-menu button{all:unset;box-sizing:border-box;display:block;width:100%;
    min-height:34px;padding:0 10px;line-height:34px;border-radius:var(--r-xs);
    color:var(--ink);font-size:13px;cursor:pointer}
  .copilot-routine-menu button:hover{background:var(--sage-soft)}
  .copilot-routine-menu button:focus-visible{box-shadow:var(--focus)}
  .copilot-routine-delete{color:var(--rust)}
  .copilot-routine-confirm{width:min(460px,calc(100vw - 32px))}
  .btn--danger{background:var(--rust);border-color:var(--rust);color:#fff}
  .btn--danger:hover{filter:brightness(.94)}
  .copilot-chat-shell{grid-column:2;grid-row:1;
    display:flex;min-width:0;min-height:0;flex-direction:column;overflow:hidden;
    background:var(--panel)}
  .copilot-transcript{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;
    padding:var(--s4) clamp(var(--s4),4vw,var(--s7));scrollbar-width:thin}
  .copilot-hero{position:relative;display:flex;min-height:100%;flex-direction:column;align-items:center;
    justify-content:center;text-align:center;padding:var(--s5) var(--s4)}
  .copilot-hero-mark{width:54px;height:54px;margin-bottom:var(--s5);border-radius:16px;
    display:grid;place-items:center;background:var(--evergreen);
    box-shadow:0 18px 40px -22px rgb(18 58 46/55%)}
  .copilot-hero h2{font-size:clamp(25px,2.4vw,30px);letter-spacing:-.03em;line-height:1.14;
    color:var(--evergreen)}
  .copilot-hero p{max-width:52ch;margin:var(--space-text) 0 0;color:var(--muted);font-size:14.5px}
  .copilot-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:var(--s5)}
  .copilot-chip{all:unset;box-sizing:border-box;padding:8px 15px;border-radius:var(--r-pill);
    border:1px solid var(--line);background:var(--panel);color:var(--ink);
    font-size:13px;cursor:pointer;box-shadow:var(--sh-1);
    transition:border-color .14s,background .14s,transform .08s}
  .copilot-chip:hover{border-color:var(--olive);background:var(--sage-soft)}
  .copilot-chip:active{transform:translateY(1px)}
  .copilot-chip:focus-visible{box-shadow:var(--focus)}
  /* Starter routines. A chip cannot carry these: each one is a prompt AND the
     schedule it would run on, so they get a card and left-aligned text. */
  .copilot-routine-suggestions{display:grid;gap:10px;width:100%;max-width:760px;margin-top:var(--s5);
    grid-template-columns:repeat(auto-fit,minmax(228px,1fr));text-align:left}
  .copilot-routine-suggestion{all:unset;box-sizing:border-box;display:grid;gap:4px;align-content:start;
    padding:12px 13px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--panel);
    color:var(--ink);cursor:pointer;box-shadow:var(--sh-1);
    transition:border-color .14s,background .14s,transform .08s}
  .copilot-routine-suggestion:hover{border-color:var(--olive);background:var(--sage-soft)}
  .copilot-routine-suggestion:active{transform:translateY(1px)}
  .copilot-routine-suggestion:focus-visible{box-shadow:var(--focus)}
  .copilot-routine-suggestion-area{color:var(--muted-2);font:10px/1.4 var(--font-mono);
    letter-spacing:.12em;text-transform:uppercase}
  .copilot-routine-suggestion b{color:var(--evergreen);font-size:13.5px;font-weight:600;line-height:1.3}
  /* Two lines of prompt: enough to judge it, not enough to make five cards a
     wall of text. The full prompt is the card's tooltip and fills the dialog. */
  .copilot-routine-suggestion span:not(.copilot-routine-suggestion-area){display:-webkit-box;overflow:hidden;
    color:var(--muted);font-size:12px;line-height:1.45;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .copilot-routine-suggestion small{color:var(--muted-2);font:10px/1.5 var(--font-mono);
    letter-spacing:.08em;text-transform:uppercase}
  .copilot-routine-prompt-input{width:100%;min-height:86px;resize:vertical;
    font:14px/1.5 var(--font-body)}

  .copilot-thread{display:flex;min-height:100%;flex-direction:column;gap:var(--s4);padding:var(--s3) 2px var(--s5)}
  .copilot-thread .chat-msg{max-width:min(92%,880px)}
  .copilot-thread .chat-bubble{min-width:0;max-width:78ch;box-shadow:var(--sh-2);font-size:14px;line-height:1.55}
  .chat-msg-head{display:flex;align-items:center;gap:6px;min-height:30px}
  .chat-msg--user .chat-msg-head{justify-content:flex-end}
  .copilot-message-menu-trigger{width:30px;height:30px;border-color:transparent;background:transparent}
  .copilot-message-menu{position:fixed;position-anchor:auto;inset:auto;margin:4px 0 0;padding:5px;
    top:anchor(bottom);left:anchor(right);transform:translateX(-100%);min-width:164px;
    max-width:calc(100vw - 24px);border:1px solid var(--line);border-radius:var(--r-sm);
    background:var(--panel);box-shadow:var(--sh-2),var(--sh-3);color:var(--ink)}
  .copilot-message-menu::backdrop{background:transparent}
  .copilot-message-menu button{all:unset;box-sizing:border-box;width:100%;padding:8px 10px;border-radius:var(--r-xs);
    color:var(--ink);font-size:12.5px;cursor:pointer}
  .copilot-message-menu button:hover{background:var(--sage-soft)}
  .copilot-message-menu button:focus-visible{box-shadow:var(--focus)}
  .chat-meta{margin-bottom:2px}
  .chat-heading{margin:var(--s2) 0 var(--s3);color:var(--evergreen);font-size:17px;line-height:1.3}
  .chat-heading:first-child{margin-top:0}
  .chat-inline-code{padding:2px 5px;border:1px solid var(--line);border-radius:var(--r-xs);
    background:var(--mineral);font:12px/1.4 var(--font-mono);overflow-wrap:anywhere}
  .chat-list{display:grid;gap:6px;margin:var(--s2) 0 var(--s3);padding-left:20px}
  .chat-list li{padding-left:2px;overflow-wrap:anywhere}
  .chat-list--ordered{padding-left:24px}
  .chat-quote{margin:var(--s3) 0;padding:var(--s2) var(--s3);border-left:3px solid var(--olive);
    background:var(--sage-soft);color:var(--muted);overflow-wrap:anywhere}
  .chat-divider{height:1px;margin:var(--s3) 0;border:0;background:var(--line)}
  .chat-code{max-width:100%;margin:var(--s3) 0;padding:var(--s3);overflow:auto;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--ink);color:var(--mineral);font:12px/1.55 var(--font-mono);
    white-space:pre-wrap;overflow-wrap:anywhere}
  .chat-visualization{width:100%;max-width:100%;margin:var(--s3) 0;padding:var(--s3);
    border:1px solid var(--line);border-radius:var(--r-md);background:var(--mineral)}
  .chat-visualization figcaption{margin-bottom:var(--s3);color:var(--evergreen);font-weight:600}
  .chat-chart{display:grid;gap:10px;min-width:0}
  .chat-chart-row{display:grid;grid-template-columns:minmax(88px,.85fr) minmax(0,1.5fr) minmax(64px,.65fr);
    gap:var(--s2);align-items:center;min-width:0}
  .chat-chart-label{min-width:0;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
  .chat-chart-value{font:11px/1.35 var(--font-mono);color:var(--muted-2);text-align:right;overflow-wrap:anywhere}
  .chat-chart-meter{width:100%;min-width:0;height:9px;border:0;border-radius:var(--r-pill);background:var(--stone);
    accent-color:var(--evergreen)}
  .chat-chart-meter::-webkit-meter-bar{border:0;border-radius:var(--r-pill);background:var(--stone)}
  .chat-chart-meter::-webkit-meter-optimum-value{border-radius:var(--r-pill);background:var(--evergreen)}
  .chat-chart-meter::-moz-meter-bar{border-radius:var(--r-pill);background:var(--evergreen)}
  .chat-visual-note{margin:var(--s3) 0 0;color:var(--muted);font-size:12px}
  .chat-table-wrap{max-width:100%;margin:var(--s3) 0;overflow-x:auto;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--panel)}
  .chat-table{width:100%;min-width:360px;border-collapse:collapse;font-size:12px}
  .chat-table th,.chat-table td{padding:9px var(--s3);border-bottom:1px solid var(--line);text-align:left;overflow-wrap:anywhere}
  .chat-table th{background:var(--mineral);color:var(--muted-2);font:600 10px/1.35 var(--font-mono);
    letter-spacing:.08em;text-transform:uppercase}
  .chat-table tbody tr:last-child td{border-bottom:0}

  .copilot-composer{flex:none;margin:0;padding:var(--s3) clamp(var(--s4),3vw,var(--s5)) var(--s4);
    border-top:1px solid var(--line);background:rgb(243 246 238/72%)}
  .copilot-composer-pill{border-radius:var(--r-lg);
    border:1px solid var(--line);background:var(--panel);box-shadow:var(--sh-1);
    transition:border-color .18s,box-shadow .18s}
  .copilot-composer-pill:focus-within{border-color:var(--olive);
    box-shadow:var(--focus),var(--sh-1)}
  .copilot-composer-pill .chat-input{width:100%;min-height:58px;max-height:180px;margin:0;
    padding:16px 18px 6px;border:0;background:transparent;color:var(--ink);resize:none;
    font:15px/1.5 var(--font-display)}
  .copilot-composer-pill .chat-input:focus{outline:none;border:0;box-shadow:none}
  .copilot-composer-foot{display:flex;align-items:center;justify-content:space-between;
    gap:var(--s3);padding:8px 12px 12px}
  .copilot-composer-left{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
  .copilot-model-chip{display:inline-flex;align-items:center;gap:7px;max-width:280px;
    padding:6px 11px;border-radius:var(--r-pill);border:1px solid var(--line);
    background:var(--mineral);color:var(--ink);font-size:12px;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis}
  .copilot-model-chip i{width:6px;height:6px;flex:none;border-radius:50%;background:var(--olive);
    box-shadow:0 0 0 3px rgb(127 147 102/18%)}
  .copilot-model-select{min-width:0;max-width:240px;padding:0 18px 0 0;border:0;outline:0;
    background-color:transparent;background-position:right 2px center;background-size:11px 11px;
    color:inherit;font:inherit;cursor:pointer;text-overflow:ellipsis}
  .copilot-model-select:disabled{cursor:wait;opacity:.68}
  .copilot-model-chip small{color:var(--muted-2);font-size:11px}

  /* ---- Composer model picker: provider rail + search + favorites ---- */
  .copilot-model-picker{position:relative;display:inline-flex;min-width:0}
  .copilot-model-trigger{cursor:pointer;user-select:none;transition:border-color .14s}
  .copilot-model-trigger:hover{border-color:var(--olive)}
  .copilot-model-trigger:focus-visible{outline:none;box-shadow:var(--focus)}
  .copilot-model-trigger:disabled{cursor:wait;opacity:.68}
  .copilot-model-trigger-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:200px}
  .copilot-model-trigger-caret{display:inline-flex;color:var(--muted-2)}
  .copilot-model-trigger-caret svg{width:12px;height:12px;transition:transform .16s}
  .copilot-model-picker.is-open .copilot-model-trigger-caret svg{transform:rotate(180deg)}
  .copilot-model-mark{display:inline-flex;flex:none;align-items:center;justify-content:center}
  .copilot-model-mark svg{width:13px;height:13px}
  .copilot-model-mark--anthropic{color:#d97757}
  .copilot-model-mark--openai{color:var(--ink)}
  .copilot-model-mark--managed{color:var(--olive)}
  .copilot-model-popover{position:absolute;left:0;bottom:calc(100% + 8px);z-index:40;display:flex;
    width:min(340px,calc(100vw - 48px));max-height:min(380px,60vh);overflow:hidden;
    border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);
    box-shadow:var(--sh-2),var(--sh-3)}
  .copilot-model-popover[hidden]{display:none}
  .copilot-model-rail{display:flex;flex:none;flex-direction:column;gap:4px;padding:8px 6px;
    border-right:1px solid var(--line);background:var(--mineral)}
  .copilot-model-rail-tab{all:unset;box-sizing:border-box;position:relative;display:grid;place-items:center;
    width:30px;height:30px;border-radius:var(--r-xs);color:var(--muted-2);cursor:pointer}
  .copilot-model-rail-tab svg{width:15px;height:15px}
  .copilot-model-rail-tab:hover{background:var(--sage-soft);color:var(--ink)}
  .copilot-model-rail-tab:focus-visible{box-shadow:var(--focus)}
  .copilot-model-rail-tab.is-active{background:var(--sage-soft);color:var(--ink)}
  .copilot-model-rail-tab.copilot-model-mark--anthropic{color:#d97757}
  .copilot-model-rail-tab.is-active::after{content:"";position:absolute;right:-6px;top:50%;
    transform:translateY(-50%);width:2.5px;height:16px;border-radius:var(--r-pill);background:var(--evergreen)}
  .copilot-model-rail-rule{height:1px;margin:2px 2px;background:var(--line)}
  .copilot-model-pane{display:flex;min-width:0;min-height:0;flex:1;flex-direction:column}
  .copilot-model-search{display:flex;align-items:center;gap:7px;padding:9px 10px;
    border-bottom:1px solid var(--line);color:var(--muted-2)}
  .copilot-model-search:focus-within{border-bottom-color:var(--olive)}
  .copilot-model-search svg{width:13px;height:13px;flex:none}
  .copilot-model-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;
    color:var(--ink);font:12.5px/1.4 var(--font-display)}
  .copilot-model-list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
    padding:5px;scrollbar-width:thin}
  .copilot-model-option{display:flex;align-items:center;gap:8px;padding:7px 8px;
    border-radius:var(--r-xs);cursor:pointer}
  .copilot-model-option:hover,.copilot-model-option:focus-visible{background:var(--sage-soft);outline:none}
  .copilot-model-option.is-selected{background:var(--mineral)}
  .copilot-model-option-main{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}
  .copilot-model-option-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    color:var(--ink);font-size:12.5px;font-weight:500}
  .copilot-model-option-sub{display:flex;align-items:center;gap:5px;overflow:hidden;
    white-space:nowrap;color:var(--muted-2);font-size:11px}
  .copilot-model-option-sub .copilot-model-mark svg{width:11px;height:11px}
  .copilot-model-kbd{flex:none;padding:2px 6px;border:1px solid var(--line);border-radius:var(--r-xs);
    background:var(--mineral);color:var(--muted-2);font:600 10px/1.4 var(--font-mono)}
  .copilot-model-fav{all:unset;box-sizing:border-box;display:grid;place-items:center;width:24px;height:24px;
    flex:none;border-radius:var(--r-xs);color:var(--muted-2);cursor:pointer;opacity:0}
  .copilot-model-option:hover .copilot-model-fav,.copilot-model-option:focus-within .copilot-model-fav,
  .copilot-model-fav.is-fav,.copilot-model-fav:focus-visible{opacity:1}
  .copilot-model-fav svg{width:13px;height:13px}
  .copilot-model-fav:hover{background:var(--panel);color:var(--ink)}
  .copilot-model-fav:focus-visible{box-shadow:var(--focus)}
  .copilot-model-fav.is-fav{color:var(--evergreen)}
  .copilot-model-fav.is-fav svg{fill:currentColor}
  .copilot-model-empty{padding:18px 12px;color:var(--muted-2);font-size:12px;text-align:center}
  .copilot-send{all:unset;box-sizing:border-box;width:38px;height:38px;flex:none;cursor:pointer;
    display:grid;place-items:center;border-radius:50%;background:var(--evergreen);color:var(--mineral);
    box-shadow:0 10px 24px -12px rgb(18 58 46/60%);transition:transform .1s,background .14s}
  .copilot-send:hover{background:var(--evergreen-hover)}
  .copilot-send:active{transform:scale(.94)}
  .copilot-send:focus-visible{box-shadow:var(--focus)}
  .copilot-send:disabled{opacity:.5;cursor:wait}
  .copilot-send svg{width:17px;height:17px}
  .copilot-write-control{margin:0;align-items:center;gap:8px}
  .copilot-write-control .track{transform:scale(.86)}
  .copilot-write-control>span:last-child b{font-size:11.5px;font-weight:500}
  .copilot-write-control small{display:none}
  .copilot-status-row{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
    min-height:22px;margin-top:5px;padding:0 4px}
  .copilot-status-row .hint{margin:0;font-size:12px}
  .copilot-clear{all:unset;cursor:pointer;color:var(--muted-2);font-size:12px;padding:4px 8px;
    border-radius:var(--r-xs)}
  .copilot-clear:hover{color:var(--ink);background:var(--sage-soft)}
  .copilot-clear:focus-visible{box-shadow:var(--focus)}

  .copilot-inspector{display:flex;min-width:0;flex-direction:column;gap:var(--s3);
    padding:var(--s3) clamp(var(--s4),3vw,var(--s5)) var(--s4);
    border:1px solid var(--line);border-radius:var(--r-lg);
    background:rgb(243 246 238/72%);box-shadow:var(--sh-1),var(--sh-2)}
  .copilot-inspector-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s3);
    flex:none;padding:2px 2px 0}
  .copilot-inspector-head>div{display:flex;align-items:baseline;gap:var(--s2);min-width:0}
  .copilot-inspector-head h2{margin-top:0;font-size:16px;letter-spacing:-.015em}
  .copilot-inspector-head p{margin:var(--space-text) 0 0;margin-left:auto;color:var(--muted);
    min-width:0;max-width:56ch;overflow:hidden;font-size:12.5px;line-height:1.45;text-align:right;
    text-overflow:ellipsis;white-space:nowrap}
  .copilot-inspector-toggle{flex:none}
  .copilot-inspector-toggle svg{transition:transform .16s var(--ease)}
  .copilot-inspector-toggle[aria-expanded="false"] svg{transform:rotate(-90deg)}
  .is-activity-collapsed .copilot-inspector{gap:0;padding-block:var(--s3)}
  .is-activity-collapsed .copilot-inspector-head p{color:var(--muted-2)}
  .copilot-inspector-summary{margin-left:auto;color:var(--muted-2);
    font:500 var(--text-label)/1 var(--font-mono);white-space:nowrap}
  /* Bounded: the two panels grew to 838px of page, all of it below the fold.
     Each body already scrolls, so cap the pair and let them scroll inside. */
  .copilot-panels{max-height:min(58vh,460px);
    display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s3);
    margin:0;padding:0}
  .copilot-panel{display:flex;min-width:0;min-height:0;flex-direction:column;border:1px solid var(--line);
    border-radius:var(--r-md);background:var(--panel);overflow:hidden;box-shadow:var(--sh-1)}
  .copilot-panel-head{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:var(--s2);
    flex:none;padding:var(--s3);border-bottom:1px solid var(--line)}
  .copilot-panel-head>div{min-width:0}
  .copilot-panel-head h3{margin-top:2px;font-size:14px;letter-spacing:-.01em}
  .copilot-panel-head>.pill{max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .copilot-ref-count{flex:none;color:var(--muted);font:500 var(--text-label)/1 var(--font-mono);
    letter-spacing:.1em;text-transform:uppercase}
  .copilot-panel-body{min-height:0;flex:1;overflow:auto;padding:var(--s3);scrollbar-width:thin}
  .copilot-panel-empty{display:flex;min-height:100%;flex-direction:column;justify-content:center;
    padding:var(--s2);text-align:left}
  .copilot-panel-empty b{font-size:13px;font-weight:600}
  .copilot-panel-empty p{margin:var(--space-text) 0 0;color:var(--muted);font-size:12.5px;line-height:1.45}
  .copilot-runtime-trace{margin:0}
  .copilot-memory-list{display:grid;gap:var(--s2);margin:0;padding:0;list-style:none}
  .copilot-memory-item{display:grid;gap:7px;padding:10px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--mineral)}
  .copilot-memory-details{display:grid;gap:7px}
  .copilot-memory-details>summary{display:flex;min-width:0;align-items:center;gap:7px;
    cursor:pointer;list-style:none}
  .copilot-memory-details>summary::-webkit-details-marker{display:none}
  .copilot-memory-details>summary>svg{width:14px;height:14px;flex:none;color:var(--muted-2);
    transition:transform .16s var(--ease)}
  .copilot-memory-details[open]>summary>svg{transform:rotate(180deg)}
  .copilot-memory-details>summary:focus-visible{box-shadow:var(--focus);border-radius:var(--r-xs)}
  .copilot-memory-source{min-width:0;overflow:hidden;color:var(--ink);font-size:12px;
    font-weight:600;text-overflow:ellipsis;white-space:nowrap}
  .copilot-memory-body{display:grid;gap:6px;padding-top:7px;border-top:1px solid var(--line);
    color:var(--ink);font-size:12.5px;line-height:1.5;overflow-wrap:anywhere}
  .copilot-memory-body .chat-heading{margin:4px 0 0;font-size:13px}
  .copilot-memory-body .chat-list{margin:0;padding-left:18px}
  .copilot-memory-details .copilot-memory-meta{flex:1}
  .copilot-memory-meta{display:flex;min-width:0;align-items:center;gap:7px}
  .copilot-memory-used{flex:none;padding:2px 6px;border-radius:var(--r-pill);
    background:var(--sage-soft);color:var(--evergreen);
    font:9px/1.4 var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
  .copilot-memory-item.is-used{border-color:var(--olive)}
  .copilot-memory-score{margin-left:auto;color:var(--muted-2);font:600 11px var(--font-mono);white-space:nowrap}
  /* Steps: one dot, one sentence. Tone is carried by the dot, not by wording. */
  .copilot-steps{display:grid;gap:7px;margin:0;padding:0;list-style:none}
  .copilot-step{display:flex;align-items:flex-start;gap:8px;color:var(--ink);
    font-size:12.5px;line-height:1.45}
  .copilot-step>.dot{width:7px;height:7px;flex:none;margin-top:6px;border-radius:50%;
    background:var(--evergreen)}
  .copilot-step.is-warn>.dot{background:var(--olive)}
  .copilot-step.is-bad>.dot{background:var(--rust)}
  .copilot-degraded-note{margin:0;padding:9px 11px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--mineral);color:var(--muted);
    font-size:12.5px;line-height:1.45}
  /* A model that cannot commit a write must not present an armed toggle. */
  .copilot-write-control.is-unavailable{opacity:.55}
  .copilot-write-control.is-unavailable .track{cursor:not-allowed}
  /* Placeholders in the shape of what is loading — a rail row or a message —
     so a half-second fetch is visibly in progress rather than indistinguishable
     from a click that never registered. Reuses the app-wide .skel shimmer. */
  .copilot-skeleton{display:grid;gap:var(--s2)}
  .copilot-skeleton-row{display:grid;gap:6px;padding:10px;border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--panel)}
  .copilot-skeleton-msg{display:grid;gap:7px;max-width:74%;padding:11px 13px;
    border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel)}
  .copilot-skeleton-msg:nth-child(even){margin-left:auto}
  .copilot-memory-item p{margin:0;color:var(--ink);font-size:12.5px;line-height:1.5;overflow-wrap:anywhere}
  .copilot-memory-item code{display:block;overflow:hidden;color:var(--muted-2);font-size:11px;
    text-overflow:ellipsis;white-space:nowrap}
  .copilot-notices{display:grid;gap:8px;margin-top:var(--s2)}
  .copilot-routine-dialog{width:min(600px,calc(100vw - 32px))}
  .copilot-routine-prompt-preview{display:grid;gap:6px;margin-bottom:var(--s4);padding:var(--s3);
    border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
  .copilot-routine-prompt-preview p{max-height:7.2em;margin:0;overflow:auto;font-size:13.5px;line-height:1.5;
    overflow-wrap:anywhere}
  .copilot-routine-frequency{display:flex;align-items:center;gap:var(--s4);margin:0 0 var(--s4);padding:0;border:0}
  .copilot-routine-frequency legend{margin-bottom:7px;color:var(--muted-2);font:10px/1.4 var(--font-mono);
    letter-spacing:.12em;text-transform:uppercase}
  .copilot-routine-frequency label{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;cursor:pointer}
  .copilot-routine-frequency input{accent-color:var(--evergreen)}
  .copilot-routine-fields{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(140px,.9fr);gap:var(--s3)}
  .copilot-routine-time-zone{grid-column:1/-1}
  .copilot-routine-dialog .hint{margin:var(--s2) 0 var(--s4)}
  .copilot-routine-dialog [data-routine-status]{margin-bottom:var(--s3)}
  @media(max-width:1180px){
    .copilot-workbench{grid-template-columns:minmax(190px,220px) minmax(0,1fr)}
  }
  @media(max-width:900px){
    .copilot-workbench{grid-template-columns:1fr;grid-template-rows:auto minmax(560px,1fr);
      height:auto;min-height:0;overflow:hidden}
    .copilot-history{grid-column:1;grid-row:auto;max-height:150px;border-right:0;
      border-bottom:1px solid var(--line)}
    .copilot-chat-shell{grid-column:1;grid-row:auto;min-height:560px}
    .copilot-history-head{padding-bottom:var(--s2)}
    .copilot-history-head .eyebrow{display:none}
    .copilot-history-search{margin-bottom:var(--s2);padding-block:6px}
    .copilot-history-list{display:grid;grid-auto-columns:minmax(150px,220px);grid-auto-flow:column;
      flex:none;overflow-x:auto;overflow-y:hidden}
    .copilot-history.is-routines{max-height:min(42dvh,340px)}
    .copilot-history.is-routines .copilot-history-list{display:flex;flex-direction:column;
      overflow-x:hidden;overflow-y:auto}
    .copilot-history-empty{margin:0;padding:8px;text-align:left}
    .copilot-history>.copilot-clear{display:none}
  }
  @media(max-width:680px){
    .copilot-workbench{border-radius:var(--r-md)}
    .copilot-history{max-height:140px}
    .copilot-history.is-routines{max-height:min(42dvh,320px)}
    .copilot-transcript{padding:var(--s3)}
    .copilot-thread .chat-msg{max-width:94%}
    .chat-chart-row{grid-template-columns:minmax(0,1fr);gap:5px}
    .chat-chart-meter{grid-column:1;grid-row:auto}
    .chat-chart-value{text-align:left}
    .copilot-composer-foot{flex-wrap:wrap}
    .copilot-composer{padding:var(--s3)}
    .copilot-inspector{padding:var(--s3)}
    .copilot-inspector-head p{display:none}
    .copilot-hero{padding:var(--s4) var(--s2)}
    .copilot-hero-mark{margin-bottom:var(--s3)}
    .copilot-hero h2{font-size:24px}
    .copilot-routine-fields{grid-template-columns:1fr}
    .copilot-routine-time-zone{grid-column:auto}
    .copilot-routine-more{width:44px;height:44px}
    .copilot-routine-menu button{min-height:44px;line-height:44px}
  }
  @media(prefers-reduced-motion:reduce){
    .copilot-send,.copilot-chip,.copilot-composer-pill,.copilot-history-item,.copilot-new-chat,
    .copilot-new-routine,.copilot-routine-suggestion,
    .copilot-message-menu-trigger,.copilot-inspector-toggle svg,
    .copilot-model-trigger,.copilot-model-trigger-caret svg{transition:none}
  }

  /* ---- S13 Teams v2: scope selector + organization people directory ---- */
  .teams-v2{display:flex;width:100%;max-width:1160px;margin:0 auto;flex-direction:column;gap:18px;color:#111827}
  .teams-v2 button,.teams-v2 input,.teams-v2 select{font-family:var(--font-display)}
  .teams-v2__flow{display:flex;min-width:0;flex-direction:column;gap:14px}
  .teams-v2__title{display:flex;flex-direction:column;gap:4px}
  .teams-v2__title-row{display:flex;align-items:center;gap:8px}
  .teams-info,.teams-meta-info{display:inline-flex;align-items:center;justify-content:center;color:#d1d5db;cursor:help}
  .teams-info:hover,.teams-meta-info:hover{color:#9ca3af}.teams-info svg{width:15px;height:15px}
  .teams-v2__head-actions{display:flex;align-items:center;gap:10px}
  .teams-v2__head-actions>.btn{min-height:0;padding:9px 16px;border-radius:10px;font-size:13px}
  .teams-segmented{display:inline-flex;gap:2px;padding:3px;border:0;border-radius:10px;background:#f3f4f6}
  .teams-segmented__item{all:unset;box-sizing:border-box;padding:6px 14px;border-radius:8px;
    color:#6b7280;font:600 12.5px var(--font-display);cursor:pointer}
  .teams-segmented__item.is-active{background:#fff;color:#111827;box-shadow:0 1px 2px rgb(16 24 40/8%)}
  .teams-segmented__item:focus-visible{box-shadow:var(--focus)}
  .teams-selector{position:relative;z-index:4;display:inline-flex;align-self:flex-start;max-width:100%}
  .teams-selector__trigger{display:flex;min-width:280px;max-width:100%;align-items:center;gap:12px;padding:9px 14px;
    border:1px solid #e5e7eb;border-radius:12px;background:#fff;color:#111827;text-align:left;cursor:pointer;
    box-shadow:0 1px 2px rgb(16 24 40/4%)}
  .teams-selector__trigger:hover{background:#f9fafb}.teams-selector__trigger:focus-visible{box-shadow:var(--focus)}
  .teams-avatar{display:grid;width:30px;height:30px;flex:none;place-items:center;border-radius:8px;
    background:#0f3d2e;color:#eaf1ec;font:650 12px var(--font-display)}
  .teams-selector__value{display:block;min-width:0;flex:1}.teams-selector__trigger-label{display:block;color:#9ca3af;font-size:10px;font-weight:650;
    letter-spacing:.06em;text-transform:uppercase}.teams-selector__trigger-meta{display:flex;min-width:0;align-items:baseline;gap:4px;margin-top:1px;white-space:nowrap}
  .teams-selector__trigger-meta b{overflow:hidden;color:#111827;font-size:14px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
  .teams-selector__trigger-meta small{flex:none;color:#9ca3af;font-size:12px;font-weight:500}.teams-selector__chevron{display:flex;color:#9ca3af}
  .teams-selector__chevron svg{width:13px;height:13px}.teams-selector__backdrop{position:fixed;z-index:60;inset:0;border:0;background:transparent}
  .teams-selector__backdrop[hidden]{display:none}.teams-selector__panel{position:absolute;z-index:70;top:calc(100% + 6px);left:0;width:min(300px,calc(100vw - 32px));
    max-height:420px;padding:8px;overflow-y:auto;border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 8px 24px rgb(16 24 40/12%)}
  .teams-selector__search{display:flex;align-items:center;gap:7px;margin-bottom:8px;padding:6px 9px;border:1px solid #e5e7eb;border-radius:9px;background:#fff;color:#9ca3af}
  .teams-selector__search>svg{width:13px;height:13px;flex:none}
  .teams-selector__search .input{min-height:0;padding:0;border:0;outline:0;box-shadow:none;font-size:12px}
  .teams-selector__list{display:grid;gap:2px;max-height:260px;overflow:auto}
  .teams-selector__option{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;width:100%;
    padding:8px 10px;border:0;border-radius:10px;background:#fff;color:#111827;text-align:left;cursor:pointer}
  .teams-selector__option-copy{display:grid;min-width:0}.teams-selector__option b{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
  .teams-selector__option small{margin-top:1px;color:#9ca3af;font-size:11px}.teams-selector__option:hover,.teams-selector__option[aria-selected="true"]{background:#f3f4f6}
  .teams-selector__archive-icon{display:flex;color:#9ca3af}.teams-selector__archive-icon svg{width:12px;height:12px}
  .teams-selector__option.is-archived{opacity:.7}.teams-selector__archived{margin-top:6px;border-top:1px solid #f3f4f6;padding-top:6px}
  .teams-selector__archived summary{padding:7px;color:#6b7280;font-size:12px;cursor:pointer}
  .teams-overview,.teams-directory-card,.teams-waiting-card,.teams-people-card{border:1px solid #e5e7eb;
    border-radius:14px;background:#fff;box-shadow:0 1px 2px rgb(17 24 39/4%)}
  .teams-overview,.teams-waiting-card,.teams-people-card{padding:20px}.teams-directory-card{padding:20px 20px 12px}
  .teams-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
  .teams-card-head--compact{align-items:center;padding:0 4px 14px}.teams-card-head h2{margin:0;font-size:15px;letter-spacing:-.01em}
  .teams-card-head p{max-width:680px;margin:5px 0 0;color:#6b7280;font-size:12.5px;line-height:1.5}
  .teams-card-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
  .teams-card-actions .btn{min-height:34px;border:1px solid #e5e7eb;border-radius:10px;padding:7px 13px;background:#fff;color:#111827;
    box-shadow:0 1px 2px rgb(16 24 40/4%)}
  .teams-card-actions .btn:hover{background:#f9fafb}.teams-invite-button span{display:flex;color:#4b5563}.teams-invite-button svg{width:12px;height:12px}
  .teams-members-title{display:flex;align-items:baseline;gap:10px}.teams-role-help{border:0;border-radius:6px;padding:2px 6px;
    background:transparent;color:#6b7280;font-size:11.5px;font-weight:600;cursor:pointer}
  .teams-role-help:hover{background:#f3f4f6;color:#111827}
  .teams-archived-banner{margin:-20px -20px 18px;padding:10px 20px;border-bottom:1px solid #fedf89;border-radius:14px 14px 0 0;
    background:#fffaeb;color:#b54708;font-size:12.5px}
  .teams-overview__primary{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
  .teams-overview__identity{min-width:220px;flex:1}.teams-overview__title-row{display:flex;align-items:center;gap:8px}
  .teams-overview__title-row h2{margin:0;font-size:17px;letter-spacing:-.01em}.teams-overview__identity p{margin:4px 0 0;
    color:#6b7280;font-size:12.5px;line-height:1.5}.teams-overview__controls{display:flex;align-items:center;gap:9px;flex:none}
  .teams-icon-button{display:grid;width:24px;height:24px;place-items:center;border:0;border-radius:7px;background:transparent;
    color:#9ca3af;font-size:14px}.teams-icon-button:disabled,.teams-archive-button:disabled{cursor:not-allowed;opacity:.72}
  .teams-icon-button svg{width:13px;height:13px}
  .teams-icon-button:hover{background:#f3f4f6;color:#374151}.teams-archive-button{margin-right:6px;background:#fff;color:#6b7280}
  .teams-memory-access{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 9px;margin:0;padding:0;border:0;background:transparent}
  .teams-memory-access__copy{min-width:0;text-align:right}.teams-memory-access h3{margin:0;color:#374151;font-size:12px;font-weight:600}
  .teams-memory-access p{margin:2px 0 0;color:#9ca3af;font-size:11px;white-space:nowrap}
  .teams-memory-access__toggle{grid-column:2;grid-row:1/3;justify-self:end;white-space:nowrap}.teams-memory-access__toggle>span:last-child{display:none}
  .teams-memory-access__toggle .track{width:36px;height:21px}.teams-memory-access__toggle .track::after{top:2.5px;width:16px;height:16px}
  .teams-memory-access__toggle input:checked+.track::after{transform:translateX(15px)}
  .teams-memory-access__status{grid-column:1/-1;min-height:0;margin:0;font-size:0}
  .teams-memory-access[aria-busy="true"]{opacity:.72}
  .teams-meta-strip{display:flex;align-items:center;gap:22px;margin-top:14px;padding-top:13px;border-top:1px solid #f3f4f6;flex-wrap:wrap}
  .teams-meta-strip>div{display:grid;min-width:0;gap:3px}.teams-meta-strip span{color:#9ca3af;font:650 10.5px var(--font-display);
    letter-spacing:.06em;text-transform:none}.teams-meta-strip b{overflow:hidden;color:#374151;font-size:12.5px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
  .teams-meta-strip__address b{color:#0f3d2e}.teams-address-lock{display:inline-grid!important;width:13px!important;height:13px!important;vertical-align:-2px}
  .teams-address-lock svg{width:13px;height:13px}.teams-meta-info{display:inline-flex!important;width:12px!important;height:12px!important;margin-left:3px}
  .teams-meta-info svg{width:12px;height:12px}
  .teams-detail,.teams-card{min-width:0}.teams-card{display:flex;flex-direction:column;gap:0}.teams-card .tblwrap{max-width:100%;overflow-x:auto}
  .teams-table-scroll{max-width:100%;margin-top:0;overflow-x:auto;border:0;border-radius:0}
  .teams-members-grid__canvas{min-width:720px}
  .teams-members-grid__head,.teams-members-grid__row{display:grid;grid-template-columns:minmax(140px,1.6fr) 92px minmax(64px,90px) minmax(78px,100px) 76px 112px;gap:8px;align-items:center}
  .teams-members-grid__head{padding:0 12px 8px;color:#9ca3af;font:650 10.5px var(--font-display);letter-spacing:.06em}
  .teams-members-grid__body{display:flex;flex-direction:column;gap:8px}
  .teams-members-grid__row{padding:8px 12px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
    box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%);transition:background .14s ease}
  .teams-members-grid__row:hover{background:#f5f6f7}.teams-members-grid__row>[role="cell"]{min-width:0;color:#374151;font-size:12px}
  .teams-members-grid__empty{padding:32px 20px;color:#9ca3af;font-size:13px;text-align:center}
  .teams-members-footer{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding:12px 4px 6px;border-top:1px solid #f3f4f6;color:#6b7280;font-size:13px}
  .teams-members-pagination{display:flex;gap:6px}.teams-members-page-button{display:grid;width:28px;height:28px;padding:0;place-items:center;
    border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#374151;font-size:14px;cursor:pointer}
  .teams-members-page-button:hover:not(:disabled){background:#f9fafb}.teams-members-page-button:disabled{color:#d1d5db;cursor:not-allowed}
  .teams-people-grid__canvas{min-width:860px;padding-bottom:8px}
  .teams-people-grid__head,.teams-people-grid__row{display:grid;grid-template-columns:minmax(160px,1.7fr) 96px minmax(130px,1.2fr) minmax(84px,110px) 78px minmax(120px,150px);gap:10px;align-items:center}
  .teams-people-grid__head{padding:0 12px 8px;color:#9ca3af;font:650 10.5px var(--font-display);letter-spacing:.06em}
  .teams-people-grid__body{display:flex;flex-direction:column;gap:8px}.teams-people-grid__row{padding:8px 12px;border:1px solid #f3f4f6;
    border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%);transition:background .14s ease}
  .teams-people-grid__row:hover{background:#f5f6f7}.teams-people-grid__row>[role="cell"]{min-width:0;color:#374151;font-size:12px}
  .teams-people-grid__empty{display:grid;min-height:74px;place-items:center;color:#6b7280;font-size:12px;text-align:center}
  .teams-members-grid__row.is-suspended,.teams-people-grid__row.is-suspended{opacity:.62}
  .teams-person{display:flex;min-width:0;align-items:center;gap:10px}.teams-person>span:last-child{display:grid;min-width:0}
  .teams-person b,.teams-person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.teams-person b{color:#111827;font-size:13px;font-weight:600}
  .teams-person small{color:#9ca3af;font-size:11px}.teams-role-select{min-width:105px;padding:6px 28px 6px 9px;font-size:11.5px}
  .teams-person--directory>:first-child,.teams-person--member>:first-child{border-radius:999px}.teams-person--directory .teams-avatar,.teams-person--member .teams-avatar{background:rgb(15 61 46/8%);color:#0f3d2e}
  .teams-person--directory .teams-avatar,.teams-person--member .teams-avatar{font-size:11px;font-weight:700}
  .teams-members-grid__row .teams-role-select{width:100%;min-width:0;max-width:100%;padding:3px 22px 3px 7px;font-size:11px}
  .teams-roster-memberships{display:flex;min-width:0;align-items:center;gap:4px;overflow:hidden}.teams-team-pill{min-width:0;overflow:hidden;padding:2px 8px;
    border:1px solid #e5e7eb;border-radius:999px;background:#fff;color:#374151;font-size:10.5px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
  .teams-team-more{flex:none;color:#9ca3af;font-size:10.5px}.teams-only-here{color:#9ca3af;font-size:11.5px}
  .teams-member-last-seen{overflow:hidden;color:#6b7280!important;font-size:11.5px!important;text-overflow:ellipsis;white-space:nowrap}
  .teams-people-last-seen{overflow:hidden;color:#6b7280!important;font-size:11.5px!important;text-overflow:ellipsis;white-space:nowrap}
  .teams-v2 .badge--role{display:inline-block;max-width:100%;box-sizing:border-box;overflow:hidden;padding:2px 9px;border:1px solid #e5e7eb;
    border-radius:999px;background:#f3f4f6;color:#374151;font:650 10.5px var(--font-display);letter-spacing:0;text-overflow:ellipsis;text-transform:none;white-space:nowrap}
  .teams-v2 .pill{gap:0;padding:2px 8px;border-radius:999px;font:650 10.5px var(--font-display);letter-spacing:0;text-transform:none;white-space:nowrap}
  .teams-v2 .pill--live{border-color:#a6f4c5;background:#ecfdf3;color:#027a48}.teams-v2 .pill--danger{border-color:#fecdca;background:#fef3f2;color:#b42318}
  .teams-v2 .pill--warn{border-color:#fedf89;background:#fffaeb;color:#b54708}.teams-v2 .pill--muted{border-color:#e5e7eb;background:#f9fafb;color:#6b7280}
  .teams-members-grid__row .btn--ghost,.teams-people-grid__row .btn--ghost{min-height:0;padding:4px 10px;border:1px solid #e5e7eb;border-radius:8px;
    background:#fff;color:#111827;font-size:11px;font-weight:600;white-space:nowrap}.teams-members-grid__row .btn--ghost:hover,.teams-people-grid__row .btn--ghost:hover{background:#f9fafb}
  .teams-people-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}
  .teams-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}.teams-kebab{display:grid;width:26px;height:26px;place-items:center;
    border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#6b7280;cursor:pointer}.teams-kebab:hover{background:#f9fafb;color:#6b7280;border-color:#e5e7eb}
  .teams-person-menu{position:relative}.teams-person-menu__backdrop{position:fixed;z-index:60;inset:0;border:0;background:transparent;cursor:default}
  .teams-person-menu__popover{position:fixed;z-index:70;top:auto;right:auto;width:190px;padding:5px;border:1px solid #e5e7eb;
    border-radius:10px;background:#fff;box-shadow:0 16px 40px -16px rgb(17 24 39/45%)}
  .teams-person-menu__backdrop[hidden],.teams-person-menu__popover[hidden]{display:none}.teams-person-menu__popover button{width:100%;padding:9px 10px;
    border:0;border-radius:7px;background:transparent;color:#b42318;font:600 12px var(--font-cta);text-align:left;cursor:pointer}
  .teams-person-menu__popover button:hover,.teams-person-menu__popover button:focus-visible{background:#fef3f2}
  .teams-action-spacer{display:inline-block;width:26px;height:26px}.teams-protected{display:inline-flex;align-items:center;gap:5px;color:#9ca3af;font-size:11px;font-weight:600}
  .teams-protected svg{width:11px;height:11px}
  .teams-never{color:#b54708;font-weight:600}.teams-unavailable-text{color:#9ca3af}
  .teams-memberships{position:relative;display:inline-block}.teams-memberships>button{border:0;background:transparent;color:#0f3d2e;font-weight:600;cursor:pointer}
  .teams-memberships--people>button{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:7px;color:#374151;font-size:12px}
  .teams-memberships--people>button:hover{background:#f3f4f6;color:#111827}
  .teams-memberships__popover{position:absolute;z-index:3;top:calc(100% + 5px);left:0;display:grid;min-width:150px;padding:6px;
    border:1px solid #e5e7eb;border-radius:9px;background:#fff;box-shadow:0 12px 30px -16px rgb(17 24 39/45%)}
  .teams-memberships__popover[hidden]{display:none}.teams-memberships__popover span{padding:6px 8px;border-radius:6px;white-space:nowrap}
  .teams-table-empty{height:74px!important;color:#6b7280!important;text-align:center}
  .teams-unavailable{display:flex;align-items:flex-start;gap:12px;margin-top:14px;padding:14px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa}
  .teams-unavailable>span{display:grid;width:26px;height:26px;flex:none;place-items:center;border-radius:7px;background:#f3f4f6;color:#9ca3af}
  .teams-unavailable b{color:#6b7280}.teams-unavailable p{margin:3px 0 0;color:#9ca3af;font-size:12px;line-height:1.45}
  .teams-undo,.teams-invite-banner{display:flex;align-items:center;gap:10px;margin-top:14px;padding:10px 12px;border:1px solid #d5e3da;
    border-radius:9px;background:#eaf1ec;color:#0f3d2e;font-size:12px}.teams-undo>span,.teams-invite-banner>span{min-width:0;flex:1}
  .teams-undo button:not(.teams-undo__close){border:0;background:transparent;color:#0f3d2e;font-weight:700;text-decoration:underline;cursor:pointer}
  .teams-undo__close{border:0;background:transparent;color:#6b7280;font-size:18px;cursor:pointer}
  .teams-people-intro{padding:0 4px 4px}.teams-people-intro h2{font-size:15px;font-weight:600;letter-spacing:-.01em}
  .teams-people-intro p{margin:3px 0 0;color:#6b7280;font-size:12px}.teams-people-tools{display:flex;align-items:center;justify-content:space-between;
    gap:12px;padding:10px 4px 14px;flex-wrap:wrap}.teams-subtabs{display:flex;align-items:center;gap:4px}.teams-subtabs button{display:flex;align-items:center;
    gap:6px;padding:6px 13px;border:0;border-radius:999px;background:transparent;color:#6b7280;font:600 12.5px var(--font-cta);cursor:pointer}
  .teams-subtabs button.is-active{background:#f3f4f6;color:#111827}.teams-subtabs span{color:#9ca3af;font-weight:500}
  .teams-people-toolbar-actions{display:flex;align-items:center;gap:8px}.teams-people-search{display:flex;width:220px;align-items:center;gap:8px;padding:7px 10px;
    border:1px solid #e5e7eb;border-radius:10px;background:#fff}.teams-people-search svg{width:13px;height:13px;flex:none;fill:none;stroke:#9ca3af;stroke-width:1.8;stroke-linecap:round}
  .teams-people-search input{min-width:0;width:100%;padding:0;border:0;outline:0;background:transparent;color:#111827;font:400 12.5px var(--font-display)}
  .teams-people-add{min-height:34px;padding:8px 14px;border-radius:10px}
  .teams-inline-link{border:0;background:transparent;color:#0f3d2e;font-weight:650;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
  .teams-empty{display:grid;justify-items:center;gap:8px;padding:50px 24px;text-align:center}.teams-empty__mark{display:grid;width:44px;height:44px;
    place-items:center;border-radius:12px;background:#0f3d2e;color:#eaf1ec;font-weight:700}.teams-empty p{max-width:440px;margin:0 0 8px;color:#6b7280}
  .teams-action-status{min-height:1.2em;margin:0}.teams-addable-list{display:grid;gap:8px}
  .teams-addable-person{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,.7fr) auto;align-items:center;gap:12px;padding:10px;
    border:1px solid #e5e7eb;border-radius:10px}.teams-delivery-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
  .teams-delivery-option{display:grid;gap:3px;padding:12px;border:1px solid #e5e7eb;border-radius:10px}.teams-delivery-option.is-disabled{opacity:.55}
  .teams-delivery-option.is-active{border-color:#d5e3da;background:#eaf1ec}.teams-delivery-option small{color:#6b7280}
  .teams-invite-result{display:grid;gap:8px;margin-top:16px;padding:13px;border:1px solid #fedf89;border-radius:10px;background:#fffaeb}
  .teams-invite-result[hidden]{display:none}.teams-invite-result p{margin:0;color:#b54708;font-size:12px;line-height:1.45}
  .teams-role-cards{display:grid;gap:10px}.teams-role-card{padding:14px;border:1px solid #e5e7eb;border-radius:11px;background:#fafafa}
  .teams-role-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.teams-role-card h3{font-size:15px}.teams-role-card span{color:#0f3d2e;font-size:11px;font-weight:650}
  .teams-role-card p{margin:8px 0;color:#374151;font-size:12.5px}.teams-role-card small{color:#6b7280;line-height:1.5}
  .teams-rename-note{margin-bottom:16px;padding:12px 13px;border:1px solid #fedf89;border-radius:10px;background:#fffaeb;color:#b54708}
  .teams-rename-note p{margin:4px 0 0;font-size:12px;line-height:1.5}
  .teams-namespace-preview{display:grid;gap:5px;padding:12px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa}
  .teams-namespace-preview>span{color:#6b7280;font:600 10px var(--font-mono);letter-spacing:.12em;text-transform:uppercase}
  .teams-namespace-preview b{color:#0f3d2e}.teams-namespace-preview small{color:#6b7280;line-height:1.45}
  .teams-impact-loading{margin-top:14px;padding:14px;border:1px solid #e5e7eb;border-radius:10px}
  .teams-impact-loading p{margin:3px 0 10px;color:#6b7280;font-size:12px}.teams-impact-skeletons{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
  .teams-impact-skeletons i{height:50px;border-radius:8px;background:linear-gradient(90deg,#f3f4f6,#fff,#f3f4f6);background-size:200% 100%;background-repeat:no-repeat}
  body.console-modal-open{overflow:hidden}
  .console-modal{position:fixed;inset:0 0 0 auto;width:min(620px,100vw);height:100dvh;max-width:none;max-height:none;
    margin:0 0 0 auto;padding:0;overflow:auto;border:0;border-left:1px solid #e5e7eb;border-radius:0;
    background:#fff;color:#111827;font-family:var(--font-sans);
    box-shadow:-24px 0 64px -40px rgb(16 24 40/36%);animation:console-drawer-enter .2s var(--ease-enter)}
  .console-modal:not([open]){display:none}
  .console-modal::backdrop{background:rgb(5 11 10/72%);backdrop-filter:blur(7px)}
  .console-modal__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s4);
    padding:var(--s5);border-bottom:1px solid #e5e7eb;background:#fff}
  .console-modal__head .eyebrow{color:#9ca3af}
  .console-modal__head h2,.console-modal__head h3{margin-top:3px;color:#111827;font-size:22px}
  .console-modal__head .halo-icon-control{border-color:#e5e7eb;background:#fff;color:#374151}
  .console-modal__head .halo-icon-control:hover{border-color:#9ca3af;background:#f9fafb}
  .console-modal__body{padding:var(--s5);background:#fff}
  .console-modal__body>.subtle:first-child{margin:0 0 var(--s4);color:#6b7280}
  .console-modal__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--s2);
    margin-top:var(--s5);padding-top:var(--s4);border-top:1px solid #e5e7eb}
  .console-modal__actions>.hint{min-width:0;flex:1;margin:0}
  .teams-suspend-modal{width:min(460px,100vw);overflow:hidden}
  .teams-suspend-modal[open]{display:flex;flex-direction:column}
  .teams-suspend-modal .console-modal__head{padding:22px 24px 14px;border-bottom-color:#f3f4f6}
  .teams-suspend-modal .console-modal__head h2{margin-top:3px;font-size:17px;font-weight:650;letter-spacing:-.01em}
  .teams-suspend-kicker{color:#6b7280;font-size:12px;font-weight:600}
  .teams-suspend-head p{max-width:390px;margin:5px 0 0;color:#6b7280;font-size:12px;line-height:1.55}
  .teams-suspend-close{width:30px;height:30px;flex:none;border-color:#e5e7eb;border-radius:8px;color:#6b7280}
  .teams-suspend-close svg{width:14px;height:14px}
  .teams-suspend-modal .console-modal__body{display:flex;min-height:0;flex:1;flex-direction:column;gap:8px;overflow-y:auto;padding:16px 24px}
  .teams-suspend-modal .field{margin-top:4px}.teams-suspend-modal .field label{font-size:11.5px;font-weight:600}
  .teams-suspend-modal .field .subtle{color:#9ca3af;font-weight:500}
  .teams-suspend-modal .field .input{min-height:40px;border-radius:10px;font-size:13px}
  .teams-suspend-footer{margin-top:auto;padding:14px 24px;border-top:1px solid #f3f4f6;background:#fff}
  .teams-suspend-footer .hint{color:#9ca3af;font-size:11.5px}
  @keyframes console-drawer-enter{from{opacity:.82;transform:translateX(32px)}to{opacity:1;transform:translateX(0)}}
  @media(max-width:900px){
    .teams-meta-strip{gap:14px 22px}
  }
  @media(max-width:760px){
    .teams-v2__head{align-items:flex-start;flex-direction:column}
    .teams-v2__head-actions{width:100%;justify-content:space-between}
    .teams-card-head{align-items:flex-start;flex-direction:column}.teams-card-actions{justify-content:flex-start}
    .teams-people-tools{align-items:stretch;flex-direction:column;padding-bottom:10px}.teams-subtabs{min-height:38px;overflow-x:auto}
    .teams-people-toolbar-actions{width:100%}.teams-people-search{width:auto;min-width:0;flex:1}
  }
  @media(max-width:620px){
    .console-modal{width:100vw;border-left:0;border-radius:0}
    .console-modal__head,.console-modal__body{padding:var(--s4)}
    .console-modal__actions{align-items:stretch;flex-direction:column}
    .console-modal__actions>.hint{width:100%}
    .console-modal__actions .btn{justify-content:center}
    .teams-v2__head-actions{align-items:stretch;flex-direction:column}
    .teams-segmented{width:100%}.teams-segmented__item{flex:1;text-align:center}
    .teams-overview,.teams-directory-card,.teams-waiting-card,.teams-people-card{padding:16px}
    .teams-archived-banner{margin:-16px -16px 16px}
    .teams-overview__controls{width:100%;justify-content:space-between;flex-wrap:wrap}
    .teams-memory-access{grid-template-columns:minmax(0,1fr) auto}.teams-memory-access__toggle{justify-self:end}
    .teams-people-toolbar-actions{align-items:stretch;flex-direction:column}.teams-people-add{justify-content:center}
    .teams-meta-strip{align-items:flex-start}.teams-addable-person{grid-template-columns:1fr}
    .teams-delivery-options{grid-template-columns:1fr}.teams-impact-skeletons{grid-template-columns:1fr}
    .teams-undo,.teams-invite-banner{align-items:flex-start;flex-wrap:wrap}
  }
  @media(prefers-reduced-motion:reduce){.console-modal{animation:none}}

  /* S14 Integrations - connect agents & MCP clients */
  .intg-screen .head{margin-bottom:0}
  .intg-endpoint{margin-bottom:var(--s4)}
  .intg-endpoint .snippet{margin-top:var(--s3)}
  .intg-tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:var(--s3)}
  .intg-tool{padding:4px 9px;border:1px solid var(--line);border-radius:var(--r-pill);
    background:var(--mineral);color:var(--evergreen);font-size:11px}
  .intg-library{display:grid;gap:var(--s5);padding:var(--s5);background:#fff;
    container:intg-library/inline-size}
  .intg-library-head{padding-bottom:var(--s3);border-bottom:1px solid rgb(var(--evergreen-rgb)/10%)}
  .intg-library-head h2{font-size:20px;letter-spacing:-.02em}
  .intg-library-group{display:grid;gap:var(--s3);min-width:0}
  .intg-library-group>h3{color:var(--muted-2);font:600 11px/1.4 var(--font-mono);
    letter-spacing:.11em;text-transform:uppercase}
  .intg-keycard{min-width:0}
  .intg-keycard .compact-disclosure{background:var(--mineral);border-color:rgb(var(--evergreen-rgb)/11%);
    border-radius:14px;box-shadow:0 1px 2px rgb(16 24 40/4%),0 4px 12px rgb(16 24 40/4%)}
  .intg-keycard .compact-disclosure__body{display:grid;gap:var(--s3);padding:var(--s4);background:#fff}
  .intg-keycard .intg-mint{display:grid;grid-template-columns:minmax(180px,1fr) minmax(170px,.55fr) auto;
    align-items:end!important;gap:var(--s3);margin-top:0}
  .intg-keycard .intg-mint>.field{min-width:0!important}
  .intg-keycard .intg-mint+.hint:empty{display:none}
  .intg-ns-fixed{display:flex;align-items:center;background:var(--mineral);color:var(--muted);cursor:default}
  .intg-minted{margin:var(--s3) 0;padding:var(--s4);border:1px solid rgb(244 211 94/45%);
    border-radius:var(--r-sm);background:rgb(244 211 94/8%)}
  .intg-minted .snippet{margin-top:var(--s3)}
  .intg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3)}
  .intg-card{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;
    text-align:left;min-width:0;min-height:76px;
    padding:12px;border:1px solid #eef0f3;border-radius:14px;background:var(--mineral);
    color:inherit;cursor:pointer;box-shadow:0 1px 2px rgb(16 24 40/5%),0 4px 12px rgb(16 24 40/4%);
    transition:border-color .15s ease,background .15s ease,transform .15s ease,box-shadow .15s ease}
  .intg-card:hover{border-color:var(--olive);background:#fff;transform:translateY(-1px);
    box-shadow:0 1px 2px rgb(16 24 40/6%),0 8px 18px rgb(16 24 40/7%)}
  .intg-card:focus-visible{outline:none;box-shadow:var(--focus)}
  .intg-card .intg-logo{width:38px;height:38px;border-radius:10px}
  .intg-logo svg{width:19px;height:19px}
  .intg-connected{display:grid;gap:var(--s4);border-color:#e5e7eb;background:#fff;
    box-shadow:0 1px 2px rgb(16 24 40/4%)}
  .intg-connected-head{gap:var(--s3)}
  .intg-connected-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--s2);flex-wrap:wrap}
  .intg-connected-actions>.pill{border-color:#e5e7eb;background:#f3f4f6;color:#374151}
  .intg-connected-actions>.pill .dot{background:#9ca3af;box-shadow:none;animation:none}
  .intg-connected .intg-connected-logo{width:40px}
  .intg-connected .intg-logo{width:28px;height:28px;border-radius:var(--r-sm)}
  .intg-connected .intg-logo svg{width:15px;height:15px}
  .intg-connected .source-logo-image{inset:4px;width:calc(100% - 8px);height:calc(100% - 8px)}
  .intg-assigned{display:grid;gap:var(--s4);border-color:#e5e7eb;background:#fff;
    box-shadow:0 1px 2px rgb(16 24 40/4%)}
  .intg-assigned-head{align-items:flex-start;gap:var(--s4)}
  .intg-assigned-head h3{display:flex;align-items:center;gap:7px}
  .intg-assigned-head p{max-width:68ch;margin:6px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}
  .intg-assigned .intg-connected-logo{width:40px}
  .intg-assigned .intg-logo{width:28px;height:28px;border-radius:var(--r-sm)}
  .intg-assigned .intg-logo svg{width:15px;height:15px}
  .intg-assigned .source-logo-image{inset:4px;width:calc(100% - 8px);height:calc(100% - 8px)}
  body[data-console-screen="s14"] #screen-content .intg-ledger-table.data-grid-shell{
    margin:-2px 0 -8px;border:0;border-radius:0;background:#fff;box-shadow:none;overflow-x:auto
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid{
    min-width:760px;border-collapse:separate;border-spacing:0 8px;background:#fff
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid thead,
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid thead tr{
    background:#fff
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid th{
    padding:0 12px 0;border:0;background:transparent;color:#9ca3af;font-family:inherit;
    font-size:10.5px;font-weight:650;letter-spacing:.06em;text-transform:none
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid td{
    padding:9px 12px;vertical-align:middle;border-top:1px solid #f3f4f6;
    border-bottom:1px solid #f3f4f6;background:#fafafa;color:#374151;font-size:12px
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid td:first-child{
    border-left:1px solid #f3f4f6;border-radius:12px 0 0 12px
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid td:last-child{
    border-right:1px solid #f3f4f6;border-radius:0 12px 12px 0
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid tbody tr{
    box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid tbody tr:hover td{
    background:#f5f6f7
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid td:nth-child(2) b{
    color:#111827;font-size:13px;font-weight:600
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid .subtle,
  body[data-console-screen="s14"] #screen-content .intg-ledger-table table.data-grid .mono{
    color:#6b7280
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table .intg-logo{
    border-color:#e5e7eb;background:#f3f4f6;color:#4b5563
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table :is(.pill,.tag):not(.pill--crit){
    border-color:#e5e7eb;background:#f3f4f6;color:#374151
  }
  body[data-console-screen="s14"] #screen-content .intg-ledger-table .pill:not(.pill--crit) .dot{
    background:#9ca3af;box-shadow:none
  }
  .intg-table-filter{display:inline-flex}
  .intg-table-filter-trigger{width:32px;height:32px;border:1px solid #e5e7eb;
    border-radius:10px;background:#fff;color:#4b5563}
  .intg-table-filter-trigger:hover{border-color:#d1d5db;background:#f9fafb;color:#374151}
  .intg-table-filter-trigger[aria-expanded="true"]{border-color:#d1d5db;background:#f3f4f6;color:#374151}
  .intg-table-filter-pop{border-color:#e5e7eb;background:#fff;
    box-shadow:0 8px 24px rgb(16 24 40/12%)}
  .intg-table-filter-pop .usage-filter-option:hover{background:#f3f4f6}
  .intg-table-filter-pop .usage-filter-option.is-active{background:#f3f4f6;color:#374151}
  .intg-table-filter-pop .usage-filter-check{color:#6b7280}
  .intg-active-filters{margin:-2px 0 0}
  .intg-active-filters .usage-active-filter{border-color:#e5e7eb;background:#f3f4f6;
    color:#374151;font-family:inherit;letter-spacing:0;text-transform:none}
  .intg-table-pager{margin-top:0;padding:0 4px}
  .intg-table-pager .usage-page{color:#6b7280}
  .intg-table-pager .usage-page:hover:not([disabled]){background:#f3f4f6;color:#374151}
  .intg-table-pager .usage-page.is-active{border-color:#e5e7eb;background:#fff;color:#374151}
  .intg-ledger-empty{padding:18px 12px;border:1px dashed #e5e7eb;border-radius:12px;
    background:#fafafa;color:#6b7280;font-size:12.5px}
  .intg-assigned table td{vertical-align:middle}
  .intg-assigned table td .tag{white-space:nowrap}
  .intg-assigned-row-action{text-align:right;white-space:nowrap}
  .intg-assigned-empty{padding:var(--s4);border:1px dashed rgb(var(--evergreen-rgb)/18%);
    border-radius:var(--r-md);background:var(--mineral)}
  .intg-assigned-empty b{display:block;margin-bottom:4px;color:var(--evergreen);font-size:13.5px}
  .intg-assigned>.intg-minted{margin:0}
  .intg-card-status{min-width:0;flex:1;display:flex;align-items:center}
  .intg-card-body{min-width:0;display:block}
  .intg-card-title{display:grid;align-content:center;justify-items:start;gap:4px;min-width:0;
    font-size:13.5px;font-weight:600;line-height:1.2;overflow-wrap:anywhere}
  .intg-card-title em{font:600 9.5px var(--font-mono);font-style:normal;letter-spacing:.1em;
    text-transform:uppercase;color:var(--muted-2);padding:3px 7px;border:1px solid var(--line);
    border-radius:var(--r-pill);background:var(--mineral);white-space:nowrap;max-width:100%;overflow:hidden;
    text-overflow:ellipsis}
  .intg-card-cta{justify-self:end;align-self:center;font:600 11px var(--font-mono);letter-spacing:.08em;
    text-transform:uppercase;color:var(--evergreen);padding:6px 10px;border:1px solid var(--line);
    border-radius:var(--r-pill);background:var(--mineral)}
  .intg-dialog{max-width:760px}
  .intg-steps{margin:var(--s4) 0 0;padding:0 0 0 0;list-style:none;display:grid;gap:var(--s4);counter-reset:intg}
  .intg-steps li{counter-increment:intg;padding:var(--s4);border:1px solid var(--line);
    border-radius:var(--r-md);background:var(--mineral);box-shadow:var(--sh-1)}
  .intg-steps li>.between>b::before{content:counter(intg) ". "}
  .intg-steps .snippet{margin-top:var(--s3)}
  .intg-step-note{margin-top:6px;color:var(--muted);font-size:12px;line-height:1.5}
  .intg-placeholder-note{margin-top:var(--s3);padding:9px 12px;border:1px solid rgb(244 211 94/45%);
    border-radius:var(--r-sm);background:rgb(244 211 94/8%);font-size:12px;color:var(--muted)}
  @media(max-width:980px){
    .intg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .intg-keycard .intg-mint{grid-template-columns:repeat(2,minmax(0,1fr))}
    .intg-keycard .intg-mint>.btn{grid-column:1/-1;justify-content:center}
  }
  @media(max-width:680px){
    .intg-library{padding:var(--s4)}
    .intg-grid{grid-template-columns:1fr}
    .intg-card{min-height:64px}
    .intg-keycard .intg-mint{grid-template-columns:1fr}
    .intg-connected-head{align-items:flex-start;flex-direction:column}
    .intg-assigned-head{flex-direction:column}
    .intg-connected-actions{width:100%;justify-content:space-between}
    .intg-ledger-table{overflow-x:auto}
  }
  @container intg-library (max-width:960px){
    .intg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  }
  @container intg-library (max-width:560px){
    .intg-grid{grid-template-columns:1fr}
  }

  /* S16 skills - compact safety gate + responsive operational library. */
  .skills-screen{min-width:0}.skill-member-note{margin:0 0 var(--s5);padding:var(--s3) var(--s4);border:1px solid var(--line);
    border-left:3px solid var(--olive);border-radius:var(--r-md);background:rgb(199 215 178/13%)}
  .skill-member-note b{display:block;margin-top:2px;font-size:14px}.skill-member-note p{margin:2px 0 0;color:var(--muted);font-size:12.5px}
  .skill-security{margin-bottom:var(--s6);container:skill-security/inline-size}.skill-section-head{display:flex;align-items:flex-end;justify-content:space-between;
    gap:var(--s4);margin-bottom:var(--s4)}.skill-section-head h2,.skill-library-head h2{font-size:22px;letter-spacing:-.02em}
  .skill-section-head p,.skill-library-head p{max-width:64ch;margin:var(--space-text) 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}
  .skill-security-guide strong{color:var(--evergreen);font-weight:600}
  .skill-risk-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3)}
  .skill-risk-card{--risk-color:var(--slate);--risk-fill:rgb(91 107 130/8%);all:unset;box-sizing:border-box;position:relative;
    display:flex;align-items:center;gap:var(--s4);min-width:0;padding:var(--s4) var(--s5);overflow:hidden;cursor:pointer;
    background:var(--panel);border:1px solid var(--line);
    border-radius:var(--r-lg);box-shadow:var(--sh-1),var(--sh-2);transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease,background .12s ease}
  .skill-risk-card::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--risk-color)}
  .skill-risk-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--risk-color) 38%,var(--line));box-shadow:var(--sh-1),var(--sh-3)}
  .skill-risk-card:focus-visible{box-shadow:var(--focus),var(--sh-2)}.skill-risk-card.is-active{background:var(--risk-fill);
    border-color:color-mix(in srgb,var(--risk-color) 46%,var(--line));box-shadow:0 0 0 1px color-mix(in srgb,var(--risk-color) 20%,transparent)}
  .skill-risk-card--good{--risk-color:#3f7d54;--risk-fill:rgb(199 215 178/20%)}
  .skill-risk-card--risky{--risk-color:#8a6d1f;--risk-fill:rgb(244 211 94/10%)}
  .skill-risk-card--critical{--risk-color:color-mix(in srgb,var(--rust) 78%,var(--ink));--risk-fill:rgb(232 60 0/5%)}
  .skill-risk-icon{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:var(--r-md);color:var(--risk-color);background:var(--risk-fill)}
  .skill-risk-icon svg{width:17px;height:17px}.skill-risk-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}
  .skill-risk-title{font-size:14px;font-weight:600;color:var(--ink)}
  .skill-risk-state{color:var(--muted);font-size:12px;line-height:1.35}
  .skill-risk-card.is-active .skill-risk-state{color:var(--risk-color);font-weight:600}
  .skill-risk-count{font-size:26px;font-weight:600;line-height:1;letter-spacing:-.03em;color:var(--risk-color);text-align:right}
  .skill-risk-count small{display:block;margin-top:5px;font-family:var(--font-mono);font-size:10px;font-weight:500;letter-spacing:.12em;text-transform:uppercase}

  .skill-library{padding:0;overflow:hidden}.skill-library-head{display:flex;align-items:flex-end;
    justify-content:space-between;gap:var(--s5);padding:var(--s5)}.skill-library-filter{width:min(240px,36%);flex:none}
  .skill-library-filter>span{display:block;margin-bottom:5px;font-family:var(--font-mono);font-size:9px;
    font-weight:500;letter-spacing:.15em;text-transform:uppercase;color:var(--muted-2)}
  .skill-pending-btn{cursor:pointer;transition:box-shadow .12s ease}.skill-pending-btn:hover{box-shadow:var(--sh-1)}
  .skill-pending-btn.is-active{box-shadow:0 0 0 1.5px rgb(138 109 31/55%)}
  .skill-table-wrap{border-top:1px solid var(--line);overflow-x:auto;container:skill-table/inline-size}.skill-table{min-width:880px;table-layout:fixed}
  /* The inline padding matches .skill-library-head's, so the header eyebrow,
     the column labels and every cell share one left ruler down the card. */
  .skill-table thead th{padding:11px var(--s5);white-space:nowrap;background:var(--surface-soft)}
  .skill-table td{padding:var(--s4) var(--s5);vertical-align:middle}
  .skill-table th:nth-child(1){width:34%}.skill-table th:nth-child(2){width:20%}
  .skill-table th:nth-child(3){width:12%}.skill-table th:nth-child(4){width:26%}
  .skill-row.is-selected td{background:var(--sage-soft)}
  .skill-row.is-selected td:first-child{box-shadow:inset 3px 0 0 var(--evergreen)}
  .skill-row.is-pending td:first-child{box-shadow:inset 3px 0 0 rgb(138 109 31/65%)}
  .skill-row.is-pending.is-selected td:first-child{box-shadow:inset 3px 0 0 var(--evergreen)}
  .skill-cell-name{min-width:0}.skill-cell-name p{max-width:46ch;margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .skill-cell-stack{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
  .skill-cell-status{min-width:0}.skill-status-cluster{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .skill-status-cluster>.skill-score{flex-basis:100%;margin-top:1px}
  .skill-library-name{all:unset;box-sizing:border-box;display:inline-flex;
    max-width:100%;align-items:center;gap:5px;border-radius:var(--r-xs);color:var(--evergreen);font-size:15px;font-weight:600;cursor:pointer}
  .skill-library-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .skill-library-name:not(.skill-library-name--static):hover{text-decoration:underline;text-underline-offset:3px}
  .skill-library-name:focus-visible{box-shadow:var(--focus)}
  .skill-library-name--static{cursor:default;color:var(--ink)}
  /* The meta line keeps one height whether or not the row carries a badge, so
     a badged row and a plain row do not sit at different table rhythms. */
  .skill-library-meta{display:flex;align-items:center;gap:6px;min-width:0;min-height:20px;margin-top:6px;color:var(--muted-2);font-size:11.5px}
  .skill-library-meta .pill{min-height:0;padding:1px 8px;font-size:10px}
  .skill-library-meta code{overflow:hidden;text-overflow:ellipsis;font-family:var(--font-mono);white-space:nowrap}.skill-library-meta span{white-space:nowrap}
  .skill-library-meta span::before{content:"·";margin-right:6px;color:var(--line)}
  .skill-library-meta>:first-child::before{content:none}
  .skill-score{display:inline-flex;align-items:baseline;gap:3px;color:var(--muted-2);font-family:var(--font-mono);font-size:9.5px;text-transform:uppercase}
  .skill-score strong{font-family:var(--font-display);font-size:17px;line-height:1;color:var(--muted);letter-spacing:-.02em}
  .skill-score--excellent,.skill-score--good{color:#3f7d54}.skill-score--excellent strong,.skill-score--good strong{color:#3f7d54}
  .skill-score--caution{color:#8a6d1f}.skill-score--caution strong{color:#8a6d1f}.skill-score--risk,.skill-score--risk strong{color:color-mix(in srgb,var(--rust) 78%,var(--ink))}
  .skills-screen .pill--crit{color:color-mix(in srgb,var(--rust) 78%,var(--ink))}
  .skill-usage-cell{display:inline-flex;align-items:baseline;gap:5px;white-space:nowrap}
  .skill-usage-cell strong{display:block;font-size:20px;font-weight:600;letter-spacing:-.03em}
  .skill-usage-cell>span:last-child{display:block;color:var(--muted);font-size:12px}
  /* Both share states occupy one nowrap line of the same height, so a locked
     row and a downloadable row keep the table on a single vertical rhythm. */
  .skill-distribute-actions{display:flex;align-items:center;gap:var(--s2);flex-wrap:nowrap;min-height:30px}
  .skill-distribute-actions .btn{white-space:nowrap}
  .skill-lock-note{display:inline-flex;align-items:center;gap:6px;min-height:30px;color:var(--muted);font-size:12.5px;line-height:1.35;white-space:nowrap}
  .skill-lock-note svg{width:14px;height:14px;flex:none}
  .skill-expand-cell{width:44px;text-align:right}
  .skill-expand{all:unset;box-sizing:border-box;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:var(--r-xs);
    color:var(--muted);cursor:pointer;transition:background .12s ease,color .12s ease}
  .skill-expand:hover{background:rgb(199 215 178/22%);color:var(--evergreen)}.skill-expand:focus-visible{box-shadow:var(--focus)}
  .skill-expand svg{width:15px;height:15px;transition:transform .12s ease}
  .skill-expand[aria-expanded="true"]{color:var(--evergreen)}.skill-expand[aria-expanded="true"] svg{transform:rotate(90deg)}
  .skill-detail-dialog{width:min(760px,100vw);padding:0;overflow:hidden}
  .skill-detail-dialog>.source-wizard-head{padding:var(--s5);margin:0}
  .skill-detail-dialog>.skill-detail-panel{max-height:calc(100dvh - 160px);overflow:auto;padding:var(--s5)}
  .skill-detail-row td{padding:0;background:rgb(243 246 238/54%);box-shadow:inset 3px 0 0 var(--evergreen)}
  .skill-detail-panel{display:flex;flex-direction:column;gap:var(--s4);padding:var(--s5)}
  .skill-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s4);flex-wrap:wrap}
  .skill-detail-title{min-width:0}.skill-detail-title h3{margin-top:3px}
  .skill-detail-state{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px}
  .skill-detail-title .subtle{margin-top:6px;font-size:11.5px}
  .skill-detail-facts{display:flex;flex-wrap:wrap;gap:4px var(--s4);margin-top:8px;color:var(--muted);font-size:12px}
  .skill-detail-facts b{color:var(--ink);font-weight:600}
  /* Retire is the one destructive control here, so it is separated from the
     everyday actions rather than sitting flush against Approve. */
  .skill-detail-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding-bottom:var(--s4);border-bottom:1px solid var(--line)}
  .skill-detail-actions .skill-retire{margin-left:auto;color:color-mix(in srgb,var(--rust) 78%,var(--ink))}
  .skill-detail-actions .skill-retire:hover{border-color:color-mix(in srgb,var(--rust) 45%,var(--line))}
  .skill-edit{display:flex;flex-direction:column;gap:var(--s4);padding:var(--s4);border:1px solid var(--line);
    border-radius:var(--r-md);background:var(--panel)}
  .skill-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s4)}
  .skill-edit-head h4{margin-top:3px;font-size:16px}.skill-edit-grid{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(0,1.3fr);gap:var(--s4);align-items:start}
  .skill-edit-fields{min-width:0}.skill-upload--compact{min-height:74px;padding:var(--s3);grid-template-columns:38px minmax(0,1fr) auto}
  .skill-upload--compact .skill-upload-icon{width:38px;height:38px}.skill-upload--compact .skill-upload-icon svg{width:18px;height:18px}
  .skill-edit-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);padding-top:var(--s2)}
  .skill-gov-row{display:flex;align-items:flex-start;gap:var(--s3);padding:var(--s3) var(--s4);border:1px solid var(--line);
    border-radius:var(--r-md);background:var(--panel)}
  .skill-gov-icon{width:30px;height:30px;flex:none;display:grid;place-items:center;border-radius:var(--r-sm);
    color:var(--slate);background:rgb(91 107 130/10%)}
  .skill-gov-icon--warn{color:#8a6d1f;background:rgb(244 211 94/16%)}
  .skill-gov-icon svg{width:15px;height:15px}
  .skill-gov-body{min-width:0;flex:1}.skill-gov-body b{font-size:13.5px}
  .skill-gov-body p{margin:3px 0 0;color:var(--muted);font-size:12px}
  .skill-gov-controls{display:flex;gap:8px;margin-top:var(--s3)}.skill-gov-controls .input{flex:1}
  .skill-gov-controls .btn{flex:none;align-self:center}
  .skill-check-engines{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 10px;border:1px solid var(--line);
    border-radius:var(--r-md);background:rgb(243 246 238/64%)}
  .skill-check-engine{display:inline-flex;align-items:center;gap:8px;min-height:34px;padding:5px 10px;border:1px solid var(--line);
    border-radius:var(--r-pill);background:var(--panel);font-size:12px;font-weight:700;color:var(--ink)}
  .skill-check-engine--cisco{border-color:rgb(0 118 190/30%);background:rgb(0 118 190/7%);color:#075985}
  .skill-check-engine--nvidia{border-color:rgb(118 185 0/34%);background:rgb(118 185 0/8%);color:#315d0b}
  .skill-vendor-logo{width:auto;height:21px;display:block;overflow:visible}.skill-vendor-logo--cisco{color:#0076be}
  .skill-vendor-logo--nvidia{color:#76b900}
  .skill-lane-wrap,.skill-findings{display:flex;flex-direction:column;gap:var(--s3)}
  .skill-lane-head{display:flex;align-items:baseline;justify-content:space-between;gap:var(--s3)}
  .skill-lane-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:var(--s3)}
  .skill-lane{--lane:var(--slate);--lane-fill:rgb(91 107 130/10%);display:flex;align-items:center;gap:10px;
    padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel)}
  .skill-lane--ok{--lane:#3f7d54;--lane-fill:rgb(199 215 178/24%)}
  .skill-lane--warn{--lane:#8a6d1f;--lane-fill:rgb(244 211 94/14%)}
  .skill-lane--crit{--lane:color-mix(in srgb,var(--rust) 78%,var(--ink));--lane-fill:rgb(232 60 0/7%)}
  .skill-lane-icon{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--r-sm);color:var(--lane);background:var(--lane-fill)}
  .skill-lane-icon--brand{width:54px;background:var(--panel);border:1px solid var(--line)}
  .skill-lane-icon--cisco{color:#0076be}.skill-lane-icon--skillspector{color:#76b900}
  .skill-lane-icon svg{width:16px;height:16px}
  .skill-lane-icon--brand svg{width:auto;height:19px}
  .skill-lane-info{min-width:0}.skill-lane-name{font-size:13.5px;font-weight:600}
  .skill-lane-verdict{display:block;color:var(--lane);font-size:12.5px;font-weight:600}
  .skill-lane-sub{margin-top:3px;color:var(--muted-2);font-family:var(--font-mono);font-size:10.5px;word-break:break-all}
  .skill-finding{--sev:var(--slate);display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);
    border-left:3px solid var(--sev);border-radius:var(--r-md);background:var(--panel)}
  .skill-finding--crit{--sev:color-mix(in srgb,var(--rust) 78%,var(--ink))}
  .skill-finding--warn{--sev:#8a6d1f}
  .skill-finding-icon{flex:none;color:var(--sev)}.skill-finding-icon svg{width:16px;height:16px;display:block}
  .skill-finding-body{min-width:0;flex:1}
  .skill-finding-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.skill-finding-top b{font-size:13px}
  /* A finding is prose: cap the measure so it never runs the full modal width. */
  .skill-finding-msg{max-width:78ch;margin-top:4px;color:var(--muted);font-size:12.5px;line-height:1.5}
  .skill-finding-excerpt{display:block;width:max-content;max-width:100%;margin-top:8px;padding:6px 8px;border-radius:var(--r-xs);
    background:var(--mineral);font-family:var(--font-mono);font-size:11px;word-break:break-all}
  .skill-clean{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid rgb(63 125 84/28%);
    border-radius:var(--r-md);background:rgb(199 215 178/16%);color:#3f7d54;font-size:12.5px;font-weight:500}
  .skill-clean--warn{border-color:rgb(244 211 94/45%);background:rgb(244 211 94/12%);color:#8a6d1f}
  .skill-clean-icon{flex:none;display:grid;place-items:center}.skill-clean-icon svg{width:16px;height:16px;display:block}
  .skill-sec{border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel)}
  .skill-sec summary{display:flex;align-items:center;gap:8px;padding:11px 14px;cursor:pointer;list-style:none;
    font-size:13px;font-weight:600;border-radius:var(--r-md)}
  .skill-sec summary::-webkit-details-marker{display:none}
  .skill-sec summary:hover{background:rgb(199 215 178/10%)}.skill-sec summary:focus-visible{box-shadow:var(--focus)}
  .skill-sec summary>svg{width:14px;height:14px;flex:none;color:var(--muted);transition:transform .12s ease}
  .skill-sec[open] summary>svg{transform:rotate(90deg)}
  .skill-sec-meta{margin-left:auto;color:var(--muted-2);font-family:var(--font-mono);font-size:10px;font-weight:500;
    letter-spacing:.12em;text-transform:uppercase}
  .skill-sec-body{padding:2px var(--s4) var(--s4)}
  /* A nested table's own cell padding would add a second indent inside the
     section, so its outer columns run flush to the section's ruler. */
  .skill-sec-body>.tblwrap th:first-child,.skill-sec-body>.tblwrap td:first-child{padding-left:0}
  .skill-sec-body>.tblwrap th:last-child,.skill-sec-body>.tblwrap td:last-child{padding-right:0}
  .skill-definition{white-space:pre-wrap;max-height:16rem;overflow:auto}
  @media(max-width:560px){.skill-library-head{align-items:flex-start;flex-direction:column;padding:var(--s4)}
    /* The card head drops to 16px here, so the table's ruler follows it. */
    .skill-table thead th,.skill-table td{padding-inline:var(--s4)}
    .skill-risk-card{padding:var(--s3) var(--s4)}
    .skill-library-filter{width:100%}.skill-gov-controls{flex-direction:column;align-items:stretch}
    .skill-detail-dialog{width:100vw;border-left:0;border-radius:0}
    .skill-detail-dialog>.source-wizard-head,.skill-detail-dialog>.skill-detail-panel,.skill-detail-panel{padding:var(--s4)}
    .skill-detail-dialog>.skill-detail-panel{max-height:calc(100dvh - 96px)}
    .skill-edit-grid{grid-template-columns:1fr}.skill-edit-footer{align-items:flex-start;flex-direction:column}
    .skill-edit-footer .row{width:100%;justify-content:flex-end}}
  @container skill-table (max-width:560px){.skill-detail-panel{position:sticky;left:0;box-sizing:border-box;width:100cqw;max-width:100cqw}}

  .skill-register{margin-bottom:0;padding:0;overflow:hidden;container:skill-register/inline-size}
  .skill-register-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s5);padding:var(--s5);
    border-bottom:1px solid var(--line);background:linear-gradient(110deg,rgb(199 215 178/16%),transparent 58%)}
  .skill-register-head h2{margin-top:3px;font-size:22px;letter-spacing:-.02em}.skill-register-head p{margin:var(--space-text) 0 0;color:var(--muted);font-size:12.5px}
  .skill-register-head>.pill{margin-top:2px;flex:none}.skill-register-body{padding:var(--s5)}
  .skill-register-target{max-width:420px;margin-bottom:var(--s4)}
  .skill-register-policy{display:flex;align-items:flex-start;gap:var(--s3);margin-bottom:var(--s5);padding:var(--s3) var(--s4);
    border-left:3px solid var(--olive);border-radius:var(--r-sm);background:var(--sage-soft);color:var(--muted);font-size:12.5px;line-height:1.45}
  .skill-register-policy svg{width:18px;height:18px;flex:none;color:var(--evergreen)}
  .skill-register-block-head{margin-bottom:var(--s3)}.skill-register-block-head h3{margin-top:3px;font-size:16px}
  .skill-register-block-head p{max-width:66ch;margin:var(--space-text) 0 0;color:var(--muted);font-size:12px;line-height:1.45}
  .skill-file-field{position:relative}.skill-file-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip-path:inset(50%);white-space:nowrap;border:0}.skill-upload{display:grid;grid-template-columns:44px minmax(0,1fr) auto;
    align-items:center;gap:var(--s3);min-height:88px;padding:var(--s4);border:1px dashed color-mix(in srgb,var(--evergreen) 34%,var(--line));
    border-radius:var(--r-md);background:rgb(199 215 178/8%);cursor:pointer;transition:border-color .12s ease,background .12s ease,box-shadow .12s ease}
  .skill-upload:hover,.skill-upload.is-loaded{border-color:var(--olive);background:rgb(199 215 178/17%)}
  .skill-file-input:focus-visible+.skill-upload{box-shadow:var(--focus);border-color:var(--evergreen)}
  .skill-upload-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:var(--r-md);background:var(--evergreen);color:var(--sage)}
  .skill-upload-icon svg{width:21px;height:21px}.skill-upload-copy{min-width:0;display:flex;flex-direction:column;gap:3px}
  .skill-upload-copy strong{font-size:14px;font-weight:600;color:var(--ink)}.skill-upload-copy small{color:var(--muted);font-size:11.5px;line-height:1.4}
  .skill-upload-action{padding:7px 12px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--panel);
    color:var(--evergreen);font-size:12px;font-weight:600}.skill-file-state{display:flex;align-items:center;gap:7px;margin-top:8px;color:var(--muted-2);font-size:11.5px}
  .skill-file-state-dot{width:6px;height:6px;border-radius:50%;background:var(--line)}.skill-upload.is-loaded+.skill-file-state .skill-file-state-dot{background:#3f7d54}
  .skill-register-divider{display:flex;align-items:center;gap:var(--s3);margin:var(--s5) 0;color:var(--muted-2);font-family:var(--font-mono);
    font-size:8.5px;letter-spacing:.14em;text-transform:uppercase}.skill-register-divider::before,.skill-register-divider::after{content:"";height:1px;flex:1;background:var(--line)}
  .skill-register-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s4)}
  /* The optional/required marker sits next to its label, not flung to the far
     edge of a full-width field where it reads as a separate column. */
  .skill-register .field label,.skill-edit .field label{display:flex;align-items:baseline;justify-content:flex-start;gap:var(--s2)}
  .skill-register .field label span,.skill-edit .field label span{color:var(--muted-2);font-size:9.5px;letter-spacing:.12em}.skill-definition-field textarea{min-height:180px;resize:vertical;line-height:1.55}
  .skill-register-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);min-height:70px;padding:var(--s4) var(--s5);
    border-top:1px solid var(--line);background:rgb(243 246 238/54%)}.skill-register-status{color:var(--muted);font-size:12px}
  @container skill-register (max-width:560px){.skill-register-head{align-items:flex-start;flex-direction:column}.skill-register-head>.pill{margin:0}
    .skill-register-body{padding:var(--s4)}.skill-register-grid{grid-template-columns:1fr;gap:0}.skill-upload{grid-template-columns:40px minmax(0,1fr)}
    .skill-upload-icon{width:40px;height:40px}.skill-upload-action{grid-column:1/-1;justify-self:start;margin-left:calc(40px + var(--s3))}
    .skill-register-footer{align-items:flex-start;flex-direction:column}.skill-register-footer .row{width:100%;justify-content:flex-end}}
  @container skill-security (max-width:700px){.skill-risk-grid{grid-template-columns:1fr}}
  @media(max-width:720px){.skill-section-head{align-items:flex-start;flex-direction:column}.skill-security{margin-bottom:var(--s5)}}
  @media(max-width:560px){.skills-head{align-items:flex-start;flex-direction:column}.skills-head .acts{width:100%;justify-content:space-between;flex-wrap:wrap}}
  @media(prefers-reduced-motion:reduce){.skill-risk-card,.skill-expand svg,.skill-sec summary>svg,.skill-upload{transition:none}.skill-risk-card:hover{transform:none}}

  /* Shared Halo compact controls: one precise geometry for close, add,
     disclosure, navigation, chat, and row actions across the console.
     Rounded square, not a pill: --r-xs is what .data-grid-tool already uses
     for its sort and filter triggers, so a filter funnel in a card corner and
     a filter button in a table toolbar now read as the same control. Circles
     stay circular only where the content is round — avatars and count badges. */
  .halo-icon-control{all:unset;box-sizing:border-box;display:inline-grid;width:30px;height:30px;place-items:center;
    flex:none;border:1px solid rgb(var(--evergreen-rgb)/20%);border-radius:var(--r-xs);background:var(--panel);
    color:var(--evergreen);cursor:pointer;transition:background .12s var(--ease),border-color .12s var(--ease),
    color .12s var(--ease),transform .08s var(--ease)}
  .halo-icon-control:hover{border-color:var(--olive);background:var(--sage-soft)}
  .halo-icon-control:active{transform:translateY(1px)}
  .halo-icon-control:focus-visible{outline:none;box-shadow:var(--focus)}
  .halo-icon-control svg{width:14px;height:14px;display:block}
  .halo-icon-control--solid{border-color:var(--evergreen);background:var(--evergreen);color:var(--mineral)}
  .halo-icon-control--solid:hover{border-color:var(--evergreen-hover);background:var(--evergreen-hover)}
  .halo-icon-control--dark{border-color:rgb(243 246 238/18%);background:rgb(243 246 238/7%);color:rgb(243 246 238/76%)}
  .halo-icon-control--dark:hover{border-color:rgb(199 215 178/42%);background:rgb(243 246 238/14%);color:var(--mineral)}
  .rail-collapse.halo-icon-control,.mobile-nav-close.halo-icon-control{margin-left:auto}
  .rail-collapse.halo-icon-control{width:15px;height:15px;border-color:var(--dl-shell-control-line);border-radius:4px;
    background:var(--dl-shell-control);color:var(--ink)}
  .rail-collapse.halo-icon-control:hover{border-color:var(--dl-shell-control-line);background:var(--dl-shell-control-hover);color:var(--ink)}
  .rail-collapse.halo-icon-control svg{width:10px;height:10px}
  .source-wizard-close.halo-icon-control{min-height:30px;padding:0;font-size:0}
  .source-wizard-close.halo-icon-control span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0}

  .compact-disclosure>summary::after,
  .m8a-agent>summary::after,
  .policy-runtime>summary>i{
    content:"";box-sizing:border-box;width:30px;height:30px;display:grid;place-items:center;flex:none;
    border:1px solid rgb(var(--evergreen-rgb)/20%);border-radius:var(--r-pill);background-color:var(--panel);
    color:var(--evergreen);background-image:linear-gradient(currentColor,currentColor),linear-gradient(currentColor,currentColor);
    background-position:center,center;background-repeat:no-repeat;background-size:10px 1.5px,1.5px 10px;
    transition:background-color .12s var(--ease),border-color .12s var(--ease)}
  .compact-disclosure>summary:hover::after,.m8a-agent>summary:hover::after,.policy-runtime>summary:hover>i{
    border-color:var(--olive);background-color:var(--sage-soft)}
  .compact-disclosure[open]>summary::after,.m8a-agent[open]>summary::after,.policy-runtime[open]>summary>i{
    background-image:linear-gradient(currentColor,currentColor);background-repeat:no-repeat;background-size:10px 1.5px;transform:none}

  /* Platform readability floor: labels stay compact, never microscopic. */
  .auth-divider span,.auth-terms,.inherit,.chat-meta,.model-id,
  .source-summary-eyebrow,.source-category,.source-governed-label,
  .source-connected-badge,.source-available-badge,.source-schedule .select,
  .m8a-agent-title .mono,.m8a-field-list li,.m8a-feed-item small,
  .m8a-timeline small,.policy-flow b,.policy-failure,.teams-count,
  .teams-meta span,.skill-risk-state,.skill-risk-count small,
  .skill-library-filter>span,.skill-score,.skill-lane-sub,.skill-sec-meta,
  .skill-register-divider,.skill-register .field label span,
  .intg-card-title em,.intg-card-cta,.memory-topology-stage header>span,
  .memory-topology-stage header p,.memory-topology-node-copy em,
  .memory-topology-node-chip,.memory-topology-source-mark,
  .memory-topology-source-state,.memory-topology-metrics small,
  .source-sync-card tbody td::before,.policy-summary small,
  .policy-state,.policy-table td::before,.source-technical-details code,
  .memory-topology-bar,.m8a-assurance span,
  .m8a-boundary b,.m8a-step legend span,.m8a-field-label,
  .m8a-effective span,.m8a-state,.policy-flow{font-size:var(--text-label)}

  .copilot-write-control small,.copilot-runtime-trace small,
  .memory-topology-node-copy b,.memory-topology-node-copy small,
  .memory-topology-metrics span,
  .source-technical-details,.source-category-count,.source-data-points li,
  .source-connection-error,.source-connection-details dd,
  .m8a-agent-summary,.m8a-kv,.m8a-feed-item p,.m8a-timeline b,
  .policy-upload-status,.policy-table time,.policy-pagination,
  .policy-runtime>summary small,.copilot-model-chip small,
  .copilot-write-control>span:last-child b,.teams-item-text small,
  .intg-tool,.skill-library-meta,.skill-usage-cell>span:last-child,
  .skill-lock-note,.skill-detail-title .subtle,.skill-finding-excerpt,
  .skill-upload-copy small,.skill-file-state,.memory-topology-source-more,
  .memory-topology-source-empty,.memory-topology-metrics span,
  .memory-topology-unavailable p,.policy-document-cell small,
  .policy-readonly p,.policy-empty p,.policy-error p,.policy-loading,
  .policy-pagination{font-size:var(--text-small)}

  /* S15 usage analytics: observation buttons, group keys, sparklines, trace detail. */
  .usage-obs,.usage-groupkey{padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}
  .usage-obs{flex:1;min-width:0}
  .usage-groupkey{color:var(--evergreen)}
  .usage-obs:hover,.usage-groupkey:hover{text-decoration:underline}
  /* A note the reader cannot act on must not advertise itself as a target. */
  .usage-obs--static{cursor:default}
  .usage-obs--static:hover{text-decoration:none}
  .usage-spark{display:block;width:72px;height:22px;color:var(--evergreen)}
  /* The query is the widest thing a reader scans; it takes whatever its grid
     column gives it and clips, rather than carrying a pixel cap of its own. */
  .usage-summary{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .usage-trace-detail>td{background:var(--sage-soft);padding:var(--s3) var(--s4)}
  .usage-trace-panel{display:grid;gap:var(--s3)}

  /* Query ledger. A CSS grid rather than a <table>: an expanded row opens a
     full-width panel as its NEXT SIBLING, which a table would have to fake
     with a colspan cell. Column widths are fixed for the scannable facts and
     fluid for the two that carry prose (caller, query).

     Each row is its own slot rather than a rule-separated band: the prototype
     reads the ledger as a stack of cards, and the spacing between them does
     the work the border line used to. The head row stays flat - it labels the
     stack, it is not a member of it. */
  .usage-qtable{display:flex;flex-direction:column;gap:8px}
  .usage-qrow{display:grid;align-items:center;gap:var(--s3);padding:9px 12px;
    grid-template-columns:96px 120px minmax(0,1.1fr) minmax(0,2fr) 112px 36px;
    border:1px solid var(--mineral);border-radius:12px;background:var(--surface-soft);
    font-size:13px;box-shadow:0 1px 2px rgb(var(--evergreen-rgb)/4%),0 3px 8px rgb(var(--evergreen-rgb)/4%)}
  .usage-qrow:hover{background:var(--mineral)}
  .usage-qrow--head{padding:0 12px 8px;border:0;border-radius:0;background:none;box-shadow:none}
  .usage-qrow--head:hover{background:none}
  .usage-qrow--head span{white-space:nowrap}
  .usage-qrow--head .eyebrow{font-size:10.5px;letter-spacing:.06em}
  .usage-qrow>*{min-width:0}
  .usage-qspace{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
  /* The expansion: stat boxes, sources, verdict, then the event breakdown. */
  .usage-qdetail{display:grid;gap:var(--s3);padding:var(--s3) var(--s4);
    border-bottom:1px solid var(--line);background:var(--sage-soft)}
  .usage-qsources{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
  @media(max-width:900px){
    /* Space and outcome fold away first: the row still answers when, who,
       what, and stays expandable. */
    .usage-qrow{grid-template-columns:82px minmax(0,1fr) minmax(0,1.6fr) 36px}
    .usage-qrow>:nth-child(2),.usage-qrow>:nth-child(5){display:none}
  }

  /* Ledger pager: one page per fetched cursor page, so a numbered button is
     always a page the server has confirmed exists. */
  .usage-pager{display:flex;align-items:center;justify-content:space-between;
    flex-wrap:wrap;gap:var(--s3);margin-top:var(--s3)}
  .usage-page-count{font-size:var(--text-small)}
  .usage-page-nums{display:inline-flex;align-items:center;gap:4px}
  .usage-page{all:unset;box-sizing:border-box;display:grid;place-items:center;
    min-width:28px;height:28px;padding:0 7px;border:1px solid transparent;
    border-radius:var(--r-xs);color:var(--muted);font:500 12.5px/1 var(--font-mono);
    cursor:pointer;transition:background .12s var(--ease),color .12s var(--ease)}
  .usage-page:hover:not([disabled]){background:var(--sage-soft);color:var(--ink)}
  .usage-page:focus-visible{box-shadow:var(--focus)}
  .usage-page.is-active{border-color:var(--line);background:var(--panel);
    color:var(--evergreen);font-weight:600}
  .usage-page[disabled]{opacity:.35;cursor:default}
  .usage-page--step{font-size:15px}
  .usage-page-more{padding:0 2px;color:var(--muted-2);font:500 12.5px/1 var(--font-mono)}

  /* Two stat rows, one block: memory economics above model economics. They sit
     tighter than two independent grids would so they read as one instrument
     panel with a divider, not as two unrelated sections. */
  .usage-stat-block{display:grid;gap:var(--s4)}

  /* One titled band per economy: Memory usage / AI usage / Performance. These
     rules went missing while s15.js kept emitting the classes, which left the
     three band heads falling back to the UA's default h3 — oversized, and with
     the ⓘ hanging off the text baseline.
     The head is a flex row with align-items:center so the icon centres on the
     text: .heading-info is an inline-grid whose baseline comes from the svg's
     bottom edge, so in a baseline-aligned row it always rides high.
     The title is label-scale on purpose. It only has to group the tiles
     underneath it, and the tiles are what actually get read. */
  .usage-stat-section{display:grid;gap:var(--s3)}
  .usage-stat-section-head{display:flex;flex-wrap:wrap;align-items:center;
    gap:var(--s2) var(--s3)}
  .usage-stat-section-head h3{display:flex;align-items:center;gap:5px;margin:0;
    font-size:11.25px;font-weight:600;line-height:1.3;letter-spacing:0}
  .usage-stat-section-head h3 .heading-info{width:14px;height:14px;margin-left:0;
    vertical-align:baseline}
  .usage-stat-section-head h3 .heading-info svg{width:12px;height:12px}
  .usage-stat-section-head .sub{margin:0;font-size:13px;color:var(--muted)}

  /* Group rollup head: title left, "what a row click does" hint right. */
  .usage-groups-head{align-items:baseline;margin-bottom:var(--space-text)}
  .usage-groups-head h3{font-size:18px;line-height:1.25}
  /* The grouping tabs keep their own row under the title, but sit against the
     right edge so the eye returns to the table body, not to the chips. */
  .usage-groups-tabs{justify-content:flex-end;margin-bottom:var(--s3)}

  /* Assistant ledger row cells. Employee and provider·model both clip to one
     line so a long address or a long model id cannot set the row height. */
  .usage-turn-actor,.usage-turn-model{display:block;max-width:100%;overflow:hidden;
    text-overflow:ellipsis;white-space:nowrap}
  .usage-turn-model{font-size:12px;color:var(--muted)}
  .usage-ai-grouping{margin:var(--s3) 0 var(--s4);box-shadow:none}
  .usage-ai-grouping>summary{font-size:13px}

  /* Query-ledger caller cell: name, then the agent chip only when the caller
     is not a person (a "human" chip on every human row is noise). */
  .usage-caller{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%}
  .usage-caller-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
  .usage-caller .pill{flex:none}

  /* The five numbers the ledger row gave up, on one line inside the expansion,
     with the tiers and live connectors the trace touched pushed to the end. */
  .usage-trace-meta,.usage-trace-verdict,.usage-detail-meta{display:flex;align-items:center;
    flex-wrap:wrap;gap:var(--s2);font-size:var(--text-small)}
  .usage-trace-meta .num{font-variant-numeric:tabular-nums}
  .usage-trace-sources{display:inline-flex;align-items:center;flex-wrap:wrap;gap:6px;margin-left:auto}
  .usage-trace-verdict{justify-content:space-between;gap:var(--s3)}
  .usage-trace-verdict>.filter-strip{flex:none}
  .usage-trace-outcome{flex-wrap:wrap}
  /* Assistant-turn expansion: the source/provider/model/basis facts that no
     longer have columns of their own. */
  .usage-detail-meta{gap:var(--s4)}
  .usage-detail-meta>span{display:inline-flex;align-items:baseline;gap:6px;min-width:0}
  .usage-detail-meta small{color:var(--muted-2);font:500 var(--text-label)/1.4 var(--font-mono);
    letter-spacing:.11em;text-transform:uppercase}
  @media(max-width:680px){
    .usage-groups-head{align-items:flex-start;flex-direction:column;gap:4px}
    .usage-trace-sources{margin-left:0}
    .usage-trace-verdict{align-items:flex-start;flex-direction:column}
    .usage-detail-meta{gap:var(--s2) var(--s3)}
  }

  /* S15 ledger filter menu: one funnel in the card corner opens a single
     popover with a labelled section per facet (Space / Caller / Outcome).
     Flat, not two-level - a nested pop-up hid the current selection one click
     deep. Same native-popover + anchor pattern as the copilot menu. */
  .usage-ledger-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--s3)}
  .usage-ledger-head h3{flex:1;min-width:0;font-size:18px;line-height:1.25;margin-bottom:var(--space-text)}
  .usage-filter{flex:none}
  .usage-filter-trigger{position:relative}
  .usage-filter-badge{position:absolute;top:-5px;right:-5px;min-width:15px;height:15px;padding:0 4px;
    display:grid;place-items:center;border-radius:var(--r-pill);background:var(--evergreen);
    color:var(--mineral);font:600 9.5px/1 var(--font-mono);pointer-events:none}
  /* Sized to its longest option rather than to a fixed 172px: a team name like
     "Halofy design team" wrapped onto a second line, which made one option
     twice the height of its neighbours and broke the scan down the column.
     width:max-content grows the menu instead; the max-width still caps it, and
     an option past that cap ellipsizes on one line rather than wrapping. */
  .usage-filter-pop{position:fixed;position-anchor:auto;inset:auto;margin:6px 0 0;padding:5px;
    top:anchor(bottom);left:anchor(right);transform:translateX(-100%);
    width:max-content;min-width:208px;max-width:min(320px,calc(100vw - 24px));
    border:1px solid var(--line);border-radius:var(--r-sm);
    background:var(--panel);box-shadow:var(--sh-2),var(--sh-3);color:var(--ink)}
  .usage-filter-pop::backdrop{background:transparent}
  .usage-filter-pop--sub{top:anchor(top);left:anchor(left);margin:0;transform:translateX(calc(-100% - 4px))}
  .usage-filter-pop-label{padding:6px 10px 4px;color:var(--muted-2);font:600 var(--text-label)/1.4 var(--font-mono);
    letter-spacing:.12em;text-transform:uppercase}
  .usage-filter-item,.usage-filter-option{all:unset;box-sizing:border-box;display:flex;align-items:center;
    gap:8px;width:100%;padding:8px 10px;border-radius:var(--r-xs);color:var(--ink);font-size:12.5px;cursor:pointer}
  .usage-filter-item:hover,.usage-filter-option:hover{background:var(--sage-soft)}
  .usage-filter-item:focus-visible,.usage-filter-option:focus-visible{box-shadow:var(--focus)}
  .usage-filter-item>span:first-child{flex:1}
  .usage-filter-option-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .usage-filter-item-value{color:var(--muted-2);font-size:12px}
  .usage-filter-item::after{content:"›";color:var(--muted-2);font-size:13px}
  .usage-filter-option.is-active{color:var(--evergreen);font-weight:600}
  .usage-filter-check{width:14px;flex:none;color:var(--evergreen);font-size:11px;text-align:center}
  /* One section per facet. The team list can run long, so the menu scrolls
     rather than growing past the viewport. */
  .usage-filter-pop{max-height:min(70vh,420px);overflow-y:auto}
  .usage-filter-group+.usage-filter-group{margin-top:4px;padding-top:5px;
    border-top:1px solid var(--line)}
  .usage-active-filters{margin-bottom:var(--s3)}
  .usage-active-filter{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;
    border:1px solid var(--line);border-radius:var(--r-pill);background:var(--sage-soft);
    color:var(--evergreen);font:500 var(--text-label)/1.4 var(--font-mono);letter-spacing:.06em;
    cursor:pointer;transition:border-color .12s var(--ease)}
  .usage-active-filter:hover{border-color:var(--olive)}
  .usage-active-filter:focus-visible{outline:none;box-shadow:var(--focus)}

  /* M10 role-scoped memory: scope picker, root View-as, preview banner, why lines. */
  .memory-scope{display:flex;justify-content:flex-end}
  .memory-scope .select{width:auto;min-width:180px;max-width:280px}
  .viewas-tabs{display:flex;gap:var(--s2);margin-bottom:var(--s3)}
  .viewas-chip[aria-pressed="true"]{border-color:var(--evergreen);background:var(--sage-soft);color:var(--evergreen)}
  .viewas-chips{display:flex;flex-wrap:wrap;gap:var(--s2);margin:var(--s2) 0}
  .viewas-list{display:grid;gap:var(--s1);max-height:240px;overflow-y:auto;margin:var(--s3) 0}
  .viewas-person{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);
    padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-sm);background:none;
    color:inherit;font:inherit;text-align:left;cursor:pointer}
  .viewas-person:hover{border-color:var(--evergreen)}
  .viewas-person[aria-pressed="true"]{border-color:var(--evergreen);background:var(--sage-soft)}
  .viewas-person small{color:var(--muted);font-size:var(--text-small)}
  .viewas-foot{display:flex;align-items:center;gap:var(--s3);margin-top:var(--s3)}
  .viewas-foot .input{flex:1;min-width:0}
  .preview-banner{position:sticky;top:0;z-index:30;display:flex;align-items:center;
    justify-content:space-between;gap:var(--s3);margin-bottom:var(--s4);padding:10px var(--s4);
    border:1px solid var(--gold);border-radius:var(--r-md);background:var(--panel);
    color:var(--ink);font-weight:600}
  .memory-preview .head{border-left:3px solid var(--gold);padding-left:var(--s3)}
  .memory-why-list{margin-top:var(--s2)}
  .memory-why{margin:var(--s2) 0 0;color:var(--muted);font-size:var(--text-small)}

  /* Mobile target floor baseline; the final copy stays at the end of the sheet. */
  @media(max-width:860px){
    .navgroup,.nav button,.rail-help__action,.breadcrumbs button,.btn,.btn--sm,.policy-screen .btn,
     .auth-tab,.google-signin,.source-category-tab,.source-card-action,
    .source-wizard-close,.source-schedule .select,.memory-graph-filter,.copilot-chip,.copilot-send,
     .copilot-clear,.copilot-model-select,.copilot-history-view,.skill-expand,.toggle,
     .scope-memory-create-action .btn{min-height:44px}
    .breadcrumbs button{display:inline-flex;align-items:center;justify-content:center;min-width:44px}
    .copilot-send,.copilot-clear,.skill-expand{min-width:44px}
    .halo-icon-control{min-width:44px;min-height:44px}
    .head h1{font-size:clamp(26px,7vw,28px);line-height:1.12}
  }

/* --- S3 deploy wizard (D52) ------------------------------------------------
   One step on screen at a time. The rail is the only thing that tells the
   operator where they are, so it stays legible at every width and never wraps
   into a second row of dots that reads as extra steps. */
.wiz{margin-bottom:var(--s6)}
.wiz-rail{display:flex;align-items:center;gap:var(--s4);list-style:none;
  margin:var(--s4) 0 0;padding:0 0 var(--s4);border-bottom:1px solid var(--line);
  overflow-x:auto;-webkit-overflow-scrolling:touch}
.wiz-rail__item{display:flex;align-items:center;gap:8px;white-space:nowrap;
  color:var(--muted);font-size:var(--text-small)}
.wiz-rail__dot{display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:50%;border:1px solid var(--line);
  background:var(--panel);font-size:11px;font-variant-numeric:tabular-nums}
.wiz-rail__item--now{color:var(--ink);font-weight:600}
.wiz-rail__item--now .wiz-rail__dot{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.wiz-rail__item--done .wiz-rail__dot{border-color:var(--ink);color:var(--ink)}
.wiz-body{margin-top:var(--s5);display:grid;gap:var(--s5);max-width:640px}
.wiz-body .field{margin:0}
.wiz-explain{display:grid;gap:4px;padding:var(--s4);border:1px solid var(--line);
  border-radius:var(--r-md);background:color-mix(in srgb,var(--paper) 82%,var(--panel))}
.wiz-explain b{font-size:var(--text-body)}
.wiz-explain span{color:var(--muted);font-size:var(--text-small);line-height:1.5}
.wiz-actions{margin-top:var(--s2);gap:var(--s3)}
.hint--error{color:var(--crit,#b3261e)}
.connect-steps{list-style:none;margin:0;padding:0;display:grid;gap:var(--s4);counter-reset:none}
.connect-step{display:grid;gap:8px}
.connect-step__head{display:flex;align-items:center;justify-content:space-between;gap:var(--s3)}
.connect-step p{margin:0}
.connect-step .snippet{white-space:pre-wrap;word-break:break-all;margin:0}
@media (max-width:720px){
  .wiz-body{max-width:none}
  .wiz-rail{gap:var(--s3)}
  .wiz-rail__item span:last-child{display:none}
  .wiz-rail__item--now span:last-child{display:inline}
}

/* ---- Mandatory setup gate (CONTRACTS-SETUP-GATE.md) ---- */
.setup-gate-banner{display:flex;align-items:center;gap:var(--s3);margin:0 0 var(--s4);
  padding:var(--s3) var(--s4);border:1px solid #f4a261;
  border-radius:var(--r-md);background:#fff0e8;
  font-size:var(--text-small)}
.setup-gate-banner[hidden]{display:none}
.setup-gate-banner__text{flex:1;color:#8a3400;font-weight:500}
#rail-nav button.locked{opacity:.42;cursor:not-allowed}
.setup-waiting{max-width:560px;margin:var(--s7) auto;padding:var(--s6)}
.setup-waiting h3{margin:6px 0 8px;font-size:20px}

/* ---- S1 guided setup stepper ----------------------------------------------
   S1 is a single narrow column, not a card inside a stage: the header (title +
   progress meter) sits directly on the mineral background and each step is its
   own card. State is carried by the marker and the title weight - a "done"
   row simply goes quiet - so the only row a reader's eye lands on is the one
   with the primary CTA. */
.setup-stepper{max-width:720px;margin:0 auto;padding:var(--s5) 0 var(--s7)}
.setup-stepper__head{margin-bottom:var(--s5)}
.setup-stepper__head h1{margin:10px 0 0;font-size:var(--text-h2);font-weight:600;color:var(--ink)}
.setup-stepper__org{margin-top:6px;font-family:var(--font-mono);font-size:var(--text-label);
  color:var(--muted-2)}
.setup-stepper__progress{margin-top:8px;font-size:14.5px;color:var(--muted)}
.setup-stepper__progress b{color:var(--evergreen);font-weight:600}
.setup-stepper__bar{height:6px;margin-top:var(--s4);border-radius:var(--r-pill);
  background:var(--stone);overflow:hidden}
.setup-stepper__bar span{display:block;height:100%;border-radius:var(--r-pill);
  background:var(--evergreen);transition:width .4s var(--ease-enter)}
.setup-stepper__degraded{margin:0 0 var(--s4);padding:var(--s3) var(--s4);
  border:1px solid color-mix(in srgb,var(--rust) 30%,var(--line));border-radius:var(--r-md);
  background:color-mix(in srgb,var(--rust) 5%,var(--panel));color:var(--muted);
  font-size:var(--text-small)}
.setup-stepper__unavailable{padding:var(--s5)}
.setup-stepper__steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;
  gap:10px}
.setup-step{display:flex;align-items:center;gap:var(--s4);padding:18px 20px;
  background:var(--panel);border:1px solid var(--line);border-radius:14px;
  transition:border-color .15s var(--ease),box-shadow .15s var(--ease)}
.setup-step:hover{border-color:color-mix(in srgb,var(--olive) 55%,var(--line))}
.setup-step__marker{flex:none;width:32px;height:32px;border-radius:50%;
  display:grid;place-items:center;border:1.5px solid var(--line);background:var(--panel);
  font-size:14px;font-weight:600;color:var(--muted-2)}
.setup-step.is-done .setup-step__marker{background:var(--evergreen);border-color:var(--evergreen);
  color:var(--mineral)}
.setup-step.is-next{border-color:var(--evergreen);box-shadow:var(--sh-2)}
.setup-step.is-next .setup-step__marker{border-color:var(--evergreen);color:var(--evergreen)}
.setup-step.is-unknown .setup-step__marker{border-color:color-mix(in srgb,var(--rust) 55%,var(--line));
  color:var(--rust)}
.setup-step__body{flex:1;min-width:0}
.setup-step__titleline{display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap}
.setup-step__title{font-weight:600;font-size:15.5px;color:var(--ink)}
.setup-step.is-done .setup-step__title{color:var(--muted);font-weight:500}
.setup-step__optional{font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted-2)}
.setup-step__detail{margin-top:3px;color:var(--muted);font-size:var(--text-small);line-height:1.5}
.setup-step__evidence{margin-top:2px;font-family:var(--font-mono);font-size:var(--text-label);
  color:var(--muted-2)}
.setup-step__eta{flex:none;font-family:var(--font-mono);font-size:var(--text-label);
  color:var(--muted-2)}
.setup-step__go{flex:none}
.setup-stepper__foot{margin-top:var(--s5);color:var(--muted-2);font-size:var(--text-small)}
.setup-stepper__book{color:var(--evergreen);font-weight:500;text-decoration:underline}
.setup-stepper--complete{text-align:center}
.setup-celebration{position:relative;padding:var(--s5) var(--s4)}
.setup-celebration__check{display:inline-grid;place-items:center;width:64px;height:64px;
  margin-bottom:var(--s4);border-radius:50%;background:var(--sage);color:var(--evergreen);
  font-size:30px;font-weight:700;box-shadow:0 0 0 10px rgb(199 215 178/25%)}
.setup-celebration h3{font-size:22px;margin-bottom:6px}
.setup-celebration__burst{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.setup-celebration__burst i{position:absolute;top:34%;left:50%;width:7px;height:7px;
  border-radius:2px;background:var(--gold);opacity:0;animation:setup-spark 1.6s var(--ease-enter) .1s infinite}
.setup-celebration__burst i:nth-child(2n){background:var(--sage)}
.setup-celebration__burst i:nth-child(3n){background:var(--olive)}
.setup-celebration__burst i:nth-child(1){--sx:-110px;--sy:-40px;animation-delay:.05s}
.setup-celebration__burst i:nth-child(2){--sx:-70px;--sy:-70px;animation-delay:.2s}
.setup-celebration__burst i:nth-child(3){--sx:-30px;--sy:-90px;animation-delay:.35s}
.setup-celebration__burst i:nth-child(4){--sx:20px;--sy:-95px;animation-delay:.15s}
.setup-celebration__burst i:nth-child(5){--sx:65px;--sy:-70px;animation-delay:.3s}
.setup-celebration__burst i:nth-child(6){--sx:105px;--sy:-35px;animation-delay:.45s}
.setup-celebration__burst i:nth-child(7){--sx:-90px;--sy:10px;animation-delay:.55s}
.setup-celebration__burst i:nth-child(8){--sx:90px;--sy:15px;animation-delay:.25s}
@keyframes setup-spark{
  0%{opacity:0;transform:translate(0,0) scale(.4) rotate(0deg)}
  25%{opacity:1}
  100%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(1) rotate(220deg)}
}
@media (prefers-reduced-motion:reduce){
  .setup-celebration__burst i{animation:none;opacity:0}
  .setup-stepper__bar span{transition:none}
}
@media (max-width:720px){
  .setup-stepper{padding:var(--s4) 0 var(--s6)}
  .setup-step{flex-wrap:wrap;gap:var(--s3);padding:var(--s4)}
  .setup-step__body{flex-basis:calc(100% - 32px - var(--s3))}
  .setup-step__eta,.setup-step__go{margin-left:calc(32px + var(--s3))}
  .setup-step__go{margin-left:auto}
}

/* ---- Global assistant dock (assistant-dock.js) ----------------------------
   The Assistant, one click from every screen: a launcher bubble pinned to the
   bottom-right corner and the panel it opens. Column-reverse so the panel
   grows UP from the bubble. It sits above the rail (30) and the mobile drawer
   (40) but below modals (80), and withdraws entirely while the mobile nav
   drawer is open so it can never cover the navigation it floats over.

   The container hugs its content (right-aligned, never a fixed width), so it
   covers nothing it shouldn't and needs no pointer-events trick. Do NOT add
   `pointer-events:none` here with `pointer-events:auto` on the children: the
   launcher's `all:unset` resets pointer-events to `inherit`, so the bubble
   would inherit the `none` and drop every click into the page behind it. */
.assistant-dock{position:fixed;right:clamp(16px,2.2vw,28px);bottom:clamp(16px,2.2vw,28px);
  z-index:45;display:flex;flex-direction:column-reverse;align-items:flex-end;gap:var(--s3)}
.assistant-dock[hidden]{display:none}
body.nav-open .assistant-dock{display:none}

.assistant-dock-launcher{all:unset;box-sizing:border-box;position:relative;display:grid;
  place-items:center;width:56px;height:56px;flex:none;border-radius:50%;cursor:pointer;
  background:var(--evergreen);color:var(--mineral);
  box-shadow:0 18px 38px -14px rgb(var(--evergreen-rgb)/55%),var(--sh-2);
  transition:transform .14s var(--ease),background .14s var(--ease)}
.assistant-dock-launcher:hover{background:var(--evergreen-hover);transform:translateY(-2px)}
.assistant-dock-launcher:active{transform:translateY(0) scale(.96)}
.assistant-dock-launcher:focus-visible{outline:none;
  box-shadow:0 0 0 4px rgb(var(--evergreen-rgb)/24%),var(--sh-2)}
.assistant-dock-launcher svg{width:25px;height:25px}
.assistant-dock.is-open .assistant-dock-launcher{background:var(--evergreen-hover)}
.assistant-dock-badge{position:absolute;top:9px;right:9px;width:10px;height:10px;border-radius:50%;
  background:var(--gold);box-shadow:0 0 0 2px var(--evergreen)}
.assistant-dock-badge[hidden]{display:none}

.assistant-dock-panel{display:flex;flex-direction:column;overflow:hidden;
  width:min(396px,calc(100vw - 2 * clamp(16px,2.2vw,28px)));
  height:min(620px,calc(100dvh - 132px));
  border:1px solid var(--line);border-radius:var(--r-lg);background:var(--panel);
  box-shadow:var(--sh-3),var(--sh-4);
  animation:assistant-dock-in .18s var(--ease-enter)}
.assistant-dock-panel[hidden]{display:none}
@keyframes assistant-dock-in{
  from{opacity:0;transform:translateY(12px) scale(.985)}
  to{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){.assistant-dock-panel{animation:none}}

.assistant-dock-head{display:flex;align-items:center;gap:10px;flex:none;
  padding:var(--s3) var(--s3) var(--s3) var(--s4);background:var(--evergreen);color:var(--mineral)}
.assistant-dock-head-mark{display:grid;place-items:center;width:30px;height:30px;flex:none;
  border-radius:10px;background:rgb(243 246 238/12%);color:var(--sage)}
.assistant-dock-head-mark svg{width:18px;height:18px}
.assistant-dock-head-copy{display:grid;gap:1px;min-width:0;flex:1}
.assistant-dock-head-copy b{font-size:14px;font-weight:600;letter-spacing:-.01em}
.assistant-dock-head-copy small{overflow:hidden;color:rgb(243 246 238/62%);
  font:10px/1.4 var(--font-mono);letter-spacing:.12em;text-transform:uppercase;
  text-overflow:ellipsis;white-space:nowrap}
.assistant-dock-act.halo-icon-control{width:28px;height:28px;border-color:rgb(243 246 238/18%);
  background:rgb(243 246 238/7%);color:rgb(243 246 238/78%)}
.assistant-dock-act.halo-icon-control:hover{border-color:rgb(199 215 178/42%);
  background:rgb(243 246 238/14%);color:var(--mineral)}

.assistant-dock-transcript{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;
  padding:var(--s4);background:var(--mineral);scrollbar-width:thin}
.assistant-dock-thread{display:flex;flex-direction:column;gap:var(--s4)}
.assistant-dock-thread .chat-msg{max-width:94%}
.assistant-dock-thread .chat-bubble{padding:10px var(--s3);box-shadow:var(--sh-1);
  font-size:13.5px;line-height:1.5}
.assistant-dock-hero{display:flex;min-height:100%;flex-direction:column;align-items:center;
  justify-content:center;gap:var(--s3);padding:var(--s4) var(--s2);text-align:center}
.assistant-dock-hero-mark{display:grid;place-items:center;width:46px;height:46px;flex:none;
  border-radius:14px;background:var(--evergreen);color:var(--sage);
  box-shadow:0 16px 34px -20px rgb(var(--evergreen-rgb)/60%)}
.assistant-dock-hero-mark svg{width:22px;height:22px}
.assistant-dock-hero p{margin:0;max-width:30ch;color:var(--muted);font-size:13px;line-height:1.5}
.assistant-dock-chips{display:flex;flex-direction:column;gap:7px;width:100%;margin-top:var(--s2)}
.assistant-dock-chip{all:unset;box-sizing:border-box;padding:9px var(--s3);border-radius:var(--r-sm);
  border:1px solid var(--line);background:var(--panel);color:var(--ink);cursor:pointer;
  font-size:12.5px;line-height:1.4;text-align:left;box-shadow:var(--sh-1);
  transition:border-color .14s var(--ease),background .14s var(--ease)}
.assistant-dock-chip:hover{border-color:var(--olive);background:var(--sage-soft)}
.assistant-dock-chip:focus-visible{box-shadow:var(--focus)}

.assistant-dock-composer{flex:none;padding:var(--s3);border-top:1px solid var(--line);
  background:var(--panel)}
.assistant-dock-pill{border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);
  transition:border-color .16s var(--ease),box-shadow .16s var(--ease)}
.assistant-dock-pill:focus-within{border-color:var(--olive);box-shadow:var(--focus)}
.assistant-dock-pill .chat-input{width:100%;min-height:52px;max-height:132px;margin:0;
  padding:11px var(--s3) 4px;border:0;background:transparent;color:var(--ink);resize:none;
  font:14px/1.5 var(--font-body)}
.assistant-dock-pill .chat-input:focus{outline:none;box-shadow:none}
.assistant-dock-pill-foot{display:flex;align-items:center;justify-content:space-between;
  gap:var(--s2);padding:6px 8px 8px}
.assistant-dock-pill-left{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.assistant-dock-model{max-width:150px;padding:4px 9px;font-size:11px}
.assistant-dock-model .copilot-model-select{max-width:112px;font-size:11px}
.assistant-dock-writes{gap:7px;font-size:11.5px}
.assistant-dock-writes .track{transform:scale(.74)}
.assistant-dock-writes b{font-weight:500}
.assistant-dock-readonly{color:var(--muted-2);font-size:11px}
.assistant-dock-composer .copilot-send{width:34px;height:34px}
.assistant-dock-composer .copilot-send svg{width:15px;height:15px}
.assistant-dock-status{min-height:16px;margin-top:5px;padding:0 2px;color:var(--muted-2);
  font-size:11.5px}

@media (max-width:640px){
  /* The container still hugs its content — the PANEL widens, not the dock, so
     the closed bubble never spans the viewport and swallows taps beside it. */
  .assistant-dock{right:14px;bottom:14px}
  .assistant-dock-panel{width:calc(100vw - 28px);height:min(78dvh,calc(100dvh - 116px))}
  .assistant-dock-chip{min-height:44px}
}

/* ---- command palette: Cmd/Ctrl+K jump list over the whole console ---- */
/* The rail trigger sits between the org picker and the nav, so the shortcut is
   discoverable without stealing a nav slot. */
.railsearch{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:11px;
  margin:0 var(--s2) var(--s3);padding:8px 10px;min-height:38px;border-radius:var(--r-sm);
  cursor:pointer;border:1px solid var(--line);background:var(--panel);
  color:var(--muted);font-size:14px;font-weight:500;line-height:20px;
  transition:background .12s,color .12s,border-color .12s}
.railsearch[hidden]{display:none}
.railsearch svg{width:16px;height:16px;flex:none;opacity:.9}
.railsearch .lbl{flex:1;min-width:0}
.railsearch__kbd{flex:none;padding:2px 6px;border-radius:var(--r-xs);
  border:1px solid var(--line);background:var(--dl-rail);
  color:var(--muted-2);font:10px/1.4 var(--font-mono);letter-spacing:.06em;white-space:nowrap}
.railsearch:hover{background:var(--sage-soft);border-color:var(--olive);color:var(--evergreen)}
.railsearch:focus-visible{box-shadow:var(--focus)}
@media(min-width:861px){
  body.rail-collapsed .railsearch{justify-content:center;padding-inline:0;margin-inline:0;position:relative}
  body.rail-collapsed .railsearch .lbl,
  body.rail-collapsed .railsearch__kbd{display:none}
}

.mobile-search{all:unset;box-sizing:border-box;display:grid;place-items:center;
  width:44px;height:44px;flex:none;margin-left:auto;border-radius:var(--r-sm);cursor:pointer;
  border:1px solid var(--line);background:var(--panel);color:var(--muted)}
.mobile-search[hidden]{display:none}
.mobile-search svg{width:18px;height:18px}
.mobile-search:focus-visible{box-shadow:var(--focus)}

/* Above the rail (30) and the assistant dock (45) — the palette is modal. */
.cmdk{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;
  padding:clamp(48px,12vh,140px) var(--s4) var(--s4)}
.cmdk[hidden]{display:none}
.cmdk__scrim{position:absolute;inset:0;background:rgb(17 24 39/40%);backdrop-filter:blur(2px)}
.cmdk__panel{position:relative;display:flex;flex-direction:column;overflow:hidden;
  width:min(620px,100%);max-height:min(560px,calc(100dvh - 2 * clamp(48px,12vh,140px)));
  border:1px solid #e5e7eb;border-radius:var(--r-lg);background:#fff;color:#111827;
  box-shadow:0 24px 60px rgb(17 24 39/18%),0 2px 10px rgb(17 24 39/10%);animation:cmdk-in .16s var(--ease-enter)}
@keyframes cmdk-in{from{opacity:0;transform:translateY(-8px) scale(.99)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.cmdk__panel{animation:none}}

.cmdk__prompt{display:flex;align-items:center;gap:10px;flex:none;
  padding:12px var(--s4);border-bottom:1px solid #e5e7eb;background:#fff}
.cmdk__caret{flex:none;color:#374151;font:14px/1 var(--font-mono)}
.cmdk__input{flex:1;min-width:0;border:0;background:transparent;color:#111827;
  font:15px/1.4 var(--font-body)}
.cmdk__input:focus{outline:none}
.cmdk__input::placeholder{color:#9ca3af;opacity:1}
.cmdk__esc{flex:none;padding:2px 7px;border-radius:var(--r-xs);border:1px solid #e5e7eb;
  background:#f3f4f6;color:#6b7280;font:10px/1.5 var(--font-mono);letter-spacing:.08em}

.cmdk__list{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;
  padding:var(--s2) var(--s2) var(--s3);background:#fff;scrollbar-width:thin;
  scrollbar-color:#9ca3af #f3f4f6}
.cmdk__group{padding:var(--s3) var(--s3) 5px;font-family:var(--font-mono);font-size:var(--text-label);
  letter-spacing:.16em;text-transform:uppercase;color:#9ca3af}
.cmdk__row{display:flex;align-items:center;gap:var(--s3);min-height:38px;padding:7px var(--s3);
  border-radius:var(--r-sm);cursor:pointer;font-size:14px;line-height:1.4;color:#111827}
.cmdk__row.is-active{background:#f3f4f6;color:#111827}
.cmdk__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The live number is the point of a metric row, so it never truncates. */
.cmdk__value{flex:none;font-family:var(--font-mono);font-size:13px;font-weight:600;color:#374151}
.cmdk__hint{flex:none;font-family:var(--font-mono);font-size:11px;letter-spacing:.1em;
  text-transform:uppercase;color:#9ca3af}
.cmdk__row.is-active .cmdk__value{color:#111827}
.cmdk__row.is-active .cmdk__hint{color:#6b7280}
.cmdk__empty{padding:var(--s5) var(--s3);text-align:center;color:#6b7280;font-size:13.5px}

.cmdk__foot{display:flex;align-items:center;gap:var(--s4);flex:none;
  padding:9px var(--s4);border-top:1px solid #e5e7eb;background:#f8f8f7;
  color:#6b7280;font-size:11.5px}
.cmdk__foot kbd{display:inline-grid;place-items:center;min-width:17px;height:17px;padding:0 4px;
  margin-right:3px;border-radius:var(--r-xs);border:1px solid #d1d5db;background:#fff;color:#374151;
  font:10px/1 var(--font-mono)}

@media (max-width:860px){
  .cmdk{padding-top:clamp(24px,8vh,64px)}
  .cmdk__row{min-height:44px}
}

/* ---------------------------------------------------------------------------
   S18 Settings - the organization/profile identity surface.

   Sections are hairline-separated rows inside one card rather than a stack of
   cards: an identity screen is a short list of small facts, and one card per
   fact reads as more machinery than there is. The mark is the only decorative
   element and it is square everywhere it appears.
   --------------------------------------------------------------------------- */
.settings-tabs{margin-bottom:var(--s4)}
.settings-profile-bento{display:grid;grid-template-columns:minmax(0,7fr) minmax(280px,5fr);
  grid-template-areas:"account teams" "methods methods";gap:var(--s4);align-items:stretch}
.settings-bento-card{min-width:0;margin:0}
.settings-bento-account{grid-area:account}
.settings-bento-teams{grid-area:teams;padding:var(--s5);display:flex;flex-direction:column}
.settings-bento-methods{grid-area:methods}
.settings-bento-methods .intg-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3)}
.settings-bento-methods .intg-card{min-height:72px;padding:var(--s3);gap:var(--s3);border-radius:var(--r-md)}
.settings-bento-methods .intg-card .intg-logo{width:40px;height:40px}
.settings-bento-methods .intg-card-status{justify-content:center}
.settings-bento-methods .intg-card-cta{padding:5px 8px}
.profile-method-modal .source-wizard-dialog{width:min(620px,100vw);padding:0;display:flex;flex-direction:column;
  overflow:hidden;background:var(--canvas)}
.profile-method-header{flex:none;padding:var(--s5);border-bottom:1px solid var(--line);background:var(--panel)}
.profile-method-titlebar{align-items:flex-start;gap:var(--s4)}
.profile-method-identity{min-width:0;display:flex;align-items:center;gap:var(--s4)}
.profile-method-identity .intg-logo{width:54px;height:54px}
.profile-method-identity .intg-logo svg{width:26px;height:26px}
.profile-method-identity h3{margin-top:3px;font-size:27px;line-height:1.15;letter-spacing:-.03em}
.profile-method-header-actions{display:grid;justify-items:end;gap:var(--s2);flex:none}
.profile-method-status{display:flex;justify-content:flex-end}
.profile-method-body{min-height:0;overflow:auto;padding:var(--s5);display:grid;align-content:start;gap:var(--s5);
  background:var(--canvas)}
.profile-method-section{overflow:hidden;border:1px solid var(--line);border-radius:var(--r-lg);
  background:var(--panel);box-shadow:var(--sh-1)}
.profile-method-section-head{padding:var(--s4);border-bottom:1px solid var(--line);background:var(--mineral)}
.profile-method-section h4,.profile-method-email-change h4,.profile-method-related h4{margin:3px 0 0;font-size:16px;line-height:1.3}
.profile-method-detail-list{display:grid}
.profile-method-detail-row{min-width:0;padding:var(--s3) var(--s4);display:grid;
  grid-template-columns:minmax(120px,160px) minmax(0,1fr);align-items:start;gap:var(--s4);border-bottom:1px solid var(--line)}
.profile-method-detail-row:last-child{border-bottom:0}
.profile-method-detail-row>span{color:var(--muted);font-size:12.5px}
.profile-method-detail-row>strong{min-width:0;overflow-wrap:anywhere;font-size:13px;font-weight:600;color:var(--ink)}
.profile-method-empty{padding:var(--s4);color:var(--muted);font-size:13px}
.profile-method-primary-action{padding:var(--s4);display:flex;justify-content:flex-start;border-top:1px solid var(--line);background:#fff}
.profile-method-lock{display:flex;align-items:center;gap:var(--s3);flex-wrap:wrap}
.profile-method-lock>.subtle{max-width:360px;line-height:1.45}
.profile-method-email-change{padding:var(--s4);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--s4);
  border:1px solid rgb(var(--evergreen-rgb)/22%);border-radius:var(--r-lg);background:var(--sage-soft)}
.profile-method-email-heading{display:flex;align-items:center;gap:6px}
.profile-method-info{margin-top:3px}
.profile-method-support{white-space:nowrap;background:var(--panel)}
.profile-method-related{display:grid;gap:var(--s3)}
.profile-method-related-head{display:block}
.profile-method-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s3)}
.profile-method-option{all:unset;box-sizing:border-box;min-width:0;min-height:70px;padding:var(--s3);display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:var(--s3);border:1px solid var(--line);
  border-radius:var(--r-md);background:var(--panel);cursor:pointer;box-shadow:var(--sh-1);
  transition:border-color .14s,background .14s,transform .14s}
.profile-method-option:hover{border-color:var(--olive);background:var(--sage-soft);transform:translateY(-1px)}
.profile-method-option:focus-visible{box-shadow:var(--focus)}
.profile-method-option .intg-logo{width:40px;height:40px}
.profile-method-option-copy{min-width:0;display:grid;gap:2px}
.profile-method-option-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px}
.profile-method-option-copy>span{color:var(--muted);font-size:11.5px}
.profile-method-option-action{color:var(--evergreen);font:600 10px/1 var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
.settings-bento-head{gap:var(--s3)}
.settings-bento-head>h3{font-size:15px}
.settings-team-list{display:grid;gap:var(--s2);margin-top:var(--s4)}
.settings-team-item{min-width:0;min-height:54px;padding:var(--s3);display:flex;align-items:center;gap:var(--s3);
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--mineral)}
.settings-team-item strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:600}
.settings-team-mark{width:30px;height:30px;display:grid;place-items:center;flex:none;border-radius:var(--r-sm);
  background:var(--sage-soft);color:var(--evergreen);font:600 12px/1 var(--font-display)}
.settings-team-note{margin-top:var(--s3)}
.settings-card{padding:0}
.settings-card>.settings-row{padding:var(--s4) var(--s5);border-bottom:1px solid var(--line)}
.settings-card>.settings-row .eyebrow{margin:0 0 var(--s2)}
.settings-card>.settings-row>h3{font-size:15px}

.settings-mark-row{display:flex;align-items:center;gap:var(--s4);flex-wrap:wrap}
.settings-profile-controls{display:grid;gap:var(--s2);min-width:min(100%,420px)}
.settings-mark{flex:none;display:grid;place-items:center;width:52px;height:52px;overflow:hidden;
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--mineral)}
.settings-mark img{width:100%;height:100%;object-fit:cover}
.settings-mark--initials{font-family:var(--font-display);font-size:17px;font-weight:600;
  letter-spacing:.02em;color:var(--evergreen)}
.settings-mark-actions{gap:var(--s2)}

/* The file input stays in the tab order (and keeps its own focus ring through
   :focus-within on the label) - it is only visually replaced by the button. */
.settings-upload{position:relative;overflow:hidden;cursor:pointer}
.settings-upload input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.settings-upload:focus-within{box-shadow:var(--focus)}

.settings-inline-form{display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap}
.settings-inline-form .input{flex:1;min-width:200px;max-width:340px}
.settings-static{font-size:14px;color:var(--ink)}

.settings-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:var(--s4);margin:0;padding:var(--s4) var(--s5)}
.settings-facts dt{font-family:var(--font-mono);font-size:var(--text-label);letter-spacing:.13em;
  text-transform:uppercase;color:var(--muted)}
.settings-facts dd{margin:4px 0 0;font-size:13.5px;color:var(--ink);overflow-wrap:anywhere}
.settings-card>.hint{padding:0 var(--s5) var(--s4);margin:0}

@media (max-width:1100px){
  .settings-profile-bento{grid-template-columns:minmax(0,1fr);grid-template-areas:"account" "teams" "methods"}
  .settings-bento-methods .intg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Teams v2 invitation and access lifecycle */
.teams-waiting-title{display:flex;align-items:center;gap:7px;padding:0 4px 14px}.teams-waiting-title h2{font-size:15px;font-weight:600;letter-spacing:-.01em}
.teams-waiting-title>span{position:relative;display:flex;color:#d1d5db;cursor:help}.teams-waiting-title svg{width:13px;height:13px}
.teams-waiting-title>span:hover{color:#9ca3af}.teams-invitations-grid__canvas--team{min-width:560px}.teams-invitations-grid__canvas--org{min-width:720px}
.teams-invitations-grid__head,.teams-invitations-grid__row{display:grid;align-items:center;gap:10px}.teams-invitations-grid__canvas--team .teams-invitations-grid__head,
.teams-invitations-grid__canvas--team .teams-invitations-grid__row{grid-template-columns:minmax(110px,1.5fr) minmax(120px,168px) minmax(64px,96px) minmax(110px,1fr)}
.teams-invitations-grid__canvas--org .teams-invitations-grid__head,.teams-invitations-grid__canvas--org .teams-invitations-grid__row{
  grid-template-columns:minmax(150px,1.5fr) minmax(90px,110px) minmax(130px,170px) minmax(70px,100px) minmax(120px,1fr)}
.teams-invitations-grid__head{padding:0 12px 8px;color:#9ca3af;font:650 10.5px var(--font-display);letter-spacing:.06em}
.teams-invitations-grid__body{display:flex;flex-direction:column;gap:8px;padding-bottom:8px}.teams-invitations-grid__row{padding:10px 12px;border:1px solid #f3f4f6;
  border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)}
.teams-invitations-grid__row.is-history{opacity:.62}.teams-invitations-grid__row>[role="cell"]{min-width:0}
.teams-invite-email{overflow:hidden;color:#374151;font-size:12.5px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.teams-invite-team{overflow:hidden;color:#374151;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.teams-invite-when{color:#6b7280;font-size:11.5px}
.teams-invite-actions{display:flex;min-width:0;align-items:center;justify-content:flex-end}.teams-invite-actions .btn--ghost{min-height:0;padding:4px 10px;
  border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#111827;font-size:11px;font-weight:600;white-space:nowrap}
.teams-invite-actions .btn--ghost:last-child{border-color:transparent;background:transparent;color:#b42318}.teams-invite-actions .btn--ghost:last-child:hover{background:#fef3f2}
.teams-history-label{color:#9ca3af;font-size:11px;font-weight:600}.teams-invitations-empty{padding:24px 20px;color:#9ca3af;font-size:13px;text-align:center}
.teams-invitation-history { margin-top: 16px; }
.teams-invitation-history > summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.teams-callout {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}
.teams-callout p { margin: 4px 0 0; color: var(--muted); }
.teams-suspend-impact { display: grid; gap: 8px; }
.teams-suspend-impact__card,.teams-suspend-key-card {
  padding: 11px 13px;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  background: #fafafa;
}
.teams-suspend-impact__card > b,.teams-suspend-impact__row > b {
  color: #9ca3af;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .06em;
}
.teams-suspend-impact__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.teams-suspend-impact__row > span { color: #374151; font-size: 12px; text-align: right; }
.teams-suspend-team-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.teams-suspend-team-chips span {
  padding: 2px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
}
.teams-suspend-key-card { display: grid; gap: 9px; }
.teams-impact-warning {
  padding: 10px 13px;
  border: 1px solid #fedf89;
  border-radius: 12px;
  background: #fffaeb;
  color: #b54708;
  font-size: 11.5px;
  line-height: 1.5;
}
.teams-checkbox { display: flex; align-items: flex-start; gap: 8px; color: #374151; font-size: 12px; line-height: 1.5; cursor: pointer; }
.teams-checkbox input { width: 14px; height: 14px; flex:none; margin:2px 0 0; accent-color:#b42318; }
.teams-impact-loading{margin-top:0;padding:12px 13px;border-color:#f3f4f6;border-radius:12px;background:#fafafa}
.teams-impact-loading p{margin:0;color:#6b7280;font-size:12px}
.teams-impact-skeletons{grid-template-columns:1fr;margin-top:8px}.teams-impact-skeletons i{height:42px;border:1px solid #f3f4f6}
/* S16 v2: label-first catalog and compact skill drawers. */
.skills-screen .skill-library-head{align-items:center}
.skills-screen .skill-library-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:min(520px,55%)}
.skills-screen .skill-search{flex:1;min-width:220px}.skills-screen .skill-search .input{height:38px}
.skills-screen .skill-filter-wrap{position:relative;flex:none}.skills-screen .skill-filter-button{height:38px;gap:8px}
.skills-screen .skill-filter-button>span{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--ink);color:var(--paper);font-size:10px}
.skills-screen .skill-filter-popover{position:absolute;z-index:20;top:calc(100% + 8px);right:0;width:340px;max-height:min(650px,70vh);overflow:auto;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--paper);box-shadow:0 18px 46px rgba(20,28,38,.18)}
.skills-screen .skill-filter-popover[hidden]{display:none}.skills-screen .skill-filter-popover section{padding:10px 0;border-bottom:1px solid var(--line)}
.skills-screen .skill-filter-popover section:first-child{padding-top:0}.skills-screen .skill-filter-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;font-size:12px}
.skills-screen .skill-filter-option,.skills-screen .skill-filter-check{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:31px;padding:5px 7px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit;font-size:12px;text-align:left}
.skills-screen .skill-filter-option:hover,.skills-screen .skill-filter-option.is-active,.skills-screen .skill-filter-check:hover{background:var(--surface-soft)}
.skills-screen .skill-filter-option b,.skills-screen .skill-filter-check b{color:var(--muted);font:600 10px var(--font-mono)}
.skills-screen .skill-filter-check{grid-template-columns:16px minmax(0,1fr) auto;cursor:pointer}.skills-screen .skill-filter-check input{margin:0;accent-color:var(--ink)}
.skills-screen .skill-filter-scroll{max-height:145px;overflow:auto}.skills-screen .skill-filter-selects{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.skills-screen .skill-filter-selects label{color:var(--muted);font-size:10px}.skills-screen .skill-filter-selects .select{height:34px;margin-top:5px;font-size:11px}
.skills-screen .skill-filter-unused{margin-top:9px}.skills-screen .skill-filter-popover footer{display:flex;align-items:center;justify-content:space-between;padding-top:12px}
.skills-screen .skill-active-filters{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:0 var(--s5) var(--s4)}
.skills-screen .skill-filter-chip{display:inline-flex;align-items:center;gap:7px;min-height:28px;padding:4px 9px;border:1px solid var(--line);border-radius:999px;background:var(--surface-soft);color:var(--ink);font:600 10px var(--font-mono)}
.skills-screen .skill-filter-chip span{font-size:14px;line-height:1}.skills-screen .skill-library-empty{display:grid;justify-items:center;gap:8px;padding:58px 24px;border-top:1px solid var(--line);text-align:center}
.skills-screen .skill-library-empty h3,.skills-screen .skill-library-empty p{margin:0}.skills-screen .skill-library-empty p{color:var(--muted);font-size:13px}
.skills-screen .skill-table{display:block;min-width:1020px;width:100%;table-layout:auto}.skills-screen .skill-table thead,.skills-screen .skill-table tbody{display:block}
.skills-screen .skill-table tr{display:grid;box-sizing:border-box;width:100%;grid-template-columns:minmax(140px,1.6fr) minmax(110px,1fr) minmax(120px,1.2fr) minmax(90px,.8fr) 92px 52px 70px 118px 28px;align-items:center}
.skills-screen .skill-table th,.skills-screen .skill-table td{box-sizing:border-box;width:auto!important;min-width:0;padding:12px 10px}.skills-screen .skill-table th:first-child,.skills-screen .skill-table td:first-child{padding-left:var(--s5)}
.skills-screen .skill-table th{overflow:hidden;font-size:8.5px;line-height:1.2;letter-spacing:.08em;white-space:normal}
.skills-screen .skill-table th:last-child,.skills-screen .skill-table td:last-child{padding-right:10px}.skills-screen .skill-table tbody tr{border-top:1px solid var(--line)}
.skills-screen .skill-table tbody tr:first-child{border-top:0}.skills-screen .skill-table td{border-bottom:0}.skills-screen .skill-cell-name{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.skills-screen .skill-cell-name .skill-library-meta{flex-basis:100%;margin-top:0}.skills-screen .skill-library-meta span::before{content:none}
.skills-screen .skill-handling-dot{width:6px;height:6px;border-radius:999px;background:#d98719;box-shadow:0 0 0 3px rgba(217,135,25,.13)}
.skills-screen .skill-category{display:inline-flex;align-items:center;min-height:24px;max-width:100%;padding:3px 8px;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--ink);font:600 10px/1.2 var(--font-mono)}
.skills-screen .skill-tags{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.skills-screen .skill-tag{display:inline-flex;align-items:center;gap:4px;min-height:23px;padding:3px 7px;border:1px solid #dbe2ea;border-radius:6px;background:#f4f7fa;color:#3d4a58;font:600 9.5px/1.2 var(--font-mono)}
.skills-screen button.skill-tag{cursor:pointer}.skills-screen .skill-tag--more{background:transparent}.skills-screen .skill-team-name,.skills-screen .skill-checked{display:block;overflow:hidden;color:var(--muted);font-size:10.5px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.skills-screen .skill-status-cluster{gap:4px}.skills-screen .skill-status-cluster .pill{padding-inline:7px;font-size:9px}.skills-screen .skill-status-cluster .btn{padding-inline:7px}
.skills-screen .skill-distribute-actions{display:flex;gap:4px}.skills-screen .skill-distribute-actions .btn{min-height:29px;padding:4px 7px;font-size:9px}.skills-screen .skill-lock-note{font-size:10px}
.skills-screen .skill-expand{width:26px;height:26px}
.skills-screen .skill-register-label-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.skills-screen .skill-label-note{margin:4px 0 12px;color:var(--muted);font-size:11px;line-height:1.45}
.skills-screen .skill-label-suggestions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:4px 0 12px;padding:10px;border:1px solid #dfe6ee;border-radius:10px;background:#f8fafc}.skills-screen .skill-label-suggestions[hidden]{display:none}
.skills-screen .skill-label-suggestions>div{display:flex;flex:1 0 100%;align-items:center;justify-content:space-between;font-size:11px}.skills-screen .skill-label-suggestions>div span{color:var(--muted);font-size:10px}
.skills-screen .skill-label-summary{margin:14px 0 8px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.skills-screen .skill-label-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.skills-screen .skill-label-summary-head p{margin:8px 0;color:var(--muted);font-size:12px;line-height:1.45}
.skills-screen .skill-tags--detail{margin-top:5px}.skills-screen .skill-tag--handling{background:#eef1f4;color:#59636e}.skills-screen .skill-tag--handling svg{width:12px;height:12px}
.skills-screen .skill-label-editor{margin:8px 0 14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.skills-screen .skill-label-version-note{margin:0 0 12px auto;width:max-content}
.skills-screen .skill-detail-state>.skill-category{order:-1}.skills-screen .skill-tag-manager{padding-top:0}
.skills-screen .skill-detail-dialog{width:min(620px,100vw)}
@media(max-width:820px){.skills-screen .skill-library-head{align-items:stretch;flex-direction:column}.skills-screen .skill-library-tools{width:100%;min-width:0;max-width:none}.skills-screen .skill-register-label-grid{grid-template-columns:1fr}}
@media(max-width:560px){.skills-screen .skill-library-tools{align-items:stretch;flex-direction:column}.skills-screen .skill-search{min-width:0}.skills-screen .skill-filter-wrap{width:100%}.skills-screen .skill-filter-button{width:100%;justify-content:center}.skills-screen .skill-filter-popover{position:fixed;inset:auto 10px 10px;width:auto;max-height:75vh}.skills-screen .skill-active-filters{padding-inline:var(--s4)}}
@media (max-width:680px){
  .settings-card>.settings-row,.settings-facts{padding-inline:var(--s4)}
  .settings-inline-form .input{max-width:none}
  .settings-bento-teams{padding:var(--s4)}
  .settings-bento-methods .intg-grid{grid-template-columns:minmax(0,1fr)}
  .profile-method-header,.profile-method-body{padding:var(--s4)}
  .profile-method-identity h3{font-size:23px}
  .profile-method-detail-row{grid-template-columns:minmax(0,1fr);gap:3px}
  .profile-method-email-change{grid-template-columns:minmax(0,1fr)}
  .profile-method-support{justify-self:start}
  .profile-method-options{grid-template-columns:minmax(0,1fr)}
}

/* ---------------------------------------------------------------------------
   Whitelabel chat surface (/chat → chat.html). One column: the organization's
   own brand bar on top, the Assistant screen (s10) below. The console tokens
   and copilot styles are reused unchanged - this block only adds the page
   frame the missing rail used to provide. */

/* Shared operational data grid. The page owns data and server actions; this
   chrome gives every table the same Find / Sort / Filters / Columns grammar. */
.data-grid-shell{max-width:100%;overflow-x:auto;border:1px solid var(--line);
  border-radius:var(--r-md);background:var(--panel);box-shadow:var(--sh-1)}
.data-grid-chrome{position:sticky;left:0;z-index:4;min-width:min(760px,100%);background:var(--panel)}
.data-grid-toolbar{min-height:52px;padding:8px var(--s3);display:flex;align-items:center;
  justify-content:space-between;gap:var(--s3);border-bottom:1px solid var(--line);background:var(--panel)}
.data-grid-count{color:var(--muted-2);font:500 var(--text-label)/1.4 var(--font-mono);
  letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.data-grid-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--s2);flex-wrap:wrap}
.data-grid-tool{all:unset;box-sizing:border-box;min-height:34px;padding:6px 11px;display:inline-flex;
  align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);border-radius:var(--r-xs);
  background:var(--panel);color:var(--ink);font:500 13px/1.3 var(--font-cta);cursor:pointer;box-shadow:var(--sh-1)}
.data-grid-tool:hover,.data-grid-tool[aria-expanded="true"]{border-color:var(--olive);background:var(--sage-soft);color:var(--evergreen)}
.data-grid-tool:focus-visible{outline:2px solid var(--evergreen);outline-offset:2px;box-shadow:var(--focus)}
.data-grid-tool.has-active-filter{border-color:var(--olive);color:var(--evergreen);background:var(--sage-soft)}
.data-grid-tool.has-active-filter::after{content:attr(data-filter-count);min-width:18px;height:18px;padding:0 5px;
  display:inline-grid;place-items:center;border-radius:999px;background:var(--evergreen);color:var(--mineral);
  font:600 10px/1 var(--font-mono)}
.data-grid-search-jump{width:34px;padding:0}
.data-grid-icon-tool{width:34px;padding:0}
.data-grid-icon-tool.has-active-filter{width:auto;min-width:34px;padding-inline:7px}
.data-grid-search-jump svg,.data-grid-icon-tool svg{width:16px;height:16px}
.data-grid-findbar{min-height:52px;padding:8px var(--s3);display:flex;align-items:center;gap:var(--s3);
  border-bottom:1px solid var(--line);background:var(--panel)}
.data-grid-findbar strong{flex:none;font-size:14px;font-weight:600}
.data-grid-findbar label{flex:1;min-width:180px}
.data-grid-search{width:100%;min-height:34px;padding:7px 10px;border:1px solid var(--line);border-radius:var(--r-xs);
  background:var(--panel);color:var(--ink);font:13px/1.4 var(--font-body)}
.data-grid-search::placeholder{color:var(--muted-2)}
.data-grid-search:focus{outline:none;border-color:var(--olive);box-shadow:var(--focus)}
.data-grid-optionbar{position:sticky;left:0;z-index:5;min-width:min(760px,100%);padding:var(--s3);
  border-bottom:1px solid var(--line);background:var(--mineral)}
.data-grid-optionbar[hidden]{display:none!important}
.data-grid-sortbar label{display:flex;align-items:center;gap:var(--s3)}
.data-grid-sortbar label>span,.data-grid-filterbar label>span{color:var(--muted-2);
  font:500 var(--text-label)/1.35 var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
.data-grid-sort{min-width:220px}
.data-grid-filterbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:var(--s3)}
.data-grid-filterbar label{display:grid;gap:6px}
.data-grid-filterbar .input{width:100%;min-width:0;margin:0}
.audit-filter-panel{margin-top:var(--s4);padding:var(--s4);border:1px solid var(--line);border-radius:var(--r-sm);background:var(--mineral)}
.data-grid-filterbar.data-grid-server-filterbar{margin:0;display:grid;grid-template-columns:1fr;gap:var(--s4);border-inline:0;border-top:0;border-radius:0;box-shadow:none}
.audit-filter-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s3)}
.audit-filter-fields .field{min-width:0;margin:0}
.audit-filter-fields .input,.audit-filter-fields .select{width:100%;min-width:0;margin:0}
.audit-filter-footer{display:flex;align-items:center;justify-content:space-between;gap:var(--s3);padding-top:var(--s3);border-top:1px solid var(--line)}
.audit-quick-ranges,.audit-filter-actions{display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap}
.audit-quick-ranges>span{margin-right:2px;color:var(--muted-2);font:500 var(--text-label)/1.35 var(--font-mono);letter-spacing:.08em;text-transform:uppercase}
.data-grid-columnbar{display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap}
.data-grid-columnbar label{min-height:34px;padding:6px 10px;display:inline-flex;align-items:center;gap:7px;
  border:1px solid var(--line);border-radius:var(--r-xs);background:var(--panel);font-size:13px;cursor:pointer}
.data-grid-columnbar label:has(input:focus-visible){box-shadow:var(--focus);border-color:var(--olive)}
.data-grid-columnbar input{accent-color:var(--evergreen)}
table.data-grid{display:table;width:100%;border-collapse:separate;border-spacing:0;font-size:13.5px;background:var(--panel)}
table.data-grid thead{display:table-header-group;position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
table.data-grid tbody{display:table-row-group;margin:0}
table.data-grid tr{display:table-row;padding:0;border:0;background:transparent}
table.data-grid th{display:table-cell;padding:11px var(--s4);background:var(--mineral);color:var(--muted-2);
  border:0;border-bottom:1px solid var(--line);font:500 11px/1.35 var(--font-mono);letter-spacing:.09em;
  text-transform:uppercase;white-space:nowrap;vertical-align:middle}
table.data-grid td{display:table-cell;padding:12px var(--s4);background:var(--panel);border:0;
  border-bottom:1px solid var(--line);vertical-align:middle;color:var(--ink)}
table.data-grid tbody tr:last-child>td{border-bottom:0}
table.data-grid tbody tr:hover>td{background:var(--sage-soft)}
table.data-grid tbody tr:focus-within>td{background:rgb(199 215 178/24%)}
table.data-grid [hidden]{display:none!important}
table.data-grid td::before{display:none}

@media(max-width:720px){
  .data-grid-chrome,.data-grid-optionbar{min-width:100%}
  .data-grid-toolbar{align-items:stretch;flex-direction:column}
  .data-grid-actions{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
  .data-grid-tool{min-height:44px;flex:none}
  .data-grid-search-jump,.data-grid-icon-tool{width:44px}
  .data-grid-icon-tool.has-active-filter{width:auto;min-width:44px}
  .data-grid-findbar{align-items:flex-start;flex-direction:column}
  .data-grid-findbar label{width:100%;min-width:0}
  .data-grid-search{min-height:44px}
  .data-grid-sortbar label{align-items:flex-start;flex-direction:column}
  .data-grid-sort{width:100%;min-height:44px}
  .source-sync-card table.data-grid,
  .source-file-register table.data-grid,
  .kb-table.data-grid,
  .policy-table.data-grid{display:block;min-width:0}
  .audit-filter-fields{grid-template-columns:1fr}
  .audit-filter-footer{align-items:stretch;flex-direction:column}
  .audit-filter-actions{justify-content:flex-end}
  .source-sync-card table.data-grid thead,
  .source-file-register table.data-grid thead,
  .kb-table.data-grid>thead,
  .policy-table.data-grid thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip-path:inset(50%);white-space:nowrap;border:0}
  .source-sync-card table.data-grid tbody,
  .source-file-register table.data-grid tbody,
  .kb-table.data-grid>tbody,
  .policy-table.data-grid tbody{display:grid;margin:0;gap:var(--s3)}
  .source-sync-card table.data-grid tbody tr,
  .source-file-register table.data-grid tbody tr,
  .kb-table.data-grid tbody tr,
  .policy-table.data-grid tbody tr{display:grid;padding:var(--s3);border:1px solid var(--line);
    border-radius:var(--r-sm);background:var(--mineral)}
  .source-sync-card table.data-grid tbody tr,
  .source-file-register table.data-grid tbody tr,
  .kb-table.data-grid tbody tr{grid-template-columns:repeat(2,minmax(0,1fr))}
  .policy-table.data-grid tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));border-width:0 0 1px;border-radius:0}
  .source-sync-card table.data-grid tbody td,
  .source-file-register table.data-grid tbody td,
  .kb-table.data-grid tbody td{display:grid;align-content:start;gap:4px;min-width:0;padding:0;
    border:0;background:transparent;text-align:left}
  .policy-table.data-grid tbody td{display:grid;grid-template-columns:80px minmax(0,1fr);gap:8px;
    align-items:start;padding:7px 0;border:0;background:transparent;text-align:left}
  .source-sync-card table.data-grid tbody td::before,
  .source-file-register table.data-grid tbody td::before,
  .kb-table.data-grid tbody td::before,
  .policy-table.data-grid tbody td::before{display:block}
  .kb-table.data-grid tbody td[data-label="Knowledge base"]::before,
  .policy-table.data-grid tbody td:first-child::before{display:none}
  .policy-table.data-grid tbody td:first-child{grid-column:1/-1;display:block}
  .source-sync-card table.data-grid tbody tr:hover>td,
  .source-file-register table.data-grid tbody tr:hover>td,
  .kb-table.data-grid tbody tr:hover>td,
  .policy-table.data-grid tbody tr:hover>td{background:transparent}
}

@media(min-width:721px) and (max-width:980px){
  .audit-filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Shared Halofy workspace language -------------------------------------------
   Home (S2) already has its own dashboard composition. Every other console
   route opts into this shared treatment through the resolved route attribute
   that app.js places on <body>. The visual grammar is Halofy: one light-neutral
   canvas, paper-white work surfaces, evergreen ink, hairline rules,
   compact outlined controls, and calm reveal motion. No screen owns a fork of
   these primitives, and the whitelabel chat surface never receives the route
   attribute. */
body[data-console-screen]:not([data-console-screen="s2"]) .app{
  background:var(--canvas)
}
body[data-console-screen]:not([data-console-screen="s1"]):not([data-console-screen="s2"]) .stage{
  min-height:100vh;background:var(--dl-page)
}
body[data-console-screen]:not([data-console-screen="s2"]) #screen-content{
  align-content:start;gap:var(--s4);padding-bottom:var(--s5)
}
body[data-console-screen]:not([data-console-screen="s2"]) #screen-content .card{
  background:var(--panel);border-color:var(--line);border-radius:var(--r-lg);
  box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%),0 16px 36px -32px rgb(var(--evergreen-rgb)/28%)
}
body[data-console-screen]:not([data-console-screen="s2"]) #screen-content>.grid>.card,
body[data-console-screen]:not([data-console-screen="s2"]) #screen-content>.screen-flow>.grid>.card{
  background:var(--panel);border-color:var(--line);
  box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%)
}
body[data-console-screen]:not([data-console-screen="s2"]) #screen-content>.grid>.stat,
body[data-console-screen]:not([data-console-screen="s2"]) #screen-content>.screen-flow>.grid>.stat{
  background:var(--panel);border-color:var(--line);box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .card>h3,
body[data-console-screen]:not([data-console-screen="s2"]) .between>h3{
  letter-spacing:-.025em
}
body[data-console-screen]:not([data-console-screen="s2"]) .compact-disclosure{
  background:var(--panel);border-color:var(--line);box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .teams-rail,
body[data-console-screen]:not([data-console-screen="s2"]) .setup-step{
  background:var(--panel);border-color:var(--line);
  box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%),0 16px 36px -34px rgb(var(--evergreen-rgb)/24%)
}
body[data-console-screen="s1"] .setup-step__marker{background:var(--panel)}
body[data-console-screen="s1"] .setup-step.is-done .setup-step__marker{background:var(--evergreen)}
body[data-console-screen]:not([data-console-screen="s2"]) .data-grid-shell{
  background:var(--panel);border-color:var(--line);border-radius:var(--r-lg);
  box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%),0 18px 42px -36px rgb(var(--evergreen-rgb)/28%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .data-grid-toolbar,
body[data-console-screen]:not([data-console-screen="s2"]) .data-grid-findbar,
body[data-console-screen]:not([data-console-screen="s2"]) .data-grid-chrome{
  background:var(--panel)
}
body[data-console-screen]:not([data-console-screen="s2"]) table.data-grid th{
  background:var(--mineral);border-bottom-color:var(--line)
}
body[data-console-screen]:not([data-console-screen="s2"]) table.data-grid td{
  background:var(--panel);border-bottom-color:var(--line)
}

/* S15 "Usage by team": the same slotted rows as the query ledger, on a real
   <table>. It stays a table on purpose - app.js wraps every <table> in the
   shared data-grid shell (search, sort, filter, column picker), and dropping to
   a div grid to get the look would take those controls with it.

   `border-spacing:0 8px` supplies the gap; the fill and the rounded ends live
   on the cells, because a <tr> paints neither. The shadow does go on the row -
   on cells it would draw a seam down every column boundary.

   These must stay AFTER the two rules above, which are (0,3,3) and would
   otherwise repaint the cells white. */
body[data-console-screen] .usage-groups-card table.data-grid{
  border-collapse:separate;border-spacing:0 8px
}
body[data-console-screen] .usage-groups-card table.data-grid th{
  padding:0 12px 8px;background:none;border:0;
  font-size:10.5px;letter-spacing:.06em
}
body[data-console-screen] .usage-groups-card table.data-grid td{
  padding:9px 12px;background:var(--surface-soft);
  border-top:1px solid var(--mineral);border-bottom:1px solid var(--mineral)
}
body[data-console-screen] .usage-groups-card table.data-grid td:first-child{
  border-left:1px solid var(--mineral);border-radius:12px 0 0 12px
}
body[data-console-screen] .usage-groups-card table.data-grid td:last-child{
  border-right:1px solid var(--mineral);border-radius:0 12px 12px 0
}
body[data-console-screen] .usage-groups-card table.data-grid tbody tr{
  box-shadow:0 1px 2px rgb(var(--evergreen-rgb)/4%),0 3px 8px rgb(var(--evergreen-rgb)/4%)
}
body[data-console-screen] .usage-groups-card table.data-grid tbody tr:hover td{
  background:var(--mineral)
}
body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip{
  gap:6px
}
body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn,
body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs>.btn,
body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs>.btn{
  min-height:34px;padding:6px 12px;border:1px solid rgb(var(--evergreen-rgb)/14%);
  background:var(--panel);color:var(--muted);box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn:hover,
body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs>.btn:hover,
body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs>.btn:hover{
  border-color:rgb(var(--evergreen-rgb)/32%);background:var(--sage-soft);color:var(--evergreen)
}
body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn--solid,
body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn[aria-pressed="true"],
body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs>.btn--solid,
body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs>.btn[aria-pressed="true"]{
  border-width:2px;border-color:var(--evergreen);background:var(--sage-soft);color:var(--evergreen);
  font-weight:600;box-shadow:none
}
body[data-console-screen]:not([data-console-screen="s2"]) .source-category-tabs,
body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs,
body[data-console-screen]:not([data-console-screen="s2"]) .usage-groups-tabs,
body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs{
  align-items:center;gap:6px
}
body[data-console-screen]:not([data-console-screen="s2"]) .source-category-tab{
  min-height:34px;padding:6px 12px;background:var(--panel);border-color:rgb(var(--evergreen-rgb)/14%);
  color:var(--muted);box-shadow:0 1px 0 rgb(var(--evergreen-rgb)/3%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .source-category-tab.is-active{
  border-width:2px;border-color:var(--evergreen);background:var(--sage-soft);color:var(--evergreen);
  font-weight:600;box-shadow:none
}
body[data-console-screen="s6"] .source-category-tab.is-active .source-category-count{
  background:var(--evergreen);color:var(--mineral)
}
body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn:focus-visible,
body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs>.btn:focus-visible,
body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs>.btn:focus-visible,
body[data-console-screen]:not([data-console-screen="s2"]) .source-category-tab:focus-visible{
  outline:2px solid var(--evergreen);outline-offset:2px;box-shadow:var(--focus)
}
body[data-console-screen]:not([data-console-screen="s2"]) :where(.input,.select):not(.policy-upload-fields *){
  min-height:42px;background-color:var(--panel);border-color:rgb(var(--evergreen-rgb)/16%);
  box-shadow:inset 0 1px 2px rgb(var(--evergreen-rgb)/3%)
}

/* Memory and Conflicts reuse Home's summary cards, spacing, and panel tokens. */
.memory-summary-metrics,.conflict-summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.memory-overview .saved-memories,.conflicts-overview .conflict-lane{border-color:var(--home-border);background:var(--home-panel);box-shadow:var(--home-shadow)}
.conflict-lane{display:grid;gap:var(--s3)}
.conflict-lane-head{align-items:flex-start}
.conflict-lane-head h2{margin:0 0 4px;font-size:16px}
.conflict-lane-empty{padding:18px;border:1px dashed var(--home-border);border-radius:var(--r-sm);background:var(--home-soft);color:var(--muted);text-align:center}
.conflict-manual-scan{display:grid;gap:7px;margin-top:var(--s3);padding-top:var(--s3);border-top:1px solid var(--line)}
.conflict-manual-scan__meter{height:8px;overflow:hidden;border:1px solid rgb(var(--evergreen-rgb)/12%);border-radius:var(--r-pill);background:var(--mineral)}
.conflict-manual-scan__meter>span{display:block;width:var(--conflict-scan-progress,0%);height:100%;border-radius:inherit;background:var(--evergreen);transition:width .24s var(--ease)}
.conflict-manual-scan__meter.is-pending>span{width:36%;background:linear-gradient(90deg,transparent,var(--evergreen),transparent);animation:conflict-scan-pending 1.2s linear infinite}
.conflict-manual-scan__percent{text-align:right;font:500 11px var(--font-mono)}
@keyframes conflict-scan-pending{from{transform:translateX(-110%)}to{transform:translateX(300%)}}
@media(prefers-reduced-motion:reduce){.conflict-manual-scan__meter>span{transition:none}.conflict-manual-scan__meter.is-pending>span{animation:none}}
@media(max-width:980px){.memory-summary-metrics,.conflict-summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.memory-summary-metrics,.conflict-summary-metrics{grid-template-columns:1fr}.conflict-lane-head{align-items:stretch;gap:8px}}
body[data-console-screen]:not([data-console-screen="s2"]) :where(.input,.select):hover:not(:disabled){
  border-color:rgb(var(--evergreen-rgb)/30%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .pill{
  background:var(--panel);border-color:rgb(var(--evergreen-rgb)/13%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .pill--ok{
  background:rgb(199 215 178/22%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .pill--warn{
  background:rgb(244 211 94/14%)
}
body[data-console-screen]:not([data-console-screen="s2"]) .pill--crit{
  background:rgb(232 60 0/7%)
}
@media(forced-colors:active){
  body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn--solid,
  body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn[aria-pressed="true"],
  body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs>.btn--solid,
  body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs>.btn[aria-pressed="true"],
  body[data-console-screen]:not([data-console-screen="s2"]) .source-category-tab.is-active{
    outline:2px solid CanvasText;outline-offset:-4px
  }
}
@media(max-width:860px){
  body[data-console-screen]:not([data-console-screen="s2"]) .app{background:var(--canvas)}
  body[data-console-screen]:not([data-console-screen="s2"]) .stage{min-height:auto}
  body[data-console-screen]:not([data-console-screen="s2"]) .filter-strip>.btn,
  body[data-console-screen]:not([data-console-screen="s2"]) .settings-tabs>.btn,
  body[data-console-screen]:not([data-console-screen="s2"]) .viewas-tabs>.btn,
  body[data-console-screen]:not([data-console-screen="s2"]) .source-category-tab{min-height:44px}
}

/* Shared action confirmations. Kept above the assistant dock and outside page
   geometry so route refreshes never erase a just-completed action. */
.action-toasts{
  position:fixed;z-index:90;top:66px;right:24px;width:min(360px,calc(100vw - 32px));
  display:grid;gap:10px;pointer-events:none
}
.action-toast{
  position:relative;display:grid;grid-template-columns:32px minmax(0,1fr) 28px;align-items:start;gap:10px;
  padding:12px 10px 12px 12px;border:1px solid rgb(var(--evergreen-rgb)/16%);border-radius:var(--r-md);
  background:rgb(255 255 255/97%);color:var(--ink);box-shadow:0 14px 34px -22px rgb(var(--evergreen-rgb)/46%),
    0 3px 10px rgb(var(--evergreen-rgb)/7%);pointer-events:auto;overflow:hidden;
  animation:action-toast-in .2s ease-out both
}
.action-toast::after{
  content:"";position:absolute;inset:auto 0 0;height:2px;background:linear-gradient(90deg,var(--sage),transparent)
}
.action-toast__mark{
  width:32px;height:32px;border-radius:50%;display:grid;place-items:center;
  background:var(--sage-soft);color:var(--evergreen);border:1px solid rgb(var(--evergreen-rgb)/10%)
}
.action-toast__mark svg{width:18px;height:18px}
.action-toast__copy{min-width:0;display:grid;gap:2px;padding-top:1px}
.action-toast__copy strong{font:600 13px/18px var(--font-cta);letter-spacing:-.01em;color:var(--evergreen)}
.action-toast__copy>span{font-size:12px;line-height:17px;color:var(--muted)}
.action-toast__dismiss{
  all:unset;box-sizing:border-box;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;
  color:var(--muted-2);cursor:pointer
}
.action-toast__dismiss:hover{background:var(--sage-soft);color:var(--evergreen)}
.action-toast__dismiss:focus-visible{outline:2px solid var(--evergreen);outline-offset:1px}
.action-toast__dismiss svg{width:15px;height:15px}
.action-toast--danger{border-color:rgb(232 60 0/22%)}
.action-toast--danger::after{background:linear-gradient(90deg,var(--rust),transparent)}
.action-toast--danger .action-toast__mark{background:rgb(232 60 0/8%);color:var(--rust);border-color:rgb(232 60 0/14%)}
.action-toast--danger .action-toast__copy strong{color:var(--rust)}
.action-toast.is-leaving{animation:action-toast-out .18s ease-in both}
@keyframes action-toast-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
@keyframes action-toast-out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-6px)}}
@media(max-width:680px){
  .action-toasts{top:62px;right:16px;width:calc(100vw - 32px)}
}
@media(prefers-reduced-motion:reduce){
  .action-toast,.action-toast.is-leaving{animation:none}
}

body[data-surface="chat"]{display:block}
.chat-app{min-height:100vh;display:flex;flex-direction:column}

.chat-topbar{display:flex;align-items:center;justify-content:space-between;gap:var(--s4);
  padding:var(--s3) var(--s5);background:var(--panel);border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:30}
.chat-brand{display:flex;align-items:center;gap:var(--s3);min-width:0}
.chat-brand img{width:28px;height:28px;border-radius:6px;object-fit:contain;flex:none}
.chat-brand b{font-size:15px;letter-spacing:.01em;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.chat-topbar-acts{display:flex;align-items:center;gap:var(--s3);flex:none}
.chat-who{display:flex;align-items:center;gap:var(--s2);min-width:0}
.chat-who span{font-size:13px;color:var(--muted);max-width:200px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.chat-av{position:relative;width:28px;height:28px;overflow:hidden;border-radius:50%;background:var(--evergreen);
  color:var(--mineral);display:flex;align-items:center;justify-content:center;
  font:600 11px var(--font-cta);flex:none}

.stage--chat{flex:1;display:flex;flex-direction:column;max-width:1220px;margin-inline:auto;padding-top:12px}
.stage--chat .copilot-stage{flex:1;display:flex;flex-direction:column}

@media (max-width:680px){
  .chat-topbar{padding:var(--s3) var(--s4)}
  .chat-who span{display:none}
}

/* ---- S10 Assistant redesign ------------------------------------------------
   History is an overlay drawer; the conversation remains the page's one
   primary surface. These overrides intentionally sit after the legacy S10
   block so durable chat/routine behavior can keep its existing selectors. */
@keyframes copilot-thinking-blink{0%,80%,100%{opacity:.24}40%{opacity:1}}
@keyframes copilot-dialog-in{
  from{opacity:0;transform:translate(-50%,calc(-50% + 14px)) scale(.985)}
  to{opacity:1;transform:translate(-50%,-50%) scale(1)}
}

body[data-console-screen="s10"] .stage{background:var(--canvas)}
/* align-content:start — the stage's min-height would otherwise stretch its grid
   rows, inflating the head well past `.head`'s 72px and breaking the alignment
   with every other screen. */
.copilot-stage{position:relative;min-height:calc(100dvh - 116px);gap:12px;align-content:start;
  background:transparent;font-family:var(--content-font)}
.copilot-stage .copilot-board{position:relative;gap:8px}
/* .copilot-head takes `.head` wholesale — no overrides — so the page name sits
   where S3/S11/S17/S21 put theirs. The board below keeps its own max-width, so
   only the head spans the full content column. */
.copilot-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
/* chat.html names itself in its branded topbar, so the head there stays the
   compact right-aligned button row it was before the console gained a title:
   card-aligned width, no 72px block, no divider, h1 screen-reader-only. */
/* /chat keeps the pre-title container geometry: the stage carries the measured
   column again (the head is outside the board, so without this it would centre
   in a wider box than the card) and the head-to-card gap stays the board's. */
body[data-surface="chat"] .copilot-stage{max-width:1180px;margin:0 auto;gap:8px}
/* align-self, not `margin:0 auto` — `.head` sets `margin:0!important`. The
   chat stage is a flex column, so align-self is its horizontal axis. */
body[data-surface="chat"] .copilot-head{align-items:center;align-self:center;min-height:0;
  width:min(1020px,100%);max-width:1020px;padding:0 2px 0 0;border-bottom:0}
body[data-surface="chat"] .copilot-head h1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* ...and because that head is short again, /chat keeps the card heights it had
   before the console head existed. */
body[data-surface="chat"] .copilot-stage .copilot-workbench{height:min(820px,calc(100dvh - 184px))}
@media(max-width:900px){
  body[data-surface="chat"] .copilot-stage .copilot-workbench{height:min(780px,calc(100dvh - 180px))}
}
@media(max-width:680px){
  body[data-surface="chat"] .copilot-stage .copilot-workbench{height:calc(100dvh - 228px)}
}
.copilot-stage .copilot-toolbar-button{min-height:38px;padding:8px 12px;border-color:#e5e7eb;border-radius:10px;
  background:#fff;color:#4b5563;box-shadow:0 1px 2px rgb(16 24 40/5%);font-size:12.5px}
.copilot-stage .copilot-toolbar-button:hover{border-color:var(--olive);background:#fff;color:var(--evergreen)}
.copilot-toolbar-button svg{width:15px;height:15px;flex:none}
.copilot-toolbar-details{width:38px;height:38px;flex:none;border-color:#e5e7eb;background:#fff;color:#4b5563;
  box-shadow:0 1px 2px rgb(16 24 40/5%)}
.copilot-toolbar-details:hover{border-color:var(--olive);color:var(--evergreen)}
.copilot-toolbar-details svg{width:16px;height:16px}

/* The transcript, the input and the model/writes footer read as ONE surface:
   a single light-gray card on the #fafafa page. The card edge is also the
   scroll boundary — everything inside it scrolls with the conversation, the
   page scrolls outside it. */
/* 184px = console chrome above the card (topbar + toolbar) plus bottom
   breathing room, so the card's own bottom edge stays on screen. */
.copilot-stage .copilot-workbench{display:block;width:min(1020px,100%);height:min(820px,calc(100dvh - 223px));
  min-height:560px;margin:0 auto;overflow:hidden;
  border:1px solid #e6e8ea;border-radius:20px;background:var(--canvas);
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 2px 6px -2px rgb(16 24 40/6%),
    0 24px 48px -32px rgb(16 24 40/20%)}
.copilot-stage .copilot-chat-shell{display:flex;width:100%;height:100%;min-height:0;overflow:hidden;border-radius:inherit;
  background:transparent}
.copilot-stage .copilot-transcript{padding:26px clamp(0px,1vw,10px) 18px}
.copilot-stage .copilot-thread{width:min(800px,100%);min-height:100%;margin:0 auto;gap:22px;padding:8px 0 32px}
.copilot-stage .copilot-thread .chat-msg{max-width:82%}
.copilot-stage .chat-msg:has(.chat-table){max-width:100%;width:100%}
.copilot-stage .chat-msg:has(.chat-table) .chat-bubble{width:100%;max-width:100%}
.copilot-stage .chat-msg-head{min-height:20px}
.copilot-stage .chat-meta{color:#8b9490;font:500 10px/1.3 var(--font-mono);letter-spacing:.08em;text-transform:none}
.copilot-stage .chat-bubble{padding:13px 16px;border:1px solid #eef0f3;border-radius:16px 16px 16px 4px;
  background:#fff;box-shadow:0 7px 22px -18px rgb(16 24 40/30%);font-size:14px;line-height:1.6}
.copilot-stage .chat-msg--user .chat-bubble{border-color:transparent;border-radius:16px 16px 4px 16px;
  background:linear-gradient(150deg,#1a5a42,#0f3d2e);color:#f3f6ee;
  box-shadow:0 10px 26px -16px rgb(15 61 46/60%)}
.copilot-stage .chat-msg--pending .chat-bubble{display:inline-flex;align-items:center;gap:9px;min-height:44px}
.copilot-thinking{display:inline-flex;align-items:center;gap:4px}
.copilot-thinking i{width:6px;height:6px;border-radius:50%;background:#5d9b7c;
  animation:copilot-thinking-blink 1.25s ease-in-out infinite}
.copilot-thinking i:nth-child(2){animation-delay:.16s}.copilot-thinking i:nth-child(3){animation-delay:.32s}
.copilot-stage .chat-table{min-width:640px}
.copilot-stage .chat-table th:first-child,.copilot-stage .chat-table td:first-child{min-width:112px;overflow-wrap:normal;word-break:normal}

.copilot-stage .copilot-hero{width:min(800px,100%);min-height:100%;margin:0 auto;padding:46px 0 40px}
.copilot-orb-wrap{position:relative;display:inline-block;margin-bottom:26px}
.copilot-orb{position:relative;display:block;width:76px;height:76px;overflow:hidden;border-radius:50%;
  background:linear-gradient(165deg,#fff 0 22%,#adc3ff 45%,#63b77a 68%,#f75001 100%);
  box-shadow:0 16px 34px rgba(247,80,1,.14),0 6px 28px rgba(91,140,255,.12),0 8px 26px rgba(99,183,122,.12),0 0 0 1px rgba(100,118,180,.1)}
.copilot-orb canvas{display:block;width:100%;height:100%}
.copilot-stage .copilot-hero h2{display:grid;gap:4px;margin:0;color:#19221e;font-size:26px;font-weight:650;line-height:1.18;letter-spacing:-.035em}
.copilot-stage .copilot-hero h2 span{display:block}.copilot-stage .copilot-hero h2 em{font-style:normal;
  background:linear-gradient(100deg,#2e6b52,#5d9b7c);background-clip:text;-webkit-background-clip:text;color:transparent}
.copilot-suggestions{display:grid;width:100%;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:34px;text-align:left}
.copilot-stage .copilot-routine-suggestions--hero{width:100%;max-width:800px;
  grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:34px}
.copilot-stage .copilot-routine-suggestions--hero .copilot-routine-suggestion{min-width:0;min-height:132px;padding:14px;
  border-color:#e7ece9;border-radius:14px;background:linear-gradient(145deg,#fff,#f7faf8);
  box-shadow:0 2px 4px rgb(16 24 40/4%),0 10px 24px -20px rgb(18 58 46/34%)}
.copilot-suggestion{all:unset;box-sizing:border-box;display:flex;min-width:0;min-height:106px;flex-direction:column;
  justify-content:space-between;gap:14px;padding:14px;border:1px solid #e3e5e8;border-radius:14px;
  background:linear-gradient(145deg,#fff,var(--neutral-soft));color:#30343a;cursor:pointer;
  box-shadow:0 2px 4px rgb(17 24 39/4%),0 10px 24px -20px rgb(17 24 39/28%);
  transition:transform .16s var(--ease),border-color .16s var(--ease),box-shadow .16s var(--ease)}
.copilot-suggestion:hover{transform:translateY(-2px);border-color:#c8cdd3;box-shadow:0 12px 28px -18px rgb(17 24 39/34%)}
.copilot-suggestion:focus-visible{box-shadow:var(--focus),0 12px 28px -18px rgb(17 24 39/34%)}
.copilot-suggestion>span{font-size:12.5px;line-height:1.45}.copilot-suggestion i{display:grid;place-items:center;width:28px;height:28px;
  align-self:flex-end;border-radius:9px;background:var(--neutral-soft);color:#5f6670}
.copilot-suggestion svg{width:14px;height:14px}

.copilot-stage .copilot-composer{position:sticky;z-index:3;bottom:0;width:min(800px,calc(100% - 36px));margin:0 auto;
  padding:0 0 16px;border:0;background:linear-gradient(180deg,rgba(251,253,252,0),#fbfdfc 24%)}
.copilot-stage .copilot-composer-pill{border:1px solid #e6ebe8;border-radius:18px;
  background:linear-gradient(145deg,#fff,#fbfdfc);box-shadow:0 2px 4px rgba(16,24,40,.05),0 14px 40px rgba(18,58,46,.1)}
.copilot-stage .copilot-composer-pill .chat-input{min-height:64px;padding:16px 17px 7px;font-size:14px}
.copilot-stage .copilot-send{width:36px;height:36px;background:linear-gradient(150deg,#1a5a42,#0f3d2e);
  box-shadow:0 9px 20px -10px rgb(15 61 46/75%)}
.copilot-stage .copilot-model-chip{background:#f8faf9}.copilot-stage .copilot-status-row{min-height:8px;margin:0}
.copilot-stage .copilot-notices{margin:6px 0 0}

/* Composer notices read as a quieter sibling of the composer pill — same white
   surface, same edge, same soft lift — rather than the tinted `.model-notice`
   block used on the settings screens. Scoped to `.copilot-notices` so S5 and
   S12 keep the shared style. */
.copilot-notices .copilot-notice{display:flex;align-items:center;gap:10px;margin:0;padding:8px 8px 8px 11px;
  border:1px solid #e6ebe8;border-radius:14px;background:linear-gradient(145deg,#fff,#fbfdfc);
  box-shadow:0 1px 2px rgb(16 24 40/5%);color:var(--muted-2);font-size:12.5px;line-height:1.4}
.copilot-notice__icon{display:grid;place-items:center;width:28px;height:28px;flex:none;
  border-radius:9px;background:rgb(46 107 82/8%);color:#2e6b52}
.copilot-notice__icon svg{width:15px;height:15px}
.copilot-notice__body{display:grid;min-width:0;flex:1;gap:1px}
.copilot-notice__body b{color:var(--ink);font-size:12.5px;font-weight:600}
.copilot-notice__body small{color:var(--muted);font-size:11.5px;line-height:1.4}
.copilot-notices .copilot-notice__action{min-height:30px;flex:none;padding:5px 11px;border:1px solid #e5e7eb;
  border-radius:9px;background:#fff;color:#4b5563;box-shadow:0 1px 2px rgb(16 24 40/5%);font-size:12px}
.copilot-notices .copilot-notice__action:hover{border-color:var(--olive);background:#fff;color:var(--evergreen)}
/* Error keeps the rust tone, but only as an accent — no full-bleed fill. */
.copilot-notices .copilot-notice.model-notice--error{border-color:rgb(232 60 0/24%);background:#fff}
.copilot-notices .model-notice--error .copilot-notice__icon{background:rgb(232 60 0/10%);color:var(--rust)}
.copilot-notices .model-notice--error .copilot-notice__body b{color:var(--rust)}
@media(max-width:680px){
  .copilot-notices .copilot-notice{align-items:flex-start;flex-wrap:wrap}
  .copilot-notices .copilot-notice__action{width:100%;justify-content:center}
}

.copilot-stage .copilot-inspector{position:absolute;z-index:8;top:50px;right:0;bottom:0;width:min(420px,100%);
  min-height:0;padding:20px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;
  box-shadow:0 24px 64px -28px rgb(5 11 10/58%);overflow:hidden}
.copilot-stage .copilot-inspector-head{align-items:center;padding-bottom:4px}
.copilot-stage .copilot-panels{min-height:0;max-height:none;flex:1;
  grid-template-rows:minmax(0,1fr) minmax(140px,.7fr)}
.is-activity-collapsed .copilot-inspector{display:none}

.copilot-library-dialog{width:min(420px,100vw);border-left-color:#e5e7eb}
.copilot-library-dialog.console-right-panel__dialog>.source-wizard-head{padding:20px 20px 16px}
.copilot-library-dialog .source-wizard-head h3{font-size:21px}
.copilot-library-dialog .console-right-panel__body{display:flex;min-height:0;flex:1;padding:0;overflow:hidden}
.copilot-library-shell{display:grid;width:100%;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto}
.copilot-library-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:16px 18px 10px;padding:4px;
  border:1px solid #e7ebe9;border-radius:11px;background:#f4f7f5}
.copilot-library-tabs button{min-height:34px;border:0;border-radius:8px;background:transparent;color:#748079;
  font:600 12px/1 var(--font-cta);cursor:pointer}
.copilot-library-tabs button.is-active{background:#fff;color:#173e31;box-shadow:0 1px 3px rgb(16 24 40/10%)}
.copilot-library-tabs button:focus-visible{outline:none;box-shadow:var(--focus)}
.copilot-library-dialog .copilot-history-search{margin:0 18px 12px;padding:9px 11px;border-color:#e4e9e6;border-radius:10px;background:#fff}
.copilot-library-scroll{min-height:0;overflow:auto;padding:0 18px 18px;scrollbar-width:thin}
.copilot-library-dialog .copilot-history-list{display:grid;gap:7px;min-height:0;overflow:visible}
.copilot-library-dialog .copilot-history-empty{display:grid;gap:6px;margin:0;padding:22px 14px;border:1px dashed #dfe6e2;
  border-radius:12px;background:#f9fbfa;color:#244638;text-align:left;font-size:14px;font-weight:600}
.copilot-library-dialog .copilot-history-empty span{color:var(--muted);font-size:12px;font-weight:400;line-height:1.5}
.copilot-library-dialog .copilot-history-item{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;
  width:100%;min-height:66px;padding:10px;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--ink);text-align:left;cursor:pointer}
.copilot-library-dialog .copilot-history-item:hover{border-color:#e1e8e4;background:#f7faf8}
.copilot-library-dialog .copilot-history-item.is-active{border-color:#c8d8cf;background:#edf4ef}
.copilot-history-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:rgba(46,107,82,.08);color:#2e6b52}
.copilot-history-icon svg{width:16px;height:16px}.copilot-history-copy{display:grid;gap:4px;min-width:0}
.copilot-history-copy strong{overflow:hidden;font-size:12.5px;font-weight:600;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.copilot-history-preview{overflow:hidden;color:#7d8782;font-size:11.5px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.copilot-history-item time{align-self:start;padding-top:2px;color:#9aa19d;font:500 9.5px/1 var(--font-mono)}
.copilot-library-dialog .copilot-clear{display:block;margin:12px auto 0;color:#8a938e}
.copilot-library-footer{padding:14px 18px;border-top:1px solid #e7ebe9;background:#fff}
.copilot-library-footer .btn{width:100%;justify-content:center;border-radius:10px}.copilot-library-footer svg{width:15px;height:15px}

.copilot-library-dialog .copilot-routine-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;
  min-height:72px;padding:8px;border:1px solid #e7ebe9;border-radius:12px;background:#fff}
.copilot-library-dialog .copilot-routine-item.is-selected{border-color:#aac5b6;background:#f4f8f5}
.copilot-library-dialog .copilot-routine-select{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:10px;min-width:0;padding:0}
.copilot-library-dialog .copilot-routine-body{display:grid;gap:4px;min-width:0;text-align:left}
.copilot-library-dialog .copilot-routine-prompt{overflow:hidden;font-size:12.5px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.copilot-library-dialog .copilot-routine-when{overflow:hidden;color:#7d8782;font-size:10.5px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}
.copilot-routine-icon.is-failed{background:rgb(142 58 40/9%);color:var(--rust)}
.copilot-routine-icon.is-paused{background:#f1f2f1;color:#919a95}
.copilot-library-dialog .copilot-routine-actions{display:flex;align-items:center;gap:5px}
.copilot-routine-toggle{position:relative;width:32px;height:20px;padding:0;border:0;border-radius:20px;background:#cdd5d1;cursor:pointer;transition:background .15s}
.copilot-routine-toggle span{position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgb(0 0 0/18%);transition:transform .15s}
.copilot-routine-toggle[aria-checked="true"]{background:#2e6b52}.copilot-routine-toggle[aria-checked="true"] span{transform:translateX(12px)}
.copilot-routine-toggle:focus-visible{outline:none;box-shadow:var(--focus)}
.copilot-library-dialog .copilot-routine-delete{width:30px;height:30px;border-color:transparent;background:transparent;color:#8b9490}
.copilot-library-dialog .copilot-routine-delete:hover{background:rgb(142 58 40/8%);color:var(--rust)}
.copilot-routine-delete-confirm{min-height:30px;padding:5px 8px;border:1px solid rgb(142 58 40/28%);border-radius:8px;
  background:rgb(142 58 40/8%);color:var(--rust);font:600 10.5px/1 var(--font-cta);cursor:pointer}
.copilot-library-starters{margin-top:22px;padding-top:18px;border-top:1px solid #e7ebe9}
.copilot-library-starters h4{margin:0 0 10px;color:#466155;font:600 10px/1.3 var(--font-mono);letter-spacing:.11em;text-transform:uppercase}
.copilot-library-dialog .copilot-routine-suggestions{grid-template-columns:1fr;gap:8px;margin:0}
.copilot-library-dialog .copilot-routine-suggestion{padding:12px;border-radius:11px;box-shadow:none}

.console-modal.copilot-routine-dialog{inset:50% auto auto 50%;width:min(480px,calc(100vw - 32px));height:auto;max-height:calc(100dvh - 32px);
  margin:0;padding:0;border:1px solid #e3e8e5;border-radius:16px;overflow:auto;background:#fff;
  box-shadow:0 26px 80px -28px rgb(5 11 10/68%);transform:translate(-50%,-50%);animation:copilot-dialog-in .18s var(--ease-enter)}
.console-modal.copilot-routine-dialog::backdrop{background:rgb(5 11 10/45%);backdrop-filter:blur(3px)}
.console-modal.copilot-routine-dialog .console-modal__head{padding:20px 20px 16px}
.console-modal.copilot-routine-dialog .console-modal__body{padding:18px 20px 20px}
.console-modal.copilot-routine-dialog .copilot-routine-frequency{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:4px;border:1px solid #e4e9e6;border-radius:10px;background:#f4f7f5}
.console-modal.copilot-routine-dialog .copilot-routine-frequency legend{grid-column:1/-1;margin:0 0 3px;padding:0 4px}
.console-modal.copilot-routine-dialog .copilot-routine-frequency label{justify-content:center;min-height:34px;border-radius:7px;background:#fff}

@media(max-width:900px){
  .copilot-stage .copilot-workbench{display:block;height:min(780px,calc(100dvh - 219px));min-height:540px}
  .copilot-stage .copilot-chat-shell{min-height:0}
  .copilot-suggestions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .copilot-stage .copilot-routine-suggestions--hero{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* `.head` stacks into title row + action row at 860px, so the chrome above the
   card grows by one row before the 680px lane takes over. */
@media(max-width:860px){
  .copilot-stage .copilot-workbench{height:min(780px,calc(100dvh - 251px))}
}
@media(max-width:680px){
  /* `.head` already stacks below 860px; give the actions the full row. */
  .copilot-toolbar-actions{width:100%;justify-content:stretch}.copilot-stage .copilot-toolbar-button{flex:1;justify-content:center}
  /* Head stacks into title row + action row here, so the chrome above the card
     is taller than the single-row desktop head. */
  .copilot-stage .copilot-workbench{height:calc(100dvh - 300px);min-height:500px;border-radius:16px}
  .copilot-stage .copilot-transcript{padding:22px 14px 12px}
  .copilot-stage .copilot-thread .chat-msg{max-width:92%}
  .copilot-stage .copilot-hero{padding:34px 0 28px}.copilot-stage .copilot-hero h2{font-size:23px}
  .copilot-suggestions{grid-template-columns:1fr}.copilot-suggestion{min-height:82px}
  .copilot-stage .copilot-routine-suggestions--hero{grid-template-columns:1fr}
  .copilot-stage .copilot-composer{width:calc(100% - 20px);padding-bottom:10px}
  .copilot-stage .copilot-composer-left{width:100%;justify-content:space-between}
  .copilot-stage .copilot-inspector{top:0;left:0;width:100%;border-radius:14px}
  .copilot-library-dialog{width:100vw}
  .console-modal.copilot-routine-dialog .copilot-routine-fields{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  .copilot-thinking i,.console-modal.copilot-routine-dialog{animation:none}
  .copilot-suggestion{transition:none}.copilot-suggestion:hover{transform:none}
}

/* S16 skill drawer — mirrors the approved Skills v2 reference. */
.skills-screen .skill-detail-dialog{width:min(760px,96vw);height:100dvh;padding:0;overflow:hidden;border-left:1px solid #e5e7eb;background:#fff}
.skills-screen .skill-detail-dialog>.skill-detail-panel{display:grid;height:100%;min-height:0;max-height:100%;grid-template-rows:auto auto minmax(0,1fr);gap:0;padding:0;overflow:hidden;background:#fff}
.skills-screen .skill-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px 28px 14px;border-bottom:1px solid #f3f4f6;background:#fff}
.skills-screen .skill-detail-identity{min-width:0;flex:1}.skills-screen .skill-detail-identity>.eyebrow{color:#9ca3af;font-size:11px;font-weight:650;letter-spacing:.04em;text-transform:none}
.skills-screen .skill-detail-identity h3{margin:3px 0 0;color:#111827;font-size:17px;font-weight:650;letter-spacing:-.01em}
.skills-screen .skill-detail-state{display:flex;align-items:center;gap:6px;margin:8px 0 0;flex-wrap:wrap}
.skills-screen .skill-detail-state .skill-category{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border:1px solid #e5e7eb;border-radius:999px;background:#fff;color:#111827;font-size:10.5px;font-weight:650}
.skills-screen .skill-detail-state .skill-category i{color:#2e6b52;font-size:8px;font-style:normal}.skills-screen .skill-detail-state .pill{min-height:0;padding:2px 8px;font-size:10.5px;line-height:1.2}
.skills-screen .skill-detail-facts{display:block;margin-top:8px;color:#6b7280;font-size:11.5px;line-height:1.45}.skills-screen .skill-detail-facts b{color:#111827;font-weight:600}
.skills-screen .skill-detail-labels{display:flex;align-items:center;gap:6px;margin-top:8px;flex-wrap:wrap}.skills-screen .skill-detail-labels .skill-tags{display:flex;gap:6px;margin:0;flex-wrap:wrap}
.skills-screen .skill-detail-labels .skill-tag{min-height:0;padding:3px 9px;border-color:#e5e7eb;background:#fff;color:#374151;font-size:11px;font-weight:600;line-height:1.2}
.skills-screen .skill-detail-labels .skill-tag--handling{background:#f3f4f6;color:#6b7280}.skills-screen .skill-detail-labels .skill-tag svg{width:10px;height:10px}
.skills-screen .skill-label-edit{margin-left:auto;padding:3px 8px;border:0;border-radius:7px;background:transparent;color:#0f3d2e;font:600 11.5px/1.35 var(--font-cta);cursor:pointer}.skills-screen .skill-label-edit:hover{background:#eaf1ec}.skills-screen .skill-label-edit:focus-visible{outline:none;box-shadow:var(--focus)}
.skills-screen .skill-detail-close{display:grid;width:30px;height:30px;flex:none;place-items:center;padding:0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#6b7280;cursor:pointer}.skills-screen .skill-detail-close:hover{background:#f9fafb}.skills-screen .skill-detail-close:focus-visible{outline:none;box-shadow:var(--focus)}.skills-screen .skill-detail-close svg{width:14px;height:14px}
.skills-screen .skill-detail-action-rail{display:flex;align-items:center;gap:8px;padding:12px 28px;border-bottom:1px solid #f3f4f6;background:#fff}.skills-screen .skill-detail-action-rail .btn{min-height:30px;padding:6px 12px;border-radius:8px;font-size:12px}
.skills-screen .skill-detail-action-rail .btn--primary{border-color:#0f3d2e;background:#0f3d2e;color:#fff}.skills-screen .skill-detail-action-rail [data-skill-status]{min-width:0;flex:1}.skills-screen .skill-detail-action-rail .skill-retire{margin-left:auto;color:#b42318}
.skills-screen .skill-detail-scroll{display:flex;min-height:0;flex-direction:column;gap:14px;padding:18px 28px;overflow-y:auto;scrollbar-width:thin;background:#fff}
.skills-screen .skill-checks,.skills-screen .skill-findings{display:flex;flex-direction:column;gap:8px}.skills-screen .skill-checks .skill-lane-head .eyebrow,.skills-screen .skill-findings .skill-lane-head .eyebrow{color:#9ca3af;font-size:11px;font-weight:650;letter-spacing:.06em;text-transform:none}
.skills-screen .skill-checks .skill-lane-head .subtle,.skills-screen .skill-findings .skill-lane-head .subtle{color:#9ca3af;font-size:11px}
.skills-screen .skill-lane-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.skills-screen .skill-lane{display:flex;min-width:0;min-height:88px;flex-direction:column;align-items:flex-start;gap:7px;padding:12px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)}
.skills-screen .skill-lane-icon{display:flex;width:auto;height:22px;align-items:center;justify-content:flex-start;border:0;border-radius:0;background:transparent}.skills-screen .skill-lane-icon--brand{width:auto;background:transparent}.skills-screen .skill-lane-icon svg{width:16px;height:16px}.skills-screen .skill-lane-icon--brand svg{width:auto;height:20px}
.skills-screen .skill-lane-info{display:contents}.skills-screen .skill-lane-name{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.skills-screen .skill-lane-verdict{display:inline-flex;align-self:flex-start;padding:2px 8px;border:1px solid color-mix(in srgb,var(--lane) 24%,#e5e7eb);border-radius:999px;background:#fff;color:var(--lane);font-size:10.5px;font-weight:650;line-height:1.3}.skills-screen .skill-lane-sub{margin:0;color:#9ca3af;font:500 10px/1.35 var(--font-mono);word-break:break-word}
.skills-screen .skill-clean{padding:11px 14px;border-color:#d1fadf;border-radius:12px;background:#ecfdf3;color:#067647}.skills-screen .skill-clean--warn{border-color:#fedf89;background:#fffaeb;color:#b54708}
.skills-screen .skill-detail-sections{display:flex;flex-direction:column;gap:8px}.skills-screen .skill-sec{overflow:hidden;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)}
.skills-screen .skill-sec summary{padding:12px 18px;border-radius:0;color:#111827;font-size:12.5px;font-weight:600}.skills-screen .skill-sec summary:hover{background:#f7f7f7}.skills-screen .skill-sec summary>svg{width:12px;height:12px;color:#9ca3af}.skills-screen .skill-sec-meta{color:#9ca3af;font-family:var(--font-display);font-size:11px;font-weight:400;letter-spacing:0;text-transform:none}
.skills-screen .skill-sec-body{padding:14px 18px;border-top:1px solid #f3f4f6}.skills-screen .skill-detail-grid{max-width:100%;overflow-x:auto}.skills-screen .skill-detail-grid-head,.skills-screen .skill-detail-grid-row{display:grid;align-items:start;gap:10px}.skills-screen .skill-detail-grid-head{padding:0 10px 9px;color:#9ca3af;font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase}.skills-screen .skill-detail-grid-row{padding:9px 10px;border-top:1px solid #f3f4f6;color:#374151;font-size:12px;line-height:1.45}.skills-screen .skill-detail-grid-row>[role="cell"]{min-width:0;overflow-wrap:anywhere}.skills-screen .skill-detail-grid-empty>[role="cell"]{display:flex;grid-column:1/-1;gap:8px;color:#9ca3af}.skills-screen .skill-detail-grid--checks .skill-detail-grid-head,.skills-screen .skill-detail-grid--checks .skill-detail-grid-row{min-width:620px;grid-template-columns:86px 1.3fr 90px 100px 1.2fr}.skills-screen .skill-detail-grid--agents .skill-detail-grid-head,.skills-screen .skill-detail-grid--agents .skill-detail-grid-row{min-width:590px;grid-template-columns:1.3fr 1fr 52px 64px 76px 84px}.skills-screen .skill-detail-grid--versions .skill-detail-grid-head,.skills-screen .skill-detail-grid--versions .skill-detail-grid-row{min-width:520px;grid-template-columns:70px 110px 90px 90px 1fr}.skills-screen .skill-detail-grid--labels .skill-detail-grid-head,.skills-screen .skill-detail-grid--labels .skill-detail-grid-row{min-width:500px;grid-template-columns:86px 90px 100px 1fr}.skills-screen .skill-detail-grid--events .skill-detail-grid-head,.skills-screen .skill-detail-grid--events .skill-detail-grid-row{min-width:560px;grid-template-columns:86px 100px 64px 100px 1fr}.skills-screen .skill-detail-grid--tags .skill-detail-grid-head,.skills-screen .skill-detail-grid--tags .skill-detail-grid-row{min-width:420px;grid-template-columns:minmax(130px,1fr) 60px minmax(180px,1.5fr)}.skills-screen .skill-detail-grid .person-avatar-cell{white-space:nowrap}.skills-screen .skill-detail-grid .subtle{font-size:11px;white-space:normal}
.skills-screen .skill-label-editor,.skills-screen .skill-edit{margin:0;padding:16px 18px;border-color:#e5e7eb;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/5%),0 4px 12px rgb(16 24 40/5%)}
@media(max-width:720px){.skills-screen .skill-detail-dialog{width:100vw;max-width:100vw}.skills-screen .skill-detail-header{padding:18px 16px 13px}.skills-screen .skill-detail-action-rail{padding:10px 16px}.skills-screen .skill-detail-scroll{padding:16px}.skills-screen .skill-lane-grid{grid-template-columns:1fr}.skills-screen .skill-label-edit{margin-left:0}}

/* S16 skill library — dedicated Skills v2 grid, intentionally outside the shared table enhancer. */
.skills-screen .skills-head h1{display:flex;align-items:center;gap:7px}.skills-screen .skills-head .heading-info{width:15px;height:15px}
.skills-screen .skills-head .acts{gap:10px}.skills-screen .skills-head .acts>.pill{min-height:27px;padding:4px 10px}.skills-screen .skills-head .acts>.btn{min-height:36px;padding:8px 17px;border-radius:10px}
.skills-screen .skill-library{padding:20px 20px 12px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)}
.skills-screen .skill-library-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 4px 14px;flex-wrap:wrap}
.skills-screen .skill-library-title{display:flex;align-items:center;gap:7px;min-width:0}.skills-screen .skill-library-title h2{display:flex;align-items:center;gap:7px;margin:0;color:#111827;font-size:15px;font-weight:600;letter-spacing:-.01em}.skills-screen .skill-library-title .heading-info{width:13px;height:13px;color:#d1d5db}
.skills-screen .skill-library-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.skills-screen .skill-search{box-sizing:border-box;display:flex;width:260px;min-width:0;flex:none;align-items:center;gap:8px;padding:7px 10px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.skills-screen .skill-search-icon{width:13px;height:13px;flex:none;color:#9ca3af}.skills-screen .skill-search input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#111827;font:400 12.5px/1.4 var(--font-body)}.skills-screen .skill-search input::placeholder{color:#9ca3af}
.skills-screen .skill-filter-wrap{position:relative;flex:none}.skills-screen .skill-filter-button{box-sizing:border-box;position:relative;display:flex;height:33px;align-items:center;gap:6px;padding:7px 12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;color:#111827;font:600 12.5px/1 var(--font-cta);cursor:pointer}.skills-screen .skill-filter-button:hover,.skills-screen .skill-filter-button.is-active{background:#f9fafb}.skills-screen .skill-filter-button:focus-visible{outline:none;box-shadow:var(--focus)}
.skills-screen .skill-filter-icon{width:13px;height:13px;flex:none}.skills-screen .skill-filter-button>.skill-filter-count{position:absolute;top:-7px;right:-7px;display:grid;min-width:18px;height:18px;place-items:center;padding:0 4px;border:2px solid #fff;border-radius:999px;background:#0f3d2e;color:#fff;font-size:10px;font-weight:700}
.skills-screen .skill-filter-panel{display:grid;grid-template-columns:minmax(280px,1.4fr) minmax(150px,.72fr) minmax(170px,.82fr);gap:0 16px;margin:0 4px 14px;padding:15px 16px 12px;border:1px solid #e5e7eb;border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/3%)}.skills-screen .skill-filter-panel[hidden]{display:none}.skills-screen .skill-filter-section{min-width:0;padding:0}.skills-screen .skill-filter-section--category{grid-row:span 2;padding-right:16px;border-right:1px solid #e5e7eb}.skills-screen .skill-filter-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 6px}.skills-screen .skill-filter-panel .skill-filter-title{margin-bottom:8px;color:#111827;font-size:11.5px}.skills-screen .skill-filter-panel .skill-filter-option,.skills-screen .skill-filter-panel .skill-filter-check{min-height:30px;padding:5px 7px;border-radius:8px;font-size:11.5px}.skills-screen .skill-filter-panel .skill-filter-scroll{max-height:112px;padding-right:3px;overflow:auto;scrollbar-width:thin}.skills-screen .skill-filter-advanced{grid-column:2/4;align-self:end;margin-top:10px;padding-top:10px;border-top:1px solid #e5e7eb}.skills-screen .skill-filter-advanced .skill-filter-selects{display:grid;grid-template-columns:1fr 1fr;gap:8px}.skills-screen .skill-filter-panel .skill-filter-unused{width:max-content;max-width:100%;margin-top:7px}.skills-screen .skill-filter-panel-footer{display:flex;grid-column:1/-1;align-items:center;justify-content:flex-end;gap:8px;margin-top:11px;padding-top:11px;border-top:1px solid #e5e7eb}.skills-screen .skill-filter-panel-footer .btn{min-height:30px}
.skills-screen .skill-active-filters{padding:0 4px 12px}.skills-screen .skill-table-wrap{max-width:100%;overflow-x:auto}.skills-screen .skill-table{display:block;width:100%;min-width:1020px}
.skills-screen .skill-table-head,.skills-screen .skill-row-grid{display:grid;box-sizing:border-box;width:100%;grid-template-columns:minmax(140px,1.6fr) minmax(110px,1fr) minmax(120px,1.2fr) minmax(90px,.8fr) 92px 52px 70px 118px 28px;gap:10px;align-items:center}
.skills-screen .skill-table-head{padding:0 12px 8px;color:#9ca3af;font-size:10.5px;font-weight:650;letter-spacing:.06em}.skills-screen .skill-table-head [role="columnheader"]:nth-last-child(2){text-align:right}
.skills-screen .skill-table-body{display:flex;flex-direction:column;gap:8px}.skills-screen .skill-row-grid{min-height:48px;padding:8px 12px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%);transition:background .12s ease}.skills-screen .skill-row-grid:hover{background:#f5f6f7}
.skills-screen .skill-row-grid>[role="cell"]{box-sizing:border-box;min-width:0}.skills-screen .skill-cell-name{display:block}.skills-screen .skill-cell-name-main{display:flex;min-width:0;align-items:center;gap:7px}.skills-screen .skill-library-name{min-width:0;padding:0;border:0;background:transparent;color:#111827;font:600 13px/1.3 var(--font-body);text-align:left;cursor:pointer}.skills-screen .skill-library-name>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.skills-screen .skill-library-name:hover{color:#0f3d2e}.skills-screen .skill-library-name:focus-visible{outline:none;box-shadow:var(--focus)}
.skills-screen .skill-cell-name-main>.pill{min-height:0;flex:none;padding:1px 7px;border-color:#e5e7eb;background:#f3f4f6;color:#374151;font-size:10px;font-weight:650;line-height:1.3}.skills-screen .skill-library-meta{display:flex;align-items:center;gap:5px;margin-top:2px;color:#9ca3af;font-size:11px;line-height:1.2}.skills-screen .skill-library-meta .skill-handling-dot{width:6px;height:6px;flex:none;box-shadow:none}
.skills-screen .skill-cell-category{overflow:hidden;color:#374151;font-size:11.5px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.skills-screen .skill-cell-tags{overflow:hidden}.skills-screen .skill-row-grid .skill-tags{display:flex;min-width:0;align-items:center;gap:4px;overflow:hidden;flex-wrap:nowrap}.skills-screen .skill-row-grid .skill-tag{box-sizing:border-box;display:block;min-width:0;min-height:0;overflow:hidden;padding:2px 8px;border:1px solid #e5e7eb;border-radius:999px;background:#fff;color:#374151;font:600 10.5px/1.25 var(--font-body);text-overflow:ellipsis;white-space:nowrap}.skills-screen .skill-row-grid .skill-tag--more{flex:none;padding:0;border:0;background:transparent;color:#9ca3af;font-weight:400}
.skills-screen .skill-cell-team{overflow:hidden}.skills-screen .skill-row-grid .skill-team-name{color:#374151;font-size:12px;font-weight:500}.skills-screen .skill-status-cluster{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.skills-screen .skill-library-status{display:inline-flex;min-height:0;padding:2px 8px;border:1px solid #e5e7eb;border-radius:999px;background:#f3f4f6;color:#374151;font-size:10.5px;font-weight:650;line-height:1.25;white-space:nowrap}.skills-screen .skill-library-status--good{border-color:#d1fadf;background:#ecfdf3;color:#067647}.skills-screen .skill-library-status--pending{border-color:#fedf89;background:#fffaeb;color:#b54708}.skills-screen .skill-library-status--critical{border-color:#fecdca;background:#fef3f2;color:#b42318}
.skills-screen .skill-cell-agents{color:#111827;font-size:12.5px;font-variant-numeric:tabular-nums}.skills-screen .skill-cell-checked .skill-checked{color:#6b7280;font-size:11.5px;font-variant-numeric:tabular-nums}.skills-screen .skill-cell-share{display:flex;justify-content:flex-end}.skills-screen .skill-distribute-actions{display:flex;justify-content:flex-end;gap:5px}.skills-screen .skill-row-grid .skill-distribute-actions .btn{min-height:0;padding:3px 7px;border-color:#e5e7eb;border-radius:8px;background:#fff;color:#111827;font-size:10.5px;font-weight:600;line-height:1.2}.skills-screen .skill-row-grid .skill-distribute-actions .btn:hover{background:#f9fafb}.skills-screen .skill-row-grid .skill-lock-note{justify-content:flex-end;color:#9ca3af;font-size:11px}.skills-screen .skill-row-grid .skill-lock-note svg{width:12px;height:12px}
.skills-screen .skill-row-grid .skill-expand{display:grid;width:26px;height:26px;place-items:center;padding:0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#6b7280}.skills-screen .skill-row-grid .skill-expand:hover{background:#f9fafb}.skills-screen .skill-row-grid .skill-expand svg{width:12px;height:12px}
.skills-screen .skill-library-pagination{display:flex;align-items:center;justify-content:space-between;margin-top:8px;padding:12px 4px 6px;border-top:1px solid #f3f4f6;color:#6b7280;font-size:13px}.skills-screen .skill-library-pagination>div{display:flex;gap:6px}.skills-screen .skill-library-pagination button{display:grid;width:28px;height:28px;place-items:center;padding:0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#374151;font:500 14px/1 var(--font-body);cursor:pointer}.skills-screen .skill-library-pagination button:hover:not(:disabled){background:#f9fafb}.skills-screen .skill-library-pagination button:focus-visible{outline:none;box-shadow:var(--focus)}.skills-screen .skill-library-pagination button:disabled{color:#d1d5db;cursor:default}
@media(max-width:820px){.skills-screen .skill-library-head{align-items:stretch;flex-direction:column}.skills-screen .skill-library-tools{width:100%;justify-content:stretch}.skills-screen .skill-search{width:auto;flex:1}.skills-screen .skill-filter-panel{grid-template-columns:1fr 1fr}.skills-screen .skill-filter-section--category{grid-column:1/-1;grid-row:auto;margin-bottom:12px;padding:0 0 12px;border-right:0;border-bottom:1px solid #e5e7eb}.skills-screen .skill-filter-advanced{grid-column:1/-1}.skills-screen .skill-filter-panel-footer{grid-column:1/-1}}
@media(max-width:560px){.skills-screen .skills-head{align-items:flex-start}.skills-screen .skill-library{padding:16px 12px 10px}.skills-screen .skill-library-tools{align-items:stretch;flex-direction:column}.skills-screen .skill-search{width:100%}.skills-screen .skill-filter-wrap,.skills-screen .skill-filter-button{width:100%}.skills-screen .skill-filter-button{justify-content:center}.skills-screen .skill-filter-panel{grid-template-columns:1fr;margin-inline:0;padding:13px 12px}.skills-screen .skill-filter-section{padding:10px 0;border-bottom:1px solid #e5e7eb}.skills-screen .skill-filter-section--category{grid-column:auto;margin:0;padding-top:0}.skills-screen .skill-filter-advanced{grid-column:auto;margin:0}.skills-screen .skill-filter-panel-footer{grid-column:auto;margin-top:0;border-top:0}.skills-screen .skill-filter-options-grid{grid-template-columns:1fr 1fr}}
body[data-console-screen="s16"] #screen-content .skills-screen .skill-library{border:1px solid #e5e7eb;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)}

/* S8 audit & deletion — standalone reference layout. This screen owns its
   table treatment and opts out of the shared data-grid chrome. */
.audit-access-pill{display:inline-flex;min-height:28px;align-items:center;gap:7px;padding:5px 12px;border:1px solid #cfe2d7;border-radius:999px;background:#eef6f1;color:#245741;font-size:11.5px;font-weight:650;white-space:nowrap}.audit-access-pill .dot{width:6px;height:6px;border:1.5px solid currentColor;border-radius:50%;background:transparent}
.audit-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.audit-stat-card{display:flex;min-width:0;min-height:104px;flex-direction:column;justify-content:center;padding:16px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%),0 5px 14px rgb(16 24 40/5%)}.audit-stat-card>span{color:#6b7280;font-size:12px;font-weight:600}.audit-stat-card>strong{margin-top:3px;color:#111827;font-size:24px;font-weight:700;line-height:1.05;letter-spacing:-.025em;font-variant-numeric:tabular-nums}.audit-stat-card>small{margin-top:7px;color:#9ca3af;font-size:11px;line-height:1.35}
.audit-trail-card{margin-bottom:14px;padding:18px 20px 10px;border-color:#e5e7eb;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)}.audit-trail-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.audit-trail-head h2{display:flex;align-items:center;gap:6px;margin:0;color:#111827;font-size:15px;font-weight:650;letter-spacing:-.01em}.audit-trail-head .heading-info{width:14px;height:14px;color:#c6cbd2}.audit-trail-actions,.audit-range-tabs{display:flex;align-items:center;gap:4px}.audit-range-tabs{padding:3px;border-radius:10px;background:#f5f6f5}.audit-range-tab{min-height:28px;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:#6b7280;font:600 11.5px/1 var(--font-cta);cursor:pointer}.audit-range-tab:hover{color:#0f3d2e}.audit-range-tab.is-active{background:#fff;color:#111827;box-shadow:0 1px 3px rgb(16 24 40/10%)}.audit-range-tab:focus-visible{outline:none;box-shadow:var(--focus)}.audit-download{min-height:34px;margin-left:5px;padding:7px 12px;border-color:#e5e7eb;border-radius:10px;background:#fff;color:#111827}.audit-download svg{width:14px;height:14px;margin-right:7px;vertical-align:-2px}
.audit-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}.audit-filter-grid label{min-width:0}.audit-filter-grid .select{min-height:34px;padding:7px 34px 7px 10px;border-color:#e5e7eb;border-radius:10px;background-color:#fff;color:#111827;font-size:12.5px;font-weight:600}.audit-filter-grid .select:focus{border-color:#7fb89a}.audit-download-status:empty{display:none}.audit-download-status{margin:0 0 8px}
.audit-table-scroll{width:100%;overflow-x:auto}.audit-table{width:100%;min-width:850px;border-collapse:collapse;background:#fff;font-size:12.5px}.audit-table th{padding:8px 10px;border-bottom:1px solid #eceef0;color:#9ca3af;font:650 10px/1.3 var(--font-body);letter-spacing:.06em;text-transform:uppercase}.audit-table td{height:47px;padding:8px 10px;border-bottom:1px solid #eef0f2;color:#4b5563;vertical-align:middle}.audit-table tbody tr:last-child td{border-bottom:0}.audit-table tbody tr:hover{background:#fbfcfb}.audit-table th:first-child,.audit-table td:first-child{padding-left:8px}.audit-table th:last-child,.audit-table td:last-child{padding-right:8px}.audit-when{width:110px;color:#9ca3af!important;font:500 11px/1.35 var(--font-mono);white-space:nowrap}.audit-event{min-width:185px}.audit-event small,.audit-result small{display:block;max-width:250px;margin-top:3px;overflow:hidden;color:#9ca3af;font-size:10.5px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.audit-op-label,.audit-outcome-label{font-size:11px;font-weight:650;line-height:1.3;white-space:nowrap}.audit-op-label{color:#4b5563}.audit-op-label--write{color:#067647}.audit-op-label--export{color:#6b7280}.audit-op-label--danger{color:#b42318}.audit-person{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}.audit-person .person-avatar{width:24px;height:24px;box-shadow:none;font-size:8px}.audit-person strong{max-width:150px;overflow:hidden;color:#111827;font-size:11.5px;font-weight:650;text-overflow:ellipsis}.audit-person-fallback{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:#e6f5f8;color:#216979;font:650 8px/1 var(--font-mono)}.audit-agent,.audit-team{max-width:150px;overflow:hidden;color:#6b7280!important;font-size:11.5px;text-overflow:ellipsis;white-space:nowrap}.audit-result{min-width:138px!important}.audit-outcome-label--ok{color:#067647}.audit-outcome-label--blocked,.audit-outcome-label--failed{color:#b42318}.audit-outcome-label--miss{color:#6b7280}.audit-outcome-label--neutral{color:#4b5563}
.audit-table-footer{display:flex;min-height:42px;align-items:center;justify-content:space-between;gap:12px;padding:9px 6px 4px;border-top:1px solid #f5f5f5}.audit-table-footer>p{margin:0;color:#6b7280;font-size:11.5px}.audit-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:0;color:#6b7280;font-size:11.5px;white-space:nowrap}.audit-page-step{display:grid;width:28px;height:28px;place-items:center;padding:0;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#374151;font:500 14px/1 var(--font-body);cursor:pointer}.audit-page-step:hover:not(:disabled){background:#f9fafb}.audit-page-step:focus-visible{outline:none;box-shadow:var(--focus)}.audit-page-step:disabled{color:#d1d5db;cursor:default}.audit-empty{margin:24px 4px;color:#6b7280;font-size:13px}
.audit-compliance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.audit-compliance-card{min-width:0;min-height:250px;padding:20px;border-color:#e5e7eb;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)}.audit-compliance-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.audit-compliance-head h2{margin:0;color:#111827;font-size:15px;font-weight:650;letter-spacing:-.01em}.audit-compliance-head>div>span{display:block;margin-top:3px;color:#9ca3af;font-size:11.5px}.audit-compliance-head .pill{min-height:24px;padding:4px 8px;font-size:10.5px}.audit-compliance-card>p{margin:14px 0 12px;color:#6b7280;font-size:12px;line-height:1.45}.audit-compliance-form{display:grid;gap:9px}.audit-compliance-form .field,.audit-certificate-form .field{min-width:0;margin:0}.audit-compliance-form .field label,.audit-certificate-form .field label{margin-bottom:5px;color:#9ca3af;font-family:var(--font-body);font-size:10px;font-weight:650;letter-spacing:.06em}.audit-compliance-form .input,.audit-compliance-form .select,.audit-certificate-form .input{min-height:34px;padding-block:7px;border-color:#e5e7eb;border-radius:10px;background:#fff;font-size:12.5px}.audit-compliance-form>.hint{margin:-2px 0 0;font-size:10.5px}.audit-compliance-form>.btn{width:max-content;min-height:34px;padding:7px 13px;border-radius:8px;font-size:12px}.audit-certificate-form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.audit-certificate-form>.btn{min-height:34px;padding:7px 13px;border-color:#e5e7eb;border-radius:9px;background:#fff;color:#111827;font-size:12px}.audit-certificate-note{display:flex;align-items:flex-start;gap:9px;margin-top:12px;padding:12px;border-radius:10px;background:#f8f8f7;color:#6b7280}.audit-certificate-note>span{display:grid;width:18px;height:18px;flex:none;place-items:center;border:1px solid #d6dadd;border-radius:50%;font-size:10px}.audit-certificate-note p{margin:0;font-size:10.5px;line-height:1.5}.certificate-viewer .snippet{font-size:11px;overflow-x:auto}.audit-erasure+.certificate-viewer{display:block}
@media(max-width:1024px){.audit-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.audit-trail-head{align-items:flex-start;flex-direction:column}.audit-trail-actions{width:100%;justify-content:space-between}.audit-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.audit-access-pill{white-space:normal}.audit-stat-grid,.audit-filter-grid,.audit-compliance-grid{grid-template-columns:1fr}.audit-stat-card{min-height:94px}.audit-trail-card{padding:16px 12px 8px}.audit-trail-actions{align-items:stretch;flex-direction:column}.audit-range-tabs{width:100%;overflow-x:auto}.audit-range-tab{flex:1;min-width:max-content}.audit-download{width:100%;margin-left:0}.audit-table-footer{align-items:flex-start;flex-direction:column}.audit-pager{align-self:flex-end}.audit-compliance-card{min-height:0}.audit-certificate-form{grid-template-columns:1fr}.audit-certificate-form>.btn{width:100%}}
.audit-compliance-card>.sub{margin:14px 0 12px;color:#6b7280;font-size:12px;line-height:1.45}
/* ──────────────────────────────────────────────────────────────────────────
   S20 Export: governed egress. Geometry mirrors the export design doc:
   selectable option cards (radio scope / checkbox tiers), a purpose+generate
   footer, then a result card of inset stat tiles, egress evidence and a
   bounded preview. Colors reach for --dl-* tokens; the one literal (#abefc6,
   the ok pill border) has no token equivalent.                              */
.ex20-titlerow{display:flex;align-items:center;gap:8px}
.ex20-card{display:flex;flex-direction:column;gap:18px}
.ex20-sec{display:flex;flex-direction:column;gap:10px}
.ex20-sec-title{display:flex;align-items:center;gap:7px;padding:0 2px;
  font-size:var(--dl-t-card);font-weight:var(--dl-w-strong);letter-spacing:var(--dl-track-snug);color:var(--dl-text)}
.ex20-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ex20-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ex20-grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.ex20-opt{position:relative;display:flex;align-items:flex-start;gap:10px;text-align:left;min-width:0;
  border:1px solid var(--dl-border);background:var(--panel);border-radius:var(--dl-r-xl);
  padding:13px 14px;cursor:pointer;box-shadow:var(--dl-e1)}
.ex20-opt input{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.ex20-opt:has(input:checked){border-color:var(--dl-primary);background:var(--dl-row-selected)}
.ex20-opt:has(input:focus-visible){box-shadow:var(--dl-focus)}
.ex20-opt--off{opacity:.55;cursor:default}
.ex20-dot{width:15px;height:15px;border-radius:var(--dl-r-pill);border:1.5px solid var(--dl-disabled);
  background:var(--panel);flex:none;margin-top:1px}
.ex20-opt:has(input:checked) .ex20-dot{border:4.5px solid var(--dl-primary)}
.ex20-box{width:15px;height:15px;border-radius:var(--dl-r-xs);border:1.5px solid var(--dl-disabled);
  background:var(--panel);color:var(--panel);flex:none;margin-top:1px;
  display:flex;align-items:center;justify-content:center}
.ex20-box svg{width:9px;height:9px;opacity:0}
.ex20-opt:has(input:checked) .ex20-box{border:2px solid var(--dl-primary);background:var(--dl-primary)}
.ex20-opt:has(input:checked) .ex20-box svg{opacity:1}
.ex20-opt-body{display:flex;flex-direction:column;gap:2px;min-width:0}
.ex20-opt-label{font-size:var(--dl-t-control);font-weight:650;color:var(--dl-text)}
.ex20-opt-hint{font-size:var(--dl-t-meta);color:var(--dl-ink-2);line-height:1.4}
.ex20-sel{display:flex;flex-direction:column;gap:5px;max-width:340px}
.ex20-lab{font-size:10.5px;font-weight:650;color:var(--dl-ink-3);letter-spacing:.06em;text-transform:uppercase}
.ex20-foot{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}
.ex20-foot-purpose{display:flex;flex-direction:column;gap:5px;flex:1;min-width:260px}
.ex20-foot-gen{display:flex;flex-direction:column;gap:5px;align-items:flex-end}
.ex20-note{font-size:var(--dl-t-meta);color:var(--dl-ink-3)}
.ex20-status{font-size:12px;font-weight:var(--dl-w-strong);color:var(--dl-bad-fg);
  border-top:1px solid var(--dl-hairline);padding-top:12px}
.ex20-status:empty{display:none}
.ex20-status[data-tone="info"]{color:var(--dl-ink-2)}
.ex20-status[data-tone="ok"]{color:var(--dl-ok-fg)}
.ex20-result{display:flex;flex-direction:column;gap:14px}
.ex20-res-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ex20-res-title{display:flex;flex-direction:column;gap:3px}
.ex20-res-title b{font-size:var(--dl-t-card);font-weight:var(--dl-w-strong);letter-spacing:var(--dl-track-snug);color:var(--dl-text)}
.ex20-res-sub{font-size:11.5px;color:var(--dl-ink-2)}
.ex20-pill-ok{display:inline-flex;align-items:center;gap:5px;font-size:var(--dl-t-meta);font-weight:650;
  color:var(--dl-ok-fg);background:var(--dl-ok-bg);border:1px solid #abefc6;
  border-radius:var(--dl-r-pill);padding:3px 11px;white-space:nowrap}
.ex20-pill-ok i{width:5px;height:5px;border-radius:var(--dl-r-pill);background:var(--dl-ok-fg)}
.ex20-tile{background:var(--dl-page);border:1px solid var(--dl-hairline);border-radius:var(--dl-r-xl);
  padding:12px 14px;box-shadow:var(--dl-e-inset);display:flex;flex-direction:column;gap:6px;min-width:0}
.ex20-tile-k{font-size:var(--dl-t-meta);font-weight:var(--dl-w-strong);color:var(--dl-ink-2)}
.ex20-tile-v{font-size:20px;font-weight:650;letter-spacing:var(--dl-track-tight);
  font-variant-numeric:tabular-nums;line-height:1;color:var(--dl-text)}
.ex20-tile-v--warn{color:var(--dl-warn-fg)}
.ex20-tile-cap{font-size:10.5px;color:var(--dl-ink-3)}
.ex20-evidence{background:var(--dl-page);border:1px solid var(--dl-hairline);border-radius:var(--dl-r-xl);
  padding:14px;display:flex;flex-direction:column;gap:8px}
.ex20-ev-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.ex20-ev-k{font-size:12px;color:var(--dl-ink-1);flex:none}
.ex20-ev-v{font-family:var(--font-mono);font-size:var(--dl-t-meta);color:var(--dl-text);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ex20-acts{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ex20-acts .ex20-note{font-size:11.5px}
.ex20-preview{display:flex;flex-direction:column;gap:6px}
.ex20-pre{max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;margin:0;
  padding:14px;border:1px solid var(--dl-hairline);border-radius:var(--dl-r-xl);background:var(--dl-page);
  font-family:var(--font-mono);font-size:11.5px;line-height:1.6;color:var(--dl-ink-1)}
@media(max-width:900px){.ex20-grid3,.ex20-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){
  .ex20-grid2,.ex20-grid3,.ex20-grid4{grid-template-columns:1fr}
  .ex20-foot-gen{align-items:stretch}
}

/* ---- platform surface contract ------------------------------------------
   Usage analytics governs content surfaces only: white section cards, neutral
   gray borders, restrained elevation, Inter typography, and compact hierarchy.
   The rail, workspace bar, page headers, dark graph/assistant canvases, and
   semantic status colors are intentionally outside this contract. */
.auth-shell{--panel:var(--canvas)}
body[data-console-screen] #screen-content{
  --content-font:var(--font-sans);
  --content-panel:#fff;
  --content-subpanel:#fff;
  --content-inset:#f9fafb;
  --content-border:#e5e7eb;
  --content-text:#111827;
  --content-body:#374151;
  --content-muted:#6b7280;
  --content-faint:#9ca3af;
  --content-radius:14px;
  --content-shadow:0 1px 2px rgb(16 24 40/4%);
  --content-shadow-lift:0 1px 2px rgb(16 24 40/4%),0 5px 14px rgb(16 24 40/5%)
}

body[data-console-screen] #screen-content :is(.home-metrics,.home-dashboard){
  --home-canvas:var(--content-inset);
  --home-panel:var(--content-panel);
  --home-border:var(--content-border);
  --home-text:var(--content-text);
  --home-muted:var(--content-muted);
  --home-faint:var(--content-faint);
  font-family:var(--content-font);
  color:var(--content-text)
}

body[data-console-screen] #screen-content :is(
  .card,
  .home-panel,
  .policy-panel,
  .teams-overview,
  .teams-directory-card,
  .teams-waiting-card,
  .teams-people-card,
  .source-connector-card,
  .source-standalone,
  [role="tabpanel"]>.compact-disclosure,
  .skills-screen .skill-library,
  .audit-trail-card,
  .audit-compliance-card
){
  font-family:var(--content-font);
  color:var(--content-text);
  background:var(--content-panel);
  border-color:var(--content-border);
  border-radius:var(--content-radius);
  box-shadow:var(--content-shadow)
}

body[data-console-screen] #screen-content :is(
  .stat,
  .home-metrics .metric-card,
  .home-metrics .metric-card-shell,
  .memory-summary-metrics .metric-card-shell,
  .conflict-summary-metrics .metric-card-shell,
  .home-writes-legend-row,
  .home-overview-row,
  .home-top-queries .home-card-body>div,
  .policy-tile,
  .source-tile,
  .source-connection,
  .intg-card,
  .skills-screen .skill-filter-panel,
  .audit-stat-card,
  .ex20-tile,
  .ex20-evidence
){
  font-family:var(--content-font);
  color:var(--content-body);
  background:var(--content-subpanel);
  border:1px solid var(--content-border);
  border-radius:var(--subpanel-radius);
  box-shadow:var(--content-shadow-lift)
}

body[data-console-screen] #screen-content :is(
  .card>h2,
  .card>h3,
  .card>.between:first-child>h2,
  .card>.between:first-child>h3,
  .home-panel-head h3,
  .policy-panel__title h2,
  .policy-panel__title h3,
  .teams-card-head h2,
  .skills-screen .skill-library-title h2,
  .audit-trail-head h2,
  .audit-compliance-head h2
){
  font-family:var(--content-font);
  color:var(--content-text);
  font-size:var(--section-title-size);
  font-weight:600;
  line-height:1.25;
  letter-spacing:-.01em
}

body[data-console-screen] #screen-content :is(
  .card>.sub,
  .card>.hint,
  .teams-card-head p,
  .skills-screen .skill-library-head p,
  .audit-compliance-head>div>span
){
  font-family:var(--content-font);
  color:var(--content-muted);
  font-size:var(--section-subtitle-size);
  line-height:1.5
}

body[data-console-screen] #screen-content :is(.field,.sub,.subtle,.hint):not(.head *,.home-head *){
  font-family:var(--content-font)
}
body[data-console-screen] #screen-content :is(.sub,.subtle,.hint):not(.head *,.home-head *){
  color:var(--content-muted)
}
body[data-console-screen] #screen-content .field:not(.head .field,.home-head .field)>label{
  font-family:var(--content-font);
  color:var(--content-body);
  font-size:13px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none
}
body[data-console-screen] #screen-content :is(.input,.select):not(.head *,.home-head *){
  font-family:var(--content-font);
  color:var(--content-text);
  background-color:var(--content-panel);
  border-color:var(--content-border)
}
body[data-console-screen] #screen-content :is(.tblwrap,table):not(.head *,.home-head *){
  font-family:var(--content-font);
  color:var(--content-body)
}
body[data-console-screen] #screen-content .tblwrap:not(.head *,.home-head *){
  background:var(--content-panel);
  border:1px solid var(--content-border)
}
body[data-console-screen] #screen-content table:not(.head *,.home-head *) :is(th,td){
  border-color:var(--content-border)
}
body[data-console-screen] #screen-content table:not(.head *,.home-head *) th{
  font-family:var(--content-font);
  color:var(--content-muted);
  background:var(--content-inset);
  font-size:12.5px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none
}
body[data-console-screen] #screen-content .btn--outline:not(.head *,.home-head *){
  font-family:var(--content-font);
  color:var(--content-text);
  background:var(--content-panel);
  border-color:var(--content-border)
}
body[data-console-screen] #screen-content .btn--outline:not(.head *,.home-head *):hover{
  background:var(--content-inset);
  border-color:var(--content-faint)
}
/* ---- end platform surface contract ---- */

/* S5 saved memories: scoped below the existing topology. */
.saved-memories{margin-top:18px;padding:20px 20px 12px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04);color:#111827}
.saved-memories-head{display:grid;grid-template-columns:minmax(128px,1fr) minmax(220px,380px) minmax(128px,1fr);align-items:center;gap:16px;padding:0 4px 12px}
.saved-memories-head h2{margin:0;font:600 15px/1.35 var(--font-display);letter-spacing:-.01em;color:#111827}
.saved-memory-search{position:relative;display:flex;align-items:center;justify-self:center;width:100%;color:#9ca3af}
.saved-memory-search svg{position:absolute;left:11px;width:16px;height:16px;pointer-events:none}
.saved-memory-search input{width:100%;height:34px;padding:7px 32px 7px 35px;border:1px solid #e5e7eb;border-radius:10px;outline:0;background:#fafafa;color:#111827;font:500 12.5px/1.4 var(--font-display);transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.saved-memory-search input::placeholder{color:#9ca3af}
.saved-memory-search:hover input{border-color:#d1d5db;background:#fff}
.saved-memory-search:focus-within{color:#0f3d2e}
.saved-memory-search:focus-within input{border-color:#87a190;background:#fff;box-shadow:var(--focus)}
.saved-memory-search input:disabled{cursor:not-allowed;opacity:.62}
.saved-memories-head-actions{display:flex;align-items:center;justify-self:end;gap:10px;flex:none}
.saved-memories-head-actions>span:first-child{color:#9ca3af;font-size:10.5px;font-weight:650;letter-spacing:.06em}
.saved-memory-filter-shell{flex:none}
.saved-memory-filter-trigger{position:relative;width:32px;height:32px;border-color:#e5e7eb;border-radius:10px;background:#fff;color:#4b5563}
.saved-memory-filter-trigger:hover{border-color:#d1d5db;background:#f9fafb;color:#374151}
.saved-memory-filter-badge{position:absolute;top:-5px;right:-5px;display:grid;place-items:center;min-width:15px;height:15px;padding:0 4px;border-radius:999px;background:#0f3d2e;color:#f3f6ee;font:600 9.5px/1 var(--font-mono);pointer-events:none}
.saved-memory-filter-pop{position:fixed;position-anchor:auto;inset:auto;top:anchor(bottom);left:anchor(right);transform:translateX(-100%);width:min(280px,calc(100vw - 24px));margin:6px 0 0;padding:12px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;box-shadow:0 8px 24px rgb(16 24 40/12%);color:#111827}
.saved-memory-filter-pop::backdrop{background:transparent}
.saved-memory-filter-pop label{display:grid;gap:5px;color:#6b7280;font-size:10.5px;font-weight:600}
.saved-memory-filter-pop label+label{margin-top:12px;padding-top:12px;border-top:1px solid #e5e7eb}
.saved-memory-filter-pop :is(.select,.input){width:100%;min-height:36px;margin:0;border-color:#e5e7eb;border-radius:10px;background-color:#fff;color:#111827;font-size:12.5px;font-weight:600}
.saved-memory-filter-pop .select{padding:7px 34px 7px 10px}
.saved-memory-filter-pop .input{padding:7px 10px}
.saved-memory-filter-footer{display:flex;justify-content:flex-end;margin-top:12px;padding-top:10px;border-top:1px solid #e5e7eb}
.saved-memory-filter-clear{color:#0f3d2e}
.saved-memory-list{display:flex;flex-direction:column;gap:8px;min-width:0}
.saved-memory-row{display:grid;grid-template-columns:26px minmax(220px,1fr) 112px 114px 68px 104px 18px;gap:10px;align-items:center;width:100%;min-height:44px;padding:9px 10px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgba(16,24,40,.04),0 3px 8px rgba(16,24,40,.04);color:#111827;text-align:left;font-family:var(--font-display);cursor:pointer;transition:background .16s ease,border-color .16s ease}
.saved-memory-row:hover{background:#f5f6f7;border-color:#e5e7eb}
.saved-memory-row:focus-visible{outline:none;box-shadow:var(--focus)}
.saved-memory-tier{font:700 10.5px/1 var(--font-mono)}
.saved-memory-tier--l2{color:#2f7955}
.saved-memory-tier--l3{color:#0f3d2e}
.saved-memory-summary{min-width:0;overflow:hidden;color:#111827;font-size:13px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-team{justify-self:start;max-width:100%;overflow:hidden;border-radius:999px;background:#f0f1f2;color:#6b7280;padding:2px 9px;font-size:10.5px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-source,.saved-memory-used,.saved-memory-date{min-width:0;overflow:hidden;color:#9ca3af;font-size:11px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-used{font-variant-numeric:tabular-nums}
.saved-memory-date{text-align:right}
.saved-memory-chevron{color:#c9cfd6;font-size:17px;text-align:right}
.saved-memories-empty{padding:32px 20px;border-top:1px solid #f3f4f6;color:#9ca3af;font-size:13px;text-align:center}
.saved-memory-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;padding:12px 4px 6px;border-top:1px solid #f3f4f6;color:#6b7280;font-size:13px}
.saved-memory-pages{display:flex;align-items:center;gap:6px}
.saved-memory-pages button{display:grid;place-items:center;min-width:28px;height:28px;padding:0 6px;border:1px solid #e5e7eb;border-radius:8px;background:#fff;color:#374151;font:600 12.5px/1 var(--font-display);font-variant-numeric:tabular-nums;cursor:pointer}
.saved-memory-pages button:hover:not(:disabled){background:#f9fafb}
.saved-memory-pages button:focus-visible{outline:none;box-shadow:var(--focus)}
.saved-memory-pages button[aria-current="page"]{border-color:#0f3d2e;background:#0f3d2e;color:#fff}
.saved-memory-pages button:disabled{color:#d1d5db;cursor:not-allowed}
.saved-memory-page-gap{display:grid;place-items:center;width:22px;color:#9ca3af}

.source-wizard-dialog.saved-memory-drawer{width:min(520px,100vw);border-left-color:#e5e7eb}
.saved-memory-drawer.console-right-panel__dialog>.source-wizard-head{padding:22px 24px 16px}
.saved-memory-drawer .source-wizard-head h3{max-width:390px;overflow:hidden;font-size:18px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-drawer .console-right-panel__body{padding:16px 24px 24px}
.saved-memory-detail{display:flex;flex-direction:column;gap:16px;color:#111827}
.saved-memory-badges{display:flex;align-items:center;gap:8px}
.saved-memory-status{border-radius:999px;padding:2px 9px;font-size:10.5px;font-weight:650}
.saved-memory-status--governed{background:#eaf1ec;color:#0f3d2e}
.saved-memory-status--current{background:#ecfdf3;color:#067647}
.saved-memory-body{margin:0;color:#111827;font-size:13.5px;line-height:1.6}
.saved-memory-text.is-collapsible .saved-memory-body,.saved-memory-facts>div.is-collapsible>span{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.saved-memory-text.is-expanded .saved-memory-body,.saved-memory-facts>div.is-expanded>span{display:block;overflow:visible;cursor:pointer}
.saved-memory-text-toggle{justify-self:start;border:0;background:transparent;color:#0f3d2e;padding:3px 0 0;font:650 11.5px/1.4 var(--font-display);cursor:pointer}
.saved-memory-text-toggle:hover{text-decoration:underline}
.saved-memory-text-toggle:focus-visible{outline:none;box-shadow:var(--focus)}
.saved-memory-author{display:flex;align-items:center;gap:11px;padding:12px 14px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa}
.saved-memory-author>span{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:#eaf1ec;color:#0f3d2e;font-size:12px;font-weight:650}
.saved-memory-author>div{display:grid;min-width:0;gap:1px}
.saved-memory-author strong{overflow:hidden;font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-author small{overflow:hidden;color:#6b7280;font-size:11.5px;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px;margin:0}
.saved-memory-meta>div{display:grid;min-width:0;gap:2px}
.saved-memory-meta dt{color:#9ca3af;font-size:10px;font-weight:650;letter-spacing:.05em;text-transform:uppercase}
.saved-memory-meta dd{margin:0;overflow:hidden;color:#374151;font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-detail-section{display:flex;flex-direction:column;gap:8px;padding-top:14px;border-top:1px solid #f3f4f6}
.saved-memory-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#9ca3af;font-size:10.5px;font-weight:650;letter-spacing:.06em}
.saved-memory-section-title strong{color:#0f3d2e;font-size:12px;font-variant-numeric:tabular-nums}
.saved-memory-confidence{height:6px;overflow:hidden;border-radius:999px;background:#f3f4f6}
.saved-memory-confidence i{display:block;height:100%;border-radius:inherit;background:#0f3d2e}
.saved-memory-facts{display:flex;flex-direction:column;gap:8px}
.saved-memory-facts>div{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:10px;align-items:start;padding:10px 12px;border:1px solid #f3f4f6;border-radius:10px;background:#fafafa}
.saved-memory-facts b{padding-top:1px;color:#9ca3af;font:700 10px/1.5 var(--font-mono)}
.saved-memory-facts span{font-size:12.5px;line-height:1.5}
.saved-memory-facts small{border-radius:999px;background:#ecfdf3;color:#067647;padding:2px 8px;font-size:10px;font-weight:650}
.saved-memory-facts>div>.saved-memory-text-toggle{grid-column:2;grid-row:2;padding-top:0}
.saved-memory-linkage{position:relative;isolation:isolate;height:230px;overflow:hidden;border-radius:12px;background:#07110e}
.saved-memory-linkage::before{content:"";position:absolute;z-index:0;inset:12% 10%;border-radius:50%;background:radial-gradient(circle at 50% 50%,rgb(199 215 178/22%) 0%,rgb(127 147 102/10%) 36%,transparent 72%);filter:blur(8px);pointer-events:none}
.saved-memory-linkage svg{position:absolute;z-index:1;inset:0;width:100%;height:100%;filter:drop-shadow(0 0 4px rgb(199 215 178/24%))}
.saved-memory-link-core{position:absolute;top:50%;left:50%;z-index:3;display:block;max-width:150px;overflow:hidden;transform:translate(-50%,-50%);border:1px solid #c7d7b2;border-radius:999px;background:#c7d7b2;box-shadow:0 0 0 5px rgb(199 215 178/7%),0 0 28px rgb(199 215 178/36%),0 8px 24px rgba(0,0,0,.45);color:#12241c;padding:7px 14px;font-size:11.5px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-link-node{position:absolute;z-index:2;display:inline-flex;align-items:center;max-width:132px;gap:6px;transform:translate(-50%,-50%);overflow:hidden;border:1px solid rgba(199,215,178,.28);border-radius:999px;background:#1a2e24;box-shadow:0 0 16px rgb(199 215 178/15%),0 2px 6px rgba(0,0,0,.3);color:rgba(243,246,238,.92);padding:4px 10px;font:600 10.5px/1.3 var(--font-display);white-space:nowrap;cursor:pointer}
.saved-memory-link-node:hover{border-color:rgba(199,215,178,.55);background:#24402f}
.saved-memory-link-node:not([data-action]){cursor:default}
.saved-memory-link-node:focus-visible{outline:2px solid #c7d7b2;outline-offset:2px}
.saved-memory-link-node i,.saved-memory-link-legend i{width:7px;height:7px;flex:none;border-radius:50%}
.saved-memory-link-node span{overflow:hidden;text-overflow:ellipsis}
.saved-memory-link-legend-list{display:flex;flex-direction:column;gap:2px}
.saved-memory-link-legend{display:grid;grid-template-columns:7px minmax(0,1fr) auto;gap:9px;align-items:center;width:100%;padding:6px 4px;border:0;border-radius:7px;background:transparent;color:#111827;text-align:left;font-family:var(--font-display);cursor:pointer}
.saved-memory-link-legend:hover{background:#f9fafb}
.saved-memory-link-legend:not([data-action]){cursor:default}
.saved-memory-link-legend span{overflow:hidden;font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.saved-memory-link-legend small{color:#9ca3af;font-size:10.5px}
.saved-memory-link-empty{margin:0;color:#9ca3af;font-size:12px}

@media(max-width:760px){
  .saved-memories{padding:16px 12px 10px}
  .saved-memories-head{grid-template-columns:minmax(0,1fr) auto;gap:12px}
  .saved-memory-search{grid-column:1/-1;grid-row:2}
  .saved-memory-row{grid-template-columns:26px minmax(0,1fr) 18px;gap:7px 9px;padding:11px 9px}
  .saved-memory-summary{grid-column:2;white-space:normal}
  .saved-memory-chevron{grid-column:3;grid-row:1}
  .saved-memory-team,.saved-memory-source,.saved-memory-used,.saved-memory-date{grid-column:2;text-align:left}
  .saved-memory-pagination{align-items:flex-start;flex-direction:column}
  .saved-memory-pages{max-width:100%;flex-wrap:wrap}
  .saved-memory-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  .saved-memory-drawer .console-right-panel__body{padding:16px 16px 20px}
}

/* ---- S19 Alerts ------------------------------------------------------------
   The screen rides Home's shell (.home-overview), so it inherits Home's canvas,
   width, type ramp, panels and metric cards untouched. Everything below is only
   the two things Home has no equivalent of: a three-up summary strip, and a
   list row. No new colours — state is carried by the shared .pill, which is the
   design language's one status treatment. */
  .alert-inbox .home-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .alert-lane{grid-column:span 12;display:flex;flex-direction:column}
  .alert-list{display:grid;margin-top:var(--s3)}
  .alert-item{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:start;
    gap:var(--s3);padding:var(--s3) 0;border-bottom:1px solid var(--line)}
  .alert-item:last-child{border-bottom:0}
  .alert-item>.home-overview-row-icon{margin-top:2px}
  .alert-item-copy{min-width:0}
  .alert-item-head{display:flex;align-items:center;gap:var(--s2);flex-wrap:wrap}
  .alert-item-head b{font-size:var(--text-small);line-height:1.35}
  .alert-item-subject{margin-top:2px;font-family:var(--font-mono);font-size:var(--text-label);
    color:var(--muted);overflow-wrap:anywhere}
  .alert-item-body{margin:var(--s1) 0 0;line-height:1.45}
  .alert-item-meta{margin-top:var(--s1)}
  .alert-item-acts{display:flex;align-items:center;justify-content:flex-end;gap:var(--s2);flex-wrap:wrap}
  /* Same override Home's lookups card uses: the shared link is a full-width
     card footer by default, and inside a row it has to size to its label. */
  .alert-item-acts .home-card-link{width:auto;padding:6px 12px;border-radius:8px;
    font-size:12.5px;gap:6px}
  .alert-item-status{grid-column:2/-1;margin:0}
  .alert-item-status:empty{display:none}
  .alert-item--muted .alert-item-body{max-width:52ch}
  @media(max-width:860px){
    .alert-inbox .home-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
    .alert-item{grid-template-columns:30px minmax(0,1fr)}
    .alert-item-acts{grid-column:2/-1;justify-content:flex-start}
  }

/* ──────────────────────────────────────────────────────────────────────────
   S3 Scoped memory — a literal port of the prototype's Scoped Memory screen
   (Halomem Home Standalone, `data-screen-label="Scoped Memory"`).

   Values here are the prototype's own, not --dl-* tokens, and that is
   deliberate: the ask was a one-to-one copy. Where a value happens to equal a
   token it is still written literally, so a later token change cannot drift
   this screen away from the design file. Everything from the summary tiles
   down is the prototype; the page head above them stays the platform's.     */
.sm-screen{display:flex;flex-direction:column;gap:18px;width:100%;max-width:1160px;margin:0 auto}
.sm-screen .head{margin:0}

/* Badge detail drawer — the same neutral, compact surface language as the
   approved Usage Analytics reference. Keep this scoped to S3's panel so the
   shared right-panel contract and every other drawer retain their geometry. */
body[data-console-screen="s3"] #badge-detail-panel .source-wizard-backdrop{
  background:rgb(17 24 39/40%);backdrop-filter:none
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-drawer{
  width:min(760px,96vw);border-left:0;background:#fff;color:#111827;
  box-shadow:-12px 0 40px rgb(16 24 40/16%)
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-drawer>.source-wizard-head{
  padding:22px 28px 14px;border-bottom:1px solid #f3f4f6;background:#fff
}
body[data-console-screen="s3"] #badge-detail-panel .console-right-panel__context{
  min-height:0;color:#9ca3af
}
body[data-console-screen="s3"] #badge-detail-panel .console-right-panel__context .eyebrow{
  color:#9ca3af;font-family:var(--font-mono);font-size:11px;font-weight:600;
  letter-spacing:.04em;text-transform:none
}
body[data-console-screen="s3"] #badge-detail-panel .source-wizard-head h3{
  min-width:0;margin-top:3px;overflow:hidden;color:#111827;font-size:18px;font-weight:650;
  line-height:1.25;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s3"] #badge-detail-panel .source-wizard-close{
  width:30px;height:30px;min-height:30px;padding:0;border:1px solid #e5e7eb;border-radius:8px;
  background:#fff;color:#6b7280
}
body[data-console-screen="s3"] #badge-detail-panel .source-wizard-close:hover{
  border-color:#d1d5db;background:#f9fafb
}
body[data-console-screen="s3"] #badge-detail-panel .source-wizard-close svg{display:none}
body[data-console-screen="s3"] #badge-detail-panel .source-wizard-close::before{
  content:"";width:13px;height:13px;background:
    linear-gradient(45deg,transparent 46%,currentColor 47% 53%,transparent 54%),
    linear-gradient(-45deg,transparent 46%,currentColor 47% 53%,transparent 54%)
}
body[data-console-screen="s3"] #badge-detail-panel .console-right-panel__body{
  padding:22px 28px 28px;background:#fff
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:#fff
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-cell{
  min-width:0;padding:12px 14px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-cell>.eyebrow{
  margin:0 0 5px;color:#6b7280;font-family:inherit;font-size:11px;font-weight:650;
  line-height:1.3;letter-spacing:0;text-transform:none
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-value{
  color:#111827;font-size:12.5px;line-height:1.5;overflow-wrap:anywhere
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-value .btn{
  margin:6px 0 0;min-height:30px;padding:4px 9px;border-color:#e5e7eb;border-radius:8px;
  background:#fff;font-size:11.5px
}
body[data-console-screen="s3"] #badge-detail-panel .badge-detail-form{grid-column:1/-1}
@media(max-width:560px){
  body[data-console-screen="s3"] #badge-detail-panel .badge-detail-drawer{width:100vw}
  body[data-console-screen="s3"] #badge-detail-panel .badge-detail-drawer>.source-wizard-head{padding:18px 16px 12px}
  body[data-console-screen="s3"] #badge-detail-panel .console-right-panel__body{padding:16px}
  body[data-console-screen="s3"] #badge-detail-panel .badge-detail-grid{grid-template-columns:1fr}
}
/* The shared typography token keeps this prototype aligned with every other
   platform surface. */
.sm-stats,.sm-card{font-family:var(--font-sans)}
/* The prototype sets no line-height on these containers, so every line box in
   it is `normal`; the console inherits ~1.55 from the page, which is what made
   the tile 0.6px taller than the design. Restated only on the parts ported
   from the prototype — the create card below keeps the console's rhythm. */
.sm-stats,.sm-card-head,.sm-filterbar,.sm-thead,.sm-tbody,.sm-tfoot,.sm-empty{line-height:normal}

/* Summary tiles — prototype `smStats`. Tier-2 card wrapping a tier-3 inset;
   value and unit share one baseline. */
.sm-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.sm-tile{display:flex;min-width:0;flex-direction:column;gap:14px;padding:18px;
  border:1px solid #eef0f3;border-radius:14px;background:#fff;
  box-shadow:0 1px 2px rgb(16 24 40/5%),0 4px 12px rgb(16 24 40/5%)}
.sm-tile-head{display:flex;align-items:center;gap:9px}
.sm-tile-icon{display:flex;width:28px;height:28px;flex-shrink:0;align-items:center;justify-content:center;
  border-radius:8px;background:#f3f4f6;color:#6b7280}
.sm-tile-icon svg{width:14px;height:14px}
.sm-tile-k{color:#374151;font-size:12.5px;font-weight:600}
.sm-tile-shell{display:flex;align-items:baseline;gap:6px;padding:12px 14px;
  border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)}
.sm-tile-v{color:#111827;font-size:26px;font-weight:650;line-height:1;letter-spacing:-.02em;
  font-variant-numeric:tabular-nums}
.sm-tile-u{color:#6b7280;font-size:11.5px}

/* Card shell — prototype's table card. */
.sm-card{padding:20px 20px 16px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;
  box-shadow:0 1px 2px rgb(16 24 40/4%)}
.sm-card-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;
  padding:0 4px 14px}
.sm-card-title{display:flex;align-items:center;gap:6px;margin:0;color:#111827;font-size:15px;font-weight:600;
  letter-spacing:-.01em}
.sm-card-title .heading-info{width:15px;height:15px;color:#d1d5db}
.sm-card-title .heading-info:hover,.sm-card-title .heading-info:focus-visible{color:#9ca3af}
.sm-search{box-sizing:border-box;display:flex;width:260px;align-items:center;gap:8px;padding:7px 10px;
  border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.sm-search>svg{width:13px;height:13px;flex-shrink:0}
/* Padding is the UA default (1px 2px), not 0: the prototype declares none, so
   the field is 2px taller than a reset input and the card head follows it. */
.sm-search input{min-width:0;flex:1;padding:1px 2px;border:none;outline:none;background:transparent;
  color:#111827;font-family:inherit;font-size:12.5px;line-height:normal}
.sm-search input::placeholder{color:#9ca3af}

/* Filter bar — the prototype's shared FilterBar chrome, carrying this
   screen's one filter instead of its multi-field chip set. */
.sm-filterslot{padding:0 4px 12px}
.sm-filterbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 10px;
  border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)}
.sm-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border:1px solid #e5e7eb;
  border-radius:999px;background:#fff;color:#374151;font-family:inherit;font-size:11.5px;font-weight:600;
  cursor:pointer}
.sm-chip:hover{background:#f9fafb}
.sm-chip.is-on{border-color:#d5e3da;background:#eaf1ec;color:#0f3d2e}
.sm-chip.is-on:hover{background:#dfeae3}
.sm-chip.is-on .sm-chip-f{color:#5d9b7c}
.sm-chip-v{color:#9ca3af;font-weight:500;font-variant-numeric:tabular-nums}
.sm-chip.is-on .sm-chip-v{color:#0f3d2e}
.sm-chip:focus-visible{outline:none;box-shadow:0 0 0 3px rgb(15 61 46/12%)}
.sm-filterbar-tail{display:flex;flex-shrink:0;align-items:center;gap:4px;margin-left:auto}
.sm-result{margin-right:4px;color:#6b7280;font-size:11.5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.sm-clear{padding:5px 10px;border:none;border-radius:8px;background:transparent;color:#6b7280;
  font-family:inherit;font-size:11.5px;font-weight:600;cursor:pointer}
.sm-clear:hover{background:#f3f4f6;color:#111827}
.sm-clear:focus-visible{outline:none;box-shadow:0 0 0 3px rgb(15 61 46/12%)}

/* The create form: name, team, recipient, access, level, expiry — three columns
   and two calm rows on desktop, two columns on tablets, one on phones. The
   equal tracks keep long role labels from growing one select beyond its peers. */
.sm-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:var(--s3);align-items:end}
.sm-form .field{min-width:0}
.sm-form :is(.input,.select){height:42px;min-height:42px}
.sm-form .select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Table — grid, ONE track list shared by the head and every row (§07: the
   track list is the contract; a single rule keeps them aligned by
   construction). The actions track is a FIXED width, not `auto`: a
   content-sized track resolves to 0 in the (empty) header and ~120px on a row
   carrying Rotate + Revoke, and the `fr` name column silently absorbs the
   difference. The compact pair fits a 128px track. At narrow widths the grid sheds columns (see the media queries
   at the end of this block) instead of pushing Rotate/Revoke off-canvas
   behind an unsignposted horizontal scroll; the full record stays one
   chevron away in the badge detail panel. */
.sm-scroll{overflow-x:auto}
.sm-table{min-width:1020px}
.sm-thead,.sm-row{grid-template-columns:minmax(160px,2.2fr) 120px 118px 104px 96px 108px 128px 30px}
/* The transparent side border matches the 1px a row carries, so the two grids
   resolve their `fr` track identically and the heads sit over their columns. */
.sm-thead{display:grid;align-items:center;gap:10px;padding:0 12px 8px;
  border:0 solid transparent;border-inline-width:1px}
/* The column heads keep `.eyebrow` (they are column heads), but the prototype
   draws them sentence-case in the body face rather than the mono caps the
   shared eyebrow uses. */
.sm-thead .eyebrow{color:#9ca3af;font-family:inherit;font-size:10.5px;font-weight:650;
  letter-spacing:.06em;text-transform:none}
.sm-tbody{display:flex;flex-direction:column;gap:8px}
.sm-row{display:grid;align-items:center;gap:10px;padding:9px 12px;border:1px solid #f3f4f6;
  border-radius:12px;background:#fafafa;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)}
.sm-row:hover{background:#f5f6f7}
.sm-row.is-selected{border-color:#d5e3da;background:#eaf1ec}
.sm-row--revoked{opacity:.65}
.sm-row>*{min-width:0}
.sm-cell-subject{min-width:0}
.sm-cell-name{overflow:hidden;color:#111827;font-size:13px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.sm-cell-meta{overflow:hidden;color:#9ca3af;font-size:11px;text-overflow:ellipsis;white-space:nowrap;
  font-variant-numeric:tabular-nums}
.sm-row>.subtle{overflow:hidden;color:#374151;font-size:12px;font-weight:500;text-overflow:ellipsis;
  white-space:nowrap;font-variant-numeric:tabular-nums}
.sm-cell-dim{overflow:hidden;color:#6b7280;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.sm-cell-acts{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.sm-cell-acts .btn{min-height:30px;padding:4px 9px;font-size:11.5px}
.sm-row .pill{padding:2px 9px;border-radius:999px;font-size:11px;font-weight:650;white-space:nowrap;
  justify-self:start}
.sm-tfoot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;
  padding:14px 12px 0;border-top:1px solid #f3f4f6;color:#6b7280;font-size:12px;
  font-variant-numeric:tabular-nums}

/* Empty state — prototype's: a sentence and a reset, no icon tile. */
.sm-empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:36px 20px;text-align:center}
.sm-empty b{color:#111827;font-size:13.5px;font-weight:650}
.sm-empty-reset{padding:7px 14px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;color:#374151;
  font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer}
.sm-empty-reset:hover{background:#f9fafb}

/* Ledger columns shed lowest-value-first as width runs out. Each query keeps
   BOTH grids (head + rows) on the same track list, and the hide rules
   accumulate down the cascade. Child order is fixed by the renderer:
   1 badge · 2 team · 3 access · 4 status · 5 last-seen · 6 expires
   · 7 actions · 8 chevron. */
@media(max-width:1180px){
  .sm-table{min-width:0}
  .sm-thead>:nth-child(5),.sm-row>:nth-child(5){display:none}
  .sm-thead,.sm-row{grid-template-columns:minmax(160px,2.2fr) 104px 104px 104px 108px 128px 30px}
}
@media(max-width:1024px){
  .sm-card-head{align-items:stretch;flex-direction:column}
  .sm-search{width:auto}
  .sm-form{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sm-thead>:nth-child(6),.sm-row>:nth-child(6){display:none}
  .sm-thead,.sm-row{grid-template-columns:minmax(160px,2.2fr) 104px 104px 104px 128px 30px}
}
@media(max-width:900px){
  .sm-thead>:nth-child(3),.sm-row>:nth-child(3){display:none}
  .sm-thead,.sm-row{grid-template-columns:minmax(160px,2.2fr) 104px 104px 128px 30px}
}
/* One-column tiles only once three-across genuinely stops fitting — at
   1024px each tile was 769px wide holding a single digit. */
@media(max-width:720px){
  .sm-stats{grid-template-columns:1fr}
  .sm-thead>:nth-child(2),.sm-row>:nth-child(2){display:none}
  .sm-thead,.sm-row{grid-template-columns:minmax(140px,1fr) 104px 128px 30px}
}
@media(max-width:560px){
  .sm-form{grid-template-columns:1fr}
  .sm-thead>:nth-child(4),.sm-row>:nth-child(4){display:none}
  .sm-thead,.sm-row{grid-template-columns:minmax(110px,1fr) 128px 30px}
}

/* S15 Usage Analytics — 2026-08 neutral dashboard --------------------------
   This screen follows the supplied Usage Analytics v2 prototype rather than
   the shared workspace's mineral/sage surfaces. The rail and active controls
   keep Halofy's evergreen; cards, metric shells, tables, rows, and the trace
   drawer use the prototype's white/gray surface ladder. Scope every override
   to S15 so no shared primitive or neighbouring screen is repainted. */
body[data-console-screen="s15"] #screen-content{
  gap:20px;color:#111827;font-family:var(--font-sans)
}
body[data-console-screen="s15"] #screen-content>.head h1 .heading-info{
  vertical-align:middle;color:#d1d5db
}
body[data-console-screen="s15"] #screen-content>.head .filter-strip{
  display:flex;gap:2px;padding:3px;border-radius:10px;background:#f3f4f6
}
body[data-console-screen="s15"] #screen-content>.head .filter-strip>.btn{
  min-height:0;padding:6px 14px;border:0;border-radius:8px;background:transparent;
  color:#6b7280;box-shadow:none;font-family:inherit;font-size:13px;font-weight:600;
  line-height:1.35
}
body[data-console-screen="s15"] #screen-content>.head .filter-strip>.btn:hover{
  border:0;background:#e9eaec;color:#374151
}
body[data-console-screen="s15"] #screen-content>.head .filter-strip>.btn--primary{
  background:#fff;color:#111827;box-shadow:0 1px 2px rgb(16 24 40/8%)
}

/* Three named metric bands inside one bordered instrument panel. */
body[data-console-screen="s15"] #screen-content .usage-stat-block{
  display:grid;gap:0;overflow:visible;border:1px solid #e5e7eb;border-radius:14px;
  background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)
}
/* The panel used to clip itself to its own radius with overflow:hidden. That
   clip is inherited by absolutely positioned descendants, so the band info
   tooltip - which opens up and out of the 116px label column - was amputated
   at the panel's left and top edges: the first band's tip lost its opening
   words. Round the four outer children instead, so the shell still reads as
   one rounded instrument panel and the tooltip can leave it. */
body[data-console-screen="s15"] #screen-content .usage-stat-section:first-child>:first-child{
  border-top-left-radius:13px
}
body[data-console-screen="s15"] #screen-content .usage-stat-section:first-child>:last-child{
  border-top-right-radius:13px
}
body[data-console-screen="s15"] #screen-content .usage-stat-section:last-child>:first-child{
  border-bottom-left-radius:13px
}
body[data-console-screen="s15"] #screen-content .usage-stat-section:last-child>:last-child{
  border-bottom-right-radius:13px
}
body[data-console-screen="s15"] #screen-content .usage-stat-section{
  display:grid;grid-template-columns:116px minmax(0,1fr);gap:0;align-items:stretch
}
body[data-console-screen="s15"] #screen-content .usage-stat-section+.usage-stat-section{
  border-top:1px solid #f3f4f6
}
body[data-console-screen="s15"] #screen-content .usage-stat-section-head{
  display:flex;align-items:center;padding:14px;border-right:1px solid #f3f4f6;background:#fafafa
}
body[data-console-screen="s15"] #screen-content .usage-stat-section-head h3{
  display:flex;align-items:center;gap:6px;color:#374151;font-size:12px;font-weight:650;
  line-height:1.3;letter-spacing:-.01em
}
body[data-console-screen="s15"] #screen-content .usage-stat-section-head h3 .heading-info{
  width:12px;height:12px;color:#d1d5db
}
/* The shared tooltip centres itself on its icon. That icon sits ~75px from the
   left edge of the content column, so a 280px tip centred on it hangs ~140px
   into the navigation rail. Anchor these three to the icon's left edge so they
   open rightward over their own tiles instead. The arrow keeps its left:50%
   and still points at the icon. Desktop only: under 640px the shared rule
   turns the tip into a fixed bottom sheet, which must keep winning. */
@media(min-width:641px){
  body[data-console-screen="s15"] #screen-content .usage-stat-section-head h3 .heading-info::after{
    left:auto;right:auto;margin-left:-14px;transform:translate(0,4px)
  }
  body[data-console-screen="s15"] #screen-content .usage-stat-section-head h3 .heading-info:hover::after,
  body[data-console-screen="s15"] #screen-content .usage-stat-section-head h3 .heading-info:focus-visible::after{
    transform:translate(0,0)
  }
}
body[data-console-screen="s15"] #screen-content .usage-stat-section>.grid{
  gap:10px;padding:11px 14px;background:#fff
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card{
  min-height:60px;gap:4px;padding:10px 12px;border:1px solid #eef0f3;border-radius:12px;
  background:#fff;box-shadow:0 1px 2px rgb(16 24 40/5%),0 4px 12px rgb(16 24 40/5%)
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-head{
  min-height:14px;align-items:flex-start;gap:5px
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-icon,
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-cap{display:none}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-label{
  flex:0 1 auto
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card .k{
  color:#6b7280;font-family:inherit;font-size:11px;font-weight:600;line-height:1.3;
  letter-spacing:0;text-transform:none
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-info{
  width:12px;height:12px;flex:none;color:#d1d5db
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-info svg{
  width:12px;height:12px
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-shell{
  min-height:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none
}
body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-shell .v{
  display:block;margin:0;color:#111827;font-size:clamp(15px,1.35vw,19px);font-weight:650;
  line-height:1.1;letter-spacing:-.02em;overflow-wrap:anywhere
}

/* Narrative cards, table slots, and controls. */
body[data-console-screen="s15"] #screen-content .card{
  min-width:0;padding:20px 20px 16px;border:1px solid #e5e7eb;border-radius:14px;
  background:#fff;box-shadow:0 1px 2px rgb(16 24 40/4%)
}
body[data-console-screen="s15"] #screen-content .usage-groups-head,
body[data-console-screen="s15"] #screen-content .usage-ledger-head{
  min-height:32px;margin:0;padding:0 4px 12px;align-items:center
}
body[data-console-screen="s15"] #screen-content .usage-groups-head h3,
body[data-console-screen="s15"] #screen-content .usage-ledger-head h3{
  display:flex;align-items:center;gap:7px;margin:0;color:#111827;font-size:15px;
  font-weight:600;line-height:1.35;letter-spacing:-.01em
}
body[data-console-screen="s15"] #screen-content .usage-groups-head h3 .heading-info,
body[data-console-screen="s15"] #screen-content .usage-ledger-head h3 .heading-info{
  width:13px;height:13px;margin:0;color:#d1d5db
}
body[data-console-screen="s15"] #screen-content .usage-groups-tabs{
  justify-content:flex-end;gap:6px;margin:0 0 0 auto
}
body[data-console-screen="s15"] #screen-content .usage-groups-tabs>.btn{
  min-height:0;padding:5px 13px;border:1px solid #e5e7eb;border-radius:999px;
  background:#fff;color:#374151;box-shadow:none;font-family:inherit;font-size:12px;
  font-weight:600;line-height:1.35
}
body[data-console-screen="s15"] #screen-content .usage-groups-tabs>.btn:hover{
  border-color:#d1d5db;background:#f9fafb;color:#111827
}
body[data-console-screen="s15"] #screen-content .usage-groups-tabs>.btn--primary{
  border-color:#0f3d2e;background:#0f3d2e;color:#fff
}
body[data-console-screen="s15"] #screen-content .data-grid-shell{
  border:0;border-radius:0;background:#fff;box-shadow:none
}
body[data-console-screen="s15"] #screen-content table.data-grid th{
  color:#9ca3af;background:transparent;border:0;font-family:inherit;font-size:10.5px;
  font-weight:650;letter-spacing:.06em;text-transform:none
}
body[data-console-screen="s15"] #screen-content table.data-grid td{
  color:#374151;background:#fff;border-color:#f3f4f6;font-size:12px
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid{
  min-width:760px;border-collapse:separate;border-spacing:0 8px;background:#fff
}
body[data-console-screen="s15"] #screen-content .usage-groups-card .data-grid-shell{
  margin-block:4px -8px;background:#fff
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid thead,
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid thead tr{
  background:#fff
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid th{
  padding:0 12px 8px;background:transparent
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid td{
  padding:9px 12px;background:#fafafa;border-top:1px solid #f3f4f6;
  border-bottom:1px solid #f3f4f6
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid td:first-child{
  color:#111827;font-size:13px;font-weight:600;border-left:1px solid #f3f4f6
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid td:nth-child(2){
  color:#111827;font-size:12.5px;font-weight:650
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid td:last-child{
  border-right:1px solid #f3f4f6
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid tbody tr{
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s15"] #screen-content .usage-groups-card table.data-grid tbody tr:hover td{
  background:#f5f6f7
}
body[data-console-screen="s15"] #screen-content .usage-spark{color:#0f3d2e}

body[data-console-screen="s15"] #screen-content .usage-filter-trigger{
  width:32px;height:32px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;color:#4b5563
}
body[data-console-screen="s15"] #screen-content .usage-filter-trigger:hover{
  border-color:#d1d5db;background:#f9fafb;color:#374151
}
body[data-console-screen="s15"] #screen-content .usage-qtable{gap:8px}
body[data-console-screen="s15"] #screen-content .usage-qrow{
  gap:10px;padding:9px 12px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  color:#111827;font-size:12px;box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s15"] #screen-content .usage-qrow:hover{background:#f5f6f7}
body[data-console-screen="s15"] #screen-content .usage-qrow--head{
  padding:0 12px 0;border:0;border-radius:0;background:transparent;box-shadow:none
}
body[data-console-screen="s15"] #screen-content .usage-qrow--head:hover{background:transparent}
body[data-console-screen="s15"] #screen-content .usage-qrow--head .eyebrow{
  color:#9ca3af;font-family:inherit;font-size:10.5px;font-weight:650;letter-spacing:.06em;
  text-transform:none
}
body[data-console-screen="s15"] #screen-content .usage-qspace{color:#374151}
body[data-console-screen="s15"] #screen-content .usage-caller-name{color:#111827;font-weight:600}
body[data-console-screen="s15"] #screen-content .usage-summary{color:#111827}
body[data-console-screen="s15"] #screen-content .usage-expand{
  width:26px;height:26px;border-color:#e5e7eb;border-radius:8px;background:#fff;color:#6b7280
}
body[data-console-screen="s15"] #screen-content .usage-expand:hover{
  border-color:#d1d5db;background:#f9fafb;color:#374151
}
body[data-console-screen="s15"] #screen-content .pill,
body[data-console-screen="s15"] #screen-content .usage-active-filter{
  font-family:inherit;letter-spacing:0;text-transform:none
}
body[data-console-screen="s15"] #screen-content .pill .dot{display:none}
body[data-console-screen="s15"] #screen-content .usage-filter-pop{
  border-color:#e5e7eb;background:#fff;box-shadow:0 8px 24px rgb(16 24 40/12%)
}
body[data-console-screen="s15"] #screen-content .usage-filter-option:hover{background:#f3f4f6}
body[data-console-screen="s15"] #screen-content .usage-active-filter{
  border-color:#e5e7eb;background:#f3f4f6;color:#374151
}

/* Query trace drawer: dynamic trace heading, persistent stat captions, and a
   plain event ledger matching the supplied 760px side panel. */
body[data-console-screen="s15"] #usage-trace-panel .source-wizard-backdrop{
  background:rgb(17 24 39/40%);backdrop-filter:none
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-drawer{
  width:min(760px,96vw);border-left:0;background:#fff;color:#111827;
  box-shadow:-12px 0 40px rgb(16 24 40/16%)
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-drawer>.source-wizard-head{
  padding:22px 28px 14px;border-bottom:1px solid #f3f4f6;background:#fff
}
body[data-console-screen="s15"] #usage-trace-panel .console-right-panel__context{
  min-height:0;color:#9ca3af
}
body[data-console-screen="s15"] #usage-trace-panel .console-right-panel__context .eyebrow{
  color:#9ca3af;font-family:var(--font-mono);font-size:11px;font-weight:600;
  letter-spacing:.04em;text-transform:none
}
body[data-console-screen="s15"] #usage-trace-panel .source-wizard-head h3{
  display:grid;gap:0;min-width:0;margin-top:3px;color:#111827;font-size:18px;font-weight:650;
  line-height:1.25;letter-spacing:-.01em
}
body[data-console-screen="s15"] #usage-trace-panel [data-usage-trace-title]{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s15"] #usage-trace-panel [data-usage-trace-facts]{
  display:block;margin-top:4px;overflow:hidden;color:#6b7280;font-size:12px;font-weight:400;
  line-height:1.45;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s15"] #usage-trace-panel .source-wizard-close{
  width:30px;height:30px;min-height:30px;padding:0;border:1px solid #e5e7eb;border-radius:8px;
  background:#fff;color:#6b7280
}
body[data-console-screen="s15"] #usage-trace-panel .source-wizard-close:hover{
  border-color:#d1d5db;background:#f9fafb
}
body[data-console-screen="s15"] #usage-trace-panel .source-wizard-close svg{display:none}
body[data-console-screen="s15"] #usage-trace-panel .source-wizard-close::before{
  content:"";width:13px;height:13px;background:
    linear-gradient(45deg,transparent 46%,currentColor 47% 53%,transparent 54%),
    linear-gradient(-45deg,transparent 46%,currentColor 47% 53%,transparent 54%)
}
body[data-console-screen="s15"] #usage-trace-panel .console-right-panel__body{
  padding:22px 28px 28px;background:#fff
}
body[data-console-screen="s15"] #usage-trace-panel [data-usage-trace-body]{
  display:flex;flex-direction:column;gap:18px
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-stats{
  grid-template-columns:repeat(4,minmax(0,1fr));gap:10px
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-stat{
  min-width:0;padding:12px 14px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-stat .k{
  color:#6b7280;font-family:inherit;font-size:11px;font-weight:650;line-height:1.3;
  letter-spacing:0;text-transform:none
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-stat .v{
  display:block;margin-top:5px;color:#111827;font-size:19px;font-weight:650;line-height:1;
  letter-spacing:-.02em
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-stat-foot{
  margin-top:5px;color:#9ca3af;font-size:11px;line-height:1.3
}
body[data-console-screen="s15"] #usage-trace-panel .usage-qsources{
  gap:8px;margin:0
}
body[data-console-screen="s15"] #usage-trace-panel .usage-qsources>.eyebrow{
  color:#9ca3af;font-family:inherit;font-size:10.5px;font-weight:650;letter-spacing:.06em;
  text-transform:uppercase
}
body[data-console-screen="s15"] #usage-trace-panel .pill{
  padding:2px 9px;border-color:#e5e7eb;border-radius:999px;background:#f3f4f6;color:#374151;
  font-family:inherit;font-size:10.5px;font-weight:650;line-height:1.3;letter-spacing:0;
  text-transform:none
}
body[data-console-screen="s15"] #usage-trace-panel .pill .dot{display:none}
body[data-console-screen="s15"] #usage-trace-panel .pill--ok,
body[data-console-screen="s15"] #usage-trace-panel .pill--live{
  border-color:#d1fadf;background:#ecfdf3;color:#067647
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-outcome{
  gap:8px;font-size:11.5px
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-outcome+.sub{
  margin:-12px 0 0;color:#6b7280;font-size:12px;line-height:1.5
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-events{
  display:flex;flex-direction:column;gap:2px;min-width:0
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-events h4{
  margin:0;padding-bottom:8px;color:#111827;font-size:13px;font-weight:650;letter-spacing:0
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-events .data-grid-shell{
  overflow-x:auto;border:0;border-radius:0;background:#fff;box-shadow:none
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid{
  display:block;width:100%;min-width:650px;border-collapse:collapse;background:#fff
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid thead,
body[data-console-screen="s15"] #usage-trace-panel table.data-grid tbody{
  display:block;margin:0
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid tr{
  display:grid;grid-template-columns:66px minmax(0,1fr) 64px 110px 66px 60px 66px;
  gap:8px;align-items:center
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid thead tr{
  padding:0 2px 7px
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid tbody tr{
  padding:8px 2px;border-top:1px solid #f3f4f6
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid th{
  display:block;padding:0;border:0;background:#fff;color:#9ca3af;font-family:inherit;
  font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid td{
  display:block;min-width:0;padding:0;border:0;background:#fff;color:#374151;
  font-size:12px
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid tbody tr:hover td{background:#fff}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid td:first-child{
  color:#111827;font-weight:600
}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid td:nth-child(2){
  overflow:hidden;font-family:var(--font-mono);font-size:11.5px;text-overflow:ellipsis;
  white-space:nowrap
}
body[data-console-screen="s15"] #usage-trace-panel .usage-event-result{
  font-size:11.5px;font-weight:600
}
body[data-console-screen="s15"] #usage-trace-panel .usage-event-result--hit{color:#067647}
body[data-console-screen="s15"] #usage-trace-panel .usage-event-result--miss{color:#b54708}
body[data-console-screen="s15"] #usage-trace-panel .usage-event-result--neutral{color:#9ca3af}
body[data-console-screen="s15"] #usage-trace-panel table.data-grid td .pill{
  white-space:nowrap
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-verdict{
  padding-top:14px;border-top:1px solid #f3f4f6
}
body[data-console-screen="s15"] #usage-trace-panel .usage-trace-verdict .btn{
  min-height:30px;padding:5px 10px;border-color:#e5e7eb;border-radius:8px;background:#fff;
  color:#374151;font-family:inherit;font-size:11.5px;box-shadow:none
}

@media(max-width:900px){
  body[data-console-screen="s15"] #screen-content .usage-stat-section{grid-template-columns:1fr}
  body[data-console-screen="s15"] #screen-content .usage-stat-section-head{
    border-right:0;border-bottom:1px solid #f3f4f6
  }
  /* Stacked: the head is a full-width top row and the tiles a full-width
     bottom row, so each outer child carries both corners on its own side. */
  body[data-console-screen="s15"] #screen-content .usage-stat-section:first-child>:first-child{
    border-radius:13px 13px 0 0
  }
  body[data-console-screen="s15"] #screen-content .usage-stat-section:first-child>:last-child{
    border-radius:0
  }
  body[data-console-screen="s15"] #screen-content .usage-stat-section:last-child>:first-child{
    border-radius:0
  }
  body[data-console-screen="s15"] #screen-content .usage-stat-section:last-child>:last-child{
    border-radius:0 0 13px 13px
  }
  body[data-console-screen="s15"] #screen-content .usage-stat-section>.g4,
  body[data-console-screen="s15"] #screen-content .usage-stat-section>.g3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  body[data-console-screen="s15"] #screen-content .usage-groups-head{
    align-items:flex-start;flex-direction:column
  }
  body[data-console-screen="s15"] #screen-content .usage-groups-tabs{justify-content:flex-start;margin-left:0}
  body[data-console-screen="s15"] #usage-trace-panel .usage-trace-drawer>.source-wizard-head{
    padding:18px 16px 14px
  }
  body[data-console-screen="s15"] #usage-trace-panel .console-right-panel__body{padding:18px 16px 24px}
  body[data-console-screen="s15"] #usage-trace-panel .usage-trace-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  body[data-console-screen="s15"] #screen-content>.head .filter-strip{width:100%;overflow-x:auto}
  body[data-console-screen="s15"] #screen-content>.head .filter-strip>.btn{flex:1}
  body[data-console-screen="s15"] #screen-content .usage-stat-section>.g4,
  body[data-console-screen="s15"] #screen-content .usage-stat-section>.g3,
  body[data-console-screen="s15"] #screen-content .usage-stat-section>.g2{grid-template-columns:1fr}
}

/* Knowledge-base and file drawers (S6). Match the neutral hierarchy used by
   Usage analytics: one white shell, a compact header, boxed summary values,
   quiet section rules, and a separate action rail. */
body[data-console-screen="s6"] #connector-wizard .source-wizard-backdrop{
  background:rgb(17 24 39/40%);backdrop-filter:none
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog){
  display:flex;flex-direction:column;width:min(760px,96vw);padding:0;overflow:hidden;
  border-left:0;background:#fff;color:#111827;box-shadow:-12px 0 40px rgb(16 24 40/16%)
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog)>.source-wizard-head{
  flex:none;margin:0;padding:22px 28px 14px;border-bottom:1px solid #f3f4f6;background:#fff
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog)>.source-wizard-head>div:first-child{
  min-width:0
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog) .source-category{
  color:#9ca3af;font-family:var(--font-mono);font-size:11px;font-weight:600;
  letter-spacing:.04em;text-transform:none
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog) .source-wizard-head h3{
  display:block;max-width:520px;margin-top:3px;overflow:hidden;color:#111827;font-size:18px;
  font-weight:650;line-height:1.25;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog) .source-wizard-head p{
  max-width:520px;margin-top:4px;overflow:hidden;color:#6b7280;font-size:12px;line-height:1.45;
  text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog) .source-wizard-close{
  width:30px;height:30px;min-height:30px;padding:0;border:1px solid #e5e7eb;border-radius:8px;
  background:#fff;color:#6b7280
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog) .source-wizard-close:hover{
  border-color:#d1d5db;background:#f9fafb
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog) .source-wizard-close span{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap
}
/* Ingestion ribbon. Rides the very top of every dialog opened on a knowledge
   base - detail, add files, live progress - above the header, while anything in
   THIS base is still parsing, extracting or embedding. Scoped to one base's
   dialogs on purpose, never a platform-wide banner. Slot collapses when idle. */
body[data-console-screen="s6"] #connector-wizard [data-kb-ingest-ribbon]:empty{display:none}
/* Its own evergreen ramp, NOT the shared --metal token: that one is shell
   chrome and the minimal-UI contract holds it to a single use. Same metallic
   read, green rather than near-black, so the ribbon stays in-page furniture.
   Literal hexes
   (#123a2e is --evergreen) because this whole region speaks the Usage
   analytics language, which the command-palette contract keeps token-free. */
body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon{
  position:relative;display:flex;flex:none;align-items:center;gap:9px;
  padding:9px 28px;overflow:hidden;background-color:#123a2e;
  background-image:
    radial-gradient(circle at 18% 10%,rgb(243 246 238/16%),transparent 26%),
    radial-gradient(circle at 84% 90%,rgb(199 215 178/14%),transparent 32%),
    linear-gradient(150deg,#0e2f25 0%,#123a2e 34%,#1d4f3f 62%,#123a2e 100%);
  color:#fff;font-size:12px;font-weight:600;letter-spacing:.01em;line-height:1.3;
  box-shadow:inset 0 -1px 0 rgb(255 255 255/10%)
}
body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon::after{
  content:"";position:absolute;inset:0;pointer-events:none;transform:translateX(-100%);
  background:linear-gradient(100deg,transparent 32%,rgb(255 255 255/16%) 50%,transparent 68%);
  animation:kb-ingest-sheen 2.6s var(--ease) infinite
}
body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon-icon{
  display:inline-flex;flex:none;align-items:center;justify-content:center;width:14px;height:14px
}
body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon-icon svg{
  width:14px;height:14px;animation:kb-ingest-spin 1.1s linear infinite
}
body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon-text{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
@keyframes kb-ingest-sheen{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}
@keyframes kb-ingest-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){
  body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon::after,
  body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon-icon svg{animation:none}
}
body[data-console-screen="s6"] #connector-wizard .source-wizard-back{
  width:auto;max-width:none;min-height:30px;padding:5px 10px;border-color:#e5e7eb;border-radius:8px;
  background:#fff;color:#374151;font-family:inherit;font-size:11.5px;box-shadow:none
}
body[data-console-screen="s6"] #connector-wizard .source-wizard-back span{overflow:visible;text-overflow:clip}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-body,.source-file-detail-body){
  min-height:0;overflow:auto;padding:22px 28px 28px;background:#fff
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-body,.source-file-detail-body){
  display:flex;flex-direction:column;gap:18px
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-stats,.source-file-stats){
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-stat,.source-file-stat){
  display:flex;min-width:0;min-height:92px;flex-direction:column;align-items:flex-start;
  padding:12px 14px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-stat,.source-file-stat) .k{
  color:#6b7280;font-family:inherit;font-size:11px;font-weight:650;line-height:1.3;
  letter-spacing:0;text-transform:none
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-stat,.source-file-stat) .v{
  display:block;max-width:100%;margin-top:6px;overflow:hidden;color:#111827;font-size:18px;
  font-weight:650;line-height:1.1;letter-spacing:-.02em;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-stat-foot,.source-file-stat-foot){
  display:block;margin-top:auto;padding-top:6px;color:#9ca3af;font-size:10.5px;line-height:1.3
}
body[data-console-screen="s6"] #connector-wizard .source-file-stat>.pill{
  margin-top:7px;padding:2px 8px;border-radius:999px;font-family:inherit;font-size:10.5px;
  font-weight:650;letter-spacing:0;text-transform:none
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-section,.source-file-section){
  display:flex;min-width:0;flex-direction:column;gap:10px;padding-top:16px;border-top:1px solid #f3f4f6
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-section,.source-file-section)>h4,
body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head h4{
  margin:0;color:#111827;font-size:13px;font-weight:650;letter-spacing:0
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-meta{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-meta>div,
body[data-console-screen="s6"] #connector-wizard .source-file-meta>div{
  display:grid;grid-template-columns:1fr;gap:3px;align-content:start;min-width:0;padding:10px 12px;
  border:1px solid #f3f4f6;border-radius:10px;background:#fafafa
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-meta,.source-file-meta) dt{
  color:#9ca3af;font-family:inherit;font-size:10px;font-weight:650;letter-spacing:.05em;text-transform:uppercase
}
body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-meta,.source-file-meta) dd{
  min-width:0;margin:0;overflow-wrap:anywhere;color:#374151;font-size:12px;font-weight:600
}
body[data-console-screen="s6"] #connector-wizard .kb-processing-files{
  display:flex;width:100%;min-height:38px;align-items:center;justify-content:space-between;gap:10px;
  padding:7px 9px;border:1px solid #dbeafe;border-radius:8px;background:#fff;color:#1f2937;
  font:inherit;text-align:left;cursor:pointer;box-shadow:0 1px 2px rgb(16 24 40/4%)
}
body[data-console-screen="s6"] #connector-wizard .kb-processing-files:hover{
  border-color:#93c5fd;background:#f8fbff
}
body[data-console-screen="s6"] #connector-wizard .kb-processing-files:focus-visible{
  outline:none;box-shadow:var(--focus)
}
body[data-console-screen="s6"] #connector-wizard .kb-processing-files strong{
  color:#1d4ed8;font-size:13px;font-weight:700;white-space:nowrap
}
body[data-console-screen="s6"] #connector-wizard .kb-processing-files>span:last-child{
  overflow:hidden;color:#6b7280;font-size:10.5px;font-weight:550;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #connector-wizard .company-upload-progress-dialog .company-upload-files{
  margin-top:14px
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head{margin:0}
body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head>div:first-child p{
  margin:2px 0 0;color:#9ca3af;font-size:11.5px
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head .kb-file-search{
  width:190px;min-height:32px;padding:6px 10px;border-color:#e5e7eb;border-radius:8px;
  background:#fff;font-size:12px
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head .btn{
  min-height:32px;padding:6px 10px;border-color:#e5e7eb;border-radius:8px;background:#fff;
  color:#374151;font-family:inherit;font-size:11.5px;box-shadow:none
}
body[data-console-screen="s6"] #connector-wizard .kb-item-list{
  display:flex;gap:8px;margin:0;overflow:visible;flex-direction:column;border:0;background:#fff
}
body[data-console-screen="s6"] #connector-wizard .kb-item{
  border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s6"] #connector-wizard .kb-item--open:hover{background:#f5f6f7}
body[data-console-screen="s6"] #connector-wizard .kb-detail-actions{
  flex:none;min-height:66px;margin:0;padding:12px 28px;border-top:1px solid #f3f4f6;background:#fff
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-actions .btn{
  min-height:32px;padding:6px 11px;border-radius:8px;font-family:inherit;font-size:11.5px;box-shadow:none
}
body[data-console-screen="s6"] #connector-wizard .kb-detail-actions .btn--solid{
  border-color:#0f3d2e;background:#0f3d2e;color:#fff
}
body[data-console-screen="s6"] #connector-wizard .source-file-alert{
  display:grid;gap:3px;padding:11px 13px;border:1px solid #fda29b;border-radius:10px;background:#fef3f2;color:#b42318
}
body[data-console-screen="s6"] #connector-wizard .source-file-alert strong{font-size:12px}
body[data-console-screen="s6"] #connector-wizard .source-file-alert span{font-size:11.5px}
body[data-console-screen="s6"] #connector-wizard .source-file-meta{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;border:0
}
body[data-console-screen="s6"] #connector-wizard .source-file-meta>div:nth-child(odd),
body[data-console-screen="s6"] #connector-wizard .source-file-meta>div:nth-child(even){
  padding:10px 12px;border:1px solid #f3f4f6
}
body[data-console-screen="s6"] #connector-wizard .source-file-detail-copy{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0;border:0
}
body[data-console-screen="s6"] #connector-wizard .source-file-detail-copy>div{
  min-width:0;padding:12px 14px;border:1px solid #f3f4f6;border-radius:10px;background:#fafafa
}
body[data-console-screen="s6"] #connector-wizard .source-file-detail-copy span{
  color:#9ca3af;font-family:inherit;font-size:10px;font-weight:650;letter-spacing:.05em;text-transform:uppercase
}
body[data-console-screen="s6"] #connector-wizard .source-file-detail-copy p{
  margin:5px 0 0;color:#374151;font-size:12px;line-height:1.5
}
body[data-console-screen="s6"] #connector-wizard .source-file-replace{
  margin:0;padding:16px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;box-shadow:none
}
body[data-console-screen="s6"] #connector-wizard .source-file-replace h4{
  color:#111827;font-size:13px;font-weight:650
}
body[data-console-screen="s6"] #connector-wizard .source-file-replacement-control{
  display:flex;align-items:center
}
body[data-console-screen="s6"] #connector-wizard .source-file-replacement-button{
  width:auto;min-height:32px;padding:6px 11px;border-color:#d1d5db;border-radius:8px;
  background:#fff;color:#374151;font-family:inherit;font-size:11.5px;box-shadow:none
}
body[data-console-screen="s6"] #connector-wizard .source-file-replacement-input:focus-visible + .source-file-replacement-button{
  outline:2px solid var(--evergreen);outline-offset:2px
}
body[data-console-screen="s6"] #connector-wizard .source-file-remove{
  justify-content:flex-end;margin:0;padding-top:16px;border-top-color:#f3f4f6
}
@media(max-width:720px){
  body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog){width:100vw;max-width:100vw}
  body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-dialog,.source-file-detail-dialog)>.source-wizard-head{
    padding:18px 16px 14px
  }
  body[data-console-screen="s6"] #connector-wizard .kb-ingest-ribbon{padding:8px 16px}
  body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-body,.source-file-detail-body){padding:18px 16px 24px}
  body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-stats,.source-file-stats){grid-template-columns:repeat(2,minmax(0,1fr))}
  body[data-console-screen="s6"] #connector-wizard :is(.kb-detail-meta,.source-file-meta,.source-file-detail-copy){grid-template-columns:1fr}
  body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head{align-items:flex-start;flex-direction:column}
  body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head .row{width:100%}
  body[data-console-screen="s6"] #connector-wizard .kb-detail-items-head .kb-file-search{flex:1;width:auto}
  body[data-console-screen="s6"] #connector-wizard .kb-detail-actions{padding:12px 16px}
}

/* Connection drawer (S6). Same panel treatment as the S15 query-trace drawer —
   white surface, neutral heading, boxed stats, section rules — so opening a
   connection and opening a traced query feel like one surface. */
body[data-console-screen="s6"] #source-detail-panel .source-wizard-backdrop{
  background:rgb(17 24 39/40%);backdrop-filter:none
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-drawer{
  width:min(620px,96vw);border-left:0;background:#fff;color:#111827;
  box-shadow:-12px 0 40px rgb(16 24 40/16%)
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-drawer>.source-wizard-head{
  padding:22px 28px 14px;border-bottom:1px solid #f3f4f6;background:#fff
}
body[data-console-screen="s6"] #source-detail-panel .console-right-panel__context{
  min-height:0;color:#9ca3af
}
body[data-console-screen="s6"] #source-detail-panel .console-right-panel__context .eyebrow{
  color:#9ca3af;font-family:var(--font-mono);font-size:11px;font-weight:600;
  letter-spacing:.04em;text-transform:none
}
body[data-console-screen="s6"] #source-detail-panel .source-wizard-head h3{
  display:grid;gap:0;min-width:0;margin-top:3px;color:#111827;font-size:18px;font-weight:650;
  line-height:1.25;letter-spacing:-.01em
}
body[data-console-screen="s6"] #source-detail-panel [data-source-detail-title]{
  display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #source-detail-panel [data-source-detail-facts]{
  display:block;margin-top:4px;overflow:hidden;color:#6b7280;font-size:12px;font-weight:400;
  line-height:1.45;letter-spacing:0;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #source-detail-panel .source-wizard-close{
  width:30px;height:30px;min-height:30px;padding:0;border:1px solid #e5e7eb;border-radius:8px;
  background:#fff;color:#6b7280
}
body[data-console-screen="s6"] #source-detail-panel .source-wizard-close:hover{
  border-color:#d1d5db;background:#f9fafb
}
body[data-console-screen="s6"] #source-detail-panel .source-wizard-close svg{display:none}
body[data-console-screen="s6"] #source-detail-panel .source-wizard-close::before{
  content:"";width:13px;height:13px;background:
    linear-gradient(45deg,transparent 46%,currentColor 47% 53%,transparent 54%),
    linear-gradient(-45deg,transparent 46%,currentColor 47% 53%,transparent 54%)
}
body[data-console-screen="s6"] #source-detail-panel .console-right-panel__body{
  padding:22px 28px 28px;background:#fff
}
body[data-console-screen="s6"] #source-detail-panel .source-detail{
  display:flex;flex-direction:column;gap:18px;min-width:0
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-head{
  display:flex;align-items:flex-start;gap:11px
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-brand .source-connection-state{
  background:#fff;border-color:#e5e7eb
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-identity h4{
  color:#111827;font-size:14px;font-weight:650
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-identity span{
  color:#6b7280;font-size:11.5px
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-error{
  margin:0;border-radius:10px;background:#fef3f2;border-left-color:#d92d20;color:#b42318
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-stats{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-stat{
  min-width:0;padding:12px 14px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa;
  box-shadow:0 1px 2px rgb(16 24 40/4%),0 3px 8px rgb(16 24 40/4%)
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-stat .k{
  color:#6b7280;font-family:inherit;font-size:11px;font-weight:650;line-height:1.3;
  letter-spacing:0;text-transform:none
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-stat .v{
  display:block;margin-top:5px;overflow:hidden;color:#111827;font-size:15px;font-weight:650;
  line-height:1.25;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-stat-foot{
  margin-top:5px;color:#9ca3af;font-size:11px;line-height:1.3
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-section{
  display:flex;flex-direction:column;gap:10px;min-width:0;padding-top:14px;
  border-top:1px solid #f3f4f6
}
body[data-console-screen="s6"] #source-detail-panel .source-detail-section-title{
  color:#9ca3af;font-size:10.5px;font-weight:650;letter-spacing:.06em;text-transform:uppercase
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-details{
  margin:0;gap:10px
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-details>div{
  padding:10px 12px;border:1px solid #f3f4f6;border-radius:10px;background:#fafafa
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-details dt{
  margin-bottom:3px;color:#9ca3af;font-family:inherit;font-size:10px;font-weight:650;
  letter-spacing:.05em;text-transform:uppercase
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-details dd{
  color:#374151;font-size:12px;font-weight:600
}
body[data-console-screen="s6"] #source-detail-panel .source-lineage-foot{
  margin:0;color:#9ca3af;font-size:11.5px
}
body[data-console-screen="s6"] #source-detail-panel .saved-memory-link-legend{
  cursor:default
}
body[data-console-screen="s6"] #source-detail-panel .source-connection-actions{
  margin:0;gap:8px
}
body[data-console-screen="s6"] #source-detail-panel .btn{
  min-height:30px;padding:5px 10px;border-color:#e5e7eb;border-radius:8px;background:#fff;
  color:#374151;font-family:inherit;font-size:11.5px;box-shadow:none
}
body[data-console-screen="s6"] #source-detail-panel .btn--solid{
  border-color:#0f3d2e;background:#0f3d2e;color:#fff
}
body[data-console-screen="s6"] #source-detail-panel .btn:hover{background:#f9fafb;color:#111827}
body[data-console-screen="s6"] #source-detail-panel .btn--solid:hover{background:#14503c;color:#fff}
body[data-console-screen="s6"] #source-detail-panel .source-error{color:#b42318}
@media(max-width:720px){
  body[data-console-screen="s6"] #source-detail-panel .source-detail-drawer>.source-wizard-head{
    padding:18px 16px 14px
  }
  body[data-console-screen="s6"] #source-detail-panel .console-right-panel__body{padding:18px 16px 24px}
  body[data-console-screen="s6"] #source-detail-panel .source-detail-stats{grid-template-columns:1fr}
  body[data-console-screen="s6"] #source-detail-panel .source-connection-details{grid-template-columns:1fr}
}

/* Closed dropdown controls and their open surfaces use the same neutral
   tier-3 inset as the Scoped memory stat value (for example, "2 / hold scoped
   access"). Screen scope gives this shared fill precedence over older local
   white or green-tinted control rules without changing text inputs. */
body[data-console-screen] #screen-content select:is(.select,.input,.copilot-history-view):not(.head *,.home-head *){
  background-color:var(--dl-page)
}
/* Dropdown surfaces use the same neutral tier-3 inset as the Scoped memory
   stat value (for example, "2 / hold scoped access"). Keep this list limited
   to menus and pickers: drawers, dialogs, cards, and state fills retain their
   own surface semantics. Native select pickers are covered in the shared
   base-select rule above. */
:is(.workspace-account-menu,.home-query-filter-menu,.memory-scope-menu,
  .copilot-message-menu,.copilot-model-popover,.teams-selector__panel,
  .teams-person-menu__popover,.teams-memberships__popover,.usage-filter-pop,
  .skills-screen .skill-filter-popover,.skills-screen .skill-filter-panel){
  background:var(--dl-page)
}
/* Teams previously painted white child rows over its picker, hiding the
   shared surface. The children stay transparent until their neutral hover or
   selected state is active. */
.teams-selector__panel :where(.teams-selector__search,.teams-selector__search .input,
  .teams-selector__option){background:transparent}

/* Mobile target floor stays last so component rules cannot shrink controls. */
@media(max-width:860px){
  .navgroup,.nav button,.rail-help__action,.breadcrumbs button,.btn,.btn--sm,.policy-screen .btn,
  .auth-tab,.google-signin,.source-category-tab,.source-card-action,
  .source-wizard-close,.source-schedule .select,.memory-graph-filter,.copilot-chip,.copilot-send,
  .copilot-clear,.copilot-model-select,.copilot-history-view,.skill-expand,.toggle{min-height:44px}
  .breadcrumbs button{display:inline-flex;align-items:center;justify-content:center;min-width:44px}
  .copilot-send,.copilot-clear,.skill-expand{min-width:44px}
  .halo-icon-control{min-width:44px;min-height:44px}
  .head h1{font-size:clamp(26px,7vw,28px);line-height:1.12}
  body[data-console-screen="s15"] #screen-content>.head .filter-strip>.btn{min-height:44px}
  body[data-console-screen="s15"] #screen-content .usage-expand,
  body[data-console-screen="s15"] #screen-content .usage-filter-trigger,
  body[data-console-screen="s15"] #usage-trace-panel .source-wizard-close {min-width:44px;min-height:44px}
}

/* Home dashboard sectional-row rhythm. Keep the metric band and every paired
   panel row on the shared 24px page cadence without widening card columns. */
.home-overview>.screen-flow,
.home-overview .home-dashboard{
  row-gap:var(--s5)
}

/* Home summary labels are authored in title case. Render that copy as written
   instead of converting labels such as "Overall Queries" to capitals. */
.home-overview .home-metrics .metric-card .k{
  letter-spacing:0;
  text-transform:none
}

/* Platform-wide state language is colored text, not a capsule. Keep the
   existing tone classes as the semantic color source, but remove every shared
   pill's container and decorative dot regardless of older screen overrides. */
html body .pill{
  gap:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  letter-spacing:0!important;
  text-transform:none!important
}
html body .pill .dot{display:none!important}
/* A few state labels are also filters. Preserve an accessible text-action hit
   area without bringing back the capsule or fill. */
html body button.pill{
  min-height:32px!important;
  padding-block:6px!important;
  text-decoration:underline;
  text-underline-offset:3px
}
@media(max-width:860px){html body button.pill{min-height:44px!important}}

/* Invalid-field border must outrank the screen-content theme rule above
   (`body[data-console-screen] #screen-content :is(.input,.select)...`), which
   ties on specificity — so this lives at the end of the sheet. */
body[data-console-screen] #screen-content .input.input--invalid,
body[data-console-screen] #screen-content .input.input--invalid:hover,
body[data-console-screen] #screen-content .input.input--invalid:focus{
  border-color:var(--rust)
}
body[data-console-screen] #screen-content .input.input--invalid:focus{
  box-shadow:0 0 0 3px rgb(232 60 0/12%)
}

/* ---- S22 Billing: allowance meters and the trial window card -------------
   Same design language as S2/S15's metric cards: the team grid IS the shared
   .metric-card, and every other billing surface reuses that contract - white
   .stat-style boxes (panel background, --line border, --r-md radius, --sh-1
   lift) with an inset --surface-soft shell where a value needs a stage.
   Evergreen fills on stone tracks; gold near a ceiling, rust at the wall. */
.billing-shell{padding:var(--s4) var(--s5);border:1px solid var(--line);
  border-radius:var(--r-md);background:var(--surface-soft);box-shadow:var(--sh-1)}
.billing-shell .billing-progress{margin-top:0}
.billing-progress{width:100%;height:9px;margin:var(--s3) 0 var(--s2);
  border-radius:var(--r-pill);background:var(--stone);overflow:hidden}
.billing-progress>span{display:block;height:100%;border-radius:inherit;
  background:var(--evergreen);transition:width .4s var(--ease)}
.billing-progress--warn>span{background:var(--gold)}
.billing-progress--crit>span{background:var(--rust)}
.billing-dates{display:flex;justify-content:space-between;gap:var(--s3);
  color:var(--muted);font-size:var(--text-small)}
.billing-days{display:flex;flex-direction:column;margin-top:var(--s4)}
.billing-days-value{font-size:44px;font-weight:700;line-height:1.05;color:var(--ink)}
.billing-days-label{color:var(--muted);font-size:var(--text-small)}
.billing-card-title{display:inline-flex;align-items:center;gap:var(--s3)}
.billing-row{margin-top:var(--s3);padding:var(--s4) var(--s5);
  border:1px solid var(--line);border-radius:var(--r-md);background:var(--panel);
  box-shadow:var(--sh-1)}
.billing-row:first-child{margin-top:0}
.billing-row-head{display:flex;justify-content:space-between;align-items:baseline;
  gap:var(--s3);flex-wrap:wrap}
.billing-row-label{font-weight:600;font-size:14px;color:var(--ink)}
.billing-row-detail{color:var(--muted);font-size:var(--text-small)}
.billing-row-detail strong{color:var(--ink)}
.billing-row .billing-progress{margin-bottom:0}
/* ==========================================================================
   MOBILE FLOW - measured at 375x812 and appended last so component rules
   cannot silently undo it. Layout and touch ergonomics only: no renderer,
   read model, or transport behaviour changes.
   ========================================================================== */

/* --- 1. Page-level horizontal overflow -----------------------------------
   Four distinct causes put six screens past the phone edge. A widened page
   also re-anchors every position:fixed overlay, which is how the assistant
   dock ended up entirely off-screen on S6 and S13. */

/* 1a. S5 / S4 / S11 (438px on a 375px screen). The info tooltip is
   visibility:hidden, NOT display:none, so its 220px box stays in layout.
   Centre-anchoring it (left:50% + translateX(-50%)) on an icon that sits
   ~49px from the right edge pushed the box to x=418. Anchor to the icon's
   right edge instead - the same treatment .home-metrics already carries at
   the top of this sheet, which is exactly why Home never broke. The reveal
   selectors are repeated at matching specificity so the base
   `.metric-info:hover::after` transform cannot restore the centre anchor. */
@media(max-width:860px){
  .metric-info::after,.heading-info::after{
    left:auto;right:-6px;
    max-width:min(240px,calc(100vw - 32px));
    transform:translateY(4px)
  }
  .metric-info::before,.heading-info::before{left:auto;right:2px;transform:rotate(45deg)}
  .metric-info:hover::after,.metric-info:focus::after,.metric-info:focus-visible::after,
  .heading-info:hover::after,.heading-info:focus::after,.heading-info:focus-visible::after{
    opacity:1;visibility:visible;transform:translateY(0)
  }
  .metric-info:hover::before,.metric-info:focus::before,.metric-info:focus-visible::before,
  .heading-info:hover::before,.heading-info:focus::before,.heading-info:focus-visible::before{
    opacity:1;visibility:visible
  }
}

/* 1b. S6 Sources (687px). The <=680px rule turns .source-scope-filter into a
   column with align-items:flex-start, which sizes the scope-chip strip to
   max-content (613px) - so the strip's own overflow-x:auto never engages and
   the width propagates to the page. Stretch the strip back to the row. */
@media(max-width:680px){
  .source-scope-filter .filter-strip{align-self:stretch;width:100%;max-width:100%;min-width:0}
  .source-scope-filter .subtle{max-width:100%;white-space:normal}
}
/* The strip alone is not enough: section.source-standalone is a grid item
   left at the default min-width:auto, so its automatic minimum size resolved
   to the strip's 613px min-content and the track grew to 662.578px inside a
   327px container. A grid or flex item that hosts its own scroller has to be
   allowed to shrink, so clear the automatic minimum across the screen shells
   - this is the whole class of "an inner scroller widens the page" bug. */
@media(max-width:860px){
  .screen-flow>*,.source-screen>*,.source-standalone,.teams-v2__flow>*{min-width:0}
}

/* 1c. S13 Teams (637px). The Actions column header carries a
   `span.sr-only` that is position:absolute while .teams-table-scroll is not
   positioned - so its containing block resolved to div.app, its static
   position became left:637px, and the scroller's overflow never clipped it.
   Giving the scroller a containing block is the whole fix. */
.teams-table-scroll{position:relative}

/* 1d. S19 Alerts (401px). Each lane subtitle is a full sentence pinned with
   white-space:nowrap inside a flex-wrap:nowrap header only 293px wide. */
@media(max-width:860px){
  .home-panel-meta{white-space:normal}
  .home-panel-head,.home-panel>.home-panel-head:first-child{flex-wrap:wrap}
}

/* 1e. S11 Conflicts. The decision row is a plain .row (no flex-wrap), so a
   real finding's three decision buttons force the card - and the page - to
   ~799px. Let the row wrap and let the grid track shrink. */
@media(max-width:860px){
  .conflict-lane{grid-template-columns:minmax(0,1fr)}
  .conflict-decide .row{flex-wrap:wrap}
  .conflict-decide .row>*{min-width:0}
}

/* --- 2. Controls the dock or a clipping box made unreachable ------------- */

/* 2a. S8 Audit: the pager's next-page button (28x28 at x=304,y=760) sat
   under the 56x56 dock launcher (x=305,y=742) - elementFromPoint at the
   button's centre returned the launcher, and it is the only route through 13
   pages. Move the pager off the dock's corner and give it a real target. */
@media(max-width:860px){
  .audit-pager{justify-content:flex-start;flex-wrap:wrap}
  .audit-table-footer{align-items:flex-start;flex-direction:column;padding-right:64px}
  html body .audit-page-step,html body .audit-pager__page{
    min-width:44px!important;min-height:44px!important;padding:0 10px
  }
}

/* 2b. Nothing may be permanently trapped under the fixed dock: reserve the
   launcher's 70px plus breathing room at the end of every screen. */
@media(max-width:860px){
  .stage{padding-bottom:104px}
}

/* 2c. S14 Agent connections: .intg-steps is a grid with no minmax(0,1fr)
   track, so the column grew to fit the setup command and 12 of 15 connect
   dialogs overflowed (VS Code 972px, Gemini CLI 798px, openclaw 1315px).
   Worse, the sideways scroll then landed on the dialog, dragging the header
   and Close button off the left edge. The wrap treatment already exists in
   this sheet for .connect-step .snippet; apply it here too. */
.intg-steps{grid-template-columns:minmax(0,1fr)}
.intg-steps li,.intg-steps li>*{min-width:0}
@media(max-width:860px){
  .intg-dialog{overflow-x:hidden}
  .intg-steps .snippet,.intg-dialog .snippet{
    white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word
  }
}

/* 2d. S15 ledger filter popover: position:fixed with max-height 420px opened
   at top 434 -> bottom 854 on an 812px viewport, and its last option stayed
   below the fold even at its own scroll end. Dock it to the bottom of the
   screen as a sheet instead of anchoring it to the trigger. */
@media(max-width:640px){
  html body .usage-filter-pop,
  body[data-console-screen="s15"] #screen-content .usage-filter-pop{
    position:fixed;inset:auto 10px 10px;
    width:auto;max-width:none;max-height:min(70vh,calc(100dvh - 120px));
    overflow-y:auto
  }
}

/* 2e. S16 Skills: the <=560px bottom-sheet treatment targets
   `.skill-filter-popover`, a class the renderer never emits - s16.js renders
   `.skill-filter-panel`, so the filter opened as a 301x685 inline block.
   Same shape, correct selector. */
@media(max-width:560px){
  .skills-screen .skill-filter-panel{
    position:fixed;inset:auto 10px 10px;z-index:60;
    width:auto;max-height:75vh;overflow:auto
  }
}

/* --- 3. Touch targets ----------------------------------------------------
   The sheet already ships a <=860px 44px floor, but any two-class component
   rule outranks it (`.audit-compliance-form > .btn` at 0,2,0 beats the media
   rule at 0,1,0 regardless of order). These re-assert the floor at a
   specificity component rules cannot beat, on the controls that measured
   short: drawer closes at 44x30, compliance actions at 35px, and the pagers,
   segmented switches and filter chips at 24-30px. */
@media(max-width:860px){
  html body .source-wizard-close,
  html body .source-wizard-close.halo-icon-control,
  html body .halo-icon-control,
  html body .skill-detail-close,
  html body .audit-compliance-form>.btn,
  html body .teams-segmented__item,
  html body .teams-icon-button,
  html body .teams-members-page-button,
  html body .teams-role-help,
  html body .home-range-option,
  html body .home-card-link,
  html body [data-action="home-page"],
  html body [data-action="home-cap-edit"],
  html body [data-action="home-query-filter-toggle"],
  html body .audit-range-tab,
  html body .sm-chip,
  html body .sm-clear,
  html body .usage-group-tab,
  html body .copilot-notice__action,
  html body .skill-filter-button,
  html body .brand-home{
    min-height:44px!important
  }
  html body .halo-icon-control,
  html body .skill-detail-close,
  html body .teams-icon-button,
  html body .teams-members-page-button,
  html body [data-action="home-page"],
  html body [data-action="home-query-filter-toggle"]{
    min-width:44px!important
  }
  /* Info affordances are 12-18px squares; give them a real hit area without
     changing the glyph. */
  html body .metric-info,html body .heading-info,html body .metric-card-info,
  body[data-console-screen="s15"] #screen-content .usage-stat-section .metric-card-info{
    width:44px;height:44px;margin:-13px -13px -13px 0
  }
}

/* --- 4. Text-entry sizing -------------------------------------------------
   Every field measured 12.5-14px. Below 16px, iOS Safari zooms the page on
   focus and leaves the user zoomed on a 375px layout. Two search fields were
   worse than small: their real hit area was 17px inside a 33px chrome. */
@media(max-width:860px){
  html body :is(.input,.select,textarea,input:not([type="checkbox"]):not([type="radio"])),
  body[data-console-screen] #screen-content :is(.input,.select,textarea,
    input:not([type="checkbox"]):not([type="radio"])){
    font-size:16px
  }
  html body .sm-search input,html body .policy-search input,
  html body .skills-screen .skill-search input,html body .cmdk__input{
    min-height:26px;padding:6px 2px;font-size:16px
  }
  html body .sm-search,html body .policy-search,
  html body .skills-screen .skill-search,
  html body .skills-screen .skill-search .input{
    width:100%;min-height:44px!important;height:auto;padding:4px 10px
  }
}

/* --- 5. Legibility floor -------------------------------------------------
   49 text nodes on S8 alone rendered under 11px. Raise the floor on the
   labels, pills and column heads that carry meaning, without touching the
   type scale. */
@media(max-width:860px){
  html body :is(.pill,.audit-outcome,.audit-op-pill,.audit-copy,.audit-table th,
    .home-avatar,.home-query-bubble-label,.skill-filter-count,.ex20-lab,.ex20-tile-cap,
    .profile-method-option-action,.setup-step__optional,.memory-graph-hint,
    .saved-memory-tier,.saved-memory-team,.copilot-routine-suggestion-area,
    .teams-meta-strip span,.teams-members-grid__head,.usage-qrow--head .eyebrow,
    .model-detail-grid dt,.oauth-endpoint,.knowledge-proposal-compare section>span){
    font-size:11.5px!important
  }
  html body .memory-graph-hint,html body .memory-graph-toolbar kbd{font-size:11.5px!important}
}

/* --- 6. Wide grids inside ~290px scrollers -------------------------------
   These correctly scroll rather than breaking the page, but nothing signals
   that columns exist off to the right and the identifying column scrolls
   away with everything else. Pin the first column and show the edge. */
@media(max-width:860px){
  .audit-table-scroll,.teams-table-scroll,.usage-groups-card .tblwrap,
  .skills-screen .skill-table-wrap{
    -webkit-overflow-scrolling:touch;
    background:
      linear-gradient(to right,var(--panel) 30%,rgb(var(--evergreen-rgb)/0)) left/28px 100% no-repeat,
      linear-gradient(to left,var(--panel) 30%,rgb(var(--evergreen-rgb)/0)) right/28px 100% no-repeat,
      radial-gradient(farthest-side at 0 50%,rgb(var(--evergreen-rgb)/12%),transparent) left/12px 100% no-repeat,
      radial-gradient(farthest-side at 100% 50%,rgb(var(--evergreen-rgb)/12%),transparent) right/12px 100% no-repeat;
    background-attachment:local,local,scroll,scroll
  }
  .audit-table th:first-child,.audit-table td:first-child{
    position:sticky;left:0;z-index:2;background:#fff
  }
  .teams-members-grid__head>:first-child,
  .teams-members-grid__row>:first-child{
    position:sticky;left:0;z-index:2;background:inherit
  }
  /* A 0-member team centred its empty state inside the 720px canvas, so only
     106px of a 345px sentence was on screen - it read as a blank strip. */
  .teams-members-grid__empty{
    position:sticky;left:0;
    width:min(100%,calc(100vw - 82px));
    text-align:left
  }
}

/* --- 7. Per-screen mobile corrections ------------------------------------ */

/* 7a. S15 ledger: the query - the reason the row exists - was squeezed to
   68px while a fixed 82px timestamp column kept full width, eliding
   "shipping address for order 4127" to 38% of itself. Stack the row instead
   of rationing a 261px content box across four tracks. */
@media(max-width:900px){
  .usage-qrow{grid-template-columns:minmax(0,1fr) 44px;gap:var(--s2) var(--s3)}
  .usage-qrow>:nth-child(1){grid-column:1;font-variant-numeric:tabular-nums}
  .usage-qrow>:nth-child(3){grid-column:1;white-space:normal;overflow:visible;text-overflow:clip}
  .usage-qrow>:nth-child(4){grid-column:1}
  .usage-qrow>:last-child{grid-column:2;grid-row:1/span 2;align-self:center}
  .usage-summary{white-space:normal;overflow:visible;text-overflow:clip}
  .usage-caller-name{white-space:normal;overflow-wrap:anywhere}
}

/* 7b. S5 Memory: the graph canvas held a hard 600px min-width inside a 325px
   scroller (46% permanently off-screen) and its 20 node hit targets measured
   9-22px. Let the canvas fit the phone and give the nodes a thumb. */
@media(max-width:720px){
  .memory-graph-viewport{min-width:0;min-height:min(72dvh,560px)}
  .memory-graph-node-hit{min-width:36px;min-height:36px}
}

/* 7c. S10 Assistant: the composer took 362px of a 510px shell, leaving a
   148px transcript holding 699px of content. Cap the composer and let the
   transcript keep what is left. */
@media(max-width:860px){
  .copilot-stage .copilot-workbench{height:auto;min-height:0}
  .copilot-chat-shell{min-height:min(78dvh,620px)}
  .copilot-transcript{min-height:38dvh}
  .copilot-composer{flex:0 0 auto;max-height:46dvh;overflow-y:auto}
  .copilot-composer-foot{row-gap:6px}
}

/* 7d. Drawer footers: S12's "Save model deployment" opened 300px below the
   fold and S16's "Add skill" 858px below it, neither in a sticky footer, so
   the primary action vanished the moment the keyboard opened. */
@media(max-width:860px){
  .skill-register-footer,.console-right-panel__foot,.source-wizard-foot{
    position:sticky;bottom:0;z-index:3;
    border-top:1px solid var(--line);background:var(--panel)
  }
}

/* 7e. Long unbreakable strings: S17's connection URL (11px, nowrap, elided),
   S20's sha256 checksums (~9 of 64 characters visible, full value only in a
   hover title), S8's clipped copy control. Let them wrap. */
.oauth-endpoint{white-space:normal;overflow-wrap:anywhere;overflow-x:visible;text-overflow:clip}
@media(max-width:860px){
  .ex20-ev-row{flex-wrap:wrap}
  .ex20-ev-k{flex:none;max-width:100%}
  .ex20-ev-v{width:100%;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}
  .ex20-card{padding-inline:var(--s4)}
  .audit-agent{overflow:visible;white-space:normal;overflow-wrap:anywhere}
  .teams-selector__trigger-meta b{white-space:normal;overflow:visible;text-overflow:clip}
  .sm-cell-meta,.sm-cell-name{white-space:normal;overflow:visible;text-overflow:clip}
}

/* 7f. S3 badge ledger drops Team, Access, Status, Last seen and Expires at
   <=560px - you cannot tell whether a badge is live or revoked while Revoke
   stays one tap away. Bring the status back on its own line. */
@media(max-width:560px){
  .sm-row,.sm-thead{grid-template-columns:minmax(0,1fr) 30px}
  .sm-row>:nth-child(4){display:block;grid-column:1}
  .sm-row>.sm-cell-acts{grid-column:1;display:flex;flex-wrap:wrap;gap:var(--s2)}
  .sm-row>:last-child{grid-column:2;grid-row:1}
}

/* 7g. S21 catalog: 19 single-column cards at 294px each is 8.7 screens of
   scroll with no filter. The cards carry a 50px logo row, a 56px title block
   and a 53px footer around an .sr-only description - they do not need 250px. */
@media(max-width:680px){
  .source-connector-card{min-height:0;gap:var(--s3)}
  .source-connector-grid{gap:var(--s3)}
}

/* 7h. S18 sign-in method tiles rendered no provider name - a 19px monochrome
   icon was the only identifier, with the name in aria-label alone. Restore
   the middle column so the label has somewhere to sit. */
@media(max-width:860px){
  .intg-card--status-only{grid-template-columns:38px minmax(0,1fr) auto}
}

/* 7i. Stat bands: S2 spent 818px, S7 826px and S11 492px on stacked metric
   cards before any content. Two columns keeps the band scannable and pulls
   the actual screen above the fold. */
@media(max-width:860px) and (min-width:400px){
  .home-metrics,.knowledge-metrics,.memory-summary-metrics,
  .conflict-summary-metrics,.audit-stat-grid,.policy-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
}

/* 7j. Assistant dock: the panel covered 78-86% of a phone screen with no
   backdrop, left body scrolling underneath, and ignored taps outside itself -
   the only console overlay that did none of those. The backdrop element is
   always in the DOM (assistant-dock.js) but stays inert above the mobile
   breakpoint, so wide-screen behaviour is unchanged. */
.assistant-dock-backdrop{display:none}
@media(max-width:860px){
  .assistant-dock-backdrop{
    position:fixed;inset:0;z-index:-1;display:block;
    border:0;padding:0;background:rgb(11 13 11/56%);
    opacity:0;visibility:hidden;pointer-events:none;cursor:pointer;
    transition:opacity .2s var(--ease),visibility .2s
  }
  .assistant-dock.is-open .assistant-dock-backdrop{
    opacity:1;visibility:visible;pointer-events:auto
  }
  html.assistant-dock-open,body.assistant-dock-open{overflow:hidden}
}
@media(prefers-reduced-motion:reduce){
  .assistant-dock-backdrop{transition:none}
}

/* 3b. A per-component list cannot keep up: a two-class rule anywhere in this
   sheet outranks it, and specificity compares class count before element
   count (so an `html body .x` prefix does not help). This is the blanket
   floor for anything a thumb has to hit, with the exceptions that must stay
   small: the shared .pill text-action keeps its own 44px rule, checkboxes and
   radios are driven by their labels, and the two full-screen backdrops must
   not gain a height. */
@media(max-width:860px){
  html body #screen-content :is(button,summary,[role="button"],a.btn,
    input:not([type="checkbox"]):not([type="radio"]),select,textarea):not(.pill):not(.sr-only),
  html body .console-right-panel :is(button,summary,[role="button"],
    input:not([type="checkbox"]):not([type="radio"]),select,textarea):not(.pill):not(.sr-only),
  html body dialog :is(button,summary,[role="button"],
    input:not([type="checkbox"]):not([type="radio"]),select,textarea):not(.pill):not(.sr-only){
    min-height:44px!important
  }
}

/* 5b. The remaining sub-11px copy after the floor above, found by walking
   computed styles rather than guessing selectors. Deliberately NOT included:
   the .workspace-org-mark monogram (a glyph in a circle, not reading text)
   and the in-canvas graph node chips, whose geometry is fixed and which the
   user can already pinch-zoom - enlarging those overlaps the nodes. */
@media(max-width:860px){
  html body :is(.workspace-account-copy small,.workspace-account-summary small,
    .memory-scope-trigger span,.memory-graph-control-tip,.source-tile-status,
    .skill-filter-option b,.skill-filter-selects label,
    .assistant-dock-head-copy small,.cmdk__esc,.cmdk__foot kbd){
    font-size:11.5px!important
  }
}

/* 5c. Last pass over sub-11px copy: audit row detail and compliance help,
   policy dial labels, the team picker's eyebrow. The two avatar monograms
   (.workspace-org-mark, .person-avatar__fallback) stay as they are - a
   two-letter glyph sized to its circle is not reading text. */
@media(max-width:860px){
  html body :is(.audit-event small,.audit-result small,.audit-compliance-form .hint,
    .audit-certificate-note p,.audit-certificate-note span,
    .policy-field label,.policy-switch,.teams-selector__trigger-label,
    .eyebrow,.sm-cell-meta){
    font-size:11.5px!important
  }
}

/* 5d. The last three: usage table column heads, the connected-apps state
   terms and their option descriptions. After this the only sub-11px text
   left in the console at 375px is the two avatar monograms, by choice. */
@media(max-width:860px){
  html body :is(.usage-groups-card th,.oauth-client-states dt,
    .m8a-kv dt,#oauth-client-panel small.subtle,.data-grid th){
    font-size:11.5px!important
  }
}

/* 1a-bis. The same tooltip overflow is NOT mobile-only: at 1280px the memory
   and policy summary grids still measure 1320 against a 1265 client, because
   the centre anchor is a property of the base rule, not of the viewport. The
   three summary grids that never received .home-metrics' right-anchored
   override get it here at every width - Home is untouched, its own override
   is more specific and already correct. */
.memory-summary-metrics .metric-card .metric-info::after,
.policy-summary .metric-card .metric-info::after,
.conflict-summary-metrics .metric-card .metric-info::after{
  left:auto;right:-6px;max-width:min(240px,calc(100vw - 32px));transform:translateY(4px)
}
.memory-summary-metrics .metric-card .metric-info::before,
.policy-summary .metric-card .metric-info::before,
.conflict-summary-metrics .metric-card .metric-info::before{
  left:auto;right:2px;transform:rotate(45deg)
}
.memory-summary-metrics .metric-card .metric-info:hover::after,
.memory-summary-metrics .metric-card .metric-info:focus-visible::after,
.policy-summary .metric-card .metric-info:hover::after,
.policy-summary .metric-card .metric-info:focus-visible::after,
.conflict-summary-metrics .metric-card .metric-info:hover::after,
.conflict-summary-metrics .metric-card .metric-info:focus-visible::after{
  opacity:1;visibility:visible;transform:translateY(0)
}
