/*
  accessUSA workspace — design system. Loaded last on every page.

  One place for colour, type, spacing and controls. New pages use the ax-* classes only.
  Older feature stylesheets (board, billing, workflows, media…) are still loaded; the
  "bridges" section at the end maps their most visible parts onto these tokens. When a
  feature stylesheet is rewritten, delete its bridge.

  Same identity as accessusa.tech: night navy canvas, signal blue for actions,
  red kept for alerts, Barlow Condensed for page titles, Barlow for everything else.
  Fonts are self-hosted (SIL OFL, licences in /static/fonts).
*/
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/barlow-condensed-800.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --ax-night: #050f26;
  --ax-night-2: #071538;
  --ax-deck: #0b1d49;
  --ax-deck-hi: #12296a;
  --ax-line: rgba(150, 176, 255, .16);
  --ax-line-2: rgba(150, 176, 255, .32);
  --ax-white: #f5f7fd;
  --ax-mist: #aab8da;
  --ax-dim: #8e9ec4;
  --ax-signal: #2b62f2;
  --ax-signal-hi: #6f9bff;
  --ax-red: #e02238;
  --ax-red-soft: #ff8795;
  --ax-ok: #5fe0a4;
  --ax-warn: #ffc56b;
  --ax-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --ax-text: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ax-r: .75rem;
  --ax-r-l: 1.125rem;
  --ax-gutter: clamp(1rem, 3.4vw, 2rem);
  --ax-top-h: 4rem;
  /* legacy variables used by older stylesheets */
  --bg: var(--ax-night); --panel: var(--ax-deck); --panel-2: var(--ax-night-2); --line: var(--ax-line-2);
  --text: var(--ax-white); --muted: var(--ax-mist); --accent: var(--ax-signal); --radius: var(--ax-r-l);
}

/* ---------- Base ---------- */
body.ax { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--ax-night) linear-gradient(180deg, #071538 0, #050f26 26rem) no-repeat; color: var(--ax-white); font: 400 1rem/1.5 var(--ax-text); -webkit-font-smoothing: antialiased; }
body.ax > main, body.ax > .ax-page { flex: 1 0 auto; }
.ax a { color: inherit; }
.ax :focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 4px; }
.ax-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ax-skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; border-radius: var(--ax-r); background: #fff; color: #0a1a44 !important; font-weight: 600; }
.ax-skip:focus { top: 1rem; }
.ax-main-anchor { height: 0; outline: 0; }
.ax .muted { color: var(--ax-mist); }
.ax h1, .ax h2, .ax h3 { color: var(--ax-white); letter-spacing: 0; }

/* ---------- Header ---------- */
.ax-top { position: sticky; top: 0; z-index: 30; background: rgba(5, 15, 38, .94); border-bottom: 1px solid var(--ax-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ax-top-in { display: flex; align-items: center; gap: 1.5rem; min-height: var(--ax-top-h); width: min(96rem, 100% - 2 * var(--ax-gutter)); margin: 0 auto; }
.ax-brand { display: inline-flex; align-items: center; gap: .625rem; flex: none; text-decoration: none; }
.ax-brand .brand-symbol { position: static; flex: none; width: 2.25rem; height: 2.25rem; border-radius: .625rem; overflow: hidden; background: #070c20; }
.ax-brand .brand-symbol img { position: static; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ax-brand .brand-wordmark { font: 600 1.3125rem/1 var(--ax-text); letter-spacing: -.012em; color: var(--ax-white); }
.ax-brand .brand-wordmark .brand-usa { color: transparent; background: linear-gradient(90deg, #6f9bff 5%, #b9a0ee 48%, #ff6475 88%); -webkit-background-clip: text; background-clip: text; }
.ax-brand .brand-wordmark .brand-usa::after { display: none; }
.ax-nav { display: flex; align-items: center; gap: .25rem; flex: 1 1 auto; min-width: 0; }
.ax-nav > a { position: relative; padding: .5rem .75rem; border-radius: .5rem; color: var(--ax-mist); font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.ax-nav > a:hover { color: var(--ax-white); background: rgba(255, 255, 255, .06); }
.ax-nav > a[aria-current="page"] { color: var(--ax-white); }
.ax-nav > a[aria-current="page"]::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: -.72rem; height: 3px; border-radius: 3px 3px 0 0; background: var(--ax-red); }
.ax-nav-admin { margin-left: .5rem; }
.ax-nav-end { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.ax-nav-guest { flex: 1; justify-content: flex-end; }
.ax .language-switch { display: inline-flex; gap: 0; padding: .1875rem; border: 1px solid var(--ax-line-2); border-radius: .625rem; background: transparent; }
.ax .language-switch button { min-width: 2.375rem; min-height: 2.125rem; padding: 0 .5rem; border: 0; border-radius: .4375rem; background: transparent; color: var(--ax-mist); font: 600 .8125rem/1 var(--ax-text); cursor: pointer; }
.ax .language-switch button[aria-pressed="true"] { background: rgba(255, 255, 255, .14); color: #fff; }
.ax-user { position: relative; }
.ax-user > summary { display: inline-flex; align-items: center; gap: .5rem; max-width: 14rem; min-height: 2.75rem; padding: .25rem .625rem .25rem .25rem; border: 1px solid var(--ax-line-2); border-radius: 999px; cursor: pointer; list-style: none; font-weight: 600; font-size: .9375rem; }
.ax-user > summary::-webkit-details-marker { display: none; }
.ax-user > summary:hover { border-color: #fff; }
.ax-user-dot { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ax-signal); color: #fff; font-weight: 600; }
.ax-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ax-user-menu { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; display: grid; gap: .125rem; min-width: 13.5rem; padding: .5rem; border: 1px solid var(--ax-line-2); border-radius: var(--ax-r); background: #0a1a40; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .8); }
.ax-user-role { margin: 0; padding: .375rem .625rem .5rem; border-bottom: 1px solid var(--ax-line); color: var(--ax-mist); font-size: .875rem; }
.ax-user-menu a, .ax-user-menu button { display: block; width: 100%; padding: .625rem; border: 0; border-radius: .5rem; background: transparent; color: var(--ax-white); font: 600 .9375rem/1.2 var(--ax-text); text-align: left; text-decoration: none; cursor: pointer; }
.ax-user-menu a:hover, .ax-user-menu button:hover { background: rgba(255, 255, 255, .08); }
.ax-menu-btn { display: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; margin-left: auto; padding: 0; border: 1px solid var(--ax-line-2); border-radius: .75rem; background: transparent; color: var(--ax-white); cursor: pointer; }
.ax-menu-bars, .ax-menu-bars::before, .ax-menu-bars::after { display: block; width: 1.125rem; height: 2px; border-radius: 2px; background: currentColor; }
.ax-menu-bars { position: relative; }
.ax-menu-bars::before, .ax-menu-bars::after { content: ""; position: absolute; left: 0; }
.ax-menu-bars::before { top: -6px; } .ax-menu-bars::after { top: 6px; }
.ax-sub { border-top: 1px solid var(--ax-line); background: rgba(7, 21, 56, .7); }
.ax-sub-in { display: flex; gap: .25rem; width: min(96rem, 100% - 2 * var(--ax-gutter)); margin: 0 auto; overflow-x: auto; scrollbar-width: thin; }
.ax-sub a { flex: none; padding: .75rem .75rem; border-bottom: 3px solid transparent; color: var(--ax-mist); font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.ax-sub a:hover { color: var(--ax-white); }
.ax-sub a[aria-current="page"] { color: var(--ax-white); border-bottom-color: var(--ax-signal-hi); }
@media (max-width: 55rem) {
  .ax-menu-btn { display: inline-flex; }
  .ax-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--ax-gutter) 1.25rem; background: #050f26; border-bottom: 1px solid var(--ax-line-2); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .8); }
  .ax-top[data-open] .ax-nav { display: flex; }
  .ax-nav > a { padding: .9rem 0; border-radius: 0; border-bottom: 1px solid var(--ax-line); font-size: 1.0625rem; color: var(--ax-white); }
  .ax-nav > a[aria-current="page"] { color: var(--ax-signal-hi); }
  .ax-nav > a[aria-current="page"]::after { display: none; }
  .ax-nav-admin { margin-left: 0; }
  .ax-nav-end { flex-wrap: wrap; margin: 1rem 0 0; }
  .ax-user { flex: 1 1 100%; }
  .ax-user > summary { max-width: none; }
  .ax-user-menu { position: static; margin-top: .5rem; box-shadow: none; }
  .ax-nav-guest { display: flex; position: static; flex-direction: row; padding: 0; background: none; border: 0; box-shadow: none; margin: 0 0 0 auto; }
}

/* ---------- Page frame ---------- */
.ax-page { width: min(72rem, 100% - 2 * var(--ax-gutter)); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem) 0 4rem; }
.ax-page.ax-wide { width: min(96rem, 100% - 2 * var(--ax-gutter)); }
.ax-page.ax-narrow { width: min(44rem, 100% - 2 * var(--ax-gutter)); }
.ax-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin: 0 0 1.25rem; }
.ax-head h1, .ax .billing-heading h1, .ax .security-heading h1 { margin: 0; font: 800 clamp(2rem, 4.6vw, 2.75rem)/1 var(--ax-display); text-transform: uppercase; letter-spacing: 0; }
.ax-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem .875rem; }
.ax-count { display: inline-block; min-width: 1.75rem; padding: .0625rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .12); font: 600 1rem/1.6 var(--ax-text); text-align: center; vertical-align: middle; letter-spacing: 0; }
.ax-lead { max-width: 60rem; margin: 0 0 1.25rem; color: var(--ax-mist); }
.ax-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.25rem var(--ax-gutter); border-top: 1px solid var(--ax-line); color: var(--ax-dim); font-size: .875rem; }
.ax-foot b { font-weight: 600; color: var(--ax-mist); }
.ax-foot a { color: var(--ax-mist); }

/* ---------- Cards, facts, tables ---------- */
.ax-card { margin: 0 0 1.25rem; padding: clamp(1.125rem, 2.6vw, 1.75rem); border: 1px solid var(--ax-line-2); border-radius: var(--ax-r-l); background: linear-gradient(180deg, rgba(18, 41, 106, .5), rgba(8, 22, 58, .45)); }
.ax-card h2, .ax .billing-card h2, .ax .security-panel h2 { margin: 0 0 .5rem; font: 600 1.25rem/1.25 var(--ax-text); }
.ax-card h2 small { font-weight: 400; font-size: .875rem; color: var(--ax-dim); }
.ax-card h3 { margin: 0; font: 600 1.0625rem/1.3 var(--ax-text); }
.ax-card > p:last-child { margin-bottom: 0; }
.ax-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.ax-card-head h2 { margin: 0; }
.ax-card-head p { margin: .25rem 0 0; }
.ax-facts { display: grid; gap: .75rem; margin: 0 0 1rem; }
.ax-facts > div { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--ax-line); }
.ax-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ax-facts dt { color: var(--ax-mist); }
.ax-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ax-facts-row { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 2rem; }
.ax-facts-row > div { grid-template-columns: 1fr; gap: .125rem; padding: 0; border: 0; }
.ax-facts-row dt { font-size: .875rem; }
.ax-table-wrap { position: relative; overflow-x: auto; margin: 0 calc(-1 * clamp(1.125rem, 2.6vw, 1.75rem)); padding: 0 clamp(1.125rem, 2.6vw, 1.75rem); }
.ax-table { width: 100%; border-collapse: collapse; font-size: .9688rem; }
.ax-table th, .ax-table td { padding: .75rem .75rem .75rem 0; border-bottom: 1px solid var(--ax-line); text-align: left; vertical-align: middle; }
.ax-table thead th { color: var(--ax-mist); font-weight: 600; font-size: .875rem; white-space: nowrap; }
.ax-table tbody th { font-weight: 600; }
.ax-table tbody tr:last-child th, .ax-table tbody tr:last-child td { border-bottom: 0; }
.ax-table small { display: block; color: var(--ax-dim); font-weight: 400; font-size: .8125rem; }
.ax-table a { color: var(--ax-signal-hi); font-weight: 600; }
.ax-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.ax-rows > * { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; padding: .625rem 0; border-bottom: 1px solid var(--ax-line); }
.ax-rows > *:last-child { border-bottom: 0; }
.ax-rows a { color: var(--ax-signal-hi); }
.ax-log > div { display: grid; grid-template-columns: minmax(6rem, 14rem) minmax(0, 1fr) auto; font-size: .9375rem; }
.ax-log span { color: var(--ax-mist); overflow: hidden; text-overflow: ellipsis; }
.ax-log strong { font-weight: 600; overflow-wrap: anywhere; }
.ax-log small { color: var(--ax-dim); font-weight: 400; }
.ax-log time { color: var(--ax-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ax-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.ax-kpi { display: grid; gap: .25rem; padding: 1rem 1.125rem; border: 1px solid var(--ax-line-2); border-radius: var(--ax-r-l); background: rgba(11, 29, 73, .6); text-decoration: none; }
.ax-kpi:hover { border-color: #fff; }
.ax-kpi b { font: 800 2.75rem/.9 var(--ax-display); }
.ax-kpi b small { font-size: .5em; color: var(--ax-mist); }
.ax-kpi span { color: var(--ax-mist); font-size: .9375rem; }
.ax-kpi.is-hot { border-color: var(--ax-warn); background: rgba(255, 197, 107, .1); }
.ax-kpi.is-hot b { color: var(--ax-warn); }

/* ---------- Status, notes ---------- */
.ax-pill { display: inline-flex; align-items: center; gap: .375rem; padding: .125rem .625rem; border: 1px solid var(--ax-line-2); border-radius: 999px; color: var(--ax-mist); font: 600 .8125rem/1.6 var(--ax-text); white-space: nowrap; }
.ax-pill.ok { border-color: rgba(95, 224, 164, .5); color: var(--ax-ok); background: rgba(95, 224, 164, .08); }
.ax-pill.warn { border-color: rgba(255, 197, 107, .55); color: var(--ax-warn); background: rgba(255, 197, 107, .08); }
.ax-pill.bad { border-color: rgba(255, 135, 149, .55); color: var(--ax-red-soft); background: rgba(224, 34, 56, .12); }
.ax-pill-link { text-decoration: none; }
.ax-pill-link:hover { border-color: #fff; }
.ax-note { margin: 0 0 1.25rem; padding: .875rem 1rem; border: 1px solid var(--ax-line-2); border-left: 4px solid var(--ax-signal-hi); border-radius: .375rem var(--ax-r) var(--ax-r) .375rem; background: rgba(11, 29, 73, .6); }
.ax-note.warn { border-left-color: var(--ax-warn); }
.ax-status { margin: 0 0 1rem; padding: .625rem .875rem; border-radius: var(--ax-r); background: rgba(111, 155, 255, .14); font-weight: 600; }
.ax-status[data-error="true"] { background: rgba(224, 34, 56, .18); color: #ffd0d6; }
.ax-linkbox { margin: 0 0 1rem; padding: .75rem .875rem; border: 1px dashed var(--ax-line-2); border-radius: var(--ax-r); background: rgba(4, 12, 32, .6); font: 400 .875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.ax-more { margin: 1.5rem 0 0; border-top: 1px solid var(--ax-line); }
.ax-more > summary { padding: 1rem 0; color: var(--ax-mist); font-weight: 600; cursor: pointer; }
.ax-more[open] > summary { color: var(--ax-white); }
.ax-seg { display: inline-flex; gap: .25rem; margin: 0 0 1.25rem; padding: .25rem; border: 1px solid var(--ax-line-2); border-radius: var(--ax-r); }
.ax-seg a { padding: .4375rem .875rem; border-radius: .5rem; color: var(--ax-mist); font-weight: 600; font-size: .9375rem; text-decoration: none; }
.ax-seg a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- Controls ---------- */
.ax .button, .ax .billing-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.125rem; border: 1px solid var(--ax-line-2); border-radius: var(--ax-r); background: rgba(255, 255, 255, .04); color: var(--ax-white); font: 600 .9688rem/1.2 var(--ax-text); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; box-shadow: none; }
.ax .button:hover:not(:disabled), .ax .billing-button:hover:not(:disabled) { border-color: #fff; background: rgba(255, 255, 255, .09); }
.ax .button.primary, .ax .billing-button.billing-primary { border-color: transparent; background: var(--ax-signal); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28); }
.ax .button.primary:hover:not(:disabled), .ax .billing-button.billing-primary:hover:not(:disabled) { background: #3a70ff; border-color: transparent; }
.ax .button.ghost { background: transparent; }
.ax .button.compact { min-height: 2.25rem; padding: .25rem .75rem; font-size: .875rem; }
.ax .button:disabled, .ax .billing-button:disabled, .ax .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.ax .button .icon { width: 1.125rem; height: 1.125rem; }
.ax-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.ax input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), .ax select, .ax textarea { border: 1px solid var(--ax-line-2); border-radius: .625rem; background: rgba(4, 12, 32, .7); color: var(--ax-white); font-family: var(--ax-text); }
.ax input::placeholder, .ax textarea::placeholder { color: var(--ax-dim); }
.ax input:focus, .ax select:focus, .ax textarea:focus { border-color: var(--ax-signal-hi); box-shadow: 0 0 0 3px rgba(111, 155, 255, .28); outline: 0; }
.ax .stack-form { display: grid; gap: .5rem; margin-top: 1.25rem; }
.ax .stack-form label { display: block; margin-top: .625rem; color: var(--ax-white); font: 600 .9375rem/1.3 var(--ax-text); }
.ax .stack-form input { width: 100%; min-height: 2.875rem; padding: .5rem .75rem; font-size: 1rem; }
.ax .stack-form .button { width: 100%; min-height: 3rem; margin-top: 1rem; font-size: 1rem; }
.ax-form { max-width: 26rem; }
.ax-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; }
.ax-form-row label { display: grid; gap: .375rem; flex: 1 1 14rem; font-weight: 600; font-size: .9375rem; }
.ax-form-row input { width: 100%; min-height: 2.75rem; padding: .5rem .75rem; }
.ax-inline-form { display: grid; gap: .5rem; margin-top: 1.25rem; }
.ax-inline-form label { font-weight: 600; font-size: .9375rem; }
.ax-inline-form > div { display: flex; gap: .5rem; }
.ax-inline-form input { flex: 1 1 auto; min-width: 0; min-height: 2.75rem; padding: .5rem .75rem; }
.ax-attach { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ax-attach select { flex: 1 1 14rem; min-height: 2.25rem; padding: .25rem .5rem; }
.ax .flash { margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid var(--ax-line-2); border-radius: var(--ax-r); background: rgba(11, 29, 73, .7); color: var(--ax-white); font-weight: 600; }
.ax .flash.success { border-color: rgba(95, 224, 164, .5); background: rgba(95, 224, 164, .1); color: #c9f7df; }
.ax .flash.error { border-color: rgba(255, 135, 149, .55); background: rgba(224, 34, 56, .16); color: #ffd0d6; }

/* ---------- Sign-in, password and message pages ---------- */
.ax .login-shell { display: grid; place-items: start center; min-height: 0; padding: clamp(2rem, 8vh, 5rem) var(--ax-gutter) 3rem; }
.ax .login-card { width: min(29rem, 100%); padding: clamp(1.5rem, 4vw, 2.25rem); border: 1px solid var(--ax-line-2); border-radius: 1.5rem; background: linear-gradient(180deg, rgba(20, 46, 112, .7), rgba(8, 22, 58, .7)); box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .9); color: var(--ax-white); }
.ax .login-card h1 { margin: 0 0 .75rem; font: 800 clamp(2.25rem, 7vw, 2.75rem)/1 var(--ax-display); text-transform: uppercase; letter-spacing: 0; }
.ax .login-card > .muted { max-width: none; margin: 0; font-size: 1rem; line-height: 1.5; }
.ax .login-card .eyebrow { display: none; }
.ax .login-card a:not(.button) { color: var(--ax-signal-hi); font-weight: 600; }
.ax-auth-links { margin: 1rem 0 0; }
.ax-auth-aside { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--ax-line-2); }
.ax-auth-aside p { margin: 0 0 .75rem; }
.ax-auth-aside .muted { font-size: .9375rem; }
.ax .security-note { border-color: var(--ax-line-2) !important; background: rgba(4, 12, 32, .5) !important; color: var(--ax-mist) !important; font-size: .9375rem !important; }

/* ---------- Client plan ---------- */
.ax-plans { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.ax-plan { display: grid; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--ax-line); }
.ax-plan .ax-facts { margin: 0; }
.ax-plan-what p { margin: .125rem 0 0; font-size: .9375rem; }
@media (min-width: 52rem) { .ax-plan { grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.4fr); align-items: start; } }
.ax-add { display: grid; gap: 1rem; margin-top: 1rem; }
.ax-add label { display: grid; gap: .375rem; font-weight: 600; font-size: .9375rem; }
.ax-add input { width: 100%; min-height: 2.875rem; padding: .5rem .75rem; font-size: 1.125rem; font-weight: 600; }
.ax-add-sum { margin: 0; font: 800 2.5rem/1 var(--ax-display); }
.ax-add-out p { margin: 0; }
.ax-add-out .muted { margin-top: .25rem; font-size: .9375rem; }
@media (min-width: 44rem) { .ax-add { grid-template-columns: 11rem 11rem minmax(0, 1fr); align-items: end; } }
.ax-onboard { display: grid; gap: 1.5rem; border-left: 5px solid var(--ax-ok); border-radius: .5rem var(--ax-r-l) var(--ax-r-l) .5rem; }
.ax-onboard h2 { margin: .5rem 0 .75rem; font: 800 clamp(1.75rem, 4.4vw, 2.25rem)/1 var(--ax-display); text-transform: uppercase; }
.ax-onboard p { margin: 0 0 .75rem; }
.ax-steps { display: grid; gap: .625rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.ax-steps li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: .75rem; align-items: baseline; counter-increment: step; color: var(--ax-mist); }
.ax-steps li::before { content: counter(step); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid var(--ax-line-2); border-radius: 50%; font: 600 .875rem/1 var(--ax-text); color: var(--ax-white); }
.ax-steps li.is-done { color: var(--ax-white); }
.ax-steps li.is-done::before { content: "✓"; border-color: transparent; background: var(--ax-ok); color: #04210f; }
@media (min-width: 60rem) { .ax-onboard { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } .ax-onboard-side { padding-left: 1.5rem; border-left: 1px solid var(--ax-line); } }

/* =====================================================================
   Bridges to older feature stylesheets. Presentation only.
   ===================================================================== */
.ax .site-footer { display: none; }
.ax .toast { border: 1px solid var(--ax-line-2); border-radius: var(--ax-r); background: #0a1a40; color: var(--ax-white); font-family: var(--ax-text); }
.ax .panel, .ax .billing-card, .ax .security-panel { border: 1px solid var(--ax-line-2) !important; border-radius: var(--ax-r-l) !important; background: linear-gradient(180deg, rgba(18, 41, 106, .5), rgba(8, 22, 58, .45)) !important; box-shadow: none !important; }
.ax .eyebrow, .ax .billing-eyebrow { color: var(--ax-mist); }
.ax .customer-shell { width: min(72rem, 100% - 2 * var(--ax-gutter)); max-width: none; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2rem) 0 4rem; }
.ax .billing-page { width: auto; max-width: none; margin: 0; padding: 0; }
.ax .billing-card { margin: 0 0 1.25rem; padding: clamp(1.125rem, 2.6vw, 1.75rem); }
.ax .billing-card > p { color: var(--ax-mist); }
.ax .billing-message { border-radius: var(--ax-r); }
.ax .billing-heading { margin-bottom: 1.25rem; }
.ax .billing-heading .billing-eyebrow { display: none; }
.ax .security-shell { width: min(60rem, 100% - 2 * var(--ax-gutter)); padding: clamp(1.25rem, 3vw, 2rem) 0 4rem; }
.ax .security-heading .eyebrow { display: none; }

/* ---------- Phones page: one row per phone = screen, control, tools ---------- */
.ax.dashboard-theme { background: var(--ax-night) linear-gradient(180deg, #071538 0, #050f26 26rem) no-repeat; }
.ax.dashboard-theme .page-shell { width: min(96rem, 100% - 2 * var(--ax-gutter)); padding: clamp(1.25rem, 3vw, 2rem) 0 4rem; }
.ax.dashboard-theme .ax-head .legend { color: var(--ax-mist); font-size: .9375rem; }
.ax.dashboard-theme .device-grid { gap: 1.5rem; }
.ax.dashboard-theme .device-card { border: 1px solid var(--ax-line-2); border-radius: var(--ax-r-l); }
.ax.dashboard-theme .device-workspace { display: grid; grid-template-columns: minmax(19rem, 25rem) minmax(17rem, 1fr) minmax(19rem, 1.2fr); grid-template-areas: "stage panel side"; align-items: start; gap: 1.125rem; }
.ax.dashboard-theme .device-workspace > .phone-stage { grid-area: stage; }
.ax.dashboard-theme .device-workspace > .remote-panel { grid-area: panel; }
.ax.dashboard-theme .device-workspace > .device-sidebar { grid-area: side; grid-column: auto; grid-row: auto; display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
@media (max-width: 87.5rem) {
  .ax.dashboard-theme .device-workspace { grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); grid-template-areas: "stage panel" "stage side"; }
}
@media (max-width: 47.5rem) {
  .ax.dashboard-theme .device-workspace { display: flex; flex-direction: column; }
  .ax.dashboard-theme .device-workspace > .phone-stage { order: 0; }
  .ax.dashboard-theme .device-workspace > .remote-panel { order: 1; }
  .ax.dashboard-theme .device-workspace > .device-sidebar { order: 2; }
}
.ws-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .875rem; margin: 0; padding: .875rem 1.125rem .875rem; }
.ws-name { margin: 0; font: 600 1.375rem/1.2 var(--ax-text); }
.ws-meta { margin: 0; color: var(--ax-mist); font-size: .9375rem; }
.ax.device-layout-horizontal #devices > .device-card[data-layout-phone-name]::before { content: none; }
.ws-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; padding: .25rem; border: 1px solid var(--ax-line-2); border-radius: var(--ax-r); background: rgba(4, 12, 32, .55); }
.ws-tabs button { min-height: 2.5rem; padding: .25rem .375rem; border: 0; border-radius: .5rem; background: transparent; color: var(--ax-mist); font: 600 .9375rem/1.1 var(--ax-text); cursor: pointer; }
.ws-tabs button:hover { color: var(--ax-white); }
.ws-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .14); color: #fff; }
.ws-pane { display: flex; flex-direction: column; gap: .875rem; min-width: 0; }
.device-card:not([data-ws-ready]) .ws-tabs { display: none; }
.ax .device-layout-toolbar { border-color: var(--ax-line-2) !important; border-radius: var(--ax-r-l) !important; background: rgba(11, 29, 73, .6) !important; font-family: var(--ax-text); }
.ax .device-layout-toolbar button { border-color: var(--ax-line-2) !important; border-radius: .625rem !important; background: transparent !important; font-size: .9375rem !important; }
.ax .device-layout-toolbar button[aria-pressed="true"] { background: rgba(255, 255, 255, .14) !important; box-shadow: none !important; border-color: #fff !important; }
.ax .device-layout-hint { font-size: .875rem !important; color: var(--ax-mist) !important; }
.ax .empty-state { border-color: var(--ax-line-2); border-radius: var(--ax-r-l); background: rgba(11, 29, 73, .45); }
.ax .empty-state h2 { font: 800 clamp(1.75rem, 4.4vw, 2.25rem)/1 var(--ax-display); text-transform: uppercase; }
.ax .empty-state p { color: var(--ax-mist); max-width: 34rem; }
.ax .empty-state .ax-actions { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .ax * { transition: none !important; } }

/* ---------- Admin on small screens ---------- */
.ax-log { max-height: 34rem; overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 40rem) {
  .ax-table { min-width: 38rem; }
  .ax-log > div { grid-template-columns: minmax(0, 1fr) auto; }
  .ax-log > div span { grid-column: 1 / -1; }
  .ax-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-kpi b { font-size: 2.25rem; }
  .ax-rows > * { display: grid; }
}
