/* =============================================================================
   NubocAxis — application.css
   © 2025–2026 Nuboc IP LLC. All rights reserved.

   Table of Contents:
   01. Fonts
   02. Design Tokens
   03. Reset & Base
   04. Typography
   05. Layout (App Shell, Topbar, Sidebar, Main)
   06. Navigation (Sidebar Nav)
   07. Context Bar
   08. Buttons
   09. Forms & Inputs
   10. Tables
   11. Components (Badges, Cards, KPI, Modals, Dropdowns, Toasts, Tabs)
   12. Utilities
   13. Entity Switcher
   14. User Menu
   15. Search
   16. Settings Layout
   17. NubocFinance — Chart of Accounts
   18. NubocFinance — Account Edit
   19. Animations
   20. Responsive & Print
   21. GL KPI Strip + Table extras
   22. Universal Page Bar
   ============================================================================= */


/* =============================================================================
   01. Fonts
   ============================================================================= */

/* © 2026 Nuboc IP LLC. All rights reserved. */

/* Self-hosted fonts: DM Sans, DM Mono, IBM Plex Mono and Instrument Serif,
   latin and latin-ext subsets, from app/assets/fonts/ (OFL licenses beside
   each family). Loading them from Google Fonts sent every visitor's IP
   address to Google.

   Used by application.css (inlined by postcss-import) and by the marketing
   pages directly. The url()s are Propshaft logical paths: the leading slash
   resolves from app/assets/fonts whichever stylesheet includes this. */

/* DM Mono normal 300: latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/dm-mono/dm-mono-normal-300-latin-ext-060d9c0d.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Mono normal 300: latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/dm-mono/dm-mono-normal-300-latin-35560ae4.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;
}
/* DM Mono normal 400: latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dm-mono/dm-mono-normal-400-latin-ext-1620a621.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Mono normal 400: latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dm-mono/dm-mono-normal-400-latin-832c2327.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;
}
/* DM Mono normal 500: latin-ext */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/dm-mono/dm-mono-normal-500-latin-ext-8b1f19dc.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Mono normal 500: latin */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/dm-mono/dm-mono-normal-500-latin-8e4b9212.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;
}
/* DM Sans italic 400: latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dm-sans/dm-sans-italic-400-latin-ext-0b02a5d5.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Sans italic 400: latin */
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dm-sans/dm-sans-italic-400-latin-6b1caace.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;
}
/* DM Sans normal 300 600: latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/dm-sans/dm-sans-normal-300-600-latin-ext-dae2eeef.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* DM Sans normal 300 600: latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/assets/dm-sans/dm-sans-normal-300-600-latin-d4a7ff01.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;
}
/* IBM Plex Mono normal 400: latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono/ibm-plex-mono-normal-400-latin-ext-4e909fb6.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Mono normal 400: latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono/ibm-plex-mono-normal-400-latin-c6016505.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;
}
/* IBM Plex Mono normal 500: latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-mono/ibm-plex-mono-normal-500-latin-ext-e1b7a5f7.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Mono normal 500: latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-mono/ibm-plex-mono-normal-500-latin-7c1dc074.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;
}
/* IBM Plex Mono normal 600: latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/ibm-plex-mono/ibm-plex-mono-normal-600-latin-ext-d3cc04f3.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* IBM Plex Mono normal 600: latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/ibm-plex-mono/ibm-plex-mono-normal-600-latin-59f54c34.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;
}
/* Instrument Serif italic 400: latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/instrument-serif/instrument-serif-italic-400-latin-ext-132f9dc9.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Instrument Serif italic 400: latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/instrument-serif/instrument-serif-italic-400-latin-1dea96c7.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;
}
/* Instrument Serif normal 400: latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/instrument-serif/instrument-serif-normal-400-latin-ext-2eb09391.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Instrument Serif normal 400: latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/instrument-serif/instrument-serif-normal-400-latin-e7c41142.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;
}

/* NubocAxis — UI framework (tokens, shell, primitives).
   Import order is the cascade order — do not reorder. */
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   02. Design Tokens
   ============================================================================= */

:root {
  /* Ink scale */
  --nax-ink: #0c0e11;
  --nax-ink-70: rgba(12, 14, 17, .70);
  --nax-ink-45: rgba(12, 14, 17, .45);
  --nax-ink-40: rgba(12, 14, 17, .40);
  --nax-ink-35: rgba(12, 14, 17, .35);
  --nax-ink-30: rgba(12, 14, 17, .30);
  --nax-ink-20: rgba(12, 14, 17, .20);
  --nax-ink-10: rgba(12, 14, 17, .10);
  --nax-ink-08: rgba(12, 14, 17, .08);
  --nax-ink-07: rgba(12, 14, 17, .07);
  --nax-ink-06: rgba(12, 14, 17, .06);
  --nax-ink-05: rgba(12, 14, 17, .05);
  --nax-ink-04: rgba(12, 14, 17, .04);
  --nax-ink-03: rgba(12, 14, 17, .03);

  /* Text-role inks — 4.5:1 minimum for small text (WCAG 1.4.3).
     Keep ink-40/45 for icons and decorative rules (3:1 non-text minimum). */
  --nax-ink-text-2: rgba(12, 14, 17, .64);
  --nax-ink-text-3: rgba(12, 14, 17, .58);
  --nax-green-text: #0a7a48;
  --nax-amber-text: #8a5606;
  --nax-red-text: #c22317;

  /* Solid fills that carry white text — ≥4.5:1 against #fff in both themes. */
  --nax-green-solid: #0c8552;
  --nax-green-solid-hover: #0a6f45;
  --nax-amber-solid: #a56809;
  --nax-amber-solid-hover: #8a5606;

  /* Surfaces */
  --nax-canvas: #f3f2ef;
  --nax-surface: #ffffff;
  --nax-body: #1a1a1a;
  --nax-paper: #ffffff;   /* a document's page, white as printed in either theme */

  /* Accent */
  --nax-accent: #1547d4;
  --nax-accent-rgb: 21, 71, 212;
  --nax-accent-lt: #e6edfb;
  --nax-accent-dim: rgba(21, 71, 212, .09);
  --nax-accent-dark: #1240bb;
  --nax-accent-darker: #0e35a0;
  --nax-on-accent: #fff;            /* text on an accent fill */

  /* Success */
  --nax-green: #0d9f5e;
  --nax-green-rgb: 13, 159, 94;
  --nax-green-bg: #e8f8f1;
  --nax-green-light: #5ecb9a;
  --nax-green-dark: #0b8b52;

  /* Danger */
  --nax-red: #d63b30;
  --nax-red-rgb: 214, 59, 48;
  --nax-red-bg: #fdf0ef;
  --nax-red-light: #e87b72;
  --nax-red-dark: #be342a;

  /* Warning */
  --nax-amber: #c97b0a;
  --nax-amber-rgb: 201, 123, 10;
  --nax-amber-bg: #fdf5e6;
  --nax-amber-light: #e8a84d;
  --nax-amber-dark: #b36e09;

  /* Info */
  --nax-blue: #1a56f0;
  --nax-blue-rgb: 26, 86, 240;
  --nax-blue-bg: #e8effe;
  --nax-blue-dark: #1449cc;

  /* Typography */
  --nax-font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --nax-font-mono: 'IBM Plex Mono', 'DM Mono', 'Menlo', monospace;
  --nax-font-serif: 'Instrument Serif', 'Georgia', serif;

  /* Shape */
  --nax-r: 5px;
  --nax-r-sm: 3px;
  --nax-r-lg: 8px;
  --nax-r-xl: 12px;

  /* Tree connector — the guide line, elbow and arrowhead joining a child row
     to its parent: the sidebar's sub-nav, the folder tree */
  --nax-tree-line-w: 1px;
  --nax-tree-elbow-r: 2px;
  --nax-tree-arrow-w: 4px;   /* the arrowhead's length */
  --nax-tree-arrow-h: 3px;   /* half the arrowhead's height */
  --nax-tree-step-deep: 16px; /* a deep row's indent under its parent, and its disclosure column */

  /* Spacing — 4px rhythm; the one scale every margin/padding speaks */
  --nax-space-1: 4px;
  --nax-space-2: 8px;
  --nax-space-3: 12px;
  --nax-space-4: 16px;
  --nax-space-5: 20px;
  --nax-space-6: 24px;
  --nax-space-7: 32px;
  --nax-space-8: 48px;
  --nax-row: 38px;
  --nax-row-compact: 30px; /* a record page's header actions */
  --nax-control-sm: 26px; /* a small button: a toolbar's, a segmented switch's */
  --nax-control-xs: 20px; /* an icon button inside a heading's row: the folder tree's group actions */
  --nax-row-condensed: var(--nax-row); /* a list's row size: no pictures, the default */
  --nax-row-comfortable: 48px; /* room for a picture */
  --nax-row-expanded: 64px; /* a picture you can recognise */
  --nax-touch: 44px; /* the smallest a finger can hit, on phones */
  --nax-list-max-h: calc(12 * var(--nax-row)); /* a list that scrolls past a dozen rows */

  /* Shadows */
  --nax-sh: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 1px rgba(0, 0, 0, .03);
  --nax-sh-md: 0 4px 16px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .04);
  --nax-sh-lg: 0 16px 48px rgba(0, 0, 0, .13), 0 4px 12px rgba(0, 0, 0, .05);

  /* Motion */
  --nax-t: .13s ease;
  --nax-t-med: .20s cubic-bezier(.4, 0, .2, 1);

  /* Layout */
  --nax-sidebar-w: 248px;
  --nax-sidebar-collapsed: 56px;
  --nax-rail-w: 48px;
  --nax-topbar-h: 56px;
  --nax-detail-pane-w: 380px;
  --nax-record-rail-w: 300px;      /* a record page's list rail; the page may override */
  --nax-popover-w: 240px;          /* a popover's list of choices */
  --nax-popover-form-w: 280px;     /* a popover holding a form: choices, then Apply */
  --nax-popover-wide-w: 640px;     /* a popover holding a small table */
  --nax-pdf-sidebar-w: 176px;      /* the PDF viewer's page thumbnails */
  --nax-preview-window-h: 400px;   /* a document preview inside the detail drawer */
  --nax-record-aside-w: 360px;     /* a record page's details column beside its document */
  --nax-icon-tile-w: 112px;        /* an icon view's narrowest tile */
  --nax-icon-art: 64px;            /* an icon view's icon or thumbnail box */
  --nax-icon-glyph: 48px;          /* the icon drawn inside that box */
  --nax-grid-gutter-w: 4.5rem;     /* a spreadsheet grid's row-number gutter */
  --nax-workspace-offset: 220px;   /* shell and page header above a workspace */
  --nax-workspace-offset-crumbs: 168px; /* shell and crumb bar alone, for a page with no header */
  --nax-workspace-min-h: 520px;

  /* ── Chrome (signature shell — "Holdings House") ──────────────────────── */
  /* Cool ink-blue slate, warmer than #1a1a1a, deeper than midnight */
  --nax-chrome:        #0e1219;        /* topbar, sidebar, rail */
  --nax-chrome-2:      #161b24;        /* raised pill, hover surface */
  --nax-chrome-3:      #1f2530;        /* pressed/active surface */
  --nax-chrome-bg:     #060810;        /* body behind the rounded panel */
  --nax-chrome-line:   rgba(214, 198, 168, .07);   /* hairline (warm) */
  --nax-chrome-line-2: rgba(214, 198, 168, .14);   /* stronger rule */
  --nax-chrome-text:   #f1ead9;                    /* warm parchment */
  --nax-chrome-mute:   rgba(241, 234, 217, .55);
  --nax-chrome-faint:  rgba(241, 234, 217, .32);
  --nax-chrome-ghost:  rgba(241, 234, 217, .18);

  /* Signal accent — cool cobalt, on-brand with the Nuboc mark. */
  --nax-signal:         #8aaaf0;
  --nax-signal-bright:  #b8ccff;
  --nax-signal-deep:    #4a6bc4;
  --nax-signal-dim:     rgba(138, 170, 240, .12);
  --nax-signal-line:    rgba(138, 170, 240, .38);

  /* Live signal — for presence/status only */
  --nax-live:          #6dc1cb;
  --nax-live-dim:      rgba(109, 193, 203, .22);

  /* Z-index scale */
  --nax-z-sidebar: 100;
  --nax-z-topbar: 200;
  --nax-z-overlay: 300;
  --nax-z-modal: 400;
  --nax-z-toast: 500;
  --nax-z-cmd: 600;
}

/* Attention — something waiting on someone: a count of files to review.
   Warning's hues under their own name, so a quick-access count can change
   tone without touching warnings. Set again under every theme, so each
   resolves to its own theme's amber. */
:root,
[data-theme] {
  --nax-attention-bg: var(--nax-amber-bg);
  --nax-attention-text: var(--nax-amber-text);
  --nax-attention-solid: var(--nax-amber-solid);
}

[data-theme="dark"] {
  --nax-ink: #f3f2ef;
  --nax-ink-70: rgba(243, 242, 239, .70);
  --nax-ink-45: rgba(243, 242, 239, .45);
  --nax-ink-40: rgba(243, 242, 239, .40);
  --nax-ink-35: rgba(243, 242, 239, .35);
  --nax-ink-30: rgba(243, 242, 239, .30);
  --nax-ink-20: rgba(243, 242, 239, .20);
  --nax-ink-10: rgba(243, 242, 239, .10);
  --nax-ink-08: rgba(243, 242, 239, .08);
  --nax-ink-07: rgba(243, 242, 239, .07);
  --nax-ink-06: rgba(243, 242, 239, .06);
  --nax-ink-05: rgba(243, 242, 239, .05);
  --nax-ink-04: rgba(243, 242, 239, .04);
  --nax-ink-03: rgba(243, 242, 239, .03);
  --nax-ink-text-2: rgba(243, 242, 239, .72);
  --nax-ink-text-3: rgba(243, 242, 239, .64);
  --nax-green-text: #5ecb9a;
  --nax-amber-text: #e8a84d;
  --nax-red-text: #e87b72;
  --nax-canvas: #0e1018;
  --nax-surface: #161921;
  --nax-accent: #8aaaf0;
  --nax-accent-lt: rgba(138, 170, 240, .12);
  --nax-accent-dim: rgba(138, 170, 240, .15);
  --nax-accent-dark: #adc4f7;
  --nax-green: #5ecb9a;
  --nax-green-bg: rgba(94, 203, 154, .10);
  --nax-red: #e87b72;
  --nax-red-bg: rgba(232, 123, 114, .10);
  --nax-red-lt: #fdf0ef;
  --nax-amber: #e8a84d;
  --nax-amber-bg: rgba(232, 168, 77, .10);
  --nax-blue: #6b95f5;
  --nax-blue-bg: rgba(107, 149, 245, .10);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   03. Reset & Base
   ============================================================================= */

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

html {
  font-size: 13px;
}

/* Text size (Settings › Personalization) — scales every rem-based size
   through the root, leaving the shell's px geometry and scroll math alone.
   13px × 1.14 and × 1.28. */
html[data-text-scale="1.14"] {
  font-size: 14.8px;
}

html[data-text-scale="1.28"] {
  font-size: 16.6px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--nax-font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--nax-ink);
  background-color: var(--nax-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

/* Definition lists carry no default margin; components own their spacing. */
dl,
dd {
  margin: 0;
}

::selection {
  background: rgba(var(--nax-accent-rgb), .15);
  color: var(--nax-ink);
}

a {
  color: var(--nax-accent);
  text-decoration: none;
  transition: color var(--nax-t);
}

a:hover {
  color: var(--nax-accent-dark);
  text-decoration: underline;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--nax-ink-20);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--nax-ink-45);
}

/* The HTML `hidden` attribute must win over component display rules
   (.nax-btn is inline-flex, which otherwise overrides the UA
   [hidden]{display:none}). Toggling `hidden` is the app's standard way to
   show/hide grid actions, disclosures, etc. */
[hidden] {
  display: none !important;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   04. Typography
   ============================================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--nax-font-sans);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--nax-ink);
  margin: 0 0 0.5em;
}

h1 {
  font-size: 1.692rem;
}

h2 {
  font-size: 1.384rem;
}

h3 {
  font-size: 1.153rem;
}

h4 {
  font-size: 1rem;
}

h5 {
  font-size: 0.923rem;
}

h6 {
  font-size: 0.846rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

small,
.nax-small {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
}

code,
kbd,
pre,
samp {
  font-family: var(--nax-font-mono);
  font-size: 0.884rem;
}

code {
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  padding: 1px 5px;
  color: var(--nax-red-text);
}

pre {
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 0.846rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--nax-ink);
}

kbd {
  font-size: 0.73rem;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-10);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  padding: 1px 5px;
}

/* ERP page title — serif italic */
.nax-pg-title {
  font-family: var(--nax-font-serif);
  font-size: 1.538rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--nax-ink);
  line-height: 1;
  margin: 0;
}

.nax-pg-title em {
  font-style: italic;
  color: var(--nax-accent);
}

/* Mono display — amounts, IDs, codes */
.nax-mono {
  font-family: var(--nax-font-mono);
  font-size: 0.846rem;
  color: var(--nax-ink-70);
  letter-spacing: 0;
}

/* Small muted mono — table timestamps, ids, codes read as secondary data */
.nax-mono-caption {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

/* Section label */
.nax-section-label {
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
  display: block;
  margin-bottom: 5px;
}

/* Text utilities */
.nax-text-muted {
  color: var(--nax-ink-text-2) !important;
}

.nax-text-subtle {
  color: var(--nax-ink-text-2) !important;
}

.nax-text-accent {
  color: var(--nax-accent) !important;
}

.nax-text-success {
  color: var(--nax-green-text) !important;
}

.nax-text-danger {
  color: var(--nax-red-text) !important;
}

.nax-text-warning {
  color: var(--nax-amber-text) !important;
}

.nax-text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-text--right {
  text-align: right;
}

.nax-text--muted {
  color: var(--nax-ink-text-2);
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Layout — App Shell, Topbar, Main, Page Header, Breadcrumbs, Detail Pane, Flash
   ============================================================================= */

/* App shell — Holdings House */

.nax-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--nax-chrome);
}

.nax-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding-top: var(--nax-topbar-h);
    background: var(--nax-chrome);
}

/* =============================================================================
   Topbar — "Holdings House" chrome
   ============================================================================= */

.nax-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nax-topbar-h);
    background: var(--nax-chrome);
    border-bottom: none;
    display: flex;
    align-items: center;
    padding: 0 14px 0 0;
    z-index: var(--nax-z-topbar);
    gap: 0;
    color: var(--nax-chrome-text);
    font-family: var(--nax-font-sans);
}

/* Top-edge hairline — quiet inner highlight, no shimmer */
.nax-topbar-edge {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, .12) 50%,
        transparent 100%);
    pointer-events: none;
}

/* ── Sigil — logo only ─────────────────────────────────────────────────── */
.nax-sigil {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px 0 18px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background var(--nax-t);
}
.nax-sigil:hover { text-decoration: none; background: rgba(255, 255, 255, .015); }
.nax-sigil::after {
    content: "";
    position: absolute;
    top: 14px; bottom: 14px;
    right: 0;
    width: 1px;
    background: var(--nax-chrome-line);
}

.nax-sigil-wordmark {
    height: 24px;
    width: auto;
    display: block;
    flex-shrink: 0;
    /* Logo ships in navy — whiten for the dark chrome */
    filter: brightness(0) invert(1);
    transition: transform var(--nax-t-med), opacity var(--nax-t);
    opacity: .92;
}
.nax-sigil:hover .nax-sigil-wordmark {
    transform: translateY(-.5px);
    opacity: 1;
}

/* Sigil-adjacent sidebar toggle — kept tiny, signal on hover */

/* ── Entity switcher (topbar variant) ───────────────────────────────────── */
.nax-topbar .nax-entity-switcher {
    padding: 0;
    margin-left: 10px;
    margin-right: 4px;
    border: 0;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}
.nax-topbar .nax-entity-switcher-trigger {
    height: 36px;
    padding: 0 10px;
    min-width: 180px;
    max-width: 260px;
    background: #2b2d33;
    border: 1px solid transparent;
    border-radius: 8px;
    gap: 10px;
    transition: background var(--nax-t), border-color var(--nax-t);
}
.nax-topbar .nax-entity-switcher-trigger:hover {
    background: #34363c;
}
.nax-topbar .nax-entity-switcher-trigger[aria-expanded="true"] {
    background: #34363c;
    border-color: var(--nax-signal);
}
.nax-topbar .nax-entity-switcher-hint {
    font-family: var(--nax-font-mono);
    font-size: .595rem;
    font-weight: 500;
    color: var(--nax-chrome-mute);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.nax-topbar .nax-entity-switcher-name {
    color: var(--nax-chrome-text);
    font-family: var(--nax-font-sans);
    font-size: .875rem;
    font-weight: 600;
    letter-spacing: -.005em;
    line-height: 1.1;
}
.nax-topbar .nax-entity-switcher-caret {
    color: var(--nax-chrome-mute);
    opacity: 1;
}

/* ── Dropdown panel — readable dark menu ────────────────────────────────── */
.nax-topbar .nax-entity-switcher-dropdown {
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    min-width: 260px;
    padding: 6px;
    background: var(--nax-chrome-2);
    border: 1px solid var(--nax-chrome-line-2);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.nax-topbar .nax-entity-switcher-dropdown-label {
    padding: 8px 10px 6px;
    font-family: var(--nax-font-mono);
    font-size: .595rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--nax-chrome-mute);
}
.nax-topbar .nax-entity-switcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--nax-chrome-text);
    font-family: var(--nax-font-sans);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--nax-t);
}
.nax-topbar .nax-entity-switcher-item:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--nax-chrome-text);
    text-decoration: none;
}
.nax-topbar .nax-entity-switcher-item.is-active {
    background: rgba(138, 170, 240, .12);
    color: var(--nax-chrome-text);
    font-weight: 600;
}
.nax-topbar .nax-entity-switcher-item-check {
    color: var(--nax-signal);
    margin-left: auto;
}

/* ── Command spine (search) ─────────────────────────────────────────────── */
.nax-topbar .nax-search {
    flex: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}
.nax-topbar .nax-search-trigger {
    width: 100%;
    height: 32px;
    padding: 0 8px 0 12px;
    background: #2b2d33;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--nax-chrome-mute);
    font-size: .815rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: text;
    transition: background var(--nax-t), border-color var(--nax-t);
    position: relative;
}
.nax-topbar .nax-search-trigger:hover {
    background: #34363c;
}
.nax-topbar .nax-search-trigger:focus-visible,
.nax-topbar .nax-search-trigger:active {
    outline: none;
    background: #34363c;
    border-color: var(--nax-signal);
}

.nax-search-prompt {
    font-family: var(--nax-font-mono);
    color: var(--nax-signal);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    flex-shrink: 0;
}
.nax-topbar .nax-search-placeholder {
    color: var(--nax-chrome-mute);
    font-family: var(--nax-font-sans);
    font-size: .815rem;
    font-weight: 400;
    letter-spacing: -.005em;
    flex: 1;
    text-align: left;
}
.nax-topbar .nax-search-kbd {
    font-family: var(--nax-font-mono);
    font-size: .615rem;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--nax-chrome-line-2);
    color: var(--nax-chrome-mute);
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.3);
}

/* ── Actions cluster ────────────────────────────────────────────────────── */
.nax-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    height: 100%;
    padding-left: 8px;
    position: relative;
}
.nax-actions::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    width: 1px;
    background: var(--nax-chrome-line);
}

.nax-act-wrap { position: relative; display: flex; align-items: center; }

.nax-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--nax-r);
    border: none;
    background: transparent;
    color: var(--nax-chrome-mute);
    cursor: pointer;
    transition: background var(--nax-t), color var(--nax-t);
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
}

.nax-act:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--nax-chrome-text);
}

.nax-act:focus-visible {
    outline: 2px solid var(--nax-signal-line);
    outline-offset: 1px;
}

/* Icon slot — fixed 16×16 box keeps every toolbar glyph optically centered */
.nax-act-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    line-height: 0;
    pointer-events: none;
}

.nax-act-icon .nax-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Bell body sits high in the 24×24 viewBox — nudge down to match moon */
.nax-act--notify .nax-act-icon {
    transform: translateY(1px);
}

.nax-act-pip {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--nax-signal);
    box-shadow: 0 0 0 2px var(--nax-chrome);
    pointer-events: none;
}

/* Theme toggle — show moon in dark mode, sun in light mode */
.nax-act--theme .nax-theme-light-icon {
    display: none;
}

[data-theme="light"] .nax-act--theme .nax-theme-dark-icon {
    display: none;
}

[data-theme="light"] .nax-act--theme .nax-theme-light-icon {
    display: block;
}

/* Admin pill — engraved, signal-keyed */
.nax-admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px 0 10px;
    margin: 0 4px;
    border-radius: var(--nax-r);
    font-family: var(--nax-font-sans);
    font-size: .77rem;
    font-weight: 500;
    letter-spacing: .005em;
    color: var(--nax-chrome-text);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    border: 1px solid var(--nax-chrome-line-2);
    text-decoration: none;
    transition: all var(--nax-t);
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.nax-admin-pill:hover {
    border-color: var(--nax-signal-line);
    color: var(--nax-signal-bright);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(138,170,240,.10), rgba(138,170,240,.02));
}
.nax-admin-key {
    width: 14px;
    height: 14px;
    background:
        radial-gradient(circle at 50% 35%, var(--nax-signal-bright) 0%, var(--nax-signal) 55%, var(--nax-signal-deep) 100%);
    clip-path: polygon(50% 0, 100% 38%, 88% 100%, 12% 100%, 0 38%);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.nax-admin-pill:hover .nax-admin-key {
    filter: brightness(1.12);
}

/* User menu — signal ring + presence dot */
.nax-topbar .nax-user-menu {
    margin-left: 4px;
}
.nax-topbar .nax-user-menu-trigger {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.nax-user-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid var(--nax-signal-line);
    background:
        conic-gradient(from 90deg, var(--nax-signal) 0%, transparent 30%, transparent 70%, var(--nax-signal) 100%);
    opacity: .55;
    transition: opacity var(--nax-t-med);
    pointer-events: none;
}
.nax-topbar .nax-user-menu-trigger:hover .nax-user-ring,
.nax-topbar .nax-user-menu-trigger.is-active .nax-user-ring { opacity: 1; }

.nax-topbar .nax-user-menu-trigger .nax-avatar {
    width: 28px;
    height: 28px;
    border: 1px solid #1a1f2a;
}
.nax-user-presence {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: var(--nax-live);
    border-radius: 50%;
    box-shadow:
        0 0 0 2px var(--nax-chrome),
        0 0 6px var(--nax-live);
}

/* Legacy passthroughs (markup kept for compat with any inline references) */
.nax-topbar-spacer { flex: 1; }

/* Main content — the inset "ledger" panel */
.nax-main {
    flex: 1;
    margin-left: var(--nax-sidebar-w);
    margin-right: var(--nax-rail-w);
    overflow-y: auto;
    overflow-x: hidden;
    /* No rubber-band bounce on the panel itself — inner scrollers (roles
       panes, settings rail) contain their own gestures, and the panel
       bouncing behind them reads as jank. */
    overscroll-behavior-y: none;
    min-width: 0;
    transition: margin-left var(--nax-t-med);
    display: flex;
    flex-direction: column;
    background: var(--nax-canvas);
    border-radius: 12px;
    position: relative;
    margin-bottom: 8px
}

/* Page header */
.nax-page-header {
    display: flex;
    align-items: center;
    padding: 14px 20px 0;
    gap: 10px;
    flex-shrink: 0;
}

/* A header rendered by PageHeaderComponent sits in its own surface band —
   continuous with the context bar above it, matching the settings hub.
   Pages that render their title inline in the content area (e.g. finance)
   never populate .nax-page-header, so they are unaffected. */
.nax-page-header:has(.nax-settings-header) {
    background: var(--nax-surface);
    border-bottom: 1px solid var(--nax-ink-08);
    padding-bottom: 12px;
}

.nax-page-header-title {
    flex: 1;
    min-width: 0;
}

/* Page titles rendered in the header band share one voice regardless of
   which component produced them. */
.nax-page-header .nax-settings-title {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nax-page-header .nax-settings-header {
  margin-bottom: 0;
  width: 100%;
}

.nax-page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nax-page-content {
    padding: 16px 20px 24px;
    flex: 1;
}

/* Breadcrumbs */
.nax-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 20px 0;
    font-size: 0.769rem;
    color: var(--nax-ink-text-2);
    flex-shrink: 0;
}

.nax-breadcrumbs a {
    color: var(--nax-ink-text-2);
    text-decoration: none;
    transition: color var(--nax-t);
}

.nax-breadcrumbs a:hover {
    color: var(--nax-ink);
    text-decoration: none;
}

.nax-breadcrumbs-sep {
    color: var(--nax-ink-text-2);
    font-size: 0.692rem;
}

.nax-breadcrumbs-current {
    color: var(--nax-ink-70);
}

/* Detail pane */
.nax-detail-pane {
    position: fixed;
    top: var(--nax-topbar-h);
    right: 0;
    bottom: 0;
    width: var(--nax-detail-pane-w);
    background: var(--nax-surface);
    border-left: 1px solid var(--nax-ink-10);
    box-shadow: var(--nax-sh-md);
    z-index: var(--nax-z-overlay);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--nax-t-med);
}

.nax-detail-pane.is-open {
    transform: translateX(0);
}

.nax-detail-pane-header {
    display: flex;
    align-items: center;
    padding: 0 14px;
    height: var(--nax-topbar-h);
    border-bottom: 1px solid var(--nax-ink-10);
    flex-shrink: 0;
}

.nax-detail-pane-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
}

/* Flash messages — floating toast stack, top-right under the topbar */
.nax-flash {
    position: fixed;
    top: calc(var(--nax-topbar-h) + 12px);
    right: calc(var(--nax-rail-w) + 16px);
    z-index: var(--nax-z-toast, 600);
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(400px, calc(100vw - 32px));
}

.nax-flash .nax-flash-item {
    box-shadow: var(--nax-sh-lg);
    border-radius: var(--nax-r);
    animation: nax-toast-in .18s ease;
}

@keyframes nax-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* Items remove themselves on dismiss; collapse the container's margin
   once the last one is gone. */
.nax-flash:empty {
    display: none;
}

.nax-flash-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--nax-r);
    font-size: 0.846rem;
    border: 1px solid transparent;
}

.nax-flash-item.notice,
.nax-flash-item.success {
    background: var(--nax-green-bg);
    border-color: rgba(var(--nax-green-rgb), .25);
    color: var(--nax-green-text);
}

.nax-flash-item.alert,
.nax-flash-item.error {
    background: var(--nax-red-bg);
    border-color: rgba(var(--nax-red-rgb), .25);
    color: var(--nax-red-dark);
}

.nax-flash-item.warning {
    background: var(--nax-amber-bg);
    border-color: rgba(var(--nax-amber-rgb), .25);
    color: var(--nax-amber-text);
}

.nax-flash-item.info {
    background: var(--nax-blue-bg);
    border-color: rgba(var(--nax-blue-rgb), .25);
    color: var(--nax-blue-dark);
}

.nax-flash-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    padding: 0;
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: .5;
    cursor: pointer;
    line-height: 1;
}

.nax-flash-dismiss:hover {
    opacity: 1;
}

/* App nav */
.nax-app-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 8px;
    height: 100%;
}

.nax-app-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--nax-ink-text-2);
    border-radius: var(--nax-r-sm);
    border: none;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--nax-t), color var(--nax-t);
}

.nax-app-btn:hover {
    background: var(--nax-ink-05);
    color: var(--nax-ink);
    text-decoration: none;
}

.nax-app-btn.is-active {
    color: var(--nax-accent);
    background: var(--nax-accent-lt);
}

/* ── Skip link (WCAG 2.4.1) ─────────────────────────────────────────────── */

.nax-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
}

.nax-skip-link:focus {
    left: 8px;
    top: 8px;
    background: var(--nax-ink);
    color: var(--nax-canvas);
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 0.846rem;
    text-decoration: none;
    outline: 2px solid var(--nax-accent);
    outline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   Access denied (403) — rendered in place by Fortress when a page's policy
   key isn't granted. A calm dead-end: say what happened, show the key,
   offer somewhere to go.
   -------------------------------------------------------------------------- */
.nax-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 55vh;
  padding: 48px 24px;
}

.nax-denied__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--nax-canvas);
  border: 1px solid var(--nax-ink-10);
  color: var(--nax-ink-text-2);
  margin-bottom: 18px;
}

.nax-denied__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--nax-ink);
  margin: 0 0 8px;
}

.nax-denied__desc {
  max-width: 46ch;
  font-size: 0.846rem;
  line-height: 1.55;
  color: var(--nax-ink-text-2);
  margin: 0 0 14px;
}

.nax-denied__key {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  background: var(--nax-canvas);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  padding: 3px 8px;
  margin-bottom: 22px;
}

.nax-denied__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Lockdown variant of the denied page — the badge goes red. */
.nax-denied--lockdown .nax-denied__badge {
  background: var(--nax-red-bg);
  border-color: var(--nax-red-light);
  color: var(--nax-red-dark);
}

/* Banner shown to exempt users while a lockdown is engaged. */
.nax-lockdown-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.808rem;
  background: var(--nax-red-bg);
  border-bottom: 1px solid var(--nax-red-light);
  color: var(--nax-red-dark);
}

.nax-lockdown-banner__link {
  margin-left: auto;
  font-weight: 600;
  color: var(--nax-red-dark);
  text-decoration: underline;
}

/* The lockdown card on org settings turns red while engaged. */
.nax-lockdown-card--active {
  border-color: var(--nax-red-light);
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Sidebar — left rail
   Collapsed: 56px icon rail + GitLab flyout on hover. Expanded: accordion + children.
   No hover-widen — width only changes with the footer pin toggle.
   ============================================================================= */

/* ── Shell ──────────────────────────────────────────────────────────────── */
.nax-sidebar {
    position: fixed;
    top: var(--nax-topbar-h);
    left: 0;
    bottom: 0;
    width: var(--nax-sidebar-w);
    background: var(--nax-chrome);
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: var(--nax-z-sidebar);
    overflow: hidden;
    transition: width var(--nax-t-med);
    color: var(--nax-chrome-text);
    font-family: var(--nax-font-sans);
}

.nax-sidebar.is-collapsed {
    width: var(--nax-sidebar-collapsed);
    /* Flyouts escape the rail — do not clip */
    overflow: visible;
}

.nax-sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--nax-chrome-line-2) transparent;
}
.nax-sidebar.is-collapsed .nax-sidebar-body {
    overflow: visible;
}
.nax-sidebar-body::-webkit-scrollbar { width: 4px; }
.nax-sidebar-body::-webkit-scrollbar-thumb { background: var(--nax-chrome-line-2); }

.nax-sidebar-footer {
    padding: 8px 10px 14px;
    flex-shrink: 0;
    border-top: 1px solid var(--nax-chrome-line);
    position: relative;
}
.nax-sidebar-footer::before {
    /* tiny signal tick on the inner edge of the footer */
    content: "";
    position: absolute;
    top: -1px; left: 16px; width: 24px; height: 1px;
    background: var(--nax-signal-line);
}

/* Sidebar ↔ Main margin */
.nax-sidebar.is-collapsed~.nax-main,
.nax-main.sidebar-collapsed {
    margin-left: var(--nax-sidebar-collapsed);
}


/* =============================================================================
   Section labels — serif italic, all-caps mono micro-mark
   ============================================================================= */
.nax-nav-section {
    font-family: var(--nax-font-mono);
    font-size: 0.595rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--nax-chrome-mute);
    padding: 18px 14px 8px;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nax-nav-section::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--nax-chrome-line);
}


/* =============================================================================
   Nav items — expanded state (248px)
   ============================================================================= */
.nax-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px 0 16px;
    height: 38px;
    border-radius: var(--nax-r);
    color: var(--nax-chrome-text);
    text-decoration: none;
    font-size: 0.815rem;
    font-weight: 500;
    letter-spacing: .002em;
    white-space: nowrap;
    overflow: hidden;
    transition: color var(--nax-t), background var(--nax-t);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    margin-bottom: 1px;
}
.nax-nav-item::before {
    /* Active signal marker — slides in from the left edge */
    content: "";
    position: absolute;
    left: 0;
    top: 6px; bottom: 6px;
    width: 3px;
    background: var(--nax-signal);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform var(--nax-t-med);
}
.nax-nav-item:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .025);
    text-decoration: none;
}
.nax-nav-item.is-active {
    color: var(--nax-chrome-text);
    background: rgba(138, 170, 240, .16);
    font-weight: 600;
}
.nax-nav-item.is-active::before {
    transform: scaleY(1);
}
.nax-nav-item.is-active .nax-nav-icon {
    color: var(--nax-signal);
}

/* Accordion parent row: home link + chevron toggle */
.nax-nav-app {
    position: relative;
    margin-bottom: 1px;
}

.nax-nav-app__row {
    gap: 8px;
    padding-right: 8px;
}

.nax-nav-app__home {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.nax-nav-app__home:hover { text-decoration: none; color: inherit; }

.nax-nav-chevron-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--nax-r-sm, 4px);
    background: transparent;
    color: var(--nax-chrome-ghost);
    cursor: pointer;
}
.nax-nav-chevron-btn:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .04);
}

/* Nav icon */
.nax-nav-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--nax-chrome-text);
    transition: color var(--nax-t);
}
.nax-nav-item:hover .nax-nav-icon { color: var(--nax-chrome-text); }

/* Nav label */
.nax-nav-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--nax-t-med);
}

/* Nav badge — tabular numerals, hairline border */
.nax-nav-badge {
    flex-shrink: 0;
    font-family: var(--nax-font-mono);
    font-size: 0.595rem;
    font-weight: 500;
    letter-spacing: .04em;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--nax-chrome-line-2);
    color: var(--nax-chrome-mute);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--nax-t-med);
    font-variant-numeric: tabular-nums;
}

/* Chevron */
.nax-nav-chevron {
    flex-shrink: 0;
    color: var(--nax-chrome-ghost);
    transition: transform var(--nax-t), opacity var(--nax-t-med);
}
.nax-nav-item.is-expanded .nax-nav-chevron { transform: rotate(90deg); }

/* Divider */
.nax-nav-divider {
    height: 1px;
    background: var(--nax-chrome-line);
    margin: 6px 14px;
}


/* =============================================================================
   Sub-navigation — Shopify-style stem + L into active child
   Stem under parent icon center; stops at active row (no line below).
   ============================================================================= */
.nax-nav-sub {
    position: relative;
    padding: 2px 0 4px 0;
    margin: 0 0 6px 0;
    display: none;
    border-left: none;
}
.nax-nav-sub.is-open { display: block; }

.nax-nav-sub .nax-nav-item {
    position: relative;
    font-size: 0.745rem;
    font-weight: 400;
    height: 28px;
    gap: 0;
    /* Align label under parent label (16 pad + 18 icon + 12 gap ≈ 46) */
    padding: 0 10px 0 46px;
    color: var(--nax-chrome-text);
    margin-bottom: 0;
    overflow: visible;
}

/* Kill the cobalt active-bar marker on children — tree line lives on .nax-nav-child */
.nax-nav-sub .nax-nav-item::before,
.nax-nav-sub .nax-nav-item::after {
    content: none;
    display: none;
    transform: none;
    background: transparent;
    border: 0;
    width: auto;
    height: auto;
    top: auto;
    bottom: auto;
    left: auto;
    border-radius: 0;
}

/* Tree stem/elbow on .nax-nav-child wrappers (pin button sits beside the link) */
.nax-nav-sub > .nax-nav-child {
    position: relative;
}

/* Vertical stem on siblings above the active child */
.nax-nav-sub > .nax-nav-child:has(~ .nax-nav-child > .nax-nav-item.is-active)::before {
    content: "";
    display: block;
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: var(--nax-tree-line-w) solid var(--nax-chrome-line-2);
    background: transparent;
    transform: none;
    z-index: 0;
    pointer-events: none;
}

/* L-elbow into the active child (stem stops here) */
.nax-nav-sub > .nax-nav-child:has(> .nax-nav-item.is-active)::before {
    content: "";
    display: block;
    position: absolute;
    left: 24px;
    top: 0;
    width: 14px;
    height: 50%;
    border-left: var(--nax-tree-line-w) solid var(--nax-chrome-line-2);
    border-bottom: var(--nax-tree-line-w) solid var(--nax-chrome-line-2);
    border-bottom-left-radius: var(--nax-tree-elbow-r);
    background: transparent;
    transform: none;
    box-sizing: border-box;
    z-index: 0;
    pointer-events: none;
}

/* Small arrow tip at the elbow */
.nax-nav-sub > .nax-nav-child:has(> .nax-nav-item.is-active)::after {
    content: "";
    position: absolute;
    left: 36px;
    top: calc(50% - var(--nax-tree-arrow-h));
    width: 0;
    height: 0;
    border-top: var(--nax-tree-arrow-h) solid transparent;
    border-bottom: var(--nax-tree-arrow-h) solid transparent;
    border-left: var(--nax-tree-arrow-w) solid var(--nax-chrome-line-2);
    z-index: 0;
    pointer-events: none;
}

.nax-nav-sub .nax-nav-item:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .025);
}
.nax-nav-sub .nax-nav-item.is-active {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .04);
    font-weight: 500;
}


/* =============================================================================
   Collapsed state (56px) — icon rail
   ============================================================================= */
.nax-sidebar.is-collapsed .nax-nav-section {
    opacity: 0;
    height: 0;
    padding: 0;
    pointer-events: none;
}

.nax-sidebar.is-collapsed .nax-nav-item.nax-nav-app__row {
    flex-direction: row;
    justify-content: center;
    gap: 0;
    height: 42px;
    padding: 0;
    width: 40px;
    margin: 2px auto;
    text-align: center;
    border-radius: 6px;
    background: transparent;
    overflow: visible;
}
.nax-sidebar.is-collapsed .nax-nav-app__row::before {
    left: -8px;
    border-radius: 0 2px 2px 0;
}
.nax-sidebar.is-collapsed .nax-nav-app__row.is-active {
    background: rgba(138, 170, 240, .07);
}

.nax-sidebar.is-collapsed .nax-nav-app__home {
    justify-content: center;
    gap: 0;
    flex: none;
    width: 100%;
    height: 100%;
}

/* Collapsed: hide in-rail labels — flyout header is the label (no native title either) */
.nax-sidebar.is-collapsed .nax-nav-app__home .nax-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}
.nax-sidebar.is-collapsed .nax-nav-app__row.is-flyout-open {
    background: rgba(138, 170, 240, .10);
}

.nax-sidebar.is-collapsed .nax-nav-badge,
.nax-sidebar.is-collapsed .nax-nav-chevron-btn,
.nax-sidebar.is-collapsed .nax-nav-chevron,
.nax-sidebar.is-collapsed .nax-nav-divider,
.nax-sidebar.is-collapsed .nax-nav-sub { display: none !important; }





/* =============================================================================
   Pinned favorites — above app accordion; collapsed = pin icon + flyout
   ============================================================================= */
.nax-nav-pinned {
    margin-bottom: 4px;
}
/* Hairline between Pinned and app nav (expanded only — rail stays clean) */
.nax-sidebar:not(.is-collapsed) .nax-nav-pinned:not([hidden]):not(.is-empty) {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--nax-chrome-line);
}
.nax-nav-pinned[hidden],
.nax-nav-pinned.is-empty {
    display: none !important;
}

.nax-nav-pinned__heading {
    /* reuse .nax-nav-section look; tighten for pin block */
    margin-top: 0;
}

.nax-nav-pinned__list {
    display: block;
    padding: 0 0 6px;
    margin: 0;
    border-left: none;
}
.nax-nav-pinned__list .nax-nav-pinned__row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
}
.nax-nav-pinned__link {
    flex: 1;
    min-width: 0;
    height: 30px;
    padding: 0 8px 0 16px !important;
    gap: 8px;
    font-size: 0.745rem;
    font-weight: 400;
    color: var(--nax-chrome-text);
}
.nax-nav-pinned__link .nax-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nax-nav-pinned__link:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .025);
}
.nax-nav-pinned__link.is-active {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .04);
    font-weight: 500;
}
.nax-nav-pinned__glyph {
    flex-shrink: 0;
    color: var(--nax-chrome-text);
}
.nax-nav-pinned__link.is-active .nax-nav-pinned__glyph {
    color: var(--nax-signal);
}

/* Shared pin control — accordion children, pinned list, flyout */
.nax-nav-child {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
}
.nax-nav-child .nax-nav-item {
    flex: 1;
    min-width: 0;
}
.nax-nav-pin-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 6px;
    border: none;
    border-radius: var(--nax-r-sm);
    background: transparent;
    color: var(--nax-chrome-mute);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--nax-t), color var(--nax-t), background var(--nax-t);
}
.nax-nav-child:hover .nax-nav-pin-btn,
.nax-nav-child:focus-within .nax-nav-pin-btn,
.nax-nav-pinned__row:hover .nax-nav-pin-btn,
.nax-nav-pinned__row:focus-within .nax-nav-pin-btn,
.nax-nav-flyout__row:hover .nax-nav-pin-btn,
.nax-nav-flyout__row:focus-within .nax-nav-pin-btn,
.nax-nav-pin-btn.is-pinned,
.nax-nav-pin-btn:focus-visible {
    opacity: 1;
}
.nax-nav-pin-btn:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .06);
}
.nax-nav-pin-btn.is-pinned {
    color: var(--nax-signal);
}
.nax-nav-pin-btn.is-pinned:hover {
    color: var(--nax-signal);
    background: rgba(138, 170, 240, .10);
}

.nax-nav-flyout__row {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nax-nav-flyout__row .nax-nav-flyout__item {
    flex: 1;
    min-width: 0;
}

/* Expanded: hide rail trigger; show heading + list */
.nax-sidebar:not(.is-collapsed) .nax-nav-pinned__trigger {
    display: none !important;
}
.nax-sidebar:not(.is-collapsed) .nax-nav-pinned__list {
    display: block !important;
}

/* Collapsed: pin icon in rail; list feeds flyout only */
.nax-sidebar.is-collapsed .nax-nav-pinned__heading {
    display: none !important;
}
.nax-sidebar.is-collapsed .nax-nav-pinned__list {
    display: none !important;
}
.nax-sidebar.is-collapsed .nax-nav-pinned__trigger {
    display: flex;
}

/* =============================================================================
   Collapsed flyout — GitLab-style panel to the right of the icon rail
   ============================================================================= */
.nax-nav-flyout {
    position: fixed;
    z-index: calc(var(--nax-z-sidebar) + 10);
    min-width: 200px;
    max-width: 280px;
    padding: 6px;
    background: var(--nax-chrome);
    border: 1px solid var(--nax-chrome-line);
    border-radius: var(--nax-r);
    box-shadow: var(--nax-sh-md);
    color: var(--nax-chrome-text);
}
.nax-nav-flyout[hidden] { display: none !important; }

.nax-nav-flyout__header {
    padding: 8px 10px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nax-chrome-mute);
    border-bottom: 1px solid var(--nax-chrome-line);
    margin-bottom: 4px;
}

.nax-nav-flyout__body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0;
}

.nax-nav-flyout__item {
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: var(--nax-r-sm);
    color: var(--nax-chrome-text);
    font-size: 0.8rem;
    font-weight: 450;
    text-decoration: none;
    white-space: nowrap;
}
.nax-nav-flyout__item:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .04);
    text-decoration: none;
}
.nax-nav-flyout__item.is-active {
    color: var(--nax-chrome-text);
    background: rgba(138, 170, 240, .10);
    font-weight: 500;
}

/* Expanded sidebar never shows the flyout */
.nax-sidebar:not(.is-collapsed) .nax-nav-flyout {
    display: none !important;
}

/* =============================================================================
   Sidebar toggle (footer) — GitLab-style labeled pin
   Expanded: [←] Collapse sidebar   |   Collapsed: [→] icon-only + tooltip
   ============================================================================= */
.nax-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    height: 38px;
    padding: 0 16px;
    border: none;
    background: transparent;
    color: var(--nax-chrome-mute);
    border-radius: var(--nax-r);
    cursor: pointer;
    transition: color var(--nax-t), background var(--nax-t);
    font-family: inherit;
    font-size: 0.815rem;
    font-weight: 500;
    letter-spacing: .002em;
    text-transform: none;
    text-align: left;
}
.nax-sidebar-toggle:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .04);
}
.nax-sidebar-toggle__icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}
.nax-sidebar-toggle__icon--expand { display: none; }
.nax-sidebar-toggle__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Collapsed rail — icon-centered expand control */
.nax-sidebar.is-collapsed .nax-sidebar-toggle {
    justify-content: center;
    gap: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0 auto;
}
.nax-sidebar.is-collapsed .nax-sidebar-toggle__icon--collapse { display: none; }
.nax-sidebar.is-collapsed .nax-sidebar-toggle__icon--expand { display: inline-flex; }
.nax-sidebar.is-collapsed .nax-sidebar-toggle__label {
    /* Visually hidden; title/aria carry the expand label */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Right rail — utility column ("the workbench edge")
   Mirrors the left sidebar's signal language with right-edge active marker.
   ============================================================================= */

.nax-rail {
    position: fixed;
    top: var(--nax-topbar-h);
    right: 0;
    bottom: 0;
    width: var(--nax-rail-w);
    background: var(--nax-chrome);
    border-left: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 14px;
    gap: 2px;
    z-index: var(--nax-z-sidebar);
    color: var(--nax-chrome-mute);
}

.nax-rail-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--nax-chrome-mute);
    border-radius: 6px;
    cursor: pointer;
    transition: color var(--nax-t), background var(--nax-t);
}
.nax-rail-btn::after {
    /* Right-edge signal marker — symmetry with the sidebar's left bar */
    content: "";
    position: absolute;
    right: -7px;
    top: 7px; bottom: 7px;
    width: 2px;
    background: var(--nax-signal);
    border-radius: 2px 0 0 2px;
    transform: scaleY(0);
    transition: transform var(--nax-t-med);
}
.nax-rail-btn:hover {
    color: var(--nax-chrome-text);
    background: rgba(255, 255, 255, .03);
}
.nax-rail-btn.is-active {
    color: var(--nax-signal);
    background: rgba(138, 170, 240, .07);
}
.nax-rail-btn.is-active::after {
    transform: scaleY(1);
}

/* Hover label — slides out to the LEFT (we're on the right edge) */
.nax-rail-btn::before {
    content: attr(aria-label);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
    background: var(--nax-chrome-3);
    color: var(--nax-chrome-text);
    border: 1px solid var(--nax-chrome-line-2);
    border-radius: 4px;
    font-family: var(--nax-font-sans);
    font-size: 0.745rem;
    font-weight: 500;
    letter-spacing: .005em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.5);
    transition: opacity var(--nax-t), transform var(--nax-t);
    z-index: 10;
}
.nax-rail-btn:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.nax-rail-spacer { flex: 1; }

/* Decorative signal tick at the bottom — mirrors sidebar footer */
.nax-rail::after {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--nax-signal-line);
    margin: 6px 0 -6px;
    align-self: center;
    opacity: .8;
}

/* Rail items rendered as links (e.g. Lock screen) — keep the button look and
   stop global anchor styling (underline / accent colour) leaking in. */
a.nax-rail-btn,
a.nax-rail-btn:hover {
    text-decoration: none;
}
/* © 2026 Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   07. Context Bar — sticky chrome (breadcrumbs + optional module tabs)
   ============================================================================= */

.nax-ctx-chrome {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  background: var(--nax-surface);
}

.nax-ctx-nav {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 20px;
  border-bottom: 1px solid var(--nax-ink-10);
  background: var(--nax-surface);
  gap: 2px;
  flex-shrink: 0;
}

.nax-ctx-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nax-ctx-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 26px;
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
  border-radius: var(--nax-r-sm);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background var(--nax-t), color var(--nax-t);
  text-decoration: none;
  white-space: nowrap;
}

.nax-ctx-link:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-ctx-link--active {
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
}

.nax-ctx-link--active:hover {
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
}

.nax-ctx-sep {
  width: 1px;
  height: 16px;
  background: var(--nax-ink-10);
  margin: 0 4px;
  flex-shrink: 0;
}

.nax-ctx-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* A page's buttons on the breadcrumbs row (content_for :crumb_actions),
   pushed to the right edge. Scrolls sideways rather than overflowing the
   fixed-height row when the screen is too narrow for them. */
.nax-ctx-crumb-actions:has(> .nax-btn, > .nax-guard) {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
  overflow-x: auto;
}

.nax-ctx-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 26px;
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
  border-radius: var(--nax-r-sm);
  border: 1px solid var(--nax-ink-20);
  background: var(--nax-surface);
  cursor: pointer;
  transition: all var(--nax-t);
  text-decoration: none;
  white-space: nowrap;
}

.nax-ctx-action:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-ctx-action--primary {
  background: var(--nax-accent);
  border-color: var(--nax-accent);
  color: #fff;
}

.nax-ctx-action--primary:hover {
  background: var(--nax-accent-dark);
  border-color: var(--nax-accent-dark);
  color: #fff;
}

/* GitLab-style breadcrumb trail (Nax tokens) */
.nax-crumbs {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 0.769rem;
  line-height: 1;
}

.nax-crumbs__list {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
  width: 100%;
}

.nax-crumbs__item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 1;
}

/* Prefer truncating middle ancestors before the current crumb */
.nax-crumbs__item:not(.nax-crumbs__item--current) {
  flex-shrink: 2;
}

.nax-crumbs__item--current {
  flex-shrink: 0;
}

.nax-crumbs__sep {
  flex-shrink: 0;
  padding: 0 8px;
  color: var(--nax-ink-30);
  font-weight: 400;
  user-select: none;
}

.nax-crumbs__icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: inherit;
}

.nax-crumbs__link,
.nax-crumbs__current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  height: 26px;
  text-decoration: none;
  white-space: nowrap;
}

.nax-crumbs__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-crumbs__link {
  color: var(--nax-ink-text-2);
  font-weight: 500;
  transition: color var(--nax-t);
}

.nax-crumbs__link:hover {
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-crumbs__current {
  color: var(--nax-ink);
  font-weight: 600;
}

/* Legacy alias — settings used nax-ctx-crumbs + chevron seps */
.nax-ctx-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   08. Buttons
   ============================================================================= */

.nax-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  height: var(--nax-row);
  font-family: var(--nax-font-sans);
  font-size: 0.846rem;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--nax-r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--nax-t);
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  background-image: none;
}

.nax-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--nax-accent-dim);
}

.nax-btn svg {
  flex-shrink: 0;
}

/* Sizes */
.nax-btn-sm,
.nax-btn--sm {
  height: var(--nax-control-sm);
  padding: 0 8px;
  font-size: 0.769rem;
  gap: 4px;
}

.nax-btn-lg {
  height: 42px;
  padding: 0 18px;
  font-size: 0.923rem;
}

.nax-btn-icon {
  width: var(--nax-row);
  padding: 0;
}

.nax-btn-icon.nax-btn-sm {
  width: var(--nax-control-sm);
}

/* Variants */
.nax-btn-primary,
.nax-btn--primary {
  background: var(--nax-accent);
  border-color: var(--nax-accent);
  color: #fff;
}

.nax-btn-primary:hover,
.nax-btn--primary:hover {
  background: var(--nax-accent-dark);
  border-color: var(--nax-accent-dark);
  color: #fff;
  text-decoration: none;
}

.nax-btn-primary:active {
  background: var(--nax-accent-darker);
}

.nax-btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--nax-accent-rgb), .28);
}

.nax-btn-secondary,
.nax-btn--secondary {
  background: var(--nax-surface, #fff);
  color: var(--nax-ink);
  border-color: var(--nax-ink-10);
}

.nax-btn-secondary:hover,
.nax-btn--secondary:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-btn-ghost,
.nax-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--nax-ink-text-2);
}

.nax-btn-ghost:hover,
.nax-btn--ghost:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

/* A button that reads as a link inside a line of text. */
.nax-btn.nax-btn-link {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nax-accent);
  font-size: inherit;
  font-weight: inherit;
}

.nax-btn.nax-btn-link:hover {
  color: var(--nax-accent-dark);
  text-decoration: underline;
}

.nax-btn-danger {
  background: var(--nax-red);
  border-color: var(--nax-red);
  color: #fff;
}

.nax-btn-danger:hover {
  background: var(--nax-red-dark);
  border-color: var(--nax-red-dark);
  color: #fff;
  text-decoration: none;
}

.nax-btn-danger:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--nax-red-rgb), .28);
}

.nax-btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--nax-ink-text-2);
}

.nax-btn-danger-ghost:hover {
  background: var(--nax-red-bg);
  color: var(--nax-red-text);
  text-decoration: none;
}

.nax-btn-success {
  background: var(--nax-green-solid);
  border-color: var(--nax-green-solid);
  color: #fff;
}

.nax-btn-success:hover {
  background: var(--nax-green-solid-hover);
  border-color: var(--nax-green-solid-hover);
  color: #fff;
  text-decoration: none;
}

.nax-btn-success:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--nax-green-rgb), .28);
}

.nax-btn-warning {
  background: var(--nax-amber-solid);
  border-color: var(--nax-amber-solid);
  color: #fff;
}

.nax-btn-warning:hover {
  background: var(--nax-amber-solid-hover);
  border-color: var(--nax-amber-solid-hover);
  color: #fff;
  text-decoration: none;
}

/* Soft variants */
.nax-btn-soft-primary {
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
  border-color: transparent;
}

.nax-btn-soft-success {
  background: var(--nax-green-bg);
  color: var(--nax-green-text);
  border-color: transparent;
}

.nax-btn-soft-danger {
  background: var(--nax-red-bg);
  color: var(--nax-red-dark);
  border-color: transparent;
}

.nax-btn-soft-warning {
  background: var(--nax-amber-bg);
  color: var(--nax-amber-text);
  border-color: transparent;
}

.nax-btn-soft-primary:hover {
  background: #d0dcf7;
  color: var(--nax-accent-dark);
  text-decoration: none;
}

.nax-btn-soft-success:hover {
  background: #d8f3e8;
  color: var(--nax-green-text);
  text-decoration: none;
}

.nax-btn-soft-danger:hover {
  background: #f9dedd;
  color: var(--nax-red-dark);
  text-decoration: none;
}

.nax-btn-soft-warning:hover {
  background: #f7e5c5;
  color: var(--nax-amber-text);
  text-decoration: none;
}

/* States */
.nax-btn:disabled,
.nax-btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.nax-btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.nax-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nax-spin .6s linear infinite;
  color: rgba(255, 255, 255, .8);
}

/* Button group */
.nax-btn-group {
  display: inline-flex;
  align-items: center;
}

.nax-btn-group .nax-btn:not(:first-child) {
  border-left: none;
  border-radius: 0;
}

.nax-btn-group .nax-btn:first-child {
  border-radius: var(--nax-r-sm) 0 0 var(--nax-r-sm);
}

.nax-btn-group .nax-btn:last-child {
  border-radius: 0 var(--nax-r-sm) var(--nax-r-sm) 0;
}

.nax-btn-group .nax-btn:only-child {
  border-radius: var(--nax-r-sm);
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   09. Forms & Inputs
   ============================================================================= */

.nax-label {
  display: block;
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nax-ink-text-2);
  margin-bottom: 4px;
}

.nax-label.required::after {
  content: ' *';
  color: var(--nax-red-text);
}

.nax-input,
.nax-select,
.nax-textarea {
  display: block;
  width: 100%;
  height: var(--nax-row);
  padding: 0 9px;
  font-family: var(--nax-font-sans);
  font-size: 0.846rem;
  color: var(--nax-ink);
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  transition: border-color var(--nax-t), box-shadow var(--nax-t);
  outline: none;
  appearance: none;
}

.nax-input::placeholder,
.nax-textarea::placeholder {
  color: var(--nax-ink-text-2);
}

.nax-input:focus,
.nax-select:focus,
.nax-textarea:focus {
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 2px var(--nax-accent-dim);
}

.nax-input:disabled,
.nax-select:disabled,
.nax-textarea:disabled {
  background: var(--nax-ink-05);
  color: var(--nax-ink-text-2);
  cursor: not-allowed;
}

.nax-input-sm {
  height: 28px;
  padding: 0 7px;
  font-size: 0.769rem;
}

.nax-textarea {
  height: auto;
  padding: 7px 9px;
  resize: vertical;
  min-height: 80px;
}

.nax-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230c0e11' stroke-opacity='.45' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 28px;
}

.nax-input-group {
  display: flex;
  align-items: stretch;
}

.nax-input-group .nax-input,
.nax-input-group .nax-select {
  border-radius: 0;
  flex: 1;
  min-width: 0;
}

.nax-input-group> :first-child {
  border-radius: var(--nax-r-sm) 0 0 var(--nax-r-sm);
}

.nax-input-group> :last-child {
  border-radius: 0 var(--nax-r-sm) var(--nax-r-sm) 0;
}

.nax-input-group> :only-child {
  border-radius: var(--nax-r-sm);
}

.nax-input-addon {
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-20);
  white-space: nowrap;
}

.nax-input-group .nax-input+.nax-input-addon {
  border-left: none;
}

.nax-input-group .nax-input-addon+.nax-input {
  border-left: none;
}

.nax-input.is-valid,
.nax-select.is-valid {
  border-color: var(--nax-green);
}

.nax-input.is-invalid,
.nax-select.is-invalid {
  border-color: var(--nax-red);
}

.nax-input.is-valid:focus {
  box-shadow: 0 0 0 2px rgba(var(--nax-green-rgb), .18);
}

.nax-input.is-invalid:focus {
  box-shadow: 0 0 0 2px rgba(var(--nax-red-rgb), .18);
}

.nax-field-error {
  font-size: 0.769rem;
  color: var(--nax-red-text);
  margin-top: 3px;
}

.nax-field-hint {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  margin-top: 3px;
}

.nax-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.846rem;
  color: var(--nax-ink-70);
  user-select: none;
}

.nax-check input[type="checkbox"],
.nax-check input[type="radio"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: var(--nax-accent);
  cursor: pointer;
}

.nax-field {
  display: flex;
  flex-direction: column;
}

.nax-field+.nax-field {
  margin-top: 12px;
}

.nax-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.nax-form-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.nax-form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Search input */
.nax-input--search {
  flex: 1;
  min-width: 150px;
}

/* Form cards (entity edit pages) */
.nax-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 960px;
  width: 100%;
}

.nax-form__card {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
}

.nax-form__card-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--nax-ink-07);
  background: var(--nax-ink-03);
}

.nax-form__card-title {
  font-size: 0.769rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
  margin: 0;
}

.nax-form__card--meta {
  background: var(--nax-ink-03);
}

.nax-form__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--nax-ink-07);
}

.nax-form__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 20px;
  background: var(--nax-surface);
}

.nax-form__field--span-2 {
  grid-column: span 2;
}

.nax-form__field--span-3 {
  grid-column: span 3;
}

.nax-form__field--span-4 {
  grid-column: span 4;
}

.nax-form__meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--nax-ink-06);
  font-size: 0.769rem;
}

.nax-form__meta-row:last-child {
  border-bottom: none;
}

.nax-meta__label {
  width: 140px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--nax-ink-text-2);
}

.nax-meta__value {
  color: var(--nax-ink-70);
}

.nax-form__toggles {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nax-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.nax-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.nax-toggle__track {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 18px;
  background: var(--nax-ink-20);
  border-radius: 9px;
  transition: background var(--nax-t);
  margin-top: 1px;
}

.nax-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--nax-t);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.nax-toggle__input:checked+.nax-toggle__track {
  background: var(--nax-accent);
}

.nax-toggle__input:checked+.nax-toggle__track::after {
  transform: translateX(14px);
}

.nax-toggle__label {
  font-size: 0.846rem;
  font-weight: 500;
  color: var(--nax-ink);
  line-height: 1.3;
}

.nax-toggle__hint {
  display: block;
  font-size: 0.769rem;
  font-weight: 400;
  color: var(--nax-ink-text-2);
  margin-top: 2px;
}

.nax-form__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.nax-alert--danger {
  background: var(--nax-red-bg);
  border: 1px solid var(--nax-red-light);
  border-radius: var(--nax-r);
  padding: 10px 14px;
  font-size: 0.846rem;
  color: var(--nax-red-dark);
}

/* -----------------------------------------------------------------------------
   Guarded form regions — rendered by fabric_guard. The fieldset itself is
   invisible chrome; the --readonly state (fieldset[disabled]) greys every
   control so read-only users see, at a glance, that the form isn't theirs
   to type into.
   -------------------------------------------------------------------------- */
.nax-guard {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0; /* fieldsets refuse to shrink below content without this */
}

/* For guards wrapping a single control mid-sentence or inside a flex row. */
.nax-guard--inline {
  display: inline;
}

.nax-guard--readonly .nax-input,
.nax-guard--readonly .nax-select,
.nax-guard--readonly .nax-textarea,
.nax-guard--readonly input,
.nax-guard--readonly select,
.nax-guard--readonly textarea {
  background: var(--nax-canvas);
  color: var(--nax-ink-text-2);
  border-color: var(--nax-ink-10, var(--nax-ink-20));
  cursor: not-allowed;
  box-shadow: none;
}

.nax-guard--readonly .nax-btn,
.nax-guard--readonly button,
.nax-guard--readonly input[type="submit"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Links styled as buttons inside a guarded region are inert too — a disabled
   fieldset only neutralizes real form controls, not anchors. */
.nax-guard--readonly a.nax-btn {
  pointer-events: none;
}

.nax-guard--readonly .nax-label {
  color: var(--nax-ink-text-3, var(--nax-ink-text-2));
}

.nax-guard__note {
  margin-top: 8px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* Small explanatory line under fields/cards. Was referenced by several views
   as a phantom class — texts rendered body-size until this existed. */
.nax-help-text {
  font-size: 0.692rem;
  line-height: 1.5;
  color: var(--nax-ink-text-2);
}

/* Guard variant for header action clusters: the fieldset participates in
   the flex row and lays its children (incl. button_to forms) inline. */
.nax-guard--actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   10. Tables
   ============================================================================= */

.nax-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}

.nax-table {
  --nax-table-head-h: 32px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.846rem;
  color: var(--nax-ink-70);
}

.nax-table thead th {
  height: var(--nax-table-head-h);
  padding: 0 12px;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
  background: var(--nax-canvas);
  border-bottom: 1px solid var(--nax-ink-10);
  white-space: nowrap;
  text-align: left;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 1;
}

.nax-table thead th.sortable {
  cursor: pointer;
}

.nax-table thead th.sortable:hover {
  color: var(--nax-ink);
}

.nax-table tbody tr {
  border-bottom: 1px solid var(--nax-ink-06);
  transition: background var(--nax-t);
}

.nax-table tbody tr:last-child {
  border-bottom: none;
}

.nax-table tbody tr:hover {
  background: var(--nax-ink-03);
}

/* A section's header row (TableComponent `group:`) sticks under the column
   headers while its rows scroll past, until the next section's takes over. */
.nax-table th[scope="rowgroup"] {
  position: sticky;
  top: var(--nax-table-head-h);
  z-index: 1;
  height: var(--nax-row-compact);
  padding: var(--nax-space-3) var(--nax-space-3) var(--nax-space-1);
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: start;
  vertical-align: bottom;
  color: var(--nax-ink-text-2);
  background: var(--nax-surface);
  border-block-end: 1px solid var(--nax-ink-06);
}

.nax-table tbody tr.is-selected {
  background: var(--nax-accent-dim);
}

.nax-table tbody tr.is-clickable {
  cursor: pointer;
}

.nax-table td {
  height: var(--nax-row);
  padding: 0 12px;
  vertical-align: middle;
  border-bottom: none;
}

/* Column kinds. A header shares its column's alignment and stays on one
   line, but keeps the header type — only the cells under it go mono. */
.nax-table :is(.col-id, .col-amount, .col-date, .col-status) {
  white-space: nowrap;
}

.nax-table .col-amount {
  text-align: right;
}

.nax-table :is(tbody, tfoot) .col-id {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-table :is(tbody, tfoot) .col-amount {
  font-family: var(--nax-font-mono);
  color: var(--nax-ink);
}

.nax-table :is(tbody, tfoot) .col-date {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
}

/* A table with a growing column (TableComponent `grow: true`) gives it the
   room; every other column hugs its content on one line. */
.nax-table:has(> thead [data-grow]) thead th:not([data-grow]) {
  width: 1%;
}

.nax-table:has(> thead [data-grow]) tbody td:not([data-grow]) {
  white-space: nowrap;
}

.nax-table .col-actions {
  text-align: right;
  white-space: nowrap;
}

.nax-table .col-check {
  width: 36px;
  padding: 0 0 0 12px;
}

.nax-table .col-amount.positive {
  color: var(--nax-green-text);
}

.nax-table .col-amount.negative {
  color: var(--nax-red-text);
}

.nax-table-sm .nax-table td,
.nax-table-sm .nax-table th {
  height: 28px;
  padding: 0 8px;
}

/* ── Row size ────────────────────────────────────────────────────────────
   TableComponent renders the person's row size as data-density. Condensed
   rows leave the picture column out; comfortable and expanded rows make room
   for it. */
.nax-table[data-density="condensed"] tbody td   { height: var(--nax-row-condensed); }
.nax-table[data-density="comfortable"] tbody td { height: var(--nax-row-comfortable); }
.nax-table[data-density="expanded"] tbody td    { height: var(--nax-row-expanded); }

.nax-table[data-density="condensed"] [data-thumbnail] {
  display: none;
}

.nax-table [data-thumbnail] img {
  display: block;
  inline-size: calc(var(--nax-row-comfortable) - 2 * var(--nax-space-1));
  block-size: calc(var(--nax-row-comfortable) - 2 * var(--nax-space-1));
  object-fit: cover;
  border-radius: var(--nax-r-sm);
}

.nax-table[data-density="expanded"] [data-thumbnail] img {
  inline-size: calc(var(--nax-row-expanded) - 2 * var(--nax-space-1));
  block-size: calc(var(--nax-row-expanded) - 2 * var(--nax-space-1));
}

/* A list's row-size switch (RowSizeComponent). The pressed size is the one
   the list is rendered at. Icons sit in one bordered group; the text variant
   spells the sizes out as ghost buttons. */
.nax-row-size fieldset {
  display: inline-flex;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.nax-row-size--icons fieldset {
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  overflow: hidden;
}

.nax-row-size--icons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--nax-control-sm);
  block-size: var(--nax-control-sm);
  padding: 0;
  border: 0;
  border-inline-end: 1px solid var(--nax-ink-10);
  background: var(--nax-surface);
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: background var(--nax-t), color var(--nax-t);
}

.nax-row-size--icons button:last-child {
  border-inline-end: 0;
}

.nax-row-size--icons button:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-row-size--icons button:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-row-size--icons [aria-pressed="true"],
.nax-row-size--icons [aria-pressed="true"]:hover {
  background: var(--nax-ink);
  color: var(--nax-surface);
}

.nax-row-size--text fieldset {
  gap: var(--nax-space-1);
}

.nax-row-size--text [aria-pressed="true"] {
  background: var(--nax-accent-dim);
  color: var(--nax-accent);
}

/* ── Business-Central-style grid variant ─────────────────────────────────
   Column separators, sentence-case headers, a selected-row pointer. Applied
   by NubocAxis::Interface::TableComponent to an editing table, or when the
   caller passes grid: true. A list rules its rows only. */
.nax-table--grid thead th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--nax-ink-70);
}
.nax-table--grid th,
.nax-table--grid td {
  border-right: 1px solid var(--nax-ink-10);
}
.nax-table--grid th:last-child,
.nax-table--grid td:last-child {
  border-right: none;
}
.nax-table--grid tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--nax-accent);
}

/* Boolean check cell (col-check / status columns) */
.nax-check-yes { display: inline-flex; color: var(--nax-green-text); }
.nax-check-no  { color: var(--nax-ink-text-2); }

/* ── Inline "Edit list" cells (autosave) ─────────────────────────────── */
.nax-inline-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--nax-font-sans);
  font-size: 0.846rem;
  color: var(--nax-ink);
  padding: 5px 7px;
  border-radius: var(--nax-r-sm);
  transition: border-color var(--nax-t), background var(--nax-t), box-shadow var(--nax-t);
}
.col-id .nax-inline-input { font-family: var(--nax-font-mono); }
.col-amount .nax-inline-input { text-align: right; font-family: var(--nax-font-mono); }
.nax-inline-input:hover { border-color: var(--nax-ink-20); }
.nax-inline-input:focus {
  outline: none;
  border-color: var(--nax-accent);
  background: var(--nax-surface);
  box-shadow: 0 0 0 3px rgba(21, 71, 212, .18);
}
.nax-inline-input.is-saving { opacity: 0.6; }
.nax-inline-input.is-saved { border-color: var(--nax-green); background: var(--nax-green-bg); }
.nax-inline-input.is-invalid { border-color: var(--nax-red); background: var(--nax-red-bg); }
.nax-inline-check { width: 16px; height: 16px; accent-color: var(--nax-accent); cursor: pointer; }

.nax-table tfoot th,
.nax-table tfoot td {
  height: 34px;
  padding: 0 12px;
  font-weight: 600;
  color: var(--nax-ink);
  background: var(--nax-canvas);
  border-top: 1px solid var(--nax-ink-10);
}

/* A totals row names itself in a row header: "12 items". */
.nax-table tfoot th {
  text-align: start;
}

.nax-table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-table-toolbar-title {
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-ink);
  flex: 1;
}

.nax-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--nax-ink-10);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-table-footer__note {
  margin-left: auto;
  text-align: right;
}

/* Uppercase micro column heads (dashboard idiom) */
.nax-table--caps thead th {
  font-size: 0.615rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
}

.nax-table__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nax-table-empty,
.nax-table td.nax-table-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--nax-ink-text-2);
  font-size: 0.846rem;
}

/* Toolbar */
.nax-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.nax-toolbar__search {
  flex: 1;
}

.nax-toolbar__filters {
  display: flex;
  gap: 0.75rem;
}

.nax-toolbar__filters .nax-select {
  width: auto;
  min-width: 140px;
}

/* Pagination */
.nax-pagination {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nax-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--nax-r-sm);
  border: 1px solid transparent;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  background: transparent;
  cursor: pointer;
  transition: all var(--nax-t);
  text-decoration: none;
}

.nax-page-btn:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-page-btn.is-active {
  background: var(--nax-accent);
  border-color: var(--nax-accent);
  color: #fff;
}

.nax-page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}


/* =============================================================================
   Smart column headers — sort link + filter trigger + dropdown menu
   (rendered by NubocAxis::Interface::ColumnHeaderComponent + the
   table-filter Stimulus controller)
   ============================================================================= */

/* -- Column header with filter trigger ---------------------------------------- */
.nax-col-header {
  display: flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.nax-col-header__label {
  flex: 1;
  cursor: pointer;
}

.nax-col-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: all var(--nax-t);
}

th:hover .nax-col-trigger,
.nax-col-trigger.is-filtered {
  opacity: 1;
}

.nax-col-trigger:hover {
  background: var(--nax-ink-10);
  color: var(--nax-ink-70);
}

.nax-col-trigger.is-filtered {
  color: var(--nax-accent);
}

/* -- Active header label (filtered column) ------------------------------------ */
.nax-col-header__label.is-active {
  color: var(--nax-accent);
  font-weight: 700;
}

/* -- Sort indicator on label -------------------------------------------------- */
.nax-sort-indicator {
  display: inline-flex;
  margin-left: 2px;
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-sort-indicator.is-active {
  opacity: 1;
  color: var(--nax-accent);
}

/* -- Column filter dropdown menu ---------------------------------------------- */
.nax-col-menu {
  position: absolute;
  z-index: var(--nax-z-overlay);
  min-width: 180px;
  padding: 4px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.13s ease, transform 0.13s ease;
}

.nax-col-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nax-col-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 3px;
  background: transparent;
  font-size: 0.769rem;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-70);
  cursor: pointer;
  text-align: left;
  transition: background var(--nax-t);
}

.nax-col-menu__item:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-col-menu__item.is-active {
  color: var(--nax-accent);
  font-weight: 500;
}

.nax-col-menu__item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nax-col-menu__sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--nax-ink-08);
}

.nax-col-menu__label {
  padding: 4px 10px 2px;
  font-size: 0.641rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-col-menu__filter {
  padding: 2px 6px 6px;
}

.nax-col-menu__filter .nax-col-menu__label {
  display: block;
  padding-left: 4px;
}

.nax-col-menu__input {
  width: 100%;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--nax-ink-10);
  border-radius: 3px;
  background: var(--nax-surface);
  font-size: 0.769rem;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink);
}

.nax-col-menu__input:focus {
  outline: none;
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 2px var(--nax-accent-dim);
}

/* Sort link wrapping label + indicator; hovering it lets Turbo prefetch
   the sorted page so the click swap is instant. */
.nax-col-sort {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.nax-col-sort:hover {
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-table thead th[aria-sort] {
  color: var(--nax-ink);
}

/* A right-aligned header — align: :right, or an amount column's — puts its
   label and sort arrow over the numbers' right edge. */
.nax-col-header--right,
.col-amount > .nax-col-header,
:is(.nax-col-header--right, .col-amount > .nax-col-header) .nax-col-sort {
  justify-content: flex-end;
}

:is(.nax-col-header--right, .col-amount > .nax-col-header) .nax-col-header__label {
  flex: none;
}

/* ── Fill mode — the chart-of-accounts feel ──────────────────────────────
   The wrap becomes the page's one scroll surface: viewport-bounded height
   (so the existing sticky thead engages), contained wheel, slim bar. The
   page holds still; only the rows move. Reserve space for chrome around the
   table with --nax-table-fill-offset on any ancestor. */
.nax-table-wrap--fill {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
  max-height: calc(100vh - var(--nax-topbar-h) - var(--nax-settings-chrome, 108px)
                   - var(--nax-table-fill-offset, 220px));
}

.nax-table-wrap--fill::-webkit-scrollbar { width: 8px; height: 8px; }
.nax-table-wrap--fill::-webkit-scrollbar-thumb { background: var(--nax-ink-20); border-radius: 4px; }
.nax-table-wrap--fill::-webkit-scrollbar-track { background: transparent; }

/* Tree-in-table — corporate structure rows (entities list). */
.nax-entity-tree {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nax-entity-tree__tick {
  color: var(--nax-ink-20);
  font-size: 0.769rem;
}

/* Keyboard grid (grid-nav): the focused cell reads as BC's active cell. */
.nax-table select:focus-visible,
.nax-table input:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 1px;
  border-radius: 3px;
}

/* AG Grid row-delete affordance — quiet until hovered. */
.nax-agdel-cell { display: flex; align-items: center; justify-content: center; }
.nax-agdel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--nax-ink-35);
  cursor: pointer;
}
.nax-agdel:hover { color: var(--nax-red, #d43838); background: var(--nax-red-bg, rgba(212,56,56,.10)); }

/* AG Grid draft line — BC's trailing new-record row. */
.nax-ag-draft { opacity: .75; }
.nax-ag-draft .ag-cell { font-style: normal; }

/* AG Grid inline validation — the offending cell wears the error; hover
   for the message (tooltip). Cleared on the next successful save. */
.ag-cell.nax-ag-cell-invalid {
  box-shadow: inset 0 0 0 1.5px var(--nax-red, #d43838);
  background: var(--nax-red-bg, rgba(212, 56, 56, .08));
  border-radius: 3px;
}

/* AG Grid error callout — BC's bubble: the message sits at the cell. */
.nax-ag-bubble {
  position: absolute;
  z-index: 30;
  max-width: 320px;
  padding: 6px 10px;
  font-size: 0.769rem;
  line-height: 1.4;
  color: var(--nax-ink);
  background: var(--nax-surface);
  border: 1px solid var(--nax-red, #d43838);
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.nax-ag-bubble::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 14px;
  width: 8px;
  height: 8px;
  background: var(--nax-surface);
  border-left: 1px solid var(--nax-red, #d43838);
  border-top: 1px solid var(--nax-red, #d43838);
  transform: rotate(45deg);
}

/* Flush AG Grid — edge-to-edge inside a card, no wrapper radius fighting
   the card corners, cell text aligned to the toolbar's 14px inset. */
.nax-ag-flush .ag-root-wrapper { border-radius: 0; border: none; }
.nax-ag-flush .ag-header-cell,
.nax-ag-flush .ag-cell { padding-left: 14px; padding-right: 14px; }

/* Selection column: header select-all and row checkboxes share one left
   inset and drop AG's internal margins, so the whole column lines up. */
.nax-ag-flush .ag-header-cell[col-id="ag-Grid-SelectionColumn"],
.nax-ag-flush .ag-cell.ag-checkbox-cell {
  padding-left: 14px;
  padding-right: 0;
}
.nax-ag-flush .ag-header-select-all,
.nax-ag-flush .ag-selection-checkbox { margin: 0; }

/* =============================================================================
   Statement table — a financial statement (StatementTableComponent). Builds on
   .nax-table. Each line carries data-kind (heading | account | subtotal |
   total) and data-level (its depth in the chart of accounts); everything
   below reads those two attributes.
   ============================================================================= */
.nax-statement-table caption {
  padding-block: var(--nax-space-3);
  text-align: start;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-statement-note {
  margin: var(--nax-space-2) 0 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-statement-table thead th + th {
  text-align: end;
}

.nax-statement-table tbody th {
  height: var(--nax-row);
  padding-block: 0;
  padding-inline: calc(var(--nax-space-3) + var(--nax-space-5) * var(--nax-statement-depth, 0)) var(--nax-space-3);
  font-weight: normal;
  text-align: start;
}

.nax-statement-table tr[data-level="1"] { --nax-statement-depth: 1; }
.nax-statement-table tr[data-level="2"] { --nax-statement-depth: 2; }
.nax-statement-table tr[data-level="3"] { --nax-statement-depth: 3; }
.nax-statement-table tr[data-level="4"] { --nax-statement-depth: 4; }
.nax-statement-table tr[data-level="5"] { --nax-statement-depth: 5; }
.nax-statement-table tr[data-level="6"] { --nax-statement-depth: 6; }

.nax-statement-table td {
  text-align: end;
}

.nax-statement-table tr[data-kind="heading"] th,
.nax-statement-table strong {
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-statement-table tbody tr[data-kind="subtotal"] {
  border-top: 1px solid var(--nax-ink-20);
}

/* The accounting double rule under a total; `medium` is the narrowest width
   that draws two lines. */
.nax-statement-table tbody tr[data-kind="total"] {
  border-top: 1px solid var(--nax-ink-40);
  border-bottom: medium double var(--nax-ink-40);
}

.nax-statement-table td a {
  color: inherit;
  text-decoration: none;
}

.nax-statement-table td a:hover,
.nax-statement-table td a:focus-visible {
  color: var(--nax-accent);
  text-decoration: underline;
}

@media print {
  .nax-statement-table thead th {
    position: static;
    background: none;
  }

  .nax-statement-table tr {
    break-inside: avoid;
  }
}

/* ── Pinned columns ─────────────────────────────────────────────────────
   with_column(..., pinned: true) stays put while the rest scrolls sideways.
   It reads like any other column until the table is scrolled; then an edge
   and a soft shadow show where the scrolling columns pass under it. */
.nax-table [data-pinned] {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--nax-surface);
  transition: box-shadow var(--nax-t);
}

.nax-table thead [data-pinned] {
  z-index: 2;
  background: var(--nax-canvas);
}

.nax-table tfoot [data-pinned] {
  background: var(--nax-canvas);
}

.nax-table tbody tr:hover [data-pinned] {
  background: linear-gradient(var(--nax-ink-03), var(--nax-ink-03)), var(--nax-surface);
}

.nax-table tbody tr.is-selected [data-pinned] {
  background: linear-gradient(var(--nax-accent-dim), var(--nax-accent-dim)), var(--nax-surface);
}

.nax-table-wrap[data-scrolled] [data-pinned] {
  box-shadow: inset -1px 0 0 var(--nax-ink-10), 6px 0 8px -6px var(--nax-ink-20);
}

/* A selectable table's checkbox column: as narrow as its box. */
.nax-table .nax-table-select {
  inline-size: 1%;
  padding-inline-end: 0;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Edit grid (EditGridComponent): the one line-entry grid for documents and
   journals (docs/specs/table.md, mockup docs/specs/table/journal-mockup.html).
   The frame stacks the title bar, the error summary, the selection bar, the
   scrolling wrap and the sticky footer. Row state is attributes only:
   aria-current, data-state (dirty, saved, invalid), data-expanded, data-new,
   a checked selection box. One --tint paints every row and cell state.
   ============================================================================= */

@property --tint { syntax: "<color>"; inherits: true; initial-value: transparent; }

.nax-editgrid-frame {
  --nax-table-head-h: 32px;
  --nax-field-h: 24px;
  --nax-icon-button: 22px;
  --nax-col-code: 12ch;
  --nax-col-enum: 16ch;
  --nax-col-date: 17ch;
  --nax-col-money: 15ch;
  --nax-col-lookup: 22ch;
  --nax-col-text: 30ch;
  --nax-col-status: 6ch;
  --nax-col-action: 34px;

  display: grid;
  gap: var(--nax-space-3);
  min-inline-size: 0;
  font-size: 0.8125rem;
}

/* ── Title bar: the name, its line count, what the screen adds, Full screen ── */
.nax-editgrid-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-2);
}
.nax-editgrid-title h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.nax-editgrid-title__count { color: var(--nax-ink-text-3); }
.nax-editgrid-title output { margin-inline-end: auto; color: var(--nax-ink-text-2); }

/* ── Bars around the grid ──────────────────────────────────────────────────── */
.nax-error-summary,
.nax-editgrid-bulk,
.nax-undo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-3);
  margin: 0;
  padding: var(--nax-space-2) var(--nax-space-3);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}
.nax-error-summary { display: grid; gap: var(--nax-space-1); border-color: var(--nax-red); background: var(--nax-red-bg); }
.nax-error-summary:focus-visible { outline: 2px solid var(--nax-accent); outline-offset: 2px; }
.nax-error-summary h2 { margin: 0; font-size: 0.8125rem; font-weight: 600; color: var(--nax-red-text, var(--nax-red)); }
.nax-error-summary ul { margin: 0; padding-inline-start: 18px; }
.nax-error-summary a { color: var(--nax-red-text, var(--nax-red)); font-weight: 600; }
.nax-editgrid-bulk { background: var(--nax-accent-dim); border-color: transparent; }
.nax-undo-bar { border-color: var(--nax-accent); }
.nax-undo-bar form { margin: 0; }
:is(.nax-error-summary, .nax-editgrid-bulk, .nax-undo-bar)[hidden],
#journal_undo:empty { display: none; }

/* ── The wrap scrolls both ways: the header sticks to its top, pins to its left ── */
/* The lines fill the window to its foot (--grid-fill, from grid-frame), so
   the sideways scrollbar sits at the bottom of the screen with the totals
   under it, however few lines there are. */
.nax-editgrid-frame > .nax-table-wrap {
  position: relative;
  overflow: auto;
  block-size: var(--grid-fill, min(calc(100dvh - 260px), 720px));
  scroll-padding-block-start: var(--nax-table-head-h);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
}

.nax-editgrid {
  inline-size: max(100%, var(--grid-w, 100%));
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: inherit;
  color: var(--nax-ink);
}

/* A column's kind sizes it; a saved width (--col-w, from grid-columns) wins. */
.nax-editgrid col                     { inline-size: var(--col-w, var(--nax-col-text)); }
.nax-editgrid col[data-kind="code"]   { inline-size: var(--col-w, var(--nax-col-code)); }
.nax-editgrid col[data-kind="enum"]   { inline-size: var(--col-w, var(--nax-col-enum)); }
.nax-editgrid col[data-kind="date"]   { inline-size: var(--col-w, var(--nax-col-date)); }
.nax-editgrid col[data-kind="money"]  { inline-size: var(--col-w, var(--nax-col-money)); }
.nax-editgrid col[data-kind="lookup"] { inline-size: var(--col-w, var(--nax-col-lookup)); }
.nax-editgrid col[data-kind="status"] { inline-size: var(--col-w, var(--nax-col-status)); }
.nax-editgrid col:is([data-kind="action"], [data-kind="menu"]) { inline-size: var(--col-w, var(--nax-col-action)); }
.nax-editgrid col[data-kind="select"] { inline-size: var(--col-w, 36px); }
.nax-editgrid col[data-kind="expand"] { inline-size: var(--col-w, 30px); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.nax-editgrid thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 5;
  block-size: var(--nax-table-head-h);
  padding: 0 var(--nax-space-2);
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--nax-ink-text-2);
  background: var(--nax-canvas);
  border-block: 1px solid var(--nax-ink-10);
}
.nax-editgrid thead th.col-amount { text-align: end; }
.nax-editgrid thead th[data-pinned] { z-index: 6; }
.nax-editgrid-head { display: flex; align-items: center; gap: 2px; min-inline-size: 0; }
.col-amount > .nax-editgrid-head { justify-content: flex-end; }
.nax-editgrid-head > [data-grid-columns-target="label"] { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.nax-editgrid-head__pin { display: none; flex: none; color: var(--nax-ink-text-3); }
.nax-editgrid th[data-pinned] .nax-editgrid-head__pin { display: inline-grid; }
.nax-editgrid th[aria-sort] .nax-editgrid-head__menu { color: var(--nax-accent); }

/* The resize edge: a line on hover, accent while dragging. */
.nax-editgrid-resize { position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 8px; cursor: col-resize; touch-action: none; }
.nax-editgrid-resize::after {
  content: "";
  position: absolute;
  inset-block: 6px;
  inset-inline-end: 3px;
  inline-size: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background-color var(--nax-t);
}
.nax-editgrid th:hover .nax-editgrid-resize::after { background: var(--nax-ink-20); }
.nax-editgrid-resize:hover::after { background: var(--nax-accent); }

/* ── Body ─────────────────────────────────────────────────────────────────── */
.nax-editgrid tbody tr { --tint: transparent; block-size: var(--nax-row-compact); }
.nax-editgrid tbody td {
  position: relative;
  block-size: var(--nax-row-compact);
  padding: 0 3px;
  border-block-end: 1px solid var(--nax-ink-06);
  background-color: var(--nax-surface);
  background-image: linear-gradient(var(--tint), var(--tint));
  white-space: nowrap;
  overflow: hidden;
}
.nax-editgrid tbody td:has(.nax-text-field, .nax-combobox) { overflow: visible; }

/* The leading columns (expand, select, line menu) sit centred, edge to edge. */
.nax-editgrid :is(td, th):has(> .nax-line-expand, > .nax-line-handle, > input[type="checkbox"], > .nax-editgrid-head__menu:only-child) {
  padding: 0;
  text-align: center;
}

/* Pins stick to the left; the last one throws a shadow once rows pass under it. */
.nax-editgrid [data-pinned] { position: sticky; inset-inline-start: var(--pin-start, 0); z-index: 1; }
.nax-editgrid [data-pinned-last] { box-shadow: inset -1px 0 0 var(--nax-ink-10); }
.nax-table-wrap[data-scrolled] .nax-editgrid [data-pinned-last] { box-shadow: inset -1px 0 0 var(--nax-ink-20), 8px 0 8px -8px var(--nax-ink-20); }
.nax-table-wrap[data-scrolled-down] .nax-editgrid thead th { box-shadow: 0 6px 8px -8px var(--nax-ink-20); }
.nax-editgrid tbody tr:focus-within > td[data-pinned] { z-index: 4; }

/* Row and cell state, all through --tint. */
.nax-editgrid tbody tr[aria-current="true"] { --tint: var(--nax-accent-dim); }
.nax-editgrid tbody tr:has(input[type="checkbox"]:checked) { --tint: var(--nax-accent-lt, var(--nax-accent-dim)); }
.nax-editgrid tbody tr[aria-current="true"] > td:first-child { box-shadow: inset 2px 0 0 var(--nax-accent); }
.nax-editgrid tbody tr[data-state="dirty"] > td:first-child::after {
  content: "";
  position: absolute;
  inset-block-start: 5px;
  inset-inline-end: 4px;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--nax-amber);
}
.nax-editgrid tbody tr[data-state="saved"] > td { animation: nax-line-saved 900ms ease-out; }
@keyframes nax-line-saved { from { --tint: var(--nax-green-bg); } to { --tint: transparent; } }
.nax-editgrid tbody tr[data-state="invalid"] > td:first-child { box-shadow: inset 2px 0 0 var(--nax-red); }
.nax-editgrid tbody td:has([aria-invalid="true"]) { --tint: var(--nax-red-bg); }
.nax-editgrid tbody td:has([aria-invalid="true"])::after {
  content: "!";
  position: absolute;
  inset-inline-end: 7px;
  inset-block-start: 50%;
  translate: 0 -50%;
  inline-size: 14px;
  block-size: 14px;
  border-radius: 50%;
  background: var(--nax-red);
  color: var(--nax-surface);
  font: 700 10px/14px var(--nax-font-sans);
  text-align: center;
  pointer-events: none;
}
.nax-editgrid tbody td:has(.nax-combobox [aria-invalid="true"])::after { inset-inline-end: 28px; }

/* The blank line at the bottom: tinted, with a + where the line starts. */
.nax-editgrid tbody tr[data-new] td { background-image: linear-gradient(var(--tint), var(--tint)), linear-gradient(var(--nax-ink-03), var(--nax-ink-03)); }
.nax-editgrid tbody tr[data-new] > td:first-child::before { content: "+"; color: var(--nax-ink-text-3); font-weight: 600; }

/* Required and still empty, on the current line: a red asterisk, as in BC.
   Room is kept for it so the text never jumps. */
.nax-editgrid tbody tr[aria-current="true"] td:has(> .nax-combobox:not([hidden]) > :invalid, > .nax-inline-input:invalid)::before {
  content: "*";
  position: absolute;
  inset-inline-start: 2px;
  inset-block-start: 4px;
  color: var(--nax-red-text, var(--nax-red));
  font: 700 15px/1 var(--nax-font-sans);
  pointer-events: none;
}
.nax-editgrid tbody :is(.nax-combobox > [required], .nax-inline-input[required]) { padding-inline-start: 13px; }

/* ── Cells read as text until you're on them ─────────────────────────────── */
.nax-editgrid .nax-inline-input {
  box-sizing: border-box;
  inline-size: 100%;
  block-size: var(--nax-field-h);
  margin: 0;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  transition: border-color var(--nax-t), background-color var(--nax-t);
}
.nax-editgrid select.nax-inline-input { padding-inline: 2px; cursor: pointer; }
.nax-editgrid .nax-inline-input:hover { border-color: var(--nax-ink-20); }
.nax-editgrid .nax-inline-input:focus { border-color: var(--nax-ink-20); background: var(--nax-surface); box-shadow: none; }
.nax-editgrid .nax-inline-input:focus-visible { outline: 2px solid var(--nax-accent); outline-offset: -1px; }
.nax-editgrid .nax-inline-input:is([readonly], :disabled) { border-color: transparent; background: transparent; color: var(--nax-ink-text-2); cursor: default; }
.nax-editgrid .nax-inline-input[aria-invalid="true"] { border-color: var(--nax-red); padding-inline-end: 24px; }
.nax-editgrid .col-amount .nax-inline-input,
.nax-editgrid td.col-amount {
  text-align: end;
  font-family: var(--nax-font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.nax-editgrid input[type="date"].nax-inline-input { font-family: var(--nax-font-mono); font-size: 0.75rem; }
.nax-editgrid input[type="checkbox"] { inline-size: 14px; block-size: 14px; margin: 0; accent-color: var(--nax-accent); cursor: pointer; }

/* Lookups: the code, and a chevron that shows the matches. */
.nax-editgrid .nax-combobox { position: relative; display: block; }
.nax-editgrid .nax-combobox > .nax-inline-input { padding-inline-end: 26px; }
.nax-editgrid .nax-combobox > .nax-inline-input[aria-invalid="true"] { padding-inline-end: 46px; }
.nax-editgrid .nax-combobox__toggle { position: absolute; inset-inline-end: 1px; inset-block-start: 50%; translate: 0 -50%; }

/* Multi-line text: one line at rest with a "+N lines" pill; all of it
   while you're in it or the line is expanded. */
.nax-text-field { position: relative; display: block; block-size: var(--nax-field-h); }
.nax-text-field textarea.nax-inline-input {
  position: absolute;
  inset: 0 0 auto 0;
  block-size: var(--nax-field-h);
  padding-block: 1px;
  resize: none;
  overflow: hidden;
  white-space: pre;
  line-height: 20px;
}
.nax-text-field:has(.nax-text-field__more) textarea { padding-inline-end: 60px; }
.nax-text-field textarea:focus { z-index: 2; block-size: auto; min-block-size: var(--nax-field-h); field-sizing: content; white-space: pre-wrap; }
.nax-text-field__more {
  position: absolute;
  inset-inline-end: 4px;
  inset-block-start: 50%;
  translate: 0 -50%;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--nax-ink-06);
  color: var(--nax-ink-text-2);
  font-size: 0.656rem;
  font-weight: 600;
  pointer-events: none;
}
.nax-text-field:has(textarea:focus) .nax-text-field__more { display: none; }

/* An expanded line grows to fit its text; every cell lines up at the top. */
.nax-editgrid tbody tr[data-expanded] > td { vertical-align: top; padding-block: 3px; }
.nax-editgrid tbody tr[data-expanded] .nax-text-field { block-size: auto; }
.nax-editgrid tbody tr[data-expanded] .nax-text-field textarea { position: static; block-size: auto; field-sizing: content; white-space: pre-wrap; padding-inline-end: 6px; }
.nax-editgrid tbody tr[data-expanded] .nax-text-field__more { display: none; }

/* Icon buttons in cells and headers: expand, line handle, ⌄, Table options. */
:is(.nax-line-expand, .nax-line-handle, .nax-editgrid-head__menu, .nax-combobox__toggle) {
  display: inline-grid;
  place-items: center;
  inline-size: var(--nax-icon-button);
  block-size: var(--nax-icon-button);
  padding: 0;
  border: 0;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-text-3);
  cursor: pointer;
}
:is(.nax-line-expand, .nax-line-handle, .nax-editgrid-head__menu, .nax-combobox__toggle):is(:hover, :focus-visible) { background: var(--nax-ink-06); color: var(--nax-ink); }
.nax-editgrid-head__menu { inline-size: 18px; block-size: 18px; }
.nax-line-expand svg { transition: rotate var(--nax-t); }
.nax-line-expand[aria-expanded="true"] svg { rotate: 90deg; }
.nax-line-handle { cursor: grab; touch-action: none; user-select: none; }
.nax-editgrid tbody tr[aria-current="true"] .nax-line-handle { background: var(--nax-accent-dim); color: var(--nax-accent); }
.nax-editgrid tbody tr[data-dragging] { opacity: .45; }
.nax-editgrid tbody tr[data-dragging] .nax-line-handle { cursor: grabbing; }

/* ── The grid's menus hang from the button that opened them ──────────────── */
.nax-editgrid-frame .nax-popover { min-inline-size: 200px; }
@supports (position-area: block-end) {
  .nax-editgrid-frame .nax-popover {
    position-anchor: auto;
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline;
    inset: auto;
    margin: var(--nax-space-1) 0 0;
  }
}
.nax-popover .nax-editgrid-columns {
  display: grid;
  gap: 0;
  max-block-size: min(50dvh, 320px);
  overflow: auto;
  margin: var(--nax-space-1) 0 0;
  padding: var(--nax-space-1) var(--nax-space-3) var(--nax-space-2);
  border: 0;
  border-block-start: 1px solid var(--nax-ink-10);
}
.nax-popover .nax-editgrid-columns legend {
  padding: var(--nax-space-2) 0 var(--nax-space-1);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-3);
}
.nax-popover .nax-editgrid-columns label { display: flex; align-items: center; gap: var(--nax-space-2); min-block-size: 26px; cursor: pointer; }

/* ── Lookup lists: Code and Name, in the top layer ───────────────────────── */
.nax-combobox__list {
  position: fixed;
  inline-size: min(540px, calc(100vw - 16px));
  max-block-size: 300px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  color: var(--nax-ink);
  box-shadow: var(--nax-sh-md);
}
.nax-combobox__list[popover] { inset: auto; }
.nax-combobox__list li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: var(--nax-space-3);
  align-items: center;
  min-block-size: 32px;
  padding: 0 var(--nax-space-3);
  border-block-end: 1px solid var(--nax-ink-06);
  cursor: pointer;
}
.nax-combobox__list li:hover { background: var(--nax-ink-03); }
.nax-combobox__list li:is([aria-selected="true"], .nax-combobox__option--active) { background: var(--nax-accent-dim); box-shadow: inset 2px 0 0 var(--nax-accent); }
.nax-combobox__code { font-family: var(--nax-font-mono); font-weight: 500; color: var(--nax-accent); }
.nax-combobox__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The full list behind a lookup (F4). */
.nax-lookup-list { inline-size: min(760px, calc(100vw - 32px)); }
.nax-lookup-list .nax-modal__body { display: grid; gap: var(--nax-space-3); }
.nax-lookup-list input[type="search"] { block-size: 32px; }
.nax-lookup-list ul { max-block-size: min(60dvh, 480px); margin: 0; padding: 0; overflow: auto; list-style: none; border-block: 1px solid var(--nax-ink-10); }
.nax-lookup-list li button {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: var(--nax-space-3);
  align-items: center;
  inline-size: 100%;
  min-block-size: 32px;
  padding: 0 10px;
  border: 0;
  border-block-end: 1px solid var(--nax-ink-06);
  background: transparent;
  color: var(--nax-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.nax-lookup-list li button:is(:hover, :focus-visible) { background: var(--nax-accent-dim); }
.nax-lookup-list li button:focus-visible { outline: 2px solid var(--nax-accent); outline-offset: -2px; }

/* ── Footer: keys left, totals and the primary action right, under the lines ── */
.nax-editgrid-frame > .nax-editgrid__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: var(--nax-space-4);
  padding-block: var(--nax-space-3) calc(var(--nax-space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--nax-canvas);
  border-block-start: 1px solid var(--nax-ink-10);
  box-shadow: 0 -6px 12px -10px var(--nax-ink-20);
}
.nax-editgrid__keys {
  order: -1;
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--nax-ink-text-2);
  font-size: 0.75rem;
}
.nax-editgrid__keys kbd {
  padding: 0 5px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  background: var(--nax-surface);
  color: var(--nax-ink);
  font-family: var(--nax-font-mono);
  font-size: 0.6875rem;
}
.nax-editgrid-totals { flex: 0 1 340px; display: grid; gap: var(--nax-space-3); }
.nax-editgrid-totals dl { display: grid; grid-template-columns: 1fr auto; gap: var(--nax-space-1) var(--nax-space-6); margin: 0; }
.nax-editgrid-totals dt { color: var(--nax-ink-text-2); }
.nax-editgrid-totals dd { margin: 0; text-align: end; font-family: var(--nax-font-mono); font-variant-numeric: tabular-nums; }
.nax-editgrid-totals [data-total="grand"] { padding-block-start: var(--nax-space-2); border-block-start: 1px solid var(--nax-ink-10); font-weight: 600; color: var(--nax-ink); }
.nax-editgrid-totals dd[data-missing] { font-family: var(--nax-font-sans); color: var(--nax-amber-text, var(--nax-amber)); font-weight: 600; }
.nax-editgrid-totals__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--nax-space-2); }
.nax-editgrid-totals__note { margin: 0; text-align: end; font-size: 0.75rem; color: var(--nax-ink-text-3); }

/* The paste preview: each row as the line it would become. */
.nax-paste-preview { inline-size: min(680px, calc(100vw - 32px)); }
.nax-paste-preview .nax-modal__body { display: grid; gap: var(--nax-space-3); }
.nax-paste-preview tr[data-state="invalid"] td { background: var(--nax-red-bg); }
.nax-paste-preview tr[data-state="invalid"] td:last-child { color: var(--nax-red-text, var(--nax-red)); font-weight: 500; }
.nax-paste-preview tr[data-state="ok"] td:last-child { color: var(--nax-green-text, var(--nax-green)); }
.nax-paste-actions { display: flex; justify-content: flex-end; gap: var(--nax-space-2); }

/* ── Full screen: the frame takes the window ─────────────────────────────── */
.nax-editgrid-frame[data-fullscreen] {
  position: fixed;
  inset: 0;
  z-index: var(--nax-z-overlay);
  align-content: start;
  overflow: auto;
  padding-block: calc(var(--nax-space-3) + env(safe-area-inset-top, 0px)) 0;
  padding-inline: max(var(--nax-space-4), env(safe-area-inset-left, 0px)) max(var(--nax-space-4), env(safe-area-inset-right, 0px));
  background: var(--nax-canvas);
}


/* ── Phones: each line is a card, each cell labelled from its header ──────── */
@media (width <= 720px) {
  .nax-editgrid-frame > .nax-table-wrap { overflow: visible; block-size: auto; border: 0; background: transparent; }
  .nax-editgrid { display: block; inline-size: 100%; }
  .nax-editgrid colgroup,
  .nax-editgrid thead { display: none; }
  .nax-editgrid tbody { display: grid; gap: var(--nax-space-2); }
  .nax-editgrid tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--nax-space-2) var(--nax-space-3);
    block-size: auto;
    padding: var(--nax-space-3);
    border: 1px solid var(--nax-ink-10);
    border-radius: var(--nax-r-lg);
    background-color: var(--nax-surface);
    background-image: linear-gradient(var(--tint), var(--tint));
  }
  .nax-editgrid tbody tr[aria-current="true"] { border-color: var(--nax-accent); }
  .nax-editgrid tbody td { display: block; block-size: auto; padding: 0; border: 0; background: none; overflow: visible; white-space: normal; }
  .nax-editgrid tbody td[data-label]:not(:empty)::before {
    content: attr(data-label);
    display: block;
    margin-block-end: 2px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nax-ink-text-3);
  }
  .nax-editgrid tbody td[hidden] { display: none; }
  .nax-editgrid .nax-inline-input:not([readonly], :disabled) { border-color: var(--nax-ink-20); background: var(--nax-surface); }
  .nax-editgrid-frame > .nax-editgrid__footer { box-shadow: none; }
}

/* ── Touch: every control reaches the 44px target ────────────────────────── */
@media (pointer: coarse) {
  .nax-editgrid-frame { --nax-field-h: 36px; --nax-icon-button: var(--nax-touch, 44px); }
  .nax-editgrid tbody tr,
  .nax-editgrid tbody td,
  .nax-editgrid thead th { block-size: var(--nax-touch, 44px); }
  .nax-editgrid input[type="checkbox"] { inline-size: 22px; block-size: 22px; }
  .nax-editgrid-resize { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nax-editgrid tbody tr[data-state="saved"] > td { animation: none; }
  .nax-editgrid .nax-inline-input,
  .nax-line-expand svg { transition: none; }
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* BC-style select-table — master lookup popup with column headers.
   Panel is position: fixed (coords set by select-table Stimulus). */

.nax-select-table {
  position: relative;
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* Label | control flex rows (item/account overview attrs): grow, but
   do not force the full row width the way a block field would. */
.nax-acct-attr > .nax-select-table {
  width: auto;
  flex: 1 1 12rem;
  max-width: min(100%, 18rem);
}

.nax-select-table__trigger {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.nax-select-table__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.nax-select-table__caret {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  line-height: 0;
}

.nax-select-table__caret:hover {
  color: var(--nax-ink);
}

.nax-select-table__panel {
  position: fixed;
  z-index: var(--nax-z-overlay);
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 480px;
  max-height: 280px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r, 6px);
  box-shadow: var(--nax-sh-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--nax-t);
}

.nax-select-table__panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nax-select-table__panel[hidden] {
  display: none !important;
}

.nax-select-table__head,
.nax-select-table__row {
  display: grid;
  grid-template-columns: var(--nax-select-table-cols, 1.25rem 7rem 1fr);
  align-items: center;
  column-gap: 8px;
  padding: 0 8px 0 4px;
}

.nax-select-table__head {
  position: sticky;
  top: 0;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 28px;
  background: var(--nax-canvas, var(--nax-surface));
  border-bottom: 1px solid var(--nax-ink-10, var(--nax-ink-20));
  color: var(--nax-ink-text-2);
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nax-select-table__body {
  flex: 1 1 auto;
  min-height: 0; /* allow overflow-y scroll inside flex panel */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0; /* vertical only — quiet inset so nax-r-sm hover doesn't clip the panel edge */
}

.nax-select-table__row {
  min-height: 28px;
  /* Soft Nax corners — tabular hairlines without BC Win32 cells */
  border-radius: var(--nax-r-sm, 4px);
  border-bottom: 1px solid var(--nax-ink-10);
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--nax-ink);
}

/* Avoid a double rule against the footer border-top. */
.nax-select-table__row:last-child {
  border-bottom: none;
}

.nax-select-table__row[hidden] {
  display: none !important;
}

.nax-select-table__row:hover {
  background: var(--nax-accent-dim, rgba(var(--nax-accent-rgb), 0.09));
}

.nax-select-table__row.is-active {
  background: var(--nax-accent-lt, var(--nax-accent-dim));
  color: var(--nax-ink);
}

.nax-select-table__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  color: var(--nax-accent);
  font-size: 0.75rem;
  line-height: 1;
}

.nax-select-table__row.is-active .nax-select-table__marker::before {
  content: "→";
}

.nax-select-table__cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-select-table__cell--mono {
  font-family: var(--nax-font-mono);
  font-variant-numeric: tabular-nums;
}

.nax-select-table__empty {
  flex: 0 0 auto;
  padding: 12px 10px;
  color: var(--nax-ink-text-2);
  font-size: 0.8125rem;
  text-align: center;
}

.nax-select-table__empty[hidden] {
  display: none !important;
}

.nax-select-table__footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-top: 1px solid var(--nax-ink-10, var(--nax-ink-20));
  background: var(--nax-canvas, var(--nax-surface));
}

.nax-select-table__footer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nax-accent);
  font-size: 0.769rem;
  font-weight: 500;
  text-decoration: none;
}

.nax-select-table__footer-link:hover {
  text-decoration: underline;
}

.nax-select-table__footer-link--muted {
  color: var(--nax-ink-text-2);
  font-weight: 400;
  margin-left: auto;
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Universal slide-in side panel + the two-column layout it docks into.
   Same mechanics as the CoA detail pane, generalized: zero width closed,
   var-driven width open, content clipped during the slide. */

.nax-slide-layout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.nax-slide-layout__main {
  flex: 1;
  min-width: 0;
}

.nax-slide-panel {
  width: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
  transition: width 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.nax-slide-panel:not(.is-open) {
  width: 0;
  border: none;
  opacity: 0;
}

.nax-slide-panel.is-open {
  width: var(--nax-slide-panel-width, 380px);
  opacity: 1;
}

.nax-slide-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-slide-panel__title {
  font-size: 0.923rem;
  font-weight: 600;
  margin: 0;
}

.nax-slide-panel__close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--nax-ink-45);
  font-size: 14px;
  padding: 2px 6px;
}

.nax-slide-panel__close:hover {
  color: var(--nax-ink-70);
}

.nax-slide-panel__body {
  padding: 14px 16px;
  overflow-y: auto;
  min-width: calc(var(--nax-slide-panel-width, 380px) - 2px);
}

/* Stacked labeled fields — the default grammar of a filter pane. */
.nax-slide-panel__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--nax-ink-45);
}

/* Embedded panes bring their own close buttons — the panel's ✕ owns
   closing here. */
.nax-slide-panel__body .nax-related__close {
  display: none;
}

.nax-slide-panel__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Detail drawer — shell column beside main (Help’s mechanical family, no
   search/reader chrome). Pushes main aside; never a modal/scrim. */

.nax-detail-drawer {
  position: relative;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--nax-surface);
  border-radius: 10px 10px 10px 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  transition: flex-basis .24s cubic-bezier(.4, 0, .2, 1), width .24s cubic-bezier(.4, 0, .2, 1);
}

.nax-detail-drawer[hidden] { display: none; }

.nax-detail-drawer.is-open {
  flex: 0 0 var(--nax-detail-drawer-w, 420px);
  width: var(--nax-detail-drawer-w, 420px);
  border-left: 1px solid var(--nax-ink-10);
}

.nax-detail-drawer.is-resizing { transition: none; }
.nax-detail-drawer.is-resizing .nax-detail-drawer__resize { background: var(--nax-ink-35); }

/* When Help is closed/absent, detail is the column abutting the fixed rail —
   keep the same rail clearance Help uses so the rounded corner isn’t clipped. */
.nax-body:not(:has(.nax-help-pane:not([hidden]))) .nax-detail-drawer:not([hidden]) {
  margin-right: var(--nax-rail-w);
}

/* When Help IS open beside it, separate the two columns with the same 5px
   seam main gets — one consistent dark gutter across all three columns. */
.nax-body:has(.nax-help-pane:not([hidden])) .nax-detail-drawer:not([hidden]) {
  margin-right: 5px;
}

.nax-detail-drawer__resize {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 8px;
  cursor: col-resize;
  z-index: 4;
  background: transparent;
  transition: background var(--nax-t);
  touch-action: none;
}
.nax-detail-drawer__resize:hover { background: var(--nax-ink-10); }
.nax-detail-drawer__resize:focus-visible {
  outline: none;
  background: var(--nax-ink-30);
  box-shadow: 0 0 0 2px var(--nax-ink-10);
}

/* Same rail-gap trick as Help: main’s rail-width margin becomes a dark void
   once a shell column sits between main and the fixed rail. Keyed on
   :not([hidden]) so the seam holds through the close animation. */
.nax-body:has(.nax-detail-drawer:not([hidden])) .nax-main { margin-right: 5px; }

/* Pin chrome + body to the open width and clip — content never reflows
   frame-by-frame while the column animates (Help’s trick). */
.nax-detail-drawer__chrome {
  width: var(--nax-detail-drawer-w, 420px);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}

.nax-detail-drawer__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 12px 16px;
  border-bottom: 1px solid var(--nax-ink-08);
  box-sizing: border-box;
}

.nax-detail-drawer__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nax-ink);
  min-width: 0;
  outline: none;
}

.nax-detail-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--nax-ink-45);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nax-detail-drawer__close:hover { background: var(--nax-ink-05); color: var(--nax-ink); }

.nax-detail-drawer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  box-sizing: border-box;
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Universal modal layer (ModalComponent + modal controller). */

.nax-modal {
  width: min(var(--nax-modal-width, 720px), 92vw);
  max-height: 84vh;
  padding: 0;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  color: inherit;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* dialog[open] switches from display:none — restore the flex layout. */
.nax-modal[open] {
  display: flex;
}

/* The flex above would otherwise show a closed <dialog> inline on the
   page — out of the top layer, so its ✕ (dialog.close()) does nothing. */
dialog.nax-modal:not([open]) {
  display: none;
}

/* nax-components.css styles the older backdrop-div .nax-modal — full
   width, capped at 560px and scaled until its backdrop opens. A <dialog>
   sizes by its own --nax-modal-width. */
dialog.nax-modal {
  width: min(var(--nax-modal-width, 720px), 92vw);
  max-width: none;
  margin: auto;
  transform: none;
}

.nax-modal::backdrop {
  background: rgba(10, 12, 16, .45);
}

.nax-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.nax-modal__close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--nax-ink-45);
  font-size: 15px;
  padding: 2px 6px;
}

.nax-modal__close:hover {
  color: var(--nax-ink-70);
}

.nax-modal__body {
  padding: 16px 18px;
  overflow-y: auto;
}

/* Embedded panes bring their own close buttons — the modal's ✕ owns it. */
.nax-modal__body .nax-related__close {
  display: none;
}

/* "Verify it's you to continue" (shared/_step_up, step_up_controller.js): a
   compact centred card. data-state on the dialog says which step it is on;
   data-frame="ready" once Identity's page in the frame said it is ready. */
.nax-step-up {
  --nax-modal-width: 400px;
  align-items: center;
  gap: var(--nax-space-3);
  padding: var(--nax-space-7) var(--nax-space-6) var(--nax-space-6);
  text-align: center;
}

.nax-step-up__seal {
  display: grid;
  place-items: center;
  width: var(--nax-space-8);
  height: var(--nax-space-8);
  border-radius: 50%;
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
}

.nax-step-up__seal svg {
  grid-area: 1 / 1;
}

.nax-step-up [data-step-up-seal="check"],
.nax-step-up[data-state="confirmed"] [data-step-up-seal="lock"] {
  display: none;
}

.nax-step-up[data-state="confirmed"] [data-step-up-seal="check"] {
  display: block;
}

.nax-step-up[data-state="confirmed"] .nax-step-up__seal {
  background: var(--nax-green-bg);
  color: var(--nax-green-text);
}

.nax-step-up__lede {
  margin: 0;
  color: var(--nax-ink-text-2);
}

.nax-step-up__step {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-2);
  width: 100%;
}

.nax-step-up__step[hidden] {
  display: none;
}

.nax-step-up__step p {
  margin: 0;
  color: var(--nax-ink-text-2);
}

.nax-step-up__step .nax-btn {
  width: 100%;
}

.nax-step-up__step .nax-step-up__progress:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--nax-space-2);
  color: var(--nax-ink);
}

.nax-step-up__step .nax-step-up__notice {
  color: var(--nax-red-text);
}

.nax-step-up__step .nax-step-up__confirmed {
  font-weight: 600;
  color: var(--nax-green-text);
}

/* Identity's embedded view, where the card's buttons would be: out of sight
   until Identity says it is ready, then borderless, as tall as Identity
   reports (--nax-step-up-frame-h, set by the controller). */
.nax-step-up__frame {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.nax-step-up[data-state="frame"][data-frame="ready"] .nax-step-up__frame {
  position: static;
  width: 100%;
  height: var(--nax-step-up-frame-h, 160px);
  opacity: 1;
  pointer-events: auto;
}

.nax-step-up__fallback {
  margin: 0;
  font-size: .846rem;
  color: var(--nax-ink-text-3);
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   11. Components
   ============================================================================= */

/* Badges */
.nax-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--nax-r-sm);
  font-size: 0.692rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.nax-badge-xs {
  padding: 1px 5px;
  font-size: 0.615rem;
}

.nax-badge-primary {
  background: var(--nax-accent);
  color: #fff;
}

.nax-badge-success {
  background: var(--nax-green-solid);
  color: #fff;
}

.nax-badge-danger {
  background: var(--nax-red);
  color: #fff;
}

.nax-badge-warning {
  background: var(--nax-amber-solid);
  color: #fff;
}

.nax-badge-info {
  background: var(--nax-blue);
  color: #fff;
}

.nax-badge-neutral {
  background: var(--nax-ink-10);
  color: var(--nax-ink-70);
}

.nax-badge-attention {
  background: var(--nax-attention-solid);
  color: var(--nax-on-accent);
}

.nax-badge-soft-primary {
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
}

.nax-badge-soft-success {
  background: var(--nax-green-bg);
  color: var(--nax-green-text);
}

.nax-badge-soft-danger {
  background: var(--nax-red-bg);
  color: var(--nax-red-dark);
}

.nax-badge-soft-warning {
  background: var(--nax-amber-bg);
  color: var(--nax-amber-text);
}

.nax-badge-soft-info {
  background: var(--nax-blue-bg);
  color: var(--nax-blue-dark);
}

.nax-badge-soft-neutral {
  background: var(--nax-ink-10);
  color: var(--nax-ink-text-2);
}

.nax-badge-soft-attention {
  background: var(--nax-attention-bg);
  color: var(--nax-attention-text);
}

.nax-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  padding: 0;
}

/* Cards */
.nax-card {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh);
}

.nax-card-header {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 40px;
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-card-title {
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-ink);
  flex: 1;
  letter-spacing: -0.01em;
}

.nax-card-body {
  padding: 14px 16px;
}

.nax-card-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--nax-ink-10);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* A smaller footnote under a card's content — lighter than the footer */
.nax-card-note {
  padding: 8px 14px;
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  border-top: 1px solid var(--nax-ink-07);
}

/* KPI Tiles */
.nax-kpi {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nax-kpi-label {
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-kpi-value {
  font-family: var(--nax-font-mono);
  font-size: 1.384rem;
  font-weight: 500;
  color: var(--nax-ink);
  line-height: 1;
  letter-spacing: -0.02em;
}

.nax-kpi-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nax-kpi-strip .nax-kpi {
  flex: 1;
  min-width: 140px;
}

.nax-kpi-value.is-warn {
  color: var(--nax-amber-text);
}

.nax-kpi-note {
  font-size: 0.692rem;
  color: var(--nax-ink-text-3);
}

/* One bar, tiles divided: a list's summary sitting above it. */
.nax-kpi-strip[data-joined] {
  gap: 0;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
}

.nax-kpi-strip[data-joined] .nax-kpi {
  border: 0;
  border-inline-end: 1px solid var(--nax-ink-08);
  border-radius: 0;
  padding: var(--nax-space-2) var(--nax-space-4);
  gap: 2px;
  background: transparent;
}

.nax-kpi-strip[data-joined] .nax-kpi:last-child {
  border-inline-end: 0;
}

.nax-kpi-strip[data-joined] .nax-kpi-value {
  font-size: 1rem;
}

a.nax-kpi {
  color: inherit;
  text-decoration: none;
  transition: background var(--nax-t);
}

a.nax-kpi:hover {
  background: var(--nax-ink-03);
}

a.nax-kpi:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

a.nax-kpi[aria-current="page"] {
  background: var(--nax-accent-lt);
  box-shadow: inset 0 -2px 0 var(--nax-accent);
}

.nax-kpi-delta {
  font-size: 0.769rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nax-kpi-delta.up {
  color: var(--nax-green-text);
}

.nax-kpi-delta.down {
  color: var(--nax-red-text);
}

.nax-kpi-delta.flat {
  color: var(--nax-ink-text-2);
}

/* Modals */
.nax-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 14, 17, .45);
  z-index: var(--nax-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--nax-t-med);
}

.nax-modal-backdrop.is-open {
  opacity: 1;
}

.nax-modal {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  box-shadow: var(--nax-sh-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(.96) translateY(8px);
  transition: transform var(--nax-t-med);
}

.nax-modal-backdrop.is-open .nax-modal {
  transform: scale(1) translateY(0);
}

.nax-modal-sm {
  max-width: 400px;
}

.nax-modal-lg {
  max-width: 760px;
}

.nax-modal-xl {
  max-width: 1000px;
}

.nax-modal-header {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 44px;
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-modal-title {
  font-size: 0.923rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  flex: 1;
}

.nax-modal-body {
  padding: 16px;
  overflow-y: auto;
  font-size: 0.846rem;
  flex: 1;
}

.nax-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

/* Dropdowns */
.nax-dropdown {
  position: relative;
  display: inline-flex;
}

.nax-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: var(--nax-z-overlay);
  min-width: 160px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh-md);
  padding: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--nax-t), transform var(--nax-t);
}

.nax-dropdown-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nax-dropdown-menu.align-right {
  left: auto;
  right: 0;
}

.nax-dropdown-menu.align-up {
  top: auto;
  bottom: calc(100% + 4px);
}

.nax-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 30px;
  font-size: 0.769rem;
  color: var(--nax-ink-70);
  border-radius: var(--nax-r-sm);
  cursor: pointer;
  transition: background var(--nax-t), color var(--nax-t);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.nax-dropdown-item:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-dropdown-item.is-danger:hover {
  background: var(--nax-red-bg);
  color: var(--nax-red-text);
}

.nax-dropdown-item:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.nax-dropdown-divider {
  height: 1px;
  background: var(--nax-ink-10);
  margin: 3px 0;
}

.nax-dropdown-label {
  padding: 6px 10px 2px;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

/* Toasts */
.nax-toasts {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: var(--nax-z-toast);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.nax-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh-md);
  font-size: 0.769rem;
  color: var(--nax-ink-70);
  min-width: 240px;
  max-width: 360px;
  pointer-events: auto;
  transform: translateX(110%);
  transition: transform var(--nax-t-med);
}

.nax-toast.is-visible {
  transform: translateX(0);
}

.nax-toast-icon.success {
  color: var(--nax-green-text);
}

.nax-toast-icon.error {
  color: var(--nax-red-text);
}

.nax-toast-icon.warning {
  color: var(--nax-amber-text);
}

.nax-toast-icon.info {
  color: var(--nax-blue);
}

.nax-toast-body {
  flex: 1;
}

.nax-toast-title {
  font-weight: 600;
  color: var(--nax-ink);
  margin-bottom: 1px;
}

.nax-toast-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  line-height: 1;
}

.nax-toast-dismiss:hover {
  color: var(--nax-ink);
}

/* Tabs */
.nax-tabs {
  display: flex;
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--nax-t), border-color var(--nax-t);
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  margin-bottom: -1px;
  text-decoration: none;
  white-space: nowrap;
}

.nax-tab:hover {
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-tab.is-active {
  color: var(--nax-accent);
  border-bottom-color: var(--nax-accent);
}

.nax-tab-panels .nax-tab-panel {
  display: none;
}

.nax-tab-panels .nax-tab-panel.is-active {
  display: block;
}

/* Empty states */
.nax-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 10px;
}

.nax-empty-icon {
  color: var(--nax-ink-text-2);
  margin-bottom: 4px;
}

.nax-empty-title {
  font-size: 0.923rem;
  font-weight: 600;
  color: var(--nax-ink-70);
}

.nax-empty-desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  max-width: 280px;
  line-height: 1.5;
}

.nax-empty-state {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.nax-empty-state-icon {
  color: var(--nax-ink-text-2);
}

.nax-empty-state-title {
  font-size: 0.846rem;
  font-weight: 500;
  color: var(--nax-ink);
}

.nax-empty-state-desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* Guidance under an empty state's description — first steps, left-aligned. */
.nax-empty-state-body {
  max-width: 460px;
  margin-top: 4px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  text-align: left;
}
.nax-empty-state-body ol { margin: 0; padding-left: 18px; }
.nax-empty-state-body li + li { margin-top: 4px; }

/* One-line empty notice inside a section body */
.nax-empty-state-sm {
  padding: 12px 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* Activity feed */
.nax-activity {
  display: flex;
  flex-direction: column;
}

.nax-activity-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--nax-ink-10);
  font-size: 0.769rem;
}

.nax-activity-item:last-child {
  border-bottom: none;
}

.nax-activity-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nax-ink-05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nax-ink-text-2);
  margin-top: 1px;
}

.nax-activity-body {
  flex: 1;
}

.nax-activity-text {
  color: var(--nax-ink-70);
  line-height: 1.4;
}

.nax-activity-time {
  color: var(--nax-ink-text-2);
  margin-top: 2px;
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
}

/* Avatar */
.nax-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--nax-accent-dim);
  color: var(--nax-accent);
  font-weight: 600;
  flex-shrink: 0;
}

.nax-avatar-sm {
  width: 24px;
  height: 24px;
  font-size: 0.615rem;
}

.nax-avatar-md {
  width: 32px;
  height: 32px;
  font-size: 0.769rem;
}

.nax-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 0.923rem;
}

.nax-avatar-xl {
  width: 80px;
  height: 80px;
  font-size: 1.8rem;
}

.nax-avatar-xl {
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
}

/* Divider */
.nax-divider {
  height: 1px;
  background: var(--nax-ink-10);
  border: none;
  margin: 0;
}

/* Spinner */
.nax-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--nax-ink-10);
  border-top-color: var(--nax-accent);
  border-radius: 50%;
  animation: nax-spin .6s linear infinite;
}

.nax-spinner-sm {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

.nax-spinner-lg {
  width: 24px;
  height: 24px;
  border-width: 3px;
}

/* Skeleton */
.nax-skeleton {
  background: linear-gradient(90deg, var(--nax-ink-05) 25%, var(--nax-ink-10) 50%, var(--nax-ink-05) 75%);
  background-size: 200% 100%;
  animation: nax-shimmer 1.4s infinite;
  border-radius: var(--nax-r-sm);
}

/* Timeline */
.nax-timeline {
  padding: 4px 20px 8px;
}

.nax-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--nax-ink-05);
  position: relative;
}

.nax-timeline-item:last-child {
  border-bottom: none;
}

.nax-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.nax-timeline-dot--green {
  background: var(--nax-green);
}

.nax-timeline-dot--red {
  background: var(--nax-red);
}

.nax-timeline-dot--blue {
  background: var(--nax-accent);
}

.nax-timeline-dot--neutral {
  background: var(--nax-ink-20);
}

.nax-timeline-body {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.769rem;
}

.nax-timeline-action {
  color: var(--nax-ink);
  font-weight: 500;
}

.nax-timeline-time {
  color: var(--nax-ink-text-2);
  font-size: 0.718rem;
  margin-left: auto;
  white-space: nowrap;
}

.nax-timeline-group {
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-timeline-group:last-child {
  border-bottom: none;
}

.nax-timeline-group-header {
  padding: 6px 20px;
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-03);
  border-bottom: 1px solid var(--nax-ink-05);
}

/* Policy */
.nax-policy-group {
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-policy-group:last-child {
  border-bottom: none;
}

.nax-policy-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--nax-ink-03);
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nax-ink-text-2);
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-policy-list {
  list-style: none;
  padding: 0 20px;
}

.nax-policy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-policy-item:last-child {
  border-bottom: none;
}

.nax-policy-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nax-policy-key {
  font-family: 'DM Mono', monospace;
  font-size: 0.718rem;
  color: var(--nax-accent);
  background: var(--nax-accent-lt);
  padding: 2px 6px;
  border-radius: var(--nax-r-sm);
}

.nax-policy-key--sm {
  font-size: 0.667rem;
  padding: 1px 5px;
}

.nax-policy-label {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* Detail list */
.nax-detail-list {
  padding: 0 20px;
}

.nax-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-detail-row:last-child {
  border-bottom: none;
}

.nax-detail-label {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-detail-value {
  font-size: 0.769rem;
  color: var(--nax-ink);
  text-align: right;
}

/* Detail lists inside cards stay dense (profile sidebar) */
.nax-card .nax-detail-list {
  padding: 4px 0 8px;
}

.nax-card .nax-detail-row {
  padding: 5px 16px;
  border-bottom: none;
}

/* Role/member lists */
.nax-role-list {
  list-style: none;
  padding: 0 20px;
}

.nax-role-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-role-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nax-role-item-meta {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nax-role-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nax-role-assign {
  padding: 14px 20px;
  border-top: 1px solid var(--nax-ink-10);
  background: var(--nax-ink-05);
}

.nax-role-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--nax-r);
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nax-member-list {
  list-style: none;
  padding: 0 20px;
}

.nax-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-member-item:last-child {
  border-bottom: none;
}

.nax-member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nax-member-name {
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink);
}

.nax-member-email {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  margin-top: 1px;
}

.nax-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============================================================================
   Session expiry warning — floats above the workspace, does not displace it
   ============================================================================= */
.nax-session-warning {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: var(--nax-z-toast);
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: min(560px, calc(100vw - 32px));
    padding: 11px 14px;
    border-radius: var(--nax-r);
    background: var(--nax-chrome-2);
    color: var(--nax-chrome-text);
    font-family: var(--nax-font-sans);
    font-size: 0.8rem;
    line-height: 1.45;
    box-shadow: var(--nax-sh-lg);
}

.nax-session-warning__text { flex: 1; }

/* Tabular figures so the countdown doesn't jitter as digits change */
.nax-session-warning__clock {
    font-family: var(--nax-font-mono);
    font-variant-numeric: tabular-nums;
    /* Sits on --nax-chrome-2 (dark) — amber-light gives 8.3:1 there. */
    color: var(--nax-amber-light);
}

.nax-session-warning__btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid var(--nax-signal-line);
    border-radius: var(--nax-r-sm);
    background: transparent;
    color: var(--nax-signal-bright);
    font-family: var(--nax-font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--nax-t), border-color var(--nax-t);
}

.nax-session-warning__btn:hover {
    background: var(--nax-signal-dim);
    border-color: var(--nax-signal);
}

.nax-session-warning__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--nax-signal-dim);
}

@media (max-width: 520px) {
    .nax-session-warning { flex-direction: column; align-items: stretch; gap: 10px; }
}

/* =============================================================================
   Export download notice — standalone public page (minimal layout, may be
   opened by a signed-out recipient after their organization has closed)
   ============================================================================= */
.nax-export-notice {
    max-width: 34rem;
    margin: 12vh auto;
    padding: 0 24px;
    font-family: var(--nax-font-sans);
    color: var(--nax-ink);
    text-align: center;
}

.nax-export-notice h1 {
    font-family: var(--nax-font-serif);
    font-weight: 400;
    font-size: 1.9rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
}

.nax-export-notice p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--nax-ink-text-2);
}

.nax-export-notice__meta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--nax-ink-10);
    font-size: 0.82rem;
    color: var(--nax-ink-text-3);
}

/* ── Shared keyboard focus rings (WCAG 2.4.7) ───────────────────────────── */

.nax-acct-tab:focus-visible,
.nax-search-filter-tab:focus-visible,
.nax-entity-switcher-trigger:focus-visible,
.nax-user-menu-trigger:focus-visible,
.nax-dash-module:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 2px;
}

/* ── Record provenance strip ─────────────────────────────────────────────── */
.nax-provenance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--nax-ink-08);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-provenance__sep {
  color: var(--nax-ink-20);
}

.nax-provenance__link {
  color: var(--nax-accent);
  text-decoration: none;
  font-weight: 500;
}

.nax-provenance__link:hover {
  text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Record pane — the chart-of-accounts row-inspector idiom for any table.
   Wrap table + pane in .nax-pane-layout (data-controller="record-pane");
   rows opt in via data-action + data-pane-* attributes.
   -------------------------------------------------------------------------- */
.nax-pane-layout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.nax-pane-layout__main {
  flex: 1;
  min-width: 0;
}

.nax-row-clickable { cursor: pointer; }

.nax-table tbody tr.is-selected td { background: var(--nax-accent-dim); }

.nax-record-pane {
  display: none;
  width: 380px;
  flex-shrink: 0;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: 5px;
  position: sticky;
  top: calc(var(--nax-settings-chrome, 108px) + 12px);
  max-height: calc(100vh - var(--nax-topbar-h) - var(--nax-settings-chrome, 108px) - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
}

.nax-record-pane.is-open { display: block; }

.nax-record-pane__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-record-pane__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--nax-ink);
  margin: 0;
}

.nax-record-pane__close {
  border: none;
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  display: inline-flex;
  padding: 3px;
  border-radius: var(--nax-r-sm);
}

.nax-record-pane__close:hover { background: var(--nax-ink-05); color: var(--nax-ink); }

.nax-record-pane__body { padding: 16px; }

/* Caps section label over a value — the CoA detail grammar. */
.nax-record-pane__label {
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
  margin-top: 12px;
}
.nax-record-pane__label:first-child { margin-top: 0; }

.nax-record-pane__value { font-size: 0.846rem; color: var(--nax-ink); margin-top: 3px; overflow-wrap: anywhere; }

.nax-record-pane__value-lg { font-size: 1.15rem; font-weight: 700; color: var(--nax-ink); margin-top: 3px; }

.nax-record-pane__chip {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.692rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--nax-ink-05);
  color: var(--nax-ink-text-2);
}
.nax-record-pane__chip[data-value="Active"]      { background: var(--nax-green-bg, var(--nax-ink-05)); color: var(--nax-green-text, var(--nax-ink)); }
.nax-record-pane__chip[data-value="Suspended"],
.nax-record-pane__chip[data-value="Deactivated"] { background: var(--nax-red-bg); color: var(--nax-red-dark); }

.nax-record-pane__actions { display: flex; gap: 8px; margin: 14px 0; }
.nax-record-pane__actions .nax-btn { flex: 1; justify-content: center; }

.nax-record-pane__card {
  border: 1px solid var(--nax-ink-10);
  border-radius: 5px;
  margin-top: 10px;
  overflow: hidden;
}

.nax-record-pane__card-title {
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
  padding: 9px 12px;
  background: var(--nax-canvas);
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-record-pane__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.808rem;
}
.nax-record-pane__row + .nax-record-pane__row { border-top: 1px solid var(--nax-ink-08, var(--nax-ink-10)); }

.nax-record-pane__row-label { color: var(--nax-ink-text-2); flex-shrink: 0; }

.nax-record-pane__row-value { color: var(--nax-ink); text-align: right; overflow-wrap: anywhere; }

.nax-record-pane__row-value.is-empty { color: var(--nax-ink-text-2); }

/* Card-title leading icon (SectionCardComponent icon:) */
.nax-settings-section-title__ic {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

/* Detail card — neutral column wrapper for record/detail panels. Shared
   across engines; do not reach for another engine's card class. */
.nax-card-detail {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  overflow: hidden;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* A table inside the card takes the card's frame, not one of its own. */
.nax-card-detail .nax-table-wrap {
  border: 0;
  border-radius: 0;
}

/* =============================================================================
   Attachment list — the files on a record (AttachmentListComponent)
   ============================================================================= */
.nax-attachment-list {
  display: grid;
  gap: var(--nax-space-3);
}

.nax-attachment-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}

.nax-attachment-list li {
  display: flex;
  align-items: center;
  gap: var(--nax-space-3);
  padding: var(--nax-space-2) var(--nax-space-3);
}

.nax-attachment-list li + li {
  border-top: 1px solid var(--nax-ink-10);
}

.nax-attachment-list li a {
  color: var(--nax-ink);
  overflow-wrap: anywhere;
}

.nax-attachment-list small,
.nax-attachment-list > p {
  color: var(--nax-ink-text-2);
}

.nax-attachment-list > p {
  margin: 0;
}

.nax-attachment-list li form {
  margin-inline-start: auto;
}

.nax-attachment-list > form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2);
}

/* =============================================================================
   Document preview — a PDF or image shown in place (DocumentPreviewComponent).
   data-kind is pdf | image | link; link means nothing could be shown inline.
   ============================================================================= */
.nax-document-preview {
  display: grid;
  gap: var(--nax-space-2);
  margin: 0;
}

.nax-document-preview object,
.nax-document-preview img {
  inline-size: 100%;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}

/* A PDF frame has no intrinsic size; a letter page's proportions let it read
   as a page and scale with whatever column it sits in. */
.nax-document-preview object {
  aspect-ratio: 8.5 / 11;
}

/* The object's own content, shown only where the browser has no PDF viewer. */
.nax-document-preview object p {
  margin: 0;
  padding: var(--nax-space-3);
  color: var(--nax-ink-text-2);
}

.nax-document-preview img {
  block-size: auto;
}

.nax-document-preview figcaption {
  display: flex;
  align-items: center;
  gap: var(--nax-space-3);
  color: var(--nax-ink-text-2);
  overflow-wrap: anywhere;
}

.nax-document-preview figcaption span {
  margin-inline-end: auto;
}

.nax-document-preview[data-kind="link"] figcaption {
  padding: var(--nax-space-3);
  border: 1px dashed var(--nax-ink-20);
  border-radius: var(--nax-r);
}

/* A converted preview (data-kind="pdf-preview"): nuboc_storage's pdf-preview
   controller draws each page onto a canvas at the column's width, a
   spreadsheet's sheets behind NAX tabs. */
.nax-document-preview section {
  display: grid;
  gap: var(--nax-space-3);
}

.nax-document-preview section figure {
  display: grid;
  gap: var(--nax-space-1);
  margin: 0;
}

/* The tabs, the failure notice and the sheets not chosen; display above
   would otherwise win. */
.nax-document-preview section [hidden] {
  display: none;
}

.nax-document-preview canvas {
  inline-size: 100%;
  block-size: auto;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}

.nax-document-preview [role="status"] {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  margin: 0;
  color: var(--nax-ink-text-2);
}

/* In the detail drawer a preview is a window onto the document — the first
   page at the drawer's width, the rest a scroll away — so the file's name,
   actions and details stay in view. "Open full size" floats in its corner. */
.nax-detail-drawer .nax-document-preview {
  position: relative;
}

.nax-detail-drawer .nax-document-preview > :is(section, object, img) {
  max-block-size: var(--nax-preview-window-h);
}

.nax-detail-drawer .nax-document-preview > section {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nax-detail-drawer .nax-document-preview > img {
  object-fit: contain;
}

.nax-detail-drawer .nax-document-preview:is([data-kind="pdf"], [data-kind="image"], [data-state="ready"]) > figcaption > .nax-btn {
  position: absolute;
  inset-block-start: var(--nax-space-2);
  inset-inline-end: var(--nax-space-2);
  box-shadow: var(--nax-sh-md);
}

/* =============================================================================
   PDF viewer — a PDF read in a near-full-screen modal (PdfViewerComponent,
   the pdf-viewer controller on PDF.js's viewer components). It is a
   .nax-modal dialog laid out as a grid: the toolbar across the top, the
   page thumbnails beside the pages, a spreadsheet's sheet tabs underneath.
   The chrome follows the theme; the pages stay white, as printed.
   ============================================================================= */
dialog.nax-pdf-viewer {
  width: calc(100vw - 2 * var(--nax-space-6));
  height: calc(100dvh - 2 * var(--nax-space-6));
  max-height: none;
}

dialog.nax-pdf-viewer[open],
.nax-pdf-viewer:not(dialog) {
  display: grid;
  grid-template:
    "header  header"   auto
    "sidebar document" minmax(0, 1fr)
    "sheets  sheets"   auto
    / auto minmax(0, 1fr);
}

/* Inline (inline: true): the same viewer laid into the page, filling the
   box it is given — a workspace, a record page's document column. It is
   positioned so the pages' scroller sits in its document area. */
.nax-pdf-viewer:not(dialog) {
  position: relative;
  block-size: 100%;
  min-block-size: 0;
  overflow: hidden;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
}

/* The page behind stays where it was while a document is open. */
html:has(dialog.nax-pdf-viewer[open]) {
  overflow: hidden;
}

.nax-pdf-viewer > [hidden] {
  display: none;
}

.nax-pdf-viewer > header {
  grid-area: header;
  container: nax-pdf-toolbar / inline-size;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2) var(--nax-space-3);
  padding: var(--nax-space-2) var(--nax-space-3);
  border-bottom: 1px solid var(--nax-ink-10);
}

/* Rotate, full screen and print: buttons in a wide toolbar, a "More tools"
   menu (its popovertarget button) in a narrow one, so the toolbar keeps to
   one line. Full screen shows maximize, or minimize while full screen. */
.nax-pdf-viewer > header > menu {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

@container nax-pdf-toolbar (min-width: 841px) {
  .nax-pdf-viewer > header > [popovertarget] {
    display: none;
  }
}

/* Narrow, the title also gives up more of its width before anything wraps. */
@container nax-pdf-toolbar (max-width: 840px) {
  .nax-pdf-viewer > header > menu {
    display: none;
  }

  .nax-pdf-viewer > header > h2 {
    flex-basis: 6rem;
  }
}

.nax-pdf-viewer:not([data-fullscreen]) [data-pdf-viewer-target~="fullscreen"] > svg + svg,
.nax-pdf-viewer[data-fullscreen] [data-pdf-viewer-target~="fullscreen"] > svg:first-child {
  display: none;
}

.nax-pdf-viewer h2 {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  font-size: 0.923rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-pdf-viewer fieldset,
.nax-pdf-viewer search {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.nax-pdf-viewer fieldset > span,
.nax-pdf-viewer output {
  color: var(--nax-ink-text-2);
  font-size: 0.769rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nax-pdf-viewer input[type="number"] {
  width: 4.5em;
  text-align: end;
}

.nax-pdf-viewer select {
  width: auto;
}

.nax-pdf-viewer input[type="search"] {
  width: 14em;
}

/* The page thumbnails. */
.nax-pdf-viewer > nav:not(.nax-tabs) {
  grid-area: sidebar;
  width: var(--nax-pdf-sidebar-w);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-inline-end: 1px solid var(--nax-ink-10);
}

.nax-pdf-viewer ol {
  display: grid;
  gap: var(--nax-space-3);
  margin: 0;
  padding: var(--nax-space-3);
  list-style: none;
}

.nax-pdf-viewer ol button {
  display: grid;
  justify-items: center;
  gap: var(--nax-space-1);
  width: 100%;
  padding: var(--nax-space-1);
  border: 0;
  border-radius: var(--nax-r);
  background: none;
  color: var(--nax-ink-text-2);
  font-size: 0.692rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.nax-pdf-viewer ol button:hover {
  background: var(--nax-ink-05);
}

.nax-pdf-viewer ol button:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-pdf-viewer ol button[aria-current="page"] {
  background: var(--nax-accent-dim);
  color: var(--nax-accent);
}

.nax-pdf-viewer ol canvas {
  width: 100%;
  height: auto;
  background: var(--nax-paper);
  box-shadow: 0 0 0 1px var(--nax-ink-10);
}

.nax-pdf-viewer ol button[aria-current="page"] canvas {
  box-shadow: 0 0 0 2px var(--nax-accent);
}

/* The pages' scroller. PDF.js requires it absolutely positioned; placed in
   the grid's document area, that area is its box. */
.nax-pdf-viewer > [role="region"] {
  grid-area: document;
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--nax-ink-10);
}

.nax-pdf-viewer > [role="region"]:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

/* Loading and failure sit over the scroller, which is positioned too and
   comes first, so these paint above it. */
.nax-pdf-viewer > [role="status"],
.nax-pdf-viewer > section {
  grid-area: document;
  position: relative;
  place-self: center;
  margin: 0;
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  box-shadow: var(--nax-sh-md);
}

.nax-pdf-viewer > [role="status"] {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  padding: var(--nax-space-2) var(--nax-space-3);
  color: var(--nax-ink-text-2);
}

.nax-pdf-viewer > section {
  padding: var(--nax-space-4);
}

/* A print that could not be prepared: the message stays, the spinner goes. */
.nax-pdf-viewer > [data-failed] > .nax-spinner {
  display: none;
}

/* A spreadsheet's sheets, one a page: tabs along the bottom edge. */
.nax-pdf-viewer > .nax-tabs {
  grid-area: sheets;
  overflow-x: auto;
  padding-inline: var(--nax-space-2);
  border-top: 1px solid var(--nax-ink-10);
  border-bottom: 0;
}

.nax-pdf-viewer > .nax-tabs .nax-tab {
  margin: -1px 0 0;
  border-top: 2px solid transparent;
  border-bottom: 0;
}

.nax-pdf-viewer > .nax-tabs .nax-tab[aria-current="true"] {
  color: var(--nax-accent);
  border-top-color: var(--nax-accent);
}

@media (max-width: 720px) {
  dialog.nax-pdf-viewer {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .nax-pdf-viewer input[type="search"] {
    width: 9em;
  }
}

/* Full screen. An inline viewer is itself the full-screen element; a dialog
   may not be one, so the page goes full screen and the dialog covers it. */
dialog.nax-pdf-viewer[data-fullscreen] {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  border: 0;
  border-radius: 0;
}

.nax-pdf-viewer:not(dialog):fullscreen {
  border: 0;
  border-radius: 0;
}

/* Printing: the controller draws each page into an image in a .nax-pdf-print
   container on <body>, and only that container prints — a page a sheet, the
   image as large as the sheet allows, edge to edge on its own named page so
   no other print loses its margins. The !important is the escape hatch: a
   print must hide every other box, whatever display its own rules give it. */
.nax-pdf-print {
  display: none;
}

@page nax-pdf-print {
  margin: 0;
}

@media print {
  /* The app shell is one viewport tall with its overflow hidden
     (.nax-app in nax-layout.css), which would print only the first sheet.
     Let the print run on for as many pages as it has. */
  html:has(> body > .nax-pdf-print),
  body:has(> .nax-pdf-print) {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  body:has(> .nax-pdf-print) {
    margin: 0;
    padding: 0;
    background: none;
  }

  body:has(> .nax-pdf-print) > :not(.nax-pdf-print),
  body:has(> .nax-pdf-print) :modal {
    display: none !important;
  }

  .nax-pdf-print {
    display: block;
    page: nax-pdf-print;
  }

  .nax-pdf-print img {
    display: block;
    width: 100%;
    height: 100vh;
    object-fit: contain;
    break-inside: avoid;
  }

  .nax-pdf-print img:not(:last-child) {
    break-after: page;
  }
}

/* PDF.js's page layout, from its web/pdf_viewer.css (6.4.299): only what the
   page, its canvas and its text layer need. The page spacing is PDF.js's own,
   which its scroll arithmetic assumes. Page colour is --nax-paper. */
.nax-pdf-viewer .pdfViewer {
  --scale-factor: 1;
}

.nax-pdf-viewer .pdfViewer .page {
  --user-unit: 1;
  --total-scale-factor: calc(var(--scale-factor) * var(--user-unit));
  --scale-round-x: 1px;
  --scale-round-y: 1px;

  direction: ltr;
  position: relative;
  overflow: visible;
  margin: 1px auto -8px;
  border: 9px solid transparent;
  background-clip: content-box;
  background-color: var(--nax-paper);
}

.nax-pdf-viewer .canvasWrapper {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.nax-pdf-viewer .canvasWrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  contain: content;
}

.nax-pdf-viewer .canvasWrapper canvas .structTree {
  contain: strict;
}

.nax-pdf-viewer .canvasWrapper canvas.detailView {
  image-rendering: pixelated;
}

.nax-pdf-viewer [data-main-rotation="90"] {
  transform: rotate(90deg) translateY(-100%);
}

.nax-pdf-viewer [data-main-rotation="180"] {
  transform: rotate(180deg) translate(-100%, -100%);
}

.nax-pdf-viewer [data-main-rotation="270"] {
  transform: rotate(270deg) translateX(-100%);
}

/* The text layer: transparent text laid exactly over the drawn page, so it
   can be selected, copied and found. Find's matches use the amber and green
   channels, which hold in either theme over a white page. */
.nax-pdf-viewer .textLayer {
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));

  color-scheme: only light;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: clip;
  opacity: 1;
  line-height: 1;
  letter-spacing: normal;
  word-spacing: normal;
  text-align: initial;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  caret-color: CanvasText;
}

.nax-pdf-viewer .textLayer.highlighting {
  touch-action: none;
}

.nax-pdf-viewer .textLayer :is(span, br) {
  position: absolute;
  color: transparent;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
  -webkit-user-select: text;
  user-select: text;
}

.nax-pdf-viewer .textLayer > :not(.markedContent),
.nax-pdf-viewer .textLayer .markedContent span:not(.markedContent) {
  --font-height: 0;
  --scale-x: 1;
  --rotate: 0deg;

  z-index: 1;
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}

.nax-pdf-viewer .textLayer .markedContent {
  display: contents;
}

.nax-pdf-viewer .textLayer span[role="img"] {
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

.nax-pdf-viewer .textLayer .highlight {
  margin: -1px;
  padding: 1px;
  border-radius: var(--nax-r-sm);
  background-color: rgba(var(--nax-amber-rgb), .35);
}

.nax-pdf-viewer .textLayer .highlight.appended {
  position: initial;
}

.nax-pdf-viewer .textLayer .highlight.begin {
  border-radius: var(--nax-r-sm) 0 0 var(--nax-r-sm);
}

.nax-pdf-viewer .textLayer .highlight.end {
  border-radius: 0 var(--nax-r-sm) var(--nax-r-sm) 0;
}

.nax-pdf-viewer .textLayer .highlight.middle {
  border-radius: 0;
}

.nax-pdf-viewer .textLayer .highlight.selected {
  background-color: rgba(var(--nax-green-rgb), .4);
  scroll-margin-top: var(--nax-space-8);
}

.nax-pdf-viewer .textLayer ::selection {
  background: rgba(var(--nax-accent-rgb), .25);
  color: transparent;
}

.nax-pdf-viewer .textLayer.selectionRendering ::selection,
.nax-pdf-viewer .textLayer br::selection {
  background: transparent;
  color: transparent;
}

.nax-pdf-viewer .textLayer .endOfContent {
  position: absolute;
  inset: 100% 0 0;
  z-index: 0;
  display: block;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

.nax-pdf-viewer .textLayer.selecting .endOfContent {
  top: 0;
}

@media screen and (forced-colors: active) {
  .nax-pdf-viewer .textLayer .highlight,
  .nax-pdf-viewer .textLayer .highlight.selected {
    background-color: transparent;
    outline: 1px solid Highlight;
  }
}

/* =============================================================================
   Workspace — the frame a full-page app canvas sits in (WorkspaceComponent).
   The one place a fixed height is right: Studio sizes itself to its box, so
   an unsized box collapses it to nothing.
   ============================================================================= */
.nax-workspace {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  block-size: calc(100vh - var(--nax-workspace-offset));
  min-block-size: var(--nax-workspace-min-h);
}

/* =============================================================================
   Smart date field (DateFieldComponent). Under the input: the readings it
   asks about, then the date it settled on. A field it cannot settle yet is
   aria-invalid and quiet about it — amber, not an error.
   ============================================================================= */
.nax-date-field .nax-input[aria-invalid="true"],
.nax-date-range-last .nax-input[aria-invalid="true"] {
  border-color: var(--nax-amber);
}

.nax-date-field p {
  margin: var(--nax-space-1) 0 0;
  color: var(--nax-ink-text-2);
}

.nax-date-field output {
  display: block;
  margin-block-start: var(--nax-space-1);
  color: var(--nax-ink-text-2);
}

.nax-date-field output:empty {
  display: none;
}

/* =============================================================================
   Date range picker (DateRangePickerComponent). The popover is <dialog
   popover>; it hangs under its trigger where CSS anchor positioning ships and
   sits centred where it does not, scrolling when the viewport is short.
   Presets and calendar carry `hidden` until date_range_controller.js
   connects, leaving the fields and Apply.
   State is ARIA and data: aria-pressed on the chosen preset and the two ends,
   aria-current on the group holding the choice, data-in-range across the
   span, aria-current="date" on today, data-companion on the month drawn
   beside the end month.
   ============================================================================= */
.nax-date-range {
  display: inline-block;
  anchor-scope: --nax-date-range;
}

.nax-date-range > button {
  anchor-name: --nax-date-range;
}

.nax-date-range dialog {
  max-inline-size: calc(100vw - 2 * var(--nax-space-3));
  max-block-size: calc(100dvh - 2 * var(--nax-space-3));
  overflow: auto;
  padding: 0;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  color: var(--nax-ink);
  box-shadow: var(--nax-sh-lg);
}

.nax-date-range dialog:popover-open {
  display: grid;
  block-size: max-content;
  align-content: start;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "presets dates"
    "presets last"
    "presets calendar"
    "presets footer";
}

@supports (position-area: block-end) {
  .nax-date-range dialog {
    position-anchor: --nax-date-range;
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-inline, flip-block;
    /* An anchored box otherwise stretches to fill its position area, and
       the grid then spreads that height between its rows as gaps. */
    align-self: start;
    justify-self: start;
    inset: auto;
    margin: var(--nax-space-1) 0 0;
  }
}

.nax-date-range-presets {
  grid-area: presets;
  padding: var(--nax-space-2);
  border-inline-end: 1px solid var(--nax-ink-10);
}

.nax-date-range-presets menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nax-date-range-presets button {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--nax-space-3);
  inline-size: 100%;
  padding: var(--nax-space-1) var(--nax-space-3);
  border: 0;
  border-radius: var(--nax-r-sm);
  background: none;
  color: var(--nax-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.nax-date-range-presets small {
  flex-basis: 100%;
  color: var(--nax-ink-text-2);
}

.nax-date-range-presets button:hover,
.nax-date-range-presets button[aria-pressed="true"],
.nax-date-range-presets button[aria-current="true"] {
  background: var(--nax-ink-05);
}

.nax-date-range-presets button[aria-pressed="true"],
.nax-date-range-presets button[aria-current="true"] {
  font-weight: 600;
}

/* Every fiscal year on the books, and every quarter of them, can be a long
   list; it scrolls under its Back button. */
.nax-date-range-presets section > menu {
  max-block-size: var(--nax-list-max-h);
  overflow-y: auto;
}

.nax-date-range-presets section > button {
  justify-content: flex-start;
  margin-block-end: var(--nax-space-1);
  font-weight: 600;
}

.nax-date-range-presets select {
  display: none;
}

.nax-date-range fieldset {
  grid-area: dates;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--nax-space-2);
  margin: 0;
  padding: var(--nax-space-3) var(--nax-space-4) 0;
  border: 0;
}

.nax-date-range fieldset .nax-date-field {
  flex: 1 1 0;
  min-inline-size: 0;
}

.nax-date-range fieldset > svg {
  block-size: var(--nax-row);
}

.nax-date-range fieldset > label:not(.nax-visually-hidden) {
  display: inline-flex;
  align-items: center;
  gap: var(--nax-space-1);
  min-block-size: var(--nax-row);
}

.nax-date-range fieldset > p {
  flex-basis: 100%;
  margin: 0;
  color: var(--nax-ink-text-2);
}

.nax-date-range fieldset > p:empty {
  display: none;
}

/* The Last row is a fieldset too, laid out as the dates are; only its
   place and its alignment differ. */
.nax-date-range .nax-date-range-last {
  grid-area: last;
  align-items: center;
}

.nax-date-range-last .nax-input,
.nax-date-range-last .nax-select {
  flex: 1 1 0;
  min-inline-size: 0;
}

.nax-date-range-calendar {
  grid-area: calendar;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: var(--nax-space-6);
  padding: var(--nax-space-3) var(--nax-space-4);
}

/* ‹ month year › across the top, the two selects centred between the
   arrows. */
.nax-date-range-calendar header {
  display: flex;
  flex-basis: 100%;
  align-items: center;
  gap: var(--nax-space-2);
  padding-block-end: var(--nax-space-3);
}

.nax-date-range-calendar header select:first-of-type {
  margin-inline-start: auto;
}

.nax-date-range-calendar header select:last-of-type {
  margin-inline-end: auto;
}

.nax-date-range table {
  border-collapse: collapse;
}

.nax-date-range caption {
  padding-block-end: var(--nax-space-3);
  font-weight: 600;
}

.nax-date-range th {
  padding-block-end: var(--nax-space-1);
  color: var(--nax-ink-text-2);
  font-weight: 400;
}

.nax-date-range th abbr {
  text-decoration: none;
}

.nax-date-range td {
  padding: 0;
}

.nax-date-range td button {
  inline-size: var(--nax-row);
  aspect-ratio: 1;
  border: 0;
  border-radius: var(--nax-r);
  background: none;
  color: var(--nax-ink);
  font: inherit;
  cursor: pointer;
}

.nax-date-range td button:hover {
  background: var(--nax-ink-05);
}

.nax-date-range td button:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 2px;
}

.nax-date-range td button[data-in-range] {
  border-radius: 0;
  background: var(--nax-accent-lt);
}

.nax-date-range td button[aria-pressed="true"] {
  border-radius: var(--nax-r);
  background: var(--nax-accent);
  color: var(--nax-surface);
}

.nax-date-range td button[aria-current="date"] {
  font-weight: 700;
  text-decoration: underline;
}

.nax-date-range dialog footer {
  grid-area: footer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2);
  padding: var(--nax-space-3) var(--nax-space-4);
  border-block-start: 1px solid var(--nax-ink-10);
}

.nax-date-range footer output {
  margin-inline-end: auto;
  color: var(--nax-ink-text-2);
}

@media (max-width: 768px) {
  .nax-date-range dialog:popover-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "presets" "dates" "last" "calendar" "footer";
  }

  .nax-date-range-presets {
    border-inline-end: 0;
    padding: var(--nax-space-3) var(--nax-space-4) 0;
  }

  .nax-date-range-presets menu,
  .nax-date-range-presets section {
    display: none;
  }

  .nax-date-range-presets select {
    display: block;
  }

  .nax-date-range .nax-btn,
  .nax-date-range .nax-input,
  .nax-date-range .nax-select,
  .nax-date-range fieldset > label:not(.nax-visually-hidden),
  .nax-date-field p button {
    min-block-size: var(--nax-touch);
  }

  .nax-date-range-calendar header .nax-btn {
    min-inline-size: var(--nax-touch);
  }

  .nax-date-range table[data-companion] {
    display: none;
  }

  .nax-date-range td button {
    inline-size: var(--nax-touch);
  }
}

/* =============================================================================
   Record paging (RecordPagingComponent) — ← 41 of 212 → in the breadcrumb
   row. An arrow with nowhere to go is an aria-hidden span, not a link.
   ============================================================================= */
.nax-record-paging {
  display: inline-flex;
  align-items: center;
  gap: var(--nax-space-1);
  color: var(--nax-ink-text-2);
}

.nax-record-paging > a,
.nax-record-paging > span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--nax-space-6);
  block-size: var(--nax-space-6);
  border-radius: var(--nax-r-sm);
  color: var(--nax-ink-text-2);
}

.nax-record-paging > a:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-record-paging > span[aria-hidden="true"] {
  opacity: .3;
}

.nax-record-paging > span:not([aria-hidden]) {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  white-space: nowrap;
}

/* =============================================================================
   Record rail (RecordRailComponent) — the list beside a record. Its width is
   --nax-record-rail-w, which the page's split may override (a saved width, a
   drag); header, search and list pin to it so nothing reflows while the rail
   animates open or closed. State is aria-current on the record on screen and
   `hidden` on records a search filters out.
   ============================================================================= */
.nax-record-rail {
  flex: 0 0 var(--nax-record-rail-w);
  inline-size: var(--nax-record-rail-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--nax-surface);
  transition: flex-basis var(--nax-t-med), inline-size var(--nax-t-med);
}

.nax-record-rail > header,
.nax-record-rail > search,
.nax-record-rail > nav {
  inline-size: var(--nax-record-rail-w);
  box-sizing: border-box;
}

.nax-record-rail > header {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: var(--nax-space-2);
  padding: var(--nax-space-3) var(--nax-space-3) 0;
}

/* Accessibility floors: a 15px heading, a 12px count. */
.nax-record-rail h2 {
  margin: 0;
  font-size: 1.153rem;
  color: var(--nax-ink);
}

.nax-record-rail > header > span {
  font-family: var(--nax-font-mono);
  font-size: 0.923rem;
  color: var(--nax-ink-text-2);
}

.nax-record-rail > search {
  display: block;
  position: relative;
  flex-shrink: 0;
  padding: var(--nax-space-3);
  border-block-end: 1px solid var(--nax-ink-08);
}

.nax-record-rail > search svg {
  position: absolute;
  inset-inline-start: calc(var(--nax-space-3) + var(--nax-space-2));
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: var(--nax-ink-text-2);
  pointer-events: none;
}

.nax-record-rail > search input {
  inline-size: 100%;
  block-size: var(--nax-space-7);
  padding: 0 var(--nax-space-2) 0 var(--nax-space-7);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  background: var(--nax-canvas);
  color: var(--nax-ink);
  font: inherit;
  font-size: 0.769rem;
}

.nax-record-rail > search input:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 1px;
  border-color: transparent;
}

.nax-record-rail > nav {
  flex: 1;
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--nax-space-1);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* A record in the list is a plain row, not a boxed card. What the row shows
   is the caller's. */
.nax-record-rail > nav > a {
  padding: var(--nax-space-2) var(--nax-space-3);
  border-radius: var(--nax-r);
  color: inherit;
  text-decoration: none;
  transition: background var(--nax-t);
}

.nax-record-rail > nav > a:hover {
  background: var(--nax-ink-04);
}

.nax-record-rail > nav > a:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-record-rail > nav > a[aria-current="page"] {
  background: var(--nax-accent-lt);
}

.nax-record-rail > nav > p {
  margin: var(--nax-space-2) var(--nax-space-1);
  text-align: center;
  font-size: 0.731rem;
  color: var(--nax-ink-text-2);
}

@media (max-width: 1180px) {
  :root { --nax-record-rail-w: 248px; }
}

/* =============================================================================
   Record actions (RecordActionsComponent) — secondaries as text buttons, a
   menu of more, then the one filled primary. An action not yet available is
   aria-disabled with its reason in the title. A state change is a button_to
   form, which stays out of the layout.
   ============================================================================= */
.nax-record-actions {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
  flex-shrink: 0;
}

.nax-record-actions form.button_to {
  display: contents;
}

.nax-record-action {
  display: inline-flex;
  align-items: center;
  block-size: var(--nax-row-compact);
  padding: 0 var(--nax-space-3);
  border: 0;
  border-radius: var(--nax-r);
  background: transparent;
  color: var(--nax-ink);
  font-size: 0.808rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--nax-t);
}

.nax-record-action:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-record-action:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -1px;
}

.nax-record-action[aria-disabled="true"] {
  color: var(--nax-ink-40);
  cursor: default;
}

.nax-record-action[aria-disabled="true"]:hover {
  background: transparent;
}

/* The menu trigger, the one icon-only control. */
.nax-record-action[aria-haspopup] {
  justify-content: center;
  inline-size: var(--nax-row-compact);
  padding: 0;
  color: var(--nax-ink-text-2);
}

.nax-record-action[aria-expanded="true"] {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-record-action--primary {
  background: var(--nax-accent);
  color: var(--nax-on-accent);
  font-weight: 600;
}

.nax-record-action--primary:hover {
  background: var(--nax-accent-dark);
  color: var(--nax-on-accent);
}

.nax-record-actions [role="group"] + [role="group"] {
  margin-block-start: var(--nax-space-1);
  padding-block-start: var(--nax-space-1);
  border-block-start: 1px solid var(--nax-ink-10);
}

.nax-record-actions .nax-dropdown-item[aria-disabled="true"] {
  opacity: .55;
  cursor: default;
}

/* Secondaries collapse into the menu, last first; the menu already holds them. */
@media (max-width: 1180px) {
  .nax-record-action[data-tier]:not([data-tier="1"]) { display: none; }
}

@media (max-width: 860px) {
  .nax-record-action[data-tier] { display: none; }
}

/* =============================================================================
   Popover (PopoverComponent). A <dialog popover>: the browser opens it,
   closes it on Escape or a click outside, and lays it in the top layer, so
   it takes no z-index. Its state is :popover-open; nothing sets a class.
   Where it hangs is the caller's: anchored under its trigger where CSS
   anchor positioning ships, centred where it does not. A long list scrolls
   inside it; its heading, choices and footer stay in view.
   ============================================================================= */
.nax-popover {
  min-inline-size: var(--nax-popover-w);
  max-inline-size: calc(100vw - 2 * var(--nax-space-3));
  max-block-size: var(--nax-list-max-h);
  padding: var(--nax-space-1);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
  color: var(--nax-ink);
  box-shadow: var(--nax-sh-md);
  accent-color: var(--nax-accent);
}

.nax-popover[data-size="form"] {
  min-inline-size: var(--nax-popover-form-w);
}

.nax-popover[data-size="wide"] {
  min-inline-size: min(var(--nax-popover-wide-w), calc(100vw - 2 * var(--nax-space-3)));
  padding: var(--nax-space-2) var(--nax-space-3);
}

.nax-popover:popover-open {
  display: flex;
  flex-direction: column;
}

.nax-popover h2 {
  margin: 0;
  padding: var(--nax-space-2) var(--nax-space-3) var(--nax-space-1);
  font: inherit;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-popover > label:not([hidden]) {
  display: block;
  padding: var(--nax-space-1);
}

.nax-popover > label input {
  inline-size: 100%;
}

.nax-popover menu,
.nax-popover ul {
  flex: 0 1 auto;
  min-block-size: 0;
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nax-popover menu button,
.nax-popover li label,
.nax-popover [role="menuitem"] {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  inline-size: 100%;
  min-block-size: var(--nax-row-compact);
  padding: 0 var(--nax-space-3);
  border: 0;
  border-radius: var(--nax-r-sm);
  background: none;
  color: var(--nax-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.nax-popover menu button:hover,
.nax-popover menu button:focus-visible,
.nax-popover li label:hover,
.nax-popover li label:has(input:focus-visible),
.nax-popover [role="menuitem"]:hover,
.nax-popover [role="menuitem"]:focus-visible {
  background: var(--nax-ink-04);
}

/* Inset, because the list scrolls and would clip a ring drawn outside the row. */
.nax-popover menu button:focus-visible,
.nax-popover li label:has(input:focus-visible),
.nax-popover [role="menuitem"]:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-popover small,
.nax-popover data {
  margin-inline-start: auto;
  padding-inline-start: var(--nax-space-3);
  color: var(--nax-ink-text-3);
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  font-variant-numeric: tabular-nums;
}

.nax-popover > p {
  margin: 0;
  padding: var(--nax-space-2) var(--nax-space-3);
  color: var(--nax-ink-text-3);
}

.nax-popover fieldset {
  display: flex;
  gap: var(--nax-space-4);
  margin: var(--nax-space-1) 0 0;
  padding: var(--nax-space-2) var(--nax-space-3);
  border: 0;
  border-block-start: 1px solid var(--nax-ink-08);
}

.nax-popover fieldset label {
  display: inline-flex;
  align-items: center;
  gap: var(--nax-space-1);
  cursor: pointer;
}

.nax-popover footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--nax-space-2);
  padding: var(--nax-space-2);
}

/* A menu (role="menu"): links, buttons and button_to forms, one per row. A
   destructive item speaks in the danger tokens; one that can't be used now is
   aria-disabled and says why under its label, so neither leans on colour. */
.nax-popover[role="menu"] [role="menuitem"] {
  text-decoration: none;
}

.nax-popover[role="menu"] [role="menuitem"] > svg {
  flex-shrink: 0;
  color: var(--nax-ink-text-2);
}

/* A menu may open on a line about its subject ("31 files") and split its
   items into groups with rules; neither is an item, so arrows pass over them. */
.nax-popover[role="menu"] > p {
  padding-block: var(--nax-space-1);
  font-size: 0.769rem;
}

.nax-popover[role="menu"] > hr {
  margin: var(--nax-space-1) var(--nax-space-3);
  border: 0;
  border-block-start: 1px solid var(--nax-ink-08);
}

.nax-popover [role="menuitem"].nax-menuitem-danger,
.nax-popover [role="menuitem"].nax-menuitem-danger > svg {
  color: var(--nax-red-text);
}

.nax-popover [role="menuitem"].nax-menuitem-danger:hover,
.nax-popover [role="menuitem"].nax-menuitem-danger:focus-visible {
  background: var(--nax-red-bg);
}

.nax-popover [role="menuitem"][aria-disabled="true"] {
  flex-wrap: wrap;
  column-gap: var(--nax-space-2);
  padding-block: var(--nax-space-1);
  color: var(--nax-ink-text-3);
  cursor: default;
}

.nax-popover [role="menuitem"][aria-disabled="true"] > svg {
  color: inherit;
}

.nax-popover [role="menuitem"][aria-disabled="true"]:hover {
  background: none;
}

.nax-popover [role="menuitem"][aria-disabled="true"] > small {
  flex-basis: 100%;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.769rem;
  font-variant-numeric: normal;
}

@media (pointer: coarse) {
  .nax-popover menu button,
  .nax-popover li label,
  .nax-popover [role="menuitem"] {
    min-block-size: var(--nax-touch);
  }
}

/* =============================================================================
   Filter bar (FilterBarComponent). One bordered box, the GET form, holds the
   chips, the search and the Filter button; the view picker sits left of it,
   the row-size switch and columns right, each outside the form. The field
   and value popovers hang under the box. A value list opened from the field
   list stays on top of it, so the field list hides while a value list is
   open; Escape closes the value list and shows the field list again.
   ============================================================================= */
.nax-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  padding: var(--nax-space-2);
  border-block-end: 1px solid var(--nax-ink-08);
  anchor-scope: --nax-filter-bar;
}

.nax-filter-bar search {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--nax-space-2);
  min-inline-size: 0;
}

.nax-filter-bar search > form:has(> input[type="search"]) {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-1);
  min-inline-size: 0;
  min-block-size: var(--nax-row-compact);
  padding: 0 var(--nax-space-1);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
  anchor-name: --nax-filter-bar;
}

.nax-filter-bar search > form:has(> input[type="search"]):focus-within {
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 2px var(--nax-accent-dim);
}

.nax-filter-bar form > ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nax-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nax-filter-bar form > ul > li {
  display: inline-flex;
  align-items: center;
  block-size: var(--nax-control-sm);
  border-radius: var(--nax-r-sm);
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
}

.nax-filter-bar form > ul > li > * {
  display: inline-flex;
  align-items: center;
  gap: var(--nax-space-1);
  block-size: 100%;
  padding: 0 var(--nax-space-2);
  border: 0;
  border-radius: var(--nax-r-sm);
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.nax-filter-bar form > ul > li > :hover {
  background: var(--nax-accent-dim);
}

/* A typed filter that can't be read: shown, never quietly dropped. */
.nax-filter-bar form > ul > li[data-state="error"] {
  background: var(--nax-red-bg);
  color: var(--nax-red-text);
}

.nax-filter-bar form > ul strong {
  font-weight: 600;
}

.nax-filter-bar input[type="search"]:not(.nax-input) {
  flex: 1 0 16ch;
  block-size: var(--nax-control-sm);
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.nax-filter-bar form > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--nax-control-sm);
  block-size: var(--nax-control-sm);
  border-radius: 50%;
  color: var(--nax-ink-text-3);
}

.nax-filter-bar form > a:hover {
  background: var(--nax-ink-06);
  color: var(--nax-ink);
}

.nax-filter-bar .nax-popover:popover-open:has(~ .nax-popover:popover-open) {
  visibility: hidden;
}

/* The field list comes first; every popover after it is a field's values, which carry Is / Is not and Apply. */
.nax-filter-bar .nax-popover ~ .nax-popover {
  min-inline-size: var(--nax-popover-form-w);
}

@supports (position-area: block-end) {
  .nax-filter-bar .nax-popover {
    position-anchor: --nax-filter-bar;
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-inline;
    inset: auto;
    margin: var(--nax-space-1) 0 0;
  }

  /* A popover opened from a button at the end of the bar hangs from that
     button (its opener is its anchor), right edges lined up. */
  .nax-popover[data-align="start"] {
    position-anchor: auto;
    position-area: block-end span-inline-end;
    position-try-fallbacks: flip-inline;
    inset: auto;
    margin: var(--nax-space-1) 0 0;
  }

  .nax-popover[data-align="end"],
  .nax-filter-bar .nax-popover[data-align="end"] {
    position-anchor: auto;
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-inline;
    inset: auto;
    margin: var(--nax-space-1) 0 0;
  }
}

/* ── Column header menu ────────────────────────────────────────────────
   A faint ⌄ beside each header (always there, so touch can reach it),
   opening sort, a typed filter, pick values, move, hide and help. */
.nax-column-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 18px;
  block-size: 18px;
  margin-inline-start: 2px;
  padding: 0;
  border: 0;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-30);
  cursor: pointer;
}

th:hover .nax-column-menu-button,
.nax-column-menu-button:focus-visible {
  color: var(--nax-ink);
  background: var(--nax-ink-06);
}

.nax-column-menu-button:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 1px;
}

.nax-col-funnel {
  color: var(--nax-accent);
  flex: none;
}

.nax-column-menu {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-1);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  text-align: start;
}

.nax-column-menu menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nax-column-menu menu a,
.nax-column-menu menu button {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  inline-size: 100%;
  min-block-size: var(--nax-row-compact);
  padding: 0 var(--nax-space-2);
  border: 0;
  border-radius: var(--nax-r-sm);
  background: transparent;
  font: inherit;
  font-size: 0.846rem;
  color: var(--nax-ink-70);
  text-decoration: none;
  cursor: pointer;
}

.nax-column-menu menu svg {
  color: var(--nax-accent);
  flex: none;
}

.nax-column-menu menu a:hover,
.nax-column-menu menu button:hover:not([disabled]),
.nax-column-menu menu a:focus-visible,
.nax-column-menu menu button:focus-visible {
  background: var(--nax-ink-04);
  color: var(--nax-ink);
  outline: none;
}

.nax-column-menu menu a[aria-current] {
  color: var(--nax-ink);
  font-weight: 600;
}

.nax-column-menu menu button[disabled] {
  opacity: .4;
  cursor: default;
}

.nax-column-menu__filter {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-1);
  padding: var(--nax-space-2);
  border-block: 1px solid var(--nax-ink-08);
}

.nax-column-menu__filter label {
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-column-menu__filter div {
  display: flex;
  gap: var(--nax-space-1);
}

.nax-column-menu__filter input {
  flex: 1;
  min-inline-size: 0;
  block-size: var(--nax-control-sm);
  padding: 0 var(--nax-space-2);
  border: 1px solid var(--nax-ink-30);
  border-radius: var(--nax-r-sm);
  font-family: var(--nax-font-mono);
  font-size: 0.846rem;
}

.nax-column-menu__filter input:focus {
  outline: 2px solid var(--nax-accent);
  outline-offset: -1px;
  border-color: var(--nax-accent);
}

.nax-column-menu__filter input[aria-invalid] {
  border-color: var(--nax-red);
}

.nax-column-menu__note {
  margin: 0;
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-3);
}

.nax-column-menu__note[data-state="error"] {
  font-family: inherit;
  color: var(--nax-red-text);
}

.nax-column-menu__layout {
  padding-block-start: var(--nax-space-1);
  border-block-start: 1px solid var(--nax-ink-08);
}

.nax-column-menu__help {
  padding: var(--nax-space-1) var(--nax-space-2);
  border-block-start: 1px solid var(--nax-ink-08);
  font-size: 0.769rem;
  color: var(--nax-ink-70);
}

.nax-column-menu__help summary {
  cursor: pointer;
  color: var(--nax-accent);
}

.nax-column-menu__help p {
  margin: var(--nax-space-1) 0 0;
}

/* A popover opened from a table header sits in the top layer but still
   inherits the header's type; it reads as body text. */
th .nax-popover {
  text-align: start;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  font-weight: 400;
  font-size: 0.846rem;
  color: var(--nax-ink);
}

.nax-column-menu__values {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-1);
  padding: var(--nax-space-1) var(--nax-space-2) var(--nax-space-2);
  border-block-end: 1px solid var(--nax-ink-08);
}

.nax-column-menu__values fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.nax-column-menu__values legend {
  padding: 0;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-column-menu__values ul {
  list-style: none;
  margin: var(--nax-space-1) 0 0;
  padding: 0;
  max-block-size: 12rem;
  overflow-y: auto;
}

.nax-column-menu__values li label {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  min-block-size: var(--nax-control-sm);
  padding: 0 var(--nax-space-1);
  border-radius: var(--nax-r-sm);
  cursor: pointer;
}

.nax-column-menu__values li label:hover {
  background: var(--nax-ink-04);
}

.nax-column-menu__values data {
  margin-inline-start: auto;
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-column-menu__op {
  display: flex;
  align-items: center;
  gap: var(--nax-space-3);
}

.nax-column-menu__op label {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
  cursor: pointer;
}

.nax-column-menu__op button {
  margin-inline-start: auto;
}

/* =============================================================================
   Folder tree (FolderTreeComponent). A <nav> of nested lists: each folder a
   row of two columns, its disclosure button (when it holds folders) and its
   link; the folders inside sit under the link, so every level indents by
   one button's width. From the fourth level down (a folder three below its
   root) the indent and the disclosure column both shrink to the deep step,
   so a name four levels down still shows; a name too long for its row
   trails off, and the link's title gives it whole. Branch state is aria-expanded plus hidden on the list
   it controls. On narrow screens the Location button folds the whole tree,
   read from its aria-expanded; it stays hidden, and the tree open, until
   folder_tree_controller.js shows it.
   The link spans the whole row, under the disclosure button, so hovering or
   focusing anything in the row tints all of it; the current folder keeps
   its stronger selected look instead.
   A folder with actions ends its row in a "…" menu button (aria-haspopup),
   laid over the count's slot. Hovering or focusing the row, or opening its
   menu, swaps the count for the "…" in place — the count fades but stays
   in the accessibility tree — and a row without actions keeps its count.
   On a coarse pointer there is no hover, so the "…" always shows, in a slot
   of its own after the count. Its menu is a .nax-popover role="menu",
   anchored under it.
   ============================================================================= */
/* row:  a row's height, and its disclosure column's width at the top levels.
   col:  this folder's disclosure column — its link's leading slot.
   step: how far the folders inside this one sit in from it.
   gap:  the space between the glyphs and words of its row. */
.nax-folder-tree {
  --nax-folder-tree-row: var(--nax-control-sm);
  --nax-folder-tree-col: var(--nax-folder-tree-row);
  --nax-folder-tree-gap: var(--nax-space-2);
  --nax-folder-tree-step: var(--nax-folder-tree-row);
  --nax-folder-tree-deep-col: var(--nax-tree-step-deep);
  --nax-folder-tree-deep-step: var(--nax-tree-step-deep);
  --nax-folder-tree-line: var(--nax-ink-20);
  font-size: 0.846rem;
}

.nax-folder-tree li li li {
  --nax-folder-tree-step: var(--nax-folder-tree-deep-step);
}

.nax-folder-tree li li li li {
  --nax-folder-tree-col: var(--nax-folder-tree-deep-col);
  --nax-folder-tree-gap: var(--nax-space-1);
}

/* A group with no folder to open (the quick-access rows: All files, Recent,
   Pinned) reserves no disclosure column, so its icons start where the group
   headings' words do; the counts keep the row's end, in line with the
   folders below. */
.nax-folder-tree > div > ul:not(:has(> li > button[aria-controls])) > li {
  --nax-folder-tree-col: 0px;
}

/* One line, always: a heading too long for the column trails off, and its
   title gives it whole. */
.nax-folder-tree h2 {
  margin: var(--nax-space-3) 0 var(--nax-space-1);
  padding: 0 var(--nax-space-2);
  overflow: hidden;
  font: inherit;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--nax-ink-text-2);
}

.nax-folder-tree h2:first-child {
  margin-block-start: 0;
}

/* A group with actions heads itself with a row: its heading across the whole
   of it, and its compact icon-only buttons (the VS Code Explorer's New File /
   Refresh / Collapse All) in one box laid over the heading's end. Out of the
   flow, they take none of the heading's width and showing them shifts
   nothing: the box paints the panel's surface, fading in over a short run so
   a long heading trails off under it rather than being cut. They show while
   the group — heading or folders — is hovered or holds focus, and always on
   a coarse pointer; hidden, they only fade, so they stay in the tab order
   and focus brings them back. The row is as tall as the buttons, shown or
   not. The expand/collapse toggle carries both its icons and shows the one
   its data-tree-next names. A button_to's form steps aside so its button
   sits in the box. */
.nax-folder-tree header {
  --nax-folder-tree-surface: var(--nax-surface);
  --nax-folder-tree-fade: var(--nax-space-4);
  position: relative;
  display: flex;
  align-items: center;
  min-block-size: var(--nax-control-xs);
  margin: var(--nax-space-3) 0 var(--nax-space-1);
}

.nax-folder-tree header:first-child {
  margin-block-start: 0;
}

.nax-folder-tree header > h2 {
  flex: 1;
  min-inline-size: 0;
  margin: 0;
}

.nax-folder-tree header > div {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
  padding-inline: var(--nax-folder-tree-fade) var(--nax-space-1);
  background: linear-gradient(to right, transparent, var(--nax-folder-tree-surface) var(--nax-folder-tree-fade));
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-folder-tree header > div:dir(rtl) {
  background: linear-gradient(to left, transparent, var(--nax-folder-tree-surface) var(--nax-folder-tree-fade));
}

.nax-folder-tree header:is(:hover, :focus-within, :has(+ :is(ul, p):is(:hover, :focus-within))) > div {
  opacity: 1;
}

.nax-folder-tree header form {
  display: contents;
}

.nax-folder-tree header :is(a, button) {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  inline-size: var(--nax-control-xs);
  block-size: var(--nax-control-xs);
  padding: 0;
  border: 0;
  border-radius: var(--nax-r-sm);
  background: none;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: background var(--nax-t);
}

.nax-folder-tree header :is(a, button):not([aria-disabled="true"]):hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-folder-tree header [aria-disabled="true"] {
  color: var(--nax-ink-text-3);
  cursor: not-allowed;
}

.nax-folder-tree header [data-tree-next="expand"] > [data-tree-icon="collapse"],
.nax-folder-tree header [data-tree-next="collapse"] > [data-tree-icon="expand"] {
  display: none;
}

.nax-folder-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nax-folder-tree li {
  display: grid;
  grid-template-columns: var(--nax-folder-tree-col) minmax(0, 1fr);
  align-items: center;
  anchor-scope: --nax-folder-actions;
}

.nax-folder-tree li > a {
  grid-area: 1 / 1 / 2 / -1;
}

/* Under the link, pulled back from the disclosure column to the step. The
   guide is where this folder's guide line runs, measured from the folders
   inside — resolved here, so they inherit their parent's, not their own. */
.nax-folder-tree li > ul {
  --nax-folder-tree-guide: calc(var(--nax-folder-tree-col) / 2 - var(--nax-folder-tree-step));
  grid-area: 2 / 2 / 3 / -1;
  margin-inline-start: calc(var(--nax-folder-tree-step) - var(--nax-folder-tree-col));
}

/* Tree connector — the sidebar sub-nav's guide line, elbow and arrowhead, at
   every depth. A folder's guide line runs down its disclosure column; each
   folder inside draws the elbow off it into its own row (::before), and every
   one but the last carries the line on past its own branch to the next. The
   elbow reaches the row's first glyph: a branch's disclosure button, or across
   a leaf's empty slot to its icon. The arrowhead (::after) points into the
   folder on screen and the one under the pointer or focus. A collapsed branch
   is hidden, connectors and all. Decorative: empty generated content, drawn
   beside the link, never announced. */
.nax-folder-tree li li {
  --nax-folder-tree-elbow-end: var(--nax-folder-tree-col);
  position: relative;
}

.nax-folder-tree li li:has(> button[aria-controls]) {
  --nax-folder-tree-elbow-end: 0px;
}

.nax-folder-tree li li::before,
.nax-folder-tree li li::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.nax-folder-tree li li::before {
  inset-block-start: 0;
  inset-inline-start: var(--nax-folder-tree-guide);
  box-sizing: border-box;
  inline-size: calc(var(--nax-folder-tree-elbow-end) - var(--nax-folder-tree-guide));
  block-size: calc(var(--nax-folder-tree-row) / 2);
  border-inline-start: var(--nax-tree-line-w) solid var(--nax-folder-tree-line);
  border-block-end: var(--nax-tree-line-w) solid var(--nax-folder-tree-line);
  border-end-start-radius: var(--nax-tree-elbow-r);
}

.nax-folder-tree li li:not(:last-child)::before {
  inset-block-end: 0;
  block-size: auto;
  border-block-end: 0;
  border-end-start-radius: 0;
  background: linear-gradient(var(--nax-folder-tree-line), var(--nax-folder-tree-line))
    0 calc(var(--nax-folder-tree-row) / 2 - var(--nax-tree-line-w)) / 100% var(--nax-tree-line-w) no-repeat;
}

.nax-folder-tree li li::after {
  inset-block-start: calc(var(--nax-folder-tree-row) / 2 - var(--nax-tree-line-w) / 2 - var(--nax-tree-arrow-h));
  inset-inline-start: var(--nax-folder-tree-elbow-end);
  border-block: var(--nax-tree-arrow-h) solid transparent;
  border-inline-start: var(--nax-tree-arrow-w) solid var(--nax-folder-tree-line);
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-folder-tree li li:has(> a[aria-current="page"], > :is(a, button):is(:hover, :focus-visible))::after {
  opacity: 1;
}

/* Above the link they sit on, so they take their own clicks. */
.nax-folder-tree li > button {
  grid-row: 1;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  inline-size: var(--nax-folder-tree-row);
  block-size: var(--nax-folder-tree-row);
  padding: 0;
  border: 0;
  border-radius: var(--nax-r-sm);
  background: none;
  color: var(--nax-ink-text-2);
  cursor: pointer;
}

.nax-folder-tree li > button:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-folder-tree li > button svg {
  transition: rotate var(--nax-t);
}

.nax-folder-tree li > button[aria-controls][aria-expanded="true"] svg {
  rotate: 90deg;
}

.nax-folder-tree li > button[aria-controls] {
  grid-column: 1;
  inline-size: var(--nax-folder-tree-col);
}

.nax-folder-tree li > button[aria-haspopup] {
  grid-column: 2;
  justify-self: end;
  anchor-name: --nax-folder-actions;
  color: var(--nax-accent);
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-folder-tree li:has(> :is(a, button):is(:hover, :focus-visible)) > button[aria-haspopup],
.nax-folder-tree li > button[aria-haspopup][aria-expanded="true"] {
  opacity: 1;
}

@supports (position-area: block-end) {
  .nax-folder-tree [role="menu"] {
    position-anchor: --nax-folder-actions;
    position-area: block-end span-inline-start;
    position-try-fallbacks: flip-block, flip-inline;
    inset: auto;
    margin: var(--nax-space-1) 0 0;
  }
}

.nax-folder-tree li > a {
  display: flex;
  align-items: center;
  gap: var(--nax-folder-tree-gap);
  min-block-size: var(--nax-folder-tree-row);
  padding-block: 0;
  padding-inline: calc(var(--nax-folder-tree-col) + var(--nax-folder-tree-gap)) var(--nax-space-2);
  border-radius: var(--nax-r);
  color: var(--nax-ink);
  text-decoration: none;
  transition: background var(--nax-t);
}

.nax-folder-tree li:has(> :is(a, button):is(:hover, :focus-visible), > button[aria-haspopup][aria-expanded="true"]) > a:not([aria-current="page"]) {
  background: var(--nax-ink-05);
}

.nax-folder-tree li > a > svg {
  flex-shrink: 0;
  color: var(--nax-ink-text-2);
}

.nax-folder-tree li > a > span:first-of-type {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-folder-tree .nax-badge {
  flex-shrink: 0;
}

/* Inset, because a scrolling sidebar would clip a ring drawn outside the row. */
.nax-folder-tree a:focus-visible,
.nax-folder-tree button:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-folder-tree a[aria-current="page"] {
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
  font-weight: 600;
}

.nax-folder-tree a[aria-current="page"] > svg,
.nax-folder-tree a[aria-current="page"] data {
  color: inherit;
}

.nax-folder-tree data {
  margin-inline-start: auto;
  padding-inline-start: var(--nax-space-2);
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  font-variant-numeric: tabular-nums;
  color: var(--nax-ink-text-3);
  transition: opacity var(--nax-t);
}

/* The "…" covers the link's last row-width: a count fills at least that much
   (with the link's end padding), and a row without one keeps it clear. */
@media not all and (pointer: coarse) {
  .nax-folder-tree li:has(> button[aria-haspopup]) > a > data {
    min-inline-size: calc(var(--nax-folder-tree-row) - var(--nax-space-2));
    text-align: end;
  }

  .nax-folder-tree li:has(> button[aria-haspopup]) > a:not(:has(> data)) {
    padding-inline-end: var(--nax-folder-tree-row);
  }

  .nax-folder-tree li:has(> button[aria-haspopup]):has(> :is(a, button):is(:hover, :focus-visible), > button[aria-expanded="true"]) > a > data {
    opacity: 0;
  }
}

.nax-folder-tree > div > p {
  margin: 0;
  padding: var(--nax-space-1) var(--nax-space-2);
  color: var(--nax-ink-text-3);
}

.nax-folder-tree > button {
  display: none;
  align-items: center;
  gap: var(--nax-space-2);
  inline-size: 100%;
  min-block-size: var(--nax-touch);
  padding: 0 var(--nax-space-3);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
  color: var(--nax-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.nax-folder-tree > button > span {
  color: var(--nax-ink-text-2);
}

.nax-folder-tree > button > strong {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-folder-tree > button > svg {
  flex-shrink: 0;
  margin-inline-start: auto;
  transition: rotate var(--nax-t);
}

.nax-folder-tree > button[aria-expanded="true"] > svg {
  rotate: 180deg;
}

@media (max-width: 768px) {
  .nax-folder-tree > button:not([hidden]) {
    display: flex;
  }

  .nax-folder-tree > button:not([hidden]) + div {
    margin-block-start: var(--nax-space-2);
  }

  .nax-folder-tree:has(> button:not([hidden])[aria-expanded="false"]) > div {
    display: none;
  }
}

/* A finger keeps the full disclosure button at every depth; deep folders
   still step in by less than a row, just past their parent's guide line. */
@media (pointer: coarse) {
  .nax-folder-tree {
    --nax-folder-tree-row: var(--nax-touch);
    --nax-folder-tree-deep-col: var(--nax-folder-tree-row);
    --nax-folder-tree-deep-step: calc(var(--nax-folder-tree-row) / 2 + var(--nax-space-2));
  }

  .nax-folder-tree li > button[aria-haspopup] {
    opacity: 1;
  }

  .nax-folder-tree header {
    min-block-size: var(--nax-touch);
  }

  .nax-folder-tree header > div {
    opacity: 1;
  }

  .nax-folder-tree header :is(a, button) {
    inline-size: var(--nax-touch);
    block-size: var(--nax-touch);
  }

  .nax-folder-tree:has(li > button[aria-haspopup]) li > a {
    padding-inline-end: var(--nax-folder-tree-row);
  }
}

/* =============================================================================
   Resizable split (ResizableSplitComponent). A grid of three: the start
   column, the handle, the rest. The start column's width is
   --nax-split-start, which the server renders at the saved width and
   resizable_split_controller.js moves; it stays within --nax-split-min and
   the lesser of --nax-split-max and --nax-split-cap (a share of the split),
   all rendered from the component, so a narrow window cannot overflow.
   The handle takes no width of its own: it straddles the line between the
   columns, drawn as that line, and widens and takes the accent under the
   pointer, on focus and while dragged (data-resizing on the split). Below
   the layout breakpoint the columns stack and the handle goes.
   ============================================================================= */
.nax-split {
  --nax-split-grip: var(--nax-space-2);
  --nax-split-line: var(--nax-ink-10);
  display: grid;
  grid-template-columns:
    clamp(var(--nax-split-min), var(--nax-split-start), min(var(--nax-split-max), var(--nax-split-cap)))
    auto minmax(0, 1fr);
}

.nax-split > [role="separator"] {
  position: relative;
  z-index: 1;
  align-self: stretch;
  inline-size: var(--nax-split-grip);
  margin-inline: calc(var(--nax-split-grip) / -2);
  cursor: col-resize;
  touch-action: none;
}

.nax-split > [role="separator"]::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(50% - var(--nax-tree-line-w) / 2);
  inline-size: var(--nax-tree-line-w);
  background: var(--nax-split-line);
  transition: background var(--nax-t), inline-size var(--nax-t), inset-inline-start var(--nax-t);
}

.nax-split > [role="separator"]:is(:hover, :focus-visible)::before,
.nax-split[data-resizing] > [role="separator"]::before {
  inset-inline-start: calc(50% - var(--nax-space-1) / 2);
  inline-size: var(--nax-space-1);
  background: var(--nax-accent);
}

.nax-split > [role="separator"]:focus-visible {
  outline: none;
}

.nax-split[data-resizing] {
  cursor: col-resize;
  user-select: none;
}

@media (max-width: 768px) {
  .nax-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .nax-split > [role="separator"] {
    display: none;
  }
}

/* Icon view (IconGridComponent) — the Finder's: tiles as wide as fit, each a
   big icon or thumbnail in a fixed box, the name centred below on up to two
   lines (its title holds it whole), the meta under that. The current tile is
   drawn as a Finder selection: a rounded tint behind the icon and the name
   in an accent pill. */
.nax-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--nax-icon-tile-w), 1fr));
  gap: var(--nax-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nax-icon-grid a {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--nax-space-1);
  block-size: 100%;
  box-sizing: border-box;
  padding: var(--nax-space-2) var(--nax-space-1);
  border-radius: var(--nax-r-lg);
  color: var(--nax-ink);
  font-size: 0.846rem;
  text-align: center;
  text-decoration: none;
  transition: background var(--nax-t);
}

.nax-icon-grid a:hover {
  background: var(--nax-ink-04);
}

/* Inset, so a scrolling pane does not clip it. */
.nax-icon-grid a:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-icon-grid a > :is(svg, img) {
  box-sizing: border-box;
  inline-size: var(--nax-icon-art);
  block-size: var(--nax-icon-art);
  border-radius: var(--nax-r-lg);
  transition: background var(--nax-t);
}

.nax-icon-grid a > svg {
  padding: calc((var(--nax-icon-art) - var(--nax-icon-glyph)) / 2);
  color: var(--nax-ink-text-2);
}

.nax-icon-grid a > svg[data-tone="accent"] {
  color: var(--nax-accent);
  fill: var(--nax-accent-lt);
}

.nax-icon-grid a > img {
  padding: var(--nax-space-1);
  border: var(--nax-tree-line-w) solid var(--nax-ink-10);
  background: var(--nax-surface);
  object-fit: contain;
}

.nax-icon-grid a > span {
  display: -webkit-box;
  max-inline-size: 100%;
  padding-inline: var(--nax-space-1);
  overflow: hidden;
  border-radius: var(--nax-r);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

.nax-icon-grid small {
  max-inline-size: 100%;
  overflow: hidden;
  font-size: 0.769rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--nax-ink-text-3);
}

.nax-icon-grid a[aria-current] > :is(svg, img) {
  background: var(--nax-ink-07);
}

.nax-icon-grid a[aria-current] > span {
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
  font-weight: 600;
}

/* ── Icon references (IconHelper#nax_icon_ref) ──────────────────────────
   A <use> of a symbol drawn once per page by nax_icon_symbols; the stroke
   rides in from here, matching lucide_icon's inline attributes. */
.nax-icon-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.nax-icon--ref {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* =============================================================================
   Sparkline (SparklineComponent)
   ============================================================================= */
/* Fills its container's width and takes its height from the view box. The
   line keeps one weight however wide it is drawn, and its color is the
   svg's, so a caller retints it with color alone. */
.nax-sparkline {
  display: block;
  inline-size: 100%;
  block-size: auto;
  overflow: visible;
  color: var(--nax-accent);
}

.nax-sparkline polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* =============================================================================
   Factor tree (FactorTreeComponent)
   ============================================================================= */
/* step: how far a value's factors sit in from it.
   mid:  a row's first line, halfway down — where its connector meets it.
   line: the connector's color. */
.nax-factor-tree {
  --nax-factor-tree-step: var(--nax-space-5);
  --nax-factor-tree-mid: calc(var(--nax-space-1) + 0.75em);
  --nax-factor-tree-line: var(--nax-ink-20);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.846rem;
}

.nax-factor-tree ul {
  margin: 0;
  padding-block: 0;
  padding-inline: var(--nax-factor-tree-step) 0;
  list-style: none;
}

/* Label on the left, figures on the right; a narrow pane wraps the label,
   never the figures. The factors take the full row beneath. */
.nax-factor-tree li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--nax-space-3);
  align-items: baseline;
  padding-block: var(--nax-space-1);
  line-height: 1.5;
}

.nax-factor-tree li > :is(a, span) {
  grid-column: 1;
  overflow-wrap: anywhere;
}

.nax-factor-tree li > strong {
  grid-column: 2;
  font-family: var(--nax-font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: end;
  white-space: nowrap;
}

.nax-factor-tree li > small {
  grid-column: 2;
  font-size: 0.769rem;
  font-variant-numeric: tabular-nums;
  text-align: end;
  white-space: nowrap;
  color: var(--nax-ink-text-3);
}

.nax-factor-tree li > ul {
  grid-column: 1 / -1;
}

/* The connector: an elbow from the parent's guide into each factor's row,
   the guide running on past every factor but the last. */
.nax-factor-tree li li::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: calc(-1 * var(--nax-factor-tree-step) + var(--nax-space-2));
  box-sizing: border-box;
  inline-size: calc(var(--nax-factor-tree-step) - var(--nax-space-3));
  block-size: var(--nax-factor-tree-mid);
  border-inline-start: var(--nax-tree-line-w) solid var(--nax-factor-tree-line);
  border-block-end: var(--nax-tree-line-w) solid var(--nax-factor-tree-line);
  border-end-start-radius: var(--nax-tree-elbow-r);
  pointer-events: none;
}

.nax-factor-tree li li:not(:last-child)::after {
  inset-block-end: 0;
  block-size: auto;
  border-block-end: 0;
  border-end-start-radius: 0;
  background: linear-gradient(var(--nax-factor-tree-line), var(--nax-factor-tree-line))
    0 calc(var(--nax-factor-tree-mid) - var(--nax-tree-line-w)) / 100% var(--nax-tree-line-w) no-repeat;
}

/* The operator joining a factor to the one before it sits on the guide
   between them. The first of a group has nothing before it to join. It is
   the ::before so a screen reader says it ahead of the factor. */
.nax-factor-tree li li + li[data-operator]::before {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: calc(-1 * var(--nax-factor-tree-step) + var(--nax-space-2));
  translate: -50% -50%;
  padding-inline: var(--nax-space-1);
  background: var(--nax-surface);
  font-size: 0.769rem;
  line-height: 1;
  color: var(--nax-ink-text-2);
}

.nax-factor-tree li li + li[data-operator="times"]::before {
  content: "×";
}

.nax-factor-tree li li + li[data-operator="divided-by"]::before {
  content: "÷";
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Spot illustrations for empty states (nax_illustration). Every colour is a
   NAX token, so they follow the theme and dark mode with no extra rules. */

.nax-illo {
  display: block;
  width: 200px;
  max-width: 60%;
  height: auto;
  margin: 0 auto 12px;
}

.nax-illo__shadow   { fill: var(--nax-ink-05); }
.nax-illo__backdrop { fill: var(--nax-accent-lt); }

.nax-illo__card {
  fill: var(--nax-surface);
  stroke: var(--nax-ink-20);
  stroke-width: 1.5;
}
.nax-illo__card--back { fill: var(--nax-canvas); }

.nax-illo__line          { fill: var(--nax-ink-20); }
.nax-illo__line--soft    { fill: var(--nax-ink-10); }

.nax-illo__avatar        { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1.5; }
.nax-illo__avatar-face   { fill: var(--nax-accent); }

.nax-illo__accent        { fill: var(--nax-accent); }
.nax-illo__accent-mark   { stroke: var(--nax-surface); fill: none; }

.nax-illo__dot           { fill: var(--nax-accent); opacity: .5; }
.nax-illo__dot--soft     { fill: var(--nax-ink-20); opacity: 1; }
.nax-illo__spark         { fill: var(--nax-amber); }

.nax-illo__awning        { fill: var(--nax-accent); }
.nax-illo__tape          { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1; }
.nax-illo__label         { fill: var(--nax-surface); stroke: var(--nax-ink-20); stroke-width: 1; }

.nax-illo__photo         { fill: var(--nax-accent-lt); }
.nax-illo__box-top       { fill: var(--nax-surface); stroke: var(--nax-accent); stroke-width: 1.5; stroke-linejoin: round; }
.nax-illo__box-side      { fill: var(--nax-accent); stroke: var(--nax-accent); stroke-width: 1.5; stroke-linejoin: round; }
.nax-illo__box-front     { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1.5; stroke-linejoin: round; }
.nax-illo__barcode       { fill: var(--nax-ink-30); }
.nax-illo__string        { stroke: var(--nax-ink-30); stroke-width: 1.5; stroke-linecap: round; }
.nax-illo__tag           { fill: var(--nax-amber); }
.nax-illo__tag-hole      { fill: var(--nax-surface); }
.nax-illo__tag-line      { fill: var(--nax-surface); opacity: .85; }

/* Item categories */
.nax-illo__folder        { fill: var(--nax-accent); }
.nax-illo__branch        { stroke: var(--nax-ink-30); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nax-illo__pill          { fill: var(--nax-ink-10); }
.nax-illo__pill--accent  { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1; }

/* Item templates */
.nax-illo__field         { fill: var(--nax-canvas); stroke: var(--nax-ink-20); stroke-width: 1; }
.nax-illo__toggle        { fill: var(--nax-accent); }
.nax-illo__toggle-knob   { fill: var(--nax-surface); }

/* Units of measure */
.nax-illo__ruler         { fill: var(--nax-amber); }
.nax-illo__ruler-ticks   { stroke: var(--nax-surface); stroke-width: 1.5; stroke-linecap: round; opacity: .85; }
.nax-illo__weight        { fill: var(--nax-accent); }
.nax-illo__weight-handle { stroke: var(--nax-accent); stroke-width: 5; stroke-linecap: round; }
.nax-illo__weight-label  { fill: var(--nax-surface); opacity: .9; }
.nax-illo__pack-dot      { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1; }

/* Tariff numbers */
.nax-illo__globe         { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1.5; }
.nax-illo__meridian      { stroke: var(--nax-accent); stroke-width: 1.2; opacity: .55; }
.nax-illo__code          { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1; }
.nax-illo__stamp         { fill: none; stroke: var(--nax-amber); stroke-width: 2.5; }
.nax-illo__stamp-mark    { stroke: var(--nax-amber); stroke-width: 2.5; }

/* The empty state that carries one: illustration, title, line, button. */
.nax-coa-empty--illustrated .nax-coa-empty__action { margin-top: 14px; }

/* Locations */
.nax-illo__route         { stroke: var(--nax-ink-30); stroke-width: 2; stroke-dasharray: 4 5; stroke-linecap: round; }
.nax-illo__roof          { fill: var(--nax-accent); }
.nax-illo__door          { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1; }
.nax-illo__door-lines    { stroke: var(--nax-accent); stroke-width: 1; opacity: .5; }
.nax-illo__window        { fill: var(--nax-accent-lt); }
.nax-illo__pin           { fill: var(--nax-amber); }
.nax-illo__pin-hole      { fill: var(--nax-surface); }

/* Departments */
.nax-illo__person        { fill: var(--nax-accent); stroke: var(--nax-surface); stroke-width: 2; }
.nax-illo__person--b     { fill: var(--nax-amber); }
.nax-illo__person--c     { fill: var(--nax-green); }

/* Dimensions */
.nax-illo__row           { fill: var(--nax-accent-lt); }
.nax-illo__chip          { fill: var(--nax-surface); stroke: var(--nax-ink-20); stroke-width: 1.5; }
.nax-illo__chip-dot      { fill: var(--nax-accent); }
.nax-illo__chip-dot--amber { fill: var(--nax-amber); }
.nax-illo__chip-dot--green { fill: var(--nax-green); }

/* Countries */
.nax-illo__land          { fill: var(--nax-accent); opacity: .35; }
.nax-illo__pole          { stroke: var(--nax-ink-30); stroke-width: 2.5; stroke-linecap: round; }
.nax-illo__flag          { fill: var(--nax-amber); }

/* Tax jurisdictions */
.nax-illo__state           { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1.5; stroke-linejoin: round; }
.nax-illo__county          { fill: var(--nax-surface); stroke: var(--nax-accent); stroke-width: 1.2; stroke-dasharray: 3 3; stroke-linejoin: round; }
.nax-illo__rule            { stroke: var(--nax-ink-20); stroke-width: 1; }
.nax-illo__total           { fill: var(--nax-accent); }
.nax-illo__accent-mark-dot { fill: var(--nax-surface); }

/* Tax settings — shared document parts */
.nax-illo__band          { fill: var(--nax-accent); }
.nax-illo__band-cover    { fill: var(--nax-accent); }
.nax-illo__line--on-band { fill: var(--nax-surface); opacity: .8; }
.nax-illo__spine         { fill: var(--nax-accent); }
.nax-illo__signature     { stroke: var(--nax-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Tax registrations */
.nax-illo__seal          { fill: var(--nax-amber); }
.nax-illo__seal-inner    { fill: none; stroke: var(--nax-surface); stroke-width: 1.5; stroke-dasharray: 2 2; }
.nax-illo__ribbon        { fill: var(--nax-amber); opacity: .75; }

/* Tax areas */
.nax-illo__tiles rect    { fill: var(--nax-canvas); stroke: var(--nax-ink-10); stroke-width: 1; }
.nax-illo__tile-picked   { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1.5; }
.nax-illo__area-outline  { stroke: var(--nax-accent); stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; }
.nax-illo__tile-label    { fill: var(--nax-accent); }

/* Channel mappings */
.nax-illo__cart          { stroke: var(--nax-ink-30); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nax-illo__cart-wheel    { fill: var(--nax-ink-30); }
.nax-illo__chip--accent  { fill: var(--nax-accent-lt); stroke: var(--nax-accent); }
.nax-illo__landmark      { fill: var(--nax-accent); opacity: .8; }
.nax-illo__link          { stroke: var(--nax-accent); stroke-width: 2; stroke-linecap: round; }
.nax-illo__link--soft    { stroke: var(--nax-ink-30); stroke-dasharray: 3 4; }
.nax-illo__link-end      { fill: var(--nax-accent); }

/* Tax liability accounts */
.nax-illo__coins         { fill: var(--nax-amber); stroke: var(--nax-surface); stroke-width: 1.2; }
.nax-illo__coin-top      { fill: var(--nax-amber); stroke: var(--nax-surface); stroke-width: 1.2; }
.nax-illo__coin          { fill: var(--nax-amber); }
.nax-illo__coin-mark     { stroke: var(--nax-surface); stroke-width: 1.8; stroke-linecap: round; }

/* Tax groups */
.nax-illo__shirt         { fill: var(--nax-accent); opacity: .85; }
.nax-illo__apple         { fill: var(--nax-green); stroke: var(--nax-green); stroke-width: 1.2; stroke-linecap: round; }

/* Exemption certificates */
.nax-illo__shield        { fill: var(--nax-green); }
.nax-illo__shield-mark   { stroke: var(--nax-surface); stroke-width: 3; }
.nax-illo__shield-mark--accent { stroke: var(--nax-green); }

/* Setup reviews */
.nax-illo__ring          { fill: var(--nax-ink-30); }
.nax-illo__days rect     { fill: var(--nax-canvas); }
.nax-illo__day-marked    { fill: var(--nax-amber); }
.nax-illo__lens          { fill: var(--nax-surface); fill-opacity: .85; stroke: var(--nax-accent); stroke-width: 4; }
.nax-illo__lens-handle   { stroke: var(--nax-accent); stroke-width: 6; stroke-linecap: round; }

/* All caught up */
.nax-illo__clip          { fill: var(--nax-ink-30); }
.nax-illo__check-dot     { fill: var(--nax-green); }
.nax-illo__check-mark    { stroke: var(--nax-surface); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nax-illo__check-mark--big { stroke-width: 3.5; }
.nax-illo__badge-ok      { fill: var(--nax-green); }
.nax-illo__confetti rect:nth-child(odd)  { fill: var(--nax-amber); }
.nax-illo__confetti rect:nth-child(even) { fill: var(--nax-accent); }

/* Payment methods */
.nax-illo__note             { fill: var(--nax-green); }
.nax-illo__note-seal        { fill: var(--nax-surface); fill-opacity: .25; }
.nax-illo__note-dot         { fill: var(--nax-surface); fill-opacity: .35; }
.nax-illo__pay-card         { fill: var(--nax-accent); }
.nax-illo__pay-card-chip    { fill: var(--nax-amber); }
.nax-illo__pay-card-line    { fill: var(--nax-surface); fill-opacity: .6; }
.nax-illo__pay-card-ring    { fill: var(--nax-amber); fill-opacity: .9; }
.nax-illo__pay-card-ring--b { fill: var(--nax-surface); fill-opacity: .6; }

/* Bank accounts */
.nax-illo__bank-roof       { fill: var(--nax-accent); }
.nax-illo__bank-medallion  { fill: var(--nax-amber); }
.nax-illo__bank-beam       { fill: var(--nax-accent); opacity: .85; }
.nax-illo__bank-column     { fill: var(--nax-surface); stroke: var(--nax-accent); stroke-width: 1.5; }
.nax-illo__pending-dot     { fill: none; stroke: var(--nax-amber); stroke-width: 2; stroke-dasharray: 3 2; }

/* Payment terms */
.nax-illo__due-ring        { fill: none; stroke: var(--nax-amber); stroke-width: 2; }
.nax-illo__tag             { fill: var(--nax-amber); }
.nax-illo__tag-mark-dot    { fill: var(--nax-surface); }
.nax-illo__tag-mark        { stroke: var(--nax-surface); stroke-width: 2; stroke-linecap: round; }

/* General journal */
.nax-illo__col-debit       { fill: var(--nax-accent); }
.nax-illo__col-credit      { fill: var(--nax-amber); }
.nax-illo__draft-cell      { fill: var(--nax-surface); stroke: var(--nax-accent); stroke-width: 1.5; }
.nax-illo__pen             { fill: var(--nax-accent); }
.nax-illo__pen-cap         { fill: var(--nax-ink-30); }
.nax-illo__pen-tip         { fill: var(--nax-amber); }
.nax-illo__scale-post      { stroke: var(--nax-ink-30); stroke-width: 3; stroke-linecap: round; }
.nax-illo__scale-beam      { stroke: var(--nax-accent); stroke-width: 3; stroke-linecap: round; }
.nax-illo__scale-pivot     { fill: var(--nax-accent); }
.nax-illo__scale-string    { stroke: var(--nax-ink-30); stroke-width: 1.2; }
.nax-illo__scale-pan--debit  { fill: var(--nax-accent); }
.nax-illo__scale-pan--credit { fill: var(--nax-amber); }

/* Posted journals */
.nax-illo__posted-stamp           { fill: var(--nax-green); }
.nax-illo__posted-stamp-inner     { fill: none; stroke: var(--nax-surface); stroke-width: 1.2; stroke-dasharray: 3 2; }
.nax-illo__posted-stamp-mark      { stroke: var(--nax-surface); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nax-illo__posted-stamp-line      { fill: var(--nax-surface); opacity: .8; }
.nax-illo__lock-body       { fill: var(--nax-accent); }
.nax-illo__lock-shackle    { stroke: var(--nax-ink-30); stroke-width: 5; stroke-linecap: round; }
.nax-illo__lock-hole       { fill: var(--nax-surface); }

/* Files: empty folder, library, search, pinned, recent */
.nax-illo__folder-back     { fill: var(--nax-accent); opacity: .55; }
.nax-illo__sticker         { fill: var(--nax-surface); opacity: .85; }
.nax-illo__page-fold       { fill: var(--nax-ink-10); stroke: var(--nax-ink-20); stroke-width: 1.5; stroke-linejoin: round; }
.nax-illo__drop-trail      { stroke: var(--nax-accent); stroke-width: 2; stroke-linecap: round; opacity: .45; }
.nax-illo__binder          { fill: var(--nax-accent); }
.nax-illo__binder--amber   { fill: var(--nax-amber); }
.nax-illo__binder--soft    { fill: var(--nax-accent-lt); stroke: var(--nax-accent); stroke-width: 1.5; }
.nax-illo__shelf           { fill: var(--nax-ink-20); }
.nax-illo__handle          { fill: var(--nax-ink-30); }
.nax-illo__slot-empty      { fill: none; stroke: var(--nax-ink-20); stroke-width: 1.5; stroke-dasharray: 4 3; }
.nax-illo__miss-mark       { stroke: var(--nax-ink-30); stroke-width: 3; stroke-linecap: round; }
.nax-illo__pushpin-head    { fill: var(--nax-accent); }
.nax-illo__pushpin-collar  { fill: var(--nax-accent); opacity: .7; }
.nax-illo__pushpin-shine   { fill: var(--nax-surface); opacity: .45; }
.nax-illo__pushpin-needle  { stroke: var(--nax-ink-30); stroke-width: 2.5; stroke-linecap: round; }
.nax-illo__clock-face      { fill: var(--nax-surface); stroke: var(--nax-accent); stroke-width: 4; }
.nax-illo__clock-tick      { stroke: var(--nax-ink-30); stroke-width: 2; stroke-linecap: round; }
.nax-illo__clock-hand      { stroke: var(--nax-accent); stroke-width: 3.5; stroke-linecap: round; }
.nax-illo__history         { fill: none; stroke: var(--nax-amber); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   12. Utilities
   ============================================================================= */

.nax-flex {
  display: flex;
}

.nax-flex-col {
  display: flex;
  flex-direction: column;
}

.nax-inline-flex {
  display: inline-flex;
}

/* A button_to form that should not break the flow it sits in */
.nax-inline-form {
  display: inline;
}

.nax-grid {
  display: grid;
}

.nax-hidden {
  display: none !important;
}

.nax-block {
  display: block;
}

.nax-items-center {
  align-items: center;
}

.nax-items-start {
  align-items: flex-start;
}

.nax-items-end {
  align-items: flex-end;
}

.nax-justify-between {
  justify-content: space-between;
}

.nax-justify-end {
  justify-content: flex-end;
}

.nax-justify-center {
  justify-content: center;
}

.nax-flex-1 {
  flex: 1;
}

.nax-flex-wrap {
  flex-wrap: wrap;
}

.nax-gap-1 {
  gap: 4px;
}

.nax-gap-2 {
  gap: 8px;
}

.nax-gap-3 {
  gap: 12px;
}

.nax-gap-4 {
  gap: 16px;
}

.nax-gap-6 {
  gap: 24px;
}

.nax-shrink-0 {
  flex-shrink: 0;
}

.nax-min-w-0 {
  min-width: 0;
}

.nax-mt-1 {
  margin-top: 4px;
}

.nax-mt-2 {
  margin-top: 8px;
}

.nax-mt-3 {
  margin-top: 12px;
}

.nax-mt-4 {
  margin-top: 16px;
}

.nax-mt-5 {
  margin-top: 20px;
}

.nax-mt-6 {
  margin-top: 24px;
}

.nax-mb-1 {
  margin-bottom: 4px;
}

.nax-mb-2 {
  margin-bottom: 8px;
}

.nax-mb-3 {
  margin-bottom: 12px;
}

.nax-mb-4 {
  margin-bottom: 16px;
}

.nax-mb-5 {
  margin-bottom: 20px;
}

.nax-mb-6 {
  margin-bottom: 24px;
}

.nax-ml-auto {
  margin-left: auto;
}

.nax-mr-auto {
  margin-right: auto;
}

.nax-p-0 {
  padding: 0;
}

.nax-p-2 {
  padding: 8px;
}

.nax-p-3 {
  padding: 12px;
}

.nax-p-4 {
  padding: 16px;
}

.nax-px-3 {
  padding-left: 12px;
  padding-right: 12px;
}

.nax-py-2 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.nax-font-medium {
  font-weight: 500;
}

.nax-font-semi {
  font-weight: 600;
}

.nax-font-bold {
  font-weight: 700;
}

.nax-text-xs {
  font-size: 0.692rem;
}

.nax-text-sm {
  font-size: 0.769rem;
}

.nax-text-base {
  font-size: 0.846rem;
}

.nax-text-lg {
  font-size: 1rem;
}

.nax-text-right {
  text-align: right;
}

.nax-text-center {
  text-align: center;
}

.nax-nowrap {
  white-space: nowrap;
}

.nax-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-color-ink {
  color: var(--nax-ink);
}

.nax-color-muted {
  color: var(--nax-ink-text-2);
}

/* Fainter than muted — decorative/placeholder text */
.nax-color-faint {
  color: var(--nax-ink-30);
}

.nax-color-accent {
  color: var(--nax-accent);
}

.nax-color-success {
  color: var(--nax-green-text);
}

.nax-color-danger {
  color: var(--nax-red-text);
}

.nax-color-warning {
  color: var(--nax-amber-text);
}

.nax-bg-surface {
  background: var(--nax-surface);
}

.nax-bg-canvas {
  background: var(--nax-canvas);
}

.nax-bg-accent {
  background: var(--nax-accent-lt);
}

.nax-bg-success {
  background: var(--nax-green-bg);
}

.nax-bg-danger {
  background: var(--nax-red-bg);
}

.nax-bg-warning {
  background: var(--nax-amber-bg);
}

.nax-border {
  border: 1px solid var(--nax-ink-10);
}

.nax-border-b {
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-border-t {
  border-top: 1px solid var(--nax-ink-10);
}

.nax-rounded {
  border-radius: var(--nax-r);
}

.nax-rounded-sm {
  border-radius: var(--nax-r-sm);
}

.nax-rounded-full {
  border-radius: 9999px;
}

.nax-overflow-hidden {
  overflow: hidden;
}

.nax-overflow-auto {
  overflow: auto;
}

.nax-show-mobile {
  display: none !important;
}


/* =============================================================================
   Money — tabular numerals, right-aligned by default, sign-coloured
   ============================================================================= */
.nax-money {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: right;
  white-space: nowrap;
  color: var(--nax-ink);
}

.nax-money-large  { font-size: 1.077rem; font-weight: 600; letter-spacing: -.01em; }
.nax-money-small  { font-size: 0.769rem; }

.nax-money-negative { color: var(--nax-red-text); }
.nax-money-zero     { color: var(--nax-ink-text-2); }

td .nax-money, th .nax-money { display: block; }


/* =============================================================================
   Visually hidden — accessible to assistive tech, invisible on screen
   ============================================================================= */
.nax-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   19. Animations
   ============================================================================= */

@keyframes nax-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes nax-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   20. Responsive & Print
   ============================================================================= */

@media (max-width: 1200px) {
  .nax-coa-sidebar {
    width: 180px;
  }
}

@media (max-width: 992px) {
  .nax-coa-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .nax-hide-mobile {
    display: none !important;
  }

  .nax-show-mobile {
    display: flex !important;
  }

  .nax-sidebar {
    transform: translateX(-100%);
    transition: transform var(--nax-t-med);
  }

  .nax-sidebar.is-open {
    transform: translateX(0);
  }

  .nax-main {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .nax-rail {
    display: none;
  }

  .nax-topbar-logo {
    width: auto;
    border-right: none;
  }
}

@media print {

  .nax-coa-sidebar,
  .nax-coa-toolbar__actions,
  .nax-coa-col--actions {
    display: none !important;
  }

  .nax-coa-table tbody tr {
    border-bottom: 1px solid #ddd;
  }

  .nax-coa-table thead th {
    background: #f5f5f5 !important;
    height: 32px;
  }
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   22. NubocAxis — Universal Page Bar  (nax-bar)
   ============================================================================= */

.nax-bar {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  background: var(--nax-surface);
  border-bottom: 1px solid var(--nax-ink-10);
  gap: 8px;
  flex-shrink: 0;
  position: sticky;
  top: 36px;
  /* below context nav */
  z-index: 9;
}

/* Label */
.nax-bar__label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nax-bar__label-text {
  font-size: 0.769rem;
  font-weight: 600;
  color: var(--nax-ink-70);
}

.nax-bar__filter-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 8px;
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-size: 0.692rem;
  font-weight: 500;
  color: var(--nax-ink-70);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-bar__filter-pill:hover {
  background: var(--nax-ink-10);
}

/* Divider between label and actions */
.nax-bar__label::after {
  content: '';
  display: block;
  width: 1px;
  height: 16px;
  background: var(--nax-ink-10);
  margin-left: 8px;
}

/* Actions */
.nax-bar__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

/* Action button */
.nax-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  font-size: 0.769rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-70);
  background: transparent;
  border: none;
  border-radius: var(--nax-r-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--nax-t), color var(--nax-t);
}

.nax-bar__btn:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-bar__btn--primary {
  color: var(--nax-accent);
  font-weight: 600;
}

.nax-bar__btn--primary:hover {
  background: var(--nax-accent-dim);
  color: var(--nax-accent-dark);
}

.nax-bar__btn--danger:hover {
  background: var(--nax-red-bg);
  color: var(--nax-red-text);
}

/* Dropdown group button */
.nax-bar__btn--group {
  gap: 3px;
}

.nax-bar__btn--group svg:last-child {
  color: var(--nax-ink-text-2);
}

/* Separator */
.nax-bar__sep {
  width: 1px;
  height: 16px;
  background: var(--nax-ink-10);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Icon buttons — right side */
.nax-bar__icons {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-left: auto;
  flex-shrink: 0;
}

.nax-bar__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--nax-ink-text-2);
  border-radius: var(--nax-r-sm);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-bar__icon-btn:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

.nax-bar__icon-btn.is-active {
  color: var(--nax-accent);
  background: var(--nax-accent-dim);
}

/* NubocAxis — shell chrome (topbar entity switcher, app launcher,
   user menu, command palette, settings hub workspace) */
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   13. Entity Switcher
   ============================================================================= */

.nax-entity-switcher {
  position: relative;
  padding: 8px 10px;
  border-bottom: 1px solid var(--nax-ink-08);
}

.nax-entity-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  background: var(--nax-ink-04);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r);
  cursor: pointer;
  transition: background 0.15s;
}

.nax-entity-switcher-trigger:hover {
  background: var(--nax-ink-07);
}

.nax-entity-switcher-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--nax-r-sm);
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nax-entity-switcher-label {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.nax-entity-switcher-hint {
  display: block;
  font-size: 0.615rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nax-ink-text-2);
  line-height: 1;
  margin-bottom: 2px;
}

.nax-entity-switcher-name {
  display: block;
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.nax-entity-switcher-caret {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-entity-switcher-dropdown {
  display: none;
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% - 4px);
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .10);
  z-index: var(--nax-z-topbar);
  overflow: hidden;
}

.nax-entity-switcher-dropdown.is-open {
  display: block;
}

.nax-entity-switcher-dropdown-label {
  padding: 8px 12px 4px;
  font-size: 0.641rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
}

.nax-entity-switcher-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.769rem;
  color: var(--nax-ink);
  text-align: left;
  transition: background 0.1s;
}

.nax-entity-switcher-item:hover {
  background: var(--nax-ink-04);
}

.nax-entity-switcher-item.is-active {
  color: var(--nax-accent);
  font-weight: 500;
}

.nax-entity-switcher-item.is-active .nax-entity-switcher-item-icon {
  color: var(--nax-accent);
}

.nax-entity-switcher-item-icon {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-entity-switcher-item-check {
  color: var(--nax-accent);
  margin-left: auto;
}

/* Entity orb — the small identity dot next to an entity name. Color comes
   from --orb-color (set inline per entity, hue hashed from the entity id);
   without it the dot falls back to the accent. */
.nax-entity-orb {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orb-color, var(--nax-accent));
  flex-shrink: 0;
}

.nax-entity-orb-sm {
  width: 6px;
  height: 6px;
}

/* NubocCore — organization & entity management */
/* © 2026 Nuboc IP LLC. All rights reserved.
 *
 * Environment management and the non-production marker.
 *
 * The colour logic is the whole design here: production is silent, sandbox is
 * amber, training is a distinct accent. Nothing about being in production
 * should draw the eye — it is the expected state. Everything about NOT being
 * in production should.
 */

/* ── Non-production marker in the topbar ───────────────────────── */
.nax-env-flag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    margin-left: 10px;
    border-radius: 3px;
    font-family: var(--nax-font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nax-env-flag--sandbox {
    background: var(--nax-amber);
    color: var(--nax-chrome);
}

/* Training is deliberately NOT amber. Sandbox means "careful, this mirrors
 * something real"; training means "nothing here is real at all". Two different
 * warnings deserve two different colours. */
.nax-env-flag--training {
    background: var(--nax-accent);
    color: #fff;
}

/* ── Environment rows ──────────────────────────────────────────── */
.nax-env {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--nax-ink-06);
}
.nax-env:last-child { border-bottom: none; }

.nax-env.is-current {
    background: var(--nax-ink-03);
    box-shadow: inset 2px 0 0 var(--nax-accent);
}

.nax-env__main { min-width: 0; }

.nax-env__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nax-env__name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nax-ink);
}

.nax-env__type {
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--nax-ink-08);
    color: var(--nax-ink-70);
}
.nax-env__type--sandbox  { background: rgba(var(--nax-amber-rgb), .18); color: var(--nax-amber-text); }
.nax-env__type--training { background: var(--nax-accent-lt);            color: var(--nax-accent); }

.nax-env__here {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--nax-accent);
}

.nax-env__status {
    font-size: 0.72rem;
    color: var(--nax-ink-text-2);
}

.nax-env__meta {
    margin-top: 3px;
    font-size: 0.769rem;
    color: var(--nax-ink-text-2);
}

.nax-env__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .nax-env { flex-direction: column; align-items: flex-start; }
    .nax-env__actions { width: 100%; }
}

/* The Outbox (nuboc_mailer/outbox): a kept message as it would have looked,
   in a sandboxed frame, and its plain text. */
.nax-outbox-frame {
  display: block;
  width: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
}

.nax-outbox-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--nax-font-mono);
  font-size: 0.8125rem;
  color: var(--nax-ink-text-2);
}

/* ── Sandbox and training banner (nuboc_axis/shared/_environment_banner) ─
   Full width under the top bar: amber for a sandbox, which mirrors
   something real; the accent for training, where nothing is real. */
.nax-env-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--nax-chrome);
  background: var(--nax-amber);
}

.nax-env-banner--training {
  color: #fff;
  background: var(--nax-accent);
}

.nax-env-banner__what { font-weight: 600; }
.nax-env-banner__note { opacity: .85; }
.nax-env-banner__spacer { flex: 1; }
.nax-env-banner__form { display: inline; margin: 0; }

.nax-env-banner__link,
.nax-env-banner__button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

/* Printed from a sandbox or training environment, every page says so
   (NubocCore::ExportStamp's words), above whatever is printed. */
@media print {
  body.nax-env-sandbox::before,
  body.nax-env-training::before {
    display: block;
    margin: 0 0 8pt;
    padding: 4pt 0;
    border-bottom: 1pt solid #000;
    font: 600 10pt/1.3 var(--nax-font-mono);
    letter-spacing: .08em;
    color: #000;
  }

  body.nax-env-sandbox::before  { content: "SANDBOX: test data, not the books of record"; }
  body.nax-env-training::before { content: "TRAINING: not the books of record"; }

  .nax-env-banner { display: none; }
}

/* ── Environment switcher in the top bar (shared/topbar) ──────────
   The entity switcher's dropdown; its items are forms (they post to
   activate), so the form gets out of the way and the button fills the row,
   with a dot in the environment's colour. */
.nax-env-switcher-form { margin: 0; }
.nax-env-switcher-form .nax-entity-switcher-item {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nax-env-switcher-type {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nax-ink-30);
  flex: none;
}
.nax-env-switcher-type--sandbox  { background: var(--nax-amber); }
.nax-env-switcher-type--training { background: var(--nax-accent); }

/* ── A DNS record to publish (settings/domains/_dns_record, _copyable) ── */
.nax-dns-records { display: flex; flex-direction: column; gap: 12px; }
.nax-dns-record { border: 1px solid var(--nax-ink-10); border-radius: var(--nax-r); background: var(--nax-surface); }
.nax-dns-record__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-07);
}
.nax-dns-record__title { font-size: 0.923rem; font-weight: 600; color: var(--nax-ink); }
.nax-dns-record__fields {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  margin: 0;
  padding: 12px 14px;
}
.nax-dns-record__fields dt { font-size: 0.846rem; color: var(--nax-ink-text-2); }
.nax-dns-record__fields dd { margin: 0; min-width: 0; }
.nax-dns-record__type { font-family: var(--nax-font-mono); font-size: 0.846rem; color: var(--nax-ink); }
.nax-dns-note { margin: 12px 0 0; font-size: 0.846rem; color: var(--nax-ink-text-2); }

.nax-copyable { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nax-copyable__value {
  flex: 0 1 auto;
  min-width: 0;
  padding: 5px 10px;
  border-radius: var(--nax-r-sm);
  background: var(--nax-ink-05);
  font-family: var(--nax-font-mono);
  font-size: 0.846rem;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nax-copyable__button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 5px 8px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  background: var(--nax-surface);
  font: inherit;
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  cursor: pointer;
}
.nax-copyable__button:hover { color: var(--nax-ink); border-color: var(--nax-ink-20); }
.nax-copyable__button:focus-visible { outline: 2px solid var(--nax-accent); outline-offset: 1px; }
.nax-copyable__status { flex-shrink: 0; font-size: 0.769rem; color: var(--nax-ink-text-2); }

/* ── Sending from a domain (nuboc_mailer/sending_domains/show) ── */
.nax-send-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--nax-ink-10); border-radius: var(--nax-r); }
.nax-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 14px;
}
.nax-send-row + .nax-send-row { border-top: 1px solid var(--nax-ink-07); }
.nax-send-row__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nax-send-row__name { font-size: 0.923rem; font-weight: 600; color: var(--nax-ink); }
.nax-send-row__email { font-size: 0.846rem; color: var(--nax-ink-text-2); overflow-wrap: anywhere; }
.nax-send-row__actions { display: flex; gap: 6px; flex-shrink: 0; }
.nax-send-row__actions form { margin: 0; }

.nax-send-add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.nax-send-add > summary::-webkit-details-marker { display: none; }
.nax-send-add[open] > summary { display: none; }
.nax-send-add__form { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.nax-send-add__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  width: 100%;
}
.nax-send-add__fields .nax-field { margin: 0; }
.nax-send-add__address { display: flex; align-items: stretch; }
.nax-send-add__address .nax-input { min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nax-send-add__domain {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--nax-ink-20);
  border-left: 0;
  border-radius: 0 var(--nax-r-sm) var(--nax-r-sm) 0;
  background: var(--nax-ink-05);
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  white-space: nowrap;
}

.nax-send-companies { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.nax-send-companies__choice { display: flex; align-items: center; gap: 8px; font-size: 0.923rem; color: var(--nax-ink); }
.nax-send-companies__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 16px;
  margin: 2px 0 0 24px;
  padding: 10px 12px;
  border: 1px solid var(--nax-ink-07);
  border-radius: var(--nax-r);
  transition: opacity var(--nax-t, 130ms) ease;
}
.nax-send-companies:has(input[value="all"]:checked) .nax-send-companies__grid { opacity: 0.45; }
.nax-send-companies__company { display: flex; align-items: center; gap: 8px; font-size: 0.846rem; color: var(--nax-ink); }
.nax-send-companies__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.nax-send-companies__foot .nax-help-text { margin: 0; }

/* ── A company's sending address (nuboc_mailer/company_senders/show) ── */
.nax-sender-choices { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.nax-sender-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
  cursor: pointer;
}
.nax-sender-choice:has(input:checked) { border-color: var(--nax-accent); box-shadow: 0 0 0 1px var(--nax-accent); }
.nax-sender-choice input { margin-top: 3px; }
.nax-sender-choice__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nax-sender-choice__name { font-size: 0.923rem; font-weight: 600; color: var(--nax-ink); }
.nax-sender-choice__email { font-size: 0.846rem; color: var(--nax-ink-text-2); overflow-wrap: anywhere; }
.nax-sender-choice__note { font-size: 0.769rem; color: var(--nax-ink-text-2); }

/* NubocStorage — Files page */
/* © 2026 Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Files page. The card holds the folder tree beside the list; below the
   layout breakpoint the tree stacks above it, folded behind its Location
   button. A side tree beside a list is a shape other pages will want — when
   a second one does, this belongs in NAX.
   ============================================================================= */
/* The frame the tree's links load into: the tree and the list together. */
.file-browser {
  display: block;
  margin-block-start: var(--nax-space-3);
}

/* The tree's width is the split's (ResizableSplitComponent); its handle
   draws the line beside it. */
.file-library > nav {
  padding: var(--nax-space-2);
}

.file-library > section {
  min-inline-size: 0;
  container: file-list / inline-size;
}

/* The list gives way as it narrows — beside the open drawer, on a small
   window — rather than clip: the record number goes first, then who filed
   it, keeping the name, status, date and size. A long name wraps to two
   lines, then trails off; its full name is the drawer's heading. */
@container file-list (max-width: 46rem) {
  .file-library .file-list-record {
    display: none;
  }
}

@container file-list (max-width: 38rem) {
  .file-library .file-list-source {
    display: none;
  }
}

.file-library td[data-grow] > a {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* A pinned folder's icon sits on the line of its name. */
.file-library td[data-grow] > a > svg {
  vertical-align: text-bottom;
}

/* The place the list shows: its name, where it sits and who sees it, with
   its ⋯ menu at the end of the first line. */
.file-place {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--nax-space-1) var(--nax-space-2);
  padding: var(--nax-space-3) var(--nax-space-4) var(--nax-space-2);
}

.file-place > h2,
.file-place > p {
  grid-column: 1;
  margin: 0;
}

.file-place > h2 {
  font-size: 1rem;
}

.file-place > p {
  color: var(--nax-ink-text-2);
  font-size: 0.769rem;
}

.file-place > button {
  grid-column: 2;
  grid-row: 1;
}

/* A folder's header is the list's first row: chosen, it says so. */
.file-place[aria-current="true"] {
  background: var(--nax-accent-lt);
}

.file-place > h2 > a {
  color: inherit;
  text-decoration: none;
}

.file-place > h2 > a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .file-library > nav {
    border-block-end: 1px solid var(--nax-ink-10);
  }
}

/* An empty list's next steps: Upload and New folder, side by side. */
.file-empty-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--nax-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The empty state's own list rule (li + li gets a top margin, for numbered
   steps) would push the second button down. */
.nax-empty-state-body .file-empty-actions > li {
  margin: 0;
}

/* "Where files come from": folded under the list until asked for. */
.file-sources {
  margin-block-start: var(--nax-space-3);
  overflow: hidden;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  font-size: 0.846rem;
}

.file-sources summary {
  padding: var(--nax-space-2) var(--nax-space-4);
  color: var(--nax-ink-text-2);
  font-size: 0.769rem;
  font-weight: 600;
  cursor: pointer;
}

.file-sources summary:hover {
  color: var(--nax-ink);
}

.file-sources summary:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.file-sources p {
  margin: 0;
  padding: 0 var(--nax-space-4) var(--nax-space-2);
  color: var(--nax-ink-text-3);
  font-size: 0.769rem;
}

.file-sources .nax-table-wrap {
  border: 0;
  border-block-start: 1px solid var(--nax-ink-08);
  border-radius: 0;
}

/* =============================================================================
   The forms in the page's popovers: a new folder, an upload, a move. The
   form sets its own width rather than leave it to the popover, which sizes
   to its content: a full-width field inside it would otherwise stretch it
   to the edge of the window.
   ============================================================================= */
.file-form {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-2);
  inline-size: 22rem;
  max-inline-size: calc(100vw - 4 * var(--nax-space-3));
  padding: var(--nax-space-1) var(--nax-space-3) var(--nax-space-3);
  font-size: 0.846rem;
}

.file-form .nax-label {
  margin: 0;
}

.file-form p:not(.nax-field-error) {
  margin: 0;
  color: var(--nax-ink-text-3);
  font-size: 0.769rem;
}

.file-form [type="submit"] {
  align-self: flex-end;
}

/* Who sees a folder or file: one quiet line, under the place the list
   shows, and beneath the place a new folder or file goes. */
.file-visibility {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
  margin: 0;
  color: var(--nax-ink-text-3);
  font-size: 0.769rem;
}

.file-visibility > svg {
  flex: none;
}

/* The file field is the drop zone: a file dropped anywhere on it is chosen,
   with no script. Its own button and the chosen file's name show inside. */
.file-upload > label {
  display: grid;
  gap: var(--nax-space-1);
  color: var(--nax-ink-text-2);
}

.file-upload [type="file"] {
  inline-size: 100%;
  padding: var(--nax-space-5) var(--nax-space-3);
  border: 1px dashed var(--nax-ink-30);
  border-radius: var(--nax-r);
  background: var(--nax-ink-03);
  color: var(--nax-ink-text-2);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--nax-t), background var(--nax-t);
}

.file-upload [type="file"]:hover {
  border-color: var(--nax-accent);
  background: var(--nax-accent-lt);
}

.file-upload [type="file"]:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 2px;
}

.file-upload [type="file"]::file-selector-button {
  block-size: var(--nax-control-sm);
  margin-inline-end: var(--nax-space-2);
  padding: 0 var(--nax-space-3);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  background: var(--nax-surface);
  color: var(--nax-ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

/* The camera, offered only where the pointer is a finger. */
.file-upload > label:has(> [capture]) {
  display: none;
}

.file-upload [capture] {
  padding: 0;
  border: 0;
  background: none;
}

@media (pointer: coarse) {
  .file-upload > label:has(> [capture]) {
    display: grid;
  }
}

/* A popover's part that loads when first opened, and its notes. */
.file-frame {
  display: block;
}

.file-frame > p,
.file-shares ~ p {
  margin: 0;
  padding: var(--nax-space-2) var(--nax-space-3);
  max-inline-size: 28rem;
}

/* The share list: a row per sister company — its name, how much it may do
   and its Save button. */
.nax-popover .file-shares {
  inline-size: 28rem;
  max-inline-size: calc(100vw - 4 * var(--nax-space-3));
  padding: 0 var(--nax-space-3);
  font-size: 0.846rem;
}

.file-shares li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-2);
  padding-block: var(--nax-space-2);
  border-block-end: 1px solid var(--nax-ink-08);
}

.file-shares form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 10.5rem auto;
  align-items: center;
  gap: var(--nax-space-2);
}

/* A company's name labels its select; it is not a choice row of its own. */
.nax-popover .file-shares li label,
.nax-popover .file-shares li label:hover {
  display: block;
  inline-size: auto;
  min-block-size: 0;
  padding: 0;
  overflow: hidden;
  background: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}

/* What the company shares out: each folder or file, and with whom. */
.nax-popover .file-shares-out {
  inline-size: 24rem;
  max-inline-size: calc(100vw - 4 * var(--nax-space-3));
  padding: 0 var(--nax-space-3) var(--nax-space-2);
  font-size: 0.846rem;
}

.file-shares-out li {
  padding-block: var(--nax-space-1);
}

.file-shares-out p {
  margin: 0;
  color: var(--nax-ink-text-2);
  font-size: 0.769rem;
}

/* The drawer's file details: actions in a row, sections spaced apart. */
.file-details {
  display: grid;
  gap: var(--nax-space-4);
}

.file-details menu {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nax-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A file's own page: its document filling the window, its record in a
   column beside it that scrolls on its own. Narrow, the record follows
   the document down the page. */
.file-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--nax-record-aside-w);
  gap: var(--nax-space-4);
  min-block-size: 0;
}

.file-record > .file-details {
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 960px) {
  .nax-workspace:has(> .file-record) {
    block-size: auto;
  }

  .file-record {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(var(--nax-workspace-min-h), auto) auto;
  }
}

/* A document filling its box — the full-screen preview page's, a file
   page's left column: the inline PDF viewer, a spreadsheet's grid scrolling
   inside it, a picture fitted to it. Under the crumb bar alone, the page
   has no header for its workspace to leave room for. */
.nax-workspace:has(> :is(.file-document, .file-record)) {
  --nax-workspace-offset: var(--nax-workspace-offset-crumbs);
}

.file-document,
.file-document > turbo-frame {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-block-size: 0;
}

.file-document .nax-document-preview {
  min-block-size: 0;
  overflow: auto;
}

.file-document > img,
.file-document .nax-document-preview > img {
  max-inline-size: 100%;
  max-block-size: 100%;
  place-self: center;
  object-fit: contain;
}

.file-document .file-grid-preview {
  grid-template-rows: minmax(0, 1fr);
}

.file-document .file-grid-preview .nax-table-wrap--fill {
  max-block-size: none;
}

/* In the drawer, a grid is a window of its first dozen rows or so; "Open
   full size" shows the rest. */
.nax-detail-drawer .file-grid-preview .nax-table-wrap--fill {
  max-block-size: var(--nax-preview-window-h);
}

/* A drawn page that opens the PDF viewer. */
.nax-document-preview figure[data-action] {
  cursor: zoom-in;
}

/* A spreadsheet's grid preview: its sheet tabs, the sheet's first rows
   under their header row, what was left out, and the file's links. */
.file-grid-preview {
  display: grid;
  gap: var(--nax-space-2);
  min-inline-size: 0;
}

.file-grid-preview p,
.file-grid-preview footer {
  margin: 0;
  color: var(--nax-ink-text-2);
}

/* The column letters over each heading, and the row numbers down the
   gutter, quiet as a spreadsheet's. The gutter and the first column both
   hold still while the rest scrolls sideways, the first column just past
   the gutter. */
.file-grid-preview thead small {
  display: block;
  color: var(--nax-ink-text-3);
  font-family: var(--nax-font-mono);
  font-weight: 500;
}

.file-grid-preview .file-grid-row {
  inline-size: var(--nax-grid-gutter-w);
  min-inline-size: var(--nax-grid-gutter-w);
  max-inline-size: var(--nax-grid-gutter-w);
  box-sizing: border-box;
  padding-inline: var(--nax-space-2);
  color: var(--nax-ink-text-3);
  font-family: var(--nax-font-mono);
  text-align: end;
}

.file-grid-preview .file-grid-row + [data-pinned] {
  inset-inline-start: var(--nax-grid-gutter-w);
}

/* The sheets in tabs under the grid, as a spreadsheet keeps them. */
.file-grid-preview > .nax-tabs {
  border-block-start: 1px solid var(--nax-ink-10);
  border-block-end: 0;
}

.file-grid-preview footer {
  display: flex;
  align-items: baseline;
  gap: var(--nax-space-3);
  overflow-wrap: anywhere;
}

.file-grid-preview footer span {
  margin-inline-end: auto;
}

/* The drawer's folder details: its name to change, what is in it, who sees
   it, where it can go. */
.folder-rename {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-2);
}

.folder-rename > label,
.folder-rename > p {
  grid-column: 1 / -1;
  margin: 0;
}

.folder-details h4 {
  margin: 0 0 var(--nax-space-2);
}

.folder-details .file-shares,
.folder-details .file-shares-out {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.846rem;
}

.folder-details .file-form {
  inline-size: auto;
  padding: 0;
}

/* What is in a folder: a half-circle gauge of its bytes by kind, the total
   in its middle, and the table that says the same in words. Each kind
   keeps its colour in both. */
.folder-gauge {
  margin: 0 auto var(--nax-space-2);
  max-inline-size: 14rem;
}

.folder-gauge path {
  fill: none;
  stroke: var(--nax-ink-08);
  stroke-width: 12;
}

.folder-gauge text {
  fill: var(--nax-ink);
  font-family: var(--nax-font-mono);
  font-size: 0.65rem;
  text-anchor: middle;
}

.folder-gauge [data-kind="documents"],
.folder-kinds [data-kind="documents"]::before {
  stroke: var(--nax-accent);
  background: var(--nax-accent);
}

.folder-gauge [data-kind="images"],
.folder-kinds [data-kind="images"]::before {
  stroke: var(--nax-blue);
  background: var(--nax-blue);
}

.folder-gauge [data-kind="spreadsheets"],
.folder-kinds [data-kind="spreadsheets"]::before {
  stroke: var(--nax-green);
  background: var(--nax-green);
}

.folder-gauge [data-kind="other"],
.folder-kinds [data-kind="other"]::before {
  stroke: var(--nax-amber);
  background: var(--nax-amber);
}

.folder-kinds {
  inline-size: 100%;
  margin-block-end: var(--nax-space-2);
  border-collapse: collapse;
  font-size: 0.846rem;
}

.folder-kinds th,
.folder-kinds td {
  padding: var(--nax-space-1) 0;
  border-block-end: 1px solid var(--nax-ink-08);
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.folder-kinds th:first-child {
  text-align: start;
  font-weight: 500;
}

.folder-kinds thead th {
  color: var(--nax-ink-text-2);
  font-size: 0.769rem;
  font-weight: 600;
}

.folder-kinds [data-kind]::before {
  content: "";
  display: inline-block;
  inline-size: 0.6rem;
  block-size: 0.6rem;
  margin-inline-end: var(--nax-space-2);
  border-radius: var(--nax-r-sm);
}

/* =============================================================================
   Files dropped on the page (file_drop_controller.js). While files are
   dragged over it, a quiet wash says where they will go, and the places in
   the tree and the list say whether they take them: the one under the
   pointer that does is outlined in the accent, one that doesn't is faded.
   ============================================================================= */
.file-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--nax-z-overlay);
  display: grid;
  place-content: center;
  margin: 0;
  outline: 2px dashed var(--nax-accent);
  outline-offset: calc(-1 * var(--nax-space-2));
  background: var(--nax-accent-dim);
  pointer-events: none;
}

.file-drop-overlay > span {
  display: inline-flex;
  align-items: center;
  gap: var(--nax-space-2);
  padding: var(--nax-space-2) var(--nax-space-4);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  box-shadow: var(--nax-sh-md);
  color: var(--nax-ink);
  font-weight: 600;
}

.file-drop-overlay > svg {
  justify-self: center;
  margin-block-end: var(--nax-space-2);
  color: var(--nax-accent);
}

.file-library [aria-dropeffect="none"] {
  color: var(--nax-ink-text-3);
}

.file-library [aria-dropeffect="copy"][data-file-drop-over] {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
  background: var(--nax-accent-lt);
}

/* The tray: each file dropped, its progress and how it ended, in the
   corner of the window until it is closed. */
.file-uploads {
  position: fixed;
  inset-block-end: var(--nax-space-4);
  inset-inline-end: var(--nax-space-4);
  z-index: var(--nax-z-overlay);
  inline-size: 22rem;
  max-inline-size: calc(100vw - 2 * var(--nax-space-4));
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  box-shadow: var(--nax-sh-lg);
  font-size: 0.769rem;
}

.file-uploads > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--nax-space-1) var(--nax-space-2) var(--nax-space-1) var(--nax-space-3);
  border-block-end: 1px solid var(--nax-ink-08);
}

.file-uploads h2 {
  margin: 0;
  font-size: 0.846rem;
}

.file-uploads ol {
  max-block-size: var(--nax-list-max-h);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.file-uploads li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-2);
  padding: var(--nax-space-2) var(--nax-space-3);
  border-block-end: 1px solid var(--nax-ink-08);
}

.file-uploads li:last-child {
  border-block-end: 0;
}

.file-uploads strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-uploads progress {
  grid-column: 1 / -1;
  inline-size: 100%;
  block-size: var(--nax-space-1);
  accent-color: var(--nax-accent);
}

.file-uploads output {
  grid-column: 1;
  color: var(--nax-ink-text-2);
}

.file-uploads li > button {
  grid-column: 2;
  grid-row: 1;
}

.file-uploads li:not([data-state="waiting"], [data-state="sending"], [data-state="checking"]) progress {
  display: none;
}

.file-uploads [data-state="ready"] output {
  color: var(--nax-green-text);
}

.file-uploads [data-state="pending"] output {
  color: var(--nax-amber-text);
}

.file-uploads [data-state="refused"] output {
  color: var(--nax-red-text);
}

/* =============================================================================
   Entity dashboard (post-login landing)
   © 2026 Nuboc IP LLC. All rights reserved.
   ========================================================================== */

.nax-dash-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--nax-ink);
}

.nax-dash-sub {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  margin-top: 2px;
}

.nax-dash {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nax-dash-section-title {
  font-size: 0.769rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nax-ink-text-2);
  margin-bottom: 8px;
}

.nax-dash-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.nax-dash-module {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: 6px;
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-dash-module:hover {
  border-color: var(--nax-accent);
}

.nax-dash-module:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 2px;
}

.nax-dash-module-icon {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-dash-module-label {
  font-size: 0.846rem;
  font-weight: 500;
}

/* ── Get started (DashboardController#getting_started_steps) ── */
.nax-dash-start {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  display: grid;
  gap: 2px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
}
.nax-dash-start__step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 0.923rem;
}
.nax-dash-start__step a { color: var(--nax-accent); font-weight: 500; text-decoration: none; }
.nax-dash-start__step a:hover,
.nax-dash-start__step a:focus-visible { text-decoration: underline; }
.nax-dash-start__icon { color: var(--nax-ink-45); flex-shrink: 0; }
.nax-dash-start__step.is-done { color: var(--nax-ink-45); }
.nax-dash-start__step.is-done .nax-dash-start__icon { color: var(--nax-green-text, var(--nax-accent)); }
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   14. User Menu
   ============================================================================= */

.nax-user-menu {
  position: relative;
}

.nax-user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: none;
  border: none;
  border-radius: var(--nax-r-lg);
  cursor: pointer;
  transition: background 0.15s;
}

.nax-user-menu-trigger:hover {
  background: rgba(255, 255, 255, .08);
}

.nax-user-menu-trigger.is-active {
  background: rgba(255, 255, 255, .08);
}

.nax-user-menu-name {
  font-size: 0.846rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-user-menu-caret {
  color: rgba(255, 255, 255, .5);
  transition: transform 0.15s;
}

.nax-user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 220px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  z-index: var(--nax-z-topbar);
  overflow: hidden;
  min-width: 240px;
}

.nax-user-menu-dropdown.is-open {
  display: block;
}

.nax-user-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
}

.nax-user-menu-header-info {
  min-width: 0;
}

.nax-user-menu-fullname {
  display: block;
  font-size: 0.769rem;
  font-weight: 600;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-user-menu-email {
  display: block;
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-user-menu-divider {
  height: 1px;
  background: var(--nax-ink-07);
  margin: 0;
}

.nax-user-menu-list {
  list-style: none;
  padding: 4px 0;
  margin: 0;
}

.nax-user-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 14px;
  font-size: 0.769rem;
  color: var(--nax-ink);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
}

.nax-user-menu-item:hover {
  background: var(--nax-ink-04);
}

.nax-user-menu-item svg {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-user-menu-item--danger {
  color: var(--nax-red-text);
}

.nax-user-menu-item--danger svg {
  color: var(--nax-red-text);
}

.nax-user-menu-item--danger:hover {
  background: var(--nax-red-bg);
}

.nax-user-menu .nax-avatar-md {
  border-radius: 8px;
  background: var(--nax-accent);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Topbar avatar — solid accent with white text */
.nax-topbar .nax-user-menu .nax-avatar,
.nax-user-menu-trigger .nax-avatar {
  background: var(--nax-accent);
  color: #fff;
  font-weight: 700;
}

/* ── Organization switcher section ─────────────────────────────────────── */
.nax-user-menu-label {
  padding: 6px 14px 3px;
  font-size: 0.641rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-user-menu-item.is-active {
  background: var(--nax-ink-04);
}

.nax-user-menu-org-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-user-menu-org-check {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-user-menu-item--new-org {
  color: var(--nax-ink-text-3);
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   15. Search
   ============================================================================= */

.nax-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
}

.nax-search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 32px;
  padding: 0 12px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--nax-r);
  cursor: pointer;
  color: rgba(255, 255, 255, .65);
  font-size: 0.846rem;
  transition: all var(--nax-t);
}

.nax-search-trigger:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .24);
}

.nax-search-placeholder {
  flex: 1;
  text-align: left;
  color: rgba(255, 255, 255, .65);
}

.nax-search-panel {
  position: fixed;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 680px;
  max-width: calc(100vw - 40px);
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25), 0 4px 12px rgba(0, 0, 0, .1);
  z-index: var(--nax-z-cmd);
  overflow: hidden;
  /* Internal churn (result streams) never invalidates the page beneath. */
  contain: layout paint;
}

/* Backdrop when search panel is open. contain keeps its toggling from
   invalidating layout/paint of the page beneath — on the CoA tree that
   invalidation cost seconds per open. */
.nax-search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: var(--nax-z-toast);
  contain: strict;
}

.nax-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 44px;
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-search-icon {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-search-trigger .lucide {
  color: rgba(255, 255, 255, .65);
  flex-shrink: 0;
}

.nax-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--nax-font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--nax-ink);
}

.nax-search-input::placeholder {
  color: var(--nax-ink-text-2);
  font-weight: 400;
}

.nax-search-input::-webkit-search-cancel-button {
  display: none;
}

.nax-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  background: var(--nax-ink-10);
  border: none;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  flex-shrink: 0;
}

.nax-search-filters {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--nax-ink-08);
}

.nax-search-filter-tab {
  padding: 3px 10px;
  font-size: 0.718rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
  border: none;
  background: none;
  border-radius: var(--nax-r-sm);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-search-filter-tab:hover {
  background: var(--nax-ink-06);
  color: var(--nax-ink);
}

.nax-search-filter-tab.is-active {
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
}

.nax-search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.nax-search-section-label {
  padding: 4px 8px 2px;
  font-size: 0.641rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-search-empty-recent {
  padding: 20px;
  text-align: center;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--nax-r-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--nax-ink);
  transition: background var(--nax-t);
}

.nax-search-result-item:hover,
.nax-search-result-item.is-selected {
  background: var(--nax-ink-05);
}

.nax-search-result-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--nax-r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--nax-ink-08);
  color: var(--nax-ink-text-2);
}

/* Per-type icon tints */
.nax-search-result-icon--accent  { background: var(--nax-accent-dim); color: var(--nax-accent); }
.nax-search-result-icon--muted   { background: var(--nax-ink-05); color: var(--nax-ink-45); }
.nax-search-result-icon--success { background: var(--nax-green-bg); color: var(--nax-green-dark); }

/* Result badge — provenance system, journal status, account block, etc. */
.nax-search-badge {
  font-size: 0.615rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--nax-ink-05);
  color: var(--nax-ink-45);
  text-transform: uppercase;
  white-space: nowrap;
}

.nax-search-badge--danger  { background: var(--nax-red-bg); color: var(--nax-red); }
.nax-search-badge--success { background: var(--nax-green-bg); color: var(--nax-green-dark); }

.nax-search-result-body {
  flex: 1;
  min-width: 0;
}

.nax-search-result-title {
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-search-result-sub {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-search-result-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nax-search-result-amount {
  font-size: 0.769rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-search-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-top: 1px solid var(--nax-ink-08);
  background: var(--nax-ink-03);
}

.nax-search-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.641rem;
  color: var(--nax-ink-text-2);
}

.nax-search-hint kbd,
.nax-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  font-size: 0.615rem;
  font-family: var(--nax-font-mono);
  background: var(--nax-ink-08);
  border: 1px solid var(--nax-ink-10);
  border-radius: 3px;
  color: var(--nax-ink-text-2);
}

/* Trigger kbd — dark topbar variant */
.nax-search-trigger .nax-search-kbd {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .65);
}

/* NubocFortress — identity & auth */
/* © 2026 Nuboc IP LLC. All rights reserved.
   =============================================================================
   Lock screen
   =============================================================================
   The host's layouts/lock_screen renders it standalone, in the sign-in page's
   frame: the logo top-left, a compact card centred on the page background.
   The page frame, logo, heading and lede come from the host's sign_in.css
   (signin-page, signin-header, signin-logo, signin-title, signin-lede); this
   file holds the card and the PIN row. NAX tokens only, so light and dark
   follow [data-theme] like the rest of the app.
   ========================================================================== */

.nax-lock {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: var(--nax-space-6) var(--nax-space-4);
    background: var(--nax-canvas);
}

@media (min-width: 600px) {
    .nax-lock {
        padding: var(--nax-space-7) var(--nax-space-8);
    }
}

.nax-lock__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--nax-space-8) 0;
}

.nax-lock__card {
    width: 100%;
    max-width: 400px;
    padding: var(--nax-space-7) var(--nax-space-6);
    background: var(--nax-surface);
    border: 1px solid var(--nax-ink-08);
    border-radius: var(--nax-r-xl);
    box-shadow: var(--nax-sh);
}

@media (max-width: 420px) {
    .nax-lock__card {
        padding: var(--nax-space-6) var(--nax-space-4);
    }
}

/* ── Who is locked out ───────────────────────────────────────────────────── */
.nax-lock__identity {
    display: flex;
    align-items: center;
    gap: var(--nax-space-3);
    margin-bottom: var(--nax-space-6);
    min-width: 0;
}

.nax-lock__identity .nax-avatar {
    flex-shrink: 0;
}

.nax-lock__identity-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.077rem;
    font-weight: 500;
    color: var(--nax-ink);
}

.nax-lock .nax-lock__lede {
    margin-bottom: var(--nax-space-5);
}

/* ── PIN row ─────────────────────────────────────────────────────────────── */
.nax-lock__pins {
    display: flex;
    justify-content: space-between;
    gap: var(--nax-space-2);
}

.nax-lock__pin {
    flex: 1;
    /* A flex item defaults to min-width: auto, and a text input's intrinsic
       width is far wider than a sixth of the card; without this the row
       refuses to shrink and overflows narrow screens. */
    min-width: 0;
    max-width: 48px;
    height: 48px;
}

.nax-lock__pin input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    text-align: center;
    font-family: var(--nax-font-sans);
    font-size: 1.385rem;           /* 18px — the masking dot reads clearly */
    font-weight: 600;
    color: var(--nax-ink);
    background: var(--nax-surface);
    border: 1px solid var(--nax-ink-20);
    border-radius: var(--nax-r);
    outline: none;
    caret-color: var(--nax-accent);
    transition: border-color var(--nax-t), box-shadow var(--nax-t);
}

.nax-lock__pin input:hover {
    border-color: var(--nax-ink-35);
}

.nax-lock__pin.is-filled input {
    border-color: var(--nax-ink-35);
}

.nax-lock__pin input:focus,
.nax-lock__pin input:focus-visible {
    border-color: var(--nax-accent);
    box-shadow: 0 0 0 3px rgba(var(--nax-accent-rgb), .22);
}

[data-theme="dark"] .nax-lock__pin input:focus,
[data-theme="dark"] .nax-lock__pin input:focus-visible {
    box-shadow: 0 0 0 3px var(--nax-accent-dim);
}

/* ── Error: a wrong or missing PIN ───────────────────────────────────────── */
.nax-lock__pins.is-invalid .nax-lock__pin input {
    border-color: var(--nax-red);
}

.nax-lock__pins.is-invalid {
    animation: nax-lock-shake .32s ease-in-out 1;
}

@keyframes nax-lock-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(5px); }
    60%      { transform: translateX(-3px); }
    80%      { transform: translateX(2px); }
}

.nax-lock__error {
    margin: var(--nax-space-3) 0 0;
    font-size: 1rem;
    line-height: 1.45;
    color: var(--nax-red-text);
}

/* ── Actions ─────────────────────────────────────────────────────────────── */
.nax-lock__form .nax-btn.nax-lock__unlock {
    width: 100%;
    height: var(--nax-touch);
    margin-top: var(--nax-space-5);
    font-size: 1.077rem;
    border-radius: var(--nax-r);
}

/* On dark the accent is a light cobalt; white text on it fails contrast. */
[data-theme="dark"] .nax-lock__form .nax-btn.nax-lock__unlock,
[data-theme="dark"] .nax-lock__form .nax-btn.nax-lock__unlock:hover {
    color: var(--nax-canvas);
}

.nax-lock .nax-btn:focus-visible,
.nax-lock__signout:focus-visible {
    outline: 2px solid var(--nax-accent);
    outline-offset: 2px;
    box-shadow: none;
}

.nax-lock__meta {
    margin: var(--nax-space-6) 0 0;
    padding-top: var(--nax-space-4);
    border-top: 1px solid var(--nax-ink-08);
    font-size: 0.923rem;
    line-height: 1.5;
    color: var(--nax-ink-text-3);
}

.nax-lock__countdown {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--nax-ink-text-2);
}

.nax-lock__signout-row {
    display: flex;
    align-items: baseline;
    gap: var(--nax-space-1);
    margin-top: var(--nax-space-2);
    font-size: 0.923rem;
    color: var(--nax-ink-text-3);
}

.nax-lock__signout-form {
    display: inline;
    margin: 0;
}

.nax-lock__signout {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 500;
    color: var(--nax-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    border-radius: 2px;
    cursor: pointer;
}

.nax-lock__signout:hover {
    color: var(--nax-accent-dark);
}

@media (prefers-reduced-motion: reduce) {
    .nax-lock__pins.is-invalid { animation: none; }
    .nax-lock__pin input { transition: none; }
}
/* © 2026 Nuboc IP LLC. All rights reserved.
 *
 * Customer-consented support access.
 *
 * Two surfaces: the consent/code pages (standalone, minimal layout, reached
 * from an email) and a few accents on the settings page. The consent pages
 * borrow the lock screen's posture deliberately — both are moments where the
 * app stops and asks the person to make a decision, so they should feel
 * like the same kind of moment.
 */

/* ── Consent + code pages ──────────────────────────────────────── */

.nax-consent {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--nax-space-6);
  background: var(--nax-canvas);
}

.nax-consent__card {
  width: 100%;
  max-width: 32rem;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-xl);
  padding: var(--nax-space-7);
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 6%);
}

.nax-consent__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-consent__title {
  margin: 0 0 1.25rem;
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 650;
  color: var(--nax-ink);
}

.nax-consent__body {
  margin: 1.25rem 0;
  color: var(--nax-ink-text-2);
  line-height: 1.6;
}

.nax-consent__defs {
  display: grid;
  grid-template-columns: minmax(7rem, auto) 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
}

.nax-consent__defs dt {
  color: var(--nax-ink-text-2);
}

.nax-consent__defs dd {
  margin: 0;
  color: var(--nax-ink);
}

/* The anti-social-engineering notice. Amber rather than red: this is not an
 * error, it is a moment to think — red would read as "something broke". */
.nax-consent__warn,
.nax-support__warn {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: var(--nax-r-lg);
  border: 1px solid var(--nax-amber-light);
  background: var(--nax-amber-bg);
  color: var(--nax-amber-text);
  font-size: 0.875rem;
  line-height: 1.55;
}

.nax-consent__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

/* ── The code ──────────────────────────────────────────────────────
 * The signature element. Its only job is to be read aloud correctly on a
 * phone call, so: large, heavily letter-spaced, tabular figures, and enough
 * breathing room that the eye can't slide between the two groups.
 */
.nax-code {
  margin: 1.5rem 0;
  padding: 1.25rem 1rem;
  text-align: center;
  font-family: var(--nax-font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: var(--nax-ink);
  background: var(--nax-canvas);
  border: 1px dashed var(--nax-ink-20);
  border-radius: var(--nax-r-lg);
  /* Letter-spacing adds trailing space on the last glyph; nudge back so the
   * code reads optically centred rather than measured-centred. */
  text-indent: 0.18em;
  user-select: all;
}

/* ── Settings page accents ─────────────────────────────────────── */

/* Live session: the one state on the settings page that should catch the eye
 * from across the room, because it means someone is in there now. */
.nax-support--live {
  border-left: 3px solid var(--nax-amber-light);
}

.nax-support__rel {
  color: var(--nax-ink-text-2);
  font-size: 0.875em;
}

/* ── Platform console ──────────────────────────────────────────── */

/* Standing statement of whether the agent is currently allowed to look. Sits
 * directly under the page title so it is read before any data is. */
.nax-consent-bar {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--nax-r-lg);
  border: 1px solid var(--nax-ink-10);
  background: var(--nax-canvas);
  color: var(--nax-ink-text-2);
  font-size: 0.875rem;
  line-height: 1.5;
}

.nax-consent-bar--open {
  border-color: var(--nax-amber-light);
  background: var(--nax-amber-bg);
  color: var(--nax-amber-text);
}

.nax-consent-bar__why {
  display: block;
  margin-top: 0.25rem;
  opacity: 0.85;
}

.nax-consent-bar__link {
  margin-left: 0.5rem;
  font-weight: 600;
  text-decoration: underline;
}

/* Withheld audit payload. Quiet on purpose — this is the normal resting state
 * of the console, not a failure. */
.nax-audit__sealed {
  color: var(--nax-ink-text-2);
  font-size: 0.8125rem;
  font-style: italic;
}

.nax-audit__meta {
  font-size: 0.75rem;
  color: var(--nax-ink-text-2);
  word-break: break-all;
}

/* Code entry: matches how the code is displayed to the customer, so the agent
 * is typing into a field shaped like the thing being read to them. */
.nax-input--code {
  max-width: 16rem;
  font-family: var(--nax-font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nax-field__hint {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  color: var(--nax-ink-text-2);
}

@media (prefers-reduced-motion: no-preference) {
  .nax-consent__card {
    animation: nax-consent-in 240ms ease-out both;
  }
}

@keyframes nax-consent-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* NubocAxis — settings pages framework */
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   16. Settings Layout
   ============================================================================= */

.nax-settings-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.nax-settings-nav {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--nax-ink-10);
  padding: 16px 8px;
  overflow-y: auto;
  background: var(--nax-surface);
}

.nax-settings-nav-section {
  margin-bottom: 20px;
}

.nax-settings-nav-heading {
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
  padding: 0 8px;
  margin-bottom: 4px;
}

.nax-settings-nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  height: 28px;
  font-size: 0.769rem;
  color: var(--nax-ink-70);
  border-radius: var(--nax-r-sm);
  text-decoration: none;
  transition: background var(--nax-t), color var(--nax-t);
  width: 100%;
}

.nax-settings-nav-item:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-settings-nav-item.is-active {
  background: var(--nax-accent-lt);
  color: var(--nax-accent);
}

.nax-settings-body {
  flex: 1;
  padding: 24px 32px 40px;
  overflow-y: auto;
  background: var(--nax-canvas);
}

.nax-settings-body-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Profile hero ── */
.nax-settings-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
}

.nax-settings-hero__avatar {
  flex-shrink: 0;
}

.nax-settings-hero__avatar .nax-avatar {
  width: 52px;
  height: 52px;
  font-size: 1rem;
  overflow: hidden;
}

.nax-settings-hero__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.nax-settings-hero__meta {
  min-width: 0;
}

.nax-settings-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--nax-ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}

.nax-settings-subtitle {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  margin: 3px 0 0;
}

.nax-settings-hero__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* Legacy header (other settings pages) */
.nax-settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.nax-settings-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nax-settings-desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  margin-top: 2px;
}

/* ── Two-column section grid (profile + account) ── */
.nax-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 820px) {
  .nax-settings-grid {
    grid-template-columns: 1fr;
  }
}

.nax-settings-section {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
  margin-bottom: 10px;
}

.nax-settings-section--full {
  grid-column: 1 / -1;
}

.nax-settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nax-ink-08);
  background: var(--nax-ink-03);
}

.nax-settings-section-header__text {
  min-width: 0;
}

.nax-settings-section-title {
  /* Flex so the optional leading icon sits inline — the global reset makes
     svg display:block, which otherwise stacks it above the text. */
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-ink);
  margin: 0;
  line-height: 1.3;
}

.nax-settings-section-desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  margin: 3px 0 0;
  line-height: 1.45;
  max-width: 42ch;
}

.nax-settings-section-body {
  padding: 18px;
}

.nax-settings-section-body--flush {
  padding: 0;
}

.nax-settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: none;
  padding: 0;
}

.nax-settings-form .nax-form-grid-2 {
  gap: 14px;
}

.nax-settings-form .nax-form-grid .nax-field + .nax-field {
  margin-top: 0;
}

.nax-settings-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--nax-ink-06);
  margin-top: 4px;
  padding-top: 14px;
}

/* Detail list — tighter inside settings sections */
.nax-settings-section .nax-detail-list {
  padding: 0;
}

.nax-settings-section .nax-detail-row {
  padding: 11px 18px;
  border-bottom-color: var(--nax-ink-06);
}

.nax-settings-section .nax-detail-row:first-child {
  padding-top: 14px;
}

.nax-settings-section .nax-detail-row:last-child {
  padding-bottom: 14px;
}

.nax-settings-section .nax-role-list {
  padding: 0;
}

.nax-settings-section .nax-role-item {
  padding: 11px 18px;
}

.nax-settings-section .nax-role-assign {
  padding: 14px 18px;
}

/* Danger zone */
.nax-settings-danger {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--nax-surface);
  border: 1px solid rgba(var(--nax-amber-rgb), .25);
  border-radius: var(--nax-r-lg);
}

.nax-settings-danger__text {
  min-width: 0;
}

.nax-settings-danger__title {
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-amber-text);
  margin: 0 0 4px;
}

.nax-settings-danger__desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  margin: 0;
  line-height: 1.45;
  max-width: 48ch;
}


/* ── Page header actions (PageHeaderComponent) ── */
.nax-settings-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Invite / add-member bar (users page) ── */
.nax-invite-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 16px;
}

.nax-invite-row input[type="email"] {
  flex: 2;
  min-width: 220px;
}

.nax-invite-row select {
  flex: 1;
  min-width: 160px;
}

/* NubocAdmin — platform console chrome */
/* © 2025–2026 Nuboc IP LLC. All rights reserved.
 *
 * Platform console.
 *
 * The console wears the SAME chrome as the product — nax-topbar, nax-sidebar,
 * nax-main, nax-page-header, nax-card, nax-kpi, nax-table, nax-badge all come
 * from nuboc_axis and are not restated here. What follows is only what the
 * design system does not already carry: the platform-specific marks in the
 * topbar, and a few small primitives (a meter, a KPI row, a definition list)
 * the tenant pages needed and any screen could reuse.
 *
 * This file used to define a parallel chrome — nax-admin-bar, nax-admin-main,
 * nax-admin-head, nax-admin-section, nax-admin-stat — which meant the console
 * drifted from the product on every design change. Those are gone.
 */

/* ── Topbar marks ──────────────────────────────────────────────────────────
   A standing, unmissable reminder of which console this is. Staff here read
   ACROSS tenants and every read is audited; the flag is what stops a platform
   action being taken by accident. */
.nax-platform-flag {
  font-family: var(--nax-font-mono);
  font-size: 0.615rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--nax-chrome);
  background: var(--nax-amber-light);
  padding: 4px 9px;
  border-radius: 3px;
  margin-left: 10px;
  flex-shrink: 0;
}

/* In this console you ARE in admin, so the pill is lit rather than a link. */
.nax-admin-pill.is-current {
  color: var(--nax-signal-bright);
  border-color: var(--nax-signal-line);
  cursor: default;
}

.nax-platform-exit {
  font-size: 0.77rem;
  color: var(--nax-chrome-mute);
  text-decoration: none;
  margin: 0 8px;
  white-space: nowrap;
}
.nax-platform-exit:hover { color: var(--nax-chrome-text); }

/* ── Context trail ─────────────────────────────────────────────────────── */
.nax-ctx-trail {
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink-70);
  padding: 0 4px;
  white-space: nowrap;
}

/* ── Page header extras ────────────────────────────────────────────────── */
.nax-page-header-figures,
.nax-card-note {
  font-family: var(--nax-font-mono);
  font-size: 0.78rem;
  color: var(--nax-ink-45);
}

.nax-page-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── KPI row ───────────────────────────────────────────────────────────── */
.nax-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.nax-platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.nax-page-content > .nax-card { margin-bottom: 16px; }

.nax-card-header__spacer { flex: 1; }

.nax-card-count {
  font-family: var(--nax-font-mono);
  font-size: 0.72rem;
  color: var(--nax-ink-45);
}

.nax-platform-defs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
  font-size: 0.84rem;
}
.nax-platform-defs dt { color: var(--nax-ink-45); }
.nax-platform-defs dd { margin: 0; }

/* ── Meters ────────────────────────────────────────────────────────────────
   Storage and environment quotas. A generic primitive rather than a
   storage-specific one, because the second use turned up immediately. */
.nax-meter {
  position: relative;
  height: 8px;
  border-radius: 3px;
  background: var(--nax-ink-10);
  overflow: hidden;
}
.nax-meter--sm { height: 6px; }
.nax-meter--xs { height: 4px; margin-top: 4px; max-width: 120px; }

.nax-meter__fill {
  display: block;
  height: 100%;
  background: var(--nax-accent);
}

.nax-meter__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--nax-ink-70);
}
.nax-meter__avail { color: var(--nax-ink-45); }

.nax-platform-quotas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.nax-platform-quota__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nax-ink);
  margin-bottom: 6px;
}

/* ── Table cells ───────────────────────────────────────────────────────── */
.nax-cell-strong { font-weight: 500; color: var(--nax-ink); }
.nax-cell-muted  { font-size: 0.76rem; color: var(--nax-ink-45); }

.nax-tenant__link { text-decoration: none; display: block; }
.nax-tenant__name { display: block; font-weight: 500; color: var(--nax-ink); }
.nax-tenant__id {
  display: block;
  font-family: var(--nax-font-mono);
  font-size: 0.69rem;
  color: var(--nax-ink-45);
}

/* ── Search filter notice ──────────────────────────────────────────────── */
.nax-platform-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  font-size: 0.8rem;
  color: var(--nax-ink-70);
}
.nax-platform-filter__clear { margin-left: auto; font-size: 0.78rem; }

/* .nax-admin-note is retained because the CUSTOMER-facing support-access page
   (app/views/support_access/show.html.erb) borrows it. Renaming it here would
   silently unstyle a page in the host app, so the alias stays until that view
   is given a class of its own. */
.nax-platform-note,
.nax-admin-note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--nax-ink-45);
}

.nax-consent-bar__spacer { flex: 1; }

@media (max-width: 900px) {
  .nax-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .nax-platform-grid,
  .nax-platform-quotas { grid-template-columns: 1fr; }
}

/* The purge confirmation: what to type, as it must be typed, with a Copy
   button beside it (tenants/purges/new). */
.nax-purge-confirm {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.nax-purge-confirm__text {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--nax-ink-05);
  font-family: var(--nax-font-mono);
  font-size: 0.875rem;
  text-transform: none;
}

.nax-purge-confirm__status {
  font-size: 0.75rem;
  color: var(--nax-ink-text-2);
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Entitlements Grid — Role management checkbox UI
   ============================================================================= */

.nax-entitlements-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nax-entitlements-count {
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-accent);
  white-space: nowrap;
}

.nax-entitlements-body {
  max-height: 620px;
  overflow-y: auto;
}

/* ── Group ──────────────────────────────────────────────────── */

.nax-entitlement-group {
  border-bottom: 1px solid var(--nax-ink-07);
}

.nax-entitlement-group:last-child {
  border-bottom: none;
}

.nax-entitlement-group-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--nax-ink-03);
  border-bottom: 1px solid var(--nax-ink-07);
  position: sticky;
  top: 0;
  z-index: 1;
}

.nax-entitlement-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.846rem;
  cursor: pointer;
}

.nax-entitlement-group-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--nax-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.nax-entitlement-group-toggle strong {
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-entitlement-group-toggle .nax-badge {
  margin-left: 4px;
}

/* ── Entries ────────────────────────────────────────────────── */

.nax-entitlement-entries {
  display: flex;
  flex-direction: column;
}

.nax-entitlement-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 16px 9px 40px;
  cursor: pointer;
  transition: background var(--nax-t);
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-entitlement-entry:last-child {
  border-bottom: none;
}

.nax-entitlement-entry:hover {
  background: var(--nax-ink-03);
}

.nax-entitlement-entry input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: var(--nax-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.nax-entitlement-entry-text {
  flex: 1;
  min-width: 0;
}

.nax-entitlement-label {
  display: block;
  font-size: 0.846rem;
  font-weight: 500;
  color: var(--nax-ink);
  line-height: 1.3;
}

.nax-entitlement-desc {
  display: block;
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  margin-top: 1px;
  line-height: 1.35;
}

.nax-entitlement-key {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-05);
  padding: 2px 6px;
  border-radius: var(--nax-r-sm);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Checked state highlight ───────────────────────────────── */

.nax-entitlement-entry:has(input:checked) {
  background: var(--nax-accent-lt);
}

.nax-entitlement-entry:has(input:checked) .nax-entitlement-key {
  color: var(--nax-accent);
  background: rgba(var(--nax-accent-rgb, 59, 130, 246), 0.1);
}

/* NubocFinance — GL, chart of accounts */
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   17. NubocFinance — Chart of Accounts
   ============================================================================= */

/* ── Full-width page override ── */
.nax-page-content:has(.nax-coa-page-header),
.nax-page-content:has(.nax-record-head) {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Page header (flat, no card) ── */
.nax-coa-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}

.nax-coa-page-header__left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nax-coa-page-header__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--nax-ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.nax-coa-page-header__subtitle {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  font-weight: 400;
}

.nax-coa-page-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nax-coa-page-header__lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--nax-r-sm);
  font-size: 0.769rem;
  font-weight: 500;
  background: var(--nax-amber-bg);
  color: var(--nax-amber-text);
}

/* Header buttons */
.nax-coa-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--nax-r-sm);
  font-size: 0.846rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  cursor: pointer;
  transition: all var(--nax-t);
  text-decoration: none;
  white-space: nowrap;
}

.nax-coa-header-btn--outline {
  border: 1px solid var(--nax-ink-10);
  background: var(--nax-surface);
  color: var(--nax-ink-70);
}

.nax-coa-header-btn--outline:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  border-color: var(--nax-ink-20);
}

.nax-coa-header-btn--primary {
  border: 1px solid transparent;
  background: var(--nax-accent);
  color: #fff;
}

.nax-coa-header-btn--primary:hover {
  background: var(--nax-accent-dark);
  color: #fff;
}



/* ── Card wrapper ── */
.nax-coa-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  overflow: hidden;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* ── Toolbar ── */
.nax-coa-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--nax-surface);
  border-bottom: 1px solid var(--nax-ink-07);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.nax-coa-toolbar__search {
  position: relative;
  /* Grow to fill the gap so the trailing controls (Type, Status, period)
     sit at the right edge — and shrink first when the toolbar narrows (e.g.
     help pane open), so the period stays inline instead of dropping to its
     own row. */
  flex: 1 1 180px;
  min-width: 140px;
  max-width: 360px;
}

.nax-coa-toolbar__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nax-ink-text-2);
  pointer-events: none;
}

.nax-coa-toolbar__search-input {
  width: 100%;
  height: 30px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-size: 0.846rem;
  background: var(--nax-surface);
  font-family: var(--nax-font-sans);
  color: var(--nax-ink);
  transition: all var(--nax-t);
}

.nax-coa-toolbar__search-input:focus {
  outline: none;
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 3px var(--nax-accent-dim);
}

.nax-coa-toolbar__search-input::placeholder {
  color: var(--nax-ink-text-2);
}

/* ── Class pills (segmented control) ── */
.nax-coa-class-pills {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--nax-ink-05);
  padding: 3px;
  border-radius: var(--nax-r-sm);
}

.nax-coa-class-pill {
  /* Pills are links now (Turbo hover-prefetch) — lay out explicitly rather
     than leaning on button element defaults. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 11px;
  border: none;
  border-radius: calc(var(--nax-r-sm) - 1px);
  font-size: 0.769rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-text-2);
  background: transparent;
  cursor: pointer;
  transition: all var(--nax-t);
  white-space: nowrap;
  text-decoration: none;
}

.nax-coa-class-pill:hover,
.nax-coa-class-pill:focus-visible {
  text-decoration: none;
}

.nax-coa-class-pill:hover {
  color: var(--nax-ink-70);
}

.nax-coa-class-pill.is-active {
  background: var(--nax-surface);
  color: var(--nax-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

.nax-coa-class-pill--asset.is-active {
  color: var(--nax-green-text);
}

.nax-coa-class-pill--liability.is-active {
  color: var(--nax-red-dark);
}

.nax-coa-class-pill--equity.is-active {
  color: var(--nax-blue-dark);
}

.nax-coa-class-pill--revenue.is-active {
  color: var(--nax-accent-dark);
}

.nax-coa-class-pill--expense.is-active {
  color: var(--nax-amber-text);
}

/* ── Toolbar dropdowns ── */
.nax-coa-toolbar__select {
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-size: 0.846rem;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink);
  background: var(--nax-surface);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all var(--nax-t);
}

.nax-coa-toolbar__select:focus {
  outline: none;
  border-color: var(--nax-accent);
}

/* ── Filter button ── */
.nax-coa-toolbar__filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-size: 0.846rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-70);
  background: var(--nax-surface);
  cursor: pointer;
  transition: all var(--nax-t);
  white-space: nowrap;
}

.nax-coa-toolbar__filter-btn:hover {
  background: var(--nax-ink-05);
  border-color: var(--nax-ink-20);
  color: var(--nax-ink);
}

.nax-coa-toolbar__filter-btn.is-active {
  background: var(--nax-accent-dim, rgba(99, 102, 241, 0.08));
  border-color: var(--nax-accent);
  color: var(--nax-accent);
}

.nax-coa-toolbar__filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.641rem;
  font-weight: 700;
  background: var(--nax-accent);
  color: #fff;
  line-height: 1;
}

/* ── Columns button ── */
.nax-coa-toolbar__columns-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-size: 0.846rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-70);
  background: var(--nax-surface);
  cursor: pointer;
  transition: all var(--nax-t);
  white-space: nowrap;
}

.nax-coa-toolbar__columns-btn:hover {
  background: var(--nax-ink-05);
  border-color: var(--nax-ink-20);
  color: var(--nax-ink);
}

/* ── Period badge ── */
.nax-coa-toolbar__period {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.692rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-05);
  padding: 4px 10px;
  border-radius: var(--nax-r-sm);
  white-space: nowrap;
  flex-shrink: 0;
  /* No margin-left:auto — the flex-grow search pushes this to the right;
     an auto margin would drop it onto its own row when the toolbar wraps. */
}

.nax-coa-toolbar__period-lock {
  display: inline-flex;
  align-items: center;
  color: var(--nax-amber-text);
}

/* ── Active Filter Chips ── */
.nax-coa-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
  background: var(--nax-surface);
  border-bottom: 1px solid var(--nax-ink-05);
  flex-shrink: 0;
}

.nax-coa-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-accent);
  background: var(--nax-accent-dim, rgba(99, 102, 241, 0.08));
  border: 1px solid var(--nax-accent-dim, rgba(99, 102, 241, 0.15));
  text-decoration: none;
  cursor: pointer;
  transition: all var(--nax-t);
  white-space: nowrap;
}

.nax-coa-filter-chip:hover {
  background: var(--nax-accent-dim);
  border-color: var(--nax-accent);
}

.nax-coa-filter-chip svg {
  opacity: 0.7;
}

.nax-coa-filter-chip--clear {
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-05);
  border-color: var(--nax-ink-10);
}

.nax-coa-filter-chip--clear:hover {
  color: var(--nax-ink);
  background: var(--nax-ink-08);
  border-color: var(--nax-ink-20);
}

/* ── Scroll Breadcrumb ── */
.nax-coa-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--nax-ink-03);
  border-bottom: 1px solid var(--nax-ink-07);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-coa-breadcrumb__label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nax-coa-breadcrumb__value {
  font-family: var(--nax-font-mono);
  font-weight: 600;
  color: var(--nax-ink-70);
}

/* ── Table ── */
.nax-coa-table-wrap {
  flex: 1;
  overflow: auto;
  background: var(--nax-surface);
}

.nax-coa-table {
  width: 100%;
  /* separate (not collapse) is REQUIRED for sticky columns — collapsed
     borders paint on the table, not the cell, so they vanish on sticky
     cells and sticky positioning misbehaves. Row separators move to
     per-cell border-bottom below. */
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.846rem;
}

.nax-coa-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.nax-coa-table thead th {
  height: 32px;
  padding: 0 12px;
  font-size: 0.641rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-3);
  background: var(--nax-canvas);
  border-bottom: 1px solid var(--nax-ink-10);
  text-align: left;
  white-space: nowrap;
}

.nax-coa-table tbody tr {
  transition: background var(--nax-t);
  cursor: pointer;
}

/* Row separator drawn per-cell (border-collapse is separate). Every body
   cell also carries an opaque background so pinned columns never let the
   scrolling content show through them. */
.nax-coa-table tbody td {
  background: var(--nax-surface);
  border-bottom: 1px solid var(--nax-ink-05);
}

/* Row-state backgrounds target td (not td:not(.pin)) so the pinned cells
   repaint with the row — otherwise a seam appears mid-row when scrolled.
   The tint is layered OVER the opaque surface (gradient trick): a bare
   translucent background on a pinned cell lets scrolled columns ghost
   through it. */
.nax-coa-table tbody tr:hover td {
  background: linear-gradient(var(--nax-ink-04), var(--nax-ink-04)) var(--nax-surface);
}

/* Row hover or keyboard focus reveals actions */
.nax-coa-table tbody tr .nax-coa-actions {
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-coa-table tbody tr:hover .nax-coa-actions,
.nax-coa-table tbody tr:focus-within .nax-coa-actions {
  opacity: 1;
}

/* Keyboard focus ring for rows (roving tabindex) */
.nax-coa-row:focus {
  outline: none;
}

.nax-coa-row:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: -2px;
}

.nax-coa-table td {
  height: 36px;
  padding: 0 12px;
  vertical-align: middle;
  white-space: nowrap;
}

/* ── Toggle column (expand/collapse) ── */
.nax-coa-col--toggle {
  width: 40px;
  padding: 0 2px 0 8px !important;
}

/* ── Pinned identity columns ────────────────────────────────────────────
   Caret, Number and Name stay stuck to the left so a scrolled row is never
   unidentifiable. Combined width ~370px (40 + 110 + 220); do not exceed
   400px. The scroll container is .nax-coa-table-wrap (overflow:auto). */
.nax-coa-col--toggle,
.nax-coa-col--number,
.nax-coa-col--name {
  position: sticky;
  z-index: 2;
}
.nax-coa-col--toggle { left: 0; }
.nax-coa-col--number { left: 40px; }
.nax-coa-col--name   { left: 140px; }

/* Divider + scroll shadow at the pinned boundary — BOTH only once the body
   has scrolled away from the left edge, so at rest the table reads as one
   continuous surface (no seam). */
.nax-coa-table-wrap[data-scrolled] .nax-coa-col--name {
  border-right: 1px solid var(--nax-ink-10);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

/* Header cells: pinned in both axes — top from the sticky thead, left from
   here — and above the body's pinned cells. */
.nax-coa-table thead .nax-coa-col--toggle,
.nax-coa-table thead .nax-coa-col--number,
.nax-coa-table thead .nax-coa-col--name {
  position: sticky;
  top: 0;
  z-index: 12;
}

/* Tabbing to a control in a scrolling column must not park it under the
   pinned region. */
.nax-coa-table td a,
.nax-coa-table td button { scroll-margin-left: 380px; }

.nax-coa-toggle-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: all var(--nax-t);
}

/* Grow the hit area to 28px (WCAG 2.5.8 minimum is 24px) without changing the visual */
.nax-coa-toggle-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
}

.nax-coa-toggle-btn:hover {
  background: var(--nax-ink-08);
  color: var(--nax-ink);
}

.nax-coa-toggle-icon {
  transition: transform 0.15s ease;
}
.nax-coa-toggle-icon.nax-icon--ref { stroke-width: 2; }

/* Expanded state — chevron rotates down */
tr:not(.is-collapsed) > .nax-coa-col--toggle .nax-coa-toggle-icon {
  transform: rotate(90deg);
}

/* Collapsed state — chevron points right */
tr.is-collapsed > .nax-coa-col--toggle .nax-coa-toggle-icon {
  transform: rotate(0deg);
}

/* ── Row types ── */

/* Heading — major section (Assets, Liabilities, etc.) */
.nax-coa-row--heading td {
  background: var(--nax-ink-05);
}

.nax-coa-row--heading .nax-coa-col--number,
.nax-coa-row--heading .nax-coa-col--name {
  font-weight: 700;
  color: var(--nax-ink);
}

/* Begin total — group opener */
.nax-coa-row--begin-total td {
  background: var(--nax-ink-03);
}

.nax-coa-row--begin-total .nax-coa-col--name {
  font-weight: 600;
  color: var(--nax-ink);
}

/* End total — group closer (visual checkpoint) */
.nax-coa-row--end-total td,
.nax-coa-row--total td {
  background: var(--nax-ink-05);
  border-top: 1px solid var(--nax-ink-10);
}

.nax-coa-row--end-total .nax-coa-col--name,
.nax-coa-row--total .nax-coa-col--name {
  font-weight: 700;
  color: var(--nax-ink);
}

.nax-coa-row--end-total .nax-coa-col--number,
.nax-coa-row--total .nax-coa-col--number {
  font-weight: 600;
}

/* ── Blocked state — dimmed but readable (the red "Blocked" text carries the state) ── */
.nax-coa-row--blocked {
  opacity: 0.65;
}

.nax-coa-row--blocked:hover {
  opacity: 0.85;
}

.nax-coa-row--blocked .nax-coa-status--blocked {
  color: var(--nax-red-text);
  font-weight: 700;
}

/* Blocked rows: hide all actions except unblock */
.nax-coa-row--blocked .nax-coa-actions .nax-coa-action-btn {
  display: none;
}

.nax-coa-row--blocked .nax-coa-actions .nax-coa-action-btn[title="Unblock"] {
  display: flex;
}

/* ── Columns ── */
/* Pinned widths must match the sticky `left` offsets above (110 → name at
   40+110=150). */
.nax-coa-col--number {
  width: 100px;
  min-width: 100px;
  font-family: var(--nax-font-mono);
  font-size: 0.846rem;
}

.nax-coa-col--number a {
  color: var(--nax-accent);
  text-decoration: none;
  font-weight: 500;
}

.nax-coa-col--number a:hover {
  text-decoration: underline;
}

.nax-coa-col--name {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-coa-col--class {
  width: 90px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-coa-col--type {
  width: 140px;
  font-size: 0.769rem;
}

.nax-coa-col--status {
  width: 80px;
}

.nax-coa-col--actions {
  width: 120px;
  text-align: right;
}

.nax-coa-col--amount {
  width: 150px;
  text-align: right !important;
  font-family: var(--nax-font-mono);
  font-size: 0.846rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Amount colors ── */
.nax-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

/* Override utilities `td .nax-money { display: block }` so DR/CR markers
   stay on the same line as the amount (Balance column + Net Balance KPI). */
.nax-amount .nax-money {
  display: inline;
}

/* DR/CR marker after an absolute amount (AmountComponent marker: true) */
.nax-amount__side {
  font-size: 0.641rem;
  font-weight: 600;
  color: var(--nax-ink-text-2);
  margin-left: 3px;
}

.nax-amount--negative {
  color: var(--nax-red-text);
}

.nax-amount--positive {
  color: var(--nax-green-text);
}

.nax-amount--zero {
  color: var(--nax-ink-text-2);
}

/* Accounting convention: negatives in parentheses, and red. The detail
   panel's values set their own colour later in this file, so the pairing
   is spelled out to win over it. */
.nax-accounting-negative,
.nax-coa-detail__row-value.nax-accounting-negative {
  color: var(--nax-red-text);
}

/* ── Type indicator ── */
.nax-coa-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-coa-type__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nax-coa-type__dot--posting {
  background: var(--nax-green);
}

.nax-coa-type__dot--heading {
  background: var(--nax-ink-20);
}

.nax-coa-type__dot--total {
  background: var(--nax-accent);
}

.nax-coa-type__dot--begin-total {
  background: var(--nax-blue);
}

.nax-coa-type__dot--end-total {
  background: var(--nax-amber);
}

.nax-coa-type__range {
  color: var(--nax-ink-text-2);
  font-size: 0.692rem;
  font-family: var(--nax-font-mono);
}

/* ── Status (colored text, no badge background) ── */
.nax-coa-status {
  font-size: 0.769rem;
  font-weight: 600;
}

.nax-coa-status--active {
  color: var(--nax-green-text);
}

.nax-coa-status--blocked {
  color: var(--nax-red-dark);
}

/* ── Action buttons (hover-reveal) ── */
.nax-coa-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.nax-coa-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--nax-r-sm);
  border: none;
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-coa-action-btn:hover {
  background: var(--nax-ink-10);
  color: var(--nax-ink);
}

.nax-coa-action-btn--primary:hover {
  background: var(--nax-accent-dim);
  color: var(--nax-accent);
}

.nax-coa-action-btn--danger:hover {
  background: var(--nax-red-bg);
  color: var(--nax-red-text);
}

/* ── Footer ── */
.nax-coa-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Squeezed layouts (detail + help panes open) wrap the stat groups as
     whole blocks instead of crushing them into each other. */
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 16px;
  background: var(--nax-canvas);
  border-top: 1px solid var(--nax-ink-10);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-coa-footer__stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nax-coa-footer__stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nax-coa-footer__stat-value {
  font-weight: 600;
  color: var(--nax-ink);
  font-family: var(--nax-font-mono);
}

.nax-coa-footer__right {
  font-size: 0.769rem;
}

/* ── Empty state ── */
.nax-coa-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}

.nax-coa-empty__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--nax-r-lg);
  background: var(--nax-ink-05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nax-ink-text-2);
  margin-bottom: 8px;
}

.nax-coa-empty__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--nax-ink-70);
}

.nax-coa-empty__desc {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  max-width: 300px;
}


/* =============================================================================
   18. NubocFinance — Account Edit Layout (3-Tier)
   ============================================================================= */

/* ── Account Page: sticky header + scrolling content ── */
.nax-acct-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.nax-acct-page__header {
  flex-shrink: 0;
  background: var(--nax-surface);
  border-bottom: 1px solid var(--nax-ink-10);
  padding: 14px 20px 0;
  z-index: 10;
}

.nax-acct-page__header .nax-acct-tabs {
  margin-top: 12px;
}

.nax-acct-page__content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 40px;
  background: var(--nax-canvas);
}

/* ── Account page full-width override ── */
.nax-page-content:has(.nax-acct-page) {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Tier 1: Identity header (sticky) ── */
.nax-acct-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 12px;
  position: sticky;
  top: 0;
  z-index: 11;
  background: var(--nax-canvas);
}

.nax-acct-head__identity {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.nax-acct-head__number {
  font-family: var(--nax-font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--nax-accent);
  letter-spacing: 0.01em;
}

.nax-acct-head__sep {
  color: var(--nax-ink-text-2);
  font-size: 1.125rem;
}

.nax-acct-head__name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--nax-ink);
  letter-spacing: -0.01em;
}

.nax-acct-head__badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.nax-acct-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Account badges */
.nax-acct-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.641rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nax-acct-badge--asset { background: var(--nax-green-bg); color: var(--nax-green-text); }
.nax-acct-badge--liability { background: var(--nax-red-bg); color: var(--nax-red-dark); }
.nax-acct-badge--equity { background: var(--nax-blue-bg); color: var(--nax-blue-dark); }
.nax-acct-badge--revenue { background: var(--nax-accent-lt); color: var(--nax-accent-dark); }
.nax-acct-badge--expense { background: var(--nax-amber-bg); color: var(--nax-amber-text); }
.nax-acct-badge--type { background: var(--nax-ink-05); color: var(--nax-ink-text-2); }
.nax-acct-badge--blocked { background: var(--nax-red-bg); color: var(--nax-red-text); font-weight: 700; }
.nax-acct-badge--posting { background: var(--nax-green-bg); color: var(--nax-green-text); }
.nax-acct-badge--archived { background: var(--nax-amber-bg); color: var(--nax-amber-text); font-weight: 700; }

/* ── Layout: two columns ── */
.nax-acct-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  padding: 0 16px 24px;
  align-items: start;
}

.nax-acct-form-col {
  min-width: 0;
}

.nax-acct-form-col .nax-form {
  padding: 0;
}

.nax-acct-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 100px;
}

/* ── Tier 3: Collapsible advanced section ── */
.nax-acct-advanced {
  margin-bottom: 16px;
}

.nax-acct-advanced__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--nax-ink-03);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r-lg);
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-ink-70);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: all var(--nax-t);
}

.nax-acct-advanced__trigger::-webkit-details-marker {
  display: none;
}

.nax-acct-advanced__trigger:hover {
  background: var(--nax-ink-05);
  border-color: var(--nax-ink-10);
  color: var(--nax-ink);
}

.nax-acct-advanced__chevron {
  transition: transform 0.15s ease;
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-acct-advanced[open] .nax-acct-advanced__chevron {
  transform: rotate(90deg);
}

.nax-acct-advanced[open] .nax-acct-advanced__trigger {
  border-radius: var(--nax-r-lg) var(--nax-r-lg) 0 0;
  border-bottom-color: transparent;
}

.nax-acct-advanced__hint {
  font-size: 0.692rem;
  font-weight: 400;
  color: var(--nax-ink-text-2);
  margin-left: 4px;
}

.nax-acct-advanced__content {
  padding-top: 16px;
}

/* ── Tab bar ── */
.nax-acct-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--nax-ink-10);
  width: 100%;
}

.nax-acct-tab {
  padding: 10px 16px;
  font-size: 0.846rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.13s ease;
  white-space: nowrap;
}

.nax-acct-tab:hover { color: var(--nax-ink-70); }
.nax-acct-tab.is-active {
  color: var(--nax-accent);
  border-bottom-color: var(--nax-accent);
  font-weight: 600;
}

.nax-acct-panel { display: none; padding: 16px; }
.nax-acct-panel.is-active { display: block; }

.nax-acct-panel .nax-card,
.nax-acct-panel .nax-form {
  max-width: 100%;
}

/* ── KPI strip for account page ── */
.nax-acct-kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 16px;
}

.nax-acct-kpi {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r-lg);
  padding: 12px 14px;
}

.nax-acct-kpi__label {
  font-size: 0.615rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--nax-ink-text-2);
  margin-bottom: 4px;
}

.nax-acct-kpi__value {
  font-family: var(--nax-font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nax-ink);
  line-height: 1;
}

.nax-acct-kpi__sub {
  font-size: 0.641rem;
  color: var(--nax-ink-text-2);
  margin-top: 4px;
}

/* ── Overview key-value grid ── */
.nax-acct-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.nax-acct-attr {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
  font-size: 0.846rem;
}

.nax-acct-attr__label { color: var(--nax-ink-text-2); }
.nax-acct-attr__value { color: var(--nax-ink); font-weight: 500; text-align: right; }

/* ── Insights banner ── */
.nax-acct-insights {
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: var(--nax-accent-lt);
  border: 1px solid rgba(var(--nax-accent-rgb), .15);
  border-radius: var(--nax-r-lg);
}

/* ── Breadcrumb ── */
.nax-acct-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.nax-acct-crumb__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 0.769rem;
  color: var(--nax-accent);
  text-decoration: none;
  font-weight: 500;
}

.nax-acct-crumb__back:hover {
  text-decoration: underline;
}

.nax-acct-crumb__path {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

.nax-acct-crumb__path a {
  color: var(--nax-ink-text-2);
  text-decoration: none;
}

.nax-acct-crumb__path a:hover {
  color: var(--nax-accent);
}

.nax-acct-head__meta {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  margin-top: 4px;
}

/* ── Attention strip (merged warnings + insights) ── */
.nax-acct-attention {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.nax-acct-attention__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--nax-r);
  font-size: 0.769rem;
  line-height: 1.4;
}

.nax-acct-attention__item--info {
  background: var(--nax-blue-bg);
  border: 1px solid rgba(var(--nax-blue-rgb), .18);
  color: var(--nax-blue-dark);
}

.nax-acct-attention__item--warning {
  background: var(--nax-amber-bg);
  border: 1px solid rgba(var(--nax-amber-rgb), .2);
  color: var(--nax-amber-text);
}

.nax-acct-attention__item--danger {
  background: var(--nax-red-bg);
  border: 1px solid rgba(var(--nax-red-rgb), .2);
  color: var(--nax-red-dark);
}

.nax-acct-attention__message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.nax-acct-attention__action {
  flex-shrink: 0;
  font-size: 0.692rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: var(--nax-r-sm);
  background: rgba(255, 255, 255, .45);
  border: none;
  cursor: pointer;
  font-family: var(--nax-font-sans);
}

.nax-acct-attention__action:hover {
  background: rgba(255, 255, 255, .7);
}

/* ── Overview two-column layout ── */
.nax-acct-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.nax-acct-overview__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.nax-acct-overview__aside {
  position: sticky;
  top: 0;
}

.nax-acct-kpis--overview {
  padding: 0;
  margin: 0;
}

/* ── Properties sidebar ── */
.nax-acct-props {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
}

.nax-acct-props__header {
  padding: 10px 14px;
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
  border-bottom: 1px solid var(--nax-ink-07);
  background: var(--nax-ink-03);
}

.nax-acct-props__body {
  padding: 4px 0;
}

.nax-acct-props__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 14px;
  font-size: 0.769rem;
  border-bottom: 1px solid var(--nax-ink-04);
}

.nax-acct-props__row:last-child {
  border-bottom: none;
}

.nax-acct-props__label {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-acct-props__value {
  color: var(--nax-ink);
  font-weight: 500;
  text-align: right;
}

.nax-acct-props__link {
  font-size: 0.692rem;
  font-weight: 600;
  color: var(--nax-accent);
  text-decoration: none;
  margin-left: 6px;
}

.nax-acct-props__link:hover {
  text-decoration: underline;
}

/* ── Empty state ── */
.nax-acct-empty {
  padding: 32px 20px;
  text-align: center;
}

.nax-acct-empty__title {
  font-size: 0.923rem;
  font-weight: 600;
  color: var(--nax-ink-text-2);
  margin-bottom: 4px;
}

.nax-acct-empty__desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  max-width: 320px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

.nax-acct-empty__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Tab as external link ── */
.nax-acct-tab {
  text-decoration: none;
  display: inline-block;
}

a.nax-acct-tab.is-active {
  pointer-events: none;
}

/* ── Trend insight (Ora) compact ── */
.nax-acct-trend {
  padding: 10px 12px;
  background: var(--nax-accent-lt);
  border: 1px solid rgba(var(--nax-accent-rgb), .12);
  border-radius: var(--nax-r-lg);
  margin-bottom: 16px;
}

.nax-acct-trend__label {
  font-size: 0.615rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--nax-accent);
  margin-bottom: 6px;
}

.nax-acct-trend__item {
  font-size: 0.769rem;
  color: var(--nax-ink-70);
  line-height: 1.45;
  padding: 3px 0;
}

@media (max-width: 960px) {
  .nax-acct-overview {
    grid-template-columns: 1fr;
  }

  .nax-acct-overview__aside {
    position: static;
  }
}

/* Panel cards */
.nax-panel-card {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
}

.nax-panel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-07);
  background: var(--nax-ink-03);
}

.nax-panel-card__title {
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
}

.nax-panel-card__count {
  font-size: 0.692rem;
  font-weight: 600;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-07);
  padding: 1px 6px;
  border-radius: 10px;
}

.nax-panel-card__empty {
  padding: 14px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  text-align: center;
}

/* Entry rows */
.nax-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
  gap: 8px;
}

.nax-entry-row:last-child {
  border-bottom: none;
}

.nax-entry-row__main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.nax-entry-row__doc {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

.nax-entry-row__desc {
  font-size: 0.769rem;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-entry-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}

.nax-entry-row__amount {
  font-size: 0.769rem;
  font-weight: 500;
}

.nax-entry-row__date {
  font-size: 0.692rem;
}

/* Audit rows */
.nax-audit-row {
  padding: 8px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-audit-row:last-child {
  border-bottom: none;
}

.nax-audit-row__event {
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink);
}

.nax-audit-row__meta {
  display: flex;
  gap: 8px;
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  margin-top: 2px;
}


/* =============================================================================
   19. NubocFinance — Account Detail Side Panel
   ============================================================================= */

/* ── Content wrapper (table + detail panel) ── */
.nax-coa-content {
  display: flex;
  gap: 12px;
  padding: 0 16px 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Detail panel ── */
.nax-coa-detail {
  width: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
  transition: width 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.nax-coa-detail:not(.is-open) {
  width: 0;
  border: none;
  padding: 0;
  opacity: 0;
}

.nax-coa-detail.is-open {
  width: 420px;
  opacity: 1;
}

/* ── Header ── */
.nax-coa-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-coa-detail__title {
  font-size: 0.923rem;
  font-weight: 600;
  color: var(--nax-ink);
  letter-spacing: -0.01em;
}

.nax-coa-detail__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-coa-detail__close:hover {
  background: var(--nax-ink-10);
  color: var(--nax-ink);
}

/* ── Body (scrollable) ── */
.nax-coa-detail__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Section label ── */
.nax-coa-detail__section-label {
  font-size: 0.641rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nax-ink-text-3);
  margin-bottom: -8px;
}

/* ── Account number (monospace, accent) ── */
.nax-coa-detail__number {
  font-family: var(--nax-font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--nax-accent);
  letter-spacing: 0.02em;
}

/* ── Account name ── */
.nax-coa-detail__name {
  font-size: 0.923rem;
  font-weight: 500;
  color: var(--nax-ink);
  line-height: 1.4;
}

/* ── Status badge ── */
.nax-coa-detail__status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.692rem;
  font-weight: 600;
  width: fit-content;
}

.nax-coa-detail__status-badge--active {
  background: var(--nax-green-bg, rgba(34, 197, 94, 0.1));
  color: var(--nax-green-text);
}

.nax-coa-detail__status-badge--blocked {
  background: var(--nax-red-bg, rgba(239, 68, 68, 0.1));
  color: var(--nax-red-dark);
}

.nax-coa-detail__status-badge--inactive {
  background: var(--nax-ink-07);
  color: var(--nax-ink-text-2);
}

/* ── Quick actions (3-column grid) ── */
.nax-coa-detail__actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.nax-coa-detail__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--nax-r-sm);
  font-size: 0.769rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  cursor: pointer;
  transition: all var(--nax-t);
  text-decoration: none;
  white-space: nowrap;
}

.nax-coa-detail__btn--primary {
  border: 1px solid transparent;
  background: var(--nax-accent);
  color: #fff;
}

.nax-coa-detail__btn--primary:hover {
  background: var(--nax-accent-dark);
  color: #fff;
}

.nax-coa-detail__btn--outline {
  border: 1px solid var(--nax-ink-10);
  background: var(--nax-surface);
  color: var(--nax-ink-70);
}

.nax-coa-detail__btn--outline:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  border-color: var(--nax-ink-20);
}

.nax-coa-detail__btn--accent {
  border: 1px solid var(--nax-accent);
  background: var(--nax-accent-dim, rgba(99, 102, 241, 0.06));
  color: var(--nax-accent);
}

.nax-coa-detail__btn--accent:hover {
  background: var(--nax-accent);
  color: #fff;
}

/* ── Card (bordered rounded) ── */
.nax-coa-detail__card {
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  overflow: hidden;
  flex-shrink: 0;
}

.nax-coa-detail__card-title {
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nax-ink-text-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-07);
  background: var(--nax-ink-03);
}

/* ── Row (key–value) ── */
/* The detail rows are a <dl>, but display:contents keeps them as direct
   children of the card — semantics without a layout box. */
.nax-coa-detail__defs { display: contents; }

/* ── Recurring finance form/section bits (were repeated inline styles) ──── */

/* A label that wraps a checkbox/toggle beside its text */
.nax-check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--nax-ink);
}

/* Section header sitting above content, title left / action right */
.nax-fin-head {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Small uppercase eyebrow above a value */
.nax-fin-eyebrow {
  display: block;
  font-size: 0.692rem;
  text-transform: uppercase;
  color: var(--nax-ink-35);
  margin-bottom: 2px;
}

/* Panel content padding (no top — header owns it) */
.nax-panel-pad {
  padding: 0 16px 16px;
}

/* Centred empty-state cell/box */
.nax-fin-empty {
  padding: 24px;
  text-align: center;
  color: var(--nax-ink-45);
}

/* Small muted mono caption — timestamps/refs in a cell */
.nax-fin-caption {
  font-size: 0.72rem;
  color: var(--nax-ink-45);
  white-space: nowrap;
}

/* Scrollable flex-column form body (was .nax-coa-table-wrap reused + inline
   flex overrides — this is a form, not a table) */
.nax-coa-form-body {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
  background: transparent;
}

.nax-coa-detail__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-coa-detail__row:last-child {
  border-bottom: none;
}

.nax-coa-detail__row-label {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-coa-detail__row-value {
  font-size: 0.846rem;
  font-weight: 500;
  color: var(--nax-ink);
}

.nax-coa-detail__card:first-of-type .nax-coa-detail__row-value {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Activity items ── */
.nax-coa-detail__activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-coa-detail__activity-item:last-child {
  border-bottom: none;
}

.nax-coa-detail__activity-link {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-accent);
  text-decoration: none;
}

.nax-coa-detail__activity-link:hover {
  text-decoration: underline;
}

.nax-coa-detail__activity-amount {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink);
}

.nax-coa-detail__activity-empty {
  padding: 14px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  text-align: center;
}

/* ── Reconciliation badge in detail panel ── */
.nax-coa-detail__recon-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-ink-text-2);
}

.nax-coa-detail__recon-badge--active {
  color: var(--nax-green-text);
  font-weight: 600;
}

/* ── New Journal Entry button ── */
.nax-coa-detail__new-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  border: 1.5px dashed var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: transparent;
  font-size: 0.769rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-coa-detail__new-entry:hover {
  border-color: var(--nax-accent);
  color: var(--nax-accent);
  background: var(--nax-accent-dim, rgba(99, 102, 241, 0.04));
}

/* =============================================================================
   20. NubocFinance — Quick Post Popover
   ============================================================================= */

.nax-quick-post {
  position: fixed;
  z-index: var(--nax-z-sidebar);
  width: 260px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 0;
  overflow: hidden;
}

.nax-quick-post__header {
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nax-ink-text-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-07);
  background: var(--nax-ink-03);
}

.nax-quick-post__field {
  padding: 8px 14px 0;
}

.nax-quick-post__side-toggle {
  display: flex;
  gap: 2px;
  background: var(--nax-ink-05);
  padding: 3px;
  border-radius: var(--nax-r-sm);
}

.nax-quick-post__side-btn {
  flex: 1;
  height: 28px;
  border: none;
  border-radius: calc(var(--nax-r-sm) - 1px);
  font-size: 0.769rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink-text-2);
  background: transparent;
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-quick-post__side-btn:hover {
  color: var(--nax-ink-70);
}

.nax-quick-post__side-btn.is-active {
  background: var(--nax-surface);
  color: var(--nax-accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.nax-quick-post__input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-size: 0.846rem;
  font-family: var(--nax-font-sans);
  color: var(--nax-ink);
  background: var(--nax-surface);
  transition: all var(--nax-t);
}

.nax-quick-post__input:focus {
  outline: none;
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 3px var(--nax-accent-dim);
}

.nax-quick-post__input::placeholder {
  color: var(--nax-ink-text-2);
}

.nax-quick-post__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
}

.nax-quick-post__btn-post {
  flex: 1;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--nax-r-sm);
  background: var(--nax-accent);
  color: #fff;
  font-size: 0.769rem;
  font-weight: 600;
  font-family: var(--nax-font-sans);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-quick-post__btn-post:hover {
  background: var(--nax-accent-dark);
}

.nax-quick-post__btn-cancel {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  background: var(--nax-surface);
  color: var(--nax-ink-text-2);
  font-size: 0.769rem;
  font-weight: 500;
  font-family: var(--nax-font-sans);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-quick-post__btn-cancel:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  border-color: var(--nax-ink-20);
}

/* ── Selected row highlight ── */
/* Layered over the opaque surface (see hover note above) — pinned number
   and name cells must never go translucent while the table is scrolled. */
.nax-coa-row.is-selected td {
  background: linear-gradient(
    var(--nax-accent-dim, rgba(99, 102, 241, 0.06)),
    var(--nax-accent-dim, rgba(99, 102, 241, 0.06))
  ) var(--nax-surface);
}

.nax-coa-row.is-selected:hover td {
  background: linear-gradient(
    var(--nax-accent-dim, rgba(99, 102, 241, 0.08)),
    var(--nax-accent-dim, rgba(99, 102, 241, 0.08))
  ) var(--nax-surface);
}

.nax-coa-row.is-selected td:first-child {
  border-left: 2px solid var(--nax-accent);
}

/* =============================================================================
   21. NubocFinance — Account Tree Node (Hierarchical View)
   ============================================================================= */

.nax-coa-tree-node {
  position: relative;
}

.nax-coa-tree-node__content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 36px;
  position: relative;
  transition: background var(--nax-t);
}

.nax-coa-tree-node__content:hover {
  background: var(--nax-ink-04);
}

/* Visual tree connector line */
.nax-coa-tree-node__connector {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--nax-ink-10);
  pointer-events: none;
}

.nax-coa-tree-node__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: all var(--nax-t);
  flex-shrink: 0;
}

.nax-coa-tree-node__toggle:hover {
  background: var(--nax-ink-08);
  color: var(--nax-ink);
}

.nax-coa-tree-node__toggle svg {
  transition: transform 0.15s ease;
}

.nax-coa-tree-node--has-children.is-collapsed .nax-coa-tree-node__toggle svg {
  transform: rotate(0deg);
}

.nax-coa-tree-node--has-children:not(.is-collapsed) .nax-coa-tree-node__toggle svg {
  transform: rotate(90deg);
}

.nax-coa-tree-node__spacer {
  display: inline-block;
  width: 18px;
  flex-shrink: 0;
}

.nax-coa-tree-node__number {
  font-size: 0.846rem;
  color: var(--nax-accent);
  font-weight: 500;
  flex-shrink: 0;
}

.nax-coa-tree-node__name {
  font-size: 0.846rem;
  color: var(--nax-ink);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.nax-coa-tree-node__name:hover {
  text-decoration: underline;
  color: var(--nax-accent);
}

.nax-coa-tree-node__class {
  flex-shrink: 0;
}

.nax-coa-tree-node__type {
  flex-shrink: 0;
}

.nax-coa-tree-node__status {
  flex-shrink: 0;
}

.nax-coa-tree-node__recon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.692rem;
  font-weight: 500;
  color: var(--nax-green-text);
  background: var(--nax-green-bg);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.nax-coa-tree-node__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--nax-t);
}

.nax-coa-tree-node__content:hover .nax-coa-tree-node__actions {
  opacity: 1;
}

.nax-coa-tree-node__action-link {
  font-size: 0.692rem;
  font-weight: 500;
  color: var(--nax-accent);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: var(--nax-r-sm);
  transition: background var(--nax-t);
}

.nax-coa-tree-node__action-link:hover {
  background: var(--nax-accent-dim);
}

.nax-coa-tree-node__children {
  position: relative;
}

/* Subtle left border for child containers to show hierarchy */
.nax-coa-tree-node__children::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--nax-ink-08);
}

/* Blocked node */
.nax-coa-tree-node--blocked .nax-coa-tree-node__content {
  opacity: 0.5;
}

.nax-coa-tree-node--blocked .nax-coa-tree-node__content:hover {
  opacity: 0.7;
}

/* =============================================================================
   22. NubocFinance — T-Account Modal (journal-entry drill-down)
   ============================================================================= */

.nax-taccount-modal {
  position: fixed;
  inset: 0;
  z-index: var(--nax-z-topbar);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 14, 17, 0.32);
  opacity: 0;
  transition: opacity var(--nax-t);
}

/* `hidden` attribute must win over display:flex, or the transparent
   overlay sits on top of the page and swallows every click. */
.nax-taccount-modal[hidden] {
  display: none;
}

.nax-taccount-modal.is-open {
  opacity: 1;
}

.nax-taccount-modal__dialog {
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--nax-surface);
  border-radius: var(--nax-r-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(6px);
  transition: transform var(--nax-t);
}

.nax-taccount-modal.is-open .nax-taccount-modal__dialog {
  transform: translateY(0);
}

.nax-taccount__loading {
  padding: 40px;
  text-align: center;
  color: var(--nax-ink-text-2);
  font-size: 0.846rem;
}

/* ── Header ── */
.nax-taccount__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--nax-ink-07);
}

.nax-taccount__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-taccount__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-taccount__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nax-taccount__balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.692rem;
  font-weight: 600;
}

.nax-taccount__balance-badge--ok {
  color: var(--nax-green-text);
  background: var(--nax-green-bg);
}

.nax-taccount__balance-badge--off {
  color: var(--nax-red-text);
  background: var(--nax-red-bg);
}

.nax-taccount__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-taccount__close:hover {
  background: var(--nax-ink-08);
  color: var(--nax-ink);
}

/* ── Narrative ── */
.nax-taccount__narrative {
  margin: 0;
  padding: 14px 20px;
  font-size: 0.846rem;
  line-height: 1.5;
  color: var(--nax-ink-70);
  background: var(--nax-ink-03);
  border-bottom: 1px solid var(--nax-ink-07);
}

.nax-taccount__narrative strong {
  color: var(--nax-ink);
  font-weight: 600;
}

/* ── The T ── */
.nax-taccount__t {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 20px;
  gap: 0;
}

.nax-taccount__side {
  display: flex;
  flex-direction: column;
}

.nax-taccount__side--debit {
  border-right: 2px solid var(--nax-ink-10);
  padding-right: 16px;
}

.nax-taccount__side--credit {
  padding-left: 16px;
}

.nax-taccount__side-head {
  font-size: 0.692rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nax-ink-text-2);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--nax-ink-07);
}

.nax-taccount__side--credit .nax-taccount__side-head {
  text-align: right;
}

.nax-taccount__leg {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px;
  border-radius: var(--nax-r-sm);
  font-size: 0.815rem;
}

.nax-taccount__leg.is-focused {
  background: var(--nax-accent-dim);
}

.nax-taccount__leg--empty {
  color: var(--nax-ink-text-2);
  justify-content: center;
}

.nax-taccount__leg-account {
  color: var(--nax-ink-70);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-taccount__leg-amount {
  font-weight: 600;
  color: var(--nax-ink);
  flex-shrink: 0;
}

.nax-taccount__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 10px 6px 0;
  border-top: 1px solid var(--nax-ink-10);
  font-size: 0.769rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-taccount__total span:first-child {
  color: var(--nax-ink-text-2);
  font-weight: 500;
}

/* ── Footer ── */
.nax-taccount__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--nax-ink-07);
  font-size: 0.769rem;
}

.nax-taccount__diff {
  color: var(--nax-red-text);
  font-weight: 600;
}

/* ── Guided "New Account" intent picker ── */
.nax-intent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 720px) {
  .nax-intent-grid { grid-template-columns: 1fr 1fr; }
}

.nax-intent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  cursor: pointer;
  transition: all var(--nax-t);
}

.nax-intent-card:hover {
  border-color: var(--nax-accent);
  background: var(--nax-ink-03);
}

.nax-intent-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nax-intent-card:has(input:checked) {
  border-color: var(--nax-accent);
  background: var(--nax-accent-dim);
  box-shadow: inset 0 0 0 1px var(--nax-accent);
}

.nax-intent-card__label {
  font-size: 0.869rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-intent-card__hint {
  font-size: 0.738rem;
  color: var(--nax-ink-text-2);
  line-height: 1.3;
}

/* Second-level category tiles — same language as the top level, never a
   native jargon dropdown. */
.nax-intent-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--nax-ink-10);
}

@media (max-width: 720px) {
  .nax-intent-sub-grid { grid-template-columns: 1fr 1fr; }
}

.nax-intent-sub-grid[hidden] {
  display: none;
}

.nax-intent-card--sub {
  padding: 10px 12px;
}

.nax-intent-card--sub .nax-intent-card__label {
  font-size: 0.815rem;
}

/* ── Rolled-up ledger badge (consolidated total) ── */
.nax-coa-rollup-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.692rem;
  font-weight: 600;
  vertical-align: middle;
  color: var(--nax-accent);
  background: var(--nax-accent-dim);
}

/* ── Account record page v2 (Nuboc Account mock) ─────────────────────── */


/* Meta line rides the badge row: "Debit-balance account · child of …" */
.nax-acct-head__meta-inline {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  align-self: center;
  margin-left: 4px;
}
.nax-acct-head__parent-link {
  color: var(--nax-ink-text-2);
  text-decoration: underline;
  text-decoration-color: var(--nax-ink-20);
  text-underline-offset: 2px;
}
.nax-acct-head__parent-link:hover { color: var(--nax-accent); }

/* Activity events — audit trail rows */
.nax-acct-event {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
}
.nax-acct-event:last-of-type { border-bottom: none; }
.nax-acct-event__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nax-ink-05);
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
  margin-top: 1px;
}
.nax-acct-event__body { min-width: 0; flex: 1; }
.nax-acct-event__line { margin: 0; font-size: 0.769rem; color: var(--nax-ink); }
.nax-acct-event__line strong { font-weight: 600; }
.nax-acct-event__detail { margin: 2px 0 0; font-size: 0.692rem; color: var(--nax-ink-45); }
.nax-acct-event__when { font-size: 0.692rem; color: var(--nax-ink-45); flex-shrink: 0; }

/* Structure tree — root-to-leaf rollup, prominent per the Nuboc Account
   mock: tall rows, larger mono numbers, caps kind labels, accent band on
   the current account. */
.nax-acct-tree__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nax-ink-05);
}
.nax-acct-tree__row:last-of-type { border-bottom: none; }
.nax-acct-tree__row--current {
  background: var(--nax-accent-dim);
  box-shadow: inset 3px 0 0 var(--nax-accent);
}
.nax-acct-tree__glyph { color: var(--nax-ink-45); flex-shrink: 0; }
.nax-acct-tree__no {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.nax-acct-tree__no--current { color: var(--nax-accent); font-weight: 700; }
.nax-acct-tree__name {
  font-size: 0.846rem;
  color: var(--nax-ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nax-acct-tree__current-label {
  font-size: 0.769rem;
  font-weight: 700;
  color: var(--nax-ink);
  flex-shrink: 0;
}
.nax-acct-tree__kind {
  font-size: 0.641rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nax-ink-35);
  width: 92px;
  text-align: left;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Sentence-case variant for prominent cards (the tree header in the
   Nuboc Account mock is not caps). */
.nax-panel-card__title--plain {
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 0.923rem;
  color: var(--nax-ink);
}
.nax-acct-tree__bal {
  font-size: 0.769rem;
  color: var(--nax-ink-45);
  width: 82px;
  text-align: right;
  flex-shrink: 0;
}
.nax-acct-tree__open {
  font-size: 0.769rem;
  color: var(--nax-accent);
  text-decoration: none;
  font-weight: 500;
  flex-shrink: 0;
  width: 34px;
  text-align: right;
}
.nax-acct-tree__open:hover { text-decoration: underline; }

/* Panel-card footer (mirrors nax-card-footer) */
.nax-panel-card__footer {
  padding: 8px 14px;
  font-size: 0.692rem;
  color: var(--nax-ink-45);
  border-top: 1px solid var(--nax-ink-05);
  background: var(--nax-ink-03);
}


/* ── Account ledger (entries tab) ─────────────────────────────────────
   Shares .nax-acct-page shell with Overview. Description must NOT use
   .nax-coa-col--name (CoA tree sticky pin). Balance amount-marked col
   keeps room for "$… DR"; .nax-amount inline-flex is the real wrap fix. */
.nax-acct-ledger .nax-ledger-col--desc {
  min-width: 10rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-acct-ledger .nax-coa-col--amount-marked {
  min-width: 11rem;
  width: 11rem;
  white-space: nowrap;
}

/* Table fills the content pane (no Overview-style padded scroll). */
.nax-acct-page.nax-acct-ledger .nax-acct-page__content.nax-acct-ledger__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--nax-surface);
}

.nax-acct-ledger__table {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* =============================================================================
   NubocFinance — Nexus tracker (settings/nexus)
   ============================================================================= */

/* The threshold progress bar: a native <progress>, value carried as
   markup, painted entirely by tokens — accent while watching, red once
   the state is critical. */
.nexus-threshold-meter {
  width: 120px;
  height: 6px;
  accent-color: var(--nax-accent);
}

.nexus-threshold-meter[data-critical] {
  accent-color: var(--nax-red);
}

/* The 24-month trend reuses the same primitive at full row width. */
.nexus-trend .nexus-threshold-meter {
  width: 100%;
}
/* Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   21. GL KPI Strip
   ============================================================================= */

/* GL KPI Strip */
.nax-gl-kpis {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--nax-ink-10);
  background: var(--nax-surface);
}

.nax-gl-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 24px;
  border-right: 1px solid var(--nax-ink-08);
}

.nax-gl-kpi:last-child {
  border-right: none;
}

.nax-gl-kpi__label {
  font-size: 0.641rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
}

.nax-gl-kpi__value {
  font-family: var(--nax-font-mono);
  font-size: 1.077rem;
  font-weight: 500;
  color: var(--nax-ink);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.nax-gl-kpi__side {
  font-size: 0.692rem;
  font-weight: 600;
  color: var(--nax-ink-text-2);
}

.nax-gl-amount-link {
  color: inherit;
  text-decoration: none;
}

.nax-gl-amount-link:hover {
  text-decoration: underline;
  color: inherit;
}


/* =============================================================================
   21b. Sticky Record Header
   Wraps page-header + KPIs + toolbar so they pin while table scrolls under.
   ============================================================================= */

.nax-record-head {
  position: sticky;
  top: 0;
  z-index: 12;
  background: var(--nax-surface);
  flex-shrink: 0;
}

/* When sticky, add subtle shadow to separate from scrolling content */
.nax-record-head.is-stuck {
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}


/* =============================================================================
   21d. Row Selection & Related Entries Panel
   ============================================================================= */

/* -- Selected row ------------------------------------------------------------- */
.nax-coa-table tbody tr.is-selected {
  background: var(--nax-accent-lt);
  box-shadow: inset 2px 0 0 var(--nax-accent);
}

.nax-coa-table tbody tr.is-selected:hover {
  background: var(--nax-accent-lt);
}

.nax-coa-table tbody tr[data-entry-id] {
  cursor: pointer;
}

/* -- Per-row disclosure trigger on the Document No. cell ----------------------
   A real <button>, but it reads as the accent mono text of its cell: it
   inherits font and colour and drops all button chrome, keeping only a
   keyboard focus ring. */
.nax-entry-trigger {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.nax-entry-trigger:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 2px;
  border-radius: var(--nax-r-sm);
}

/* -- Related entries modal overlay -------------------------------------------- */
.nax-related-panel {
  position: fixed;
  inset: 0;
  z-index: var(--nax-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.nax-related-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.nax-related-panel.is-loading::after {
  content: "Loading...";
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  background: var(--nax-surface);
  padding: 20px 32px;
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh-lg);
}

/* -- Related entries content (modal card) ------------------------------------- */
.nax-related {
  background: var(--nax-surface);
  border-radius: var(--nax-r-lg, 10px);
  box-shadow: var(--nax-sh-lg);
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  animation: nax-modal-in 0.15s ease;
}

@keyframes nax-modal-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.nax-related__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--nax-ink-08);
  background: var(--nax-ink-03);
}

.nax-related__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.769rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--nax-ink-70);
}

.nax-related__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-related__close {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--nax-ink-text-2);
  cursor: pointer;
}

.nax-related__close:hover {
  background: var(--nax-ink-08);
  color: var(--nax-ink);
}

.nax-related__section {
  padding: 8px 16px;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-related__section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.641rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nax-ink-text-2);
  margin-bottom: 6px;
}

.nax-related__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--nax-ink-08);
  font-size: 0.641rem;
  font-weight: 600;
  color: var(--nax-ink-text-2);
}

.nax-related__source {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nax-related__source-row {
  display: flex;
  gap: 12px;
  font-size: 0.769rem;
}

.nax-related__source-row > span:first-child {
  width: 80px;
  flex-shrink: 0;
}

/* -- Related entries table ---------------------------------------------------- */
.nax-related__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.769rem;
}

.nax-related__table thead th {
  height: 24px;
  padding: 0 8px;
  font-size: 0.590rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
  text-align: left;
  white-space: nowrap;
}

.nax-related__table tbody tr {
  border-top: 1px solid var(--nax-ink-04);
}

.nax-related__table tbody tr:hover {
  background: var(--nax-ink-03);
}

.nax-related__table td {
  height: 28px;
  padding: 0 8px;
  vertical-align: middle;
  white-space: nowrap;
}

.nax-related-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* -- Clickable amounts -------------------------------------------------------- */
.nax-amount-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.nax-amount-link:hover {
  text-decoration: underline;
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* General journal: edit grid chrome, footer, posted view. Rides on
   nax-table / nax-editgrid; only journal-specific pieces live here. */

.nax-journal-header-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-6);
  padding-block: var(--nax-space-1) var(--nax-space-4);
}

/* One fact in the header line: a quiet label, then the value. */
.nax-journal-field {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  margin: 0;
  font-size: 0.846rem;
}
.nax-journal-field > span { color: var(--nax-ink-text-2); }
.nax-journal-field .nax-inline-input { inline-size: auto; min-inline-size: 16ch; font-weight: 600; }

/* BC's "✓ Saved" — streamed by every line save. */
.nax-journal-save-state {
  font-size: 12px;
  color: var(--nax-ink-45);
  white-space: nowrap;
}

/* BC's running Balance column: cumulative after each row, red until the
   batch nets to zero at the last line. */
.nax-journal-running {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--nax-ink-45);
  padding-right: 12px;
}

.nax-journal-running--off {
  color: var(--nax-red);
}

/* A same_code dimension: fixed by the account, rendered as fact. */
.nax-journal-dim--fixed {
  font-size: 12.5px;
  color: var(--nax-ink-45);
  cursor: help;
  white-space: nowrap;
}

/* Derived control account confirmation on customer/vendor/bank lines. */
.nax-journal-line__control {
  font-size: 11px;
  color: var(--nax-ink-45);
  cursor: help;
  white-space: nowrap;
}

.nax-journal-alert:not(:empty) {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--nax-red);
  border-radius: 6px;
  color: var(--nax-red);
  font-size: 13px;
}

.nax-journal-failure {
  margin: 0 16px 12px;
  padding: 10px 14px;
  border: 1px solid var(--nax-red);
  border-radius: 6px;
  color: var(--nax-red);
  background: color-mix(in srgb, var(--nax-red) 7%, transparent);
  font-size: 13px;
}

.nax-journal-line__status {
  text-align: center;
  width: 40px;
}

.nax-journal-line__flag {
  color: var(--nax-red);
  cursor: help;
}

.nax-journal-documents {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nax-space-1) var(--nax-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nax-journal-doc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--nax-ink-10);
}

.nax-journal-doc--off {
  color: var(--nax-red);
  border-color: color-mix(in srgb, var(--nax-red) 40%, transparent);
}

.nax-journal-doc__balance {
  border: none;
  background: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.nax-journal-footer__off {
  color: var(--nax-red);
}

/* New journal ▾ split menu. */
.nax-journal-newmenu {
  position: relative;
}

.nax-journal-newmenu summary {
  list-style: none;
  cursor: pointer;
}

.nax-journal-newmenu summary::-webkit-details-marker {
  display: none;
}

.nax-journal-newmenu__list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: var(--nax-z-overlay);
  min-width: 240px;
  padding: 4px;
  background: var(--nax-surface, #fff);
  border: 1px solid var(--nax-ink-10);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nax-journal-newmenu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  background: none;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.nax-journal-newmenu__item:hover {
  background: var(--nax-accent-dim);
}

.nax-journal-newmenu__item--manage {
  border-top: 1px solid var(--nax-ink-10, #eee);
  color: var(--nax-ink-45);
  border-radius: 0 0 5px 5px;
}

.nax-journal-newmenu__list--left {
  left: 0;
  right: auto;
}

.nax-journal-template-row {
  display: flex;
  align-items: center;
}

.nax-journal-template-row form:first-child {
  flex: 1;
}

.nax-journal-template-save {
  display: flex;
  gap: 6px;
  padding: 8px 6px 4px;
  border-top: 1px solid var(--nax-ink-10, #eee);
  margin-top: 4px;
}

.nax-journal-template-save .nax-input {
  flex: 1;
  font-size: 12.5px;
}

/* Open / Posted list tabs. */
.nax-journal-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 10px;
}

/* Transaction detail: a subsection docked under the ledger table, not a
   floating card. When it is open the table stops claiming leftover
   height (no dead gap between the two). */
.nax-entry-detail:not(:empty) {
  flex-shrink: 0;
  border-top: 2px solid var(--nax-ink-10);
  background: var(--nax-canvas, #fafafa);
  padding: 0 16px 16px;
  max-height: 46vh;
  overflow-y: auto;
}

.nax-entry-detail:not(:empty)::before {
  content: "Transaction";
  display: block;
  padding: 10px 0 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
}

/* The ledger table yields its stretch to the detail below it. */
body:has(.nax-entry-detail:not(:empty)) .nax-coa-table-wrap[data-controller~="infinite-scroll"] {
  flex: 0 1 auto;
}

/* Transaction deep-dive (modal): one document, whole and balanced. */
.nax-txn__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.nax-txn__table {
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
}

.nax-txn__docno code {
  font-size: 1.077rem;
  font-weight: 600;
}

.nax-txn__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--nax-ink-45);
}

.nax-txn__source {
  text-align: right;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nax-txn__source-label {
  color: var(--nax-ink-45);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: .04em;
}

.nax-txn__dims {
  font-size: 11px;
  color: var(--nax-ink-45);
  margin-top: 2px;
}

.nax-txn__totals td {
  border-top: 2px solid var(--nax-ink-10);
  font-variant-numeric: tabular-nums;
}

.nax-txn__row--current td {
  background: var(--nax-accent-dim);
}

.nax-txn__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
}

.nax-txn__balanced {
  color: var(--nax-green);
  font-weight: 600;
}

/* Preview pane — the exact entries the batch will create. */
.nax-journal-preview {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--nax-ink-10);
  border-radius: 8px;
  background: var(--nax-canvas, #fafafa);
}

.nax-journal-preview__title {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--nax-ink-45);
}

.nax-journal-preview__errors {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--nax-red);
}

.nax-journal-entry--reversed td {
  color: var(--nax-ink-45);
  text-decoration: line-through;
}

.nax-journal-totals td {
  border-top: 2px solid var(--nax-ink-10);
  font-variant-numeric: tabular-nums;
}

.nax-journal-auditline {
  margin: 10px 4px 0;
  font-family: var(--nax-font-mono);
  font-size: 12px;
  color: var(--nax-ink-45);
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Bank accounts workspace — account strip, review queue, staging banner.
   Table/toolbar/page-header chrome comes from nax-finance.css (nax-coa-*). */

/* Everything below the page header sits in the same 16px inset the CoA
   page gets from .nax-coa-content — keeps the two pages column-aligned. */
.nax-bank-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 16px 16px;
}

/* ── Account strip (cards view) ─────────────────────────────────────────── */

.nax-bank-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 0 12px;
  scrollbar-width: thin;
}

.nax-bank-card {
  width: 244px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r);
  box-shadow: var(--nax-sh);
  padding: 10px 12px 9px;
  text-decoration: none;
  color: var(--nax-ink);
  transition: border-color 130ms ease;
}

.nax-bank-card { position: relative; }

.nax-bank-card:hover { border-color: var(--nax-ink-20); }

/* Stretched link: the name anchor covers the whole card; the star form
   sits above it so it stays independently clickable. */
.nax-bank-card__link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.83rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-bank-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.nax-bank-star-form { position: relative; z-index: 1; display: inline-flex; }

.nax-bank-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-20);
  cursor: pointer;
  padding: 0;
}

.nax-bank-star:hover { background: var(--nax-ink-07); color: var(--nax-ink-45); }

.nax-bank-star--on { color: var(--nax-amber); }
.nax-bank-star--on svg { fill: currentColor; }

.nax-bank-card--selected {
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 2px var(--nax-accent-dim);
}

.nax-bank-card__head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.nax-bank-card__icon {
  width: 22px;
  height: 22px;
  border-radius: var(--nax-r-sm);
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nax-bank-card--manual .nax-bank-card__icon { background: var(--nax-ink-07); color: var(--nax-ink-70); }
.nax-bank-card--fx     .nax-bank-card__icon { background: var(--nax-blue-bg); color: var(--nax-blue-dark); }

.nax-bank-card__names { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.nax-bank-card__name {
  font-weight: 600;
  font-size: 0.83rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-bank-card__bank {
  font-family: var(--nax-font-mono);
  font-size: 0.66rem;
  color: var(--nax-ink-45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nax-bank-card__balance {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 9px;
  min-width: 0;
}

.nax-bank-card__balance .nax-bank-asof { margin-left: auto; }

.nax-bank-card__amount {
  font-family: var(--nax-font-mono);
  font-size: 1.18rem;
  font-weight: 500;
  white-space: nowrap;
}

.nax-bank-card__amount--negative { color: var(--nax-red-text); }

.nax-bank-card__amount--empty { color: var(--nax-ink-45); font-weight: 400; }

.nax-bank-card__currency { font-family: var(--nax-font-mono); font-size: 0.66rem; color: var(--nax-ink-45); }

/* The reconciliation summary is a <dl>, but display:contents keeps its rows as
   direct flex children of the card — semantics without a layout box. */
.nax-bank-card__defs { display: contents; }

.nax-bank-card__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.7rem;
}

.nax-bank-card__row + .nax-bank-card__row { margin-top: 1px; }

.nax-bank-card__row-label {
  color: var(--nax-ink-45);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 0.62rem;
  font-weight: 600;
  align-self: center;
}

.nax-bank-card__row-value { font-family: var(--nax-font-mono); font-size: 0.74rem; color: var(--nax-ink-70); }

.nax-bank-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--nax-ink-08);
  font-size: 0.64rem;
  color: var(--nax-ink-45);
}

/* Collapsed cards drop the divider — head, balance, one status row. */
.nax-bank-card__foot--compact {
  margin-top: 2px;
  padding-top: 0;
  border-top: 0;
}

.nax-bank-focus-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--nax-accent-dark);
  background: var(--nax-accent-dim);
  border-radius: var(--nax-r-sm);
  padding: 2px 7px;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.nax-bank-focus-chip:hover { background: var(--nax-accent-lt); }

/* ── Shared bits ────────────────────────────────────────────────────────── */

.nax-bank-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.nax-bank-dot--green   { background: var(--nax-green); }
.nax-bank-dot--amber   { background: var(--nax-amber); }
.nax-bank-dot--neutral { background: var(--nax-ink-20); }

.nax-bank-asof { font-family: var(--nax-font-mono); font-size: 0.66rem; color: var(--nax-ink-45); white-space: nowrap; }
.nax-bank-asof--stale { color: var(--nax-amber-text); font-weight: 600; }

.nax-bank-badge--manual {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  padding: 1px 4px;
  flex-shrink: 0;
}

.nax-bank-review-count { font-size: 0.72rem; font-weight: 600; color: var(--nax-accent); }
.nax-bank-review-clear { font-size: 0.72rem; font-weight: 600; color: var(--nax-green-text); }

.nax-bank-unexplained--over { color: var(--nax-amber-text); font-weight: 600; }
.nax-bank-unexplained--ok   { color: var(--nax-ink-45); }

/* ── Drag to reorder ────────────────────────────────────────────────────── */

.nax-bank-grip { display: inline-flex; color: var(--nax-ink-20); cursor: grab; flex-shrink: 0; }

.nax-coa-table tbody tr.sortable-drop-before td { box-shadow: inset 0 3px 0 var(--nax-accent); }
.nax-coa-table tbody tr.sortable-drop-after td  { box-shadow: inset 0 -3px 0 var(--nax-accent); }

.nax-bank-card.sortable-drop-before { box-shadow: -4px 0 0 0 var(--nax-accent), var(--nax-sh); }
.nax-bank-card.sortable-drop-after  { box-shadow: 4px 0 0 0 var(--nax-accent), var(--nax-sh); }

/* Selected account row in the list view */
.nax-coa-table tbody tr.nax-bank-row--selected td {
  background: var(--nax-accent-lt);
}

.nax-coa-table tbody tr.nax-bank-row--selected td:first-child {
  box-shadow: inset 3px 0 0 var(--nax-accent);
}

/* ── Filter pills row ───────────────────────────────────────────────────── */

.nax-bank-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.nax-bank-pills__group {
  display: inline-flex;
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  overflow: hidden;
}

.nax-bank-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--nax-ink-70);
  text-decoration: none;
}

.nax-bank-pill + .nax-bank-pill { border-left: 1px solid var(--nax-ink-20); }

.nax-bank-pill--active { color: var(--nax-accent-dark); background: var(--nax-accent-lt); }

.nax-bank-pills__meta { font-size: 0.72rem; color: var(--nax-ink-45); font-family: var(--nax-font-mono); }

/* ── Draft banner ───────────────────────────────────────────────────────── */

.nax-bank-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 12px;
  background: var(--nax-accent-lt);
  border: 1px solid var(--nax-accent-dim);
  border-radius: var(--nax-r);
  font-size: 0.8rem;
  color: var(--nax-ink);
}

.nax-bank-banner__icon { color: var(--nax-accent-dark); flex-shrink: 0; display: inline-flex; }
.nax-bank-banner__spacer { flex: 1; }

/* ── Review queue card ──────────────────────────────────────────────────── */

.nax-bank-review-card { min-height: 340px; display: flex; flex-direction: column; }

.nax-bank-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-bank-tab {
  padding: 10px 12px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--nax-ink-70);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.nax-bank-tab--active { color: var(--nax-accent); border-bottom-color: var(--nax-accent); }

.nax-bank-tabs__links {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--nax-ink-45);
}

.nax-bank-tabs__links a { text-decoration: none; white-space: nowrap; }

.nax-bank-tabs__scope {
  margin-left: 14px;
  font-size: 0.72rem;
  color: var(--nax-ink-45);
  font-family: var(--nax-font-mono);
}

.nax-bank-manual-banner {
  background: var(--nax-amber-bg);
  border-bottom: 1px solid var(--nax-ink-10);
  font-size: 0.76rem;
  color: var(--nax-ink-70);
  flex-shrink: 0;
}

.nax-bank-manual-banner summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  list-style: none;
}

.nax-bank-manual-banner summary::-webkit-details-marker { display: none; }

.nax-bank-manual-banner__icon { display: inline-flex; color: var(--nax-amber-text); flex-shrink: 0; }
.nax-bank-manual-banner__spacer { flex: 1; }

.nax-bank-manual-banner__action { font-weight: 600; color: var(--nax-accent-dark); white-space: nowrap; }

.nax-bank-manual-banner[open] .nax-bank-manual-banner__action { color: var(--nax-ink-45); }

/* Match column */
.nax-bank-match {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.nax-bank-match--match { color: var(--nax-green-text); }
.nax-bank-match--unc   { color: var(--nax-amber-text); }
.nax-bank-match--none  { color: var(--nax-ink-70); }
.nax-bank-match--rule  { color: var(--nax-accent-dark); }

.nax-bank-row-actions { display: flex; gap: 5px; justify-content: flex-end; align-items: center; }
.nax-bank-row-actions form { display: inline-flex; }

/* Received amounts read green, spends stay ink. */
.nax-bank-amount--in { color: var(--nax-green-text); }

/* ── Inline categorize form ─────────────────────────────────────────────── */

.nax-bank-catform td {
  padding: 0;
  background: var(--nax-ink-04);
}

.nax-bank-catform__inner {
  padding: 12px 16px 13px;
  border-top: 2px solid var(--nax-accent);
  box-shadow: inset 0 -1px 0 var(--nax-ink-10);
}

.nax-bank-catform__fields {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 10px;
}

.nax-bank-catform__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
}

.nax-bank-catform__field .nax-input,
.nax-bank-catform__field .nax-select {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.nax-bank-catform__meta { font-size: 0.66rem; color: var(--nax-ink-45); margin-top: 6px; }

.nax-bank-catform__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.nax-bank-catform__actions .nax-bank-catform__spacer { flex: 1; }

/* ── Manual entry form ──────────────────────────────────────────────────── */

.nax-bank-manual-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--nax-ink-10);
  background: var(--nax-ink-04);
}

/* ── Queue toolbar extras ───────────────────────────────────────────────── */

.nax-bank-rules-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nax-bank-stage-all {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nax-accent);
  cursor: pointer;
  white-space: nowrap;
}

.nax-bank-stage-all:hover { color: var(--nax-accent-dark); }

.nax-bank-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  text-transform: inherit;
  font: inherit;
  letter-spacing: inherit;
}

/* ── Bulk selection bar ─────────────────────────────────────────────────── */

.nax-bank-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  background: var(--nax-accent-lt);
  border-bottom: 1px solid var(--nax-ink-10);
  flex-shrink: 0;
}

.nax-bank-bulk-bar__count { font-size: 0.78rem; font-weight: 600; color: var(--nax-accent-dark); }

.nax-bank-bulk-bar__clear {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.76rem;
  color: var(--nax-ink-45);
  cursor: pointer;
}

.nax-bank-bulk-bar__clear:hover { color: var(--nax-ink); }

.nax-bank-review-table input[type="checkbox"] { accent-color: var(--nax-accent); }

/* ── Undo toast ─────────────────────────────────────────────────────────── */

/* The wrap reuses .nax-flash so the flash controller auto-dismisses it, but
   docks bottom-center instead of the corner stack. */
.nax-bank-toast-wrap {
  position: fixed;
  top: auto;
  right: auto;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: auto;
  z-index: var(--nax-z-cmd);
}

.nax-bank-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--nax-chrome-2);
  color: var(--nax-chrome-text);
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
  font-size: 0.8rem;
  white-space: nowrap;
}

.nax-bank-toast__check { color: var(--nax-green-light); flex-shrink: 0; }

.nax-bank-toast__undo {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--nax-signal);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.nax-bank-toast__undo:hover { text-decoration: underline; }

/* ── Settings: international disclosure ─────────────────────────────────── */

.nax-bank-intl { margin-top: 14px; }

.nax-bank-intl summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nax-ink-70);
}

/* ── Workspace sub-navigation (advanced surfaces for the selected account) ── */

.nax-bank-subnav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px;
  padding: 3px 4px;
  background: var(--nax-ink-04);
  border-radius: var(--nax-r);
  align-self: flex-start;
}

.nax-bank-subnav__label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
  padding: 0 8px;
  white-space: nowrap;
}

.nax-bank-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--nax-r-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nax-ink-70);
  text-decoration: none;
  white-space: nowrap;
}

.nax-bank-subnav a:hover { background: var(--nax-surface); color: var(--nax-ink); }

.nax-bank-setup-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--nax-amber-text);
  background: var(--nax-amber-bg);
  border-radius: var(--nax-r-sm);
  padding: 2px 6px;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

/* ── Rules page ─────────────────────────────────────────────────────────── */

.nax-bank-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.nax-bank-rule__auto {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-green-text);
  background: var(--nax-green-bg);
  border-radius: var(--nax-r-sm);
  padding: 2px 6px;
}

.nax-bank-rule-form {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--nax-ink-04);
  border-radius: var(--nax-r-sm);
}

/* Catalog: Items index + item record (built on the CoA card patterns above) */
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Items index. The list itself is a NAX table; what stays here is the
   page frame, the detail-drawer glimpse and the item record screens. */

.nax-items-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* The list fills the page and scrolls inside itself, so the shell's content
   padding comes off (finance turns it off for pages with a page header; this
   page has none — the breadcrumbs row names it and holds its buttons). The
   list puts the same padding back, so its edges line up with the Overview. */
.nax-page-content:has(> .nax-items-page) {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nax-items-page > .nax-coa-content {
  padding: 16px 20px 24px;
}

/* The list's toolbar: the filter bar, holding the view picker and the
   row-size switch, and then the location the quantities are for, a GET
   form of its own. One row when it fits; when it does not, the location
   moves to a row of its own rather than squeezing the search. */
.nax-items-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2);
  padding-inline-end: var(--nax-space-2);
  border-block-end: 1px solid var(--nax-ink-08);
}

.nax-items-toolbar > .nax-filter-bar {
  flex: 1 1 auto;
  min-inline-size: 0;
  border-block-end: 0;
}

.nax-items-toolbar > form {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--nax-space-2);
  padding-inline-start: var(--nax-space-2);
  color: var(--nax-ink-text-2);
  white-space: nowrap;
}

.nax-items-toolbar > form .nax-select {
  inline-size: auto;
}

.nax-items-toolbar .nax-item-views {
  flex: none;
  background: var(--nax-ink-05);
  font-weight: 600;
  anchor-name: --nax-item-views;
}

.nax-items-toolbar .nax-item-views:hover {
  background: var(--nax-ink-08);
}

/* The views list is the one popover outside the filter bar's form. It
   hangs under its own button, not under the search box. NAX styles a
   popover's menu buttons; these items are links, so they take the same
   shape here until NAX covers links too. */
@supports (position-area: block-end) {
  .nax-items-toolbar search > .nax-popover {
    position-anchor: --nax-item-views;
  }
}

.nax-items-toolbar search > .nax-popover menu a {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  min-block-size: var(--nax-row-compact);
  padding: 0 var(--nax-space-3);
  border-radius: var(--nax-r-sm);
  color: var(--nax-ink);
  text-decoration: none;
}

.nax-items-toolbar search > .nax-popover menu a:hover,
.nax-items-toolbar search > .nax-popover menu a:focus-visible {
  background: var(--nax-ink-04);
}

.nax-items-toolbar search > .nax-popover menu a[aria-current="page"] {
  font-weight: 600;
}

@media (pointer: coarse) {
  .nax-items-toolbar search > .nax-popover menu a {
    min-block-size: var(--nax-touch);
  }
}

.nax-items-page .nax-coa-footer nav {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
}

.nax-items-page .nax-coa-footer nav span {
  padding-inline-start: var(--nax-space-2);
}

/* Index DetailDrawer — Overview glimpse (compact read-only preview) */
.nax-item-glimpse {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nax-item-glimpse__identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nax-item-glimpse__desc {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  line-height: 1.4;
}

.nax-item-glimpse__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nax-item-glimpse__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nax-item-glimpse__kpis {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0;
  margin: 0;
}

.nax-item-glimpse__kpis .nax-acct-kpi {
  padding: 10px 12px;
}

.nax-item-glimpse__kpis .nax-acct-kpi__value {
  font-size: 1rem;
}

.nax-item-glimpse__footer {
  padding-top: 4px;
}

.nax-item-glimpse__open {
  font-size: 0.769rem;
  font-weight: 600;
  color: var(--nax-accent);
  text-decoration: none;
}

.nax-item-glimpse__open:hover {
  text-decoration: underline;
}

/* Kept for QR cards still used elsewhere on catalog screens */
.nax-item-mobile { display: flex; gap: 12px; padding: 12px 14px; align-items: center; }
.nax-item-qr {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  /* QR quiet zone stays white in both themes or scanners fail */
  background: #fff;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  padding: 5px;
  box-sizing: border-box;
}
.nax-item-qr svg { width: 100%; height: 100%; display: block; }
.nax-item-mobile__text { min-width: 0; }
.nax-item-mobile__link {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink);
  word-break: break-all;
}
.nax-item-mobile__hint {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  line-height: 1.45;
  margin-top: 4px;
}

.nax-item-activity-qty { font-family: var(--nax-font-mono); font-size: 0.769rem; font-weight: 500; }

/* Shared form field label (item templates, new item) */
.nax-item-form__label {
  display: block;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-3);
  margin-bottom: 4px;
}

/* Config pages (templates, categories): plain documents that scroll,
   unlike the items index whose card manages its own internal scroll. */
.nax-items-page--scroll {
  overflow-y: auto;
}
.nax-items-page--scroll .nax-card-detail {
  overflow: visible;
  flex: none;
}

/* Row-level delete on config tables */
.nax-item-row-delete {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.769rem;
  color: var(--nax-red-text);
  cursor: pointer;
  transition: opacity var(--nax-t);
}
.nax-item-row-delete:hover {
  opacity: .7;
}
.nax-item-row-delete.is-disabled {
  color: var(--nax-ink-text-3);
  cursor: not-allowed;
}

/* Item template edit form lives inside nax-card-detail; give the default
   .nax-form a little breathing room without going full-bleed. */
.nax-items-page--scroll .nax-card-detail > .nax-form {
  padding: 16px;
  box-sizing: border-box;
}
.nax-items-page--scroll .nax-card-detail > .nax-form .nax-form__actions {
  justify-content: flex-end;
}

/* Item template form inside settings shell (nax-coa-card wrapper). */
.nax-set-ws__page .nax-coa-card > .nax-form {
  padding: 16px;
  box-sizing: border-box;
}
.nax-set-ws__page .nax-coa-card > .nax-form .nax-form__actions {
  justify-content: flex-end;
}

/* Category tree indent in settings listing */
.nax-cat-tree-code {
  padding-left: calc(12px + (var(--depth, 0) * 18px));
}
.nax-item-row-delete-form {
  display: inline-block;
  margin-left: 10px;
}
.nax-item-row-delete.is-disabled {
  margin-left: 10px;
}

/* Settings item-template / category forms: fill the workspace main column.
   Global .nax-form stays capped at 960px for other screens. */
.nax-set-ws__page .nax-form--settings {
  max-width: none;
  width: 100%;
}
.nax-set-ws__page .nax-form--settings .nax-form__actions {
  justify-content: flex-end;
  border-top: 1px solid var(--nax-ink-08);
  padding-top: 12px;
  margin-top: 4px;
}

/* The stat strip sits above the list, not beside it. */
.nax-items-page .nax-coa-content {
  flex-direction: column;
}

/* The columns menu: row size and totals, a sort, then every column in order. */
.nax-item-columns {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-2);
  padding: 0 var(--nax-space-1) var(--nax-space-1);
  font-size: 0.846rem;
}

.nax-item-columns__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nax-space-2);
}

.nax-item-columns label {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  cursor: pointer;
}

.nax-item-columns__sort {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--nax-space-1) var(--nax-space-2);
  padding-block: var(--nax-space-2);
  border-block: 1px solid var(--nax-ink-08);
}

.nax-item-columns__sort nav {
  grid-column: 2;
  display: flex;
  gap: var(--nax-space-1);
}

.nax-item-columns__sort nav a {
  flex: 1;
  padding: 2px var(--nax-space-2);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  text-align: center;
  color: var(--nax-ink-70);
  text-decoration: none;
}

.nax-item-columns__sort nav a[aria-current] {
  background: var(--nax-ink);
  border-color: var(--nax-ink);
  color: var(--nax-surface);
}

.nax-item-columns__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-block-size: 16rem;
  overflow-y: auto;
}

.nax-item-columns__list li {
  display: flex;
  align-items: center;
  gap: 2px;
  min-block-size: var(--nax-control-sm);
  padding-inline-start: var(--nax-space-1);
  border-radius: var(--nax-r-sm);
}

.nax-item-columns__list li label {
  flex: 1;
}

.nax-item-columns__list li:hover {
  background: var(--nax-ink-04);
}

.nax-item-columns__list .nax-btn-icon {
  inline-size: 22px;
  block-size: 22px;
}

.nax-item-columns__list button[disabled] {
  opacity: .3;
}

.nax-item-columns footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-start: var(--nax-space-2);
  border-block-start: 1px solid var(--nax-ink-08);
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-item-columns footer p {
  margin: 0;
}

/* Saved views under the built-in ones, each deletable by its owner. */
.nax-item-views__heading {
  margin: var(--nax-space-2) var(--nax-space-2) var(--nax-space-1);
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-item-views__saved li {
  display: flex;
  align-items: center;
  gap: var(--nax-space-1);
}

.nax-item-views__saved li > a {
  flex: 1;
  min-inline-size: 0;
}

/* A long name keeps to one line; the link's title holds the rest. */
.nax-item-views__saved a > span {
  display: block;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nax-item-views__saved small {
  display: block;
  font-size: 0.692rem;
  font-weight: 400;
  color: var(--nax-ink-text-3);
}

.nax-item-views__saved form {
  display: contents;
}

.nax-item-views__saved button.nax-item-views__delete {
  flex: none;
  padding: 0;
  min-block-size: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 22px;
  block-size: 22px;
  border: 0;
  border-radius: var(--nax-r-sm);
  background: transparent;
  color: var(--nax-ink-text-3);
  cursor: pointer;
}

.nax-item-views__saved button.nax-item-views__delete:hover {
  background: var(--nax-red-bg);
  color: var(--nax-red-text);
}

.nax-item-save-view {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-2);
  padding: var(--nax-space-1) var(--nax-space-2) var(--nax-space-2);
  font-size: 0.846rem;
}

.nax-item-save-view > label:first-of-type {
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.nax-item-save-view__share {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  cursor: pointer;
}

.nax-item-save-view p {
  margin: 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-item-save-view button {
  align-self: flex-end;
}

/* Saved views pinned beside the table, the same height as it. */
.nax-items-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-block-size: 0;
}

/* No items at all: the illustration takes the table's place. */
.nax-items-empty {
  flex: 1;
}

/* Pinned or not, the panel is on the page; data-pinned shows it, so the
   pin answers at once. Pinned, the location picker moves into it. */
.nax-card-detail[data-pinned="false"] .nax-item-views-panel,
.nax-card-detail[data-pinned="true"] .nax-items-toolbar > .nax-item-quantities-for {
  display: none;
}

.nax-item-views-toggle button[aria-pressed="true"] {
  background: var(--nax-ink-08);
  color: var(--nax-ink);
}

.nax-items-body > .nax-table-wrap {
  flex: 1;
  min-inline-size: 0;
}

.nax-item-views-panel {
  flex: none;
  inline-size: 224px;
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-2);
  padding: var(--nax-space-2);
  border-inline-end: 1px solid var(--nax-ink-08);
  background: var(--nax-surface);
  font-size: 0.846rem;
}

.nax-item-views-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--nax-space-1) var(--nax-space-1) 0;
}

.nax-item-views-panel h2 {
  margin: 0;
  font-size: 0.923rem;
  font-weight: 600;
}

.nax-item-views-panel header form {
  display: contents;
}

.nax-item-views-panel menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nax-item-views-panel menu a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--nax-space-2);
  padding: var(--nax-space-1) var(--nax-space-2);
  border-radius: var(--nax-r-sm);
  color: var(--nax-ink-70);
  text-decoration: none;
}

.nax-item-views-panel menu a:hover {
  background: var(--nax-ink-04);
  color: var(--nax-ink);
}

.nax-item-views-panel menu a[aria-current="page"] {
  background: var(--nax-accent-lt);
  color: var(--nax-accent-darker);
  font-weight: 600;
}

.nax-item-views-panel data {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-item-views-panel li:not(:hover, :focus-within) .nax-item-views__delete {
  visibility: hidden;
}

.nax-item-views-panel .nax-item-views__heading {
  margin-inline: var(--nax-space-1);
}

.nax-item-views-panel__hint {
  margin: 0;
  padding: 0 var(--nax-space-2);
  font-size: 0.769rem;
  color: var(--nax-ink-text-3);
}

.nax-item-views-panel__totals {
  margin-block-start: auto;
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-1);
  padding: var(--nax-space-2) var(--nax-space-1) 0;
  border-block-start: 1px solid var(--nax-ink-08);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-item-views-panel__totals form {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-1);
}

.nax-item-views-panel__totals label {
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-item-views-panel__totals p {
  margin: 0;
}

.nax-item-views-toggle {
  display: contents;
}

.nax-item-views-toggle button[aria-pressed="true"] {
  background: var(--nax-ink-06);
  color: var(--nax-ink);
}

@media (max-width: 900px) {
  .nax-item-views-panel { display: none; }
}

/* The bulk bar: above the header while any row is ticked. */
.nax-item-bulk-bar:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2);
  padding: var(--nax-space-2);
  border-block-end: 1px solid var(--nax-ink-08);
  background: var(--nax-accent-lt);
}

.nax-item-bulk-bar > p {
  margin: 0 var(--nax-space-2) 0 0;
  color: var(--nax-accent-darker);
}

.nax-item-bulk-bar .nax-popover label {
  font-weight: 600;
}

.nax-item-bulk-bar .nax-popover footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--nax-space-2);
}

.nax-item-bulk-bar .nax-popover fieldset {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  margin: 0;
  padding: var(--nax-space-1) 0;
  border: 0;
}

.nax-item-bulk-bar .nax-popover legend {
  float: inline-start;
  inline-size: 8ch;
  font-weight: 600;
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Item record page: KPI strip, tab strip, and the overview / stock &
   storage tab cards. Shell classes (nax-acct-*, nax-panel-card,
   nax-coa-*) come from nuboc_finance/nax-finance.css. */

.nax-item-record__headmain { min-width: 0; }

.nax-item-kpis {
  grid-template-columns: repeat(6, 1fr);
  padding: 0 0 12px;
}

.nax-item-tabs {
  margin-bottom: 16px;
  flex-wrap: nowrap;
  /* No overflow:hidden — it clips the More dropdown menu (positioned
     absolute inside this strip). nowrap alone keeps the single row. */
}

/* More ▾ — looks like a tab; menu lists overflow destinations. */
.nax-item-tabs__more {
  flex-shrink: 0;
}

.nax-item-tabs__more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nax-item-tabs__more-caret {
  opacity: 0.7;
}

.nax-item-tabs__more-menu {
  min-width: 140px;
}

.nax-item-tabs__more-menu .nax-dropdown-item.is-active {
  color: var(--nax-accent);
  font-weight: 600;
  background: var(--nax-ink-05);
}

/* ── Inline editing ──
   Every editable card is a form of always-present "quiet" inputs that
   read like the values they replace; hover hints, focus rings, and the
   card's save bar appears only once something changes. */

.nax-quiet-input {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--nax-ink);
  font-weight: 500;
  text-align: right;
  padding: 1px 4px;
  margin: -1px -4px;
  border-radius: var(--nax-r-sm);
  flex: 1;
  min-width: 0;
  transition: background-color var(--nax-t), box-shadow var(--nax-t);
}

.nax-quiet-input:hover {
  background: var(--nax-ink-05);
  box-shadow: inset 0 -1px 0 var(--nax-ink-20);
}

.nax-quiet-input:focus {
  outline: none;
  background: var(--nax-surface);
  box-shadow: 0 0 0 2px rgba(var(--nax-accent-rgb), .35);
}

.nax-quiet-input::placeholder { color: var(--nax-ink-text-2); }

select.nax-quiet-input { cursor: pointer; }

.nax-quiet-input.nax-mono { font-family: var(--nax-font-mono); }

.nax-quiet-input--dim {
  flex: 0 1 64px;
  width: 64px;
  text-align: right;
}

.nax-item-dimset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nax-ink-text-2);
}

.nax-quiet-check {
  accent-color: var(--nax-accent);
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.nax-item-savebar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--nax-ink-07);
}

.nax-item-savebar[hidden] { display: none; }

.nax-item-errors {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--nax-red-text);
  border-radius: var(--nax-r-lg);
  background: var(--nax-ink-03);
  color: var(--nax-red-text);
  font-size: 0.769rem;
  font-weight: 500;
}

.nax-item-record .nax-coa-header-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.nax-item-btn--mini {
  height: 24px;
  padding: 0 9px;
  font-size: 0.692rem;
  display: inline-flex;
  margin-top: 6px;
}

.nax-item-btn--row {
  height: 26px;
  padding: 0 10px;
  font-size: 0.769rem;
}

/* Shared table cell treatments */
.nax-item-cell--code {
  font-family: var(--nax-font-mono);
  font-size: 0.846rem;
  color: var(--nax-accent);
  font-weight: 500;
}

.nax-item-cell--mono {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-item-cell--name {
  font-weight: 500;
  color: var(--nax-ink);
}

.nax-item-cell--dim {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

.nax-item-cell--sm { font-size: 0.692rem; }
.nax-item-cell--strong { font-weight: 600; }

.nax-item-col--badge { width: 100px; }
.nax-item-col--fill { width: 160px; }
.nax-item-col--itemno { width: 130px; }
.nax-item-col--conn { width: 150px; }
.nax-item-col--connect { width: 140px; }

.nax-item-row--total td {
  font-weight: 700;
  color: var(--nax-ink);
  background: var(--nax-ink-03);
}

.nax-item-row--disconnected { opacity: 0.55; }

.nax-item-muted { color: var(--nax-ink-text-2); }

.nax-item-card-foot {
  padding: 8px 14px;
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  border-top: 1px solid var(--nax-ink-07);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nax-item-card-foot--plain { border-top: 0; }

/* Supersession chain */
.nax-item-super__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--nax-ink-05);
}

.nax-item-super__no {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
  font-weight: 500;
  color: var(--nax-accent);
  width: 100px;
  flex-shrink: 0;
}

.nax-item-super__name {
  font-size: 0.769rem;
  color: var(--nax-ink);
  flex: 1;
}

.nax-item-super__state {
  font-size: 0.692rem;
  font-weight: 600;
}

.nax-item-super__arrow { color: var(--nax-green-text); }

/* Aside cards */
.nax-item-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nax-item-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 14px;
}

.nax-item-imgslot {
  aspect-ratio: 1;
  background: var(--nax-ink-05);
  border: 1px solid var(--nax-ink-08);
  border-radius: var(--nax-r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nax-ink-30);
  overflow: hidden;
}

.nax-item-imgslot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nax-item-imgslot--add {
  background: none;
  border: 1.5px dashed var(--nax-ink-20);
  color: var(--nax-ink-text-2);
  cursor: not-allowed;
  transition: border-color var(--nax-t);
}

.nax-item-mobile {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  align-items: center;
}

.nax-item-qrbox {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  padding: 6px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nax-ink-70);
}

.nax-item-mobile__meta { min-width: 0; }

.nax-item-mobile__link {
  font-size: 0.692rem;
  color: var(--nax-ink);
  word-break: break-all;
}

.nax-item-mobile__hint {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  line-height: 1.45;
  margin-top: 4px;
}

.nax-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  font-size: 0.692rem;
}

.nax-item-watchrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 8px;
}

.nax-item-watchrow__btn { margin-left: auto; margin-top: 0; }

.nax-item-avatars { display: flex; }

.nax-item-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nax-accent-lt);
  color: var(--nax-accent-dark);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  border: 1.5px solid var(--nax-surface);
  margin-left: -6px;
}

.nax-item-avatar:first-child { margin-left: 0; }

.nax-item-note {
  margin: 0 14px 12px;
  padding: 8px 10px;
  background: var(--nax-ink-03);
  border: 1px solid var(--nax-ink-07);
  border-radius: var(--nax-r-sm);
  font-size: 0.692rem;
  color: var(--nax-ink-70);
  line-height: 1.5;
}

/* Stock & storage tab */
.nax-item-stock {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nax-item-stock__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 900px) {
  .nax-item-stock__pair { grid-template-columns: 1fr; }
}

.nax-item-fill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nax-item-fill__track {
  width: 90px;
  height: 5px;
  background: var(--nax-ink-08);
  border-radius: 3px;
  overflow: hidden;
}

.nax-item-fill__bar {
  height: 100%;
  border-radius: 3px;
  transition: width var(--nax-t-med);
}

.nax-item-fill__pct {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

.nax-item-attention__icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.nax-item-entity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nax-item-entity__name {
  font-weight: 500;
  color: var(--nax-ink);
}


/* =============================================================================
   Overview — main column full width; Item details live in the Axis
   DetailDrawer shell column (see nax-detail-drawer.css).
   ============================================================================= */
.nax-item-overview-shell {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: visible;
  flex: 1;
  min-height: 0;
}

.nax-item-overview-shell .nax-acct-overview__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nax-acct-head__actions .nax-btn[data-detail-drawer-target="openBtn"],
.nax-acct-head__actions .nax-coa-header-btn[data-detail-drawer-target="openBtn"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nax-acct-head__actions .nax-btn[data-detail-drawer-target="openBtn"][hidden],
.nax-acct-head__actions .nax-coa-header-btn[data-detail-drawer-target="openBtn"][hidden] {
  display: none !important;
}

/* NubocCore parties: customers & vendors (built on the CoA/record patterns) */
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Parties (customers & vendors): list and record screens. Everything else
   these screens wear comes from nax-finance.css (coa/acct/panel-card) and the
   axis core — only what is genuinely unique to party screens lives here. */

.nax-parties-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Columns that yield on narrow viewports. */
@media (max-width: 1240px) {
  .nax-col-yield { display: none; }
}

.nax-party-col--number { width: 120px; }
.nax-party-col--name   { min-width: 170px; }
.nax-party-col--city   { width: 130px; }
.nax-party-col--kind   { width: 100px; }
.nax-party-col--group  { width: 130px; }
.nax-party-col--billto { min-width: 150px; }

.nax-party-col--role   { width: 150px; }
.nax-party-col--email  { width: 210px; }
.nax-party-col--phone  { width: 130px; }
.nax-party-col--badge  { width: 90px; }
.nax-party-col--dim    { width: 140px; }
.nax-party-col--addr-type { width: 100px; }

.nax-party-cell-strong {
  font-weight: 500;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.nax-party-cell-meta {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-party-kpis {
  grid-template-columns: repeat(6, 1fr);
  padding: 0 0 12px;
}

.nax-party-tabs {
  margin-bottom: 16px;
}

.nax-party-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nax-party-panel-note {
  padding: 8px 14px;
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  border-top: 1px solid var(--nax-ink-07);
}

.nax-party-tab-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Small mono cell text — document numbers, codes in party tables */
.nax-party-mono {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
}

/* ── Master-detail split (customer & vendor record pages) ──────────────────────
   The NAX record rail beside the record detail — iPad split view. NAX draws
   the rail; the split owns showing, hiding and resizing it. */

.nax-party-split {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.nax-party-split > .nax-acct-page {
  flex: 1;
  min-width: 0;
}

.nax-party-split.is-collapsed > .nax-record-rail {
  flex-basis: 0;
  width: 0;
}

/* The rail draws the row; the card lays out what the row shows. */
.nax-party-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.nax-party-card__num {
  font-family: var(--nax-font-mono);
  font-size: 0.641rem;
  font-weight: 500;
  color: var(--nax-accent);
  letter-spacing: 0.02em;
}
.nax-party-card__name {
  font-size: 0.808rem;
  font-weight: 600;
  color: var(--nax-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nax-party-card__meta {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Party record header — two rows: identity + actions, then badges + role link.
   Its own container (not shared .nax-acct-head) so it can stack two rows without
   touching the finance account head. */
.nax-party-head {
  position: sticky;
  top: 0;
  z-index: 11;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: var(--nax-canvas);
  border-bottom: 1px solid var(--nax-ink-10);
}
.nax-party-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.nax-party-head__row--meta { min-height: 22px; }
.nax-party-head__lead {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nax-party-list-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r);
  background: var(--nax-surface);
  color: var(--nax-ink-text-2);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.nax-party-list-toggle:hover {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
  border-color: var(--nax-ink-30);
}
.nax-party-list-toggle:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 1px;
}

/* Overlay the detail on small screens so the record never gets squeezed. */
@media (max-width: 860px) {
  .nax-party-split .nax-record-rail {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 20;
    box-shadow: var(--nax-sh-lg);
  }
}

/* Drag-to-resize handle at the rail/detail seam. Width persists per user
   (party_list controller → setPref); the split seeds --nax-record-rail-w. */
.nax-party-rail__resize {
  flex: 0 0 5px;
  cursor: col-resize;
  background: transparent;
  transition: background .12s;
  touch-action: none;
}
.nax-party-rail__resize:hover,
.nax-party-split.is-resizing .nax-party-rail__resize {
  background: var(--nax-ink-10);
}
.nax-party-rail__resize:focus-visible {
  outline: none;
  background: var(--nax-accent);
}

/* Freeze the width transition while dragging so the rail tracks the pointer. */
.nax-party-split.is-resizing .nax-record-rail { transition: none; }

/* No handle when the rail is hidden or is an overlay on small screens. */
.nax-party-split.is-collapsed .nax-party-rail__resize { display: none; }
@media (max-width: 860px) {
  .nax-party-rail__resize { display: none; }
}

/* Card enrichments: kind icon, dual-role chip, vendor AP balance + overdue. */
.nax-party-card__top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nax-party-card__kind {
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}
.nax-party-card__role {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 1px 4px;
  border-radius: var(--nax-r-sm);
  background: var(--nax-ink-05);
  color: var(--nax-ink-text-2);
  flex-shrink: 0;
}

.nax-party-card__meta--split {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  white-space: normal;
}
.nax-party-card__meta-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nax-party-card__amount {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink);
}

/* Inert context-bar menu link — a visible placeholder for a planned action;
   no handler, clearly not-yet-available. */
.nax-ctx-link.is-soon {
  opacity: 0.55;
  cursor: default;
}

/* Role link — a relationship (navigates), not a badge. Right of the badge row. */
.nax-party-rolelink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 0.731rem;
  font-weight: 600;
  color: var(--nax-accent);
  text-decoration: none;
  white-space: nowrap;
}
.nax-party-rolelink:hover { text-decoration: underline; }

/* Record paging sits at the end of the breadcrumb row. */
.nax-ctx-crumb-actions { margin-left: auto; }

/* Contacts & addresses tab — title and count on the left, Add on the right. */
.nax-party-panel-title { display: inline-flex; align-items: center; gap: 8px; }

/* Contact card — the address reads as a block, its source beneath it. */
.nax-contact-card__address { display: block; text-align: right; }
.nax-contact-card__address-meta { display: block; margin-top: 2px; font-size: 0.692rem; color: var(--nax-ink-text-2); text-align: right; }

/* Settings hub (Axis workspace) + NubocCore roles + NubocCompliance audit */
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Settings hub — task-grouped, status-aware. */

.nax-set {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.nax-set__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nax-ink);
  margin: 0;
}

.nax-set__subtitle {
  margin: 4px 0 18px;
  font-size: 0.9rem;
  color: var(--nax-ink-text-2);
}

.nax-set__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-surface);
  color: var(--nax-ink-text-2);
}

.nax-set__search:focus-within {
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 3px var(--nax-accent-dim);
}

.nax-set__search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--nax-ink);
}

.nax-set__results-label {
  margin: 18px 2px 12px;
  font-size: 0.815rem;
  color: var(--nax-ink-text-2);
}

.nax-set__empty {
  padding: 40px;
  text-align: center;
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-03);
  border-radius: var(--nax-r-lg);
}

.nax-set__group {
  margin-top: 28px;
}

.nax-set__group-title {
  font-size: 0.738rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nax-ink-text-2);
  margin: 0 0 10px;
}

.nax-set__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 680px) {
  .nax-set__grid { grid-template-columns: 1fr; }
}

/* ── Tile ── */






/* ── Status pill ── */


/* Inline link + form-hint used by settings detail pages (core + finance). */
.edit-link { color: var(--nax-accent); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; }
.edit-link:hover { color: var(--nax-accent-dark); }
.nax-form__hint { display: block; margin-top: 5px; font-size: 12px; color: var(--nax-ink-text-2); line-height: 1.4; }
.nax-form__hint code { font-family: var(--nax-font-mono); background: var(--nax-ink-05); padding: 1px 5px; border-radius: 4px; }

/* =============================================================================
   Settings workspace — persistent nav + setup directory + health header.
   Sits inside the app shell (.nax-page-content); the topbar/rail/sidebar are
   provided by the NubocAxis layout.
   ============================================================================= */

.nax-set-ws {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  /* Bleed to the panel edges so the workspace hugs the chrome — no canvas gap. */
  margin: -16px -20px -24px;
  min-height: 520px;
  background: var(--nax-canvas);
  border-radius: 12px 12px 0 0;
}
.nax-set-ws a { text-decoration: none; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nax-set-ws__nav {
  /* Lightweight rail — no surface panel, but a hairline seam and a real
     gutter so it reads as a nav column rather than floating on the page. */
  width: 224px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  /* Below the sticky chrome — measured by the chrome-offset controller. */
  top: var(--nax-settings-chrome, 108px);
  height: calc(100vh - var(--nax-topbar-h) - var(--nax-settings-chrome, 108px));
  overflow-y: auto;
  /* Same rule as every inner scroller: contain the wheel, keep the bar slim. */
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
  padding: 24px 14px 24px 28px;
  border-right: 1px solid var(--nax-ink-08);
}

/* On the hub (which has a page-header band), pin the header under the
   context bar and drop the nav below both. 108px = 36px bar + the
   title band (14px top pad + title + subtitle + 12px bottom pad). */
.nax-main:has(.nax-set-ws) .nax-page-header {
  position: sticky;
  top: 36px;
  z-index: 9;
  background: var(--nax-surface);
  border-bottom: 1px solid var(--nax-ink-08);
  padding: 14px 20px 12px;
}

.nax-set-ws__nav-head { padding: 0 0 10px; }

.nax-set-ws__id { display: flex; align-items: center; gap: 11px; }
.nax-set-ws__id-mark {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 9px; background: var(--nax-accent); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .03em;
}
.nax-set-ws__id-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nax-set-ws__id-tx .nm { font-size: 14px; font-weight: 600; color: var(--nax-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nax-set-ws__id-tx .ur { font-size: 12px; color: var(--nax-ink-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nax-set-ws__search {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 10px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-20); border-radius: var(--nax-r); color: var(--nax-ink-text-2);
}
.nax-set-ws__search:focus-within { border-color: var(--nax-accent); box-shadow: 0 0 0 3px var(--nax-accent-dim); }
.nax-set-ws__search input {
  border: none; outline: none; background: transparent;
  font-family: var(--nax-font-sans); font-size: 0.769rem; color: var(--nax-ink); width: 100%;
}
.nax-set-ws__hint { font-size: 0.615rem; color: var(--nax-ink-45); line-height: 1.4; margin: 6px 0 0; }

.nax-set-ws__nav-list { display: flex; flex-direction: column; gap: 1px; }
.nax-set-ws__nav-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 6px 9px; border-radius: var(--nax-r-sm);
  color: var(--nax-ink-70); transition: background var(--nax-t), color var(--nax-t);
}
.nax-set-ws__nav-item:hover { background: var(--nax-ink-05); color: var(--nax-ink); }
.nax-set-ws__nav-item.is-sel { background: var(--nax-accent-dim); color: var(--nax-accent); }
.nax-set-ws__nav-item .lead { color: var(--nax-ink-text-2); flex-shrink: 0; }
.nax-set-ws__nav-item.is-sel .lead { color: var(--nax-accent); }
.nax-set-ws__nav-item .t { flex: 1; font-size: 0.769rem; font-weight: 500; }
.nax-set-ws__nav-item.is-sel .t { font-weight: 600; }
.nax-set-ws__dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.nax-set-ws__dot--ok { background: var(--nax-green); }
.nax-set-ws__dot--warn { background: var(--nax-amber); }
.nax-set-ws__nav-divide { height: 1px; background: var(--nax-ink-10); margin: 7px 2px; }

.nax-set-ws__nav-foot {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-top: 1px solid var(--nax-ink-10); flex-shrink: 0; color: var(--nax-ink-text-2);
}
.nax-set-ws__av {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
  background: var(--nax-ink-70); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600;
}

/* ── Main column ─────────────────────────────────────────────────────── */
.nax-set-ws__main { flex: 1; min-width: 0; }
/* Scrolling belongs to .nax-main — this is just a plain wrapper now. */
.nax-set-ws__scroll { min-width: 0; }
/* Full-width workspace — the panel is the boundary. (A 1120px reading cap
   lived here once; every page that met it asked for the space back.) */
.nax-set-ws__page { max-width: none; margin: 0; padding: 15px 15px 15px 10px; }

/* App-screen height chain: bound every level from the panel down so the
   screen's flex body receives the EXACT remaining viewport height. No 100vh
   arithmetic anywhere — flexbox does the math, so nothing can cut off. */
.nax-page-content:has(.nax-roles__body) {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nax-page-content:has(.nax-roles__body) .nax-set-ws {
  flex: 1;
  min-height: 0;
}
.nax-page-content:has(.nax-roles__body) .nax-set-ws__main {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.nax-page-content:has(.nax-roles__body) .nax-set-ws__scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.nax-page-content:has(.nax-roles__body) .nax-set-ws__page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
}
/* The rail rides the bounded chain too — no viewport math needed here. */
.nax-page-content:has(.nax-roles__body) .nax-set-ws__nav {
  position: static;
  height: auto;
}

/* Overview cards stack with real air between them */
.nax-set-ws__page > .nax-card + .nax-card,
.nax-set-ws__page > .nax-card + .nax-set-ov__foot {
  margin-top: 16px;
}

/* ── Health header ───────────────────────────────────────────────────── */

/* ── Section heading ─────────────────────────────────────────────────── */
.nax-set-ws__sec { margin-top: 30px; }
.nax-set-ws__sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.nax-set-ws__sec-h h3 { font-size: 15px; font-weight: 700; color: var(--nax-ink); margin: 0; }
.nax-set-ws__sec-h .n { font-family: var(--nax-font-mono); font-size: 12px; color: var(--nax-ink-text-2); background: var(--nax-ink-05); padding: 2px 8px; border-radius: 999px; }
.nax-set-ws__sec-h .line { flex: 1; height: 1px; background: var(--nax-ink-10); }

/* ── Priority cards ──────────────────────────────────────────────────── */

/* ── Directory ───────────────────────────────────────────────────────── */

/* ── Area object-page ────────────────────────────────────────────────── */


/* Defaults fields (area object-page) */
.nax-set-ws__fields { padding: 16px 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.nax-set-ws__field { display: flex; flex-direction: column; gap: 6px; }
.nax-set-ws__field.is-wide { grid-column: 1 / -1; }
.nax-set-ws__field .fl { font-size: 0.615rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--nax-ink-text-2); }
.nax-set-ws__field .sel { position: relative; display: flex; align-items: center; }
.nax-set-ws__field .sel select { width: 100%; appearance: none; -webkit-appearance: none; height: 38px; padding: 0 34px 0 12px; font-family: var(--nax-font-sans); font-size: 14px; color: var(--nax-ink); background: var(--nax-surface); border: 1px solid var(--nax-ink-20); border-radius: 5px; cursor: pointer; }
.nax-set-ws__field .sel select:focus { outline: none; border-color: var(--nax-accent); box-shadow: 0 0 0 3px var(--nax-accent-dim); }
.nax-set-ws__field .sel svg { position: absolute; right: 11px; color: var(--nax-ink-text-2); pointer-events: none; }
.nax-set-ws__field .fh { font-size: 12px; color: var(--nax-ink-text-2); line-height: 1.4; }
@media (max-width: 720px) { .nax-set-ws__fields { grid-template-columns: 1fr; } }

/* ── Search results ──────────────────────────────────────────────────── */

.nax-set-ws__chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.nax-set-ws__chip { padding: 6px 13px; border: 1px solid var(--nax-ink-20); border-radius: 999px; background: var(--nax-canvas); font-size: 13px; font-weight: 600; color: var(--nax-ink-70); }
.nax-set-ws__chip:hover { border-color: var(--nax-accent); color: var(--nax-accent); }

/* ── Personalization ─────────────────────────────────────────────────── */
.nax-set-ws__pz-body { padding: 14px 20px 20px; }
.nax-set-ws__pz-foot { font-size: 12.5px; color: var(--nax-ink-text-2); margin: 14px 2px 0; }
.nax-set-ws__opt-grid { display: grid; gap: 12px; }
.nax-set-ws__opt-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
.nax-set-ws__opt-grid.is-2 { grid-template-columns: repeat(2, 1fr); }
.nax-set-ws__opt {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 12px; border: 1.5px solid var(--nax-ink-10); border-radius: 12px;
  background: var(--nax-surface); cursor: pointer; font-family: var(--nax-font-sans);
  transition: border-color var(--nax-t), box-shadow var(--nax-t);
}
.nax-set-ws__opt:hover { border-color: var(--nax-ink-20); }
.nax-set-ws__opt.is-sel { border-color: var(--nax-accent); box-shadow: 0 0 0 3px var(--nax-accent-dim); }
.nax-set-ws__opt .opt-aa { color: var(--nax-ink); font-weight: 600; line-height: 1; }
.nax-set-ws__opt .opt-l { font-size: 13.5px; font-weight: 600; color: var(--nax-ink); }
.nax-set-ws__opt .opt-d { font-size: 11.5px; color: var(--nax-ink-text-2); text-align: center; }
.nax-set-ws__opt .opt-theme { width: 100%; height: 48px; border-radius: 8px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px; border: 1px solid var(--nax-ink-10); }
.nax-set-ws__opt .opt-theme span { height: 4px; border-radius: 2px; display: block; width: 100%; }
.nax-set-ws__opt .opt-theme span:first-child { width: 60%; }
.nax-set-ws__opt .opt-theme--light { background: #f3f2ef; }
.nax-set-ws__opt .opt-theme--light span { background: rgba(12,14,17,.22); }
.nax-set-ws__opt .opt-theme--light span:first-child { background: rgba(12,14,17,.5); }
.nax-set-ws__opt .opt-theme--dark { background: #161921; }
.nax-set-ws__opt .opt-theme--dark span { background: rgba(255,255,255,.22); }
.nax-set-ws__opt .opt-theme--dark span:first-child { background: rgba(255,255,255,.6); }

/* ── Vision-test wizard ──────────────────────────────────────────────── */
.nax-set-ws__vt {
  position: fixed; inset: 0; z-index: var(--nax-z-modal, 500);
  display: none; align-items: center; justify-content: center;
  background: rgba(11,13,16,.55); backdrop-filter: blur(3px); padding: 20px;
}
.nax-set-ws__vt.is-open { display: flex; }
.nax-set-ws__vt .vt-card { width: 560px; max-width: 94vw; background: var(--nax-surface); border-radius: 18px; box-shadow: var(--nax-sh-lg); padding: 28px 28px 22px; }
.nax-set-ws__vt .vt-hero { text-align: center; padding: 12px 8px 6px; }
.nax-set-ws__vt .vt-eye { width: 58px; height: 58px; border-radius: 16px; background: var(--nax-accent-dim); color: var(--nax-accent); display: grid; place-items: center; margin: 0 auto 16px; }
.nax-set-ws__vt .vt-eye svg { width: 27px; height: 27px; }
.nax-set-ws__vt .vt-eye.is-ok { background: var(--nax-green-bg); color: var(--nax-green-text); }
.nax-set-ws__vt .vt-hero h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--nax-ink); margin: 0 0 8px; }
.nax-set-ws__vt .vt-hero p { font-size: 14.5px; line-height: 1.55; color: var(--nax-ink-70); margin: 0 auto; max-width: 42ch; }
.nax-set-ws__vt .vt-q { margin-bottom: 16px; }
.nax-set-ws__vt .vt-q h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--nax-ink); margin: 0 0 4px; }
.nax-set-ws__vt .vt-q p { font-size: 13.5px; color: var(--nax-ink-text-2); margin: 0; line-height: 1.45; }
.nax-set-ws__vt .vt-foot { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.nax-set-ws__vt .vt-foot .spacer { flex: 1; }
.nax-set-ws__vt .vt-dots { display: flex; gap: 6px; }
.nax-set-ws__vt .vt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--nax-ink-20); transition: background var(--nax-t); }
.nax-set-ws__vt .vt-dot.is-on { background: var(--nax-accent); }
.nax-set-ws__vt .vt-skip { font-size: 13.5px; font-weight: 600; color: var(--nax-ink-text-2); background: none; border: none; cursor: pointer; font-family: var(--nax-font-sans); }
.nax-set-ws__vt .vt-skip:hover { color: var(--nax-ink); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nax-set-ws__health { grid-template-columns: 1fr 1fr; }
  .nax-set-ws__prio { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nax-set-ws__dir-grid { grid-template-columns: 1fr; }
  .nax-set-ws__dir-grid .nax-set-ws__dir-row:nth-child(2) { border-top: 1px solid var(--nax-ink-10); }
  .nax-set-ws__dir-grid .nax-set-ws__dir-row:nth-child(odd) { border-right: none; }
}

/* =============================================================================
   Overview redesign — "Nuboc Settings" design (KPI strip, blocking-setup
   queue, area directory cards)
   ============================================================================= */
.nax-set-ov__crumb {
  margin: 0 0 2px;
  font-size: 0.692rem;
  color: var(--nax-ink-45);
}

.nax-set-ov__crumb a {
  color: var(--nax-ink-45);
  text-decoration: none;
}

.nax-set-ov__crumb a:hover {
  color: var(--nax-ink);
}

.nax-set-ov__crumb span:last-child {
  color: var(--nax-ink-70);
}

.nax-set-ov__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.nax-set-ov__kpi {
  display: flex;
  flex-direction: column;
  padding: 14px 18px 12px;
  border-right: 1px solid var(--nax-ink-10);
}

.nax-set-ov__kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.nax-set-ov__bar {
  height: 3px;
  background: var(--nax-ink-08);
  border-radius: 2px;
  margin: 8px 0 6px;
  overflow: hidden;
}

.nax-set-ov__bar span {
  display: block;
  height: 100%;
  background: var(--nax-accent);
  border-radius: 2px;
}

.nax-set-ov__kpi-link {
  margin-top: auto;
  padding-top: 9px;
  margin-bottom: -2px;
  border-top: 1px solid var(--nax-ink-08);
  font-size: 0.692rem;
  font-weight: 500;
  color: var(--nax-accent);
  text-decoration: none;
}

.nax-set-ov__kpi-link:hover {
  color: var(--nax-accent-dark);
}

.nax-set-ov__kpi:last-child {
  border-right: none;
}

.nax-set-ov__kpi-label {
  font-size: 0.615rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
}

.nax-set-ov__kpi-value {
  font-family: var(--nax-font-mono);
  font-size: 1.539rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--nax-ink);
}

.nax-set-ov__kpi-value span {
  color: var(--nax-ink-45);
}

.nax-set-ov__kpi-note {
  font-size: 0.692rem;
  color: var(--nax-ink-45);
  margin: 2px 0 10px;
}

.nax-set-ov__count {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-45);
}

.nax-set-ov__req-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--nax-ink-10);
}

.nax-set-ov__req-row:last-child {
  border-bottom: none;
}

.nax-set-ov__req-row:hover {
  background: var(--nax-ink-04);
}

.nax-set-ov__req-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nax-set-ov__req-icon {
  color: var(--nax-amber);
  flex-shrink: 0;
}

.nax-set-ov__req-name {
  font-size: 0.846rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-set-ov__req-key {
  font-family: var(--nax-font-mono);
  font-size: 0.615rem;
  color: var(--nax-ink-45);
}

.nax-set-ov__req-why {
  margin: 4px 0 0 22px;
  font-size: 0.692rem;
  color: var(--nax-ink-70);
}

.nax-set-ov__area-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nax-set-ov__area-title svg {
  color: var(--nax-ink-45);
}

/* CANONICAL tile grid for ALL category/area pages — one rule, no per-page
   variants: tiles are min 320px and share the row evenly, so column count
   is width-driven (2-up at moderate widths, 3-up full-bleed). The mock's
   3+1 and the build's 2×2 are both THIS rule at different widths. */
.nax-set-ov__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.nax-set-ov__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--nax-ink-10);
  border-right: 1px solid var(--nax-ink-10);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.nax-set-ov__item:nth-child(2n) {
  border-right: none;
}

a.nax-set-ov__item:hover {
  background: var(--nax-ink-04);
}

.nax-set-ov__item-name {
  display: block;
  font-size: 0.769rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.nax-set-ov__item-desc {
  display: block;
  font-size: 0.692rem;
  color: var(--nax-ink-70);
  margin-top: 3px;
}

.nax-set-ov__item-chev {
  color: var(--nax-ink-45);
  flex-shrink: 0;
}

.nax-set-ov__foot {
  margin: 0;
  font-size: 0.692rem;
  color: var(--nax-ink-45);
}

.nax-set-ov__foot a {
  color: var(--nax-ink-70);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Search results reuse the directory rows, single column */
.nax-set-ov__grid--single {
  grid-template-columns: 1fr;
}

.nax-set-ov__grid--single .nax-set-ov__item {
  border-right: none;
}

.nax-set-ov__item-crumb {
  display: block;
  font-size: 0.615rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-45);
  margin-bottom: 1px;
}

/* Status-dot legend at the foot of the settings rail. */
.nax-set-ws__legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding: 0 10px;
}

.nax-set-ws__legend > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.615rem;
  color: var(--nax-ink-text-2);
}

.nax-set-ws__legend .nax-set-ws__dot { position: static; flex-shrink: 0; }

/* Dismissible explainer strip under an area card (mock: slim row). */
.nax-area-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--nax-ink-10);
  border-radius: 5px;
  background: var(--nax-surface);
  margin-top: 12px;
}
.nax-area-callout > svg { color: var(--nax-ink-text-2); flex-shrink: 0; }
.nax-area-callout p { margin: 0; flex: 1; font-size: 0.692rem; color: var(--nax-ink-70, var(--nax-ink)); min-width: 0; }
.nax-area-callout code { font-family: var(--nax-font-mono); }
.nax-area-callout__x {
  border: none; background: transparent; cursor: pointer;
  color: var(--nax-ink-text-2); display: inline-flex; padding: 3px;
  border-radius: var(--nax-r-sm); flex-shrink: 0;
}
.nax-area-callout__x:hover { background: var(--nax-ink-05); color: var(--nax-ink); }
/* © 2026 Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   User profile — /me and read-only teammate profiles
   ============================================================================= */

.nax-profile {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  max-width: 1080px;
}

/* Identity card — avatar, name, roles centred */
.nax-profile-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 16px 14px;
}

.nax-profile-name {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nax-profile-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 2px;
}

/* Entity access — one row per entity, hairline between */
.nax-profile-entity {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-profile-entity:not(:last-child) {
  border-bottom: 1px solid var(--nax-ink-10);
}

/* Field grids inside cards */
.nax-profile-fields {
  padding: 12px 16px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

.nax-profile-body {
  padding: 12px 16px 14px;
}

/* Form rows: labelled fields with a submit aligned to the field baseline */
.nax-profile-form {
  display: grid;
  gap: 12px;
  align-items: end;
}

.nax-profile-form--pin  { grid-template-columns: 180px 180px auto; }
.nax-profile-form--lock { grid-template-columns: 240px auto; }
.nax-profile-form--org  { grid-template-columns: 240px auto auto; }

.nax-profile-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Copy */
.nax-profile-note {
  margin: 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.nax-profile-lead {
  margin: 0 0 10px;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
  max-width: 520px;
}

.nax-profile-caption {
  font-size: 0.692rem;
  color: var(--nax-ink-text-3);
}

.nax-profile-hint {
  margin: 8px 0 0;
  font-size: 0.692rem;
  color: var(--nax-ink-text-3);
}

/* Fields */
.nax-profile-input-readonly {
  color: var(--nax-ink-text-2);
  background: var(--nax-ink-04);
}

.nax-profile-pin-input {
  font-family: var(--nax-font-mono);
  letter-spacing: .2em;
}

/* A submit sized to sit level with the input row it ends */
.nax-profile-submit {
  height: var(--nax-row, 38px);
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Roles & permissions — master/detail with grouped, toggleable permissions. */

/* APP SCREEN: the body's height is real measured pixels — chrome-offset
   publishes --nax-workspace-top from getBoundingClientRect, so the frame
   ends exactly at the viewport bottom (20px breathing room) at any text
   scale or chrome height. Columns stretch to it and scroll internally. */
.nax-roles__body {
  display: flex;
  align-items: stretch;
  gap: 12px;
  height: calc(100vh - var(--nax-workspace-top, 300px) - 20px);
  min-height: 320px;
}

/* ── Master (roles list) ─────────────────────────────────────────────── */
.nax-roles__master {
  width: 268px; flex-shrink: 0;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10); border-radius: 5px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.nax-roles__master-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--nax-ink-10); }
.nax-roles__master-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nax-roles__master-title .t { font-size: 17px; font-weight: 700; color: var(--nax-ink); }
.nax-roles__master-title .m { font-size: 12px; color: var(--nax-ink-text-2); margin-top: 2px; }
.nax-roles__search {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 11px;
  border: 1px solid var(--nax-ink-20); border-radius: 9px; color: var(--nax-ink-text-2);
}
.nax-roles__search input { border: none; outline: none; background: transparent; font-family: var(--nax-font-sans); font-size: 13.5px; color: var(--nax-ink); width: 100%; }

.nax-roles__search:focus-within,
.nax-roles__filter:focus-within {
  border-color: var(--nax-accent);
  box-shadow: 0 0 0 3px var(--nax-accent-lt);
}

.nax-roles__list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 6px 18px 10px;
  /* The list is its own scroll context: never hand a mid-gesture wheel off
     to the page — that "sometimes the list, sometimes the page" feel. */
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
}
.nax-roles__list::-webkit-scrollbar { width: 8px; }
.nax-roles__list::-webkit-scrollbar-thumb { background: var(--nax-ink-20); border-radius: 4px; }
.nax-roles__list::-webkit-scrollbar-track { background: transparent; }
.nax-roles__group-label { font-size: 0.69rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nax-ink-text-2); padding: 12px 8px 6px; }
.nax-roles__role { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--nax-ink); text-decoration: none; transition: background var(--nax-t); }
.nax-roles__role:hover { background: var(--nax-ink-05); }
.nax-roles__role.is-sel { background: var(--nax-accent-dim); }
.nax-roles__role-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: var(--nax-ink-05); color: var(--nax-ink-text-2); display: grid; place-items: center; }
.nax-roles__role.is-sel .nax-roles__role-ic { background: var(--nax-surface); color: var(--nax-accent); }
.nax-roles__role-tx { display: flex; flex-direction: column; min-width: 0; }
.nax-roles__role-tx .nm { font-size: 14px; font-weight: 600; color: var(--nax-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nax-roles__role.is-sel .nax-roles__role-tx .nm { color: var(--nax-accent); }
.nax-roles__role-tx .mt { font-size: 12px; color: var(--nax-ink-text-2); }

/* ── Detail ──────────────────────────────────────────────────────────── */
/* The detail pane fills the body's height; the member and permission
   COLUMNS scroll inside it. One wheel context per column. */
.nax-roles__detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nax-roles__detail-inner { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }

/* Three-column layout: the head spans; below it members | permissions. */
.nax-roles__cols { display: flex; gap: 14px; flex: 1; min-height: 0; align-items: stretch; }

.nax-roles__empty { max-width: 360px; margin: 80px auto; text-align: center; }
.nax-roles__empty .ic { width: 56px; height: 56px; border-radius: 14px; background: var(--nax-accent-dim); color: var(--nax-accent); display: grid; place-items: center; margin: 0 auto 14px; }
.nax-roles__empty .t { font-size: 17px; font-weight: 700; color: var(--nax-ink); }
.nax-roles__empty .d { font-size: 13.5px; color: var(--nax-ink-text-2); margin-top: 4px; }

.nax-roles__head {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--nax-surface); border: 1px solid var(--nax-ink-10);
  border-radius: 5px; padding: 16px 18px;
}
.nax-roles__head-ic { width: 52px; height: 52px; flex-shrink: 0; border-radius: 13px; background: var(--nax-accent-dim); color: var(--nax-accent); display: grid; place-items: center; }
.nax-roles__head-tx { flex: 1; min-width: 0; }
/* Mock idiom: name, scope chip and id sit on ONE row; dates line beneath. */
.nax-roles__head-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nax-roles__head-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: var(--nax-ink); margin: 0; }
.nax-roles__scope { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--nax-ink-text-2); background: var(--nax-ink-05); padding: 3px 9px; border-radius: 7px; }
.nax-roles__id { display: inline-flex; align-items: center; gap: 6px; font-family: var(--nax-font-mono); font-size: 12px; color: var(--nax-ink-text-2); background: var(--nax-ink-05); padding: 3px 8px; border-radius: 6px; }
.nax-roles__copy { border: none; background: transparent; color: var(--nax-ink-text-2); cursor: pointer; display: inline-flex; padding: 0; }
.nax-roles__copy:hover { color: var(--nax-ink); }
.nax-roles__copy.is-copied { color: var(--nax-green-text); }
.nax-roles__dates { font-size: 12.5px; color: var(--nax-ink-text-2); margin-top: 5px; }
.nax-roles__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nax-roles__delete { width: 32px; height: 30px; display: grid; place-items: center; border: 1px solid var(--nax-ink-20); background: var(--nax-surface); border-radius: var(--nax-r-sm); color: var(--nax-red-text); cursor: pointer; }
.nax-roles__delete:hover { background: var(--nax-red-bg); border-color: var(--nax-red); }

/* Members — a column card: header, scrolling roster, add-member footer. */
.nax-roles__members {
  width: 300px; flex-shrink: 0;
  background: var(--nax-surface); border: 1px solid var(--nax-ink-10);
  border-radius: 5px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.nax-roles__members-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--nax-ink-10); }
.nax-roles__members-head h2 { font-size: 15px; font-weight: 700; color: var(--nax-ink); margin: 0; }
.nax-roles__members-head .ct { font-size: 12.5px; color: var(--nax-ink-text-2); }
.nax-roles__members-empty { flex: 1; display: flex; align-items: center; gap: 9px; padding: 16px; font-size: 13px; color: var(--nax-ink-text-2); }
.nax-roles__member-list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
  padding: 6px 8px;
}
.nax-roles__member-list::-webkit-scrollbar { width: 8px; }
.nax-roles__member-list::-webkit-scrollbar-thumb { background: var(--nax-ink-20); border-radius: 4px; }
.nax-roles__member { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.nax-roles__member:hover { background: var(--nax-ink-03); }
.nax-roles__avatar { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--nax-ink-70); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.nax-roles__member-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nax-roles__member-tx .nm { font-size: 13px; font-weight: 600; color: var(--nax-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nax-roles__member-tx .em { font-size: 11px; color: var(--nax-ink-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nax-roles__member-remove { border: none; background: transparent; color: var(--nax-ink-text-2); cursor: pointer; display: inline-flex; padding: 2px; border-radius: 50%; flex-shrink: 0; }
.nax-roles__member-remove:hover { background: var(--nax-ink-05); color: var(--nax-red-text); }
.nax-roles__add { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--nax-ink-10); }
.nax-roles__add-sel { flex: 1; min-width: 0; }
.nax-roles__add .nax-select-sm { height: 32px; width: 100%; }

/* Permissions — a single card: header, tools, SCROLLING group rows, footer */
.nax-roles__perms {
  flex: 1; min-width: 0;
  background: var(--nax-surface); border: 1px solid var(--nax-ink-10);
  border-radius: 5px; overflow: hidden;
  display: flex; flex-direction: column;
}
/* fabric_guard wraps the groups in a fieldset — keep the flex chain intact
   so the scroll region still gets its bounded height. */
.nax-roles__perms > .nax-guard { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nax-roles__groups {
  flex: 1; min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nax-ink-20) transparent;
}
.nax-roles__groups::-webkit-scrollbar { width: 8px; }
.nax-roles__groups::-webkit-scrollbar-thumb { background: var(--nax-ink-20); border-radius: 4px; }
.nax-roles__perms-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--nax-ink-10); }
.nax-roles__perms-head h2 { font-size: 15px; font-weight: 700; color: var(--nax-ink); margin: 0; }
.nax-roles__perms-head p { font-size: 12.5px; color: var(--nax-ink-text-2); margin: 2px 0 0; }
.nax-roles__granted { flex-shrink: 0; font-family: var(--nax-font-mono); font-size: 12.5px; color: var(--nax-ink-text-2); white-space: nowrap; }
.nax-roles__granted b { font-weight: 700; color: var(--nax-accent); }

.nax-roles__perms-tools { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--nax-ink-10); }
.nax-roles__filter { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--nax-ink-20); border-radius: 9px; color: var(--nax-ink-text-2); }
.nax-roles__filter input { border: none; outline: none; background: transparent; font-family: var(--nax-font-sans); font-size: 13.5px; color: var(--nax-ink); width: 100%; }
.nax-roles__link { border: none; background: transparent; color: var(--nax-accent); font-weight: 600; font-size: 13px; cursor: pointer; font-family: var(--nax-font-sans); }
.nax-roles__link:hover { color: var(--nax-accent-dark); }

.nax-roles__groups { display: flex; flex-direction: column; }
.nax-roles__group { border-bottom: 1px solid var(--nax-ink-10); }
.nax-roles__group:last-child { border-bottom: none; }
.nax-roles__group-row { display: flex; align-items: center; gap: 12px; padding: 13px 18px; cursor: pointer; transition: background var(--nax-t); }
.nax-roles__group-row:hover { background: var(--nax-ink-03); }
.nax-roles__group-ic { flex-shrink: 0; color: var(--nax-ink-text-2); display: inline-flex; }
.nax-roles__group-tx { flex: 1; min-width: 0; }
.nax-roles__group-tx .nm { font-size: 14px; font-weight: 600; color: var(--nax-ink); }
/* Mock keeps group rows single-line — the JS still updates this target, the
   count on the right carries the number. */
.nax-roles__group-tx .mt { display: none; }
.nax-roles__group-count { font-family: var(--nax-font-mono); font-size: 12.5px; font-weight: 600; color: var(--nax-accent); }
.nax-roles__chev { color: var(--nax-ink-text-2); display: inline-flex; transition: transform var(--nax-t); }
.nax-roles__group.is-open .nax-roles__chev { transform: rotate(90deg); }

.nax-roles__group-body { display: none; border-top: 1px solid var(--nax-ink-10); background: var(--nax-ink-03); }
.nax-roles__group.is-open .nax-roles__group-body { display: block; }
.nax-roles__perm { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--nax-ink-08); }
.nax-roles__perm:last-child { border-bottom: none; }
.nax-roles__perm-tx { flex: 1; min-width: 0; }
.nax-roles__perm-tx .nm { font-size: 14px; font-weight: 600; color: var(--nax-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nax-roles__perm-tx .de { font-size: 12.5px; color: var(--nax-ink-text-2); margin-top: 2px; }
.nax-roles__key { font-family: var(--nax-font-mono); font-size: 11px; font-weight: 500; color: var(--nax-ink-70); background: var(--nax-ink-05); padding: 1px 7px; border-radius: 5px; }

/* ── Toggle switch ───────────────────────────────────────────────────── */
.nax-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.nax-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.nax-switch__slider { position: absolute; inset: 0; background: var(--nax-ink-20); border-radius: 999px; cursor: pointer; transition: background var(--nax-t); }
.nax-switch__slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--nax-t); }
.nax-switch input:checked + .nax-switch__slider { background: var(--nax-accent); }
.nax-switch input:checked + .nax-switch__slider::before { transform: translateX(16px); }
.nax-switch input:indeterminate + .nax-switch__slider { background: var(--nax-accent); opacity: .45; }

@media (max-width: 820px) {
  .nax-roles__master { width: 240px; }
  .nax-roles__detail-inner { padding: 22px 18px 56px; }
}

/* ── Duplicate detection ─────────────────────────────────────────────── */
.nax-roles__dupe {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--nax-font-mono); font-size: 11px; font-weight: 600;
  color: var(--nax-amber-text); background: var(--nax-amber-bg);
  padding: 2px 7px; border-radius: 999px;
}
.nax-roles__dupes-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 14px; border-top: 1px solid var(--nax-ink-10);
  font-size: 12.5px; color: var(--nax-ink-text-2); line-height: 1.45;
}
.nax-roles__dupes-note svg { color: var(--nax-amber); flex-shrink: 0; margin-top: 2px; }
.nax-roles__dupes-note form { display: inline; }

/* ── Permission checkboxes (mock: checks, not switches) ─────────────── */
.nax-roles__tick-wrap { display: inline-flex; padding: 4px; cursor: pointer; flex-shrink: 0; }
.nax-roles__tick { width: 16px; height: 16px; accent-color: var(--nax-accent); cursor: pointer; }
.nax-roles__group-count.is-zero { color: var(--nax-ink-text-2); }
.nax-roles__perm .nax-roles__key { flex-shrink: 0; }
.nax-roles__perms-foot { margin: 0; padding: 12px 18px; border-top: 1px solid var(--nax-ink-10); font-size: 12.5px; color: var(--nax-ink-text-2); }

/* ── Break-glass keys: outside the groups, granted one at a time ─────── */
.nax-roles__break-glass { border-top: 1px solid var(--nax-ink-10); }
.nax-roles__break-glass h3 { display: flex; align-items: center; gap: var(--nax-space-2); margin: 0; padding: var(--nax-space-3) 18px var(--nax-space-1); font-size: 14px; font-weight: 700; color: var(--nax-red-text); }
.nax-roles__break-glass > p { margin: 0; padding: 0 18px var(--nax-space-3); font-size: 12.5px; color: var(--nax-ink-text-2); }
.nax-roles__break-glass form { display: flex; align-items: center; gap: var(--nax-space-3); flex-shrink: 0; }
.nax-roles__break-glass label { display: flex; align-items: center; gap: var(--nax-space-2); font-size: 12.5px; color: var(--nax-ink-text-2); }


/* Scope note — shown when the roles list is administering ONE entity rather
   than acting as the org-wide control tower (primary entity). */
.nax-roles__scope-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--nax-ink-text-2);
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Entity record page — two-column card grid per the Nuboc Entity mock. */

.nax-ent-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--nax-amber-bg);
  border: 1px solid var(--nax-amber);
  border-radius: 5px;
  margin-bottom: 12px;
}
.nax-ent-banner > svg { color: var(--nax-amber); flex-shrink: 0; }
.nax-ent-banner p { margin: 0; flex: 1 1 240px; font-size: 0.769rem; color: var(--nax-ink); min-width: 0; }

/* On a phone the setup form drops under the message instead of squeezing it. */
@media (max-width: 640px) {
  .nax-ent-banner form { flex-basis: 100%; }
}

.nax-ent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
  align-items: start;
}
.nax-ent-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* Label / value rows (Details, Fiscal period) */
.nax-ent-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 9px 16px;
  border-bottom: 1px solid var(--nax-ink-10);
}
.nax-ent-row:last-child { border-bottom: 0; }
.nax-ent-row:hover { background: var(--nax-ink-04, var(--nax-ink-05)); }
.nax-ent-row .lb { font-size: 0.692rem; color: var(--nax-ink-text-2); }
.nax-ent-row .vl { font-size: 0.769rem; color: var(--nax-ink); text-align: right; overflow-wrap: anywhere; }
.nax-ent-row .vl.mono { font-family: var(--nax-font-mono); }

.nax-ent-reveal {
  border: none; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; padding: 2px 4px;
  color: var(--nax-ink-text-2); border-radius: var(--nax-r-sm);
  vertical-align: -2px;
}
.nax-ent-reveal:hover { color: var(--nax-ink); background: var(--nax-ink-05); }
.nax-ent-reveal-form { display: inline; }

/* Entity roles grid — role rows linking into Roles & permissions */
.nax-ent-role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.nax-ent-role {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--nax-ink-10);
  border-right: 1px solid var(--nax-ink-10);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.nax-ent-role:hover { background: var(--nax-ink-04, var(--nax-ink-05)); }
.nax-ent-role .key { display: block; font-family: var(--nax-font-mono); font-size: 0.769rem; color: var(--nax-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nax-ent-role .de  { display: block; font-size: 0.692rem; color: var(--nax-ink-text-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nax-ent-role .ct  { font-family: var(--nax-font-mono); font-size: 0.615rem; color: var(--nax-ink-text-2); white-space: nowrap; }
.nax-ent-role .ct.has { color: var(--nax-ink); }

/* Generic list line (departments, locations, recent changes) */
.nax-ent-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid var(--nax-ink-10);
}
.nax-ent-line:last-child { border-bottom: 0; }
.nax-ent-line:hover { background: var(--nax-ink-04, var(--nax-ink-05)); }
.nax-ent-line .nm { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 0.769rem; font-weight: 600; color: var(--nax-ink); }
.nax-ent-line .nm svg { color: var(--nax-ink-text-2); flex-shrink: 0; }
.nax-ent-line .mt { font-family: var(--nax-font-mono); font-size: 0.692rem; color: var(--nax-ink-text-2); text-align: right; }

.nax-ent-chip {
  font-family: var(--nax-font-mono);
  font-size: 0.615rem;
  color: var(--nax-ink-text-2);
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  padding: 2px 5px;
  white-space: nowrap;
}

/* Logo card */
.nax-ent-logo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
}
.nax-ent-logo__box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 1px dashed var(--nax-ink-20);
  border-radius: 5px;
  background: var(--nax-ink-04, var(--nax-ink-05));
  overflow: hidden;
  flex-shrink: 0;
  color: var(--nax-ink-text-2);
}
.nax-ent-logo__box img { width: 100%; height: 100%; object-fit: contain; }
.nax-ent-logo__tt { margin: 0; font-size: 0.769rem; font-weight: 600; color: var(--nax-ink); }
.nax-ent-logo__de { margin: 2px 0 8px; font-size: 0.692rem; color: var(--nax-ink-text-2); }

/* Brand colour, under the logo: the company's email buttons and links */
.nax-ent-brand { padding: 12px 16px; border-top: 1px solid var(--nax-ink-07); }
.nax-ent-brand__form { display: flex; flex-direction: column; gap: 6px; }
.nax-ent-brand__row { display: flex; align-items: center; gap: 8px; }
.nax-ent-brand__swatch {
  width: 44px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm);
  background: var(--nax-surface);
  cursor: pointer;
}

/* Recent changes rows */
.nax-ent-change {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 16px;
  border-bottom: 1px solid var(--nax-ink-10);
  font-size: 0.692rem;
}
.nax-ent-change:last-child { border-bottom: 0; }
.nax-ent-change .wh { color: var(--nax-ink-70, var(--nax-ink)); min-width: 0; }
.nax-ent-change .dt { font-family: var(--nax-font-mono); font-size: 0.615rem; color: var(--nax-ink-text-2); white-space: nowrap; }

/* Dimension values — BC grammar: structural rows (headings/totals) read bold
   with a tinted band. */
.nax-dim-value--structural td { background: var(--nax-ink-03, var(--nax-ink-05)); }

/* Chart template preview — names indent under their parent, the way the
   chart itself shows them; headings and totals read bold. */
.nax-chart-tpl__name { display: inline-block; padding-left: calc(var(--depth, 0) * 16px); }
.nax-chart-tpl__name--total { font-weight: 600; }

/* The preview modal's switcher row: template picker, then "Use this template". */
.nax-chart-tpl__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.nax-chart-tpl__bar .nax-select { flex: 1 1 260px; max-width: 360px; }
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Number series form — the live preview of what the series will issue. */

.nax-ns-preview {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-lg);
  background: var(--nax-canvas);
  transition: opacity 120ms;
}
.nax-ns-preview.is-loading { opacity: .6; }

.nax-ns-preview__last { margin: 0 0 6px; font-size: 0.769rem; color: var(--nax-ink-text-2); }
.nax-ns-preview__numbers { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.nax-ns-preview__label {
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}
.nax-ns-preview__next { font-size: 1.25rem; font-weight: 600; color: var(--nax-ink); word-break: break-all; }
.nax-ns-preview__then { font-size: 0.769rem; color: var(--nax-ink-text-2); }

.nax-ns-preview__notes { margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.769rem; color: var(--nax-ink-text-2); }
.nax-ns-preview__notes li { display: flex; align-items: flex-start; gap: 6px; }
.nax-ns-preview__notes li + li { margin-top: 4px; }
.nax-ns-preview__notes li > svg { flex-shrink: 0; margin-top: 2px; color: var(--nax-amber); }
.nax-ns-preview__notes li.is-error { color: var(--nax-red-text); }
.nax-ns-preview__notes li.is-error > svg { color: currentColor; }

.nax-ns-tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.nax-ns-token {
  padding: 2px 7px;
  border: 1px solid var(--nax-ink-10);
  border-radius: 4px;
  background: var(--nax-surface);
  color: var(--nax-ink);
  font-size: 0.692rem;
  cursor: pointer;
}
.nax-ns-token:hover { border-color: var(--nax-accent); color: var(--nax-accent); }
.nax-ns-token:focus-visible { outline: 2px solid var(--nax-accent); outline-offset: 1px; }
.nax-ns-tokens__status { font-size: 0.692rem; color: var(--nax-ink-text-2); }
.nax-help-text code { padding: 0 4px; border-radius: 3px; background: var(--nax-ink-05); font-size: 0.692rem; }

/* Reset numbering — what still holds the series' numbers. */
.nax-ns-reset__blockers { margin: 6px 0 0; padding-left: 18px; }
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* Street-address search: NAX's dropdown menu, opened under the street field
   as a listbox of suggestions. */

.nax-address-search { position: relative; }

.nax-address-search .nax-dropdown-menu {
  right: 0;
  max-height: 280px;
  overflow-y: auto;
}

.nax-address-search .nax-dropdown-item {
  height: auto;
  min-height: 30px;
  padding: 6px 10px;
  white-space: normal;
}

/* The option moved to with the arrow keys reads like the hovered one. */
.nax-address-search .nax-dropdown-item[aria-selected="true"] {
  background: var(--nax-ink-05);
  color: var(--nax-ink);
}

/* Google's terms: suggestions shown outside a Google map carry its name. */
.nax-address-search__attribution {
  padding: 4px 10px 2px;
  font-size: 0.692rem;
  color: var(--nax-ink-45);
  text-align: right;
}

/* The address fields (nuboc_core/shared/_address_fields): street lines
   span the row; one column on a phone. */
.nax-address-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.nax-address-fields .nax-col-span-2 { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .nax-address-fields.nax-form-grid-2 { grid-template-columns: 1fr; }
}
/* © 2026 Nuboc IP LLC. All rights reserved. */
/* NubocHelp — tooltip, in-context drawer, and doc pages. */

/* ── Tooltip ─────────────────────────────────────────────────────────── */
.nax-tip {
  position: absolute;
  z-index: 60;
  max-width: 330px;
  padding: 8px 11px;
  font-size: 0.769rem;
  line-height: 1.45;
  color: var(--nax-ink);
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-10);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
}
.nax-tip__text { color: var(--nax-ink-70); }
.nax-tip__more {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.738rem;
  font-weight: 600;
  color: var(--nax-accent);
  text-decoration: none;
}
.nax-tip__more:hover { text-decoration: underline; }

/* Help affordance on labels/headers — a quiet circle that warms on hover. */
.nax-help-cue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
}
.nax-help-cue__icon { color: var(--nax-ink-35); }
.nax-help-cue:hover .nax-help-cue__icon { color: var(--nax-accent); }

/* ── Help pane — in-app column, pushes main aside (not a modal) ───────── */
.nax-help-pane {
  position: relative;   /* anchor for the drag handle */
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--nax-surface);
  margin-bottom: 8px;
  /* Self-contained card chrome lives on the base so the rounded corners and
     borders persist through open, close and toggle (not just while
     .is-open), instead of snapping to a hard corner mid-animation. */
  border-radius: 10px 10px 10px 10px;
  /* Always stop at the fixed rail's left edge — on the BASE, not just
     .is-open, so during the close animation the pane doesn't slide back
     under the rail (which would cover the rounded top-right corner and
     make it read as a hard corner). */
  margin-right: var(--nax-rail-w);
  display: flex;
  flex-direction: column;
  /* Animate the width so main content slides over rather than jumping. */
  transition: flex-basis .24s cubic-bezier(.4, 0, .2, 1), width .24s cubic-bezier(.4, 0, .2, 1);
}
.nax-help-pane[hidden] { display: none; }
/* Open width is a variable so the drag handle can set it and the user's
   preference (localStorage) can restore it. Falls back to the responsive
   default when unset. */
.nax-help-pane.is-open {
  flex: 0 0 var(--nax-help-pane-w, clamp(420px, 34vw, 620px));
  width: var(--nax-help-pane-w, clamp(420px, 34vw, 620px));
  /* Border strokes only while the pane has width — otherwise at width 0 the
     left and right 1px borders meet into a 2px seam for a frame as it closes. */
  border-left: 1px solid var(--nax-ink-10);
  border-right: 1px solid var(--nax-ink-10);
}
/* While dragging, kill the width transition so the pane tracks the pointer. */
.nax-help-pane.is-resizing { transition: none; }
.nax-help-pane.is-resizing .nax-help-pane__resize { background: var(--nax-ink-35); }

/* Drag handle — sits on the pane's left edge (the content/help seam). */
.nax-help-pane__resize {
  position: absolute;
  top: 0; bottom: 0; left: 0;   /* inside the pane — a negative left clips */
  width: 8px;
  cursor: col-resize;
  z-index: 4;
  background: transparent;
  transition: background var(--nax-t);
  touch-action: none;
}
.nax-help-pane__resize:hover { background: var(--nax-ink-10); }
/* Visible focus so keyboard users can see they've landed on the handle and
   can nudge it with ← / → (Shift for bigger steps). */
.nax-help-pane__resize:focus-visible {
  outline: none;
  background: var(--nax-ink-30);
  box-shadow: 0 0 0 2px var(--nax-ink-10);
}
/* .nax-main reserves rail-width margin on its right to clear the fixed
   rail — but the pane sits between them, turning that margin into a wide
   dark gap. Narrow it to a thin 5px seam whenever the pane is present.
   Keyed on :not([hidden]) — which is only set at the END of the close —
   NOT .is-open, so the seam stays 5px through the whole close animation
   instead of snapping back to the full rail width mid-animation. */
.nax-body:has(.nax-help-pane:not([hidden])) .nax-main { margin-right: 5px; }
/* The inner content is pinned to the OPEN width and clipped by the pane's
   overflow:hidden. As the pane animates open/closed, content is revealed or
   hidden as a whole — it never reflows (rewraps) frame-by-frame, so the
   close is smooth. */
.nax-help-pane turbo-frame {
  width: var(--nax-help-pane-w, clamp(420px, 34vw, 620px));
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Persistent toolbar — search (auto-submit + button) and close. Lives
   outside the frame so live search keeps input focus across reloads.
   Fixed to the open width for the same no-reflow close. */
.nax-help-pane__bar {
  width: var(--nax-help-pane-w, clamp(420px, 34vw, 620px));
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--nax-ink-08);
  box-sizing: border-box;
}
.nax-help-pane__search {
  flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 5px 10px;
  background: var(--nax-ink-03); border: 1px solid var(--nax-ink-10); border-radius: var(--nax-r);
  cursor: text;
}
/* The field label fills the rest of the box so a click anywhere but the
   button lands in the input. */
.nax-help-pane__search-field { flex: 1; display: flex; min-width: 0; cursor: text; }
.nax-help-pane__search:focus-within { border-color: var(--nax-accent); box-shadow: 0 0 0 3px var(--nax-accent-dim); }
.nax-help-pane__search-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--nax-ink-45); cursor: pointer; padding: 0; flex-shrink: 0;
}
.nax-help-pane__search-btn:hover { color: var(--nax-accent); }
.nax-help-pane__search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--nax-font-sans); font-size: 0.815rem; color: var(--nax-ink);
}
.nax-help-pane__search input::placeholder { color: var(--nax-ink-35); }

.nax-help-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nax-ink-08);
  flex-shrink: 0;
  border-radius: 10px;
}
.nax-help-drawer__crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nax-help-drawer__back { font-size: 0.769rem; color: var(--nax-accent); text-decoration: none; }
.nax-help-drawer__chip {
  font-size: 0.692rem; letter-spacing: .01em;
  color: var(--nax-ink-45); background: var(--nax-ink-05);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.nax-help-drawer__title-sm { font-size: 0.9rem; font-weight: 600; }
.nax-help-drawer__head-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nax-help-drawer__full { font-size: 0.738rem; color: var(--nax-ink-45); text-decoration: none; white-space: nowrap; }
.nax-help-drawer__full:hover { color: var(--nax-accent); }
.nax-help-drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--nax-ink-45); border-radius: 6px; cursor: pointer;
}
.nax-help-drawer__close:hover { background: var(--nax-ink-05); color: var(--nax-ink); }
.nax-help-drawer__body { padding: 18px 22px 44px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }

/* ── Doc pages (full page + drawer share prose styles) ───────────────── */
.nax-help-page { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; max-width: 1000px; padding: 8px 4px; }
.nax-help-page__main { min-width: 0; }
.nax-help-page__title { font-size: 1.4rem; font-weight: 700; margin: 0 0 6px; color: var(--nax-ink); }
.nax-help-page__summary { font-size: 0.9rem; color: var(--nax-ink-text-2); margin: 0 0 20px; line-height: 1.5; }
.nax-help-page__aside-block { margin-bottom: 20px; }
.nax-help-page__aside-title { font-size: 0.641rem; text-transform: uppercase; letter-spacing: .06em; color: var(--nax-ink-45); margin-bottom: 8px; }
.nax-help-page__related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nax-help-page__related a { font-size: 0.815rem; color: var(--nax-accent); text-decoration: none; }
.nax-help-page__related a:hover { text-decoration: underline; }
.nax-help-page__updated { font-size: 0.769rem; color: var(--nax-ink-45); }

@media (max-width: 720px) {
  .nax-help-page { grid-template-columns: 1fr; }
}
/* In the drawer, prose is single-column. */
.nax-help-drawer__body .nax-help-page { display: block; padding: 0; }
.nax-help-drawer__body .nax-help-page__aside { margin-top: 24px; border-top: 1px solid var(--nax-ink-08); padding-top: 16px; }

/* Prose */
.nax-help-prose { font-size: 0.9rem; line-height: 1.65; color: var(--nax-ink-70); }
.nax-help-prose h2 { font-size: 1.05rem; font-weight: 700; margin: 26px 0 8px; color: var(--nax-ink); }
.nax-help-prose h3 { font-size: 0.95rem; font-weight: 600; margin: 20px 0 6px; color: var(--nax-ink); }
.nax-help-prose p { margin: 0 0 12px; }
.nax-help-prose ul, .nax-help-prose ol { margin: 0 0 14px; padding-left: 22px; }
.nax-help-prose li { margin: 3px 0; }
.nax-help-prose a { color: var(--nax-accent); text-decoration: none; }
.nax-help-prose a:hover { text-decoration: underline; }
.nax-help-prose code { font-family: var(--nax-font-mono); font-size: 0.85em; background: var(--nax-ink-05); padding: 1px 5px; border-radius: 4px; }
.nax-help-prose pre.nax-help-code { background: var(--nax-ink-03); border: 1px solid var(--nax-ink-08); border-radius: 6px; padding: 12px 14px; overflow-x: auto; margin: 0 0 14px; }
.nax-help-prose pre.nax-help-code code { background: none; padding: 0; font-size: 0.8rem; }
.nax-help-prose blockquote { margin: 0 0 14px; padding: 8px 14px; border-left: 3px solid var(--nax-accent); background: var(--nax-accent-dim); border-radius: 0 6px 6px 0; color: var(--nax-ink-70); }

/* ── Index ───────────────────────────────────────────────────────────── */
.nax-help-index { max-width: 820px; padding: 8px 4px; }
.nax-help-index__group { margin-top: 26px; }
.nax-help-index__group-title { font-size: 0.738rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--nax-ink-text-2); margin: 0 0 10px; }
.nax-help-index__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nax-help-index__item { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.nax-help-index__item:hover { background: var(--nax-ink-03); }
.nax-help-index__item-title { display: block; font-size: 0.9rem; font-weight: 600; color: var(--nax-ink); }
.nax-help-index__item-summary { display: block; font-size: 0.815rem; color: var(--nax-ink-text-2); margin-top: 2px; }

/* ── Standalone /help layout (shared links, no tenant chrome) ─────────── */
.nax-help-standalone { background: var(--nax-canvas); min-height: 100vh; }
.nax-help-standalone__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; border-bottom: 1px solid var(--nax-ink-08);
  background: var(--nax-surface); position: sticky; top: 0; z-index: 5;
}
.nax-help-standalone__home { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--nax-ink); text-decoration: none; }
.nax-help-standalone__back { font-size: 0.815rem; color: var(--nax-accent); text-decoration: none; }
.nax-help-standalone__main { max-width: 1000px; margin: 0 auto; padding: 28px 24px 64px; }

/* Drawer search bar */
.nax-help-drawer__search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-bottom: 1px solid var(--nax-ink-08); flex-shrink: 0;
}
.nax-help-drawer__search-ic { color: var(--nax-ink-35); flex-shrink: 0; }
.nax-help-drawer__search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: var(--nax-font-sans); font-size: 0.815rem; color: var(--nax-ink);
}
.nax-help-drawer__search input::placeholder { color: var(--nax-ink-35); }

/* ── Reader view (Safari-style) ──────────────────────────────────────────
   Toggled per session; the text size and paper theme persist to the profile.
   Built for eye comfort over a long working day: quiet chrome, a single
   comfortable measure, generous line-height, and warm paper options. */

/* Reader toggle button in the bar — quiet until active. Hidden unless a doc
   page is showing (nothing to "read" on the index or a search list). */
.nax-help-pane__reader-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  border: none; background: transparent; color: var(--nax-ink-45);
  border-radius: 6px; cursor: pointer;
}
.nax-help-pane__reader-toggle:hover { background: var(--nax-ink-05); color: var(--nax-ink); }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-pane__reader-toggle {
  color: var(--nax-accent); background: var(--nax-accent-dim);
}
/* The reader toggle is always available while the pane is open — including on
   the index and search results, which now render in reader view too. So you can
   drop the whole help experience into reader mode from the top, without diving
   into an article first. */

/* Reader control cluster — takes the search bar's place while reading. */
.nax-help-pane__reader { display: none; flex: 1; align-items: center; gap: 12px; min-width: 0; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-pane__reader { display: flex; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-pane__search { display: none; }

.nax-help-reader-size { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.nax-help-reader-size__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  border: 1px solid var(--nax-ink-10); background: var(--nax-surface);
  color: var(--nax-ink-70); border-radius: 6px; cursor: pointer; line-height: 1;
}
.nax-help-reader-size__btn:first-child { border-radius: 6px 0 0 6px; }
.nax-help-reader-size__btn:last-child  { border-radius: 0 6px 6px 0; margin-left: -1px; }
.nax-help-reader-size__btn:hover { background: var(--nax-ink-03); color: var(--nax-ink); }

.nax-help-reader-themes { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nax-help-reader-sw {
  width: 18px; height: 18px; padding: 0; border-radius: 50%;
  border: 1px solid var(--nax-ink-20, var(--nax-ink-10)); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  transition: transform var(--nax-t);
}
.nax-help-reader-sw:hover { transform: scale(1.12); }
.nax-help-reader-sw.is-active {
  box-shadow: 0 0 0 2px var(--nax-surface), 0 0 0 4px var(--nax-accent);
}
.nax-help-reader-sw--paper { background: #fdfdfc; }
.nax-help-reader-sw--sepia { background: #f4ecd8; }
.nax-help-reader-sw--grey  { background: #e7e5df; }
.nax-help-reader-sw--night { background: #14161a; }
.nax-help-reader-sw--phone { background: linear-gradient(135deg, #fff 55%, #d7dce4 55%); }

/* Reading layout — quiet the chrome and center a comfortable measure. The
   drawer head STAYS (it holds the "All help" back link — reader must never be a
   one-way door); we just hide its noise and repaint it to match the paper. */
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-page__aside { display: none; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-drawer__head {
  background: var(--reader-bg, var(--nax-surface));
  border-bottom-color: var(--reader-line, var(--nax-ink-08));
  border-radius: 0;
  transition: background .2s ease;
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-drawer__chip,
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-drawer__full { display: none; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-drawer__back { color: var(--reader-accent, var(--nax-accent)); }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-drawer__title-sm { color: var(--reader-ink, var(--nax-ink)); }

/* The index and search results read in reader mode too — same paper, same
   comfortable measure, same ink — so reader is one coherent environment. */
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-index { max-width: var(--reader-measure, 66ch); margin: 0 auto; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-index__group-title,
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-index__item-summary { color: var(--reader-ink-soft, var(--nax-ink-text-2)); }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-index__item-title {
  color: var(--reader-ink, var(--nax-ink));
  font-size: calc(0.9rem * var(--nax-help-reader-scale, 1));
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-index__item:hover { background: var(--reader-tint, var(--nax-ink-03)); }

:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-drawer__body {
  padding: 40px clamp(18px, 7%, 60px) 80px;
  background: var(--reader-bg, var(--nax-surface));
  color: var(--reader-ink, var(--nax-ink));
  transition: background .2s ease, color .2s ease;
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-page { display: block; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-page__main {
  max-width: var(--reader-measure, 66ch); margin: 0 auto;
}

/* Reader type — scaled by the persisted --nax-help-reader-scale. */
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-page__title {
  font-size: calc(1.6rem * var(--nax-help-reader-scale, 1));
  line-height: 1.25; color: var(--reader-ink, var(--nax-ink)); margin-bottom: 10px;
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-page__summary {
  font-size: calc(1.02rem * var(--nax-help-reader-scale, 1));
  color: var(--reader-ink-soft, var(--nax-ink-text-2)); line-height: 1.55; margin-bottom: 26px;
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose {
  font-size: calc(1rem * var(--nax-help-reader-scale, 1));
  line-height: 1.8; color: var(--reader-ink, var(--nax-ink-70));
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose h2 {
  font-size: calc(1.24rem * var(--nax-help-reader-scale, 1));
  margin-top: 34px; color: var(--reader-ink, var(--nax-ink));
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose h3 {
  font-size: calc(1.08rem * var(--nax-help-reader-scale, 1)); color: var(--reader-ink, var(--nax-ink));
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose p,
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose li { margin-bottom: 14px; }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose a { color: var(--reader-accent, var(--nax-accent)); }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose code {
  background: var(--reader-tint, var(--nax-ink-05)); color: var(--reader-ink, inherit);
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose pre.nax-help-code {
  background: var(--reader-tint, var(--nax-ink-03)); border-color: var(--reader-line, var(--nax-ink-08));
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose blockquote {
  background: var(--reader-tint, var(--nax-accent-dim));
  border-left-color: var(--reader-accent, var(--nax-accent)); color: var(--reader-ink-soft, var(--nax-ink-70));
}

/* ── Reading themes — override colors locally so a dark-app user can still
   read on warm paper, and vice versa. ────────────────────────────────── */
:is(.nax-help-pane, .nax-help-center)[data-reader-theme="paper"].is-reader {
  --reader-bg: #fdfdfc; --reader-ink: #1c1d1f; --reader-ink-soft: #55575c;
  --reader-tint: rgba(0, 0, 0, .05); --reader-line: rgba(0, 0, 0, .1); --reader-measure: 66ch;
}
:is(.nax-help-pane, .nax-help-center)[data-reader-theme="sepia"].is-reader {
  --reader-bg: #f4ecd8; --reader-ink: #5b4636; --reader-ink-soft: #806648; --reader-accent: #9a6a2f;
  --reader-tint: rgba(91, 70, 54, .09); --reader-line: rgba(91, 70, 54, .18); --reader-measure: 62ch;
}
:is(.nax-help-pane, .nax-help-center)[data-reader-theme="grey"].is-reader {
  --reader-bg: #e7e5df; --reader-ink: #31302c; --reader-ink-soft: #5f5d56;
  --reader-tint: rgba(0, 0, 0, .05); --reader-line: rgba(0, 0, 0, .12); --reader-measure: 64ch;
}
:is(.nax-help-pane, .nax-help-center)[data-reader-theme="night"].is-reader {
  --reader-bg: #14161a; --reader-ink: #c7ccd4; --reader-ink-soft: #8b929c; --reader-accent: #8ab4f8;
  --reader-tint: rgba(255, 255, 255, .07); --reader-line: rgba(255, 255, 255, .12); --reader-measure: 64ch;
}
/* Phone — a narrow measure inside a device-like card, for a focused,
   reading-on-your-phone feel. */
:is(.nax-help-pane, .nax-help-center)[data-reader-theme="phone"].is-reader {
  --reader-bg: #e8eaee; --reader-ink: #1c1d1f; --reader-ink-soft: #55575c;
  --reader-tint: rgba(0, 0, 0, .05); --reader-line: rgba(0, 0, 0, .1); --reader-measure: 40ch;
}
:is(.nax-help-pane, .nax-help-center)[data-reader-theme="phone"].is-reader .nax-help-page__main {
  background: #fff; border-radius: 22px; padding: 30px 24px 34px;
  border: 1px solid rgba(0, 0, 0, .06); box-shadow: 0 14px 44px rgba(0, 0, 0, .16);
}

/* In-shell article breadcrumb (help_center#show). */
.nax-help-crumb {
  display: flex; align-items: center; gap: 7px; margin-bottom: 16px;
  font-size: 0.75rem; color: var(--nax-ink-45);
}
.nax-help-crumb__link { color: var(--nax-accent); text-decoration: none; }
.nax-help-crumb__link:hover { text-decoration: underline; }
.nax-help-crumb__sep { color: var(--nax-ink-35); flex-shrink: 0; }
.nax-help-crumb__area { color: var(--nax-ink-45); }
.nax-help-crumb__here { color: var(--nax-ink); }

/* ── Help center panel — self-contained inside the content region ─────────
   Full-bleeds the .nax-page-content padding so the inner documentation
   sidebar sits flush and the bar spans the top, matching the design. */
/* The help center owns the whole content region. Scoped to the help center via
   :has so no other page is affected: drop the padding (panel goes edge to edge,
   flush) and constrain the height so the panel fills it exactly — then the ONLY
   thing that scrolls is the inner content, while the rail, bar, topbar and app
   sidebar all stay fixed. */
.nax-page-content:has(> .nax-help-center) {
  padding: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nax-help-center {
  flex: 1;
  min-height: 0;          /* let it shrink to the region and scroll inside */
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--nax-canvas);
}

/* Inner documentation sidebar — area icon rail. The column stretches full
   height for the surface fill; the icons live in a sticky inner wrapper so they
   stay pinned while a long article scrolls (they don't ride up with it). */
.nax-help-center__rail {
  width: 56px; flex-shrink: 0; align-self: stretch;
  background: var(--nax-surface); border-right: 1px solid var(--nax-ink-10);
}
.nax-help-center__rail-inner {
  position: sticky; top: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0; gap: 4px;
}
.nax-help-center__rail-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: var(--nax-r); color: var(--nax-ink-45); text-decoration: none;
  transition: background var(--nax-t), color var(--nax-t);
}
.nax-help-center__rail-btn:hover { background: var(--nax-ink-05); color: var(--nax-ink); }
.nax-help-center__rail-btn.is-active { background: var(--nax-accent-dim); color: var(--nax-accent); }
.nax-help-center__rail-btn.is-empty { color: var(--nax-ink-20, var(--nax-ink-10)); cursor: default; }
.nax-help-center__rail-btn.is-empty:hover { background: transparent; color: var(--nax-ink-20, var(--nax-ink-10)); }
.nax-help-center__rail-div { width: 24px; height: 1px; background: var(--nax-ink-10); margin: 6px 0; }

.nax-help-center__body { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }

/* Help bar — title, search, theme, reader. Fixed at the top of the panel; the
   content below it is the only thing that scrolls. */
.nax-help-center__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--nax-ink-10);
  background: var(--nax-surface); flex-shrink: 0; z-index: 3;
}
.nax-help-center__title-wrap { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.nax-help-center__title { margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -.01em; color: var(--nax-ink); }
.nax-help-center__count { font-size: 0.6875rem; color: var(--nax-ink-45); white-space: nowrap; }
.nax-help-center__tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nax-help-center__search {
  display: flex; align-items: center; gap: 8px; width: 300px; max-width: 34vw; height: 32px;
  padding: 0 10px; border: 1px solid var(--nax-ink-20); border-radius: var(--nax-r-sm); background: var(--nax-ink-03);
}
.nax-help-center__search:focus-within { border-color: var(--nax-accent); box-shadow: 0 0 0 3px var(--nax-accent-dim); }
.nax-help-center__search-ic { color: var(--nax-ink-45); flex-shrink: 0; }
.nax-help-center__search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: var(--nax-font-sans); font-size: 0.8125rem; color: var(--nax-ink);
}
.nax-help-center__search input::placeholder { color: var(--nax-ink-45); }
.nax-help-center__kbd { font-size: 0.625rem; padding: 1px 5px; border-radius: 3px; background: var(--nax-ink-05); color: var(--nax-ink-45); flex-shrink: 0; }

.nax-help-center__theme { display: flex; align-items: center; height: 32px; border: 1px solid var(--nax-ink-20); border-radius: var(--nax-r-sm); overflow: hidden; }
.nax-help-center__theme-btn {
  height: 100%; padding: 0 9px; display: grid; place-items: center;
  border: none; border-left: 1px solid var(--nax-ink-10); background: transparent;
  color: var(--nax-ink-45); cursor: pointer; font-size: 0.625rem; font-weight: 600; letter-spacing: .04em;
}
.nax-help-center__theme-btn:first-child { border-left: none; }
.nax-help-center__theme-btn:hover { color: var(--nax-ink); }
.nax-help-center__theme-btn.is-active { background: var(--nax-accent-dim); color: var(--nax-accent); }

.nax-help-center__reader {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px;
  border: 1px solid var(--nax-ink-20); border-radius: var(--nax-r-sm);
  background: var(--nax-surface); color: var(--nax-ink); font-size: 0.75rem; font-weight: 500; cursor: pointer;
}
.nax-help-center__reader:hover { background: var(--nax-ink-03); }

/* Article bar carries a breadcrumb instead of the title/search. */
.nax-help-center__bar--article .nax-help-crumb { margin-bottom: 0; }

/* In-shell article — the center column of the same grid as the library, so the
   meta rail on the right is unchanged. Prose keeps a comfortable measure. */
.nax-help-article { max-width: 720px; }
.nax-help-article__updated { font-size: 0.6875rem; color: var(--nax-ink-45); margin: 0 0 20px; }
.nax-help-article__related { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--nax-ink-08); }
.nax-help-article__related .nax-help-page__related { margin-top: 8px; }

/* The only scroller — the browse/article body scrolls in its own div while the
   rail and bar stay static. */
.nax-help-center__content { padding: 20px; flex: 1; min-height: 0; overflow-y: auto; }
/* Anchor offset so a jumped-to area clears the sticky bar. */
.nax-help-lib__area[id] { scroll-margin-top: 64px; }

@media (max-width: 640px) {
  .nax-help-center__rail { display: none; }
  /* The theme segments drop on a narrow screen, but reader view stays —
     a small screen is where a clean reading column matters most, and
     hiding the toggle would also hide the way back out of reader view. */
  .nax-help-center__theme { display: none; }
}

/* ── In-app help center ("1a in-shell library") ──────────────────────────
   A full documentation directory rendered inside the app chrome: task
   starters, browse-by-area cards, and a meta rail. Ported from the Nuboc Help
   design to live tokens. */
.nax-help-lib {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .nax-help-lib { grid-template-columns: 1fr; }
}
.nax-help-lib__main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.nax-help-lib__eyebrow {
  font-size: 0.5625rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--nax-ink-45); margin-bottom: 8px;
}

/* Task starters — "How do I…" */
.nax-help-lib__tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 620px) { .nax-help-lib__tasks { grid-template-columns: 1fr; } }
.nax-help-lib__task {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--nax-surface); border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r); box-shadow: var(--nax-sh);
  text-decoration: none; transition: border-color var(--nax-t), box-shadow var(--nax-t);
}
.nax-help-lib__task:hover { border-color: var(--nax-accent); box-shadow: 0 0 0 3px var(--nax-accent-dim); }
.nax-help-lib__task-ic { color: var(--nax-accent); flex-shrink: 0; }
.nax-help-lib__task span { font-size: 0.8125rem; font-weight: 600; color: var(--nax-ink); }

/* Browse-by-area cards */
.nax-help-lib__areas { display: flex; flex-direction: column; gap: 14px; }
.nax-help-lib__area {
  background: var(--nax-surface); border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r); box-shadow: var(--nax-sh); overflow: hidden;
}
.nax-help-lib__area-head {
  height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 14px;
  border-bottom: 1px solid var(--nax-ink-10);
}
.nax-help-lib__area-ic { color: var(--nax-ink-45); }
.nax-help-lib__area-name { font-size: 0.8125rem; font-weight: 600; color: var(--nax-ink); }
.nax-help-lib__area-count { font-size: 0.6875rem; color: var(--nax-ink-45); }
.nax-help-lib__pages { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .nax-help-lib__pages { grid-template-columns: 1fr; } }
/* Hairline grid between page cells — right border on odd cells, bottom on all
   but the last row is approximated with a bottom border on every cell (the
   card clips the trailing one). */
.nax-help-lib__page {
  display: block; padding: 9px 14px; text-decoration: none;
  border-bottom: 1px solid var(--nax-ink-05); border-right: 1px solid var(--nax-ink-05);
  transition: background var(--nax-t);
}
.nax-help-lib__page:nth-child(2n) { border-right: none; }
.nax-help-lib__page:hover { background: var(--nax-ink-03); }
.nax-help-lib__page-title { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--nax-ink); }
.nax-help-lib__page-summary { display: block; font-size: 0.71875rem; color: var(--nax-ink-text-2); margin-top: 1px; line-height: 1.4; }

.nax-help-lib__empty {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  border: 1px dashed var(--nax-ink-20); border-radius: var(--nax-r);
  color: var(--nax-ink-45); font-size: 0.75rem;
}
.nax-help-lib__empty svg { flex-shrink: 0; }

/* Meta rail */
/* Meta rail stays static while the main column scrolls beside it. */
.nax-help-lib__rail { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; align-self: start; }
.nax-help-lib__starter {
  background: var(--nax-surface); border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r); padding: 4px 0; box-shadow: var(--nax-sh);
}
.nax-help-lib__starter-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; text-decoration: none; }
.nax-help-lib__starter-item:hover .nax-help-lib__starter-title { color: var(--nax-accent); }
.nax-help-lib__step {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 0.625rem;
  background: var(--nax-ink-05); color: var(--nax-ink-45);
}
.nax-help-lib__step.is-first { background: var(--nax-accent); color: #fff; }
.nax-help-lib__starter-title { font-size: 0.78125rem; font-weight: 600; color: var(--nax-ink); }

.nax-help-lib__links { display: flex; flex-direction: column; gap: 6px; }
.nax-help-lib__link { font-size: 0.78125rem; color: var(--nax-accent); text-decoration: none; }
.nax-help-lib__link:hover { text-decoration: underline; }
.nax-help-lib__updated { display: flex; flex-direction: column; gap: 7px; }
.nax-help-lib__updated-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.nax-help-lib__updated-date { font-size: 0.6875rem; color: var(--nax-ink-45); white-space: nowrap; }

/* "Only available in English" fallback note. */
.nax-help-fallback {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 16px; padding: 8px 12px;
  font-size: 0.769rem; color: var(--nax-ink-70);
  background: var(--nax-amber-bg); border: 1px solid var(--nax-ink-08);
  border-radius: 6px;
}

/* ── Doc tables ─────────────────────────────────────────────────────────
   Real headers and a caption, in a scroll container so a wide table never
   pushes the page sideways (and is tabbable when it does scroll). */
.nax-help-table-wrap {
  overflow-x: auto; margin: 0 0 20px;
  border: 1px solid var(--nax-ink-08); border-radius: 10px;
  background: var(--nax-surface);
}
.nax-help-table-wrap:focus-visible {
  outline: 2px solid var(--nax-accent); outline-offset: 2px;
}
.nax-help-table { width: 100%; border-collapse: collapse; font-size: 0.885rem; }
.nax-help-table caption {
  caption-side: top; text-align: left;
  padding: 10px 14px 8px; font-size: 0.769rem; color: var(--nax-ink-45);
}
.nax-help-table th {
  text-align: left; padding: 9px 14px; white-space: nowrap;
  font-size: 0.692rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--nax-ink-45); background: var(--nax-ink-03);
  border-bottom: 1px solid var(--nax-ink-08);
}
.nax-help-table td {
  padding: 11px 14px; vertical-align: top;
  border-bottom: 1px solid var(--nax-ink-05); color: var(--nax-ink-70);
}
.nax-help-table tbody tr:last-child td { border-bottom: 0; }
/* First column reads as the value being defined. */
.nax-help-table td:first-child {
  font-family: var(--nax-font-mono); font-size: 0.815rem; color: var(--nax-ink);
  white-space: nowrap;
}

/* ── Callouts ───────────────────────────────────────────────────────────
   The kind is spelled out in the title, so the meaning never rests on the
   color of the band alone. */
.nax-help-callout {
  margin: 0 0 18px; padding: 12px 16px;
  border-left: 3px solid var(--nax-ink-30); border-radius: 0 8px 8px 0;
  background: var(--nax-ink-03);
}
.nax-help-callout__title { margin: 0 0 4px; font-weight: 600; color: var(--nax-ink); }
.nax-help-callout__kind {
  display: inline-block; margin-right: 8px;
  font-size: 0.692rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--nax-ink-45);
}
.nax-help-callout p:last-child { margin-bottom: 0; }
.nax-help-callout p + p { color: var(--nax-ink-70); font-weight: 400; }

.nax-help-callout--note    { border-left-color: var(--nax-accent); background: var(--nax-accent-dim); }
.nax-help-callout--note .nax-help-callout__kind { color: var(--nax-accent); }
.nax-help-callout--tip     { border-left-color: var(--nax-green); background: var(--nax-green-bg); }
.nax-help-callout--tip .nax-help-callout__kind { color: var(--nax-green); }
.nax-help-callout--warning { border-left-color: var(--nax-amber); background: var(--nax-amber-bg); }
.nax-help-callout--warning .nax-help-callout__kind { color: var(--nax-amber); }
.nax-help-callout--blocked { border-left-color: var(--nax-red); background: var(--nax-red-bg); }
.nax-help-callout--blocked .nax-help-callout__kind { color: var(--nax-red); }

/* ── Step cards ─────────────────────────────────────────────────────────
   An ordered list whose items lead with a bold title becomes a numbered
   card stack. Plain ordered lists are left alone. */
.nax-help-prose ol:has(> li > strong:first-child) {
  list-style: none; padding-left: 0; counter-reset: nax-step;
}
.nax-help-prose ol:has(> li > strong:first-child) > li {
  counter-increment: nax-step;
  position: relative; margin: 0 0 10px; padding: 13px 16px 13px 48px;
  background: var(--nax-surface); border: 1px solid var(--nax-ink-08); border-radius: 10px;
  color: var(--nax-ink-70);
}
.nax-help-prose ol:has(> li > strong:first-child) > li::before {
  content: counter(nax-step);
  position: absolute; left: 15px; top: 13px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.692rem; font-weight: 700;
  background: var(--nax-accent); color: #fff;
}
.nax-help-prose ol:has(> li > strong:first-child) > li > strong {
  display: block; margin-bottom: 2px; color: var(--nax-ink); font-weight: 600;
}

/* Reader view: cards and tables follow the chosen paper. */
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-table-wrap,
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-prose ol:has(> li > strong:first-child) > li {
  background: transparent; border-color: var(--reader-line, var(--nax-ink-08));
}
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-table th { background: var(--reader-tint, var(--nax-ink-03)); }
:is(.nax-help-pane, .nax-help-center).is-reader .nax-help-callout { background: var(--reader-tint, var(--nax-ink-03)); }

/* ── Reader view in the help center ─────────────────────────────────────
   The article page reads the same way the side pane does — same toggle,
   same five papers, same saved text size. Turning it on clears the shell
   down to the column: the area rail, the meta rail and the related list
   step out of the way. */
.nax-help-center.is-reader .nax-help-center__rail,
.nax-help-center.is-reader .nax-help-lib__rail,
.nax-help-center.is-reader .nax-help-article__related { display: none; }

.nax-help-center.is-reader .nax-help-center__body,
.nax-help-center.is-reader .nax-help-center__content {
  background: var(--reader-bg, var(--nax-surface));
  color: var(--reader-ink, var(--nax-ink));
}
.nax-help-center.is-reader .nax-help-lib { display: block; }
.nax-help-center.is-reader .nax-help-article {
  max-width: var(--reader-measure, 66ch); margin: 0 auto; padding-top: 8px;
}
/* The bar stays — it carries the way back out of reader view. */
.nax-help-center.is-reader .nax-help-center__bar {
  background: var(--reader-bg, var(--nax-surface));
  border-bottom-color: var(--reader-line, var(--nax-ink-08));
}
.nax-help-center.is-reader .nax-help-crumb__link,
.nax-help-center.is-reader .nax-help-crumb__here { color: var(--reader-ink-soft, var(--nax-ink-70)); }
.nax-help-center.is-reader .nax-help-article__updated { color: var(--reader-ink-soft, var(--nax-ink-45)); }

/* Phone paper: the same device card as the pane. */
.nax-help-center[data-reader-theme="phone"].is-reader .nax-help-article {
  background: #fff; border-radius: 22px; padding: 30px 24px 34px;
  border: 1px solid rgba(0, 0, 0, .06); box-shadow: 0 14px 44px rgba(0, 0, 0, .16);
}

/* Reader controls in the article bar — hidden until reader view is on,
   so display:none keeps them out of the tab order while inactive. */
.nax-help-center__reader-controls { display: none; align-items: center; gap: 12px; }
.nax-help-center.is-reader .nax-help-center__reader-controls { display: flex; }
.nax-help-center.is-reader .nax-help-center__theme { display: none; }

.nax-help-center__reader-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--nax-ink-20);
  border-radius: var(--nax-r-sm); background: var(--nax-surface);
  color: var(--nax-ink-70); cursor: pointer;
}
.nax-help-center__reader-toggle:hover { background: var(--nax-ink-03); color: var(--nax-ink); }
.nax-help-center__reader-toggle[aria-pressed="true"] {
  background: var(--nax-accent-dim); border-color: var(--nax-accent); color: var(--nax-accent);
}
/* =============================================================================
   Settings — Audit log
   © 2026 Nuboc IP LLC. All rights reserved.
   ========================================================================== */

.nax-audit-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
}

.nax-audit-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nax-audit-filter .nax-label {
  font-size: 0.692rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nax-ink-text-2);
}

.nax-audit-scope-note {
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
  padding: 4px 0 10px;
}

.nax-audit-time {
  white-space: nowrap;
  color: var(--nax-ink-text-2);
}

.nax-audit-resource-id {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}


/* ── Table cell treatments (TableComponent columns) ── */
/* The time value reads at full ink; only the date half recedes. */
.nax-audit-time {
  color: var(--nax-ink);
}

.nax-audit-time__d {
  color: var(--nax-ink-text-2);
  margin-right: 4px;
}

.nax-audit-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nax-audit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Module prefix recedes so the verb carries the row. */
.nax-audit-action .mod {
  color: var(--nax-ink-text-2);
}

.nax-audit-res-cell {
  white-space: nowrap;
}

.nax-audit-res {
  color: inherit;
  text-decoration: none;
}

.nax-audit-res:hover .nax-audit-resource {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* =============================================================================
   Settings — Audit log (app/views/audit_logs)
   © 2026 Nuboc IP LLC. All rights reserved.
   The list is NAX's filter bar, date range picker, grouped table and detail
   drawer; this holds only what is the audit log's own: an entry's sentence
   over its code, a burst's disclosure, the severity legend, and the narrow
   layout that stacks who and what under the sentence.
   ========================================================================== */

/* The table runs to the bottom of the window: the chrome around it here (the
   filter bar above, the pager below) is less than NAX's default 220px, so the
   card stops a gutter short of the edge instead of leaving a gap. */
.audit-log {
  --nax-table-fill-offset: 172px;
}

.audit-log > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2);
}

.audit-log > header > .nax-filter-bar {
  flex: 1;
  min-inline-size: 0;
}

.audit-log > p {
  margin: var(--nax-space-2) 0;
  font-size: 0.846rem;
  color: var(--nax-ink-text-2);
}

/* ── An entry in the list: one line, cells centred at NAX's row size ── */
.audit-log td.col-date {
  color: var(--nax-ink-text-2);
  font-variant-numeric: tabular-nums;
}

.audit-log-event {
  color: var(--nax-ink);
}

.audit-log-event > .nax-badge-dot {
  margin-inline-end: var(--nax-space-1);
  vertical-align: middle;
}

.audit-log-event summary {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  inline-size: fit-content;
  cursor: pointer;
  list-style: none;
}

.audit-log-event summary::-webkit-details-marker {
  display: none;
}

.audit-log-event summary svg {
  color: var(--nax-ink-text-2);
  transition: rotate var(--nax-t);
}

.audit-log-event details[open] summary svg {
  rotate: 90deg;
}

.audit-log-event details ol {
  display: grid;
  margin: 0;
  padding: var(--nax-space-1) 0 var(--nax-space-2) var(--nax-space-5);
  list-style: none;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.audit-log-event details li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-log-event details a {
  margin-inline-end: var(--nax-space-2);
  font-family: var(--nax-font-mono);
  font-variant-numeric: tabular-nums;
}

.audit-log-event > [data-narrow] {
  display: none;
  margin: 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.audit-log-person {
  color: var(--nax-ink-70);
}

.audit-how {
  display: grid;
  gap: 2px;
  line-height: 1.25;
}

.audit-how code {
  justify-self: start;
  padding: 0 var(--nax-space-1);
  border: 1px solid var(--nax-ink-10);
  border-radius: var(--nax-r-sm);
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

.audit-looked-up-place {
  font-style: italic;
  color: var(--nax-ink-text-2);
}

.audit-looked-up-place small {
  font-size: 0.692rem;
  font-style: normal;
}

.audit-record {
  display: block;
  max-inline-size: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-record small {
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

.audit-record code {
  font-family: var(--nax-font-mono);
  font-size: 0.692rem;
  color: var(--nax-ink-text-2);
}

/* The whole row opens the entry; its chevron shows where, on hover or focus. */
.audit-log tbody tr.nax-coa-row {
  cursor: pointer;
}

.audit-log .col-actions a {
  display: inline-flex;
  color: var(--nax-ink-text-2);
  opacity: 0;
  transition: opacity var(--nax-t);
}

.audit-log tr:is(:hover, :focus-within, [aria-current="true"]) .col-actions a,
.audit-log .col-actions a:focus-visible {
  opacity: 1;
}

/* ── Footer: the page count, the severity legend, and MaxMind's credit ── */
.audit-log > footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nax-space-2);
}

.audit-log > footer > .nax-table-footer {
  flex: 1;
}

.audit-log > footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nax-space-3);
  margin: 0;
  padding: 0 var(--nax-space-3);
  list-style: none;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.audit-log > footer li {
  display: inline-flex;
  align-items: center;
  gap: var(--nax-space-1);
}

.audit-log > footer > p {
  flex-basis: 100%;
  margin: 0;
  padding: 0 var(--nax-space-3);
  color: var(--nax-ink-text-2);
}

/* ── Narrow: who and what move under the sentence ── */
@media (max-width: 768px) {
  .audit-log [data-narrow] .audit-how {
    display: inline-flex;
    gap: var(--nax-space-1);
  }

  .audit-log :is(.audit-log-person, .audit-log-how, .audit-log-record) {
    display: none;
  }

  .audit-log .audit-log-event > [data-narrow] {
    display: block;
  }

  .audit-log .audit-log-event {
    padding-block: var(--nax-space-1);
    white-space: normal;
  }
}

/* ── An entry's details: the drawer's frame, or its own page ── */
.audit-entry {
  display: grid;
  gap: var(--nax-space-4);
}

.audit-entry header {
  display: grid;
  gap: var(--nax-space-1);
}

.audit-entry header p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--nax-space-2);
  margin: 0;
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.audit-entry :is(h2, h3) {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--nax-ink);
}

.audit-entry section {
  display: grid;
  gap: var(--nax-space-2);
}

.audit-entry section > :is(h3, h4) {
  margin: 0;
  font-size: 0.692rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--nax-ink-text-2);
}

.audit-entry :is(code, pre) {
  font-family: var(--nax-font-mono);
  font-size: 0.769rem;
}

.audit-entry pre {
  margin: 0;
  padding: var(--nax-space-2);
  overflow-x: auto;
  border-radius: var(--nax-r-sm);
  background: var(--nax-canvas);
  white-space: pre-wrap;
  word-break: break-word;
}

.audit-entry small {
  display: block;
  color: var(--nax-ink-text-2);
  word-break: break-word;
}

.audit-entry output {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

.audit-changes {
  display: grid;
  gap: var(--nax-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.846rem;
}

.audit-changes strong {
  margin-inline-end: var(--nax-space-1);
  font-weight: 600;
}

.audit-changes del {
  color: var(--nax-red-dark);
  text-decoration: line-through;
}

.audit-changes ins {
  color: var(--nax-green-text);
  text-decoration: none;
}

/* ── Export menu ── */
.audit-export {
  display: grid;
  gap: var(--nax-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-export button {
  display: grid;
  inline-size: 100%;
  padding: var(--nax-space-2);
  border: 0;
  border-radius: var(--nax-r-sm);
  background: none;
  text-align: start;
  color: var(--nax-ink);
  cursor: pointer;
}

.audit-export button:is(:hover, :focus-visible) {
  background: var(--nax-ink-03);
}

.audit-export small {
  font-size: 0.769rem;
  color: var(--nax-ink-text-2);
}

/* Sign-in entry (/ and /login) */
/* © 2026 Nuboc IP LLC. All rights reserved. */

/* =============================================================================
   Sign-in entry — / and /login (app/views/pages/index.html.erb, layout sign_in)

   Two panes: the sign-in on the left, an outline of the app on the right (wide
   screens only). Everything speaks NAX tokens, so light and dark follow
   [data-theme] like the rest of the app. One headline style, no gradients.
   ============================================================================= */

.signin-page {
  background: var(--nax-surface);
}

.signin {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 960px) {
  .signin {
    grid-template-columns: minmax(440px, 5fr) 6fr;
  }
}

/* ── Left: brand, sign-in, footer ───────────────────────────────────────── */

.signin-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--nax-space-6) var(--nax-space-4);
}

@media (min-width: 600px) {
  .signin-column {
    padding: var(--nax-space-7) var(--nax-space-8);
  }
}

.signin-brand {
  display: inline-flex;
  border-radius: var(--nax-r-sm);
}

.signin-logo {
  display: block;
  height: 24px;
  width: auto;
}

/* The logo ships in navy; whiten it on dark, as the app's topbar does. */
[data-theme="dark"] .signin-logo {
  filter: brightness(0) invert(1);
  opacity: .92;
}

.signin-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nax-space-8) 0;
}

.signin-panel {
  width: 100%;
  max-width: 360px;
}

.signin-title {
  margin: 0 0 var(--nax-space-2);
  font-family: var(--nax-font-sans);
  font-size: 1.846rem;            /* 24px at the 13px root */
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--nax-ink);
}

.signin-lede {
  margin: 0 0 var(--nax-space-6);
  font-size: 1.077rem;            /* 14px */
  line-height: 1.55;
  color: var(--nax-ink-text-2);
}

.signin-email {
  font-weight: 500;
  color: var(--nax-ink);
  overflow-wrap: anywhere;
}

/* ── Notices: signed out, session ended, sign-in refused ────────────────── */

.signin-notices {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-2);
  margin: 0 0 var(--nax-space-5);
}

.signin-notices .nax-flash-item {
  align-items: flex-start;
  padding: 10px 12px;
  font-size: 1rem;
  line-height: 1.45;
}

.signin-notices .nax-flash-item svg {
  margin-top: 2px;
  flex-shrink: 0;
}

/* The NAX flash's alert and info text colours are light-theme values that
   drop below 4.5:1 on dark; the theme-aware text tokens hold in both. */
.signin-notices .nax-flash-item.alert,
.signin-notices .nax-flash-item.error {
  color: var(--nax-red-text);
}

.signin-notices .nax-flash-item.info {
  color: var(--nax-ink);
  background: var(--nax-ink-04);
  border-color: var(--nax-ink-10);
}

/* ── Actions ────────────────────────────────────────────────────────────── */

.signin-actions {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-3);
}

.signin-form {
  margin: 0;
}

.signin-actions .nax-btn.signin-primary,
.signin-actions .nax-btn.signin-secondary {
  width: 100%;
  height: var(--nax-touch);
  font-size: 1.077rem;
  border-radius: var(--nax-r);
}

.signin-actions .nax-btn.signin-secondary {
  background: transparent;
  border-color: var(--nax-ink-20);
  color: var(--nax-ink);
}

.signin-actions .nax-btn.signin-secondary:hover {
  background: var(--nax-ink-04);
  border-color: var(--nax-ink-30);
}

/* On dark the accent is a light cobalt; white text on it fails contrast. */
[data-theme="dark"] .signin-actions .nax-btn.signin-primary,
[data-theme="dark"] .signin-actions .nax-btn.signin-primary:hover {
  color: var(--nax-canvas);
}

/* A focus ring that reads on both themes and over the accent fill. */
.signin a:focus-visible,
.signin button:focus-visible,
.signin .nax-btn:focus-visible {
  outline: 2px solid var(--nax-accent);
  outline-offset: 2px;
  box-shadow: none;
}

.signin-new {
  margin-top: var(--nax-space-6);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--nax-ink-text-2);
}

.signin-new p {
  margin: 0;
}

.signin-new .signin-muted {
  margin-top: var(--nax-space-1);
  color: var(--nax-ink-text-3);
}

.signin-link {
  color: var(--nax-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  border-radius: 2px;
}

.signin-link:hover {
  color: var(--nax-accent-dark);
}

.signin-assurance {
  display: flex;
  align-items: center;
  gap: var(--nax-space-2);
  margin: var(--nax-space-7) 0 0;
  padding-top: var(--nax-space-4);
  border-top: 1px solid var(--nax-ink-08);
  font-size: 0.923rem;
  color: var(--nax-ink-text-3);
}

.signin-assurance svg {
  flex-shrink: 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.signin-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--nax-space-2) var(--nax-space-5);
  font-size: 0.923rem;
  color: var(--nax-ink-text-3);
}

.signin-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nax-space-1) var(--nax-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.signin-footer-link {
  display: inline-block;
  padding: var(--nax-space-1) 0;
  color: var(--nax-ink-text-3);
  text-decoration: none;
  border-radius: 2px;
}

.signin-footer-link:hover {
  color: var(--nax-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signin-copyright {
  margin: 0;
}

/* ── Right: an outline of the app ───────────────────────────────────────── */

.signin-aside {
  display: none;
}

@media (min-width: 960px) {
  .signin-aside {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--nax-space-8);
    background: var(--nax-canvas);
    border-left: 1px solid var(--nax-ink-08);
  }
}

.signin-showcase {
  width: 100%;
  max-width: 560px;
}

.signin-preview {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--nax-sh-md);
}

.signin-preview .pv-frame       { fill: var(--nax-surface); stroke: var(--nax-ink-10); }
.signin-preview .pv-chrome      { fill: var(--nax-chrome); }
.signin-preview .pv-chrome-mark { fill: var(--nax-signal); }
.signin-preview .pv-chrome-line { fill: var(--nax-chrome-ghost); }
.signin-preview .pv-sidebar     { fill: var(--nax-ink-03); stroke: var(--nax-ink-06); }
.signin-preview .pv-nav         { fill: var(--nax-ink-10); }
.signin-preview .pv-nav-active  { fill: var(--nax-accent-dim); }
.signin-preview .pv-tile        { fill: var(--nax-surface); stroke: var(--nax-ink-08); }
.signin-preview .pv-text        { fill: var(--nax-ink-10); }
.signin-preview .pv-text-strong { fill: var(--nax-ink-20); }
.signin-preview .pv-grid        { stroke: var(--nax-ink-06); stroke-width: 1; }
.signin-preview .pv-line {
  fill: none;
  stroke: var(--nax-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.signin-values {
  display: flex;
  flex-direction: column;
  gap: var(--nax-space-3);
  margin: var(--nax-space-7) 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.077rem;
  line-height: 1.45;
  color: var(--nax-ink);
}

.signin-values li {
  display: flex;
  align-items: flex-start;
  gap: var(--nax-space-3);
}

.signin-values svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--nax-accent);
}
/* © 2026 Nuboc IP LLC. All rights reserved.
 *
 * The waiting pages outside an organization (the environment status page,
 * the Terms page): one centered card. And the crane that builds a business
 * from blocks while an environment's database is made
 * (environment_statuses/_construction): its trolley carries a block per
 * 1.5-second swing, the building rises over seven swings and tops out with
 * its flag. .is-done stands it finished; reduced motion stands it still.
 */

.nax-waiting {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--nax-canvas, #f6f5f2);
}

.nax-waiting-card {
  width: 100%;
  max-width: 520px;
  padding: 32px 28px;
  background: var(--nax-surface);
  border: 1px solid var(--nax-ink-08);
  border-radius: 14px;
  box-shadow: 0 1px 2px var(--nax-ink-05), 0 12px 32px var(--nax-ink-06);
  text-align: center;
}

.nax-waiting-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--nax-ink);
}

.nax-waiting-message {
  margin: 0 auto;
  max-width: 40ch;
  color: var(--nax-ink-text-2);
  line-height: 1.5;
}

.nax-waiting-actions {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ── The construction scene ─────────────────────────────────────────── */

.construction {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 20px;
}

.construction__ground { stroke: var(--nax-ink-30); stroke-width: 2; stroke-linecap: round; }
.construction__pallet rect { fill: var(--nax-accent-lt, #c9d6f7); }
.construction__pallet rect:first-child { fill: var(--nax-ink-20); }

.construction__mast,
.construction__jib,
.construction__counterweight,
.construction__cab { fill: var(--nax-amber, #e8a317); }
.construction__counterweight { fill: var(--nax-ink-45); }
.construction__lattice { fill: none; stroke: var(--nax-surface); stroke-width: 1.5; }
.construction__tie { stroke: var(--nax-ink-30); stroke-width: 1; }
.construction__trolley > rect { fill: var(--nax-ink-70); }
.construction__cable { stroke: var(--nax-ink-70); stroke-width: 1.5; transform-box: view-box; }
.construction__hook { fill: none; stroke: var(--nax-ink-70); stroke-width: 2; stroke-linecap: round; }

.construction__block { fill: var(--nax-accent); }
.construction__block--2, .construction__block--5 { fill: var(--nax-accent-dark); }
.construction__block--carried { fill: var(--nax-accent); }

.construction__flag line { stroke: var(--nax-ink-70); stroke-width: 1.5; }
.construction__flag path { fill: var(--nax-amber, #e8a317); }

/* The trolley runs from the pallet (x 253) to the building (x 115); the load
   rises, travels, lowers and lets go, and the cable follows it. */
.construction__trolley { transform: translateX(253px); animation: construction-trolley 1.5s ease-in-out infinite; }
.construction__load { animation: construction-load 1.5s ease-in-out infinite; }
.construction__cable { transform-origin: 0 44px; animation: construction-cable 1.5s ease-in-out infinite; }
.construction__block--carried { animation: construction-carried 1.5s linear infinite; }

@keyframes construction-trolley {
  0%, 15%   { transform: translateX(253px); }
  50%, 72%  { transform: translateX(115px); }
  100%      { transform: translateX(253px); }
}

@keyframes construction-load {
  0%        { transform: translateY(-14px); }
  15%, 50%  { transform: translateY(-100px); }
  65%, 72%  { transform: translateY(-50px); }
  85%       { transform: translateY(-100px); }
  100%      { transform: translateY(-14px); }
}

@keyframes construction-cable {
  0%        { transform: scaleY(.868); }
  15%, 50%  { transform: scaleY(.057); }
  65%, 72%  { transform: scaleY(.528); }
  85%       { transform: scaleY(.057); }
  100%      { transform: scaleY(.868); }
}

@keyframes construction-carried {
  0%, 70%   { opacity: 1; }
  72%, 99%  { opacity: 0; }
  100%      { opacity: 1; }
}

/* The building: seven swings (10.5s). Block n lands as swing n lets go
   (1.08s into it), the flag on the seventh; all clear at the end. */
.construction__building > .construction__block,
.construction__flag { opacity: 0; animation: 10.5s ease-out infinite; }
.construction__building > .construction__block--1 { animation-name: construction-block-1; }
.construction__building > .construction__block--2 { animation-name: construction-block-2; }
.construction__building > .construction__block--3 { animation-name: construction-block-3; }
.construction__building > .construction__block--4 { animation-name: construction-block-4; }
.construction__building > .construction__block--5 { animation-name: construction-block-5; }
.construction__building > .construction__block--6 { animation-name: construction-block-6; }
.construction__building > .construction__flag { animation-name: construction-flag; }

@keyframes construction-block-1 { 0%, 10% { opacity: 0; transform: translateY(-8px); } 12%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes construction-block-2 { 0%, 24% { opacity: 0; transform: translateY(-8px); } 26%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes construction-block-3 { 0%, 38% { opacity: 0; transform: translateY(-8px); } 40%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes construction-block-4 { 0%, 53% { opacity: 0; transform: translateY(-8px); } 55%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes construction-block-5 { 0%, 67% { opacity: 0; transform: translateY(-8px); } 69%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes construction-block-6 { 0%, 81% { opacity: 0; transform: translateY(-8px); } 83%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes construction-flag    { 0%, 94% { opacity: 0; } 96%, 98% { opacity: 1; } 100% { opacity: 0; } }

/* Finished: the building stands with its flag up, the crane parked. */
.construction.is-done *,
.construction.is-done { animation: none !important; }
.construction.is-done .construction__building > .construction__block,
.construction.is-done .construction__flag { opacity: 1; transform: none; }
.construction.is-done .construction__trolley { transform: translateX(253px); }
.construction.is-done .construction__load { transform: translateY(-100px); }
.construction.is-done .construction__cable { transform: scaleY(.057); }
.construction.is-done .construction__block--carried { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .construction * { animation: none !important; }
  .construction__building > .construction__block { opacity: 1; }
  .construction__load { transform: translateY(-100px); }
  .construction__cable { transform: scaleY(.057); }
  .construction__block--carried { opacity: 0; }
}

.environment-status__title,
.environment-status__message { transition: opacity .3s ease; }


/* =============================================================================
   Theme Overrides
   ============================================================================= */

/* body.nax-app {
  background-color: #1a1a1a;
}
.nax-body {
  background-color: #f1f1f1;
  border-radius: 15px 15px 0 0;

}
.nax-sidebar {
  border-radius: 15px 0 0 0;
}

.nax-topbar {
  background-color: #1a1a1a;
} */
