      :root {
        /* base palette (RGB channels for alpha support) — warmed toward parchment (very subtle) */
        --c-bg: 245 243 238;
        --c-surface: 254 253 251;
        --c-surface-2: 246 243 237;
        --c-border: 228 223 214;
        --c-border-strong: 212 205 194;
        --c-text: 30 27 24;            /* warm ink near-black */
        --c-text-muted: 96 90 82;      /* warm gray */
        --c-text-faint: 148 141 131;
        --c-primary: 37 87 214;        /* #2557D6 deep blue — overridable */
        --c-primary-hover: 28 68 176;

        /* institutional secondary — oxblood / archive-seal (chrome accents only, never data) */
        --c-accent2: 134 46 58;        /* #862E3A */
        --c-accent2-ink: 118 38 50;    /* AA on parchment */

        /* editorial display type — serif on headings only, body stays sans */
        --font-serif: 'Noto Serif Georgian', 'Noto Serif', Georgia, 'Times New Roman', serif;

        /* confidentiality — semantic tokens (single source). dot = solid; ink = AA-contrast text */
        --conf-public: 31 157 87;       --conf-public-ink: 17 116 62;
        --conf-internal: 79 105 230;    --conf-internal-ink: 58 78 196;
        --conf-confidential: 211 132 8; --conf-confidential-ink: 146 88 0;
        --conf-secret: 211 47 71;       --conf-secret-ink: 178 28 52;

        /* status — semantic tokens */
        --st-draft: 120 128 140;
        --st-active: 31 157 87;
        --st-archived: 100 116 139;
        --st-hold: 211 47 71;
        --st-disposal: 197 122 8;
        --st-disposed: 150 156 165;

        /* access indicator */
        --ax-read: 17 116 62;
        --ax-meta: 146 88 0;
        --ax-stepup: 178 28 52;
        --ax-denied: 130 138 150;

        /* density (default = comfortable) */
        --row-py: 11px;
        --row-px: 16px;
        --cell-py: 10px;
        --cell-px: 14px;
        --card-p: 16px;
        --list-gap: 10px;
        --font-table: 13.5px;
        --badge-pad-y: 2.5px;
        --badge-pad-x: 8px;
      }

      /* paper tone — cool override (parchment is default). Tweakable; neutrals only. */
      [data-paper='cool'] {
        --c-bg: 246 248 251;
        --c-surface: 255 255 255;
        --c-surface-2: 244 246 249;
        --c-border: 226 230 236;
        --c-border-strong: 211 217 224;
        --c-text: 24 28 35;
        --c-text-muted: 90 98 110;
        --c-text-faint: 140 148 160;
      }

      [data-density='compact'] {
        --row-py: 6px;
        --row-px: 12px;
        --cell-py: 5px;
        --cell-px: 10px;
        --card-p: 13px;
        --list-gap: 6px;
        --font-table: 13px;
        --badge-pad-y: 1.5px;
        --badge-pad-x: 7px;
      }

      html, body, #root { height: 100%; }
      body {
        margin: 0;
        background: rgb(var(--c-bg));
        color: rgb(var(--c-text));
        font-family: 'Noto Sans Georgian', system-ui, -apple-system, 'Segoe UI', sans-serif;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
      }
      ::selection { background: rgb(var(--c-primary) / 0.18); }

      /* editorial serif — headings only; high-contrast, dignified. tnum on display numerals. */
      .serif {
        font-family: var(--font-serif);
        font-weight: 600;
        letter-spacing: -0.005em;
        font-feature-settings: 'tnum' 0;
      }
      .serif-num { font-family: var(--font-serif); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; letter-spacing: -0.01em; }

      /* short institutional rule — oxblood tick that precedes section headings */
      .seal-rule { display: inline-block; width: 22px; height: 2.5px; border-radius: 2px; background: rgb(var(--c-accent2)); vertical-align: middle; }

      /* tabular numerals everywhere data is dense */
      .tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
      .mono { font-family: 'Noto Sans Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

      /* density-driven helpers (used by refined components so the density tweak is real) */
      .dms-row { padding: var(--row-py) var(--row-px); }
      .dms-card { padding: var(--card-p); }
      .dms-stack > * + * { margin-top: var(--list-gap); }
      th.dms-th { padding: var(--cell-py) var(--cell-px); }
      td.dms-td { padding: var(--cell-py) var(--cell-px); font-size: var(--font-table); }

      /* sticky header for data tables */
      .dms-table { border-collapse: separate; border-spacing: 0; width: 100%; }
      .dms-table thead th {
        position: sticky; top: 0; z-index: 1;
        background: rgb(var(--c-surface-2));
        border-bottom: 1px solid rgb(var(--c-border-strong));
        font-weight: 600; font-size: 11.5px; letter-spacing: 0.02em;
        color: rgb(var(--c-text-muted)); text-align: start; white-space: nowrap;
      }
      .dms-table tbody td { border-bottom: 1px solid rgb(var(--c-border)); }
      .dms-table tbody tr:last-child td { border-bottom: 0; }
      .dms-table.zebra tbody tr:nth-child(even) td { background: rgb(var(--c-surface-2) / 0.55); }
      .dms-table tbody tr.clickable { cursor: pointer; }
      .dms-table tbody tr.clickable:hover td { background: rgb(var(--c-primary) / 0.045); }

      /* confidentiality badge — color + text + icon; variants via tweak */
      .conf {
        display: inline-flex; align-items: center; gap: 5px;
        padding: var(--badge-pad-y) var(--badge-pad-x);
        border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.45;
        white-space: nowrap;
      }
      .conf .dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--conf)); flex: none; }
      /* soft (default) */
      .conf.v-soft { background: color-mix(in srgb, rgb(var(--conf)) 12%, white); color: rgb(var(--conf-ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, rgb(var(--conf)) 26%, transparent); }
      /* solid */
      .conf.v-solid { background: rgb(var(--conf)); color: #fff; box-shadow: none; }
      .conf.v-solid .dot { background: rgb(255 255 255 / 0.9); }
      /* outline + dot */
      .conf.v-outline { background: rgb(var(--c-surface)); color: rgb(var(--conf-ink)); box-shadow: inset 0 0 0 1px rgb(var(--c-border-strong)); }

      .chip {
        display: inline-flex; align-items: center; gap: 4px;
        padding: var(--badge-pad-y) var(--badge-pad-x);
        border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.45; white-space: nowrap;
      }

      .focusring:focus-visible { outline: 2px solid rgb(var(--c-primary) / 0.55); outline-offset: 2px; }

      /* skeleton loading — visible gray base (animation is enhancement only) */
      .skel { position: relative; overflow: hidden; background: rgb(var(--c-surface-2)); border-radius: 7px; }
      .skel::after {
        content: ''; position: absolute; inset: 0; transform: translateX(-100%);
        background: linear-gradient(90deg, transparent, rgb(var(--c-surface) / 0.7), transparent);
      }
      @media (prefers-reduced-motion: no-preference) {
        .skel::after { animation: skel-shimmer 1.4s infinite; }
      }
      @keyframes skel-shimmer { 100% { transform: translateX(100%); } }

      input, select, button, textarea { font-family: inherit; }

      /* thin scrollbars for the work-tool feel */
      *::-webkit-scrollbar { width: 10px; height: 10px; }
      *::-webkit-scrollbar-thumb { background: rgb(var(--c-border-strong)); border-radius: 6px; border: 2px solid rgb(var(--c-bg)); }
      *::-webkit-scrollbar-track { background: transparent; }