@charset "UTF-8";
@layer tokens, base, layout, components, pages, utilities;
@layer tokens {
  :root {
    --white: #FFF;
    --brand-50: #EBF1F6;
    --brand-100: #D6E3EE;
    --brand-300: #93B4CF;
    --brand-400: #6A96BC;
    --brand-600: #2F6690;
    --brand-700: #27557A;
    --brand-800: #1D2B3A;
    --brand-900: #151F2A;
    --brand-950: #0E151D;
    --gold-400: #C9973A;
    --gold-100: #F4E8CF;
    --gold-700: #9A7024;
    --crimson-600: #B9203D;
    --crimson-100: #F7DCE2;
    --crimson-900: #6B1224;
    --mist-50: #FBFCFD;
    --mist-75: #F6F8FA;
    --mist-100: #F0F3F6;
    --mist-150: #E6EBF0;
    --mist-200: #EEF2F6;
    --mist-250: #E3E8EE;
    --mist-300: #D5DDE5;
    --mist-400: #B7C3CF;
    --ink-200: #E8EDF2;
    --ink-300: #ABB6C1;
    --ink-400: #7A8794;
    --ink-500: #4A5A6A;
    --ink-700: #2E3B49;
    --ink-900: #1D2B3A;
    --green-50: #E6F2EA;
    --green-100: #D8EBDF;
    --green-700: #2E7D4F;
    --green-900: #1F5A37;
    --amber-50: #FBF0DA;
    --amber-100: #F6E7C8;
    --amber-800: #9E640F;
    --amber-900: #6B4708;
    --red-50: #FBE7E3;
    --red-100: #F7DCD9;
    --red-700: #B3261E;
    --red-900: #7A2016;
    --emerald-600: #059669;
    --emerald-400: #34D399;
    --amber-500: #F59E0B;
    --amber-600: #D97706;
    --amber-400: #FBBF24;
    --amber-700: #B45309;
    --red-400: #F87171;
    --red-600: #DC2626;
    --red-800: #991B1B;
    --violet-400: #A78BFA;
    --violet-600: #7C3AED;
    --cyan-400: #22D3EE;
    --cyan-700: #0E7490;
    --pink-400: #F472B6;
    --pink-600: #DB2777;
    --font-sans: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: var(--font-sans);
    --weight-display: 800;
    --font-mono: 'DM Mono', ui-monospace, 'Courier New', monospace;
    --font-label: var(--font-sans);
    --font-num: var(--font-sans);
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --control-font-size: 1rem;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;
    --dur-fast: 150ms;
    --dur-base: 200ms;
    --dur-slow: 300ms;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
  }
  @media (prefers-reduced-motion: reduce) {
    :root {
      --dur-fast: 0ms;
      --dur-base: 0ms;
      --dur-slow: 0ms;
    }
  }
  :root {
    --surface: var(--mist-75);
    --surface-raised: var(--white);
    --surface-sunken: var(--mist-200);
    --text: var(--ink-900);
    --text-muted: var(--ink-500);
    --text-faint: var(--ink-400);
    --heading: var(--brand-800);
    --on-accent: var(--white);
    --border: var(--mist-300);
    --border-strong: var(--mist-400);
    --border-subtle: var(--mist-150);
    --accent: var(--brand-700);
    --accent-hover: var(--brand-800);
    --accent-subtle: var(--brand-50);
    --focus-ring: rgb(39, 85, 122, 0.35);
    --warm: var(--gold-400);
    --warm-hover: var(--gold-100);
    --on-warm: var(--brand-900);
    --success: var(--green-700);
    --warning: var(--amber-800);
    --danger: var(--red-700);
    --info: var(--brand-600);
    --success-subtle: var(--green-50);
    --warning-subtle: var(--amber-50);
    --danger-subtle: var(--red-50);
    --info-subtle: var(--brand-50);
    --success-tint: var(--green-100);
    --warning-tint: var(--amber-100);
    --danger-tint: var(--red-100);
    --info-tint: var(--brand-100);
    --neutral-tint: var(--mist-250);
    --success-ink: var(--green-900);
    --warning-ink: var(--amber-900);
    --danger-ink: var(--red-900);
    --info-ink: var(--brand-800);
    --reg-gambling: var(--violet-600);
    --reg-liquor: var(--amber-700);
    --reg-aml: var(--cyan-700);
    --reg-food-safety: var(--emerald-600);
    --reg-welfare: var(--pink-600);
    --reg-gambling-subtle: #F5F3FF;
    --reg-liquor-subtle: #FFFBEB;
    --reg-aml-subtle: #ECFEFF;
    --reg-food-safety-subtle: #ECFDF5;
    --reg-welfare-subtle: #FDF2F8;
    --tier-black-pearl: #6250D6;
    --tier-aquamarine: #199E70;
    --tier-pearl: #2A78D6;
    --tier-coral: var(--crimson-600);
    --tier-uncarded: var(--ink-400);
    --sev-critical: var(--red-900);
    --sev-high: var(--red-700);
    --sev-medium: var(--amber-900);
    --sev-low: var(--ink-500);
    --status-draft: var(--ink-500);
    --status-review: var(--amber-900);
    --status-open: var(--brand-800);
    --status-closed: var(--green-900);
    --shadow-1: 0 1px 2px rgb(29, 43, 58, 0.06), 0 1px 3px rgb(29, 43, 58, 0.08);
    --shadow-2: 0 4px 10px rgb(29, 43, 58, 0.08), 0 2px 4px rgb(29, 43, 58, 0.06);
    --shadow-3: 0 12px 32px rgb(29, 43, 58, 0.16), 0 4px 8px rgb(29, 43, 58, 0.08);
    --overlay-bg: rgb(29, 43, 58, 0.55);
  }
  [data-theme=dark] {
    color-scheme: dark;
    --surface: var(--brand-900);
    --surface-raised: var(--brand-800);
    --surface-sunken: var(--brand-950);
    --text: var(--ink-200);
    --text-muted: var(--ink-300);
    --text-faint: var(--ink-400);
    --heading: var(--ink-200);
    --on-accent: var(--brand-900);
    --border: rgb(232, 237, 242, 0.14);
    --border-strong: rgb(232, 237, 242, 0.28);
    --border-subtle: rgb(232, 237, 242, 0.08);
    --accent: var(--gold-400);
    --accent-hover: var(--gold-100);
    --accent-subtle: rgb(201, 151, 58, 0.16);
    --focus-ring: rgb(201, 151, 58, 0.45);
    --warm: var(--brand-600);
    --warm-hover: var(--brand-700);
    --on-warm: var(--white);
    --success: var(--emerald-400);
    --warning: var(--amber-400);
    --danger: var(--red-400);
    --info: var(--brand-300);
    --success-subtle: color-mix(in srgb, var(--emerald-400) 14%, transparent);
    --warning-subtle: color-mix(in srgb, var(--amber-400) 14%, transparent);
    --danger-subtle: color-mix(in srgb, var(--red-400) 14%, transparent);
    --info-subtle: color-mix(in srgb, var(--brand-300) 14%, transparent);
    --success-tint: color-mix(in srgb, var(--emerald-400) 22%, transparent);
    --warning-tint: color-mix(in srgb, var(--amber-400) 22%, transparent);
    --danger-tint: color-mix(in srgb, var(--red-400) 22%, transparent);
    --info-tint: color-mix(in srgb, var(--brand-300) 22%, transparent);
    --neutral-tint: rgb(232, 237, 242, 0.1);
    --success-ink: var(--emerald-400);
    --warning-ink: var(--amber-400);
    --danger-ink: var(--red-400);
    --info-ink: var(--brand-300);
    --reg-gambling: var(--violet-400);
    --reg-liquor: var(--amber-400);
    --reg-aml: var(--cyan-400);
    --reg-food-safety: var(--emerald-400);
    --reg-welfare: var(--pink-400);
    --reg-gambling-subtle: color-mix(in srgb, var(--violet-400) 14%, transparent);
    --reg-liquor-subtle: color-mix(in srgb, var(--amber-400) 14%, transparent);
    --reg-aml-subtle: color-mix(in srgb, var(--cyan-400) 14%, transparent);
    --reg-food-safety-subtle: color-mix(in srgb, var(--emerald-400) 14%, transparent);
    --reg-welfare-subtle: color-mix(in srgb, var(--pink-400) 14%, transparent);
    --tier-black-pearl: #9085E9;
    --tier-aquamarine: #1FAE7B;
    --tier-pearl: #4A93EA;
    --tier-coral: #E0643A;
    --tier-uncarded: var(--ink-300);
    --sev-critical: var(--red-400);
    --sev-high: var(--red-400);
    --sev-medium: var(--amber-400);
    --sev-low: var(--ink-300);
    --status-draft: var(--ink-300);
    --status-review: var(--amber-400);
    --status-open: var(--brand-300);
    --status-closed: var(--emerald-400);
    --shadow-1: 0 1px 2px rgb(0, 0, 0, 0.4);
    --shadow-2: 0 4px 10px rgb(0, 0, 0, 0.45);
    --shadow-3: 0 12px 32px rgb(0, 0, 0, 0.6);
    --overlay-bg: rgb(8, 13, 19, 0.7);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme=light]) {
      color-scheme: dark;
      --surface: var(--brand-900);
      --surface-raised: var(--brand-800);
      --surface-sunken: var(--brand-950);
      --text: var(--ink-200);
      --text-muted: var(--ink-300);
      --text-faint: var(--ink-400);
      --heading: var(--ink-200);
      --on-accent: var(--brand-900);
      --border: rgb(232, 237, 242, 0.14);
      --border-strong: rgb(232, 237, 242, 0.28);
      --border-subtle: rgb(232, 237, 242, 0.08);
      --accent: var(--gold-400);
      --accent-hover: var(--gold-100);
      --accent-subtle: rgb(201, 151, 58, 0.16);
      --focus-ring: rgb(201, 151, 58, 0.45);
      --warm: var(--brand-600);
      --warm-hover: var(--brand-700);
      --on-warm: var(--white);
      --success: var(--emerald-400);
      --warning: var(--amber-400);
      --danger: var(--red-400);
      --info: var(--brand-300);
      --success-subtle: color-mix(in srgb, var(--emerald-400) 14%, transparent);
      --warning-subtle: color-mix(in srgb, var(--amber-400) 14%, transparent);
      --danger-subtle: color-mix(in srgb, var(--red-400) 14%, transparent);
      --info-subtle: color-mix(in srgb, var(--brand-300) 14%, transparent);
      --success-tint: color-mix(in srgb, var(--emerald-400) 22%, transparent);
      --warning-tint: color-mix(in srgb, var(--amber-400) 22%, transparent);
      --danger-tint: color-mix(in srgb, var(--red-400) 22%, transparent);
      --info-tint: color-mix(in srgb, var(--brand-300) 22%, transparent);
      --neutral-tint: rgb(232, 237, 242, 0.1);
      --success-ink: var(--emerald-400);
      --warning-ink: var(--amber-400);
      --danger-ink: var(--red-400);
      --info-ink: var(--brand-300);
      --reg-gambling: var(--violet-400);
      --reg-liquor: var(--amber-400);
      --reg-aml: var(--cyan-400);
      --reg-food-safety: var(--emerald-400);
      --reg-welfare: var(--pink-400);
      --reg-gambling-subtle: color-mix(in srgb, var(--violet-400) 14%, transparent);
      --reg-liquor-subtle: color-mix(in srgb, var(--amber-400) 14%, transparent);
      --reg-aml-subtle: color-mix(in srgb, var(--cyan-400) 14%, transparent);
      --reg-food-safety-subtle: color-mix(in srgb, var(--emerald-400) 14%, transparent);
      --reg-welfare-subtle: color-mix(in srgb, var(--pink-400) 14%, transparent);
      --tier-black-pearl: #9085E9;
      --tier-aquamarine: #1FAE7B;
      --tier-pearl: #4A93EA;
      --tier-coral: #E0643A;
      --tier-uncarded: var(--ink-300);
      --sev-critical: var(--red-400);
      --sev-high: var(--red-400);
      --sev-medium: var(--amber-400);
      --sev-low: var(--ink-300);
      --status-draft: var(--ink-300);
      --status-review: var(--amber-400);
      --status-open: var(--brand-300);
      --status-closed: var(--emerald-400);
      --shadow-1: 0 1px 2px rgb(0, 0, 0, 0.4);
      --shadow-2: 0 4px 10px rgb(0, 0, 0, 0.45);
      --shadow-3: 0 12px 32px rgb(0, 0, 0, 0.6);
      --overlay-bg: rgb(8, 13, 19, 0.7);
    }
  }
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/dm-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@layer base {
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html {
    text-size-adjust: 100%;
    tab-size: 4;
    font-size: 16px;
  }
  body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--surface);
    text-align: left;
  }
  h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
  }
  p {
    margin-top: 0;
    margin-bottom: 1rem;
  }
  ol, ul {
    padding-left: 2rem;
    margin-top: 0;
    margin-bottom: 1rem;
  }
  ol ol, ul ul, ol ul, ul ol {
    margin-bottom: 0;
  }
  dt {
    font-weight: 700;
  }
  dd {
    margin-bottom: 0.5rem;
    margin-left: 0;
  }
  b, strong {
    font-weight: bolder;
  }
  a {
    color: var(--accent);
    text-decoration: underline;
  }
  a:hover {
    color: var(--accent-hover);
  }
  img, svg {
    vertical-align: middle;
  }
  table {
    border-collapse: collapse;
  }
  caption {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: var(--text-muted);
    text-align: left;
  }
  button, input, optgroup, select, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
  }
  button, select {
    text-transform: none;
  }
  button, [type=button], [type=reset], [type=submit] {
    appearance: button;
  }
  fieldset {
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
  }
  legend {
    float: left;
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
  }
  hr {
    margin: 1rem 0;
    color: inherit;
    border: 0;
    border-top: 1px solid;
    opacity: 0.25;
  }
  code, kbd, pre, samp {
    font-family: var(--font-mono);
  }
  pre {
    display: block;
    margin-top: 0;
    margin-bottom: 1rem;
    overflow: auto;
    font-size: 0.875em;
  }
  code {
    font-size: 0.875em;
  }
  small {
    font-size: 0.875em;
  }
  mark {
    padding: 0.1875em;
    background-color: var(--warning-subtle);
  }
  [hidden] {
    display: none !important;
  }
}
@layer layout {
  .shell {
    --menubar-height: 64px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--surface);
  }
  .shell__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-wrap: break-word;
    background: var(--surface);
  }
  .shell__page {
    padding: var(--space-6);
  }
  .shell__inner {
    max-width: 1200px;
    margin: 0 auto;
  }
  .shell__inner--wide {
    max-width: 1760px;
  }
  .shell__scrim {
    display: none;
    position: fixed;
    inset: var(--menubar-height) 0 0;
    z-index: 1040;
    background: var(--overlay-bg);
  }
  .shell__scrim.is-open {
    display: block;
  }
  .shell__scrim[hidden] {
    display: none;
  }
  .impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding: var(--space-2) var(--space-4);
    border-left: 3px solid var(--warning);
    border-radius: var(--radius-md);
    background: var(--warning-subtle);
    color: var(--text);
    font-size: var(--text-base);
  }
  .impersonation-banner svg {
    width: 15px;
    height: 15px;
    vertical-align: -2px;
    margin-right: var(--space-1);
  }
  .impersonation-banner strong {
    font-weight: 600;
  }
  @media (max-width: 767.98px) {
    .shell__page {
      padding: var(--space-4);
    }
  }
  @media (min-width: 1024px) {
    .shell__scrim.is-open {
      display: none;
    }
  }
  @media print {
    .shell {
      display: block;
      height: auto;
      overflow: visible;
    }
    .shell__body {
      overflow: visible;
    }
    .shell__page {
      padding: 0;
    }
  }
  .body--auth {
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    background: radial-gradient(ellipse 90% 55% at 50% -12%, var(--accent-subtle) 0%, transparent 65%) var(--surface);
  }
  .auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-8) var(--space-4);
  }
  .auth-page__brand {
    display: flex;
  }
  .auth-page__footer {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-faint);
    text-align: center;
    letter-spacing: 0.02em;
  }
  .auth-card {
    width: 100%;
    max-width: 26rem;
    padding: var(--space-7) var(--space-7) var(--space-6);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
  }
  .auth-card__title {
    margin: 0 0 var(--space-1);
    font-family: var(--font-display);
    font-size: calc(var(--text-xl) * 1.4);
    font-weight: var(--weight-display);
    line-height: 1.1;
    text-align: center;
  }
  .auth-card__subtitle {
    margin: 0 0 var(--space-6);
    font-size: var(--text-base);
    color: var(--text-muted);
    text-align: center;
  }
  .auth-card__footer {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
  }
  .password-wrap {
    position: relative;
  }
  .password-wrap .form-control {
    padding-right: 2.5rem;
  }
  .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    padding: var(--space-1);
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
  }
  .password-toggle:hover {
    color: var(--text);
  }
  .password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .password-toggle i,
  .password-toggle svg {
    width: 16px;
    height: 16px;
  }
  .code-input {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    letter-spacing: 0.35em;
    text-align: center;
    padding: var(--space-3);
  }
  .code-input--backup {
    font-size: 1.15rem;
    letter-spacing: 0.1em;
  }
  .brand-lockup {
    display: inline-flex;
    line-height: 0;
  }
  .brand-lockup__logo {
    width: min(17rem, 70vw);
    height: auto;
  }
  .brand-lockup__logo--dark {
    display: none;
  }
  [data-theme=dark] .brand-lockup__logo--light {
    display: none;
  }
  [data-theme=dark] .brand-lockup__logo--dark {
    display: block;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme=light]) .brand-lockup__logo--light {
      display: none;
    }
    :root:not([data-theme=light]) .brand-lockup__logo--dark {
      display: block;
    }
  }
  .auth-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-2);
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--heading);
  }
}
@layer components {
  .page-header {
    margin-bottom: var(--space-5);
  }
  .page-header__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3) var(--space-4);
    flex-wrap: wrap;
  }
  .page-header__kicker {
    font-family: var(--font-label);
    font-size: 0.65625rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--space-1);
  }
  .page-header__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-display);
    letter-spacing: 0;
    line-height: 1.1;
    color: var(--heading);
  }
  .page-header__lead {
    margin: var(--space-1) 0 0;
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 62ch;
  }
  .page-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
  }
  @media (max-width: 639.98px) {
    .page-header__actions {
      width: 100%;
    }
  }
  .page-header__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2) var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .page-header__meta-item,
  .page-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 0.4375rem;
  }
  .page-header__meta-item i, .page-header__meta-item svg,
  .page-hero__meta-item i,
  .page-hero__meta-item svg {
    width: 13px;
    height: 13px;
    opacity: 0.7;
  }
  .page-header__meta-item--end,
  .page-hero__meta-item--end {
    margin-left: auto;
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
  }
  .page-header__alert,
  .page-hero__alert {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.1875rem 0.5625rem;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    color: var(--accent);
  }
  .page-header--welcome, .page-header--dark {
    border-bottom: none;
    padding: var(--space-5) var(--space-6);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  }
  .page-header--welcome .page-header__kicker, .page-header--dark .page-header__kicker {
    color: var(--gold-400);
  }
  .page-header--welcome .page-header__title, .page-header--dark .page-header__title {
    color: var(--ink-200);
  }
  .page-header--welcome .page-header__lead, .page-header--dark .page-header__lead {
    color: var(--ink-300);
  }
  .page-header--welcome .page-header__meta, .page-header--dark .page-header__meta {
    border-top-color: rgba(232, 237, 242, 0.1);
    color: var(--ink-300);
  }
  .page-header--welcome .page-header__alert, .page-header--dark .page-header__alert,
  .page-header--welcome .page-hero__alert,
  .page-header--dark .page-hero__alert {
    background: rgba(201, 151, 58, 0.18);
    color: var(--gold-100);
  }
  .page-header--welcome .btn--primary, .page-header--dark .btn--primary {
    background: var(--gold-400);
    border-color: var(--gold-400);
    color: var(--brand-900);
  }
  .page-header--welcome .btn--primary:hover, .page-header--dark .btn--primary:hover {
    background: var(--gold-100);
    border-color: var(--gold-100);
    color: var(--brand-900);
  }
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.3125rem 0.75rem;
    font-family: inherit;
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  }
  .btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .btn:disabled,
  .btn[disabled],
  .btn.is-disabled,
  fieldset:disabled .btn {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
  }
  .btn--primary,
  .btn-primary {
    color: var(--on-accent);
    background: var(--accent);
    border-color: var(--accent);
  }
  .btn--primary:hover,
  .btn-primary:hover {
    color: var(--on-accent);
    background: var(--accent-hover);
    border-color: var(--accent-hover);
  }
  .btn--secondary,
  .btn-secondary,
  .btn-outline-primary,
  .btn-outline-secondary {
    color: var(--heading);
    background: var(--surface-raised);
    border-color: var(--accent);
  }
  .btn--secondary:hover,
  .btn-secondary:hover,
  .btn-outline-primary:hover,
  .btn-outline-secondary:hover {
    color: var(--heading);
    background: var(--accent-subtle);
  }
  .btn--ghost,
  .btn-light,
  .btn-link {
    color: var(--text-muted);
    background: transparent;
    border-color: transparent;
  }
  .btn--ghost:hover,
  .btn-light:hover,
  .btn-link:hover {
    color: var(--text);
    background: var(--surface-sunken);
  }
  .btn-link {
    text-decoration: underline;
  }
  .btn--warm {
    color: var(--on-warm);
    background: var(--warm);
    border-color: var(--warm);
  }
  .btn--warm:hover {
    color: var(--on-warm);
    background: var(--warm-hover);
    border-color: var(--warm-hover);
  }
  .btn--danger,
  .btn-danger {
    color: var(--on-accent);
    background: var(--danger);
    border-color: var(--danger);
  }
  .btn--danger:hover,
  .btn-danger:hover {
    color: var(--on-accent);
    opacity: 0.9;
  }
  .btn--sm,
  .btn-sm {
    padding: 0.1875rem 0.5rem;
    font-size: var(--text-sm);
    border-radius: var(--radius-sm);
  }
  .btn--lg,
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: var(--text-md);
  }
  .btn--icon {
    padding: 0.375rem;
  }
  .btn--block {
    display: flex;
    width: 100%;
  }
  .btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: var(--text, #000);
    background: none;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: var(--radius-sm);
    opacity: 0.7;
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease);
  }
  .btn-close:hover {
    opacity: 1;
  }
  .btn-close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
    opacity: 0.75;
  }
  .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 8px;
    font-family: var(--font-label);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--neutral-tint);
    border-radius: var(--radius-sm);
    vertical-align: middle;
    white-space: nowrap;
  }
  .badge--gambling {
    color: var(--reg-gambling);
    background: var(--reg-gambling-subtle);
  }
  .badge--liquor {
    color: var(--reg-liquor);
    background: var(--reg-liquor-subtle);
  }
  .badge--aml {
    color: var(--reg-aml);
    background: var(--reg-aml-subtle);
  }
  .badge--food-safety {
    color: var(--reg-food-safety);
    background: var(--reg-food-safety-subtle);
  }
  .badge--welfare {
    color: var(--reg-welfare);
    background: var(--reg-welfare-subtle);
  }
  .badge--critical {
    color: var(--sev-critical);
    background: var(--danger-tint);
  }
  .badge--high {
    color: var(--sev-high);
    background: var(--danger-tint);
  }
  .badge--medium {
    color: var(--sev-medium);
    background: var(--warning-tint);
  }
  .badge--low {
    color: var(--sev-low);
    background: var(--neutral-tint);
  }
  .badge--draft {
    color: var(--status-draft);
    background: var(--neutral-tint);
  }
  .badge--review {
    color: var(--status-review);
    background: var(--warning-tint);
  }
  .badge--open {
    color: var(--status-open);
    background: var(--info-tint);
  }
  .badge--closed {
    color: var(--status-closed);
    background: var(--success-tint);
  }
  .badge--success {
    color: var(--success-ink);
    background: var(--success-tint);
  }
  .badge--warning,
  .badge--escalation {
    color: var(--warning-ink);
    background: var(--warning-tint);
  }
  .badge--danger {
    color: var(--danger);
    background: var(--danger-tint);
  }
  .badge--info,
  .badge--primary {
    color: var(--info-ink);
    background: var(--info-tint);
  }
  .badge--neutral,
  .badge--secondary {
    color: var(--text-muted);
    background: var(--neutral-tint);
  }
  .badge--coral {
    color: var(--crimson-900);
    background: var(--crimson-100);
  }
  .tier-spot {
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    flex: none;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    color: var(--white);
    vertical-align: middle;
    cursor: help;
  }
  .tier-spot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .tier-spot--tier-black-pearl {
    background: color-mix(in srgb, var(--tier-black-pearl) 80%, black);
  }
  .tier-spot--tier-aquamarine {
    background: color-mix(in srgb, var(--tier-aquamarine) 80%, black);
  }
  .tier-spot--tier-pearl {
    background: color-mix(in srgb, var(--tier-pearl) 80%, black);
  }
  .tier-spot--tier-coral {
    background: color-mix(in srgb, var(--tier-coral) 80%, black);
  }
  .source-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    flex: none;
    margin-right: var(--space-2);
    border-radius: 50%;
    vertical-align: 0.05em;
    cursor: help;
  }
  .source-dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .source-dot--full {
    background: var(--success);
  }
  .source-dot--part {
    background: var(--gold-700);
  }
  .source-dot--none {
    background: var(--danger);
  }
  .flag {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-left: var(--space-1);
    border-radius: 50%;
    vertical-align: middle;
    cursor: help;
  }
  .flag svg {
    width: 12px;
    height: 12px;
  }
  .flag:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .flag--warning {
    color: var(--warning-ink);
    background: var(--warning-tint);
  }
  .flag--danger {
    color: var(--danger);
    background: var(--danger-tint);
  }
  .badge--test {
    color: var(--warning);
    background: var(--warning-subtle);
    border: 1px dashed currentcolor;
    font-weight: 600;
    letter-spacing: 0.03em;
  }
  .ai-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem var(--space-2);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #7c3aed, #2563EB);
    color: #fff;
    letter-spacing: 0.04em;
  }
  .panel {
    min-width: 0;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }
  .panel__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4) var(--space-1);
  }
  .panel__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--heading);
  }
  .panel__count {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--text-muted);
  }
  .panel__body {
    padding: var(--space-4);
  }
  .panel__header + .panel__body {
    padding-top: var(--space-2);
  }
  .panel__body--flush,
  .panel__header + .panel__body--flush {
    padding: 0 0 var(--space-1);
  }
  .panel__body--tight {
    padding: var(--space-3);
  }
  .panel__body--flush .table th:first-child,
  .panel__body--flush .table td:first-child {
    padding-left: var(--space-4);
  }
  .panel__body--flush .table th:last-child,
  .panel__body--flush .table td:last-child {
    padding-right: var(--space-4);
  }
  .panel__body--flush .table caption {
    padding: 0 var(--space-4) var(--space-2);
    text-align: left;
  }
  .panel__footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-subtle);
  }
  .panel--sunken {
    background: var(--surface-sunken);
  }
  .panel--interactive {
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  }
  .panel--interactive:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-1);
  }
  .panel--unavailable {
    background: var(--surface-sunken);
    border-style: dashed;
  }
  .panel--unavailable .panel__title {
    color: var(--text-muted);
  }
  .panel__preview {
    opacity: 0.35;
    filter: grayscale(1);
    pointer-events: none;
    user-select: none;
    margin-bottom: var(--space-3);
  }
  .panel__need {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    padding: var(--space-2) var(--space-3);
    background: var(--info-subtle);
    border-radius: var(--radius-md);
    color: var(--info-ink);
    font-size: var(--text-sm);
  }
  .panel__need svg {
    flex: none;
    width: 1rem;
    height: 1rem;
    color: var(--info);
    margin-top: 0.15rem;
  }
  .panel__need p {
    margin: 0;
  }
  .panel--accent-gambling {
    border-left: 4px solid var(--reg-gambling);
  }
  .panel--accent-liquor {
    border-left: 4px solid var(--reg-liquor);
  }
  .panel--accent-aml {
    border-left: 4px solid var(--reg-aml);
  }
  .panel--accent-food-safety {
    border-left: 4px solid var(--reg-food-safety);
  }
  .panel--accent-welfare {
    border-left: 4px solid var(--reg-welfare);
  }
  .alert {
    position: relative;
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    color: var(--info-ink);
    background: var(--info-subtle);
    border-radius: var(--radius-md);
  }
  .alert a {
    color: inherit;
    text-decoration: underline;
  }
  .alert--info,
  .alert-info {
    color: var(--info-ink);
    background: var(--info-subtle);
  }
  .alert--success,
  .alert-success {
    color: var(--success-ink);
    background: var(--success-subtle);
  }
  .alert--warning,
  .alert-warning {
    color: var(--warning-ink);
    background: var(--warning-subtle);
  }
  .alert--danger,
  .alert-danger {
    color: var(--danger-ink);
    background: var(--danger-subtle);
  }
  .alert-dismissible {
    padding-right: var(--space-9);
  }
  .alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: var(--space-4);
  }
  .alert.fade {
    transition: opacity var(--dur-base) var(--ease);
  }
  .alert.fade:not(.show) {
    opacity: 0;
  }
  .notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-muted);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    font-size: var(--text-base);
    line-height: 1.55;
    color: var(--text);
  }
  .notice--warn {
    border-left-color: var(--warning);
    background: var(--warning-subtle);
  }
  .notice--warn a {
    color: inherit;
    text-decoration: underline;
  }
  .notice--ok {
    border-left-color: var(--success);
    background: var(--success-subtle);
  }
  .notice--ok a {
    color: inherit;
    text-decoration: underline;
  }
  .notice__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .notice__title {
    font-weight: 600;
    margin-right: var(--space-1);
  }
  .notice__chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-top: var(--space-1);
  }
  .notice .notice__chip {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    padding: 2px var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    text-decoration: none;
    white-space: nowrap;
  }
  .notice .notice__chip:hover {
    background: var(--surface-sunken);
  }
  .banner {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--text);
    background: var(--info-subtle);
    border-bottom: 1px solid var(--border);
  }
  .banner--success {
    background: var(--success-subtle);
  }
  .banner--warning {
    background: var(--warning-subtle);
  }
  .banner--danger {
    background: var(--danger-subtle);
  }
  .banner--page {
    padding: var(--space-2) var(--space-6);
  }
  .banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
  }
  .banner__text {
    margin: 0;
  }
  .banner__action {
    margin: 0;
    flex-shrink: 0;
  }
  @media (max-width: 767.98px) {
    .banner--page {
      padding: var(--space-2) var(--space-4);
    }
  }
  #toast-container,
  .toast-container {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 1100;
    padding: var(--space-4);
  }
  .toast {
    width: 320px;
    max-width: 100%;
    margin-top: var(--space-2);
    font-size: var(--text-base);
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease);
  }
  .toast.show,
  .toast.is-open {
    display: block;
    opacity: 1;
  }
  .toast:not(.show, .is-open) {
    display: none;
  }
  .toast__inner {
    display: flex;
    align-items: center;
  }
  .toast-body {
    flex: 1 1 auto;
    padding: var(--space-3);
    word-wrap: break-word;
  }
  .toast__close {
    flex-shrink: 0;
    margin-left: auto;
    margin-right: var(--space-2);
  }
  .toast--success {
    border-left-color: var(--success);
    background: var(--success-subtle);
  }
  .toast--danger {
    border-left-color: var(--danger);
    background: var(--danger-subtle);
  }
  .modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    outline: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .modal.show,
  .modal.is-open {
    display: block;
  }
  .modal-dialog {
    position: relative;
    width: auto;
    margin: var(--space-2);
    pointer-events: none;
    transform: translate(0, -12px);
    transition: transform var(--dur-slow) var(--ease);
  }
  .modal.show .modal-dialog,
  .modal.is-open .modal-dialog {
    transform: none;
  }
  @media (min-width: 640px) {
    .modal-dialog {
      max-width: 500px;
      margin: var(--space-7) auto;
    }
    .modal-dialog-centered {
      display: flex;
      align-items: center;
      min-height: calc(100% - var(--space-10));
    }
    .modal-dialog--wide {
      max-width: min(46rem, 100vw - var(--space-8));
    }
    .modal-dialog--full {
      max-width: min(72rem, 100vw - var(--space-8));
    }
    .modal-dialog--screen {
      max-width: calc(100vw - var(--space-8));
      margin: var(--space-4) auto;
    }
    .modal-dialog--screen .modal-body {
      max-height: calc(100vh - 11rem);
      overflow-y: auto;
    }
  }
  .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    outline: 0;
  }
  .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
  }
  .modal-title {
    margin: 0;
    font-size: var(--text-md);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
  }
  .app-modal__heading {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
  }
  .app-modal__kicker {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: var(--space-5);
  }
  .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border);
  }
  .modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: var(--overlay-bg);
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease);
  }
  .modal-backdrop.show {
    opacity: 1;
  }
  .fade {
    transition: opacity var(--dur-base) var(--ease);
  }
  .fade:not(.show) {
    opacity: 0;
  }
  @media (max-width: 767.98px) {
    .modal .modal-body {
      max-height: 70vh;
      overflow-y: auto;
    }
    .modal-dialog {
      margin: var(--space-2);
    }
  }
  .modal-help {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    padding: var(--space-3) 0.875rem;
    margin-bottom: 1.25rem;
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text);
  }
  .modal-help svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: var(--accent);
  }
  .modal-help strong {
    font-weight: 600;
  }
  body.modal-open,
  html.is-modal-open {
    overflow: hidden;
    scrollbar-gutter: stable;
  }
  .tooltip {
    position: absolute;
    z-index: 1080;
    display: block;
    font-size: var(--text-sm);
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
    pointer-events: none;
  }
  .tooltip.show {
    opacity: 0.95;
  }
  .tooltip-inner {
    max-width: 220px;
    padding: 0.375rem 0.625rem;
    color: var(--surface);
    text-align: center;
    background: var(--text);
    border-radius: var(--radius-sm);
  }
  .tooltip-arrow {
    position: absolute;
    width: 0.6rem;
    height: 0.3rem;
    left: 50%;
    transform: translateX(-50%);
  }
  .tooltip-arrow::before {
    content: "";
    position: absolute;
    border: 0.3rem solid transparent;
  }
  .tooltip--top .tooltip-arrow {
    bottom: 0;
  }
  .tooltip--top .tooltip-arrow::before {
    top: -1px;
    border-top-color: var(--text);
    border-bottom-width: 0;
  }
  .tooltip--bottom .tooltip-arrow {
    top: -0.3rem;
  }
  .tooltip--bottom .tooltip-arrow::before {
    border-bottom-color: var(--text);
    border-top-width: 0;
  }
  .tooltip--left .tooltip-arrow,
  .tooltip--right .tooltip-arrow {
    display: none;
  }
  .dropdown,
  .dropup {
    position: relative;
  }
  .dropdown-menu,
  .menu {
    position: absolute;
    z-index: 1000;
    top: 100%;
    left: 0;
    display: none;
    min-width: 11rem;
    margin: var(--space-1) 0 0;
    padding: var(--space-1);
    font-size: var(--text-base);
    color: var(--text);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-2);
  }
  .dropdown-menu.show,
  .dropdown-menu.is-open,
  .menu.show,
  .menu.is-open {
    display: block;
  }
  .dropup .dropdown-menu,
  .dropup .menu {
    top: auto;
    bottom: 100%;
    margin: 0 0 var(--space-1);
  }
  .dropdown-item,
  .menu__item {
    display: block;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-base);
    color: var(--text);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
  }
  .dropdown-item:hover,
  .dropdown-item:focus,
  .menu__item:hover,
  .menu__item:focus {
    background: var(--surface-sunken);
  }
  .dropdown-item:focus-visible,
  .menu__item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .dropdown-item.active,
  .dropdown-item:active {
    color: var(--on-accent);
    background: var(--accent);
  }
  .menu__item--danger {
    color: var(--danger);
  }
  .dropdown-divider,
  .menu__divider {
    height: 0;
    margin: var(--space-1) 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
  }
  .collapse {
    display: none;
  }
  .collapse.show {
    display: block;
  }
  .collapsing {
    height: 0;
    overflow: hidden;
    transition: height var(--dur-base) var(--ease);
  }
  .tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--border);
  }
  .tabs__tab {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  }
  .tabs__tab:hover {
    color: var(--text);
  }
  .tabs__tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .tabs__tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }
  .menubar {
    position: relative;
    z-index: 1030;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--space-3);
    height: var(--menubar-height, 64px);
    padding: 0 var(--space-4);
    background: var(--brand-900);
    color: var(--ink-200);
    box-shadow: var(--shadow-2);
  }
  .menubar__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(232, 237, 242, 0.2);
    border-radius: var(--radius-md);
    background: none;
    color: var(--ink-200);
    cursor: pointer;
  }
  .menubar__burger svg {
    width: 20px;
    height: 20px;
  }
  .menubar__burger:hover {
    background: rgba(232, 237, 242, 0.08);
    color: var(--white);
  }
  .menubar__burger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .menubar__back {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--space-1);
    height: 40px;
    padding: 0 0.625rem 0 0.5rem;
    border: 1px solid rgba(232, 237, 242, 0.2);
    border-radius: var(--radius-md);
    color: var(--ink-200);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
  }
  .menubar__back svg {
    width: 18px;
    height: 18px;
  }
  .menubar__back:hover {
    background: rgba(232, 237, 242, 0.08);
    color: var(--white);
  }
  .menubar__back:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .menubar__back[hidden] {
    display: none;
  }
  .menubar__brand {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--space-3);
    border-radius: var(--radius-md);
    color: var(--ink-200);
    text-decoration: none;
  }
  .menubar__brand:hover {
    color: var(--white);
  }
  .menubar__brand:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .menubar__logo {
    display: block;
    height: 28px;
    width: auto;
  }
  .menubar__nav {
    display: none;
    flex: 1;
    align-self: stretch;
    min-width: 0;
  }
  .menubar__groups {
    display: flex;
    align-items: stretch;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .menubar__group {
    display: flex;
  }
  .menubar__link {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0 0.625rem;
    border: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    background: none;
    font: inherit;
    font-size: var(--text-base);
    font-weight: 600;
    white-space: nowrap;
    color: var(--ink-200);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .menubar__link:hover {
    background: rgba(232, 237, 242, 0.06);
    color: var(--white);
  }
  .menubar__link:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--focus-ring);
  }
  .menubar__link.is-active {
    border-bottom-color: var(--gold-400);
    color: var(--white);
  }
  .menubar__link[aria-expanded=true] {
    background: rgba(232, 237, 242, 0.08);
    color: var(--white);
  }
  .menubar__link[aria-disabled=true] {
    color: var(--ink-400);
    cursor: default;
  }
  .menubar__link[aria-disabled=true]:hover {
    background: none;
    color: var(--ink-300);
  }
  .menubar__chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform var(--dur-fast) var(--ease);
  }
  [aria-expanded=true] > .menubar__chevron {
    transform: rotate(180deg);
  }
  .menubar__menu {
    width: 18rem;
    padding: var(--space-2);
  }
  .menubar__item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--heading);
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease);
  }
  .menubar__item + .menubar__item {
    margin-top: 2px;
  }
  .menubar__item:hover {
    background: var(--surface-sunken);
  }
  .menubar__item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .menubar__item[aria-current] {
    background: var(--accent-subtle);
  }
  .menubar__item-label {
    font-size: var(--text-base);
    font-weight: 600;
  }
  .menubar__blurb {
    font-size: var(--text-xs);
    line-height: 1.35;
    color: var(--text-muted);
  }
  .menubar__item[aria-disabled=true] {
    cursor: default;
  }
  .menubar__item[aria-disabled=true]:hover {
    background: none;
  }
  .menubar__item[aria-disabled=true] .menubar__item-label,
  .menubar__item[aria-disabled=true] .menubar__blurb {
    color: var(--text-faint);
  }
  .menubar__user {
    flex-shrink: 0;
    margin-left: auto;
  }
  .menubar__me {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1);
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    color: var(--ink-200);
    text-align: left;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease);
  }
  .menubar__me:hover {
    background: rgba(232, 237, 242, 0.08);
  }
  .menubar__me:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .menubar__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--gold-400);
    color: var(--brand-900);
    font-size: var(--text-xs);
    font-weight: 600;
  }
  .menubar__who {
    display: none;
    flex-direction: column;
    gap: 1px;
    max-width: 9rem;
    line-height: 1.15;
  }
  .menubar__name {
    overflow: hidden;
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--white);
  }
  .menubar__role {
    overflow: hidden;
    font-size: var(--text-xs);
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-300);
  }
  .menubar__user .dropdown-menu {
    right: 0;
    left: auto;
    width: 16rem;
    max-height: calc(100dvh - var(--menubar-height, 64px) - var(--space-4));
    overflow-y: auto;
  }
  .topbar-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-3) var(--space-3) var(--space-2);
  }
  .topbar-dropdown-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
  }
  .topbar-dropdown-email {
    font-size: var(--text-xs);
    color: var(--text-muted);
    overflow-wrap: anywhere;
  }
  .topbar-dropdown-label {
    padding: var(--space-1) var(--space-3);
    font-family: var(--font-label);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .topbar-dropdown .dropdown-item .icon-sm {
    margin-right: var(--space-2);
  }
  @media (min-width: 1024px) {
    .menubar__burger {
      display: none;
    }
    .menubar__nav {
      display: block;
    }
    .menubar__back {
      padding: 0 0.5rem;
    }
    .menubar__back-label {
      display: none;
    }
  }
  @media (min-width: 1280px) {
    .menubar {
      gap: var(--space-5);
      padding: 0 var(--space-6);
    }
    .menubar__back {
      padding: 0 0.625rem 0 0.5rem;
    }
    .menubar__back-label {
      display: inline;
    }
    .menubar__link {
      padding: 0 var(--space-3);
    }
    .menubar__who {
      display: flex;
    }
  }
  .navstrip {
    padding: 0 var(--space-6);
    border-bottom: 1px solid var(--border);
    background: var(--surface-raised);
  }
  .navstrip__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-6);
    min-height: 46px;
  }
  .navstrip__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .navstrip__crumb {
    color: var(--text-muted);
    text-decoration: none;
  }
  .navstrip__crumb:hover {
    color: var(--accent);
    text-decoration: underline;
  }
  .navstrip__crumb:focus-visible {
    outline: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .navstrip__here {
    font-weight: 600;
    color: var(--heading);
  }
  .navstrip__sep {
    color: var(--text-faint);
  }
  .navstrip__tabs {
    position: relative;
    align-self: stretch;
    max-width: 100%;
    overflow-x: auto;
    border-bottom: 0;
  }
  .navstrip__tab {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    padding: var(--space-3);
    white-space: nowrap;
  }
  .navstrip__tab[aria-disabled=true],
  .navstrip__tab[aria-disabled=true]:hover {
    color: var(--text-faint);
    cursor: default;
  }
  .pagenav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
  }
  .pagenav__pill {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-raised);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .pagenav__pill:hover {
    border-color: var(--border-strong);
    color: var(--heading);
  }
  .pagenav__pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .pagenav__pill[aria-current] {
    border-color: var(--accent);
    background: var(--accent);
    font-weight: 600;
    color: var(--on-accent);
  }
  @media (max-width: 767.98px) {
    .navstrip {
      padding: 0 var(--space-4);
    }
    .pagenav__pill {
      padding: var(--space-2) var(--space-3);
    }
  }
  .navdrawer {
    position: fixed;
    top: var(--menubar-height, 64px);
    bottom: 0;
    left: 0;
    z-index: 1050;
    width: min(300px, 86vw);
    padding: var(--space-3) var(--space-3) var(--space-8);
    overflow-y: auto;
    background: var(--brand-900);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
  }
  .navdrawer.is-open {
    visibility: visible;
    transform: translateX(0);
    box-shadow: var(--shadow-3);
    transition: transform var(--dur-base) var(--ease);
  }
  .navdrawer__group + .navdrawer__group {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid rgba(232, 237, 242, 0.07);
  }
  .navdrawer__label {
    display: block;
    padding: var(--space-2) var(--space-3) var(--space-1);
    font-family: var(--font-label);
    font-size: 0.59375rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-200);
    opacity: 0.55;
    user-select: none;
  }
  .navdrawer__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    margin-bottom: 2px;
    padding: 0.6875rem var(--space-3);
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    font: inherit;
    font-size: var(--text-base);
    text-align: left;
    color: var(--ink-200);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .navdrawer__link:hover {
    background: rgba(232, 237, 242, 0.05);
    color: var(--white);
  }
  .navdrawer__link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .navdrawer__link[aria-current] {
    background: var(--mist-100);
    font-weight: 600;
    color: var(--brand-800);
  }
  .navdrawer__toggle.is-active {
    background: rgba(232, 237, 242, 0.08);
    color: var(--white);
  }
  .navdrawer__link[aria-disabled=true],
  .navdrawer__link[aria-disabled=true]:hover {
    background: none;
    color: var(--ink-400);
    cursor: default;
  }
  .navdrawer__text {
    flex: 1 1 auto;
    min-width: 0;
  }
  .navdrawer__chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform var(--dur-fast) var(--ease);
  }
  .navdrawer__toggle[aria-expanded=true] .navdrawer__chevron {
    transform: rotate(180deg);
  }
  .navdrawer__pages {
    margin: 2px 0 var(--space-2) var(--space-5);
    padding-left: var(--space-2);
    border-left: 1px solid rgba(232, 237, 242, 0.1);
  }
  .navdrawer__page {
    display: block;
    margin-bottom: 1px;
    padding: 0.5625rem var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--ink-300);
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .navdrawer__page:hover {
    background: rgba(232, 237, 242, 0.05);
    color: var(--white);
  }
  .navdrawer__page:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .navdrawer__page[aria-current] {
    background: var(--mist-100);
    font-weight: 600;
    color: var(--brand-800);
  }
  @media (min-width: 1024px) {
    .navdrawer {
      display: none;
    }
  }
  @media print {
    .menubar,
    .navdrawer,
    .navstrip,
    .pagenav {
      display: none;
    }
  }
  .segmented {
    display: inline-flex;
    overflow: hidden;
    background: var(--surface-raised);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
  }
  .segmented__item {
    padding: 6px 14px;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.4;
    color: var(--heading);
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .segmented__item + .segmented__item {
    border-left: 1px solid var(--accent);
  }
  .segmented__item:hover {
    color: var(--heading);
    background: var(--accent-subtle);
  }
  .segmented__item[aria-current] {
    color: var(--on-accent);
    background: var(--accent);
  }
  .segmented__item:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--focus-ring);
  }
  .datenav {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
  }
  .datenav__label {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--heading);
    white-space: nowrap;
  }
  .datenav__step {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    color: var(--text-muted);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 50%;
    text-decoration: none;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .datenav__step svg {
    width: 14px;
    height: 14px;
  }
  .datenav__step:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
  .datenav__step:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .datenav__step[aria-disabled=true] {
    opacity: 0.4;
    cursor: default;
  }
  .wx {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding-right: var(--space-3);
    font-size: var(--text-sm);
    line-height: 1.2;
    color: var(--text-muted);
    border-right: 1px solid var(--border);
  }
  .wx b {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text);
  }
  .wx--none {
    color: var(--text-faint);
  }
  .table {
    width: 100%;
    margin-bottom: var(--space-4);
    font-size: 0.84375rem;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    border-collapse: collapse;
    vertical-align: top;
  }
  .table th {
    padding: 7px var(--space-2);
    font-family: var(--font-label);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
    vertical-align: bottom;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
  }
  .table td {
    padding: 6px var(--space-2);
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
  }
  .table tbody th {
    padding: 6px var(--space-2);
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
  }
  .table tbody tr:last-child td,
  .table tbody tr:last-child th {
    border-bottom: 0;
  }
  .table tbody tr,
  .table-hover tbody tr {
    transition: background-color var(--dur-fast) var(--ease);
  }
  .table tbody tr:hover,
  .table-hover tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 5%, transparent);
  }
  [data-ui-row-link] {
    cursor: pointer;
  }
  tr[data-modal-open] {
    cursor: pointer;
  }
  .table-sm th,
  .table-sm td {
    padding: 5px 6px;
  }
  .table__wrap,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .th-sort {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }
  .th-sort:hover {
    color: var(--accent);
  }
  .th-sort:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .th-sort__icon {
    width: 13px;
    height: 13px;
  }
  .th-sort--active {
    color: var(--accent);
  }
  .cell-nowrap {
    white-space: nowrap;
  }
  .cell-sm {
    font-size: var(--text-sm);
  }
  .cell-muted {
    color: var(--text-muted);
  }
  .cell-truncate {
    max-width: 200px;
  }
  .cell-truncate > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .table--sticky thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-raised);
  }
  @media (max-width: 767.98px) {
    .table--stack thead {
      display: none;
    }
    .table--stack tbody tr {
      display: block;
      margin: var(--space-2);
      padding: var(--space-1) 0;
      background: var(--surface-raised);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
    }
    .table--stack tbody tr:hover {
      background: var(--surface-raised);
    }
    .table--stack tbody td {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: var(--space-4);
      padding: var(--space-2) var(--space-3);
      text-align: right;
      max-width: none;
      border: 0;
    }
    .table--stack tbody td::before {
      content: attr(data-label);
      font-family: var(--font-label);
      font-size: 0.625rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text-muted);
      text-align: left;
      white-space: nowrap;
    }
    .table--stack .cell-truncate > span {
      white-space: normal;
    }
  }
  .form-control,
  .form-select {
    display: block;
    width: 100%;
    padding: 0.4375rem 0.75rem;
    font-family: inherit;
    font-size: var(--control-font-size);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  }
  .form-control:focus,
  .form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .form-control::placeholder {
    color: var(--text-faint);
    opacity: 1;
  }
  .form-control:disabled,
  .form-select:disabled {
    background-color: var(--surface-sunken);
    opacity: 0.55;
    cursor: not-allowed;
  }
  textarea.form-control {
    min-height: calc(1.5em + 0.875rem + 2px);
    resize: vertical;
  }
  .form-control:is([type=date], [type=datetime-local], [type=time], [type=month]) {
    height: calc(1.5em + 0.875rem + 2px);
  }
  .form-control[type=file] {
    overflow: hidden;
  }
  .form-control[type=file]:not(:disabled, [readonly]) {
    cursor: pointer;
  }
  .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.25rem;
    appearance: none;
  }
  .form-control-sm,
  .form-select-sm {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
  }
  .form-label,
  .field__label {
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text);
  }
  .form-hint,
  .form-text,
  .field__hint {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .required {
    color: var(--danger);
  }
  .field {
    margin-bottom: var(--space-4);
  }
  .field__error,
  .ajax-err {
    display: block;
    margin-top: 4px;
    font-size: var(--text-xs);
    color: var(--danger);
  }
  .alert.ajax-err {
    margin: var(--space-2) 0 0;
  }
  .is-invalid,
  .field--invalid .form-control,
  .field--invalid .form-select {
    border-color: var(--danger);
  }
  .form-check,
  .check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: var(--space-1);
  }
  .form-check .form-check-input,
  .check .form-check-input {
    float: left;
    margin-left: -1.5em;
  }
  .form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    vertical-align: top;
    background-color: var(--surface-raised);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--border-strong);
    appearance: none;
    print-color-adjust: exact;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  }
  .form-check-input[type=checkbox] {
    border-radius: 0.25em;
  }
  .form-check-input[type=radio] {
    border-radius: 50%;
  }
  .form-check-input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .form-check-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }
  .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
  }
  .form-check-input[type=checkbox]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fff'%3e%3cpath d='M6 10l3 3 6-6' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  }
  .form-check-input[type=radio]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
  }
  .form-check-label {
    cursor: pointer;
    font-size: var(--text-base);
  }
  .form-switch,
  .switch {
    padding-left: 2.5em;
  }
  .form-switch .form-check-input,
  .switch .form-check-input {
    width: 2em;
    margin-left: -2.5em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2394A3B8'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: var(--radius-full);
    transition: background-position var(--dur-fast) var(--ease);
  }
  .form-switch .form-check-input:checked,
  .switch .form-check-input:checked {
    background-position: right center;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
  }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  @media (min-width: 768px) {
    .form-grid--2col {
      grid-template-columns: repeat(2, 1fr);
    }
    .form-grid--3col {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding-top: var(--space-4);
    margin-top: var(--space-6);
    border-top: 1px solid var(--border);
  }
  .form-section {
    margin: var(--space-7) 0;
  }
  .form-section-title {
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-4);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .choice-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
  }
  .choice-card:hover {
    border-color: var(--border-strong);
  }
  .choice-card:has(:checked),
  .choice-card.is-selected {
    border-color: var(--accent);
    background: var(--accent-subtle);
  }
  .choice-card:has(:focus-visible) {
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .choice-card__body {
    flex: 1;
    min-width: 0;
  }
  .choice-card__title {
    display: block;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
  }
  .choice-card__desc {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.5;
  }
  .field-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.3rem;
    color: var(--text-muted);
    cursor: help;
    vertical-align: middle;
    line-height: 1;
  }
  .field-info svg {
    width: 14px;
    height: 14px;
  }
  .field-info:hover,
  .field-info:focus-visible {
    color: var(--accent);
    outline: none;
  }
  .char-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .char-counter__quality--poor {
    color: var(--danger);
    font-weight: 500;
  }
  .char-counter__quality--ok {
    color: var(--warning);
    font-weight: 500;
  }
  .char-counter__quality--good {
    color: var(--success);
    font-weight: 500;
  }
  @media (max-width: 767.98px) {
    .form-control,
    .form-select,
    .form-control-sm,
    .form-select-sm {
      font-size: 16px;
    }
  }
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
  }
  .toolbar__search {
    flex: 1 1 auto;
    min-width: 180px;
  }
  .toolbar__search .form-control {
    width: 100%;
  }
  .toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
  }
  .toolbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
  }
  .toolbar:has(.field__label, .form-label),
  .toolbar:has(.field__label, .form-label) .toolbar__filters,
  .toolbar:has(.field__label, .form-label) .toolbar__actions {
    align-items: flex-end;
  }
  .toolbar:has(.field__label, .form-label) :is(.btn, .form-check) {
    min-height: calc(var(--control-font-size) * 1.5 + 0.875rem + 2px);
  }
  .toolbar:has(.field__label, .form-label) .form-check {
    display: flex;
    align-items: center;
  }
  .pagination {
    display: flex;
    gap: var(--space-1);
    padding-left: 0;
    margin: 0;
    list-style: none;
  }
  .page-link {
    display: block;
    padding: 0.3125rem 0.625rem;
    font-size: var(--text-sm);
    color: var(--text);
    text-decoration: none;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  }
  .page-link:hover {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
  }
  .page-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .page-item.active .page-link {
    color: var(--on-accent);
    background: var(--accent);
    border-color: var(--accent);
  }
  .page-item.disabled .page-link {
    color: var(--text-faint);
    pointer-events: none;
    background: var(--surface-raised);
  }
  .pagination-sm .page-link {
    padding: 0.125rem 0.4375rem;
    font-size: var(--text-xs);
  }
  .pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border);
  }
  .pagination-bar__info {
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .stepper,
  .step-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .step-indicator {
    margin-bottom: var(--space-7);
  }
  .step-indicator--journey {
    margin-bottom: var(--space-4);
  }
  .stepper__step,
  .step-indicator__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
    white-space: nowrap;
  }
  .stepper__marker,
  .step-indicator__num {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface-raised);
    font-size: var(--text-xs);
    font-weight: 600;
  }
  .stepper__label {
    line-height: 1.2;
  }
  .stepper__connector,
  .step-indicator__connector {
    flex: 1;
    height: 2px;
    min-width: 1.5rem;
    max-width: 3.5rem;
    background: var(--border);
  }
  .stepper__connector--done,
  .step-indicator__connector--done {
    background: var(--accent);
  }
  .stepper__step--done .stepper__marker,
  .step-indicator__item--done .step-indicator__num {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
  }
  .stepper__step--current,
  .step-indicator__item--active {
    color: var(--text);
    font-weight: 500;
  }
  .stepper__step--current .stepper__marker,
  .step-indicator__item--active .step-indicator__num {
    border-color: var(--accent);
    color: var(--accent);
  }
  .stepper--compact {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-1);
  }
  .stepper__count {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
  }
  @media (max-width: 639.98px) {
    .stepper,
    .step-indicator {
      flex-wrap: wrap;
      gap: var(--space-1) var(--space-3);
    }
    .stepper__connector,
    .step-indicator__connector {
      display: none;
    }
  }
  .stepper--vertical {
    flex-direction: column;
    align-items: flex-start;
  }
  .stepper--vertical .stepper__connector {
    flex: none;
    width: 2px;
    height: 1.25rem;
    min-width: 0;
    max-width: none;
    margin-left: 11px;
  }
  .stepbar {
    margin-bottom: var(--space-5);
  }
  .stepbar__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .stepbar__item {
    display: flex;
  }
  .stepbar__step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-4) var(--space-1) var(--space-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-raised);
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  }
  .stepbar__label {
    line-height: 1.3;
  }
  a.stepbar__step:hover {
    border-color: var(--border-strong);
    color: var(--heading);
  }
  a.stepbar__step:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .stepbar__num {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    font-family: var(--font-num);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
  }
  .stepbar__step.is-done .stepbar__num {
    background: var(--success);
    color: var(--on-accent);
  }
  .stepbar__step.is-current {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
  }
  .stepbar__step.is-current .stepbar__num {
    background: var(--surface-raised);
    color: var(--accent);
  }
  .stepbar__step[aria-disabled=true]:not(.is-current) {
    color: var(--text-faint);
    cursor: default;
  }
  @media (max-width: 639.98px) {
    .stepbar__step {
      padding-right: var(--space-3);
    }
  }
  @media print {
    .stepbar {
      display: none;
    }
  }
  .pagestrip {
    padding: 0 var(--space-6);
    border-bottom: 1px solid var(--border);
    background: var(--surface-sunken);
  }
  .pagestrip__inner {
    display: flex;
    align-items: stretch;
    column-gap: var(--space-5);
    min-height: 44px;
  }
  .pagestrip__title {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    font-family: var(--font-label);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--heading);
  }
  .pagestrip__tabs {
    display: flex;
    gap: var(--space-1);
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .pagestrip__tab {
    display: flex;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    border-bottom: 3px solid transparent;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  }
  .pagestrip__tab:hover {
    border-bottom-color: var(--border-strong);
    color: var(--heading);
  }
  .pagestrip__tab:focus-visible {
    outline: none;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 3px var(--focus-ring);
  }
  .pagestrip__tab[aria-current] {
    border-bottom-color: var(--crimson-600);
    font-weight: 700;
    color: var(--heading);
  }
  @media (max-width: 767.98px) {
    .pagestrip {
      padding: 0 var(--space-4);
    }
    .pagestrip__title {
      display: none;
    }
  }
  @media print {
    .pagestrip {
      display: none;
    }
  }
  .stat {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: var(--space-4) var(--space-5);
  }
  .stat__label {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .stat__value {
    font-size: var(--text-2xl);
    font-weight: 600;
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: var(--text);
  }
  .stat__delta {
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .stat__delta--up {
    color: var(--success);
  }
  .stat__delta--down {
    color: var(--danger);
  }
  .stat__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent-subtle);
    color: var(--accent);
  }
  .stat__icon svg {
    width: 18px;
    height: 18px;
  }
  .stat__icon--gambling {
    background: var(--reg-gambling-subtle);
    color: var(--reg-gambling);
  }
  .stat__icon--liquor {
    background: var(--reg-liquor-subtle);
    color: var(--reg-liquor);
  }
  .stat__icon--aml {
    background: var(--reg-aml-subtle);
    color: var(--reg-aml);
  }
  .stat__icon--food-safety {
    background: var(--reg-food-safety-subtle);
    color: var(--reg-food-safety);
  }
  .stat__icon--welfare {
    background: var(--reg-welfare-subtle);
    color: var(--reg-welfare);
  }
  .stat__icon--danger {
    background: var(--danger-subtle);
    color: var(--danger);
  }
  .stat__icon--warning {
    background: var(--warning-subtle);
    color: var(--warning);
  }
  .stat__icon--success {
    background: var(--success-subtle);
    color: var(--success);
  }
  .stat__icon--neutral {
    background: var(--surface-sunken);
    color: var(--text-muted);
  }
  .stat--alert .stat__value {
    color: var(--danger);
  }
  .stat--warn .stat__value {
    color: var(--warning);
  }
  .stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
  }
  .progress {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    overflow: hidden;
  }
  .progress__fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent);
    width: var(--value, 0%);
    transition: width var(--dur-slow) var(--ease);
  }
  .progress__fill--success {
    background: var(--success);
  }
  .progress__fill--warning {
    background: var(--warning);
  }
  .progress__fill--danger {
    background: var(--danger);
  }
  .progress-ring {
    position: relative;
    display: inline-grid;
    place-items: center;
  }
  .progress-ring svg {
    display: block;
    transform: rotate(-90deg);
  }
  .progress-ring__track {
    fill: none;
    stroke: var(--surface-sunken);
  }
  .progress-ring__arc {
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset var(--dur-slow) var(--ease);
  }
  .progress-ring__label {
    position: absolute;
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
  }
  .chart {
    display: block;
  }
  .chart__row {
    display: grid;
    grid-template-columns: minmax(0, 9rem) 1fr auto;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-1) 0;
  }
  .chart__label {
    font-size: var(--text-sm);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chart__value {
    font-size: var(--text-sm);
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    color: var(--text);
    text-align: right;
  }
  .chart__track {
    position: relative;
    display: flex;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    overflow: hidden;
  }
  .chart__fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent);
    width: var(--value, 0%);
  }
  .chart__fill--gambling {
    background: var(--reg-gambling);
  }
  .chart__fill--liquor {
    background: var(--reg-liquor);
  }
  .chart__fill--aml {
    background: var(--reg-aml);
  }
  .chart__fill--food-safety {
    background: var(--reg-food-safety);
  }
  .chart__fill--welfare {
    background: var(--reg-welfare);
  }
  .chart__fill--critical {
    background: var(--sev-critical);
  }
  .chart__fill--high {
    background: var(--sev-high);
  }
  .chart__fill--medium {
    background: var(--sev-medium);
  }
  .chart__fill--low {
    background: var(--sev-low);
  }
  .chart__fill--success {
    background: var(--success);
  }
  .chart__fill--warning {
    background: var(--warning);
  }
  .chart__fill--danger {
    background: var(--danger);
  }
  .chart__fill--neutral {
    background: var(--text-faint);
  }
  .chart--stacked .chart__track {
    display: inline-flex;
    width: 100%;
  }
  .chart--stacked .chart__fill {
    border-radius: 0;
  }
  .chart--stacked .chart__fill + .chart__fill {
    box-shadow: inset 2px 0 0 var(--surface-raised);
  }
  .chart__fill--tier-black-pearl {
    background: var(--tier-black-pearl);
  }
  .chart__fill--tier-aquamarine {
    background: var(--tier-aquamarine);
  }
  .chart__fill--tier-pearl {
    background: var(--tier-pearl);
  }
  .chart__fill--tier-coral {
    background: var(--tier-coral);
  }
  .chart__fill--tier-uncarded {
    background: var(--tier-uncarded);
  }
  .chart__marker {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--value, 0%);
    width: 2px;
    background: var(--text);
  }
  .chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    margin-bottom: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .chart__key {
    white-space: nowrap;
  }
  .chart__key::before {
    content: "";
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-right: var(--space-1);
    border-radius: 2px;
    vertical-align: -1px;
    background: var(--accent);
  }
  .chart__key--tier-black-pearl::before {
    background: var(--tier-black-pearl);
  }
  .chart__key--tier-aquamarine::before {
    background: var(--tier-aquamarine);
  }
  .chart__key--tier-pearl::before {
    background: var(--tier-pearl);
  }
  .chart__key--tier-coral::before {
    background: var(--tier-coral);
  }
  .chart__key--tier-uncarded::before {
    background: var(--tier-uncarded);
  }
  .chart__key--marker::before {
    width: 2px;
    border-radius: 0;
    background: var(--text);
  }
  @media (forced-colors: active) {
    .chart__marker {
      background: CanvasText;
    }
  }
  .chart-line {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }
  .chart-line__label {
    fill: var(--text-muted);
    font-size: 0.6875rem;
    font-variant-numeric: tabular-nums;
  }
  @media (forced-colors: active) {
    .chart-line :is(path, circle) {
      forced-color-adjust: none;
      stroke: CanvasText;
    }
  }
  .widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: var(--space-4);
    align-items: start;
  }
  .widget {
    min-width: 0;
  }
  @media (min-width: 768px) {
    .widget--wide {
      grid-column: span 2;
    }
  }
  .widget__figure {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-3xl);
    font-weight: 600;
    line-height: 1.1;
    color: var(--text);
  }
  .widget__figure--negative {
    color: var(--danger);
  }
  .widget__delta {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .widget__meta {
    margin-top: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .widget__actions {
    display: flex;
    align-items: center;
    gap: var(--space-1);
  }
  .linechart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }
  .linechart__area {
    fill: var(--accent-subtle);
    stroke: none;
  }
  .linechart__line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
  }
  .linechart__line--compare {
    stroke: var(--text-muted);
    stroke-dasharray: 5 4;
  }
  .linechart__point {
    fill: var(--accent);
  }
  .linechart__point--compare {
    fill: var(--text-muted);
  }
  .linechart__axis {
    stroke: var(--border);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
  }
  .linechart__scale {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: var(--space-1);
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .linechart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .linechart__key::before {
    content: "";
    display: inline-block;
    width: 1.25rem;
    margin-right: var(--space-1);
    vertical-align: middle;
    border-top: 2px solid var(--accent);
  }
  .linechart__key--compare::before {
    border-top: 2px dashed var(--text-muted);
  }
  @media (forced-colors: active) {
    .linechart__line,
    .linechart__axis {
      stroke: CanvasText;
    }
    .linechart__key::before {
      border-top-color: CanvasText;
    }
    .linechart__point {
      fill: CanvasText;
    }
    .linechart__area {
      fill: none;
    }
  }
  .heatmap {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    font-size: var(--text-xs);
  }
  .heatmap th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--text-xs);
    padding: var(--space-1);
    text-align: center;
    white-space: nowrap;
  }
  .heatmap__time {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    text-align: right;
    padding-right: var(--space-2);
    white-space: nowrap;
    width: 1%;
  }
  .heatmap__time--hour {
    color: var(--text);
    font-weight: 600;
  }
  .heatmap__cell {
    position: relative;
    padding: var(--space-1) var(--space-1);
    text-align: center;
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    border-radius: var(--radius-sm);
    min-width: 4.5rem;
    background: color-mix(in srgb, var(--accent) calc(var(--value, 0) * 1%), var(--surface-sunken));
    color: var(--text);
  }
  .heatmap__cell--strong {
    color: var(--surface);
    font-weight: 600;
  }
  .heatmap__cell--absent {
    background: repeating-linear-gradient(45deg, var(--surface-sunken), var(--surface-sunken) 3px, var(--surface) 3px, var(--surface) 6px);
    color: var(--text-faint);
  }
  .heatmap__cell--zero {
    background: var(--surface-sunken);
    color: var(--text-faint);
  }
  .heatmap__scroll {
    overflow-x: auto;
  }
  .heatmap__legend {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .heatmap__key {
    display: inline-block;
    width: 1.5rem;
    height: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
  }
  .heatmap__cell--total {
    background: var(--surface-raised);
    border-top: 2px solid var(--border-strong);
    font-weight: 600;
    color: var(--text);
  }
  .heatmap__pct {
    font-size: var(--text-xs);
    opacity: 0.75;
  }
  .timeline {
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .timeline::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 11px;
    width: 2px;
    background: var(--border);
  }
  .timeline__entry {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-5);
  }
  .timeline__entry:last-child {
    margin-bottom: 0;
  }
  .timeline__marker {
    position: absolute;
    left: 5px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: var(--border-strong);
    border: 2px solid var(--surface-raised);
  }
  .timeline__marker--accent {
    background: var(--accent);
  }
  .timeline__marker--danger {
    background: var(--danger);
  }
  .timeline__marker--success {
    background: var(--success);
  }
  .timeline__headline {
    font-size: var(--text-base);
    color: var(--text);
  }
  .timeline__meta {
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .timeline__time {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .timeline__body {
    font-size: var(--text-sm);
    margin-top: var(--space-1);
  }
  .empty-state {
    padding: var(--space-9);
    text-align: center;
    color: var(--text-muted);
  }
  .empty-state > i,
  .empty-state > svg,
  .empty-state__icon {
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto var(--space-4);
    color: var(--text-faint);
  }
  .empty-state-title,
  .empty-state__title {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
  }
  .empty-state p:not(.empty-state-title) {
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
  }
  .empty-state__actions {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
  }
  @keyframes skeleton-sweep {
    from {
      background-position: -200% 0;
    }
    to {
      background-position: 200% 0;
    }
  }
  .skeleton__line,
  .skeleton__label,
  .skeleton__input,
  .skeleton__textarea {
    display: block;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, var(--surface-sunken) 25%, var(--border) 50%, var(--surface-sunken) 75%);
    background-size: 200% 100%;
    animation: skeleton-sweep calc(var(--dur-slow) * 6) var(--ease) infinite;
  }
  .skeleton__line {
    height: 0.875rem;
    margin: var(--space-2) 0;
  }
  .skeleton__row {
    margin-bottom: var(--space-4);
  }
  .skeleton__label {
    height: 0.625rem;
    width: 38%;
    margin-bottom: var(--space-1);
  }
  .skeleton__input {
    height: 38px;
  }
  .skeleton__textarea {
    height: 96px;
  }
  .skeleton__line--w50 {
    width: 50%;
  }
  .skeleton__line--w60 {
    width: 60%;
  }
  .skeleton__line--w75 {
    width: 75%;
  }
  .skeleton__line--w85 {
    width: 85%;
  }
  .skeleton__line--w100 {
    width: 100%;
  }
  .skeleton__label--w40 {
    width: 40%;
  }
  .skeleton__label--w60 {
    width: 60%;
  }
  @media (prefers-reduced-motion: reduce) {
    .skeleton__line,
    .skeleton__label,
    .skeleton__input,
    .skeleton__textarea {
      animation: none;
    }
  }
  .busy,
  .proc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--overlay-bg);
  }
  .busy.is-open,
  .proc-overlay.is-open {
    display: flex;
  }
  .busy__card,
  .proc-overlay__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    background: var(--surface-raised);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    padding: var(--space-6);
  }
  @keyframes busy-spin {
    to {
      transform: rotate(360deg);
    }
  }
  .busy__spinner,
  .proc-overlay__spinner {
    flex: none;
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: var(--radius-full);
    animation: busy-spin 0.8s linear infinite;
  }
  .busy__msg,
  .proc-overlay__msg {
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: var(--radius-full);
    animation: busy-spin 0.8s linear infinite;
  }
  .spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
  }
  @media (prefers-reduced-motion: reduce) {
    .busy__spinner,
    .proc-overlay__spinner {
      display: none;
    }
    .spinner-border {
      animation-duration: 1.6s;
    }
  }
  .disclosure__summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    border-radius: var(--radius-sm);
  }
  .disclosure__summary::-webkit-details-marker {
    display: none;
  }
  .disclosure__summary::before {
    content: "›";
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted);
    transition: transform var(--dur-fast) var(--ease);
  }
  .disclosure[open] > .disclosure__summary::before {
    transform: rotate(90deg);
  }
  .disclosure__summary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .disclosure__body {
    padding: var(--space-2) 0;
  }
  .disclosure--card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
  }
  .disclosure--card > .disclosure__summary {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
  }
  .disclosure--card[open] > .disclosure__summary {
    border-bottom: 1px solid var(--border);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .disclosure--card .disclosure__body {
    padding: var(--space-3) var(--space-4);
  }
  .disclosure--plain > .disclosure__summary {
    padding: var(--space-2) 0;
  }
  .avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    overflow: hidden;
  }
  .avatar--sm {
    width: 24px;
    height: 24px;
  }
  .avatar--lg {
    width: 40px;
    height: 40px;
    font-size: var(--text-sm);
  }
  .avatar > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .attachments {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .attachments__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
  }
  .attachments__item:last-child {
    border-bottom: 0;
  }
  .attachments__icon {
    flex-shrink: 0;
    display: flex;
    color: var(--text-muted);
  }
  .attachments__icon svg {
    width: 18px;
    height: 18px;
  }
  .attachments__name {
    min-width: 0;
    font-size: var(--text-sm);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .attachments__meta {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
  }
  .attachments__actions {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    gap: var(--space-1);
  }
  .attachments__body {
    flex: 1;
    min-width: 0;
  }
  .attachments__body .attachments__name {
    display: block;
  }
  .attachments__body .attachments__meta {
    display: block;
    white-space: normal;
  }
  .attachments__item:has(.attachments__body) {
    align-items: flex-start;
  }
  .attachments__audio {
    display: block;
    margin-top: var(--space-2);
    width: 100%;
    max-width: 340px;
    height: 36px;
  }
  .attachments__transcript {
    margin-top: var(--space-2);
    font-size: var(--text-xs);
  }
  .attachments__transcript > summary {
    cursor: pointer;
    color: var(--text-muted);
  }
  .attachments__transcript > p {
    margin: var(--space-2) 0 0;
  }
  .lightbox,
  .att-viewer {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    flex-direction: column;
    background: color-mix(in srgb, var(--brand-950) 92%, transparent);
  }
  .lightbox.is-open,
  .att-viewer.is-open {
    display: flex;
  }
  .lightbox__bar,
  .att-viewer__bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--brand-950);
    color: var(--ink-200);
  }
  .lightbox__name,
  .att-viewer__name {
    min-width: 0;
    margin-right: auto;
    font-size: var(--text-sm);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lightbox__bar .btn,
  .att-viewer__bar .btn {
    flex-shrink: 0;
    min-height: 2.75rem;
    color: var(--ink-200);
  }
  .lightbox__bar .btn:hover,
  .att-viewer__bar .btn:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
  }
  .lightbox__close,
  .att-viewer__close {
    padding-inline: var(--space-3);
    font-size: var(--text-base);
  }
  .lightbox__bar .lightbox__close,
  .att-viewer__bar .att-viewer__close {
    border-color: var(--ink-300);
  }
  .lightbox__stage,
  .att-viewer__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
  }
  .lightbox__img,
  .att-viewer__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
  }
  .lightbox__pdf,
  .att-viewer__pdf {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
  }
  .dropzone {
    display: block;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: var(--space-7);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  }
  .dropzone.is-dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
  }
  .dropzone.is-filled {
    border-style: solid;
    border-color: var(--success);
    background: var(--success-subtle);
    color: var(--text);
  }
  .dropzone:focus-within {
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .dropzone__hint {
    font-size: var(--text-xs);
    color: var(--text-faint);
    margin-top: var(--space-1);
  }
  .prose {
    max-width: 72ch;
    font-size: var(--text-base);
    line-height: 1.65;
  }
  .prose h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-top: var(--space-7);
    margin-bottom: var(--space-3);
  }
  .prose h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
  }
  .prose p,
  .prose li {
    font-size: var(--text-base);
    line-height: 1.65;
  }
  .prose p {
    margin-bottom: var(--space-3);
  }
  .prose ul,
  .prose ol {
    padding-left: var(--space-5);
    margin-bottom: var(--space-3);
  }
  .prose a {
    color: var(--accent);
  }
  .prose code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--surface-sunken);
    padding: 2px 5px;
    border-radius: var(--radius-sm);
  }
  .prose pre {
    background: var(--surface-sunken);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-4);
  }
  .prose pre code {
    background: none;
    padding: 0;
    border-radius: 0;
  }
  .prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-4);
  }
  .prose th {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-strong);
  }
  .prose td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
  }
  .prose blockquote {
    border-left: 3px solid var(--border-strong);
    padding-left: var(--space-4);
    margin: var(--space-4) 0;
    color: var(--text-muted);
  }
  .prose h1 {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-strong);
  }
  .prose h4 {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
  }
  .prose h1,
  .prose h2,
  .prose h3,
  .prose h4 {
    scroll-margin-top: var(--space-5);
  }
  .prose__num {
    margin-right: var(--space-2);
    font-family: var(--font-num);
    font-size: 0.85em;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
  }
  .prose__heading-text {
    min-width: 0;
  }
  .prose__anchor {
    margin-left: var(--space-2);
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    color: var(--accent);
    text-decoration: none;
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
  }
  .prose h1:hover .prose__anchor,
  .prose h2:hover .prose__anchor,
  .prose h3:hover .prose__anchor,
  .prose h4:hover .prose__anchor {
    opacity: 0.6;
  }
  .prose__anchor:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
    border-radius: var(--radius-sm);
    opacity: 0.6;
  }
  .prose__pre {
    position: relative;
  }
  .prose__pre[data-lang]::after {
    content: attr(data-lang);
    position: absolute;
    top: var(--space-2);
    right: var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-faint);
    pointer-events: none;
  }
  .prose__table {
    margin-bottom: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: auto;
    max-height: 70vh;
  }
  .prose__table:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .prose__table table {
    margin-bottom: 0;
  }
  .prose__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-raised);
  }
  .prose__table tbody tr:last-child td {
    border-bottom: 0;
  }
}
@layer pages {
  .cashup-ledger {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-1) 0;
    border-bottom: 1px dashed var(--border);
  }
  .cashup-ledger:last-child {
    border-bottom: 0;
  }
  .cashup-ledger__label {
    color: var(--text-muted);
  }
  .cashup-ledger__value {
    font-family: var(--font-num);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .cashup-variance--nonzero {
    color: var(--danger);
    font-weight: 700;
  }
  .cashup-shift {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }
  .cashup-shift--up {
    color: var(--success);
  }
  .cashup-shift--down {
    color: var(--danger);
  }
  .cashup-shift--flat,
  .cashup-shift--none {
    color: var(--text-muted);
    font-weight: 400;
  }
  .cashup-cell-shift {
    display: block;
    font-size: var(--text-xs);
    line-height: 1.3;
  }
  .cashup-opening-restore {
    display: inline-block;
    padding: 0 var(--space-1);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--accent);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
  }
  .cashup-opening-restore:hover {
    border-color: var(--accent);
  }
  .cashup-opening-restore:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-shift-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
  }
  .cashup-shift-picker__label {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: var(--text-xs);
  }
  .cashup-shift-picker .form-control {
    width: auto;
    font-size: var(--text-sm);
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
  }
  .cashup-opening-hint--moved {
    color: var(--warning);
    font-weight: 600;
  }
  .cashup-control > .panel__header {
    background: var(--surface-sunken);
  }
  .cashup-variance--unexplained {
    color: var(--warning);
    font-weight: 700;
  }
  .cashup-variance--explained {
    color: var(--text);
    font-weight: 700;
  }
  .cashup-ledger__note {
    margin: calc(var(--space-1) * -1) 0 var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .cashup-ledger__note--missing {
    color: var(--warning);
  }
  .cashup-note-presets {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
  }
  .cashup-ledger--sub {
    padding-left: var(--space-4);
    font-size: var(--text-sm);
  }
  .cashup-ledger--sub .cashup-ledger__label {
    color: var(--text-muted);
  }
  .cashup-ledger--sub .cashup-ledger__value {
    font-weight: 500;
  }
  .cashup-ledger--total {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    margin-top: var(--space-1);
    padding-top: var(--space-2);
  }
  .cashup-ledger--total .cashup-ledger__label {
    color: var(--text);
    font-weight: 600;
  }
  .cashup-ledger--total .cashup-ledger__value {
    font-weight: 700;
  }
  .cashup-ledger--aside {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--border);
  }
  .cashup-ledger__aside-note {
    margin: 0 0 var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
  }
  .cashup-statement__total {
    background: var(--surface-sunken);
  }
  .cashup-statement__total th, .cashup-statement__total td {
    font-weight: 700;
  }
  .cashup-field__note {
    margin-top: var(--space-2);
    padding-left: var(--space-3);
    border-left: 2px solid var(--warning);
  }
  .cashup-field__note .field__label {
    margin-bottom: var(--space-1);
    color: var(--text-muted);
  }
  .cashup-ledger__note-tag {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .cashup-tills {
    border-top: 1px solid var(--border);
  }
  .cashup-tills__chevron {
    transition: transform var(--dur-base) var(--ease);
  }
  .cashup-tills__toggle:not(.collapsed) .cashup-tills__chevron {
    transform: rotate(180deg);
  }
  .cashup-field {
    margin-bottom: 0;
  }
  .cashup-field__row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .cashup-field__row .form-control {
    flex: 1 1 auto;
  }
  .cashup-capture-btn,
  .cashup-capture-indicator {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
  }
  .cashup-capture-btn:hover,
  .cashup-capture-indicator:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .cashup-capture-btn:focus-visible,
  .cashup-capture-indicator:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-capture-indicator--active {
    border-color: var(--border-strong);
    color: var(--text-muted);
    background: var(--success-subtle);
  }
  .cashup-note {
    padding: var(--space-2) 0;
    border-bottom: 1px dashed var(--border);
  }
  .cashup-note:last-child {
    border-bottom: 0;
  }
  .cashup-note__label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
  }
  .cashup-note__text {
    margin: 0;
    white-space: pre-wrap;
  }
  .cashup-review-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    align-items: start;
  }
  @media (min-width: 1024px) {
    .cashup-review-layout {
      grid-template-columns: 3fr 2fr;
    }
  }
  .cashup-note-prompt {
    margin: var(--space-2) 0 var(--space-3);
  }
  .cashup-note-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
  }
  .cashup-note-chip {
    padding: 0.125rem var(--space-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-xs);
    cursor: pointer;
  }
  .cashup-note-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .cashup-note-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-subhead {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
  }
  .cashup-links {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .cashup-links li {
    padding: var(--space-1) 0;
  }
  /* ============================================================
     Cash Up entry wizard
     ------------------------------------------------------------
     Built mobile-first: staff run this on a phone, at the till, one
     figure at a time. The desktop layout (step sidebar + wide card)
     is the enhancement, added at the lg breakpoint at the end.
     ============================================================ */
  .cashup-wizard {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    align-items: start;
    position: relative;
  }
  .cashup-wizard__stepper {
    display: none;
    order: 2;
    max-height: min(60vh, 26rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    background: var(--surface-raised);
    box-shadow: var(--shadow-3);
  }
  .cashup-wizard__stepper--open {
    display: block;
  }
  .cashup-wizard__stepper-group {
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: var(--space-3) var(--space-2) var(--space-1);
  }
  .cashup-wizard__step-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-height: 2.75rem;
    text-align: left;
    padding: var(--space-1) var(--space-2);
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    cursor: pointer;
    font-size: var(--text-base);
    line-height: 1.3;
    color: inherit;
  }
  .cashup-wizard__step-btn:hover {
    background: var(--surface-sunken);
  }
  .cashup-wizard__step-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-wizard__step-btn--current {
    background: var(--accent-subtle);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--accent);
  }
  .cashup-wizard__step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
  }
  .cashup-wizard__step-btn--done .cashup-wizard__step-num {
    background: var(--success);
    border-color: var(--success);
    color: var(--on-accent);
  }
  .cashup-wizard__step-btn--current .cashup-wizard__step-num {
    border-color: var(--accent);
    color: var(--accent);
  }
  .cashup-wizard__step-btn--current.cashup-wizard__step-btn--done .cashup-wizard__step-num {
    color: var(--on-accent);
  }
  .cashup-wizard__step-label {
    flex: 1 1 auto;
    min-width: 0;
  }
  .cashup-wizard__step-done-icon,
  .cashup-wizard__step-note-icon {
    flex: 0 0 auto;
    display: none;
    width: 14px;
    height: 14px;
  }
  .cashup-wizard__step-done-icon {
    color: var(--success);
  }
  .cashup-wizard__step-note-icon {
    color: var(--text-muted);
  }
  .cashup-wizard__step-btn--done .cashup-wizard__step-done-icon {
    display: inline-block;
  }
  .cashup-wizard__step-btn--noted .cashup-wizard__step-note-icon {
    display: inline-block;
  }
  .cashup-wizard__main {
    order: 1;
    min-width: 0;
  }
  .cashup-wizard__progress {
    margin-bottom: var(--space-3);
  }
  .cashup-wizard__progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
  }
  .cashup-wizard__steps-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 2.25rem;
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    background: var(--surface-raised);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
  }
  .cashup-wizard__steps-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
  .cashup-wizard__steps-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-wizard__progress-count {
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
  }
  .cashup-wizard__progress-track {
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--surface-sunken);
    overflow: hidden;
  }
  .cashup-wizard__progress-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--accent);
    transition: width var(--dur-base) var(--ease);
  }
  .cashup-wizard__card {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4) var(--space-4);
    box-shadow: var(--shadow-1);
  }
  .cashup-wizard__step-kicker {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);
  }
  .cashup-wizard__step-group {
    font-weight: 600;
    color: var(--accent);
  }
  .cashup-wizard__step-count {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .cashup-wizard__step .cashup-field {
    max-width: 26rem;
  }
  .cashup-wizard__step .cashup-field .field__label {
    font-size: var(--text-md);
    font-weight: 600;
    margin-bottom: var(--space-2);
  }
  .cashup-wizard__step .cashup-field .form-control {
    font-size: 1.375rem;
    font-variant-numeric: tabular-nums;
    padding: var(--space-2) var(--space-3);
    min-height: 2.75rem;
  }
  .cashup-wizard__step-title {
    margin: 0 0 var(--space-3);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text);
  }
  .cashup-wizard__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
  @media (max-width: 767.98px) {
    .cashup-wizard__pair {
      grid-template-columns: 1fr;
    }
  }
  .cashup-wizard__step .cashup-wizard__pair .cashup-field {
    max-width: none;
  }
  .cashup-wizard__variance {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
  }
  .cashup-wizard__note {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--border);
  }
  .cashup-wizard__note-required {
    margin: var(--space-2) 0 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--danger);
  }
  .cashup-wizard__step-btn--needsnote .cashup-wizard__step-num {
    background: var(--danger-subtle);
    color: var(--danger);
    box-shadow: inset 0 0 0 1px var(--danger);
  }
  .cashup-wizard__note-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 2.25rem;
    padding: var(--space-1) var(--space-2);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
  }
  .cashup-wizard__note-toggle:hover {
    border-color: var(--border);
    color: var(--text);
  }
  .cashup-wizard__note-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-wizard__note-toggle--active {
    color: var(--accent);
    background: var(--accent-subtle);
  }
  .cashup-wizard__note-body {
    margin-top: var(--space-2);
  }
  .cashup-wizard__note-input {
    font-size: var(--control-font-size);
    line-height: 1.45;
    resize: vertical;
  }
  .cashup-wizard__nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding: var(--space-3) 0;
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: linear-gradient(to top, var(--surface) 70%, transparent);
  }
  .cashup-wizard__nav-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-height: 2.75rem;
    padding-inline: var(--space-4);
  }
  .cashup-wizard__save-status {
    font-size: var(--text-sm);
    color: var(--text-muted);
    flex: 1 1 auto;
    text-align: center;
  }
  .cashup-wizard__save-status--saved {
    color: var(--success);
  }
  .cashup-wizard__save-status--saving {
    color: var(--text-muted);
  }
  .cashup-wizard__save-status--error {
    color: var(--danger);
    font-weight: 600;
  }
  .cashup-wizard__finish {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px dashed var(--border);
  }
  .cashup-wizard__finish .btn {
    flex: 1 1 auto;
  }
  @media (max-width: 1023.98px) {
    .cashup-wizard__stepper--open {
      position: absolute;
      top: 3.25rem;
      left: 0;
      right: 0;
      z-index: 20;
    }
  }
  @media (min-width: 1024px) {
    .cashup-wizard {
      grid-template-columns: 17rem minmax(0, 1fr);
      gap: var(--space-5);
    }
    .cashup-wizard__stepper {
      display: block;
      order: 0;
      position: sticky;
      top: var(--space-4);
      max-height: calc(100vh - var(--space-6));
      box-shadow: none;
    }
    .cashup-wizard__main {
      order: 0;
    }
    .cashup-wizard__steps-toggle {
      display: none;
    }
    .cashup-wizard__card {
      padding: var(--space-6);
    }
    .cashup-wizard__nav {
      position: static;
      background: none;
    }
    .cashup-wizard__finish .btn {
      flex: 0 0 auto;
    }
  }
  /* ============================================================
     Captured-photo viewer modal (read-only)
     ------------------------------------------------------------
     Bespoke [hidden]-driven overlay with its own controller
     (cash-up-capture-modal.js) rather than the shared .modal JS;
     the chrome uses the same overlay/panel tokens as .modal.
     ============================================================ */
  .cashup-capture-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cashup-capture-modal[hidden] {
    display: none;
  }
  .cashup-capture-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
  }
  .cashup-capture-modal__panel {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 480px);
    max-height: 85vh;
    overflow: auto;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    padding: var(--space-4);
  }
  .cashup-capture-modal__close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    border: none;
    background: transparent;
    font-size: var(--text-2xl);
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
  }
  .cashup-capture-modal__close:hover {
    color: var(--text);
  }
  .cashup-capture-modal__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-capture-modal__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
  }
  .cashup-capture-modal__notes {
    color: var(--text-muted);
    white-space: pre-wrap;
    margin: 0;
  }
  /* ============================================================
     Docket camera (inside the global modal)
     ------------------------------------------------------------
     Live preview from the office's overhead scanner. The picture
     is letterboxed, not cropped, so the whole docket shows while
     it is positioned.
     ============================================================ */
  .cashup-camera__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .cashup-camera__video {
    display: block;
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
  }
  .cashup-camera__status {
    position: absolute;
    inset: auto var(--space-4);
    margin: 0;
    color: var(--text-muted);
    text-align: center;
  }
  .cashup-camera__picker {
    margin: var(--space-3) 0 0;
  }
  /* ============================================================
     Capture confirmation modal
     ------------------------------------------------------------
     Value on the left, photo on the right, so the read figure can
     be checked against its source without leaving the sheet.
     Stacks on narrow screens (staff capture on phones), where the
     image goes first.
     ============================================================ */
  .cashup-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cashup-confirm-modal[hidden] {
    display: none;
  }
  .cashup-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
  }
  .cashup-confirm-modal__panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1000px);
    max-height: 92vh;
    overflow: auto;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    padding: var(--space-5);
  }
  .cashup-confirm-modal__close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-3);
    border: none;
    background: transparent;
    font-size: var(--text-2xl);
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
  }
  .cashup-confirm-modal__close:hover {
    color: var(--text);
  }
  .cashup-confirm-modal__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .cashup-confirm-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--space-5);
    align-items: start;
  }
  .cashup-confirm-modal__title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0 0 var(--space-1);
  }
  .cashup-confirm-modal__field {
    font-weight: 600;
    margin: 0 0 var(--space-4);
    color: var(--text-muted);
  }
  .cashup-confirm-modal__label {
    display: block;
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-1);
  }
  .cashup-confirm-modal__amount-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .cashup-confirm-modal__currency {
    font-size: var(--text-2xl);
    font-weight: 600;
  }
  .cashup-confirm-modal__amount {
    font-size: var(--text-2xl);
    font-weight: 600;
    max-width: 12rem;
  }
  .cashup-confirm-modal__hint {
    font-size: var(--text-base);
    margin: var(--space-2) 0 0;
    color: var(--text-muted);
  }
  .cashup-confirm-modal__hint--error {
    color: var(--danger);
    font-weight: 600;
  }
  .cashup-confirm-modal__also {
    display: grid;
    gap: var(--space-1);
    margin-top: var(--space-4);
  }
  .cashup-confirm-modal__also .cashup-confirm-modal__label:not(:first-child) {
    margin-top: var(--space-3);
  }
  .cashup-confirm-modal__check {
    font-size: var(--text-base);
    margin: var(--space-3) 0 0;
  }
  .cashup-confirm-modal__check--ok {
    color: var(--success);
  }
  .cashup-confirm-modal__check--warn {
    color: var(--danger);
    font-weight: 600;
  }
  .cashup-confirm-modal__notes-wrap {
    margin-top: var(--space-4);
  }
  .cashup-confirm-modal__notes {
    margin: 0;
    font-size: var(--text-base);
    white-space: pre-wrap;
  }
  .cashup-confirm-modal__actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-5);
  }
  .cashup-confirm-modal__figure {
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--surface-sunken);
  }
  .cashup-confirm-modal__img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    transform-origin: center center;
  }
  .cashup-confirm-modal__zoom-hint {
    font-size: var(--text-sm);
    text-align: center;
    margin: var(--space-1) 0 0;
    color: var(--text-muted);
  }
  @media (max-width: 767.98px) {
    .cashup-confirm-modal__body {
      grid-template-columns: 1fr;
    }
    .cashup-confirm-modal__figure {
      order: -1;
    }
    .cashup-confirm-modal__img {
      max-height: 45vh;
    }
  }
  .cashup-recycler-fill {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }
  @media (min-width: 640px) {
    .cashup-recycler-fill {
      flex-direction: row;
      gap: var(--space-5);
      align-items: center;
      justify-content: space-between;
    }
  }
  .petty-cash-lines {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .petty-cash-line {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .petty-cash-line .form-grid {
    gap: var(--space-3) var(--space-4);
  }
  .petty-cash-line .petty-cash-line__title {
    margin-bottom: var(--space-1);
  }
  .petty-cash-line__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
  }
  .field__static {
    display: flex;
    align-items: center;
    min-height: var(--control-height, 2.5rem);
    margin: 0;
    padding: 0 var(--space-3);
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    background: var(--surface-2, transparent);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md, 0.375rem);
  }
  #petty-cash-remaining-value[data-state=under] {
    color: var(--text-muted);
  }
  #petty-cash-remaining-value[data-state=over] {
    color: var(--danger);
    font-weight: 700;
  }
  #petty-cash-remaining-value[data-state=balanced] {
    color: var(--success);
  }
  .petty-cash-totals {
    display: flex;
    flex-direction: column;
    min-width: 18rem;
  }
  .petty-cash-totals .cashup-ledger__label {
    flex: 1 1 auto;
  }
  .petty-cash-totals .cashup-ledger__value {
    flex: 0 0 auto;
    text-align: right;
    min-width: 7rem;
  }
  .cashup-wizard__note-extra {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
  }
  .cashup-field input[type=number],
  .petty-cash-line input[type=number],
  .cashup-wizard input[type=number] {
    appearance: textfield;
  }
  .cashup-field input[type=number]::-webkit-outer-spin-button, .cashup-field input[type=number]::-webkit-inner-spin-button,
  .petty-cash-line input[type=number]::-webkit-outer-spin-button,
  .petty-cash-line input[type=number]::-webkit-inner-spin-button,
  .cashup-wizard input[type=number]::-webkit-outer-spin-button,
  .cashup-wizard input[type=number]::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
  }
  .cashup-cleared {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
  }
  .cashup-cleared__summary {
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .egm-picker__bar {
    position: sticky;
    top: calc(-1 * var(--space-5));
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-4) var(--space-6);
    margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border);
  }
  .egm-picker__stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
  }
  .egm-picker__label {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .egm-picker__value {
    font-size: var(--text-2xl);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text);
  }
  .egm-picker__value.is-off {
    color: var(--danger);
  }
  .egm-picker__value.is-level {
    color: var(--success);
  }
  .egm-picker__actions {
    display: flex;
    gap: var(--space-2);
    margin-left: auto;
  }
  .egm-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: var(--space-2);
    touch-action: none;
    user-select: none;
  }
  .egm-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-height: 5rem;
    padding: var(--space-3);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  }
  .egm-tile:hover {
    border-color: var(--border-strong);
  }
  .egm-tile:has(.egm-tile__input:checked) {
    background: var(--accent);
    border-color: var(--accent);
  }
  .egm-tile:has(.egm-tile__input:checked) .egm-tile__name,
  .egm-tile:has(.egm-tile__input:checked) .egm-tile__cash,
  .egm-tile:has(.egm-tile__input:checked) .egm-tile__why {
    color: var(--on-accent);
  }
  .egm-tile:has(.egm-tile__input:focus-visible) {
    box-shadow: var(--focus-ring);
  }
  .egm-tile__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .egm-tile__name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text);
  }
  .egm-tile__cash {
    font-size: var(--text-md);
    font-variant-numeric: tabular-nums;
    color: var(--text);
  }
  .egm-tile__why {
    font-size: var(--text-xs);
    color: var(--warning);
  }
  .sys-overview {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    gap: var(--space-4);
    align-items: stretch;
  }
  @media (max-width: 1023.98px) {
    .sys-overview {
      grid-template-columns: 1fr;
    }
  }
  .sys-verdict {
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }
  .sys-verdict__dot {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--text-faint);
    transition: background var(--dur-base) var(--ease);
  }
  .sys-verdict__dot.is-ok {
    background: var(--success);
  }
  .sys-verdict__dot.is-warn {
    background: var(--warning);
  }
  .sys-verdict__dot.is-fail {
    background: var(--danger);
  }
  .sys-verdict__word {
    font-size: var(--text-3xl);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.015em;
  }
  .sys-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .sys-chip {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    line-height: 1.2;
  }
  .sys-chip__k {
    display: block;
    margin-bottom: 2px;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .sys-chip__v {
    font-family: var(--font-num);
    font-size: var(--text-md);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .sys-ringwrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }
  .progress-ring.is-ok .progress-ring__arc {
    stroke: var(--success);
  }
  .progress-ring.is-warn .progress-ring__arc {
    stroke: var(--warning);
  }
  .progress-ring.is-fail .progress-ring__arc {
    stroke: var(--danger);
  }
  .sys-stat--text .stat__value {
    font-family: var(--font-sans);
    font-size: var(--text-lg);
    line-height: 1.3;
  }
  .sys-stat__unit {
    margin-left: 3px;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
  }
  .sys-loading {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .sys-svc {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: var(--space-4);
  }
  .sys-svc__top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
  }
  .sys-svc__dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--text-faint);
  }
  .sys-svc.is-ok .sys-svc__dot {
    background: var(--success);
  }
  .sys-svc.is-warn .sys-svc__dot {
    background: var(--warning);
  }
  .sys-svc.is-fail .sys-svc__dot {
    background: var(--danger);
  }
  .sys-svc__icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--text-muted);
  }
  .sys-svc__name {
    flex: 1;
    min-width: 0;
    font-size: var(--text-base);
    font-weight: 600;
  }
  .sys-svc__detail {
    margin-top: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    word-break: break-word;
  }
  .admin-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: start;
  }
  @media (max-width: 1023.98px) {
    .admin-cols {
      grid-template-columns: 1fr;
    }
  }
  .eprev {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: var(--space-4);
    align-items: start;
  }
  @media (max-width: 767.98px) {
    .eprev {
      grid-template-columns: 1fr;
    }
  }
  .eprev-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-2);
  }
  .eprev-item {
    display: block;
    padding: var(--space-2) var(--space-3);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--text);
    text-decoration: none;
  }
  .eprev-item:hover {
    background: var(--surface-sunken);
  }
  .eprev-item.is-active {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
    font-weight: 600;
  }
  .eprev-item small {
    display: block;
    margin-top: 1px;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--text-muted);
  }
  .eprev-frame-wrap {
    overflow: hidden;
  }
  .eprev-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--border);
  }
  .eprev-subject {
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--border);
    font-size: var(--text-sm);
  }
  .eprev-frame {
    display: block;
    width: 100%;
    height: 760px;
    border: 0;
    background: var(--mist-50);
  }
  .company-logo {
    padding: var(--space-4);
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
  }
  .company-logo img {
    max-width: 100%;
    max-height: 90px;
  }
  .role-guide {
    display: grid;
    gap: 0.3rem;
    margin-top: var(--space-2);
    padding: 0.625rem 0.75rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }
  .role-guide__item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: var(--space-2);
    font-size: 0.78125rem;
    line-height: 1.4;
  }
  .role-guide__role {
    font-weight: 600;
    color: var(--text);
  }
  .role-guide__desc {
    color: var(--text-muted);
  }
  .settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--space-6);
    align-items: start;
  }
  @media (max-width: 1023.98px) {
    .settings-grid {
      grid-template-columns: 1fr;
    }
  }
  .profile-kv {
    margin: 0;
  }
  .profile-kv dt {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .profile-kv dd {
    margin: 2px 0 var(--space-3);
    font-size: var(--text-sm);
  }
  .profile-kv dd:last-child {
    margin-bottom: 0;
  }
  .backup-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    letter-spacing: 0.04em;
  }
  .backup-codes code {
    color: var(--text);
  }
  @media (max-width: 639.98px) {
    .backup-codes {
      grid-template-columns: 1fr;
    }
  }
  .session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-top: 1px solid var(--border);
  }
  .session-row:first-child {
    border-top: none;
  }
  .session-row__dev {
    font-size: var(--text-base);
    font-weight: 600;
  }
  .session-row__meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .twofa-shield {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--success-subtle);
    color: var(--success);
  }
  .twofa-shield svg {
    width: 18px;
    height: 18px;
  }
  .twofa-qr {
    width: 180px;
    height: 180px;
  }
  .twofa-help {
    flex: 1;
    min-width: 200px;
  }
  .twofa-secret {
    display: block;
    padding: var(--space-2) var(--space-3);
    background: var(--surface-sunken);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    letter-spacing: 0.1em;
    word-break: break-all;
  }
  .twofa-code {
    width: 160px;
    font-family: var(--font-mono);
    font-size: var(--text-lg);
    letter-spacing: 0.25em;
    text-align: center;
  }
  .kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-5);
    font-size: var(--text-base);
  }
  .kv__label {
    font-family: var(--font-label);
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    padding-top: 2px;
  }
  .kv__value {
    min-width: 0;
    color: var(--text);
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .passkey-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .passkey-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .passkey-list__item:last-child {
    border-bottom: 0;
  }
  .venue-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .venue-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
  }
  .venue-list__item:last-child {
    border-bottom: 0;
  }
  .cg-section {
    margin-bottom: 1.25rem;
  }
  .cg-item {
    padding: 1.25rem 0;
    border-bottom: 1px dashed var(--border);
  }
  .cg-item:first-child {
    padding-top: 0;
  }
  .cg-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .cg-item__bar {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }
  .cg-name {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 0.125rem 0.4375rem;
    border-radius: 5px;
  }
  .cg-note {
    font-size: var(--text-sm);
    color: var(--text-muted);
  }
  .cg-canvas {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }
  .cg-canvas > .stat-strip {
    margin-bottom: 0;
  }
  .cg-canvas .btn,
  .cg-canvas .badge,
  .cg-canvas .ai-badge {
    margin: 0.25rem 0.5rem 0.25rem 0;
  }
  .cg-type {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
  }
  .cg-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  .cg-swatch__chip {
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-end;
    padding: 0.4rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
  }
  .cg-swatch__chip--light {
    color: rgba(255, 255, 255, 0.92);
  }
  .cg-swatch__chip--dark {
    color: rgba(29, 43, 58, 0.7);
  }
  .cg-swatch__name {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-top: 0.4rem;
  }
  .cg-swatch__var {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
  }
  .body--error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--surface);
    color: var(--text);
  }
  .error-page {
    text-align: center;
    padding: var(--space-9) var(--space-6);
    max-width: 480px;
  }
  .error-code {
    margin: 0 0 var(--space-2);
    font-size: calc(var(--text-3xl) * 3);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent);
  }
  .error-message {
    margin: 0 0 var(--space-6);
    font-size: var(--text-lg);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-muted);
  }
  .error-page__actions {
    justify-content: center;
  }
  .pr-indent {
    padding-left: var(--space-6);
  }
  .pr-print-head {
    display: none;
  }
  .pr-print-head__title {
    font-size: var(--text-lg);
    margin: 0 0 var(--space-1);
  }
  @media print {
    .pr-noprint {
      display: none;
    }
    .pr-print-head {
      display: block;
      margin-bottom: var(--space-4);
    }
    .pr-report {
      font-size: 10pt;
    }
    .pr-report .panel {
      break-inside: avoid;
      box-shadow: none;
    }
    .pr-report .table th,
    .pr-report .table td {
      padding: 3pt 6pt;
    }
  }
}
@layer utilities {
  .u-flex {
    display: flex;
  }
  .u-inline-flex {
    display: inline-flex;
  }
  .u-block {
    display: block;
  }
  .u-hidden {
    display: none;
  }
  .u-items-center {
    align-items: center;
  }
  .u-justify-between {
    justify-content: space-between;
  }
  .u-wrap {
    flex-wrap: wrap;
  }
  .u-gap-1 {
    gap: var(--space-1);
  }
  .u-gap-2 {
    gap: var(--space-2);
  }
  .u-gap-3 {
    gap: var(--space-3);
  }
  .u-gap-4 {
    gap: var(--space-4);
  }
  .u-grow {
    flex-grow: 1;
  }
  .u-ml-auto {
    margin-left: auto;
  }
  .u-ml-1 {
    margin-left: var(--space-1);
  }
  .u-items-start {
    align-items: flex-start;
  }
  .u-items-end {
    align-items: flex-end;
  }
  .u-flex-col {
    flex-direction: column;
  }
  .u-m-0 {
    margin: 0;
  }
  .u-mt-1 {
    margin-top: var(--space-1);
  }
  .u-mt-2 {
    margin-top: var(--space-2);
  }
  .u-mt-3 {
    margin-top: var(--space-3);
  }
  .u-mt-4 {
    margin-top: var(--space-4);
  }
  .u-mt-5 {
    margin-top: var(--space-5);
  }
  .u-mt-6 {
    margin-top: var(--space-6);
  }
  .u-mb-1 {
    margin-bottom: var(--space-1);
  }
  .u-mb-2 {
    margin-bottom: var(--space-2);
  }
  .u-mb-3 {
    margin-bottom: var(--space-3);
  }
  .u-mb-4 {
    margin-bottom: var(--space-4);
  }
  .u-mb-5 {
    margin-bottom: var(--space-5);
  }
  .u-mb-6 {
    margin-bottom: var(--space-6);
  }
  .u-p-4 {
    padding: var(--space-4);
  }
  .u-text-muted {
    color: var(--text-muted);
  }
  .u-fw-600 {
    font-weight: 600;
  }
  .u-text-faint {
    color: var(--text-faint);
  }
  .u-text-danger {
    color: var(--danger);
  }
  .u-text-success {
    color: var(--success);
  }
  .u-text-warning {
    color: var(--warning);
  }
  .u-text-sm {
    font-size: var(--text-sm);
  }
  .u-text-xs {
    font-size: var(--text-xs);
  }
  .u-num {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
  }
  .u-mono {
    font-family: var(--font-mono);
  }
  .u-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .u-nowrap {
    white-space: nowrap;
  }
  .u-center {
    text-align: center;
  }
  .u-text-right {
    text-align: right;
  }
  .u-w-full {
    width: 100%;
  }
  .u-w-auto {
    width: auto;
  }
  .u-maxw-xs {
    max-width: 15rem;
  }
  .u-maxw-sm {
    max-width: 36rem;
  }
  .u-maxw-md {
    max-width: 46rem;
  }
  .u-color-inherit {
    color: inherit;
  }
  .u-relative {
    position: relative;
  }
  .u-shrink-0 {
    flex-shrink: 0;
  }
  .u-text-accent {
    color: var(--accent);
  }
  .u-hide-below-sm {
    display: none;
  }
  @media (min-width: 640px) {
    .u-hide-below-sm {
      display: initial;
    }
  }
  .u-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;
  }
  .icon-xs {
    width: 12px;
    height: 12px;
    vertical-align: -2px;
  }
  .icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
  }
  .icon-md {
    width: 16px;
    height: 16px;
    vertical-align: -3px;
  }
  .icon-lg {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
  }
}
