/* Juno Aurora v2 — design tokens and primitives.
   Source of truth: Claude Design project "Juno gateway manager settings" (decision D-15 / D-30).
   Components never write a hex value; they use these tokens. */

:root {
  /* Surfaces */
  --au-bg-page: #F4F4F7;
  --au-bg-app: #FBFBFD;
  --au-bg-card: rgba(255, 255, 255, 0.88);
  --au-bg-subtle: #FBFBFD;
  --au-bg-field: #FFFFFF;
  --au-bg-field-locked: #F6F6F9;
  --au-bg-hover: #F4F4F8;
  --au-bg-footer: rgba(251, 251, 253, 0.7);

  /* Ink */
  --au-ink: #18171C;
  --au-ink-2: #6B6A72;
  --au-ink-3: #8A8993;
  --au-ink-4: #B0AFA9;
  --au-ink-disabled: #D0CFD6;
  --au-ink-on-dark: #FFFFFF;

  /* Lines */
  --au-line: #EAEAF0;
  --au-line-soft: #F1F1F6;
  --au-line-card: rgba(234, 234, 240, 0.9);

  /* Brand */
  --au-orange: #FF6A00;
  --au-orange-ink: #C2560A;
  --au-orange-bg: #FFF2E8;
  --au-orange-bg-soft: color-mix(in srgb, var(--au-orange) 4%, #fff);
  --au-pink: #FF3D77;
  --au-purple: #7A5AF8;
  --au-purple-ink: #5B3FD6;
  --au-purple-bg: #F1EDFE;
  --au-purple-bg-soft: #FCFBFF;
  --au-teal: #12B5A6;
  --au-teal-ink: #0B7A70;
  --au-teal-bg: #E3F6F4;
  --au-teal-bg-soft: #FAFEFD;
  --au-black: #0C0B0A;

  /* Semantic */
  --au-success: #2D7A4F;
  --au-success-bg: #E6F5EC;
  --au-warning: #B07300;
  --au-warning-bg: #FEF3E0;
  --au-warning-row: #FFFDFB;
  --au-error: #C03B3B;
  --au-error-bg: #FDECEC;
  --au-error-row: #FDF6F6;
  --au-info: #2256A6;
  --au-info-bg: #EBF1FB;
  --au-neutral-ink: #6B6B67;
  --au-neutral-bg: #F0EFEC;

  /* Gradient header rule */
  --au-gradient-rule: linear-gradient(90deg, #FF6A00 0%, #FF3D77 42%, #7A5AF8 72%, #12B5A6 100%);
  --au-aurora-rgb: 255, 106, 0; /* brand accent as RGB triplet for the background radials; themed per channel */
  --au-brand-2: #FF3D77; --au-brand-3: #7A5AF8; --au-brand-4: #12B5A6; /* the brand ramp behind the glows and the gradient rule; themed per channel, never used for status */

  --au-accent: var(--au-orange);
  --au-accent-wash: color-mix(in srgb, var(--au-orange) 6%, #fff);

  /* Chart colours "Gradient echo" (brief 2c, 2026-11-14) for the 934 channel: the main series picks up the header strip's orange-to-pink
     gradient per bar, the paired series is blush, categories keep a fixed slot order, full orange is only the signal (selected, today,
     peak; at most once per widget). Status colours never colour a series. White-label channels override these from their own colours
     (App.razor, story #984). Components use ChartPalette / these tokens, never hex values. */
  --chart-primary-top: #FF9A5C;
  --chart-primary-bottom: #F26B8F;
  --chart-primary: linear-gradient(180deg, var(--chart-primary-top) 0%, var(--chart-primary-bottom) 100%);
  --chart-primary-h: linear-gradient(90deg, var(--chart-primary-top) 0%, var(--chart-primary-bottom) 100%);
  --chart-primary-solid: #F47E77;
  --chart-secondary: #F7E3EA;
  --chart-cat-1: #F58A6E;
  --chart-cat-2: #C779C9;
  --chart-cat-3: #8C7BEF;
  --chart-cat-4: #F2B3C6;
  --chart-cat-5: #B9AEF5;
  --chart-cat-other: #D9D8E0;
  --chart-signal: var(--au-orange);
  --chart-signal-light: #FFD3B0;
  --chart-grid: #F1F1F6;
  --chart-axis: #8A8993;
  --chart-empty: #F1F1F6;

  /* The names of story #984, kept as aliases. */
  --au-chart-1: var(--chart-primary-solid);
  --au-chart-1-soft: var(--chart-secondary);
  --au-chart-1-deep: var(--chart-primary-bottom);
  --au-chart-2: var(--chart-cat-2);
  --au-chart-3: var(--chart-cat-3);
  --au-chart-4: var(--chart-cat-4);
  --au-chart-5: var(--chart-cat-5);
  --au-chart-6: var(--chart-cat-1);
  --au-chart-7: var(--chart-cat-2);
  --au-chart-8: var(--chart-cat-3);
  --au-chart-rest: var(--chart-cat-other);

  /* Radii */
  --au-r-card: 12px;
  --au-r-panel: 10px;
  --au-r-control: 9px;
  --au-r-level: 7px;
  --au-r-chip: 6px;
  --au-r-pill: 100px;

  /* Type */
  --au-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --au-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --au-fs-title: 20px;
  --au-fs-section: 14px;
  --au-fs-body: 13px;
  --au-fs-cell: 12.5px;
  --au-fs-small: 11.5px;
  --au-fs-caption: 11px;
  --au-fs-label: 9.5px;
  --au-fs-pill: 10px;

  /* Layout */
  --au-header-h: 62px;
  --au-nav-w: 272px;
  --au-touch: 44px;

  /* Motion */
  --au-t-fast: 120ms;
  --au-t-nav: 180ms;
  --au-t-modal: 280ms;

  /* Shadows (design v2 permits a soft card shadow) */
  --au-shadow-card: 0 1px 2px rgba(24, 23, 28, 0.05), 0 10px 30px -14px rgba(24, 23, 28, 0.14);
  --au-shadow-header: 0 1px 3px rgba(24, 23, 28, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--au-bg-page);
  color: var(--au-ink);
  font-family: var(--au-font);
  font-size: var(--au-fs-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--au-ink); text-decoration: none; }
a:hover { color: var(--au-orange); }
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--au-orange); outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; }

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

/* ---------- App canvas ---------- */
.au-app {
  min-height: 100vh;
  position: relative;
  background: var(--au-bg-app);
  background-image:
    radial-gradient(760px 520px at 8% 2%, rgba(var(--au-aurora-rgb), 0.13), transparent 62%),
    radial-gradient(700px 560px at 96% 12%, color-mix(in srgb, var(--au-brand-3) 10%, transparent), transparent 60%),
    radial-gradient(900px 620px at 62% 100%, color-mix(in srgb, var(--au-brand-4) 11%, transparent), transparent 58%),
    radial-gradient(620px 480px at 22% 88%, rgba(46, 144, 250, 0.09), transparent 62%);
}

/* ---------- Header ---------- */
.au-hdr {
  height: var(--au-header-h);
  background: #FFFFFF;
  box-shadow: var(--au-shadow-header);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 30;
  overflow: visible;
}
/* Gradient strip as a pseudo-element, never border-image (breaks in captures). */
.au-hdr::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--au-gradient-rule); }
.au-hdr > * { flex: none; white-space: nowrap; }
.au-hdr > .au-hdr-spacer { flex: 1 1 auto; }
.au-scope-wrap { position: relative; flex: 0 1 auto; min-width: 120px; }
.au-hdr-brand { display: flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; }
.au-hdr-brand img { display: block; height: 26px; width: auto; max-width: none; }
.au-hdr-wordmark { font-size: 11px; font-weight: 600; letter-spacing: 1.9px; text-transform: uppercase; color: var(--au-ink-2); }
.au-vdiv { width: 1px; height: 22px; background: var(--au-line); flex: none; }
.au-hdr-spacer { flex: 1; }
.au-hdr-meta { font-size: var(--au-fs-caption); color: var(--au-ink-4); white-space: nowrap; }
.au-hdr-user { display: flex; align-items: center; gap: 9px; }
.au-hdr-role { font-size: 9px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--au-orange-ink); }
.au-hdr-name { font-size: 12px; font-weight: 500; }

.au-scope {
  display: flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--au-line); border-radius: var(--au-r-control);
  padding: 5px 11px; min-height: 34px; color: var(--au-ink);
}
.au-scope:hover { background: var(--au-bg-hover); }
.au-scope-dot { width: 6px; height: 6px; border-radius: var(--au-r-pill); flex: none; }
.au-scope-name { font-size: 12px; font-weight: 500; }
.au-scope-sub { font-size: 11px; color: var(--au-ink-3); }
.au-scope-switch { font-size: 10px; color: var(--au-ink-2); }
/* Transparent layer under the open scope menu: a click outside it closes the menu. */
.au-scope-backdrop { position: fixed; inset: 0; z-index: 19; background: transparent; }
.au-scope-menu {
  position: absolute; top: calc(var(--au-header-h) - 6px); left: 0; z-index: 20; min-width: 280px;
  background: #fff; border: 1px solid var(--au-line); border-radius: var(--au-r-panel); box-shadow: var(--au-shadow-card); padding: 6px;
}
.au-scope-item {
  width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: var(--au-r-level);
  display: flex; align-items: center; gap: 10px; font-size: var(--au-fs-cell); min-height: 38px; color: var(--au-ink);
}
.au-scope-item:hover { background: var(--au-bg-hover); }
.au-scope-item[aria-current="true"] { background: var(--au-orange-bg); color: var(--au-orange-ink); font-weight: 600; }

/* ---------- Body / nav ---------- */
.au-body { display: flex; align-items: stretch; min-height: calc(100vh - var(--au-header-h)); }
.au-nav { flex: none; width: var(--au-nav-w); padding: 14px 10px 40px; display: flex; flex-direction: column; }
.au-nav-group { margin-bottom: 18px; }
.au-nav-head { display: flex; align-items: center; gap: 7px; padding: 0 10px 8px; }
.au-nav-dot { width: 5px; height: 5px; border-radius: var(--au-r-pill); }
/* Focus-group sidebar (navigation handoff 2026-10-29, story #908): one group open, one module open inside it, single-line rows. */
.au-navb {
  width: 100%; text-align: left; border: 0; background: transparent; color: var(--au-ink); cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 8px; transition: background var(--au-t-fast);
  text-decoration: none;
}
.au-navb:hover { background: #F4F4F7; }
.au-navb:focus-visible { outline: 2px solid var(--au-orange); outline-offset: -2px; }
.au-nv-group { margin-bottom: 6px; }
.au-nv-ghead { height: 30px; gap: 7px; }
.au-nv-gdot { flex: none; width: 5px; height: 5px; border-radius: 100px; }
.au-nv-glabel { flex: 1; font-size: 9.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: #B0AFA9; }
.au-nv-ghead-on .au-nv-glabel { color: #6B6A72; }
.au-nv-gcount { flex: none; font-size: 10.5px; color: #B0AFA9; }
.au-nv-chev { flex: none; width: 10px; text-align: center; font-size: 12px; color: #B0AFA9; transition: transform var(--au-t-fast); }
.au-navb[aria-expanded="true"] .au-nv-chev { transform: rotate(90deg); }
.au-nv-items { padding-bottom: 6px; }
.au-nv-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-nv-mod, .au-nv-leaf { height: 32px; font-size: 13px; font-weight: 500; color: #18171C; }
.au-nv-mod-cur { font-weight: 600; }
.au-nv-leaf[aria-current="page"] { background: var(--au-orange-bg); color: var(--au-orange-ink); font-weight: 600; }
.au-nv-pages { position: relative; margin: 1px 0 4px 18px; padding-left: 10px; }
.au-nv-pages::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 1px; background: #E4E3EA; }
.au-nv-page { position: relative; height: 30px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: #3A3940; }
.au-nv-page[aria-current="page"] { background: var(--au-orange-bg); color: var(--au-orange-ink); font-weight: 600; }
.au-nv-bar { position: absolute; left: -11px; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: transparent; }
.au-nv-page[aria-current="page"] .au-nv-bar { background: var(--au-orange); }
.au-nv-key { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 10px 2px; margin-top: 4px; border-top: 1px solid #F1F1F6; }
.au-nv-key-item { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: #8A8993; }
/* View as (story #913): pinned to the bottom of the sidebar, whatever the page's length. */
.au-nv-viewas { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; margin: auto -10px -40px; padding: 12px 20px 14px;
  background: rgba(250, 250, 252, .94); backdrop-filter: blur(8px); border-top: 1px solid #ECECF2; }
.au-nv-viewas .au-lbl { flex: none; margin: 0; }
.au-nv-viewas .au-inp { width: 100%; }
/* Build stage (handoff 2026-10-29; Pilot blue by the owner). Red is never a stage: a red dot is an alert. */
.au-stage-dot { flex: none; width: 6px; height: 6px; border-radius: 100px; }
.au-stage-dot-dev { background: #B0AFA9; }
.au-stage-dot-alpha { background: #F0A93B; }
.au-stage-dot-pilot { background: #2E90FA; }
.au-stage-dot-sample { background: #7A5AF8; }
.au-stage-pill { display: inline-flex; align-items: center; margin-left: 10px; padding: 2px 8px; border-radius: var(--au-r-pill); font-size: 11px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.au-stage-pill-dev { background: #F0EFEC; color: #6B6B67; }
.au-stage-pill-alpha { background: #FEF3E0; color: #B07300; }
.au-stage-pill-pilot { background: #EAF3FE; color: #1F6FC2; }
.au-stage-pill-sample { background: #F1EDFE; color: #5B3FD6; }
/* Alert dot right of a module (red: something failing); amber "needs a look" shows on pages, not in the sidebar. Counts right of a page. */
.au-nav-status { flex: none; width: 7px; height: 7px; border-radius: 50%; }
.au-nav-status-bad { background: #E06B6B; }
.au-nav-status-warn { background: #F0A93B; }
.au-nav-count { flex: none; min-width: 18px; padding: 0 5px; border-radius: var(--au-r-pill); font-size: 10.5px; font-weight: 600; line-height: 16px; text-align: center; background: var(--au-bg-hover); color: var(--au-ink-3); }
.au-nav-count-bad { background: #FDECEC; color: #B83D3D; }
.au-nav-count-accent { background: var(--au-orange-bg); color: var(--au-orange-ink); }
.au-nav-count-dot { min-width: 7px; width: 7px; height: 7px; padding: 0; background: var(--au-orange); }
.au-main { flex: 1; min-width: 0; padding: 24px 28px 64px; border-left: 1px solid var(--au-line); }

/* ---------- Typography helpers ---------- */
.au-lbl { font-size: var(--au-fs-label); font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--au-ink-4); }
.au-lbl-field { font-size: var(--au-fs-label); font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--au-ink-3); }
.au-mono { font-family: var(--au-mono); }
.au-title { font-size: var(--au-fs-title); font-weight: 600; }
.au-title .au-accent { color: var(--au-orange); }
.au-lede { font-size: 12px; color: var(--au-ink-2); margin-top: 5px; max-width: 660px; line-height: 1.6; }
.au-section-title { font-size: var(--au-fs-section); font-weight: 600; }
.au-sub { font-size: var(--au-fs-small); color: var(--au-ink-2); }
.au-muted { color: var(--au-ink-2); }
.au-faint { color: var(--au-ink-3); }
.au-hint { font-size: var(--au-fs-caption); color: var(--au-ink-2); margin-top: 6px; line-height: 1.5; }
.au-note { font-size: var(--au-fs-caption); color: var(--au-ink-4); line-height: 1.6; }
.au-crumbs { font-size: var(--au-fs-small); color: var(--au-ink-4); margin-bottom: 8px; }
.au-crumbs a { color: var(--au-ink-4); }
.au-crumbs a:hover { color: var(--au-orange); }

/* ---------- Page header ---------- */
.au-page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.au-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Card ---------- */
.au-card {
  background: var(--au-bg-card);
  border: 1px solid var(--au-line-card);
  border-radius: var(--au-r-card);
  box-shadow: var(--au-shadow-card);
}
.au-card-pad { padding: 18px 20px; }
.au-card-head { padding: 14px 20px; border-bottom: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 12px; }
.au-card-foot { padding: 14px 20px; border-top: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 12px; background: var(--au-bg-footer); }
.au-card-foot .au-grow, .au-grow { flex: 1; }
.au-card.au-clip { overflow: hidden; }
.au-card-selectable { text-align: left; cursor: pointer; color: var(--au-ink); font: inherit; }
.au-card-selectable[aria-pressed="true"] { border-color: var(--au-orange); box-shadow: 0 0 0 1px var(--au-orange), 0 1px 2px rgba(24, 23, 28, 0.05); }
.au-card-accent-warning { border-top: 2px solid var(--au-warning); }
.au-card-accent-error { border-top: 2px solid var(--au-error); }
.au-panel { border: 1px solid var(--au-line); border-radius: var(--au-r-panel); padding: 14px 16px; background: var(--au-bg-subtle); display: block; color: var(--au-ink); }
.au-panel:hover { border-color: var(--au-orange); color: var(--au-ink); }

/* ---------- Buttons ---------- */
.au-btn {
  border-radius: var(--au-r-control); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background var(--au-t-fast), border-color var(--au-t-fast);
}
.au-btn-primary { background: var(--au-black); color: var(--au-ink-on-dark); border: 0; padding: 11px 18px; font-size: var(--au-fs-body); min-height: var(--au-touch); }
.au-btn-primary:hover { background: #262421; }
.au-btn-primary:disabled { background: var(--au-ink-disabled); }
.au-btn-secondary { background: transparent; border: 1px solid var(--au-line); padding: 10px 16px; font-size: var(--au-fs-cell); color: var(--au-ink); min-height: 40px; }
.au-btn-secondary:hover { background: var(--au-bg-hover); }
.au-btn-secondary.au-btn-strong { border-color: var(--au-black); }
.au-btn-sm { min-height: 34px; padding: 7px 13px; font-size: 12px; }
.au-btn-md { min-height: 40px; padding: 10px 18px; }

/* ---------- Filter chips ---------- */
.au-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.au-filter { border: 1px solid var(--au-line); background: transparent; border-radius: var(--au-r-pill); padding: 6px 12px; font-size: var(--au-fs-caption); font-weight: 500; color: var(--au-ink-2); }
.au-filter:hover { background: var(--au-bg-hover); }
.au-filter[aria-pressed="true"] { border-color: transparent; background: var(--au-orange-bg); color: var(--au-orange-ink); font-weight: 600; }

/* ---------- Pills & chips ---------- */
.au-pill { font-size: var(--au-fs-pill); font-weight: 600; padding: 3px 8px; border-radius: var(--au-r-pill); display: inline-block; white-space: nowrap; line-height: 1.4; }
.au-pill-orange { background: var(--au-orange-bg); color: var(--au-orange-ink); }
.au-pill-purple { background: var(--au-purple-bg); color: var(--au-purple-ink); }
.au-pill-teal { background: var(--au-teal-bg); color: var(--au-teal-ink); }
.au-pill-success { background: var(--au-success-bg); color: var(--au-success); }
.au-pill-warning { background: var(--au-warning-bg); color: var(--au-warning); }
.au-pill-error { background: var(--au-error-bg); color: var(--au-error); }
.au-pill-info { background: var(--au-info-bg); color: var(--au-info); }
.au-pill-neutral { background: var(--au-neutral-bg); color: var(--au-neutral-ink); }
.au-chip { font-family: var(--au-mono); font-size: var(--au-fs-small); color: var(--au-neutral-ink); background: var(--au-neutral-bg); padding: 3px 8px; border-radius: var(--au-r-chip); }

/* ---------- Fields ---------- */
.au-inp {
  border: 1px solid var(--au-line); border-radius: var(--au-r-control); padding: 10px 11px; font-size: var(--au-fs-body);
  min-height: 42px; width: 100%; background: var(--au-bg-field); color: var(--au-ink);
}
.au-inp:focus { border-color: var(--au-orange); outline: none; }
.au-inp-sm { min-height: 36px; padding: 8px 11px; font-size: 12px; }
.au-inp-invalid { border-color: var(--au-error); color: var(--au-error); }
.au-inp-locked {
  border: 1px solid var(--au-line); border-radius: var(--au-r-control); padding: 10px 11px; font-size: var(--au-fs-cell); min-height: 42px; width: 100%;
  background: var(--au-bg-field-locked); color: var(--au-ink-3); font-family: var(--au-mono); display: flex; align-items: center; justify-content: space-between;
}
.au-field { margin-top: 12px; }
.au-field > .au-inp { margin-top: 6px; }
.au-field-hint { font-size: var(--au-fs-caption); color: var(--au-ink-2); margin-top: 6px; line-height: 1.5; }

/* ---------- Tables ---------- */
.au-table th {
  font-size: var(--au-fs-label); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--au-ink-4);
  text-align: left; padding: 10px 14px; background: var(--au-bg-subtle); border-bottom: 1px solid var(--au-line);
}
.au-table td { font-size: var(--au-fs-cell); padding: 11px 14px; border-bottom: 1px solid var(--au-line-soft); color: var(--au-ink); vertical-align: middle; }
.au-table tbody tr:hover { background: var(--au-bg-subtle); }
.au-table tbody tr.au-row-partner { background: var(--au-purple-bg-soft); }
.au-table tbody tr.au-row-internal { background: var(--au-teal-bg-soft); }
.au-table tbody tr.au-row-whitelabel { background: var(--au-info-bg); }
.au-table tbody tr.au-row-changed { background: var(--au-warning-row); }
.au-cell-primary { font-size: var(--au-fs-cell); font-weight: 600; }
.au-cell-secondary { display: block; font-size: var(--au-fs-caption); color: var(--au-ink-3); margin-top: 2px; }
.au-toolbar { padding: 13px 16px; border-bottom: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 10px; }
/* Sample mode (ADO #797): the banner with the quote button, and a watermark over the page that never takes a click. */
.au-sample-banner { border-color: rgba(122, 90, 248, 0.35); background: rgba(122, 90, 248, 0.06); }
.au-sample { position: relative; }
.au-sample::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; background-image: var(--au-sample-mark); background-repeat: repeat; }

/* AuPager: page controls in a table foot. */
.au-pager { display: flex; align-items: center; gap: 4px; }
.au-pager-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--au-line); border-radius: var(--au-r-control);
  background: var(--au-bg-card); color: var(--au-ink); font-size: var(--au-fs-small); cursor: pointer;
}
.au-pager-btn:hover:not(:disabled) { background: var(--au-bg-hover); }
.au-pager-btn:disabled { opacity: .4; cursor: default; }
.au-pager-btn[aria-current="page"] { background: var(--au-orange-bg); color: var(--au-orange-ink); border-color: transparent; font-weight: 600; }
.au-pager-gap { padding: 0 4px; color: var(--au-ink-4); }
.au-table-foot { padding: 13px 16px; border-top: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 12px; background: var(--au-bg-footer); font-size: var(--au-fs-small); color: var(--au-ink-2); }

/* ---------- KPI tiles ---------- */
.au-kpis { display: flex; gap: 10px; margin-bottom: 16px; }
.au-kpi { flex: 1; text-align: left; padding: 15px 17px; }
.au-kpi-head { display: flex; align-items: center; gap: 8px; }
.au-kpi-dot { width: 6px; height: 6px; border-radius: var(--au-r-pill); }
.au-kpi-title { font-size: 12px; font-weight: 600; }
.au-kpi-row { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
.au-kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.au-kpi-hint { font-size: var(--au-fs-small); color: var(--au-ink-2); }

/* ---------- Toggle ---------- */
.au-toggle { width: 38px; height: 22px; border-radius: var(--au-r-pill); background: var(--au-line); position: relative; display: inline-block; border: 0; padding: 0; flex: none; transition: background var(--au-t-fast); }
.au-toggle[aria-checked="true"] { background: var(--au-teal); }
.au-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: var(--au-r-pill); background: #fff; transition: transform var(--au-t-fast); }
.au-toggle[aria-checked="true"]::after { transform: translateX(16px); }
.au-toggle:disabled { opacity: 0.5; }

/* ---------- Access-level picker ---------- */
.au-levels { display: flex; gap: 6px; align-items: center; }
.au-level {
  font-size: var(--au-fs-caption); padding: 5px 10px; border-radius: var(--au-r-level); border: 1px solid var(--au-line); color: var(--au-ink-3); background: transparent; min-height: 28px;
  transition: background var(--au-t-fast), color var(--au-t-fast);
}
.au-level:hover:not(:disabled) { background: var(--au-bg-hover); color: var(--au-ink); }
.au-level[aria-pressed="true"] { background: var(--au-black); color: var(--au-ink-on-dark); font-weight: 600; border-color: var(--au-black); }
.au-level:disabled { border-color: var(--au-line-soft); color: var(--au-ink-disabled); }
.au-level-request { background: var(--au-info-bg); color: var(--au-info); font-weight: 600; border-color: transparent; }
.au-level-note { font-size: var(--au-fs-caption); color: var(--au-ink-4); }

/* ---------- Function rows in the role editor ---------- */
.au-fn-row { padding: 15px 20px; border-bottom: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 12px; }
.au-fn-row.au-fn-off { opacity: 0.62; }
.au-fn-row.au-fn-changed { background: var(--au-warning-row); }
.au-fn-name { font-size: var(--au-fs-body); font-weight: 600; }
.au-fn-desc { font-size: var(--au-fs-small); color: var(--au-ink-2); margin-top: 3px; }
.au-fn-summary { font-size: var(--au-fs-small); color: var(--au-ink-2); white-space: nowrap; }
.au-features { padding: 4px 20px 14px; background: var(--au-bg-subtle); border-bottom: 1px solid var(--au-line-soft); }
.au-feature-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--au-line-soft); }
.au-feature-row:last-child { border-bottom: 0; }
.au-feature-name { flex: 1; font-size: var(--au-fs-cell); }

/* ---------- Preset list ---------- */
.au-preset { text-align: left; border: 1px solid var(--au-line); background: transparent; border-radius: var(--au-r-control); padding: 10px 12px; min-height: var(--au-touch); width: 100%; color: var(--au-ink); }
.au-preset:hover { background: var(--au-bg-hover); }
.au-preset[aria-pressed="true"] { border-color: var(--au-orange); background: var(--au-orange-bg-soft); }
.au-preset[aria-pressed="true"] .au-preset-name { color: var(--au-orange-ink); font-weight: 600; }
.au-preset-name { font-size: var(--au-fs-cell); font-weight: 500; }
.au-preset-sub { font-size: var(--au-fs-caption); color: var(--au-ink-2); margin-top: 3px; }

/* ---------- Banner / empty states ---------- */
.au-banner { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: var(--au-r-panel); border: 1px solid var(--au-line); background: #fff; margin-bottom: 16px; font-size: var(--au-fs-cell); }
.au-banner-info { border-left: 3px solid var(--au-info); }
.au-empty { padding: 48px 24px; text-align: center; color: var(--au-ink-2); }
.au-empty .au-section-title { color: var(--au-ink); }

/* ---------- Directory, user record, roles ---------- */
.au-title-lg { font-size: 22px; font-weight: 600; letter-spacing: -0.3px; margin: 0; }
.au-title-md { font-size: 19px; font-weight: 600; }
.au-toolbar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.au-search { flex: 1 1 300px; min-width: 240px; width: auto; }
.au-table-wrap { overflow-x: auto; }
.au-table-users { min-width: 1080px; }
.au-row-link { cursor: pointer; }
.au-row-link:focus-visible { outline: 2px solid var(--au-orange); outline-offset: -2px; }
.au-avatar { flex: none; width: 30px; height: 30px; border-radius: var(--au-r-pill); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.au-avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.au-avatar-orange { background: var(--au-orange-bg); color: var(--au-orange-ink); }
.au-avatar-purple { background: var(--au-purple-bg); color: var(--au-purple-ink); }
.au-avatar-teal { background: var(--au-teal-bg); color: var(--au-teal-ink); }
.au-avatar-blue { background: var(--au-info-bg); color: var(--au-info); }
.au-linkbtn { border: 0; background: none; padding: 0 2px; font-size: var(--au-fs-caption); font-weight: 500; color: var(--au-orange-ink); cursor: pointer; }
.au-linkbtn:hover { text-decoration: underline; }
.au-linkbtn:disabled { color: var(--au-ink-3); cursor: default; text-decoration: none; }
.au-backlink { display: inline-block; font-size: var(--au-fs-small); color: var(--au-ink-2); padding: 0 0 14px; }
.au-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--au-line); margin-bottom: 18px; flex-wrap: wrap; }
.au-tab { border: 0; background: transparent; padding: 10px 14px; font-size: var(--au-fs-cell); font-weight: 500; color: var(--au-ink-2); min-height: 40px; border-bottom: 2px solid transparent; }
.au-tab[aria-selected="true"] { font-weight: 600; color: var(--au-ink); border-bottom-color: var(--au-orange); }
.au-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 24px; }
.au-fact { font-size: var(--au-fs-body); margin-top: 7px; }
.au-card-accent-teal { border-top: 2px solid var(--au-teal); }
.au-card-accent-purple { border-top: 2px solid var(--au-purple); }
.au-grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.au-reach-row { display: flex; align-items: flex-start; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--au-line-soft); }
.au-reach-group { flex: none; width: 150px; font-size: var(--au-fs-cell); font-weight: 600; }
.au-reach-items { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.au-reach-fn { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.au-role-facts { display: flex; gap: 14px; font-size: var(--au-fs-small); color: var(--au-ink-2); flex-wrap: wrap; }
.au-role-facts strong { color: var(--au-ink); }
.au-panel-role:hover { box-shadow: 0 8px 24px -14px rgba(24, 23, 28, 0.28); }
.au-holder { display: flex; align-items: center; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--au-line-soft); color: var(--au-ink); }
.au-holder:hover { background: var(--au-bg-subtle); color: var(--au-ink); }
.au-holder:last-child { border-bottom: 0; }
.au-divider { height: 1px; background: var(--au-line-soft); margin: 16px 0; }
.au-nav-note { font-size: var(--au-fs-caption); color: var(--au-ink-4); line-height: 1.6; margin: 10px 10px 0; }
.au-scope-item-child { padding-left: 28px; }
.au-scope-item-dept { padding-left: 52px; font-size: var(--au-fs-small); }
/* Profile › Sign-in security (story #982). */
.au-qr { display: block; width: 200px; height: 200px; image-rendering: pixelated; border: 1px solid var(--au-line); border-radius: var(--au-r-level); background: #fff; }
.au-recovery { columns: 2; column-gap: 24px; margin: 0; padding-left: 22px; font-size: 13px; line-height: 1.9; }
.au-card-focus { box-shadow: 0 0 0 2px var(--au-orange); }
/* A tenant row with the toggle that opens its departments (#981). */
.au-scope-row { display: flex; align-items: center; gap: 2px; }
.au-scope-row > .au-scope-item { flex: 1; min-width: 0; }
.au-scope-expand {
  flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 0 10px; border: 0; background: transparent;
  border-radius: var(--au-r-level); font-size: 11px; color: var(--au-ink-3); cursor: pointer;
}
.au-scope-expand:hover, .au-scope-expand[aria-expanded="true"] { background: var(--au-bg-hover); color: var(--au-ink); }
.au-scope-menu { min-width: 340px; max-height: 70vh; overflow-y: auto; }

/* ---------- Account pages (sign-in, MFA) ---------- */
.au-account { display: flex; justify-content: center; padding: 56px 16px 96px; }
.au-account-card { width: 100%; max-width: 440px; padding: 28px 30px 26px; }
.au-account-wide { max-width: 760px; }
.au-account h1 { margin: 0; }
.au-banner-error { border-left: 3px solid var(--au-error); color: var(--au-error); }
.au-banner-success { border-left: 3px solid var(--au-success); }
.au-validation { display: block; font-size: var(--au-fs-caption); color: var(--au-error); margin-top: 6px; }
.au-qr { background: #fff; border: 1px solid var(--au-line); border-radius: var(--au-r-panel); padding: 10px; width: 240px; }
.au-qr svg { display: block; width: 100%; height: auto; }
.au-recovery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 420px; }
.au-recovery .au-chip { text-align: center; padding: 7px 8px; font-size: var(--au-fs-cell); }
.au-inline-form { display: inline; margin: 0 0 0 10px; }

/* ---------- Layout helpers ---------- */
.au-row { display: flex; align-items: center; gap: 12px; }
.au-cols { display: flex; gap: 16px; align-items: flex-start; }
.au-col-side { flex: none; width: 300px; display: flex; flex-direction: column; gap: 14px; }
.au-col-main { flex: 1; min-width: 0; }
.au-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.au-stack { display: flex; flex-direction: column; gap: 7px; }
.au-mt-1 { margin-top: 6px; } .au-mt-2 { margin-top: 11px; } .au-mt-3 { margin-top: 16px; }
.au-mb-2 { margin-bottom: 14px; } .au-mb-3 { margin-bottom: 16px; }
.au-list { margin: 11px 0 0; padding: 0 0 0 16px; font-size: var(--au-fs-small); color: var(--au-ink-2); line-height: 1.7; }
.au-list strong { color: var(--au-ink); }
.au-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; }

@media (max-width: 1100px) {
  .au-cols { flex-direction: column; }
  .au-col-side { width: 100%; }
  .au-grid-3 { grid-template-columns: 1fr; }
  .au-kpis { flex-wrap: wrap; }
  .au-kpi { min-width: 45%; }
}
@media (max-width: 800px) {
  .au-nav { display: none; }
  .au-main { border-left: 0; padding: 16px; }
  .au-hdr { gap: 10px; padding: 0 12px; }
  .au-hdr-meta { display: none; }
}

/* ---------- Roles: list, tabbed role record, permission grid (design handoff 2026-09-18) ---------- */
.au-page-head-top { align-items: flex-start; flex-wrap: wrap; }
.au-narrow { max-width: 600px; }
.au-field-first { margin-top: 0; }
.au-empty-compact { padding: 28px 24px; }
.au-table-roles { min-width: 980px; }
.au-role-link { font-size: var(--au-fs-cell); font-weight: 600; color: var(--au-orange-ink); }
.au-role-link:hover { text-decoration: underline; }
.au-role-id { font-family: var(--au-mono); font-size: 11px; color: var(--au-ink-4); margin-top: 3px; }
.au-idrow { display: flex; align-items: center; gap: 9px; margin-top: 8px; font-size: var(--au-fs-small); color: var(--au-ink-3); flex-wrap: wrap; }
.au-btn-xs { min-height: 28px; padding: 4px 10px; font-size: 11px; }
.au-perm-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.au-perm-groups { display: flex; flex-direction: column; gap: 14px; }
.au-perm-head { padding: 14px 18px; border-bottom: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 16px; }
.au-perm-group-name { font-size: 14px; font-weight: 600; flex: 1 1 auto; min-width: 0; }
.au-perm-page { padding: 10px 18px; background: var(--au-bg-subtle); border-bottom: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 8px; }
.au-perm-row { padding: 12px 18px; border-bottom: 1px solid var(--au-line-soft); display: flex; align-items: center; gap: 16px; }
.au-perm-row:last-child { border-bottom: 0; }
.au-perm-text { flex: 1 1 auto; min-width: 0; }
.au-perm-cap { font-size: 10.5px; color: var(--au-ink-4); margin-top: 3px; }
.au-level-grid { display: grid; grid-template-columns: repeat(4, 66px); gap: 6px; flex: none; }
.au-level-switch { width: 282px; flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.au-level-switch .au-mono { flex: 1; text-align: left; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-switch-state { font-size: var(--au-fs-cell); font-weight: 600; color: var(--au-ink-3); min-width: 50px; text-align: right; }
.au-switch-state[data-on="true"] { color: var(--au-teal-ink); }
.au-level-col { text-align: center; font-size: 9.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--au-ink-4); }
.au-level-cell {
  border: 1px solid var(--au-line); border-radius: 8px; padding: 6px 4px; font-size: 11px; font-weight: 500; background: transparent;
  color: var(--au-ink-2); min-height: 32px; display: flex; align-items: center; justify-content: center; text-align: center;
}
button.au-level-cell:not(:disabled):hover { background: var(--au-bg-hover); }
.au-level-cell[aria-pressed="true"], button.au-level-cell[aria-pressed="true"]:hover { border-color: var(--au-black); background: var(--au-black); color: var(--au-ink-on-dark); font-weight: 600; }
.au-level-cell:disabled { cursor: default; }
.au-level-dead { border: 1px dashed var(--au-line-soft); border-radius: 8px; min-height: 32px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--au-ink-disabled); }
.au-danger { border-color: #F6D7D7; background: rgba(253, 236, 236, 0.5); padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.au-danger-title { font-size: var(--au-fs-cell); font-weight: 600; color: var(--au-error); }
.au-btn-danger { border: 0; background: var(--au-error); color: var(--au-ink-on-dark); padding: 10px 16px; font-size: var(--au-fs-cell); font-weight: 600; min-height: 40px; white-space: nowrap; flex: none; }
.au-btn-danger:hover { background: #A83232; }
.au-btn-danger:disabled { background: var(--au-ink-disabled); cursor: not-allowed; }
@media (max-width: 760px) {
  .au-perm-head .au-level-grid { display: none; }
  .au-perm-row { flex-wrap: wrap; }
  .au-perm-text { flex-basis: 100%; }
}

/* ---------- Sign-in: split layout with brand panel and segmented tabs (design handoff 2026-09-18) ---------- */
.au-auth { display: flex; align-items: stretch; min-height: 100vh; background: var(--au-bg-field); }
.au-auth-brand {
  flex: none; width: 420px; padding: 44px 40px; display: flex; flex-direction: column; border-right: 1px solid var(--au-line);
  background: linear-gradient(160deg, rgba(var(--au-aurora-rgb), 0.10), color-mix(in srgb, var(--au-brand-3) 10%, transparent) 48%, color-mix(in srgb, var(--au-brand-4) 12%, transparent));
}
.au-auth-spacer { flex: 1; min-height: 32px; }
.au-auth-headline { font-size: 27px; font-weight: 600; letter-spacing: -0.5px; line-height: 1.25; text-wrap: pretty; }
.au-auth-copy { font-size: 12.5px; color: var(--au-ink-2); line-height: 1.7; margin: 16px 0 0; }
.au-auth-rule { height: 1px; background: rgba(24, 23, 28, 0.09); margin: 26px 0; }
.au-auth-support { font-size: 12.5px; margin-top: 8px; }
.au-auth-support a { color: var(--au-ink); }
.au-auth-main { flex: 1; min-width: 0; padding: 44px 48px 40px; }
.au-auth-body { max-width: 440px; }
.au-auth-body h1 { margin: 0; }
.au-auth-body .au-account-card { max-width: none; padding: 0; }
.au-auth-field { margin-top: 20px; }
.au-auth-field + .au-auth-field { margin-top: 14px; }
.au-auth-submit { width: 100%; margin-top: 18px; }
.au-auth-note { font-size: 11.5px; color: var(--au-ink-4); line-height: 1.6; margin: 12px 0 0; }
.au-auth-panel { margin-top: 20px; border: 1px solid var(--au-line); border-radius: 12px; padding: 20px; background: var(--au-bg-field); }
.au-auth-panel-title { font-size: 14px; font-weight: 600; margin-top: 14px; }
.au-seg { display: flex; gap: 6px; margin-top: 18px; padding: 4px; background: var(--au-bg-hover); border-radius: 10px; }
.au-seg-item {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 8px; padding: 9px 10px;
  font-size: 12px; font-weight: 600; min-height: 38px; color: var(--au-ink-2);
}
.au-seg-item:hover { color: var(--au-ink); }
.au-seg-item[aria-current="page"], .au-seg-item[aria-checked="true"] { background: var(--au-bg-field); color: var(--au-ink); box-shadow: 0 1px 2px rgba(24, 23, 28, 0.10); }
/* A segmented control of buttons (radio): no native button chrome. Inline: sits in a row of page controls (story #988). */
button.au-seg-item { border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.au-seg-inline { display: inline-flex; margin-top: 0; gap: 2px; padding: 3px; border-radius: var(--au-r-control); }
.au-seg-inline .au-seg-item { flex: none; min-height: 30px; padding: 5px 12px; white-space: nowrap; border-radius: 7px; }
.au-seg-xs .au-seg-item { min-height: 22px; padding: 2px 8px; font-size: 11px; }
@media (max-width: 860px) {
  .au-auth { flex-direction: column; }
  .au-auth-brand { width: 100%; padding: 20px 24px; border-right: 0; border-bottom: 1px solid var(--au-line); }
  .au-auth-spacer, .au-auth-pitch { display: none; }
  .au-auth-brand .au-lbl { margin-top: 14px; }
  .au-auth-main { padding: 28px 24px 40px; }
}
.au-logo-mark { display: block; width: auto; max-width: none; }
/* ---------- Role permissions: switch + level segment + sticky save bar (second design brief of 2026-09-21) ---------- */
.au-perm-head { padding: 15px 20px; gap: 14px; flex-wrap: wrap; }
.au-perm-page { padding: 9px 20px; }
.au-perm-row { padding: 13px 20px; gap: 18px; }
.au-perm-bulk { flex: none; border: 0; background: transparent; padding: 4px 0; font-size: var(--au-fs-small); font-weight: 600; color: var(--au-orange-ink); min-height: 30px; }
.au-perm-bulk:hover { color: var(--au-orange); text-decoration: underline; }
.au-level-seg { display: flex; gap: 4px; flex: none; background: var(--au-bg-hover); border-radius: 9px; padding: 3px; }
.au-level-opt { border: 0; border-radius: 7px; padding: 5px 11px; font-size: 11px; font-weight: 500; background: transparent; color: var(--au-ink-2); min-height: 30px; }
.au-level-opt[aria-pressed="true"] { font-weight: 600; background: var(--au-bg-field); color: var(--au-ink); box-shadow: 0 1px 2px rgba(24, 23, 28, 0.10); }
.au-level-opt:disabled { cursor: default; }
.au-perm-row .au-switch-state { flex: none; width: 54px; min-width: 54px; text-align: right; font-size: var(--au-fs-small); font-weight: 400; color: var(--au-ink-4); }
.au-perm-row .au-switch-state[data-on="true"] { font-weight: 600; color: var(--au-success); }
.au-switch { flex: none; width: 40px; height: 23px; border-radius: var(--au-r-pill); border: 0; background: #E4E3EA; position: relative; padding: 0; transition: background var(--au-t-fast); }
.au-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: var(--au-r-pill); background: #fff; box-shadow: 0 1px 2px rgba(24, 23, 28, 0.22); transition: transform var(--au-t-fast); }
.au-switch[aria-checked="true"] { background: var(--au-orange); }
.au-switch[aria-checked="true"]::after { transform: translateX(17px); }
.au-switch:disabled { opacity: 0.55; cursor: default; }
.au-savebar { position: sticky; bottom: 16px; margin-top: 14px; padding: 13px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: rgba(255, 255, 255, 0.96); z-index: 5; }
.au-savebar-note { font-size: 12px; color: var(--au-ink-2); flex: 1 1 220px; min-width: 0; }
@media (max-width: 760px) { .au-perm-text { flex-basis: 100%; } }
/* Sign-in brand row: the mark keeps its natural width, and the divider must be visible on the gradient panel. */
.au-auth-brand .au-hdr-brand img { height: 30px; }
.au-auth-brand .au-vdiv { height: 24px; background: rgba(24, 23, 28, 0.12); }
/* FocusOnNavigate moves focus to the page heading for screen readers; that programmatic focus must not draw a ring. */
h1:focus, h1:focus-visible, [tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
/* ---------- Assignment editor ---------- */
.au-check { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; font-size: var(--au-fs-cell); cursor: pointer; }
.au-check input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--au-orange); flex: none; }
.au-check-sm { padding: 3px 0; font-size: 12px; color: var(--au-ink-2); }
.au-check-children { margin: 0 0 6px 24px; padding-left: 12px; border-left: 2px solid var(--au-line-soft); display: flex; flex-direction: column; }
.au-scope-group + .au-scope-group { margin-top: 6px; }

/* Widget dashboards (epic #928, handoff 2026-10-31 widget dashboards §3–§6, §9). Desktop: widgets at their cells of a 12-column grid with
   96 px rows; under 960 px and on tablets 6 columns in reading order; phones one column. Edit mode is desktop only. */
:root {
  --dash-row: 96px;
  --dash-gap: 14px;
  --widget-radius: 14px;
  --widget-header: 40px;
  --edit-guide: #E0DCF0;
  --edit-ghost-border: var(--au-orange);
  --edit-ghost-fill: var(--au-accent-wash);
  --skeleton: #EEEDF2;
  --own-period-bg: #EBF1FB;
  --own-period-ink: #2256A6;
  --template-banner-bg: #F5F3FF;
  --template-banner-line: #DCD3FD;
  --template-banner-ink: #5B3FD6;
  --partial: #F0A93B;
  --partial-ink: #B07300;
  --spark-good: var(--chart-primary-solid);
  --spark-bad: var(--chart-primary-solid);
  --series-2: var(--chart-secondary);
}
.au-dash-grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: var(--dash-row); gap: var(--dash-gap); }
.au-dash-editing { padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.5); }
.au-dash-guides { position: absolute; inset: 16px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--dash-gap); pointer-events: none; }
.au-dash-guides span { border: 1px dashed var(--edit-guide); border-radius: 8px; background: rgba(122, 90, 248, 0.025); }
.au-dash-ghost { grid-column: var(--au-x) / span var(--au-w); grid-row: var(--au-y) / span var(--au-h); border: 2px dashed var(--edit-ghost-border); background: var(--edit-ghost-fill); border-radius: var(--widget-radius); }

.au-widget { grid-column: var(--au-x) / span var(--au-w); grid-row: var(--au-y) / span var(--au-h); position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: rgba(255, 255, 255, 0.94); border: 1px solid var(--au-line); border-radius: var(--widget-radius); box-shadow: 0 1px 2px rgba(24, 23, 28, 0.05); }
.au-widget-editing { outline-offset: 3px; }
.au-widget-editing:focus-visible { outline: 2px solid var(--au-orange); }
.au-widget-lifted { z-index: 5; box-shadow: 0 18px 40px -16px rgba(24, 23, 28, 0.35); }
.au-widget-head { display: flex; align-items: flex-start; gap: 8px; padding: 11px 12px 0 15px; height: var(--widget-header); box-sizing: border-box; flex: none; }
.au-widget-editing .au-widget-head { cursor: grab; user-select: none; touch-action: none; }
.au-widget-grip { color: #B0AFA9; font-size: 12px; line-height: 16px; letter-spacing: -2px; flex: none; }
.au-widget-titles { flex: 1; min-width: 0; }
.au-widget-title-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.au-widget-title { font-size: 12.5px; font-weight: 600; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* The ? beside the title (story #940): the explanation shows while the pointer is on it or it has focus, and goes when it leaves. */
.au-widget-info { position: relative; flex: none; width: 14px; height: 14px; box-sizing: border-box; border: 1.5px solid #B0AFA9; border-radius: 100px; color: #8A8993;
  font-size: 9px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: help; user-select: none; }
.au-widget-info:hover, .au-widget-info:focus-visible { border-color: var(--au-ink); color: var(--au-ink); outline: none; }
.au-widget-tip { display: none; position: absolute; top: 20px; left: -10px; z-index: 50; width: 280px; max-width: 70vw; padding: 10px 12px; border-radius: 9px;
  background: var(--au-ink); color: #fff; font-size: 11.5px; font-weight: 400; line-height: 1.45; letter-spacing: 0; white-space: pre-line; text-align: left; cursor: default;
  box-shadow: 0 18px 40px -16px rgba(24, 23, 28, 0.45); pointer-events: none; }
/* Widgets in the right half of the grid open the explanation to the left, so it never runs past the page (QA 2026-10-31). */
.au-widget-info-left .au-widget-tip { left: auto; right: -10px; }
.au-widget-info:hover .au-widget-tip, .au-widget-info:focus .au-widget-tip { display: block; }
.au-widget:has(.au-widget-info:hover), .au-widget:has(.au-widget-info:focus) { z-index: 30; }
.au-widget-sample-pill { font-size: 10px; font-weight: 600; border-radius: 100px; padding: 2px 7px; background: #F5F3FF; color: #5B3FD6; white-space: nowrap; flex: none; }
.au-widget-sample { margin: -4px 15px 11px; font-size: 11.5px; }
.au-widget-sub { font-size: 10.5px; color: #8A8993; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-widget-own { font-size: 10px; font-weight: 600; border-radius: 100px; padding: 2px 7px; background: var(--own-period-bg); color: var(--own-period-ink); white-space: nowrap; flex: none; }
.au-widget-more { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 7px; cursor: pointer; color: #8A8993; font-size: 15px; line-height: 1; flex: none; }
.au-widget-more:hover { background: var(--au-bg-hover); }
.au-widget-actions { display: flex; gap: 4px; flex: none; }
.au-widget-step { width: 26px; height: 26px; border: 1px solid var(--au-line); background: #fff; border-radius: 7px; cursor: pointer; color: #6B6A72; font-size: 14px; line-height: 1; flex: none; }
.au-widget-step:hover { background: var(--au-bg-hover); }
.au-widget-tool { width: 26px; height: 26px; border: 1px solid var(--au-line); background: #fff; border-radius: 7px; cursor: pointer; color: #6B6A72; font-size: 12px; flex: none; }
.au-widget-tool-remove { color: var(--au-error); font-size: 13px; }
.au-widget-menu { position: absolute; top: 38px; right: 10px; z-index: 40; min-width: 170px; background: #fff; border: 1px solid var(--au-line); border-radius: 10px; box-shadow: 0 18px 40px -16px rgba(24, 23, 28, 0.35); padding: 5px; }
.au-widget-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 7px; padding: 8px 10px; font-size: 12.5px; cursor: pointer; color: var(--au-ink); }
.au-widget-menu button:hover { background: var(--au-bg-hover); }
.au-widget-menu .au-widget-menu-danger { color: var(--au-error); }
.au-widget-body { flex: 1; min-height: 0; overflow: hidden; padding: 6px 15px 12px; display: flex; flex-direction: column; container-type: inline-size; }
.au-widget-foot { align-self: flex-start; margin: -4px 15px 11px; border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--au-orange-ink); cursor: pointer; }
.au-widget-foot:hover { color: var(--au-orange); }
.au-widget-partial { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 11px; color: var(--partial-ink); }
.au-widget-partial span { width: 6px; height: 6px; border-radius: 100px; background: var(--partial); flex: none; }
.au-widget-empty { margin: auto; text-align: center; font-size: 11.5px; color: #8A8993; }
.au-widget-empty-title { font-size: 12.5px; font-weight: 600; color: var(--au-ink); margin-bottom: 2px; }
.au-widget-error { margin: auto; text-align: center; font-size: 11.5px; }
.au-widget-error-title { font-size: 12.5px; font-weight: 600; color: var(--au-error); margin-bottom: 2px; }
.au-widget-offnote { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #8A8993; }
.au-widget-offdot { width: 18px; height: 18px; border-radius: 100px; background: var(--au-bg-hover); color: #8A8993; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.au-widget-off .au-widget-head { display: none; }
.au-widget-off .au-widget-body { justify-content: center; padding-top: 12px; }
.au-widget-off.au-widget-editing { opacity: 0.7; background: repeating-linear-gradient(135deg, #FBFBFD 0 10px, #F4F4F7 10px 20px); }
.au-widget-off.au-widget-editing .au-widget-head { display: flex; }
.au-widget-resize { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.au-widget-resize::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; border-right: 2.5px solid var(--au-orange); border-bottom: 2.5px solid var(--au-orange); border-radius: 0 0 3px 0; }
.au-widget-keys { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); z-index: 6; white-space: nowrap; font-size: 10.5px; color: #fff; background: var(--au-ink); border-radius: 7px; padding: 3px 8px; }
.au-widget-skeleton { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; flex: 1; }
.au-widget-skeleton span { display: block; height: 12px; border-radius: 6px; background: var(--skeleton); animation: au-widget-pulse 1.2s ease-in-out infinite; }
.au-widget-skeleton span:nth-child(2) { width: 80%; }
.au-widget-skeleton span:nth-child(3) { width: 60%; }
.au-widget-skeleton span:nth-child(4) { width: 40%; }
.au-widget-skeleton-kpi span:first-child { height: 24px; width: 50%; }
.au-widget-skeleton-kpi span:nth-child(n+3) { display: none; }
.au-widget-skeleton-chart span:first-child, .au-widget-skeleton-calendar span:first-child { flex: 1; height: auto; width: 100%; }
@keyframes au-widget-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .au-widget-skeleton span { animation: none; } }
@media (max-width: 959px) {
  .au-dash-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; }
  .au-widget { grid-column: span var(--au-w-md); grid-row: span var(--au-h); }
}
@media (max-width: 640px) {
  .au-dash-grid { grid-template-columns: minmax(0, 1fr); }
  .au-widget { grid-column: 1 / -1; }
}
