/*
 * pico.css: the one stylesheet for the Epoch client portal and the admin portal.
 * It copies the look of the Pico Public Cloud console (colors, fonts, spacing, components)
 * from the screenshots the owner supplied on 14 Oct 2026. Colors were sampled pixel by pixel.
 *
 * Rules for this file:
 *   - No build step, no web fonts, nothing loaded from another site (system font stacks, like the console).
 *   - No inline styles anywhere in the pages (the Content-Security-Policy forbids them): every look is a class here.
 *   - Light theme is the reference. The dark theme (html[data-theme="dark"]) is an approximation:
 *     the console has a dark mode too, but no dark screenshot was available.
 *   - <html class="is-auth"> = sign-in / sign-up pages (sizes of the console login page at 100% zoom).
 *     <html class="is-app">  = portal pages (sizes of the console dashboard pages as they appear in the screenshots).
 */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light;

  --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* surfaces */
  --bg: #f3f9ff;
  --surface: #ffffff;
  --surface-tint: #f7fafd;
  --hero-top: #e9f2fa;
  --hero-mid: #f1f6fc;
  --dot: rgba(75, 103, 126, .30);
  --border: #cee1f1;
  --border-soft: #dce9f5;
  --input-border: #7d8ea0;  /* 6.2ao: edge of a form field, 3.2:1 on the page and 3.4:1 on the field (WCAG 1.4.11 asks 3:1) */
  --shadow-card: 0 1px 3px rgba(0, 24, 43, .10), 0 1px 2px rgba(0, 24, 43, .05);
  --shadow-pop: 0 8px 24px rgba(0, 24, 43, .16), 0 2px 6px rgba(0, 24, 43, .08);

  /* text */
  --fg: #00182b;
  --muted: #4b677e;
  --muted-2: #4b6c86;
  --faint: #597087;         /* 4.8:1 on the page background (QA review 6.2x: was #7d93a8, 3.0:1) */

  /* brand blues */
  --primary: #0066ca;
  --primary-hover: #0058b0;
  --primary-fg: #ffffff;
  --primary-soft: #e6f0fa;
  --link: #006bb8;          /* text links: a darker Pico blue, 5.2:1 on the page background (QA review 6.2x: #0092e2 was 3.2:1) */
  --link-strong: #1b64d6;   /* table links, 5.2:1 (was #2b7fff, 3.6:1) */
  --accent: #0080ff;        /* logo blue */
  --ring: rgba(0, 102, 202, .35);

  /* info banner */
  --info-bg: #f0f7ff;
  --info-strong: #155dfc;
  --on-info: #0066ca;       /* text on the soft blue background (badges, pills): 5.2:1 */
  --info-icon-bg: #dbe8fe;
  --info-text: #162556;

  /* sidebar (dark in both themes) */
  --sb-bg: #282b36;
  --sb-fg: #f6f8ff;
  --sb-muted: #9c9ea8;      /* 5.3:1 on the sidebar (6.2x) */
  --sb-line: #4b5269;
  --sb-tab-bg: #2a2e3b;
  --sb-group-bg: #243145;
  --sb-group-bd: #1d3b5f;
  --sb-group-fg: #6aa8ff;   /* 5.4:1 on the group background (6.2x: was #2b7fff, 3.5:1) */
  --sb-leaf: #40486b;
  --sb-sub: #98aabd;        /* 5.9:1 on the sidebar (6.2x: was #6a7f96, 3.4:1) */
  --sb-avatar: #ebebeb;

  /* status colors: ok / warn / bad */
  --ok: #00bc7d;
  --ok-bg: #ecfdf5;
  --ok-bd: #5ee9b5;
  --ok-fg: #007a55;
  --ok-soft: #e6f9f2;
  --warn: #fe9a00;
  --warn-bg: #fffbeb;
  --warn-bd: #fee685;
  --warn-fg: #a65200;
  --warn-soft: #fff5e6;
  --bad: #fb2c36;
  --bad-strong: #e7000b;
  --bad-bg: #fef2f2;
  --bad-bd: #ffc9c9;
  --bad-fg: #c10007;
  --bad-soft: #fee9ea;

  /* type scale (rem; root is 16px) */
  --fs-2xs: .625rem;     /* 10  */
  --fs-xs: .6875rem;     /* 11  */
  --fs-sm: .75rem;       /* 12  */
  --fs-base: .78125rem;  /* 12.5 */
  --fs-md: .8125rem;     /* 13  */
  --fs-lg: 1rem;
  --fs-xl: 1.25rem;      /* 20  */
  --fs-2xl: 1.625rem;    /* 26  */
  --fs-3xl: 1.75rem;     /* 28  */
  --fs-num: 2.125rem;    /* 34  */

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 14px;
}

/* Dark theme: approximation built from the console's sidebar palette. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161922;
  --surface: #1e222d;
  --surface-tint: #1b1f2a;
  --hero-top: #1c2535;
  --hero-mid: #1b2230;
  --dot: rgba(157, 176, 198, .22);
  --border: #333a4d;
  --border-soft: #2b3245;
  --input-border: #5f7189;  /* 6.2ao: 3.5:1 on the page, 3.2:1 on the field */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .45), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
  --fg: #eaf1fb;
  --muted: #9db0c6;
  --muted-2: #8fa4bb;
  --faint: #7b90a6;         /* 4.8:1 on cards (6.2x) */
  --primary: #1b63d8;       /* white text 5.5:1 (6.2x: was #2b7fff, 3.8:1) */
  --primary-hover: #2470e6;
  --primary-soft: #16283f;
  --link: #4db4ff;
  --link-strong: #6aa9ff;
  --ring: rgba(77, 160, 255, .45);
  --info-bg: #182338;
  --info-strong: #5b9bff;   /* 5.7:1 on the banner (6.2x) */
  --on-info: #5b9bff;       /* badges and pills in the dark theme: 5.7:1 (6.2z: the primary blue measured 2.9:1 here) */
  --info-icon-bg: #1f3358;
  --info-text: #d3def5;
  --sb-bg: #20232c;
  --sb-tab-bg: #262a35;
  --ok-bg: #0f2b22;
  --ok-bd: #14684c;
  --ok-fg: #5ee9b5;
  --ok-soft: #10302a;
  --warn-bg: #2d2410;
  --warn-bd: #6b4a0c;
  --warn-fg: #fdc65a;
  --warn-soft: #33270f;
  --bad-bg: #321416;
  --bad-bd: #7a2226;
  --bad-fg: #ff8a90;
  --bad-soft: #3a171a;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
html.is-auth body { font-size: var(--fs-lg); }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--link-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* the skip link (first element of every layout): invisible until it gets keyboard focus */
.skip-link:focus {
  position: fixed; left: 12px; top: 12px; z-index: 100; width: auto; height: auto; margin: 0; padding: 8px 12px; overflow: visible; clip: auto;
  white-space: normal; background: var(--surface); color: var(--fg); border: 2px solid var(--primary); border-radius: var(--r-md); font-weight: 600;
}
/* links inside running text must be recognizable without color (QA review 6.2x, link-in-text-block) */
p a, li a, .check a, .hint a, .muted a, td a { text-decoration: underline; text-underline-offset: 2px; }

/* icons: <svg class="i"><use href="/static/shared/icons.svg#i-server"/></svg> */
.i {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.125em;
}
.i-12 { width: 12px; height: 12px; }
.i-14 { width: 14px; height: 14px; }
.i-16 { width: 16px; height: 16px; }
.i-18 { width: 18px; height: 18px; }
.i-20 { width: 20px; height: 20px; }

/* text helpers */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.eyebrow {            /* tiny letter-spaced capitals above headings and values */
  font-size: var(--fs-2xs); font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-blue { color: #3988d7; }
.serif { font-family: var(--font-serif); }
.link { color: var(--link-strong); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--primary); }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 26px; padding: 0 12px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; background: transparent; color: var(--fg);
  text-decoration: none; transition: background-color .12s, border-color .12s, opacity .12s;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-outline { background: var(--bg); border-color: var(--border); font-weight: 500; }
.btn-outline:hover:not(:disabled) { background: var(--primary-soft); }
.btn-danger { background: var(--bad-strong); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c10007; }
.btn-danger-outline { background: var(--bg); border-color: var(--bad-bd); color: var(--bad-fg); font-weight: 500; }
.btn-danger-outline:hover:not(:disabled) { background: var(--bad-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--primary-soft); }
.btn-md { height: 32px; padding: 0 16px; font-size: var(--fs-sm); }
.btn-lg { height: 45px; padding: 0 20px; border-radius: 10px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn .i { font-size: 13px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: var(--r-sm); background: transparent; color: inherit;
}
.icon-btn:hover { background: var(--primary-soft); }
.icon-btn.is-danger { color: var(--bad-strong); }
.icon-btn.is-danger:hover { background: var(--bad-soft); }
.icon-btn .i { font-size: 15px; }
.icon-circle {        /* round outlined icon button used on cards */
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--info-bg); color: var(--on-info);
}

/* ---------- 4. Form controls ---------- */
.field { display: block; }
.label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; }
.hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.error-text { font-size: var(--fs-xs); color: var(--bad-fg); margin-top: 4px; }
.input, .select, .textarea {
  display: block; width: 100%; height: 29px; padding: 0 10px;
  border: 1px solid var(--input-border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--fg); font-size: var(--fs-xs);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--ring); outline-offset: 0; border-color: var(--primary); }
.textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.4; }
.select {
  appearance: none; padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.input-md { height: 32px; font-size: var(--fs-sm); }
.input-icon { position: relative; }
.input-icon > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }
.input-icon > .icon-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon:has(> .icon-btn) > .input { padding-right: 44px; }
.input-lg { height: 45px; border-radius: 10px; font-size: var(--fs-lg); padding: 0 14px; }
.input-lg.input-icon, .input-icon > .input-lg { padding-left: 46px; }
.input-icon > .input-lg ~ .i, .input-icon:has(> .input-lg) > .i { left: 16px; font-size: 16px; }
/* 6.2ao (sign-up review): the show-password button of a large field is a 44 px target filling the field's right end */
.input-icon:has(> .input-lg) > .icon-btn { right: 1px; width: 44px; height: 43px; border-radius: 0 9px 9px 0; }
.input-icon:has(> .input-lg):has(> .icon-btn) > .input-lg { padding-right: 52px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); color: var(--muted); }
.check input { margin: 2px 0 0; width: 14px; height: 14px; accent-color: var(--primary); }

/* ---------- 5. Badges, chips, pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  font-size: var(--fs-2xs); font-weight: 500; white-space: nowrap;
  background: var(--surface); color: var(--fg);
}
.badge-ok   { background: var(--ok-bg);   border-color: var(--ok-bd);   color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); }
.badge-bad  { background: var(--bad-bg);  border-color: var(--bad-bd);  color: var(--bad-fg); }
.badge-info { background: var(--info-bg); border-color: var(--border);  color: var(--on-info); }
.badge-muted { background: var(--bg); color: var(--muted); }
.chip {                /* white rounded label, e.g. "Pay as you go" */
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--fs-2xs); font-weight: 500; white-space: nowrap;
}
.chip-soft { background: var(--info-bg); border-color: var(--border); color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .06em; height: 19px; padding: 0 8px; text-transform: uppercase; }
.pill {                /* soft blue pill, e.g. "All systems operational", "LIVE FEED" */
  display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 9px;
  border: 1px solid var(--border-soft); border-radius: 999px;
  background: var(--info-bg); color: var(--on-info);
  font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap;
}
.pill-plain { color: var(--muted); font-weight: 500; background: var(--bg); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--primary)); flex: none; }
.dot-ok { --c: var(--ok); } .dot-warn { --c: var(--warn); } .dot-bad { --c: var(--bad); } .dot-blue { --c: var(--primary); } .dot-info { --c: var(--primary); }
.kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface); font: 500 var(--fs-2xs) var(--font-mono);
}

/* ---------- 6. Sign-in and sign-up pages ---------- */
.auth { min-height: 100vh; display: flex; justify-content: center; padding: 72px 20px 48px; }
.auth-box { width: 100%; max-width: 560px; }
.auth-logo { display: block; margin: 0 auto 8px; width: 290px; max-width: 80%; height: auto; }
.auth-brand { text-align: center; margin: 0 0 30px; color: var(--muted); font-size: .9375rem; font-weight: 600; letter-spacing: .02em; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; letter-spacing: -.005em; }
.auth-sub { font-size: .875rem; color: var(--muted); text-align: center; margin-top: 6px; }
.auth-form { margin-top: 32px; }
.auth-form .field + .field { margin-top: 28px; }
.auth-form .label { font-size: var(--fs-lg); margin-bottom: 8px; }
.auth-form .btn-lg { margin-top: 26px; }
.auth-row { display: flex; justify-content: flex-end; margin-top: 26px; font-size: .875rem; }
.auth-row + .btn-lg { margin-top: 22px; }
.auth-form a, .auth-foot a, .auth-row a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.auth-form a:hover, .auth-foot a:hover, .auth-row a:hover { color: var(--primary); }
.auth-foot { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--border); text-align: center; font-size: .875rem; color: var(--muted); }
.auth-foot a { font-weight: 600; }
/* 6.2ao: a link in the foot or under the password is a 44 px target without moving the text */
.auth-foot a, .auth-row a { display: inline-block; padding: 12px 8px; margin: -12px -8px; }
.auth-note { margin-top: 18px; font-size: .8125rem; color: var(--muted); text-align: center; }
.auth-note p + p { margin-top: 6px; }
/* 6.2am: the details for the invoice, asked at sign-up */
.auth-form .auth-group { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--border-soft); }
.auth-form .auth-group-title { font-size: var(--fs-lg); font-weight: 600; }
.auth-form .auth-group-hint { margin-top: 4px; font-size: .875rem; color: var(--muted); }   /* 6.2ao: 14 px, it carries a rule */
.auth-form .auth-group-hint + .field { margin-top: 18px; }
.auth-form .textarea { width: 100%; border-radius: 10px; font-size: var(--fs-lg); padding: 10px 14px; }
/* 6.2ao (sign-up review): the whole row ticks the box (44 px high); the terms link is on its own line below, so a missed tap
   never opens a new tab */
.auth .check { font-size: .875rem; min-height: 44px; align-items: center; cursor: pointer; }
.auth .check input { width: 20px; height: 20px; margin: 0; flex: none; }
.auth .check-read { margin: 0 0 0 28px; font-size: .875rem; color: var(--muted); }
.auth .check-read a { display: inline-block; padding: 12px 0; }
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md);
  border: 1px solid var(--border); background: var(--info-bg); font-size: var(--fs-sm); line-height: 1.4;
}
.alert .i { margin-top: 2px; color: var(--primary); }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-bd); } .alert-ok .i { color: var(--ok-fg); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-bd); } .alert-warn .i { color: var(--warn-fg); }
.alert-bad { background: var(--bad-bg); border-color: var(--bad-bd); } .alert-bad .i { color: var(--bad-fg); }
.auth .alert { font-size: .875rem; margin-bottom: 18px; }

/* ---------- 7. Application shell ---------- */
html.is-app body { background: var(--sb-bg); }
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; padding: 0 20px;
  background: var(--sb-bg); color: var(--sb-fg); font-size: var(--fs-base);
  scrollbar-width: thin; scrollbar-color: #4b5269 transparent;
}
.sb-logo { display: grid; place-items: center; padding: 22px 0 4px; }
.sb-logo img { width: 150px; height: auto; display: block; }
.sb-tabs {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px; height: 30px; padding: 0 22px;
  background: var(--sb-tab-bg); border-radius: var(--r-md);
}
.sb-tabs a, .sb-tabs button {
  display: grid; place-items: center; width: 24px; height: 24px; border: 0; background: none;
  color: var(--sb-fg); border-radius: 6px; opacity: .85;
}
.sb-tabs a:hover, .sb-tabs button:hover, .sb-tabs .is-on { background: rgba(255, 255, 255, .08); opacity: 1; }
.sb-rule { height: 0; margin: 13px 0 0; border: 0; border-top: 1px solid var(--sb-line); }
.sb-label { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; color: var(--sb-muted); font-size: var(--fs-sm); }
.sb-label .i { font-size: 13px; }
.sb-org {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; height: 26px; padding: 0 2px;
  font-size: var(--fs-base); font-weight: 500;
}
.sb-org .i:first-child { font-size: 14px; }
.sb-org .grow { flex: 1; }
.sb-tenant {
  display: flex; align-items: center; gap: 7px; margin-top: 6px; height: 27px; padding: 0 8px 0 10px;
  background: var(--sb-group-bg); border: 1px solid var(--sb-group-bd); border-radius: var(--r-md);
  color: var(--sb-group-fg); font-size: var(--fs-xs);
}
.sb-tenant .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-tree { margin: 8px 0 0 6px; padding: 0 0 0 0; border-left: 1px solid var(--sb-line); list-style: none; }
.sb-group > button, .sb-group > a, .sb-leaf > a {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  color: var(--sb-fg); text-decoration: none; border: 0; background: none;
}
.sb-group > button, .sb-group > a { height: 25px; margin-left: 12px; width: calc(100% - 12px); padding: 0 2px 0 6px; font-size: var(--fs-sm); font-weight: 500; border-radius: 6px; }
.sb-group > button .i:first-child, .sb-group > a .i:first-child { font-size: 14px; }
.sb-group > button .grow, .sb-group > a .grow { flex: 1; }
.sb-group > button .chev, .sb-group > a .chev { font-size: 13px; color: var(--sb-muted); transition: transform .15s; }
.sb-group.is-closed > button .chev { transform: rotate(-90deg); }
.sb-group.is-closed > .sb-sub { display: none; }
.sb-sub { list-style: none; margin: 0 0 4px; padding: 0; }
.sb-leaf > a { height: 23px; margin: 1px 0 1px 20px; width: calc(100% - 20px); padding: 0 8px 0 10px; border-radius: 6px; font-size: .72rem; }
.sb-leaf > a .i { font-size: 13px; opacity: .9; }
.sb-leaf > a:hover { background: rgba(255, 255, 255, .06); }
.sb-leaf > a[aria-current="page"] { background: var(--sb-leaf); }
.sb-leaf .count { margin-left: auto; font-size: var(--fs-2xs); background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 0 6px; }
.sb-spacer { flex: 1; min-height: 16px; }
.sb-user {
  display: flex; align-items: center; gap: 10px; padding: 12px 0 14px; margin-top: 8px;
}
.sb-avatar {
  width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--sb-avatar); color: #282b36;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.sb-user .who { flex: 1; min-width: 0; line-height: 1.25; }
.sb-user .who b { display: block; font-size: var(--fs-sm); font-weight: 700; }
.sb-user .who span { display: block; font-size: var(--fs-2xs); color: var(--sb-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user button { width: 22px; height: 24px; border: 0; background: none; color: var(--sb-fg); border-radius: 6px; }
.sb-user button:hover { background: rgba(255, 255, 255, .08); }

.main {
  min-width: 0; margin: 8px 0 0; background: var(--bg);
  border-radius: 12px 12px 0 0; overflow: clip;
  display: flex; flex-direction: column; min-height: calc(100vh - 8px);
}
.banner {
  display: flex; align-items: center; gap: 12px; height: 37px; padding: 0 14px 0 11px;
  background: var(--info-bg); color: var(--info-text);
  border-left: 3px solid var(--info-strong); border-bottom: 2px solid var(--info-strong);
  font-size: var(--fs-sm);
}
.banner .b-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--info-icon-bg); color: var(--info-strong); }
.banner .b-icon .i { font-size: 13px; }
.banner .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .btn { height: 24px; padding: 0 10px; font-size: var(--fs-2xs); }
.banner .btn-primary { background: var(--info-strong); }
.banner .small { font-size: var(--fs-2xs); color: #7293f1; }
.banner .x { color: var(--info-strong); }
.banner-warn { background: var(--warn-bg); color: var(--warn-fg); border-left-color: var(--warn); border-bottom-color: var(--warn); }
.banner-warn .b-icon { background: var(--warn-soft); color: var(--warn-fg); }
.banner-bad { background: var(--bad-bg); color: var(--bad-fg); border-left-color: var(--bad); border-bottom-color: var(--bad); }
.banner-bad .b-icon { background: var(--bad-soft); color: var(--bad-fg); }
.banner-ok { background: var(--ok-bg); color: var(--ok-fg); border-left-color: var(--ok); border-bottom-color: var(--ok); }
.banner-ok .b-icon { background: var(--ok-soft); color: var(--ok-fg); }

.topbar {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 22px;
  border-bottom: 1px solid var(--border); font-size: var(--fs-sm);
}
.topbar .sep { width: 1px; height: 16px; background: var(--border); }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; color: var(--fg); list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "\203A"; margin-right: 8px; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.topbar .grow { flex: 1; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.topbar .icon-btn { width: 26px; height: 26px; }
.topbar .icon-btn .i { font-size: 14px; }
.content { padding: 26px 26px 40px; flex: 1; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid { display: grid; gap: 14px; }
.grid > *, .stack > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main-side { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.between { justify-content: space-between; }

/* ---------- 8. Cards and page parts ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.card-pad { padding: 16px 18px; }
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; min-height: 46px;
  border-bottom: 1px solid var(--border-soft);
}
.card-head h2, .card-title { font-size: var(--fs-md); font-weight: 600; }
.card-body { padding: 16px 18px; }
.card-foot { padding: 10px 18px; border-top: 1px solid var(--border-soft); font-size: var(--fs-xs); color: var(--muted); }

.hero {                /* the big welcome card with the dotted header */
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-card);
  background: linear-gradient(to bottom, var(--hero-top) 0, var(--hero-mid) 24%, var(--surface) 64%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.4px);
  background-size: 13px 13px;
  height: 170px; bottom: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 48px, transparent 170px);
  mask-image: linear-gradient(to bottom, #000 0, #000 48px, transparent 170px);
}
.hero > * { position: relative; }
.hero-bar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-bottom: 1px solid var(--border-soft); }
.hero-badge {
  position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  background: var(--primary); color: #fff;
}
.hero-badge .i { font-size: 13px; }
.hero-badge::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); border: 2px solid var(--hero-top); }
.hero-bar .eyebrow { color: var(--fg); letter-spacing: .22em; }
.hero-bar .eyebrow.blue { color: var(--primary); }
.hero-bar .slash { color: var(--faint); }
.hero-body { padding: 26px 28px 30px; }
.hero-title { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
.hero-title .you { color: var(--link); }
.hero-title .soft { display: block; color: var(--muted); }
.hero-lead { margin-top: 12px; max-width: 640px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }
.hero-center { text-align: center; }
.hero-center .hero-title { font-size: 1.15rem; font-weight: 600; margin-top: 8px; }

.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; background: var(--surface-tint);
  border: 1px solid var(--border-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.page-head h1 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xl); font-weight: 700; line-height: 1.2; }
.page-head h1 .i { font-size: 17px; }
.page-head p { margin-top: 4px; font-size: var(--fs-md); color: var(--muted); }
.page-head .actions { display: flex; align-items: center; gap: 8px; flex: none; }

.stat {
  --c: var(--primary); --c-soft: var(--primary-soft);
  position: relative; padding: 16px 18px 12px;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--c);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.stat.ok { --c: var(--ok); --c-soft: var(--ok-soft); }
.stat.warn { --c: var(--warn); --c-soft: var(--warn-soft); }
.stat.bad { --c: var(--bad); --c-soft: var(--bad-soft); }
.stat .t { font-size: var(--fs-sm); color: var(--muted-2); }
.stat .n { margin-top: 4px; font-size: var(--fs-3xl); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.stat .n small { font-size: var(--fs-md); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat .ic {
  position: absolute; right: 18px; top: 14px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--c-soft); color: var(--c);
}
.stat .ic .i { font-size: 16px; }
.stat .f {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 9px;
  border-top: 1px solid var(--border); font-size: var(--fs-2xs); color: var(--muted);
}
.stat .f .dot { --c: var(--c); width: 5px; height: 5px; }

.stat-quiet {          /* dashboard-style number cards: no colored top line, serif figures */
  position: relative; padding: 14px 16px 14px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg);
}
.stat-quiet.is-on { border-color: #99c2ea; box-shadow: 0 0 0 3px rgba(0, 102, 202, .08); }
.stat-quiet .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-quiet .eyebrow { font-size: 9px; letter-spacing: .18em; color: var(--muted-2); }
.stat-quiet .n { margin-top: 14px; font-family: var(--font-serif); font-size: var(--fs-num); line-height: 1.05; font-weight: 400; }
.stat-quiet .cap { margin-top: 12px; font-size: var(--fs-2xs); color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 4px; height: 17px; padding: 0 7px; border: 1px solid var(--border-soft); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 8.5px; font-weight: 600; }

.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
.table-tools .select { width: 118px; flex: none; }
.table-tools .search { width: 240px; min-width: 160px; }
.table-tools .input-narrow { width: 150px; max-width: none; flex: none; }          /* a short field (a country code) must not stretch and push the others aside */
.table-tools .btn { flex: none; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
/* the sign-in log (Account page): Place and Network may wrap, so the table fits a 1440 px screen (QA review 6.2x) */
.table.access td.wrap { white-space: normal; min-width: 120px; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th {
  height: 33px; padding: 0 12px; text-align: left; white-space: nowrap;
  background: var(--bg); color: var(--fg); font-size: var(--fs-sm); font-weight: 600;
  border-top: 1px solid var(--border); border-bottom: 2px solid var(--border);
}
.table td { height: 41px; padding: 0 12px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-tint); }
.table td.wrap { white-space: normal; }
/* 6.2ap (owner, 10 Nov): the Finance table wraps its cells instead of scrolling sideways; only a narrow screen (under about 900 px of
   table) still scrolls, so a phone stays readable */
.table-finance { table-layout: fixed; min-width: 900px; }
.table-finance th, .table-finance td { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; vertical-align: top; }
.table-finance th { height: auto; padding-top: 9px; padding-bottom: 9px; }
.table-finance td { height: auto; padding-top: 9px; padding-bottom: 9px; }
.report-switches { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.chip.chip-terms { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn-fg); font-weight: 600; }   /* 6.2aq: a setting in the Terms */
.report-switches legend { margin-bottom: 4px; }
.table-finance td.num, .table-finance th:last-child, .table-finance td:last-child { overflow-wrap: normal; white-space: nowrap; }  /* amounts and "PDF" never break */
.table-finance col:nth-child(1) { width: 11%; } .table-finance col:nth-child(2) { width: 13%; } .table-finance col:nth-child(3) { width: 16%; }
.table-finance col:nth-child(4) { width: 13%; } .table-finance col:nth-child(5) { width: 10%; } .table-finance col:nth-child(6) { width: 8%; }
.table-finance col:nth-child(7) { width: 10%; } .table-finance col:nth-child(8) { width: 13%; } .table-finance col:nth-child(9) { width: 6%; }
/* tables whose message column must be read in full (Needs attention, Events): the message wraps, the row grows, nothing scrolls sideways */
.table-events td.msg { white-space: normal; min-width: 260px; max-width: 720px; padding-top: 8px; padding-bottom: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.table-events td { height: auto; min-height: 41px; vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
.table-events .facts { margin: 6px 0 0; padding: 6px 8px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 6px; font: 500 var(--fs-2xs) var(--font-mono); color: var(--muted); white-space: pre-wrap; max-height: 220px; overflow: auto; }
.table-events .link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-size: var(--fs-2xs); text-decoration: underline; cursor: pointer; }
.table-events tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.table-events tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { color: var(--link-strong); }
.table .sort { color: var(--muted); font-size: 11px; margin-left: 4px; }
.table .name { display: inline-flex; align-items: center; gap: 8px; }
.table .name .i { color: var(--muted); font-size: 13px; }
.copy-cell { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); }
.copy-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; background: none; color: var(--muted); border-radius: 4px; }
.copy-btn:hover { background: var(--primary-soft); color: var(--primary); }
.copy-btn[data-copied="1"] { color: var(--ok-fg); }
.copy-btn .i { font-size: 13px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 6px 0 4px; }
.timeline li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: -6px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 1px; top: 3px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--c, var(--primary)); box-shadow: 0 0 0 3px var(--border-soft);
}
.timeline .ok { --c: var(--ok); } .timeline .warn { --c: var(--warn); } .timeline .bad { --c: var(--bad); }
.timeline .what { flex: 1; min-width: 0; }
.timeline .what b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.timeline .when { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: var(--fs-2xs); color: var(--muted); }
.timeline .tag { margin-top: 3px; }

.bar { height: 6px; border-radius: 999px; background: var(--primary-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--warn); } .bar.bad > i { background: var(--bad); }
.meter { display: grid; gap: 5px; }
.meter .top { display: flex; justify-content: space-between; font-size: var(--fs-xs); }
.meter .top span:first-child { color: var(--muted); }
.meter .top b { font-weight: 600; }
.umeter { display: grid; gap: 5px; }                      /* Live usage on the customer dashboard (.meter is taken by the admin pages) */
.umeter .top { display: flex; justify-content: space-between; font-size: var(--fs-xs); }
.umeter .top span:first-child { color: var(--muted); }
.umeter .top b { font-weight: 600; }
.card-foot-hint { padding: 0 var(--card-pad, 20px) 14px; margin: 0; }
.spark { width: 100%; height: 38px; display: block; }
.spark.spark-lg { height: 64px; }
.spark path.line { fill: none; stroke: var(--primary); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark path.area { fill: var(--primary); opacity: .10; stroke: none; }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.codebox {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--bg); font-family: var(--font-mono); font-size: var(--fs-sm); overflow-x: auto;
}
.codebox code { flex: 1; white-space: nowrap; }

/* choice cards (plan size, duration, payment method) */
.opts { display: grid; gap: 10px; }
.opt {
  position: relative; display: block; padding: 12px 38px 12px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  text-align: left; width: 100%;
}
.opt:hover { border-color: #99c2ea; }
.opt:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.opt.is-on, .opt[aria-checked="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 102, 202, .12); }
.opt .opt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.opt b { font-size: var(--fs-md); font-weight: 600; }
.opt .price { font-family: var(--font-serif); font-size: 1.15rem; }
.opt .small { margin-top: 4px; font-size: var(--fs-xs); color: var(--muted); }
.opt.sold .price { color: var(--muted); }
.opt .sold-tag { display: inline-block; margin-top: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--warn-fg); }
.notify { border: 1px dashed var(--border); border-radius: 8px; padding: 12px 14px; background: var(--surface-tint); }
.opt .tick { position: absolute; right: 10px; top: 10px; display: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: #fff; place-items: center; }
.opt.is-on .tick, .opt[aria-checked="true"] .tick { display: grid; }
.opt .tick .i { font-size: 10px; stroke-width: 3; }
.save { color: var(--ok-fg); font-weight: 600; }
.summary { display: grid; gap: 8px; font-size: var(--fs-sm); }
.summary .line { display: flex; justify-content: space-between; gap: 12px; }
.summary .line.total { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); font-size: var(--fs-md); font-weight: 700; }
.summary .line .muted { font-weight: 400; }

.section-title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 600; }
.divider { height: 1px; background: var(--border-soft); border: 0; margin: 14px 0; }

/* small menus (user menu) */
.menu {
  position: absolute; z-index: 30; min-width: 190px; padding: 6px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
}
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border: 0; background: none; border-radius: 6px; text-align: left; text-decoration: none; color: inherit; font-size: var(--fs-sm); }
.menu a:hover, .menu button:hover { background: var(--primary-soft); }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }
.toast { padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); }

/* ---------- 9. Responsive ---------- */
@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40;
    transform: translateX(-102%); transition: transform .18s ease;
  }
  html.sb-open .sidebar { transform: none; box-shadow: 8px 0 30px rgba(0, 0, 0, .35); }
  .main { margin: 0; border-radius: 0; }
  html.is-app body { background: var(--bg); }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 18px 14px 32px; }
  .page-head { flex-wrap: wrap; }
  .banner .small { display: none; }
}
@media (min-width: 901px) {
  html.sb-collapsed .app { grid-template-columns: minmax(0, 1fr); }      /* one column: with the sidebar display:none, .main must land in a full-width track, not the old 0px one */
  html.sb-collapsed .sidebar { display: none; }
  html.sb-collapsed .main { border-radius: 0; margin-top: 0; }
}
@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .crumbs li:not(:last-child) { display: none; }
  .crumbs li + li::before { content: none; }
  .banner { height: auto; min-height: 37px; padding-top: 6px; padding-bottom: 6px; }
  .banner .grow { white-space: normal; overflow: visible; }
  .banner .btn { display: none; }
  .hero-bar { flex-wrap: wrap; height: auto; min-height: 48px; padding: 8px 14px; }
  .hero-bar .grow { display: none; }
  .page-head .actions { flex-wrap: wrap; }
  .auth { padding-top: 20px; }
  .auth-logo { width: 132px; }                     /* 6.2ao (sign-up review): the first field starts in the first screen */
  .auth-brand { margin-bottom: 14px; }
  .auth-form { margin-top: 20px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 8px; }
  .topbar { padding: 0 12px; }
  .hero-body { padding: 20px 16px 22px; }
  .hero-title { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- 10. Theme toggle icons ---------- */
html[data-theme="dark"] .theme-sun { display: none; }
html:not([data-theme="dark"]) .theme-moon { display: none; }

/* ---------- 11. GPU slice map (admin capacity view, client size picker) ---------- */
.slices { display: flex; gap: 4px; height: 34px; }
.slice {
  flex: 1 1 0; min-width: 0; display: grid; place-items: center; padding: 0 4px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg);
  color: var(--muted); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; text-overflow: ellipsis;
}
.slice.run { background: var(--primary); border-color: var(--primary); color: #fff; }
.slice.held {
  background: repeating-linear-gradient(135deg, var(--warn-soft) 0 6px, var(--warn-bg) 6px 12px);
  border-color: var(--warn-bd); color: var(--warn-fg);
}
.slice.off { background: var(--bad-soft); border-color: var(--bad-bd); color: var(--bad-fg); }
.span-2 { flex-grow: 2; } .span-3 { flex-grow: 3; } .span-4 { flex-grow: 4; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: var(--fs-2xs); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--border); background: var(--bg); }
.legend i.run { background: var(--primary); border-color: var(--primary); }
.legend i.held { background: var(--warn-soft); border-color: var(--warn-bd); }
.switch {                 /* on/off toggle */
  position: relative; display: inline-block; width: 30px; height: 17px; border-radius: 999px;
  background: var(--border); border: 0; padding: 0; vertical-align: middle; transition: background-color .12s;
}
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .12s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(13px); }

/* ---------- 12. Spacing utilities (no inline styles allowed, so the few gaps pages need live here) ---------- */
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.center-x { justify-content: center; }
.w-full { width: 100%; }
.max-620 { max-width: 620px; margin-left: auto; margin-right: auto; }
.max-560 { max-width: 560px; }
.is-hidden { display: none; }

/* ---------- 13. Phone menu backdrop ---------- */
@media (max-width: 900px) {
  html.sb-open body::after { content: ""; position: fixed; inset: 0; background: rgba(8, 12, 20, .45); z-index: 35; }
}

/* ---------- 14. Forms with errors, public pages, checklist, pager, busy buttons ---------- */
.field-error { margin-top: 6px; font-size: var(--fs-xs); color: var(--bad-fg); }
.row-wrap > .field-error { flex: 1 0 100%; margin-top: 0; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
/* 6.2ao: a password rule under the field, ticked while typing (portal.js) */
.field-rule { margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }
.auth-form .field-rule { font-size: .875rem; }
.field-rule.is-met { color: var(--ok-fg); }
.field-rule.is-met::before { content: "\2713\00a0"; font-weight: 700; }
#form-error { scroll-margin-top: 16px; }
#form-error:focus { outline: none; }
.auth-form .field-error { font-size: var(--fs-sm); }
.btn[aria-busy="true"] { cursor: progress; opacity: .8; pointer-events: none; }
.btn[aria-busy="true"]::before {
  content: ""; width: 13px; height: 13px; margin-right: 8px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: epoch-spin .7s linear infinite;
}
@keyframes epoch-spin { to { transform: rotate(360deg); } }

html.is-public body { background: var(--bg); }
.public-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.public-brand { display: inline-flex; align-items: center; }
.public-logo { width: 150px; height: auto; display: block; }
.public-main { max-width: 880px; margin: 0 auto; padding: 32px 20px 64px; }

.sb-user { position: relative; }
.sb-user .menu { right: 0; bottom: calc(100% + 4px); left: 0; color: var(--fg); }

.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.todo li:first-child { border-top: 0; padding-top: 0; }
.todo li:last-child { padding-bottom: 0; }
.todo .mark {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--border); color: transparent; background: var(--surface);
}
.todo .mark .i { font-size: 12px; }
.todo li.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo li.later { opacity: .72; }
.todo .what { flex: 1; min-width: 0; }
.todo .what b { display: block; font-size: var(--fs-md); font-weight: 600; }
.todo .what span { display: block; color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.todo .act { flex: none; }

.pager { display: flex; align-items: center; gap: 8px; }
.table .detail { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--fs-2xs) var(--font-mono); color: var(--muted); }
.table .input-md { min-width: 120px; }
.table td .input, .table td .select { max-width: 240px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; gap: 16px; max-width: 460px; }
.rule-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.rule-list li { display: flex; gap: 16px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.rule-list li:first-child { border-top: 0; }
.rule-list .what { min-width: 0; }
.rule-list .what small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.rule-list b { white-space: nowrap; text-align: right; }
/* the terms: a readable text column (74 characters) with a sticky Contents list beside it on wide screens (6.2ag, owner's choice of 29 Oct) */
.terms-grid { display: grid; grid-template-columns: minmax(0, 74ch) minmax(200px, 280px); gap: 40px; align-items: start; }
.terms-main { min-width: 0; }
.terms-toc { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; padding-left: 4px; }
.terms-toc h4 { margin: 0 0 8px 12px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.terms-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.terms-toc a { display: block; padding: 5px 12px; border-left: 2px solid var(--border-soft); color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; text-decoration: none; }
.terms-toc a:hover { color: var(--fg); border-color: var(--border); }
.terms-toc a.current { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.terms-text h3 { font-size: var(--fs-md); font-weight: 600; margin: 26px 0 8px; scroll-margin-top: 72px; }
.terms-text h3:first-child { margin-top: 0; }
.terms-text h4.terms-sub { font-size: var(--fs-sm); font-weight: 600; margin: 16px 0 6px; }   /* 6.2ao: the lawyer's sub-clause titles */
@media (max-width: 900px) { .terms-grid { grid-template-columns: minmax(0, 1fr); } .terms-toc { display: none; } }
.terms-text p { margin: 0 0 12px; line-height: 1.6; }
.terms-text ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; line-height: 1.55; }
.terms-text ul.terms-numbered { list-style: none; padding-left: 20px; }      /* 6.2ap: the lawyer's i. to iv. carry their own numbers: no dot as well */
.secret-note { font-size: var(--fs-xs); color: var(--muted); }

.table th.right, .table th.num { text-align: right; }
.public-brand { color: var(--fg); text-decoration: none; }
.table-fixed { table-layout: fixed; }
.table-fixed .c-a { width: 44%; } .table-fixed .c-b { width: 38%; } .table-fixed .c-c { width: 18%; }
.table-fixed td { white-space: normal; }


/* ---------- 4.2: VM dashboard and admin VM pages ---------- */
.code-line { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: var(--fs-sm); overflow-x: auto; white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.list li:last-child { border-bottom: 0; }
.list .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 8px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.meter-warn > span { background: var(--warn-fg); }
.gpu-slices { display: flex; gap: 4px; }
.gpu-slices .slice { flex: 1; height: 14px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); }
.gpu-slices .slice.used { background: var(--primary); border-color: var(--primary); }
.gpu-slices .slice.off { background: var(--bad-bg); border-color: var(--bad-bd); }
.detail-panel { position: sticky; top: 16px; }
@media (max-width: 900px) { .detail-panel { position: static; } }
details { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
details + details { margin-top: 8px; }
details > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--fg); }
details[open] > summary { margin-bottom: 8px; }

/* ---------- Getting-started guide on the dashboard (6.2al) ---------- */
.start-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.start-step { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); padding: 0; }
.start-step[open] > summary { margin-bottom: 0; }
.start-step > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; font-size: var(--fs-sm); }
.start-step > summary::-webkit-details-marker { display: none; }
.start-step > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-radius: var(--r-md); }
.start-sub { margin-left: auto; font-size: var(--fs-xs); text-align: right; min-width: 0; }
.start-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); color: var(--muted); font-size: .8125rem; font-weight: 600; background: var(--surface); }
.start-step[data-state="done"] .start-mark { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); }
.start-step[data-state="current"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.start-step[data-state="current"] .start-mark { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.start-body { padding: 0 14px 14px 46px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; font-size: var(--fs-sm); line-height: 1.45; }
.start-body p { margin: 0; }
.start-body code:not(.code-line), .start-body .mono { font-size: 0.92em; }
.code-wrap { white-space: normal; overflow-wrap: anywhere; overflow-x: visible; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link-strong); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (max-width: 640px) { .start-sub { display: none; } .start-body { padding-left: 14px; } }

/* ---------- Help center ---------- */
.help-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.help-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.help-prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.help-prose p { margin: 0 0 10px; }
.help-prose code, .help-steps code, .help-list code, .faq code, .table code { font-family: var(--font-mono); font-size: 0.92em; background: var(--primary-soft); padding: 1px 5px; border-radius: 4px; }
.faq details > p { margin: 0; color: var(--fg); }
.faq details[hidden] { display: none; }
.help-toc { background: var(--bg); }

/* ---------- 10. Shop: narrow number box, receipt, printing ---------- */
.input-narrow { max-width: 120px; }
.price-input { width: 118px; text-align: right; }
.receipt { max-width: 720px; }
.receipt h2 { font-size: var(--fs-lg); font-weight: 700; }
.receipt-logo { width: 120px; height: auto; display: block; margin-bottom: 10px; }
.receipt h3 { font-size: var(--fs-md); font-weight: 600; }
.summary .line.discount span:last-child { color: var(--ok-fg); }
.summary .line.sub { font-size: var(--fs-xs); color: var(--muted); }
.opt[disabled] { opacity: .55; cursor: not-allowed; }
@media print {
  .sidebar, .topbar, .banner, .no-print, .toasts { display: none !important; }
  html, body, .app, .main, .content { display: block !important; background: #fff !important; color: #000 !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .content { padding: 0 !important; }
  .card, .receipt { box-shadow: none !important; border: 1px solid #999 !important; }
}

/* ---------- 12. The public landing page (epoch.picopublic.cloud/) ---------- */
html.is-landing body { font-size: var(--fs-md); }
.lp-bar { gap: 10px; }
.lp-nav { display: flex; gap: 18px; margin-left: 18px; }
.lp-nav a { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.lp-nav a:hover { color: var(--primary); }
.lp { max-width: 1060px; margin: 0 auto; padding: 0 20px 72px; }
.lp-h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin: 14px 0 0; }
.lp-h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 650; letter-spacing: -.01em; }
.lp-sub, .lp-lead { color: var(--muted); max-width: 640px; line-height: 1.55; }
.lp-sub { font-size: var(--fs-lg); margin: 16px auto 0; }
.lp-lead { margin: 8px 0 22px; }
.lp-hero { padding: 64px 0 56px; text-align: center; }
.lp-hero .lp-sub { margin-left: auto; margin-right: auto; }
.lp-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.lp-points { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin: 34px 0 0; padding: 0; }
.lp-points li { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.lp-points .i { color: var(--primary); }
.lp-section { padding: 36px 0; }
.lp-section .lp-h2 { margin: 0; }
.lp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-feature h3 { font-size: var(--fs-lg); font-weight: 600; margin: 10px 0 6px; }
.lp-feature p { color: var(--muted); line-height: 1.55; margin: 0; }
.lp-fi {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary);
}
.lp-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 22px 0 0; padding: 0; }
.lp-steps li { display: flex; gap: 12px; align-items: flex-start; }
.lp-steps h3 { font-size: var(--fs-md); font-weight: 600; margin: 2px 0 4px; }
.lp-steps p { color: var(--muted); line-height: 1.5; margin: 0; font-size: var(--fs-sm); }
.lp-step-n {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--primary); color: var(--primary-fg); font-weight: 700; font-size: var(--fs-sm);
}
.lp-pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lp-pkg { min-width: 0; }
.lp-pkg-head { justify-content: space-between; align-items: flex-start; padding-top: 14px; padding-bottom: 12px; }
.lp-pkg-head .card-title { font-size: var(--fs-lg); }
.lp-pkg-tag { color: var(--muted); font-size: var(--fs-sm); margin-top: 2px; }
.lp-from { text-align: right; white-space: nowrap; }
.lp-from-num { font-size: var(--fs-xl); font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.lp-from-label { color: var(--muted); font-size: var(--fs-xs); }
.lp-specs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 14px; padding: 0; }
.lp-specs li { display: inline-flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: var(--fs-sm); font-weight: 500; }
.lp-specs .i { color: var(--primary); }
.lp-table th:first-child, .lp-table td:first-child { padding-left: 0; }
.lp-table th:last-child, .lp-table td:last-child { padding-right: 0; }
.lp-table td { height: auto; padding-top: 8px; padding-bottom: 8px; }
.lp-perh { display: block; color: var(--faint); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.lp-cfp { text-align: center; padding: 26px 8px 22px; }
.lp-cfp-big { font-size: var(--fs-2xl); font-weight: 700; color: var(--primary); }
.lp-cfp-note { color: var(--muted); margin-top: 8px; line-height: 1.5; }
.lp-small { color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; margin-top: 16px; }
.lp-faq { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.lp-qa { padding: 0; }
.lp-qa summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: var(--fs-md); list-style: none; display: flex; align-items: center; }
.lp-qa summary::-webkit-details-marker { display: none; }
.lp-qa summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: var(--fs-lg); font-weight: 500; }
.lp-qa[open] summary::after { content: "\2212"; }
.lp-qa p { padding: 0 18px 16px; margin: 0; color: var(--muted); line-height: 1.55; max-width: 760px; }
.lp-final { text-align: center; padding: 44px 24px; margin-top: 16px; }
.lp-final .lp-lead { margin: 8px auto 0; }
.lp-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.lp-footer-in {
  max-width: 1060px; margin: 0 auto; padding: 30px 20px 10px; display: flex; gap: 24px;
  align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
}
.lp-footer-brand .public-logo { width: 130px; }
.lp-footer-brand .lp-small { margin-top: 10px; }
.lp-footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.lp-footer-nav a { color: var(--muted); font-size: var(--fs-sm); text-decoration: none; }
.lp-footer-nav a:hover { color: var(--primary); }
.lp-copy { max-width: 1060px; margin: 0 auto; padding: 8px 20px 26px; color: var(--faint); font-size: var(--fs-xs); }
@media (max-width: 900px) {
  .lp-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-pricing { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lp-nav { display: none; }
  .lp-bar-signup { display: none; }
  .lp-hero { padding: 44px 0 40px; }
  .lp-grid, .lp-steps { grid-template-columns: 1fr; }
}

/* ---------- 13. The receipt, a paid invoice (receipt page, layout agreed 15 Oct) ---------- */
.inv { max-width: 820px; font-size: var(--fs-md); }
.inv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inv-titlebox { margin: 26px 0 0 auto; padding-left: 120px; }
.inv-title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: .5px; margin: 0; }
.inv-brand { text-align: center; }
.inv-brand .receipt-logo { margin-bottom: 4px; }
.inv-copy-label { font-size: var(--fs-sm); font-weight: 700; }
.inv-heads { display: flex; justify-content: space-between; gap: 24px; margin-top: 10px; align-items: flex-start; }
.inv-lead { margin-top: 26px; }                                      /* 6.2au Mushak-6.3 layout: "Invoice" top left, rule under it */
.inv-lead + .inv-titlebox { padding-left: 0; }
.inv-rule { margin: 2px 0 0; font-size: var(--fs-sm); }
.inv-title.inv-form { font-size: var(--fs-base); font-weight: 700; letter-spacing: 0; margin-top: 14px; white-space: nowrap; }
.inv-copy-label { white-space: nowrap; }
.inv-parties { display: flex; flex-direction: column; gap: 18px; }
.inv-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: .3em; }
.inv-seller { max-width: 46ch; }
.inv-customer h3 { font-size: var(--fs-md); font-weight: 700; margin-bottom: 8px; }
.inv-customer p { margin: 3px 0; }
.inv-blue { color: var(--link-strong); }
.inv-meta { border-collapse: collapse; min-width: 330px; }
.inv-meta td { border: 1px solid var(--fg); padding: 3px 8px; }
.inv-meta td.right { text-align: right; }
.inv-meta .inv-no { font-weight: 600; }
.inv-sec { font-weight: 700; text-decoration: underline; margin: 18px 0 6px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th, .inv-table td { border: 1px solid var(--fg); padding: 5px 8px; }
.inv-table th { background: var(--surface-tint); text-align: left; }
.inv-table th.right, .inv-table td.right { text-align: right; font-variant-numeric: tabular-nums; }
.inv-table .inv-total td { font-weight: 700; }
.inv-words { margin: 12px 0 16px; }
.inv-pay { border-collapse: collapse; }
.inv-pay td { border: 1px solid var(--fg); padding: 3px 8px; }
.inv-note { margin-top: 36px; font-weight: 600; }
.inv-offices { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 10px; }
.inv-offices p { margin: 2px 0; font-size: var(--fs-sm); color: var(--muted-2); }
.inv-offices b { color: var(--warn-fg); font-weight: 700; }
@media (max-width: 720px) { .inv-heads { flex-direction: column; } .inv-titlebox { padding-left: 0; } }
@media (max-width: 720px) {                      /* phones, Mushak-6.3 layout: "Invoice" and the logo on one row, the form name under the logo */
  .inv-top:has(.inv-lead:not([hidden])) { flex-wrap: wrap; }
  .inv-lead { flex: 1 1 0; min-width: 0; margin-top: 18px; }
  .inv-lead + .inv-titlebox { order: 3; flex-basis: 100%; margin: 0; text-align: right; }
  .inv-lead + .inv-titlebox .inv-form { margin-top: 0; }
}
@media print { .inv-meta td, .inv-table th, .inv-table td, .inv-pay td { border-color: #000; } }
@media print { .inv.card { border: 0 !important; max-width: none; } .inv .card-body { padding: 0; } }

/* ---------- 14. Landing skin: the exact tokens of picopublic.cloud (read from its stylesheet, 15 Oct 2026) ----------
   The marketing site defines: Inter/system font stack (no font file is loaded there either), light bg #fafbfc,
   text #0c0c0d/#272729/#7a7a85, borders #e2e4e9/#c8cad4, brand navy #1e3a5f with buttons #1e40af (hover #1d4ed8),
   violet accent #7c3aed (gradient-text 135deg brand->accent), hero = three soft radial tints, radius 8/12px,
   dark theme #0a0e27 bg, #121216 cards, brand #0080ff, accent #bf00ff. Scoped to html.is-landing only:
   the portal inside keeps the console look. */
html.is-landing {
  --font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
  --bg: #fafbfc; --surface: #fff; --surface-tint: #f2f4f7;
  --border: #e2e4e9; --border-soft: #e2e4e9;
  --fg: #0c0c0d; --muted: #272729; --muted-2: #272729; --faint: #62626d;   /* 5.5:1 on the tinted surface (6.2x: #7a7a85 was 3.9:1) */
  --primary: #1e40af; --primary-hover: #1d4ed8; --primary-soft: #eff4ff;
  --link: #2563eb; --link-strong: #2563eb; --ring: rgba(37, 99, 235, .35);
  --lp-brand: #1e3a5f; --lp-accent: #7c3aed; --lp-btn-border: #c8cad4;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .05), 0 2px 4px -2px rgba(0, 0, 0, .05);
}
html[data-theme="dark"].is-landing {
  --bg: #0a0e27; --surface: #121216; --surface-tint: #16161e;
  --border: #2b2b36; --border-soft: #26262e;
  --fg: #ffffff; --muted: #c8c8d0; --muted-2: #c8c8d0; --faint: #888898;
  --primary: #0068d6; --primary-hover: #1a7aeb; --primary-soft: #14233c;   /* white text 5.3:1 (6.2x: #0080ff was 3.8:1) */
  --link: #3399ff; --link-strong: #3399ff; --ring: rgba(0, 128, 255, .4);
  --lp-brand: #0080ff; --lp-accent: #bf00ff; --lp-btn-border: #3a3a46;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .55), 0 2px 4px -2px rgba(0, 0, 0, .5);
}
html.is-landing body { font-size: 1rem; }
html.is-landing .lp-nav a { font-size: .875rem; }
html.is-landing .eyebrow-blue { color: var(--link-strong); }
html.is-landing .lp-hero {
  background: radial-gradient(at 30%, #3b82f614 0%, #0000 60%),
              radial-gradient(at 70% 20%, #a78bfa0f 0%, #0000 50%),
              radial-gradient(at 50% 80%, #14b8a60a 0%, #0000 50%);
}
html[data-theme="dark"].is-landing .lp-hero {
  background: radial-gradient(at 30%, #0080ff33 0%, #0000 60%),
              radial-gradient(at 70% 20%, #bf00ff26 0%, #0000 50%),
              radial-gradient(at 50% 80%, #00d4aa1a 0%, #0000 50%);
}
.lp-grad {
  display: block; margin-top: 8px; padding-bottom: .12em;
  background: linear-gradient(135deg, var(--lp-brand), var(--lp-accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.lp-grad-i {
  background: linear-gradient(135deg, var(--lp-brand), var(--lp-accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
html.is-landing .lp-sub { font-size: 1.125rem; color: var(--muted); }
html.is-landing .lp-lead { font-size: 1rem; }
html.is-landing .lp-feature h3 { font-size: 1.0625rem; }
html.is-landing .lp-feature p, html.is-landing .lp-qa p { font-size: .9375rem; }
html.is-landing .lp-steps h3 { font-size: .9375rem; }
html.is-landing .lp-steps p, html.is-landing .lp-small, html.is-landing .lp-copy { font-size: .875rem; }
html.is-landing .lp-points li, html.is-landing .lp-specs li, html.is-landing .lp-footer-nav a, html.is-landing .lp-pkg-tag { font-size: .875rem; }
html.is-landing .lp-table { font-size: .875rem; }
html.is-landing .lp-perh { font-size: .75rem; }
html.is-landing .lp-qa summary { font-size: 1rem; }
html.is-landing .lp-cfp-note { font-size: .9375rem; }
html.is-landing .card { border-radius: 12px; }
html.is-landing .btn-md { height: 36px; font-size: .875rem; border-radius: 8px; }
html.is-landing .btn-lg { height: 48px; font-size: 1rem; border-radius: 12px; padding: 0 24px; }
html.is-landing .btn-outline { background: transparent; border: 2px solid var(--lp-btn-border); color: var(--fg); }
html.is-landing .btn-outline:hover:not(:disabled) { background: transparent; border-color: var(--lp-brand); }
html.is-landing .lp-footer { background: var(--surface-tint); }
html.is-landing .public-logo { width: auto; height: 34px; }
html.is-landing .lp-footer-brand .public-logo { height: 40px; }

.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.help-code { margin: 0 0 14px; padding: 10px 12px; overflow-x: auto; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 8px; font-family: var(--font-mono); font-size: 0.9em; line-height: 1.5; white-space: pre; }
.help-glossary dt { font-weight: 600; }

/* ---- Monitoring page: meters and SVG line charts ---- */
.stat.na { --c: var(--faint); --c-soft: var(--bg); }
.meter-bar { height: 6px; margin-top: 10px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 999px; background: var(--c); }
.seg { display: inline-flex; gap: 0; }
.seg .btn { border-radius: 0; margin-left: -1px; }
.seg .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.seg .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.seg .btn.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.chart-card .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chart-card h3 { font-size: var(--fs-md); font-weight: 600; }
.chart { margin: 0; }
.chart-wrap { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-svg .grid-line { stroke: var(--border-soft); stroke-width: 1; }
.chart-svg .axis-text { fill: var(--muted); font-size: 10.5px; font-family: var(--font-sans); }
.chart-svg .cursor { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-svg .line { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .dot { stroke: none; }
.chart-tip { position: absolute; top: 8px; z-index: 2; width: max-content; max-width: 92%; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: var(--fs-sm); pointer-events: none; }
.chart-tip div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-tip .tip-time { margin-bottom: 4px; font-weight: 600; color: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
:root { --c0: #0066ca; --c1: #00a870; --c2: #e08a00; --c3: #c43d9b; --c4: #6b52d6; --c5: #d1453b; --c6: #0e9bb0; --c7: #7a8a3a; }
html[data-theme="dark"] { --c0: #4a92ff; --c1: #35d39b; --c2: #ffb02e; --c3: #ec6dc4; --c4: #9d8bff; --c5: #ff7a70; --c6: #46d2e6; --c7: #b5c764; }
.chart-svg .line.c0 { stroke: var(--c0); }
.chart-svg .dot.c0, .swatch.c0 { fill: var(--c0); background: var(--c0); }
.chart-svg .line.c1 { stroke: var(--c1); }
.chart-svg .dot.c1, .swatch.c1 { fill: var(--c1); background: var(--c1); }
.chart-svg .line.c2 { stroke: var(--c2); }
.chart-svg .dot.c2, .swatch.c2 { fill: var(--c2); background: var(--c2); }
.chart-svg .line.c3 { stroke: var(--c3); }
.chart-svg .dot.c3, .swatch.c3 { fill: var(--c3); background: var(--c3); }
.chart-svg .line.c4 { stroke: var(--c4); }
.chart-svg .dot.c4, .swatch.c4 { fill: var(--c4); background: var(--c4); }
.chart-svg .line.c5 { stroke: var(--c5); }
.chart-svg .dot.c5, .swatch.c5 { fill: var(--c5); background: var(--c5); }
.chart-svg .line.c6 { stroke: var(--c6); }
.chart-svg .dot.c6, .swatch.c6 { fill: var(--c6); background: var(--c6); }
.chart-svg .line.c7 { stroke: var(--c7); }
.chart-svg .dot.c7, .swatch.c7 { fill: var(--c7); background: var(--c7); }

/* 6.2am: every graph opens larger in an overlay; it prints on A4 landscape in light colors and exports PNG and CSV */
.chart-open { flex: none; }
.chart-svg.openable .hit { cursor: zoom-in; }
.chart-svg.zoomable .hit { cursor: crosshair; }
.chart-svg .sel { fill: var(--primary); fill-opacity: .12; stroke: var(--primary); stroke-width: 1; }
.chart-svg.big .axis-text { font-size: 13px; }
.chart-svg.big .line { stroke-width: 2; }
.chart-dialog { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border);
  border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-pop); overflow: auto; }
.chart-dialog::backdrop { background: rgba(0, 12, 28, .55); }
.cd-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 8px; }
.cd-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.cd-sub { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.cd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 20px 12px; border-bottom: 1px solid var(--border-soft); }
.cd-custom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.cd-custom .input { width: auto; height: 26px; padding: 0 8px; font-size: var(--fs-sm); }
.cd-body { padding: 10px 20px 18px; }
.cd-status { min-height: 1.3em; margin: 0 0 6px; font-size: var(--fs-sm); color: var(--muted); }
.cd-list-head { display: flex; gap: 8px; margin-top: 14px; }
.cd-table { overflow-x: auto; margin-top: 8px; }
.cd-stats { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.cd-stats th { font-weight: 600; color: var(--muted); }
.cd-stats th, .cd-stats td { padding: 6px 10px; border-bottom: 1px solid var(--border-soft); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cd-stats th:first-child, .cd-stats td:first-child { text-align: left; white-space: normal; }
.cd-stats tr.off td { opacity: .5; }
.cd-stats label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cd-stats .swatch { flex: none; margin-right: 6px; }
@media (max-width: 760px) {
  .chart-dialog { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .cd-tools { gap: 6px; padding: 6px 12px 10px; }
  .cd-tools .seg { flex-wrap: wrap; }
  .cd-tools .seg .btn { border-radius: var(--r-sm); margin: 0 4px 4px 0; }
  .cd-head, .cd-body { padding-left: 12px; padding-right: 12px; }
}
.chart-sheet { display: none; color-scheme: light; background: #fff; color: #00182b; font-family: var(--font-sans);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;     /* the color squares print even without "Background graphics" */
  --fg: #00182b; --muted: #4b677e; --faint: #597087; --border-soft: #dce9f5; --surface: #fff; --primary: #0066ca;
  --c0: #0066ca; --c1: #00a870; --c2: #e08a00; --c3: #c43d9b; --c4: #6b52d6; --c5: #d1453b; --c6: #0e9bb0; --c7: #7a8a3a; }
.chart-sheet.cs-measure { display: block; position: fixed; left: -20000px; top: 0; width: 1180px; }
.chart-sheet .cs-head { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.chart-sheet .cs-logo { width: 110px; height: auto; }
.chart-sheet .cs-kicker { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #4b677e; }
.chart-sheet h1 { margin: 2px 0; font-size: 20px; }
.chart-sheet .cs-head p { margin: 0; font-size: 12px; color: #4b677e; }
.chart-sheet .chart-tip { display: none; }
.chart-sheet .chart-svg { max-height: 95mm; width: auto; max-width: 100%; margin: 0 auto; }
.chart-sheet .cd-stats { font-size: 11px; }
.chart-sheet .cd-stats th, .chart-sheet .cd-stats td { padding: 3px 8px; }
.chart-sheet .cs-foot { margin-top: 8px; font-size: 10px; color: #4b677e; }
@page chartsheet { size: A4 landscape; margin: 10mm; }
@media print {
  body.chart-printing { background: #fff !important; }
  body.chart-printing > * { display: none !important; }
  body.chart-printing > .chart-sheet { display: block !important; page: chartsheet; }
  .chart-sheet .chart-svg, .chart-sheet tr { break-inside: avoid; }
}
@media (max-width: 900px) { .page-head .actions { flex-wrap: wrap; flex: 1 1 100%; } }
.help-prose ul + p, .help-prose pre + p { margin-top: 10px; }


/* ---- Buy credits: the guide and the three segments (package, GPU size, credit hours) ---- */
.guide { background: var(--surface-tint); }
.guide > summary { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; }
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary .chev { transition: transform .15s; }
.guide[open] > summary .chev { transform: rotate(180deg); }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0 18px 12px; list-style: none; }
.guide-steps li { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.guide-steps b { display: block; font-size: var(--fs-md); }
.guide-steps .t { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }
.guide-num, .buy-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: var(--fs-sm); font-weight: 700; }
.guide-topup { margin: 0; padding: 0 18px 12px; font-size: var(--fs-sm); color: var(--muted); }
.guide-topup b { color: var(--fg); font-weight: 600; }
.mode-opts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.opt.mode { padding: 14px; }
.opt.mode b { display: block; }
.guide-rules { display: grid; gap: 5px; margin: 0; padding: 0 18px 16px 36px; font-size: var(--fs-sm); color: var(--muted); }
.guide-rules b { color: var(--fg); font-weight: 600; }
.buy-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 4px; }
.buy-title h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
.buy-title p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.buy-pick { margin-left: auto; flex: none; max-width: 45%; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--info-bg); color: var(--on-info); font-size: var(--fs-xs); font-weight: 600; text-align: right; }
.buy-pick:empty { display: none; }
.buy-body { padding: 12px 18px 18px; }
.pkg-opts, .gpu-opts, .hours-opts { display: grid; gap: 12px; }
.pkg-opts { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.gpu-opts { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.hours-opts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.opt.pkg, .opt.gpu, .opt.prod { padding: 14px; }
.opt .art { flex: none; color: var(--primary); }
.art .art-line { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.art .art-dot { fill: currentColor; }
.art .art-text { fill: currentColor; font-size: 15px; font-weight: 700; text-anchor: middle; }
.art .gpu-cell { fill: var(--primary-soft); stroke: var(--border); stroke-width: 1; }
.art .gpu-cell.on { fill: var(--primary); stroke: var(--primary); }
.opt.pkg .pkg-top { display: flex; align-items: center; gap: 12px; padding-right: 22px; }
.opt.pkg .pkg-top b { display: block; font-size: var(--fs-lg); }
.opt.pkg .pkg-top .price { display: block; margin-top: 2px; font-size: var(--fs-sm); font-family: inherit; color: var(--muted); }
.res { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.res li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.res .lbl { color: var(--muted); }
.res .val { font-weight: 600; text-align: right; }
.opt.gpu { text-align: center; }
.opt.gpu .art { display: block; margin: 0 auto 8px; }
.opt.gpu b { display: block; }
.opt.gpu .price { display: block; margin-top: 6px; }
.opt.prod .prod-top { display: flex; align-items: center; gap: 10px; padding-right: 22px; }
.opt.prod .prod-top b { display: block; }
.opt.prod .prod-top .small { margin-top: 0; }
.opt.prod .price { display: block; margin-top: 10px; font-size: 1.35rem; }
.opt.prod .save-tag { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-fg); font-size: var(--fs-xs); font-weight: 600; }
.opt .mine-tag { display: inline-block; margin-top: 8px; padding: 1px 8px; border-radius: 999px; background: var(--info-bg); border: 1px solid var(--border); color: var(--on-info); font-size: var(--fs-xs); font-weight: 600; }
.recap { display: grid; gap: 6px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.recap > div { display: flex; gap: 8px; justify-content: space-between; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; font-weight: 600; text-align: right; }
.sticky-side { position: sticky; top: 16px; }
@media (max-width: 900px) {
  .guide-steps { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .buy-pick { max-width: 55%; }
}
.art-badge { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.opt.prod .prod-top > div { min-width: 0; }
.opt .per { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); font-family: inherit; }
.opt.gpu .price, .opt.prod .price { font-size: 1.2rem; line-height: 1.2; }
.buy-title { flex: 1; min-width: 0; }
.opt.pkg, .opt.gpu, .opt.prod { display: flex; flex-direction: column; justify-content: flex-start; align-self: stretch; }
.opt.gpu { align-items: center; }
.opt.pkg > *, .opt.prod > * { align-self: stretch; }
.opt.prod > .price, .opt.prod > .per, .opt.prod > .small, .opt.prod > .save-tag { align-self: flex-start; }
#coupon-card .row-wrap .input { flex: 1 1 200px; width: auto; }

/* the sign-in log on a phone (QA review 6.2x, E-M3): each row becomes a small card with labeled lines, nothing is cut off */
@media (max-width: 900px) {
  .table.access thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .table.access, .table.access tbody, .table.access tr, .table.access td { display: block; width: 100%; }
  .table.access tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  .table.access tbody tr:last-child { border-bottom: 0; }
  .table.access td { height: auto; padding: 3px 12px; border: 0; white-space: normal; }
  .table.access td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
  .table.access td[colspan] { padding: 12px; }
}

/* ---------- 15. Sign-in pages: motion (6.2ac; the owner's wish of 26 Oct 2026 to make the login a little more interesting) ----------
   Pure CSS, our own file (the Content-Security-Policy allows no outside script or style), customer portal and admin sign-in alike
   (both use html.is-auth). The global prefers-reduced-motion rule above switches every animation and transition off for visitors
   whose device asks for that. The goal is to guide the eye, not to entertain: short, soft, one-time on load, reactive afterwards. */
@keyframes epoch-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes epoch-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-3px); } 40%, 60% { transform: translateX(3px); } }
@keyframes epoch-sheen { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes epoch-drift { to { background-position: 56px 56px, 56px 56px; } }
@keyframes epoch-glow { 0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); } 50% { opacity: .95; transform: translateX(-50%) scale(1.06); } }

/* 1. the logo and the card rise into place, one after the other; the logo glows under the pointer */
html.is-auth .auth-logo { animation: epoch-rise .6s cubic-bezier(.2, .7, .2, 1) both; transition: filter .35s ease, transform .35s ease; }
html.is-auth .auth-logo:hover { filter: drop-shadow(0 0 18px rgba(255, 138, 0, .5)) drop-shadow(0 0 3px rgba(0, 102, 202, .35)); transform: translateY(-2px); }
html.is-auth .auth-brand { animation: epoch-rise .6s .08s cubic-bezier(.2, .7, .2, 1) both; }
html.is-auth .auth-title, html.is-auth .auth-sub { animation: epoch-rise .6s .14s cubic-bezier(.2, .7, .2, 1) both; }
html.is-auth .auth-form, html.is-auth .auth-foot { animation: epoch-rise .6s .22s cubic-bezier(.2, .7, .2, 1) both; }

/* 2. fields: the border and a soft halo ease in on focus and the icon takes the brand color; a refused sign-in shakes once */
html.is-auth .auth-form .input { transition: border-color .2s ease, box-shadow .25s ease; }
html.is-auth .auth-form .input:focus { box-shadow: 0 0 0 5px rgba(0, 102, 202, .14); }
html.is-auth .auth-form .input-icon > .i { transition: color .2s ease, transform .2s ease; }
html.is-auth .auth-form .input-icon:focus-within > .i { color: var(--primary); transform: translateY(-50%) scale(1.1); }
html.is-auth .auth-form .alert-bad:not([hidden]),
html.is-auth .auth-form:has(.alert-bad:not([hidden])) .input,
html.is-auth .auth-form .input[aria-invalid="true"] { animation: epoch-shake .45s cubic-bezier(.36, .07, .19, .97) both; }

/* 3. the button: a sheen sweeps across under the pointer, it presses on click; the spinner (section 14) shows while the sign-in is checked */
html.is-auth .auth-form .btn-primary { position: relative; overflow: hidden; transition: background-color .15s, transform .08s ease, box-shadow .2s ease; }
html.is-auth .auth-form .btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-130%) skewX(-18deg);
}
html.is-auth .auth-form .btn-primary:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(0, 102, 202, .28); }
html.is-auth .auth-form .btn-primary:hover:not(:disabled)::after { animation: epoch-sheen .9s ease-out; }
html.is-auth .auth-form .btn-primary:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 8px rgba(0, 102, 202, .25); }

/* 4. the background: a faint grid drifting slowly behind the card and a soft glow under the logo; large screens only, no CPU to speak of */
@media (min-width: 900px) {
  html.is-auth .auth { position: relative; isolation: isolate; }
  html.is-auth .auth::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image: linear-gradient(rgba(0, 102, 202, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 102, 202, .07) 1px, transparent 1px);
    background-size: 56px 56px, 56px 56px; animation: epoch-drift 60s linear infinite;
  }
  html.is-auth .auth::after {
    content: ""; position: fixed; left: 50%; top: 8%; width: 760px; height: 440px; z-index: -1; pointer-events: none;
    transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 102, 202, .13), rgba(255, 138, 0, .06) 60%, transparent 100%);
    animation: epoch-glow 9s ease-in-out infinite;
  }
}

/* ---------- Guided help (6.2am): the chat-style panel of the client portal (static/client/guide.js) ---------- */
.guide-launcher {
  position: fixed; right: 16px; bottom: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-fg);
  font-size: var(--fs-sm); font-weight: 700; box-shadow: var(--shadow-pop); cursor: pointer;
}
.guide-launcher:hover { background: var(--primary-hover); }
.guide-launcher:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
body.has-guide .toasts { bottom: 70px; }
/* 6.2ao (sign-up review): the end of every page can scroll above the Help button instead of under it */
body.has-guide .auth { padding-bottom: 96px; }
body.has-guide .content { padding-bottom: 88px; }
body.has-guide .public-main { padding-bottom: 96px; }
body.has-guide .lp-footer { padding-bottom: 64px; }
body.guide-open .guide-launcher { display: none; }
.guide-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 46; display: flex; flex-direction: column;
  width: 390px; max-width: calc(100vw - 32px); height: min(620px, calc(100vh - 32px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden;
}
.guide-panel[hidden] { display: none; }
.guide-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--border-soft); }
.guide-head h2 { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
.guide-head p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.guide-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.guide-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
.guide-msg { max-width: 92%; padding: 9px 12px; border-radius: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.guide-msg p { margin: 0; }
.guide-msg p + p, .guide-msg p + .guide-code, .guide-msg .guide-code + p, .guide-msg ul + p, .guide-msg p + ul { margin-top: 6px; }
.guide-msg ul { margin: 0; padding-left: 18px; }
.guide-msg li + li { margin-top: 3px; }
.guide-msg code { font-family: var(--font-mono); font-size: .95em; padding: 0 3px; border-radius: 4px; background: var(--bg); }
.guide-msg.from-guide { align-self: flex-start; background: var(--surface-tint); border: 1px solid var(--border-soft); border-bottom-left-radius: 4px; }
.guide-msg.from-you { align-self: flex-end; background: var(--primary); color: var(--primary-fg); border-bottom-right-radius: 4px; }
.guide-msg.is-hint { background: var(--info-bg); border-color: var(--border); color: var(--info-text); }
.guide-code { margin: 0; padding: 6px 8px; gap: 8px; font-size: var(--fs-xs); }
.guide-code { align-items: flex-start; overflow-x: visible; }
.guide-code code { background: none; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.guide-code .btn { flex: none; }
.guide-links { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; font-size: var(--fs-sm); }
.guide-links .link { display: inline-flex; align-items: center; gap: 4px; }
.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 38%; overflow-y: auto; padding: 8px 14px; border-top: 1px solid var(--border-soft); }
.guide-chips:empty { display: none; }
.guide-chip {
  padding: 6px 11px; border: 1px solid var(--primary); border-radius: 999px; background: var(--bg); color: var(--link-strong);
  font-size: var(--fs-sm); font-weight: 600; text-align: left; cursor: pointer;
}
.guide-chip:hover { background: var(--primary-soft); }
.guide-chip:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; }
.guide-form { display: flex; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--border-soft); }
.guide-form .input { flex: 1; min-width: 0; }
.guide-foot { display: flex; align-items: center; gap: 4px; padding: 6px 10px 10px; font-size: var(--fs-sm); }
.guide-foot .link { margin-left: auto; padding-right: 4px; }
.help-guide-card .card-body { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.help-guide-card p { margin: 0; flex: 1; min-width: 220px; }
@media (max-width: 640px) {
  .guide-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 88vh; border-radius: 14px 14px 0 0; }
  .guide-launcher { right: 12px; bottom: 12px; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .guide-launcher span { display: none; }          /* 6.2ao: a round 44 px button on phones; its name stays in aria-label */
  body.has-guide .auth { padding-bottom: 80px; }
}
@media print { .guide-launcher, .guide-panel { display: none !important; } }

/* ---------- the getting-started tutorial video (6.2at): a player window on the dashboard, a card in the Help center ---------- */
.tutorial-video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-md); background: #040a12; }
.video-chapters { display: flex; flex-wrap: wrap; gap: 8px; }
.video-chapters .btn { gap: 6px; }
.video-chapters .muted { font-variant-numeric: tabular-nums; }
/* 6.2au: the window is as wide as the screen's HEIGHT allows, so the whole window (title, video, chapter buttons, note) fits a
   1080p laptop without a scrollbar (owner's screenshots of 12 Nov: on a laptop the chapter buttons were below the fold). The
   300px are the window's own rows besides the video; the video keeps 16:9 and is never narrower than 480px. */
.video-dialog { width: min(1120px, calc(100vw - 32px), max(480px, calc((100vh - 300px) * 16 / 9 + 38px)));
  max-width: none; max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border);
  border-radius: var(--r-lg); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-pop); overflow: auto; }
.video-dialog::backdrop { background: rgba(0, 12, 28, .62); }
.vd-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.vd-head h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-lg); font-weight: 700; }
.vd-body { display: grid; gap: 12px; padding: 14px 18px 16px; }
.vd-body .hint { margin: 0; }
.step-video { margin: 8px 0 0; }
.step-video .link-btn { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.lp-video { display: flex; justify-content: center; margin: 22px 0 0; }
#guide-card .card-head { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 760px) {
  #guide-card .card-head .grow { display: none; }
  #guide-video { order: 9; width: 100%; justify-content: center; }
  .video-dialog { width: 100vw; max-height: 100vh; border-radius: 0; }
  .vd-head, .vd-body { padding-left: 12px; padding-right: 12px; }
}

/* ---------- 16. A little charm (6.2au; the owner's wish of 18 Nov 2026: "making things interesting and charming and cosmetic ... for
   landing page, admin portal as well as client portal") ----------
   Pure CSS in our own file, plus three small hooks in the scripts (the Copy check, the busy dot, the admin bell). Nothing here changes
   what a page does. The global prefers-reduced-motion rule above switches every animation and transition off. Entrance animations
   fill BACKWARDS only and move with the separate `translate` property, so once they end they leave nothing behind (no stacking
   context, no containing block for fixed children) and never fight a hover `transform`. */
/* The global reduced-motion rule (section 9) matches elements only, not their ::before and ::after, so a decoration drawn there kept
   moving (found by test_polish: the landing aurora; the same was true of the sign-in background of 6.2ac). This line covers them. */
@media (prefers-reduced-motion: reduce) { *::before, *::after { transition: none !important; animation: none !important; } }
@keyframes epoch-enter { from { opacity: 0; translate: 0 10px; } }
@keyframes epoch-reveal { from { opacity: .25; translate: 0 28px; scale: .985; } }
@keyframes epoch-aurora { 0% { background-position: 0% 0%, 100% 0%, 50% 100%; } 50% { background-position: 60% 30%, 40% 60%, 0% 40%; } 100% { background-position: 100% 70%, 0% 100%, 80% 0%; } }
@keyframes epoch-shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes epoch-ping { 0% { opacity: .8; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.55); } }
@keyframes epoch-pop { from { transform: scale(.4); opacity: .4; } }
@keyframes epoch-draw { from { stroke-dasharray: 26; stroke-dashoffset: 26; } to { stroke-dasharray: 26; stroke-dashoffset: 0; } }
@keyframes epoch-beacon { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 65%, transparent); } 70%, to { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 0%, transparent); } }
@keyframes epoch-swing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }

/* L1. The landing hero: a slow aurora behind the headline (soft edges instead of the old square), the lines rise in one after another,
   and the colored words shimmer gently. */
html.is-landing { --aur-1: rgba(59, 130, 246, .16); --aur-2: rgba(167, 139, 250, .15); --aur-3: rgba(20, 184, 166, .10); }
html[data-theme="dark"].is-landing { --aur-1: rgba(0, 128, 255, .30); --aur-2: rgba(191, 0, 255, .22); --aur-3: rgba(0, 212, 170, .13); }
html.is-landing .lp-hero, html[data-theme="dark"].is-landing .lp-hero { position: relative; isolation: isolate; background: none; }
html.is-landing .lp-hero::before {
  content: ""; position: absolute; inset: -8px 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(closest-side, var(--aur-1), transparent),
    radial-gradient(closest-side, var(--aur-2), transparent),
    radial-gradient(closest-side, var(--aur-3), transparent);
  background-size: 62% 78%, 52% 70%, 58% 62%; background-repeat: no-repeat;
  background-position: 20% 30%, 80% 15%, 50% 90%;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 52%, transparent 80%); mask-image: radial-gradient(ellipse at center, #000 52%, transparent 80%);
  animation: epoch-aurora 24s ease-in-out infinite alternate;
}
html.is-landing .lp-hero > * { animation: epoch-enter .7s cubic-bezier(.2, .7, .2, 1) backwards; }
html.is-landing .lp-hero > :nth-child(2) { animation-delay: .08s; }
html.is-landing .lp-hero > :nth-child(3) { animation-delay: .16s; }
html.is-landing .lp-hero > :nth-child(4) { animation-delay: .24s; }
html.is-landing .lp-hero > :nth-child(5) { animation-delay: .32s; }
html.is-landing .lp-grad { background-size: 220% 100%; animation: epoch-shimmer 7s ease-in-out infinite alternate; }

/* L2. The video as a picture card with a play badge (it links to the player on the help page; nothing is loaded from elsewhere). */
.lp-video-card {
  position: relative; display: block; max-width: 640px; margin: 28px auto 0; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-card);
  color: #fff; text-decoration: none; transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.lp-video-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -16px rgba(30, 58, 95, .45); }
.lp-video-card:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.lp-poster { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.lp-video-card:hover .lp-poster { transform: scale(1.035); }
.lp-poster-dark { display: none; }
html[data-theme="dark"] .lp-poster-light { display: none; }
html[data-theme="dark"] .lp-poster-dark { display: block; }
.lp-play {   /* bottom left, beside the words: the poster's own title sits in its middle */
  position: absolute; left: 18px; bottom: 14px; z-index: 1; width: 54px; height: 54px; display: grid; place-items: center; color: #fff;
  border-radius: 50%; background: linear-gradient(135deg, var(--lp-brand, var(--primary)), var(--lp-accent, var(--primary)));
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, .45); transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.lp-play::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75); animation: epoch-ping 2.6s ease-out infinite; }
.lp-play .i { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.lp-video-card:hover .lp-play { transform: scale(1.08); }
.lp-video-cap {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; min-height: 82px; padding: 26px 18px 14px 86px;
  font-weight: 600; font-size: 1.0625rem; background: linear-gradient(to top, rgba(6, 10, 24, .78), rgba(6, 10, 24, 0));
}
.lp-video-len { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, .5); font-size: .8125rem; font-variant-numeric: tabular-nums; }

/* L3. Sections drift up into place as they scroll into view (browsers without scroll-linked animation simply show them). */
@supports (animation-timeline: view()) {
  @media screen {
    html.is-landing .lp-section > .lp-h2, html.is-landing .lp-section > .lp-lead, html.is-landing .lp-grid > *, html.is-landing .lp-steps > li,
    html.is-landing .lp-pricing > *, html.is-landing .lp-video-card, html.is-landing .lp-faq > *, html.is-landing .lp-final {
      animation: epoch-reveal linear backwards; animation-timeline: view(); animation-range: entry 0% entry 80%;
    }
  }
}

/* L4. Feature and price cards lift under the pointer; the feature icon glows. */
html.is-landing .lp-feature, html.is-landing .lp-pkg { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s; }
html.is-landing .lp-feature:hover, html.is-landing .lp-pkg:hover {
  transform: translateY(-4px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--lp-brand) 70%, transparent);
}
html.is-landing .lp-fi { transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; }
html.is-landing .lp-feature:hover .lp-fi {
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 12%, transparent), 0 6px 18px -4px color-mix(in srgb, var(--lp-accent) 55%, transparent);
}
html.is-landing .lp-step-n { background: linear-gradient(135deg, var(--lp-brand), var(--lp-accent)); box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--lp-accent) 60%, transparent); }

/* C1. Copy: the button turns green with a check and reads "Copied" for a moment (portal.js copiedLook). */
.btn[data-copied="1"], .btn[data-copied="1"]:hover:not(:disabled), .icon-btn[data-copied="1"] { color: var(--ok-fg); border-color: var(--ok-bd); background: var(--ok-bg); }
[data-copied="1"] .i { animation: epoch-pop .4s cubic-bezier(.2, 1.6, .4, 1); }

/* C2. The status dot pulses while the container is starting, stopping, being deleted or waiting in the queue. */
.dot-busy { animation: epoch-beacon 1.6s ease-out infinite; }

/* C3. Orders: a confirmed payment draws its check in a green circle; while the gateway is asked the icon turns. */
.alert-celebrate { animation: epoch-enter .45s cubic-bezier(.2, .7, .2, 1) backwards; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 12%, transparent); }
.alert-celebrate > .i {
  width: 20px; height: 20px; padding: 3px; margin-top: -1px; border-radius: 50%; background: var(--ok); color: #fff; stroke-width: 3;
  animation: epoch-pop .45s cubic-bezier(.2, 1.6, .4, 1) backwards, epoch-draw .5s .2s cubic-bezier(.65, 0, .35, 1) backwards;
}
.alert-busy > .i { animation: epoch-spin 1.1s linear infinite; }

/* C4 and A. The parts of a portal page come in one after another, softly, on load. */
.content > .stack > :not(.grid):not(dialog), .content > .stack > .grid > * { animation: epoch-enter .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.content > .stack > :nth-child(2), .content > .stack > .grid > :nth-child(2) { animation-delay: .05s; }
.content > .stack > :nth-child(3), .content > .stack > .grid > :nth-child(3) { animation-delay: .1s; }
.content > .stack > :nth-child(4), .content > .stack > .grid > :nth-child(4) { animation-delay: .15s; }
.content > .stack > :nth-child(n+5), .content > .stack > .grid > :nth-child(n+5) { animation-delay: .2s; }

/* A1. Admin: number tiles lift under the pointer and their icon grows; table rows show a thin blue edge. */
.stat { transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--c) 80%, transparent); }
.stat .ic { transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.stat:hover .ic { transform: scale(1.1) rotate(-6deg); }
.table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--primary); }

/* A2. Admin: the bell in the top bar counts the "Needs attention" items nobody has looked at, and swings when one arrives. */
.bell { position: relative; width: 32px; height: 32px; margin-right: 4px; color: var(--muted); }
.bell:hover, .bell.has-new { color: var(--fg); }
.bell .i { font-size: 17px; transform-origin: 50% 3px; }
.bell.is-ringing .i { animation: epoch-swing 1.2s ease-in-out; }
.bell-count {
  position: absolute; top: -3px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums;
}
.bell.is-ringing .bell-count { animation: epoch-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
