/* ==========================================================================
   NoxTools member area · design 03 "Tool Launcher" (Opus 5.5) · base.css
   The shared foundation of every page: design tokens (light + dark), the app shell (sidebar, header,
   drawer, bottom bar, command menu, toasts) and every shared component. components.html shows each
   part with copy-ready markup; the page templates (app page, guest page) are the starting points.

   Every page loads, in this order:
     boot.js          (in <head>, blocking: theme + ?state= before paint)
     fonts.css
     base.css         (this file)
     auth.css         (guest pages only)
     … page …
     … the page data (window.NX) …
     lucide.min.js
     shell.js
   Light is the default; dark = <html data-theme="dark">. Colours only ever come from the tokens below.
   Spacing is a 4/8 px grid; radii 6–16 px; 1 px borders; soft shadows.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #FAFAFB;
  --sidebar-bg: #F6F6F8;
  --surface: #FFFFFF;
  --surface-2: #FAFAFB;
  --surface-3: #F2F2F5;
  --surface-hover: #F5F5F8;
  --border: #D4D4DC;         /* 1.47:1 on surface, 1.41:1 on bg (was #E2E2E8, 1.29:1: lines too faint) */
  --border-strong: #C3C3CD;  /* 1.75:1 on surface: inputs, outline buttons, hover (was #D1D1DA, 1.52:1) */
  --text: #17171C;
  --text-2: #464652;
  --muted: #6B6B78;          /* 5.2:1 on white */
  --faint: #A0A0AC;          /* icons / decoration only */

  --accent: #6D28D9;         /* NoxTools violet — 7.1:1 with white text */
  --accent-hover: #5B21B6;
  --accent-text: #6D28D9;
  --accent-soft: #F5F0FF;
  --accent-soft-2: #EBE1FE;
  --accent-border: #D7C6FB;
  --accent-ring: rgba(109, 40, 217, .16);
  --on-accent: #FFFFFF;
  --focus: #7C3AED;

  --red: #EF4444;  --red-solid: #DC2626;  --red-text: #B91C1C;  --red-soft: #FEF2F2;  --red-border: #F9C9C9;
  --amber: #F59E0B; --amber-text: #9A4A07; --amber-soft: #FFF8EB; --amber-border: #F6DDA4;
  --green: #16A34A; --green-text: #15803D; --green-soft: #EFFAF2; --green-border: #BDE8CA;
  --violet-text: #6D28D9; --violet-soft: #F5F0FF; --violet-border: #DDD0FB;

  /* badges that sit on top of a logo plate (always opaque) */
  --b-red-bg: #FEF2F2;    --b-red-fg: #B91C1C;    --b-red-bd: #F9C9C9;
  --b-amber-bg: #FFF8EB;  --b-amber-fg: #9A4A07;  --b-amber-bd: #F6DDA4;
  --b-violet-bg: #F5F0FF; --b-violet-fg: #6D28D9; --b-violet-bd: #DDD0FB;

  --plate: #FFFFFF;          /* tool logos always sit on white */
  --plate-filter: none;

  --shadow-xs: 0 1px 2px rgba(20, 20, 32, .04);
  --shadow-sm: 0 1px 2px rgba(20, 20, 32, .05), 0 1px 3px rgba(20, 20, 32, .04);
  --shadow-md: 0 10px 24px -10px rgba(20, 20, 32, .16), 0 2px 6px -2px rgba(20, 20, 32, .06);
  --shadow-lg: 0 22px 50px -14px rgba(20, 20, 32, .26), 0 6px 16px -6px rgba(20, 20, 32, .10);
  --topbar-bg: rgba(250, 250, 251, .84);
  --scrim: rgba(17, 17, 26, .42);
  --hero-wash: rgba(139, 92, 246, .10);
  --hero-wash-2: rgba(239, 68, 68, .055);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 14px;

  --sb-w: 252px;
  --sb-w-c: 76px;
  --topbar-h: 64px;
  /* added for the full page set */
  --radius-xl: 16px;
  --red-ring: rgba(220, 38, 38, .14);
  --seg-on: #FFFFFF;          /* selected option of a segmented control */
  --code-bg: #F6F6F9;
  --select-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D0D11;
  --sidebar-bg: #111116;
  --surface: #16161C;
  --surface-2: #19191F;
  --surface-3: #212129;
  --surface-hover: #1D1D24;
  --border: #3E3E4A;         /* 1.7:1 on surface, 1.8:1 on bg (was #2A2A34, 1.3:1: lines hard to see) */
  --border-strong: #4D4D5A;  /* 2.2:1 on surface: inputs, outline buttons, hover (was #3A3A46) */
  --text: #EDEDF1;
  --text-2: #C3C3CD;
  --muted: #9C9CA9;          /* 6.6:1 on surface */
  --faint: #6C6C7A;

  --accent: #7C3AED;         /* 5.7:1 with white text */
  --accent-hover: #8B5CF6;
  --accent-text: #B79DFF;
  --accent-soft: rgba(139, 92, 246, .14);
  --accent-soft-2: rgba(139, 92, 246, .26);
  --accent-border: rgba(139, 92, 246, .42);
  --accent-ring: rgba(139, 92, 246, .28);
  --focus: #A78BFA;

  --red-text: #FCA5A5;  --red-soft: rgba(239, 68, 68, .12);  --red-border: rgba(239, 68, 68, .34);
  --amber-text: #FCD34D; --amber-soft: rgba(245, 158, 11, .11); --amber-border: rgba(245, 158, 11, .32);
  --green-text: #86EFAC; --green-soft: rgba(34, 197, 94, .11);  --green-border: rgba(34, 197, 94, .30);
  --violet-text: #C4B5FD; --violet-soft: rgba(139, 92, 246, .14); --violet-border: rgba(139, 92, 246, .38);

  --b-red-bg: #3A1519;    --b-red-fg: #FECACA;    --b-red-bd: #5E2128;
  --b-amber-bg: #34260B;  --b-amber-fg: #FDE68A;  --b-amber-bd: #5C4210;
  --b-violet-bg: #2A2045; --b-violet-fg: #DDD6FE; --b-violet-bd: #45347A;

  --plate: #FFFFFF;
  --plate-filter: brightness(.9);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 28px -10px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px -14px rgba(0, 0, 0, .8), 0 6px 18px rgba(0, 0, 0, .4);
  --topbar-bg: rgba(13, 13, 17, .82);
  --scrim: rgba(0, 0, 0, .62);
  --hero-wash: rgba(139, 92, 246, .16);
  --hero-wash-2: rgba(239, 68, 68, .07);
  --red-ring: rgba(239, 68, 68, .24);
  --seg-on: #2E2E38;
  --code-bg: #111116;
  --select-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C9CA9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding-bottom: a part that gets the keyboard focus below the fold is scrolled in with 12 px to spare, so its
   focus ring is not cut by the bottom edge of the screen (phones keep the room for the bottom bar, see Phone) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 16px); scroll-padding-bottom: 12px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; font-feature-settings: "cv11", "ss03";
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  left: 0; top: 0;   /* pinned to its containing block, so hidden text inside a sideways-scrolling row (chips, tabs) never widens the page */
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip-link {
  position: fixed; left: 12px; top: -64px; z-index: 300; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff; font-weight: 600; transition: top .15s;
}
.skip-link:focus { top: 12px; }

kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface);
  color: var(--muted); font: 600 11px/1 var(--font); white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
  font: 600 13.5px/1 var(--font); white-space: nowrap; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn .ic { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(76, 29, 149, .28), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--surface-hover); border-color: var(--faint); }
.btn-outline .ic { color: var(--muted); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-border); }
.btn-soft:hover { background: var(--accent-soft-2); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.btn-xs .ic { width: 13px; height: 13px; }
.btn-block { width: 100%; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 11px; gap: 9px; }
.btn-lg .ic { width: 18px; height: 18px; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-ghost .ic { color: var(--muted); }
.btn-danger { background: var(--red-solid); color: #fff; box-shadow: 0 1px 2px rgba(185, 28, 28, .28), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-danger:hover { background: #B91C1C; }
.btn-danger-soft { background: var(--red-soft); color: var(--red-text); border-color: var(--red-border); }
.btn-danger-soft:hover { border-color: currentColor; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-xs.btn-icon { width: 28px; }
.btn-lg.btn-icon { width: 46px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; box-shadow: none; }
/* a disabled button that counts down ("Try again in 1:52", "Resend link in 0:42"): readable and clearly not clickable,
   instead of the faded look of an ordinary disabled button:  <button class="btn btn-wait btn-block" disabled>…</button> */
.btn.btn-wait:disabled { opacity: 1; background: var(--surface-3); border-color: var(--border); color: var(--text-2); box-shadow: none; cursor: default; }
.btn-wait:disabled .ic { color: var(--muted); }
/* busy: <button class="btn btn-primary is-loading" aria-busy="true"> keeps its width, shows a spinner */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .7s linear infinite;
}
.btn-primary.is-loading::after, .btn-danger.is-loading::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2);
  transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .ic { width: 19px; height: 19px; }

.link-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: 6px;
  background: none; color: var(--accent-text); font: 600 12.5px/1.2 var(--font); white-space: nowrap;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn .ic { width: 14px; height: 14px; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-3); color: var(--text-2);
  font: 600 11.5px/1 var(--font); white-space: nowrap; flex: none;
}
.pill .ic { width: 12px; height: 12px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.red    { color: var(--red-text);    background: var(--red-soft);    border-color: var(--red-border); }
.pill.amber  { color: var(--amber-text);  background: var(--amber-soft);  border-color: var(--amber-border); }
.pill.green  { color: var(--green-text);  background: var(--green-soft);  border-color: var(--green-border); }
.pill.violet { color: var(--violet-text); background: var(--violet-soft); border-color: var(--violet-border); }
.pill.neutral { color: var(--muted); }
.pill.sm { height: 20px; padding: 0 7px; gap: 4px; font-size: 11px; }
.pill.sm .ic { width: 11px; height: 11px; }
.pill.sm .dot { width: 5px; height: 5px; }

.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); font: 600 11.5px/1 var(--font); font-variant-numeric: tabular-nums;
}
.count.violet { background: var(--accent-soft); color: var(--accent-text); }
.count.red { background: var(--red-soft); color: var(--red-text); }
.count.green { background: var(--green-soft); color: var(--green-text); }
/* small neutral label (plan tool lists, filters, meta): <span class="tag">Semrush</span> */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font: 500 12px/1 var(--font); white-space: nowrap;
}
.tag .ic { width: 12px; height: 12px; color: var(--muted); }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 45; width: var(--sb-w);
  display: flex; flex-direction: column; background: var(--sidebar-bg); border-right: 1px solid var(--border);
  transition: width .2s ease;
}
.sb-head { height: var(--topbar-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 0 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 40px; border-radius: var(--radius-sm); }
.brand img { width: 28px; height: 28px; flex: none; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.sb-close { display: none; }

.sb-toggle {
  position: absolute; top: 19px; right: -13px; z-index: 3; width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); transition: color .15s, transform .2s;
}
.sb-toggle::before { content: ""; position: absolute; inset: -7px; }
.sb-toggle:hover { color: var(--text); }
.sb-toggle .ic { width: 15px; height: 15px; transition: transform .2s; }

.sb-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 14px 12px; }
.nav-list { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid transparent; color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: background-color .15s, color .15s;
}
.nav-item > .ic { width: 18px; height: 18px; color: var(--muted); transition: color .15s; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover > .ic { color: var(--text-2); }
.nav-item[aria-current="page"] { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-xs); color: var(--text); font-weight: 600; }
.nav-item[aria-current="page"] > .ic { color: var(--accent-text); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.nav-tag {
  display: grid; place-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  background: var(--green-soft); color: var(--green-text); border: 1px solid var(--green-border);
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
}
.nav-sep { height: 1px; margin: 12px 6px; background: var(--border); }

.nav-promo {
  height: auto; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 12px;
  border-color: var(--accent-border); color: var(--text);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(239, 68, 68, .10), transparent 55%),
    linear-gradient(180deg, var(--accent-soft), var(--surface));
}
.nav-promo:hover { background: linear-gradient(180deg, var(--accent-soft-2), var(--surface)); }
.promo-ic {
  width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #8B5CF6 0%, #6D28D9 55%, #EF4444 120%); box-shadow: 0 4px 10px -4px rgba(109, 40, 217, .6);
}
.promo-ic .ic { width: 17px; height: 17px; }
.promo-text { flex: 1; min-width: 0; }
.promo-title { display: block; font-size: 13.5px; line-height: 18px; font-weight: 600; white-space: normal; }
.promo-sub { display: block; margin-top: 3px; font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 500; }
.promo-sub .ic { display: inline-block; width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; }
.nowrap { white-space: nowrap; }

.sb-foot { display: none; flex: none; padding: 12px 14px 16px; }   /* only the collapsed rail shows it: the ⌘ command-menu button */
.sc-mini { display: none; }

/* collapsed rail (desktop only) */
@media (min-width: 1024px) {
  html[data-sidebar="collapsed"] .sidebar { width: var(--sb-w-c); }
  html[data-sidebar="collapsed"] .main-wrap { margin-left: var(--sb-w-c); }
  html[data-sidebar="collapsed"] .sb-head { justify-content: center; padding: 0; }
  html[data-sidebar="collapsed"] .sb-head .brand-name { display: none; }
  html[data-sidebar="collapsed"] .sb-toggle .ic { transform: rotate(180deg); }
  html[data-sidebar="collapsed"] .sb-scroll { overflow: visible; padding: 6px 0 12px; }
  html[data-sidebar="collapsed"] .nav-item { width: 44px; height: 44px; margin: 0 auto; padding: 0; justify-content: center; }
  html[data-sidebar="collapsed"] .nav-label,
  html[data-sidebar="collapsed"] .promo-text {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  html[data-sidebar="collapsed"] .nav-tag { display: none; }
  html[data-sidebar="collapsed"] .nav-item.has-tag::before {
    content: ""; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%;
    background: var(--green); box-shadow: 0 0 0 2px var(--sidebar-bg);
  }
  html[data-sidebar="collapsed"] .nav-badge {
    position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px;
    box-shadow: 0 0 0 2px var(--sidebar-bg);
  }
  html[data-sidebar="collapsed"] .nav-sep { margin: 10px 16px; }
  html[data-sidebar="collapsed"] .nav-promo { padding: 0; border-color: transparent; background: none; align-items: center; }
  html[data-sidebar="collapsed"] .sb-foot { display: flex; justify-content: center; padding: 12px 0 16px; }
  html[data-sidebar="collapsed"] .sc-mini { display: inline-grid; }
  html[data-sidebar="collapsed"] [data-tip]:hover::after,
  html[data-sidebar="collapsed"] [data-tip]:focus-visible::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
    padding: 6px 10px; border-radius: 8px; background: var(--text); color: var(--surface);
    font: 500 12.5px/1.2 var(--font); white-space: nowrap; box-shadow: var(--shadow-md); pointer-events: none; z-index: 80;
  }
}

/* the Reseller & Partner promo when it is the current page */
.nav-promo[aria-current="page"] {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(239, 68, 68, .10), transparent 55%),
    linear-gradient(180deg, var(--accent-soft-2), var(--surface));
}

/* ==========================================================================
   Main frame + header
   ========================================================================== */
.main-wrap { margin-left: var(--sb-w); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s ease; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: var(--topbar-bg); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}
.menu-btn, .brand-top, .search-icon-btn { display: none; }
.brand-top img { width: 26px; height: 26px; }
.brand-top .brand-name { font-size: 16px; }

.search-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 380px; height: 40px; padding: 0 8px 0 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 13.5px; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s;
}
.search-trigger:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.search-trigger .ic { width: 17px; height: 17px; }
.st-label { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-keys { display: inline-flex; gap: 3px; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.vsep { width: 1px; height: 24px; margin: 0 8px; background: var(--border); }
.bell-badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; background: var(--red-solid); color: #fff; font: 700 10.5px/1 var(--font);
  box-shadow: 0 0 0 2px var(--bg);
}
.bell-badge:empty { display: none; }
.theme-ic { display: grid; }
.theme-ic-sun { display: none; }
html[data-theme="dark"] .theme-ic-sun { display: grid; }
html[data-theme="dark"] .theme-ic-moon { display: none; }

.acct-btn {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 4px; border: 1px solid transparent;
  border-radius: 12px; background: none; text-align: left; transition: background-color .15s;
}
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: var(--surface-3); }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #8B5CF6, #6D28D9); font: 700 12.5px/1 var(--font); letter-spacing: .03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.avatar-lg { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
.acct-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.acct-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.acct-mail { font-size: 12px; color: var(--muted); white-space: nowrap; }
.acct-name, .acct-mail { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }   /* a long name or e-mail never squeezes the search */
.acct-chev .ic, .acct-chev.ic { width: 16px; height: 16px; color: var(--muted); }

/* popovers */
.pop-wrap { position: relative; }
.pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 360px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform-origin: top right; animation: pop-in .14s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.pop-title { font-size: 14.5px; font-weight: 600; }
.pop-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); text-align: center; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif { position: relative; display: flex; gap: 12px; padding: 12px 16px; }
.notif + .notif { border-top: 1px solid var(--border); }
.notif.unread::after { content: ""; position: absolute; top: 18px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notif-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; border: 1px solid; }
.notif-ic .ic { width: 16px; height: 16px; }
.notif-body { min-width: 0; padding-right: 14px; }
.notif-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.notif-text { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.notif-time { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* the account menu (header avatar button): the card (name + e-mail), the username row (a tap copies), the links, Log out.
   296 px wide, so a usual e-mail fits; a longer name or e-mail ends in "…" (shown in full on hover). Never taller than the
   screen: it scrolls inside on a low (landscape) phone */
.pop-acct {
  width: 296px; max-width: calc(100vw - 24px); padding: 6px;
  max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain;
}
.acct-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 8px; }
.acct-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.acct-card-text strong { font-size: 14px; font-weight: 600; color: var(--text); }
.acct-card-text strong, .acct-card-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-card-text span { font-size: 12.5px; color: var(--muted); }
.acct-card-text .acct-since { font-size: 11.5px; }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--border); }
.menu-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); outline-offset: -2px;
}
.menu-item .ic { width: 17px; height: 17px; color: var(--muted); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); color: var(--text); }
.menu-meta { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.menu-danger, .menu-danger .ic { color: var(--red-text); }
/* account menu states: the icon darkens with its row, a press flashes violet, the current page has a violet icon, Log out
   stays red on hover (a soft red row) */
.pop-acct .menu-item { -webkit-tap-highlight-color: transparent; transition: background-color .12s, color .12s; }
.pop-acct .menu-item .ic { transition: color .12s; }
.pop-acct .menu-item:hover .ic, .pop-acct .menu-item:focus-visible .ic { color: var(--text-2); }
.pop-acct .menu-item[aria-current="page"] .ic { color: var(--accent-text); }
.pop-acct .menu-item:active { background: var(--accent-soft); color: var(--accent-text); }
.pop-acct .menu-item:active .ic { color: var(--accent-text); }
.pop-acct .menu-danger:hover, .pop-acct .menu-danger:focus-visible, .pop-acct .menu-danger:active { background: var(--red-soft); color: var(--red-text); }
.pop-acct .menu-danger:hover .ic, .pop-acct .menu-danger:focus-visible .ic, .pop-acct .menu-danger:active .ic { color: var(--red-text); }
/* the username row (a <button>; owner, 25 Nov 2026: "@ then direct client username"): the @ icon, then the username
   where the other rows have their label (the menu's font, in --text), a copy icon on the right. A long username ends in
   "…" (its title has the whole one). After a copy the icon is a green check for 1.6 s (copy() sets .is-copied). Only
   that icon turns green, not the @ */
.acct-user { width: 100%; margin: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.pop-acct .acct-user { color: var(--text); }
.acct-user-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-user-copy { flex: none; display: grid; place-items: center; width: 17px; height: 17px; }
.pop-acct .acct-user-copy .ic { grid-area: 1 / 1; width: 15px; height: 15px; }
.acct-user-ok { visibility: hidden; }
.acct-user.is-copied .acct-user-ic { visibility: hidden; }
.acct-user.is-copied .acct-user-ok { visibility: visible; color: var(--green-text) !important; }
.acct-user.is-copied > .ic { color: var(--muted) !important; }
.pop-acct .acct-user.is-copied:hover > .ic, .pop-acct .acct-user.is-copied:focus-visible > .ic { color: var(--text-2) !important; }

.avatar-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.avatar-xl { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.avatar.neutral { background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
/* notifications (header bell) are links */
.notif-list > li + li { border-top: 1px solid var(--border); }
a.notif { outline-offset: -2px; transition: background-color .15s; }
a.notif:hover { background: var(--surface-2); }
.notif-empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--muted); }
a.notif .notif-title, a.notif .notif-text, a.notif .notif-time { display: block; }
.menu-item[aria-current="page"] { background: var(--surface-3); color: var(--text); font-weight: 600; }
#main:focus { outline: none; }

/* ==========================================================================
   Page
   ========================================================================== */
.main {
  width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px 32px 32px; flex: 1;
  container: main / inline-size;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; }
.page-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 14px; color: var(--muted); }
.page-sub .sep { width: 1px; height: 14px; background: var(--border-strong); }
.page-sub strong { color: var(--text-2); font-weight: 600; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--green-text); font-weight: 500; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.attn { display: inline-flex; align-items: center; gap: 6px; color: var(--amber-text); font-weight: 500; }
.attn .ic { width: 15px; height: 15px; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.main.main-md { max-width: 1200px; }   /* <main class="main main-md"> for form / reading pages */
.main.main-sm { max-width: 960px; }
.ph-text .crumbs, .ph-text .back-link { margin-bottom: 8px; }

/* breadcrumbs: <nav class="crumbs" aria-label="Breadcrumb"><ol><li><a href="…">Help Desk</a></li><li aria-current="page">#128441</li></ol></nav> */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; font-size: 13px; line-height: 20px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before {
  content: ""; flex: none; width: 6px; height: 6px; margin: 0 10px 0 7px;
  border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg);
}
.crumbs a { font-weight: 500; color: var(--muted); border-radius: 4px; }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--text-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 6px; }
.back-link .ic { width: 15px; height: 15px; transition: transform .15s; }
.back-link:hover { color: var(--text); }
.back-link:hover .ic { transform: translateX(-2px); }

/* page layouts — .main is the "main" size container, so these follow the content width (sidebar open or not) */
.page-body { margin-top: 24px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.page-grid > * { min-width: 0; container-type: inline-size; }   /* each column is a size container: parts inside follow the column width */
@container main (min-width: 1030px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .page-grid.aside-left { grid-template-columns: 280px minmax(0, 1fr); }
  .sticky { position: sticky; top: calc(var(--topbar-h) + 24px); }
}
@container main (min-width: 1100px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 340px; }
}
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@container (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack.sm { gap: 8px; }
.stack.lg { gap: 24px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
code, kbd, .mono, .code-ref, .copy-field > code { font-variant-ligatures: none; }   /* JetBrains Mono would join :// and -> */
.truncate { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.prose { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 10px; }
.prose ul { padding-left: 18px; list-style: disc; }
.prose a, .text-link { color: var(--accent-text); font-weight: 600; border-radius: 3px; }
/* a link inside running text is underlined, not only coloured and bold (WCAG 1.4.1: its colour is only ~1.3:1 against the
   text around it, and bold words that are not links sit in the same sentences); the line gets thicker on hover. Plain
   links in a paragraph too; footer links, link buttons and the other component links keep their own look */
.prose a:not(.btn), .text-link, p:not(.footer-links):not(.auth-foot-links) a[href]:not([class]), .check a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.prose a:not(.btn):hover, .text-link:hover, p:not(.footer-links):not(.auth-foot-links) a[href]:not([class]):hover, .check a:hover { text-decoration-thickness: 2px; }
.prose strong { color: var(--text); font-weight: 600; }

/* ---------- KPI segments (status strip, stat band) ---------- */
.seg { min-width: 0; padding: 16px 20px; display: flex; flex-direction: column; }
.seg-label { display: flex; align-items: center; gap: 7px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.seg-label .ic { width: 14px; height: 14px; }
.seg-value { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.seg-value .big { font-size: 20px; line-height: 26px; font-weight: 600; color: var(--text); letter-spacing: -.015em; }
.seg-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--accent-text); border-radius: 4px; }
.seg-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.seg-link .ic { width: 13px; height: 13px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* KPI band (the dashboard's status strip as a reusable part): any number of .seg, wraps by itself, 1 px dividers.
   <div class="statband"><div class="seg"><p class="seg-label">Wallet</p><p class="seg-value"><span class="big">₹1,250</span></p>…</div>…</div> */
.statband {
  display: flex; flex-wrap: wrap; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.statband > .seg { flex: 1 1 var(--seg-min, 180px); box-shadow: -1px 0 0 var(--border), 0 -1px 0 var(--border); }

/* KPI / stat cards: <div class="stats cols-4"><div class="stat">…</div>…</div> */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat {
  min-width: 0; display: flex; flex-direction: column; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.stat-label { min-width: 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); }
.stat-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; margin: -5px -5px 0 0; border-radius: 9px; border: 1px solid; }
.stat-ic .ic { width: 16px; height: 16px; }
.stat-value {
  margin-top: 8px; font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-value small { margin-left: 4px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.stat-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.stat-foot { margin-top: 12px; }
@container (max-width: 1100px) { .stats.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 900px) { .stats.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 600px) {
  .stats, .stats[class*="cols-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 20px; line-height: 26px; }
  .stat-ic { width: 28px; height: 28px; margin: -3px -3px 0 0; }
  .stat-label { font-size: 12.5px; }
}

/* ---------- Launcher hero ---------- */
.launcher {
  position: relative; isolation: isolate; padding: 18px 20px 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
}
.launcher::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 180px at 0% 0%, var(--hero-wash), transparent 70%),
    radial-gradient(420px 160px at 100% 0%, var(--hero-wash-2), transparent 70%);
}
.launcher::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: -1; pointer-events: none; opacity: .55;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent);
}
.launch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.launch-title { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.launch-meta { font-size: 12.5px; color: var(--muted); }

.search { position: relative; }
.search-ic { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.search-ic .ic, .search-ic.ic { width: 20px; height: 20px; }
.search-input {
  width: 100%; height: 56px; padding: 0 168px 0 50px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 500 16px/1 var(--font); letter-spacing: -.005em;
  box-shadow: var(--shadow-xs); -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s;
}
.search-input::placeholder { color: var(--muted); font-weight: 400; opacity: 1; }
.search-input::-webkit-search-cancel-button, .search-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-input:hover { border-color: var(--faint); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.search-aside { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px; }
.kbd-hint { display: inline-flex; align-items: center; gap: 7px; padding-right: 6px; font-size: 12.5px; color: var(--muted); }
.enter-hint {
  display: none; align-items: center; gap: 7px; max-width: 220px; height: 32px; padding: 0 10px 0 6px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-border); font-size: 12.5px; font-weight: 600;
}
.enter-hint kbd { border-color: var(--accent-border); color: var(--accent-text); background: var(--surface); }
.enter-hint span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-clear { display: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.search-clear:hover { background: var(--surface-3); color: var(--text); }
.search-clear .ic { width: 17px; height: 17px; }
.search.has-q .search-clear { display: grid; }
.search.has-q .kbd-hint { display: none; }
.search.has-q.has-hit .enter-hint { display: inline-flex; }
/* single-key shortcuts turned off (command menu → "Turn off single-key shortcuts"; shell.js then sets html.nxl-keys-off):
   "/" does nothing, so no "/" hint shows: the search boxes of the dashboard, All tools, FAQs and the 404 page
   (.search-aside .kbd-hint), Payment history (the search's "/" and the table foot's key line, which ends in "/ search")
   and the Help Desk's search (.hd-slash) */
html.nxl-keys-off .search-aside .kbd-hint, html.nxl-keys-off .ph-k-slash, html.nxl-keys-off .table-foot > .kbd-hint,
html.nxl-keys-off .hd-slash { display: none !important; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 5px 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.chip .ic { width: 15px; height: 15px; color: var(--muted); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip .count { height: 22px; min-width: 22px; padding: 0 6px; }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip[aria-pressed="true"] .ic { color: inherit; }
.chip[aria-pressed="true"] .count { background: rgba(255, 255, 255, .18); color: inherit; }
html[data-theme="dark"] .chip[aria-pressed="true"] .count { background: rgba(0, 0, 0, .12); }
.chip[aria-disabled="true"] { opacity: .45; cursor: default; }
.chip-locked { gap: 4px; height: 30px; margin-block: 1px; padding: 0 9px 0 10px; border-style: dashed; color: var(--muted); background: transparent; font-size: 12px; }
.chip-locked .chip-lock { width: 13px; height: 13px; color: var(--faint); }
.chip-locked[aria-pressed="true"] .chip-lock { color: inherit; }
/* Chip row narrower than 718px (1366 laptops, 1024, tablets): the decorative category icons go, so the chips keep to
   two rows instead of leaving one chip alone on a third row (counts and the locks stay) */
.launcher { container: launcher / inline-size; }
@media (min-width: 768px) {
  @container launcher (max-width: 717.98px) {
    .chips { gap: 6px 4px; }
    .chip:not(.chip-locked) > .ic { display: none; }
    .chip:not(.chip-locked) { padding-left: 11px; }
  }
}

/* ---------- Sections ---------- */
.sec { margin-top: 26px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; margin-bottom: 12px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; min-width: 0; }
.sec-title .ic { width: 16px; height: 16px; color: var(--muted); }
.sec-title mark { background: none; color: var(--accent-text); }
.sec-title:focus { outline: none; }
.sec-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.sec-aside { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); }
.sec-aside kbd { height: 19px; min-width: 19px; font-size: 10.5px; }
.nav-hints { display: inline-flex; align-items: center; gap: 3px; }
.nav-hints span { margin: 0 8px 0 4px; }
.nav-hints span:last-child { margin-right: 0; }

/* ---------- Tool tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 16px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.tile {
  position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tile:has(.tile-link:focus-visible), .typing .tile.is-hit {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring), var(--shadow-md);
}
.tile-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tile-link:focus-visible { outline: none; }

.plate {
  height: 88px; margin: 6px 6px 0; padding: 0 18px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--plate); filter: var(--plate-filter); overflow: hidden;
}
.plate img, .pal-logo img { filter: url(#logoClean); }
.plate img { width: 100%; height: 44px; object-fit: scale-down; }
.logo-fallback { max-width: 100%; color: #23232B; font: 700 17px/1.15 var(--font); letter-spacing: -.02em; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.pal-logo .logo-fallback { font-size: 11px; white-space: nowrap; }

.tile-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px 12px 12px 14px; border-top: 1px solid var(--border); }
.tile-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tile--compact .tile-line { flex: 1; }
.tile-name { min-width: 0; font-size: 13.5px; line-height: 20px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-name mark { background: var(--accent-soft-2); color: inherit; border-radius: 3px; padding: 0 1px; }
.tile-cat { display: flex; align-items: center; gap: 5px; min-height: 20px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.tile-cat-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tile-meta > .pill { align-self: flex-start; max-width: 100%; overflow: hidden; }
.tile-cat .ic { width: 13px; height: 13px; }
.tile-go {
  flex: none; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px 0 11px; border-radius: 8px;
  background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 600; transition: background-color .16s, color .16s;
}
.tile-go .ic { width: 14px; height: 14px; }
.tile-go kbd { display: none; height: 17px; min-width: 17px; font-size: 10px; border-color: rgba(255, 255, 255, .35); background: transparent; color: inherit; }
.tile:hover .tile-go, .tile:has(.tile-link:focus-visible) .tile-go, .typing .tile.is-hit .tile-go { background: var(--accent); color: var(--on-accent); }
.typing .tile.is-hit .tile-go kbd { display: inline-flex; }
.typing .tile.is-hit .tile-go .ic { display: none; }
/* Tiles under 250px (3-up beside the rail, 4-up at 1280, 3-up at 1024/768): the button keeps its "Open" label but
   drops the arrow / ↵ key, so names with a flag ("Claude · New") and long categories ("AI Chat & Assistants") are
   never cut off, not even on the highlighted top result while typing (the search box itself shows "↵ Open …") */
.tile-grid .tile { container: tile / inline-size; }
@media (min-width: 768px) {
  @container tile (max-width: 249.98px) {
    .tile-go { padding: 0 11px; }
    .tile-go .ic, .tile-go kbd { display: none !important; }
  }
  /* 5-up at 1920, 4-up at 1600 or with the sidebar collapsed: the small decorative icons go too */
  @container tile (max-width: 225.98px) {
    .tile-cat .ic, .tile-line .pill .ic { display: none; }
  }
}

/* compact tiles (the dashboard's "Recently opened" row in the .tile-grid; the No access and 404 pages' .quick-grid) */
.quick-grid .tile { container-type: inline-size; }
.tile--compact .plate { height: 66px; padding: 0 14px; }
.tile--compact .plate img { height: 34px; }
.tile--compact .tile-foot { padding: 8px 10px 9px 12px; gap: 8px; }
.tile--compact .tile-name { font-size: 13px; }
.tile-arrow { flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: var(--faint); transition: color .15s, transform .15s; }
.tile-arrow .ic { width: 15px; height: 15px; }
.tile:hover .tile-arrow, .tile:has(.tile-link:focus-visible) .tile-arrow { color: var(--accent-text); transform: translate(1px, -1px); }
@container (max-width: 176px) {   /* "Semrush · 3 days" still fits on 165px compact tiles */
  .tile--compact .tile-foot { gap: 6px; }
  .tile--compact .tile-arrow { width: 16px; }
}

/* request tile */
.tile-request {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 100%; padding: 20px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); background: transparent; color: var(--muted);
  text-align: center; transition: border-color .15s, background-color .15s, color .15s;
}
.tile-request:hover { border-color: var(--accent-border); background: var(--accent-soft); color: var(--text-2); }
.tile-request .req-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); margin-bottom: 4px; }
.tile-request .req-ic .ic { width: 18px; height: 18px; }
.tile-request strong { color: var(--text); font-size: 13.5px; font-weight: 600; }
.tile-request span { font-size: 12.5px; }

.quick-empty {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); color: var(--muted); font-size: 13px;
}
.quick-empty .ic { width: 18px; height: 18px; color: var(--faint); }
.quick-empty strong { color: var(--text-2); font-weight: 600; }

/* ---------- Empty search state ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 24px 44px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
}
.empty-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-border); }
.empty-ic .ic { width: 22px; height: 22px; }
.empty h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.empty p { max-width: 440px; font-size: 13.5px; color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.empty-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.empty-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.empty-logo {
  width: 132px; height: 52px; display: flex; align-items: center; justify-content: center; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--plate); filter: var(--plate-filter);
}
.empty-logo img { width: 100%; height: 26px; object-fit: scale-down; filter: url(#logoClean) grayscale(.15); }
.empty-logo .logo-fallback { font-size: 12px; }
.empty-suggest button {
  height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 12.5px; font-weight: 500;
}
.empty-suggest button:hover { border-color: var(--accent-border); color: var(--accent-text); }

/* ---------- Tool logo plate (outside the tiles) ----------
   Tool logos are wide wordmarks (~381×70): a fixed-height white plate, the logo centred with object-fit,
   never cropped, stretched or enlarged past its own pixels. NXL.logoImg(tool) gives the <img> with its trim.
   <span class="logo-plate"><img src="(the tool's logo)" alt="Semrush"></span>   sizes: .sm · (default) · .lg */
.logo-plate {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 200px; max-width: 100%; height: 64px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--plate); filter: var(--plate-filter); overflow: hidden;
}
.logo-plate img { width: 100%; height: 32px; object-fit: scale-down; filter: url(#logoClean); }
.logo-plate.sm { width: 112px; height: 40px; padding: 0 10px; border-radius: 8px; }
.logo-plate.sm img { height: 22px; }
.logo-plate.lg { width: 280px; height: 88px; padding: 0 22px; border-radius: 12px; }
.logo-plate.lg img { height: 44px; }
.logo-plate .logo-fallback { font-size: 14px; }
.logo-plate.sm .logo-fallback { font-size: 11px; white-space: nowrap; }

/* a tool outside the member's plan (NXL.toolTile marks it): the logo stays crisp, the button becomes "Get access" */
.tile.is-locked { background: var(--surface-2); }
.tile.is-locked .tile-go { background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.tile.is-locked:hover .tile-go, .tile.is-locked:has(.tile-link:focus-visible) .tile-go { box-shadow: none; }
.tile.is-locked .tile-cat .ic { color: var(--faint); }
.tile.is-locked .tile-name { color: var(--text-2); }

/* ==========================================================================
   Rail cards
   ========================================================================== */
.card { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px 13px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; }
.card-title .ic { width: 16px; height: 16px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); }

/* subscriptions */
.sub-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.sub-dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.sub-dot.amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.sub-dot.violet { background: #8B5CF6; box-shadow: 0 0 0 3px var(--violet-soft); }
.sub-dot.neutral { background: var(--faint); box-shadow: 0 0 0 3px var(--surface-3); }
.sub-main { flex: 1; min-width: 0; }
.sub-title { display: block; font-size: 13.5px; line-height: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; font-size: 12px; line-height: 16px; color: var(--muted); }
.sub-row.is-expired .sub-title { color: var(--text-2); }
.exp-toggle {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; border-top: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 500; text-align: left;
}
.exp-toggle:hover { background: var(--surface-3); }
.exp-toggle .ic { width: 15px; height: 15px; color: var(--muted); }
.exp-toggle .chev { margin-left: auto; transition: transform .2s; }
.exp-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.exp-names { color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.exp-list { background: var(--surface-2); }

/* announcements */
.ann { align-items: flex-start !important; }
.ann-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; border: 1px solid; }
.ann-ic .ic { width: 16px; height: 16px; }
.tone-amber { color: var(--amber-text); background: var(--amber-soft); border-color: var(--amber-border); }
.tone-green { color: var(--green-text); background: var(--green-soft); border-color: var(--green-border); }
.tone-violet { color: var(--violet-text); background: var(--violet-soft); border-color: var(--violet-border); }
.tone-red { color: var(--red-text); background: var(--red-soft); border-color: var(--red-border); }
.ann-body { min-width: 0; }
.ann-title { font-size: 13.5px; line-height: 18px; font-weight: 600; }
.ann-text { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ann-date { margin-top: 5px; font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* help desk */
.tk-main { flex: 1; min-width: 0; }
.tk-subj { font-size: 13.5px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* payments */
.pay-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.pay-ic .ic { width: 16px; height: 16px; }
.pay-main { flex: 1; min-width: 0; }
.pay-item { font-size: 13.5px; line-height: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }
.pay-amt { text-align: right; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-amt .paid { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; font-weight: 500; color: var(--green-text); }
.pay-amt .paid .ic { width: 12px; height: 12px; }

/* upcoming */
.up-body { padding: 2px 18px 16px; }
.up-list { display: flex; flex-wrap: wrap; gap: 8px; }
.up-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; font-weight: 500; color: var(--text-2); }
.up-chip .ic { width: 14px; height: 14px; color: var(--accent-text); }
.up-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* earn */
.card-earn { position: relative; isolation: isolate; }
.card-earn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(360px 160px at 100% 0%, var(--hero-wash), transparent 70%), radial-gradient(300px 140px at 0% 100%, var(--hero-wash-2), transparent 70%);
}
.earn-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.earn-opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.earn-opt:hover { border-color: var(--accent-border); box-shadow: var(--shadow-sm); }
.earn-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.earn-ic .ic { width: 17px; height: 17px; }
.earn-ic.grad { color: #fff; background: linear-gradient(140deg, #8B5CF6 0%, #6D28D9 55%, #EF4444 120%); }
.earn-text { flex: 1; min-width: 0; }
.earn-text strong { display: block; font-size: 13.5px; line-height: 18px; font-weight: 600; }
.earn-text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.earn-go { color: var(--faint); }
.earn-go.ic { width: 16px; height: 16px; }
.earn-opt:hover .earn-go { color: var(--accent-text); }

/* ---------- Card parts + generic list rows (full page set) ---------- */
.card-sub { margin-top: 2px; font-size: 12.5px; line-height: 1.45; font-weight: 400; color: var(--muted); }
.card-head.has-border { border-bottom: 1px solid var(--border); }
.card-body { padding: 18px; }
.card-head + .card-body { padding-top: 2px; }
.card-head.has-border + .card-body { padding-top: 18px; }
.card.is-link { display: block; transition: border-color .15s, box-shadow .15s; }
.card.is-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
/* <ul class="rows"><li><span class="row-ic tone-violet">…</span><div class="row-main"><a class="row-title">…</a><p class="row-meta">…</p></div><div class="row-end">…</div></li></ul> */
.row-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; border-width: 1px; border-style: solid; }
.row-ic:not([class*="tone-"]) { background: var(--surface-3); border-color: var(--border); color: var(--text-2); }
.row-ic .ic { width: 16px; height: 16px; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 13.5px; line-height: 18px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-end { flex: none; display: flex; align-items: center; gap: 8px; text-align: right; }
.rows > li.is-link { position: relative; transition: background-color .15s; }
.rows > li.is-link:hover { background: var(--surface-2); }
.rows > li.is-link .row-title::after { content: ""; position: absolute; inset: 0; z-index: 0; }   /* the title link covers the row */
.rows > li.is-link .row-end > * { position: relative; z-index: 1; }
a.row-title:hover, a.tk-subj:hover, a.pay-item:hover { color: var(--accent-text); }
a.tk-subj, a.pay-item { display: block; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.amt.plus { color: var(--green-text); }
.amt.minus { color: var(--text); }

/* ==========================================================================
   Forms
   <div class="field"><label class="label" for="em">E-mail</label><input class="input" id="em" type="email">
     <p class="hint">…</p><p class="field-error" id="em-err"><svg …/>Enter a valid e-mail</p></div>
   Invalid: add .is-invalid to .field (or NXL.fieldError(input, 'message')); aria-invalid is set for you.
   ========================================================================== */
.form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > .full { grid-column: 1 / -1; }
@container (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.form-actions.start { justify-content: flex-start; }
/* settings-style row: heading + help on the left, fields on the right (stacks on narrow screens) */
.form-row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 12px 32px; padding: 22px 0; border-top: 1px solid var(--border); }
.form-row:first-child { border-top: 0; padding-top: 0; }
.form-row-head h2, .form-row-head h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
.form-row-head p { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--muted); }
@container (max-width: 760px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
fieldset.fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.legend { padding: 0; margin-bottom: 10px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { display: flex; align-items: baseline; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text); }
.label > .label-aside, .label > .link-btn { margin-left: auto; }
.label-aside { font-size: 12.5px; font-weight: 500; color: var(--muted); }
/* label + a link on the same line (keeps the link out of the input's accessible name):
   <div class="label-row"><label class="label" for="pw">Password</label><a class="link-btn" href="…">Forgot password?</a></div> */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.label-aside.link-btn, .label .link-btn { font-size: 12.5px; }
.req { color: var(--red-text); font-weight: 600; }
.hint { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.field-error { display: none; align-items: flex-start; gap: 6px; font-size: 12.5px; line-height: 1.45; font-weight: 500; color: var(--red-text); }
.field-error .ic { width: 14px; height: 14px; margin-top: 2px; }
.field.is-invalid .field-error { display: flex; }

.input, .select, .textarea {
  display: block; width: 100%; min-width: 0; height: 40px; margin: 0; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 9px; background-color: var(--surface); color: var(--text);
  font: 400 14px/1.4 var(--font); box-shadow: var(--shadow-xs); -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.input-lg { height: 46px; font-size: 15px; border-radius: 10px; }
.input-sm { height: 32px; font-size: 13px; border-radius: 8px; }
.textarea { height: auto; min-height: 120px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.select { padding-right: 38px; cursor: pointer; background-image: var(--select-chev); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px 16px; text-overflow: ellipsis; }
.input[readonly], .input:disabled, .select:disabled, .textarea:disabled { background-color: var(--surface-2); color: var(--text-2); box-shadow: none; }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .7; cursor: not-allowed; }
.input[readonly]:hover { border-color: var(--border-strong); }
.input[readonly]:focus { box-shadow: none; border-color: var(--border-strong); }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea,
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red-solid); }
.field.is-invalid .input:focus, .field.is-invalid .select:focus, .field.is-invalid .textarea:focus,
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px var(--red-ring); }
.input.mono, .mono .input { font-family: var(--mono); font-size: 13.5px; letter-spacing: .01em; }

/* icon inside a field + a button at the end (password show/hide, clear, copy) */
.input-wrap { position: relative; display: block; min-width: 0; }
.input-wrap > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.input-wrap > .ic ~ .input { padding-left: 38px; }
.input-wrap:has(.input-btn) > .input { padding-right: 44px; }
.input-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--muted);
}
.input-btn:hover { background: var(--surface-3); color: var(--text); }
.input-btn .ic { width: 17px; height: 17px; }
.input-lg ~ .input-btn { right: 6px; width: 36px; height: 36px; }
.input-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
/* show/hide password: the button holds both icons (data-pw-toggle) */
[data-pw-toggle] .pw-hide, [data-pw-toggle][aria-pressed="true"] .pw-show { display: none; }
[data-pw-toggle][aria-pressed="true"] .pw-hide { display: block; }

/* joined input + addon / button:  <div class="input-group"><span class="addon">₹</span><input class="input"><button class="btn btn-outline">Apply</button></div> */
.input-group { display: flex; align-items: stretch; min-width: 0; }
.input-group > * { flex: none; }
.input-group > .input, .input-group > .select, .input-group > .input-wrap { flex: 1; min-width: 0; }
.input-group > :not(:first-child) { margin-left: -1px; }
.input-group > :not(:first-child):not(:last-child),
.input-group > :not(:first-child):not(:last-child) .input { border-radius: 0; }
.input-group > :first-child:not(:last-child), .input-group > :first-child:not(:last-child) .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :last-child:not(:first-child), .input-group > :last-child:not(:first-child) .input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .input:focus, .input-group > .input-wrap:focus-within { position: relative; z-index: 1; }
.input-group > .btn { height: auto; min-height: 40px; border-radius: 9px; box-shadow: none; }
.addon {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface-2); color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap;
}

/* checkbox / radio: <label class="check"><input type="checkbox"><span>Text <span class="check-sub">help</span></span></label> */
.check { position: relative; display: inline-flex; align-items: flex-start; gap: 10px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--text); cursor: pointer; }
.check > input, .radio-card > input[type="radio"], .radio-card > input[type="checkbox"], .plan-pick > input {
  -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 1px 0 0;
  border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--surface) no-repeat center / 12px 12px;
  cursor: pointer; transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.check > input[type="radio"], .radio-card > input[type="radio"], .plan-pick > input[type="radio"] { border-radius: 50%; }
.check > input:hover { border-color: var(--faint); }
.check > input:checked, .radio-card > input:checked, .plan-pick > input:checked { background-color: var(--accent); border-color: var(--accent); background-image: var(--tick); }
.check > input[type="radio"]:checked, .radio-card > input[type="radio"]:checked, .plan-pick > input[type="radio"]:checked { background-image: none; box-shadow: inset 0 0 0 3.5px var(--surface); }
.check > input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.check > input:disabled { opacity: .5; cursor: not-allowed; }
.check:has(> input:disabled) { color: var(--muted); cursor: not-allowed; }
.check-sub { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.check a { color: var(--accent-text); font-weight: 600; }   /* underlined like every link inside text (see the .prose a rule) */
.field.is-invalid .check > input { border-color: var(--red-solid); }
.checks { display: flex; flex-direction: column; gap: 12px; }

/* switch: <label class="switch"><input type="checkbox" role="switch"><span>Notify me</span></label> */
.switch { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; line-height: 20px; color: var(--text); cursor: pointer; }
.switch > input {
  -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 0;
  border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background-color .18s;
}
.switch > input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 1px rgba(0, 0, 0, .06); transition: transform .18s;
}
.switch > input:checked { background: var(--accent); }
.switch > input:checked::before { transform: translateX(16px); }
.switch > input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch > input:disabled { opacity: .5; cursor: not-allowed; }
.switch.sm > input { width: 32px; height: 18px; }
.switch.sm > input::before { width: 12px; height: 12px; }
.switch.sm > input:checked::before { transform: translateX(14px); }

/* radio cards (payment methods, options): <div class="choices"><label class="radio-card"><input type="radio" name="pay">
     <span class="rc-ic">…</span><span class="rc-body"><span class="rc-title">UPI / QR</span><span class="rc-sub">…</span></span>
     <span class="rc-aside"><span class="pill sm green">Instant</span></span></label>…</div> */
.choices { display: grid; gap: 10px; }
.choices.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (max-width: 640px) { .choices.cols-2 { grid-template-columns: minmax(0, 1fr); } }
.radio-card {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-xs); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.radio-card:hover { border-color: var(--border-strong); }
.radio-card > input { margin-top: 2px; }
.radio-card:has(> .rc-ic) > input { margin-top: 9px; }
.radio-card > input:focus-visible { outline: none; }
.radio-card:has(> input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.radio-card:has(> input:checked) {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
  background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface);
}
.radio-card:has(> input:disabled) { opacity: .55; cursor: not-allowed; }
.rc-ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-3); color: var(--text-2); }
.rc-ic .ic { width: 17px; height: 17px; }
.radio-card:has(> input:checked) .rc-ic { background: var(--surface); border-color: var(--accent-border); color: var(--accent-text); }
.rc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.rc-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.rc-sub { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.rc-aside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 2px; text-align: right; font-size: 12.5px; color: var(--muted); }
.rc-aside strong { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
@container (max-width: 420px) {
  .radio-card { flex-wrap: wrap; }
  .rc-aside { flex-basis: 100%; flex-direction: row; justify-content: flex-start; padding: 0 0 0 78px; }
}

/* filter bar above a list or table (search grows, selects keep their width, actions on the right; stacks on phones):
   <div class="toolbar"><div class="input-wrap toolbar-search"><span data-ic="search"></span><input class="input" type="search" placeholder="Search invoices" aria-label="Search invoices"></div>
     <select class="select" aria-label="Status">…</select><span class="spacer"></span><a class="btn btn-primary" href="…">New ticket</a></div> */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.toolbar > .toolbar-search { flex: 1 1 240px; max-width: 420px; }
.toolbar > .select { flex: 0 1 auto; width: auto; min-width: 150px; }
.toolbar > .segmented { flex: none; }
.toolbar-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.toolbar-meta strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@container (max-width: 600px) {
  .toolbar > .toolbar-search { flex: 1 1 100%; max-width: none; }
  .toolbar > .select { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .toolbar > .spacer { display: none; }
  .toolbar > .btn { flex: 1 1 100%; }
}
.input[type="search"]::-webkit-search-cancel-button, .input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

/* copy field: <div class="copy-field"><code>https://noxtools.com/?ref=rahulv</code><button class="btn btn-outline btn-sm" data-copy="…">Copy</button></div> */
.copy-field {
  display: flex; align-items: center; gap: 8px; min-width: 0; height: 44px; padding: 0 4px 0 14px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2);
}
.copy-field > code, .copy-field > .cf-text { flex: 1; min-width: 0; font: 500 13px/1.2 var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy-field > .btn { flex: none; height: 34px; }
.is-copied .ic { color: var(--green-text) !important; }

/* file picker (UI only): <label class="dropzone"><input type="file" class="sr-only" multiple accept="image/*,.pdf">
     <span class="dz-ic"><span data-ic="paperclip"></span></span><span class="dz-text"><strong>Add screenshots</strong> or drop files here</span>
     <span class="dz-hint">PNG, JPG or PDF</span></label>   then list picked files as .tag chips */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; padding: 18px;
  border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); color: var(--muted);
  font-size: 13px; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent-border); background: var(--accent-soft); }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.dz-ic { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 2px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.dz-ic .ic { width: 17px; height: 17px; }
.dz-text strong { color: var(--accent-text); font-weight: 600; }
.dz-hint { font-size: 12px; }

/* password strength: <div class="meter" data-score="0-4"><span class="meter-bars"><i></i><i></i><i></i><i></i></span><span class="meter-label">Weak</span></div> */
.meter { display: flex; align-items: center; gap: 10px; }
.meter-bars { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.meter-bars > i { height: 4px; border-radius: 999px; background: var(--surface-3); transition: background-color .2s; }
.meter[data-score="1"] .meter-bars > i:nth-child(-n+1) { background: var(--red); }
.meter[data-score="2"] .meter-bars > i:nth-child(-n+2) { background: var(--amber); }
.meter[data-score="3"] .meter-bars > i:nth-child(-n+3) { background: var(--green); }
.meter[data-score="4"] .meter-bars > i { background: var(--green); }
.meter-label { min-width: 72px; text-align: right; font-size: 12px; font-weight: 600; color: var(--muted); }
.meter[data-score="1"] .meter-label { color: var(--red-text); }
.meter[data-score="2"] .meter-label { color: var(--amber-text); }
.meter[data-score="3"] .meter-label, .meter[data-score="4"] .meter-label { color: var(--green-text); }

/* ==========================================================================
   Plans + order summary (signup and Order / Renew share these)
   ========================================================================== */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@container (min-width: 900px) { .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); } }   /* 4 across only when there is room */
@container (max-width: 540px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
.plan:hover { border-color: var(--border-strong); }
.plan:has(.plan-pick > input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring), var(--shadow-sm); }
.plan:has(.plan-pick > input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.plan-pick { display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 14px; cursor: pointer; border-radius: inherit; }
.plan-pick > input { position: absolute; top: 16px; right: 16px; margin: 0; }
.plan-pick > input:focus-visible { outline: none; }
.plan-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding-right: 30px; min-height: 22px; }
.plan-name { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--text); }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.plan-price strong { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-price span { font-size: 13px; color: var(--muted); }
.plan-meta { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.plan-inc { border-top: 1px solid var(--border); }
.plan-inc > summary {
  display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; list-style: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--accent-text); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.plan-inc > summary::-webkit-details-marker { display: none; }
.plan-inc > summary .ic { width: 14px; height: 14px; transition: transform .2s; }
.plan-inc[open] > summary .ic { transform: rotate(180deg); }
.plan-inc > summary:focus-visible { outline-offset: -2px; }
.plan-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 14px; }

.summary .sum-lines { padding: 0 18px; }
.sum-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.sum-line:first-child { border-top: 0; padding-top: 2px; }
.card-head.has-border + .sum-lines > .sum-line:first-child { padding-top: 12px; }
.sl-title { display: block; font-weight: 600; color: var(--text); }
.sl-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.sl-amt { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-block { padding: 12px 18px; border-top: 1px solid var(--border); }
.sum-totals { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }
.sum-totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.sum-totals dt, .sum-totals dd { margin: 0; }
.sum-totals dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-totals .is-discount dd { color: var(--green-text); font-weight: 600; }
.sum-totals .is-total { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--border-strong); color: var(--text); font-weight: 600; }
.sum-totals .is-total dd { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.015em; }
.sum-cta { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; border-top: 1px solid var(--border); }
.sum-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; }
.sum-note .ic { width: 14px; height: 14px; color: var(--green-text); }
/* order summaries of one item have no subtotal row: the total then needs no dashed rule of its own */
.summary .sum-totals > .is-total:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* logo row on a plan card (signup + Order / Renew), filled by NXL.planLogos(plan, 3):
   <span class="plan-logos" aria-hidden="true">…NXL.logoPlate(tool, 'sm')…</span>
   <span class="plan-meta">49 tools · about ₹31 a tool<span class="plan-incl">, including Semrush, Rytr and Keyword Tool</span></span>
   Cards under 320 px (4 across, small phones) hide the row and show the names as text (.plan-incl) instead. */
.plan:has(.plan-logos) { container: plan / inline-size; }
.plan-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.plan-logos .logo-plate { width: 92px; height: 34px; padding: 0 9px; border-radius: 8px; }
.plan-logos .logo-plate img { height: 20px; }
.plan-logos .logo-plate .logo-fallback { font-size: 11px; white-space: nowrap; }
.plan-logos + .plan-meta { margin-top: 10px; }
.plan-incl { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@container plan (max-width: 319.98px) {
  .plan-logos { display: none; }
  .plan-incl { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
}

/* ==========================================================================
   Result hero (thanks, payment failed): a status tile, the page's h1, one line that says what happened, up to two
   actions, then a row of facts (.seg parts). It has the launcher's wash + dotted grid, tinted by the outcome:
   .is-green paid · .is-amber pending · .is-red failed · (none) neutral / cancelled.
   <section class="result is-green" aria-labelledby="t">
     <div class="result-main">
       <span class="result-ic tone-green"><span data-ic="check"></span></span>
       <div class="result-text"><h1 class="result-title" id="t">Payment received</h1><p class="result-sub">…</p></div>
       <div class="result-actions"><a class="btn btn-outline" href="…">…</a><a class="btn btn-primary" href="…">…</a></div>
     </div>
     <div class="result-facts"><div class="seg"><p class="seg-label">Amount paid</p><p class="seg-value"><span class="big">₹1,688</span></p><p class="seg-sub">2 renewals</p></div> …</div>
   </section>
   ========================================================================== */
.result {
  --rs-wash: var(--hero-wash);
  --rs-ring: var(--surface-3);
  position: relative; isolation: isolate; overflow: hidden; container: result / inline-size;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.result.is-green { --rs-wash: rgba(22, 163, 74, .12); --rs-ring: var(--green-soft); }
.result.is-amber { --rs-wash: rgba(245, 158, 11, .14); --rs-ring: var(--amber-soft); }
.result.is-red   { --rs-wash: rgba(239, 68, 68, .11); --rs-ring: var(--red-soft); }
html[data-theme="dark"] .result.is-green { --rs-wash: rgba(34, 197, 94, .11); }
html[data-theme="dark"] .result.is-amber { --rs-wash: rgba(245, 158, 11, .10); }
html[data-theme="dark"] .result.is-red   { --rs-wash: rgba(239, 68, 68, .12); }
.result::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(560px 220px at 0% 0%, var(--rs-wash), transparent 70%),
    radial-gradient(440px 170px at 100% 0%, var(--hero-wash), transparent 70%);
}
.result::after {   /* the launcher's dotted grid, fading out downwards */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 130px; z-index: -1; pointer-events: none; opacity: .55;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent);
}
.result-main { display: flex; align-items: center; gap: 18px; padding: 24px; }
.result-ic {
  width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 15px; border: 1px solid;
  box-shadow: 0 0 0 6px var(--rs-ring);
}
.result-ic .ic { width: 24px; height: 24px; stroke-width: 2.25; }
.result-ic.tone-neutral { color: var(--text-2); background: var(--surface-3); border-color: var(--border-strong); }
.result-text { flex: 1; min-width: 0; }
.result-title { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.result-sub { margin-top: 4px; max-width: 660px; font-size: 14px; line-height: 1.55; color: var(--text-2); text-wrap: balance; }
.result-sub strong { color: var(--text); font-weight: 600; }
.result-actions { flex: none; display: flex; flex-wrap: wrap; gap: 10px; }
/* facts: the dashboard's KPI segments, one row under the hero (wraps to 2 × 2 on narrow screens) */
.result-facts { display: flex; flex-wrap: wrap; overflow: hidden; border-top: 1px solid var(--border); background: var(--surface-2); }
.result-facts > .seg { flex: 1 1 150px; padding: 14px 24px 15px; box-shadow: -1px 0 0 var(--border), 0 -1px 0 var(--border); }
.result-facts .seg-value { margin-top: 6px; min-height: 26px; font-size: 14.5px; font-weight: 600; color: var(--text); white-space: normal; }
.result-facts .seg-value .big { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-facts .seg-value .code-ref { height: 24px; font-size: 12.5px; color: var(--text); }
.result-facts .seg-sub { margin-top: 2px; white-space: normal; }   /* facts wrap instead of being cut off on phones */
/* tablet: the actions move under the text */
@container result (max-width: 780px) {
  .result-main { flex-wrap: wrap; }
  .result-actions { flex-basis: 100%; padding-left: 70px; }
}
/* phone: tile, then text, then full-width actions (primary on top) */
@container result (max-width: 540px) {
  .result-main { align-items: flex-start; gap: 14px; padding: 20px 16px 18px; }
  .result-ic { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 0 0 5px var(--rs-ring); }
  .result-ic .ic { width: 21px; height: 21px; }
  .result-text { flex-basis: 100%; }
  .result-title { font-size: 21px; line-height: 28px; }
  .result-sub { font-size: 13.5px; }
  .result-actions { flex-direction: column-reverse; padding-left: 0; }
  .result-actions > .btn { width: 100%; }
  .result-facts > .seg { flex-basis: 140px; padding: 12px 16px 13px; }
}

/* ==========================================================================
   Alerts: <div class="alert amber" role="status"><span class="alert-ic"><svg/></span><div class="alert-body">
     <p class="alert-title">…</p><p class="alert-text">…</p><div class="alert-actions">…</div></div>
     <button class="icon-btn alert-close" data-dismiss aria-label="Dismiss">…</button></div>
   Tones: (neutral) · .violet (info) · .green (success) · .amber (warning) · .red (error). role="alert" for errors.
   ========================================================================== */
.alert {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs);
}
.alert-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-3); color: var(--text-2); }
.alert-ic .ic { width: 16px; height: 16px; }
.alert-body { flex: 1; min-width: 0; padding-top: 6px; }
.alert-title { font-size: 13.5px; line-height: 20px; font-weight: 600; color: var(--text); }
.alert-text { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.alert-title + .alert-text { margin-top: 2px; }
.alert-text a, .alert-title a { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.alert-close { width: 32px; height: 32px; margin: 0 -6px 0 0; border-radius: 8px; color: var(--muted); }
.alert-close .ic { width: 16px; height: 16px; }
.alert.violet, .alert.green, .alert.amber, .alert.red { box-shadow: none; }
/* tints are layered on --surface, so an alert looks the same on the page, in a card or on a patterned panel */
.alert.violet { background: linear-gradient(var(--violet-soft), var(--violet-soft)), var(--surface); border-color: var(--violet-border); }
.alert.green { background: linear-gradient(var(--green-soft), var(--green-soft)), var(--surface); border-color: var(--green-border); }
.alert.amber { background: linear-gradient(var(--amber-soft), var(--amber-soft)), var(--surface); border-color: var(--amber-border); }
.alert.red { background: linear-gradient(var(--red-soft), var(--red-soft)), var(--surface); border-color: var(--red-border); }
.alert.violet .alert-ic { color: var(--violet-text); border-color: var(--violet-border); background: var(--surface); }
.alert.green .alert-ic { color: var(--green-text); border-color: var(--green-border); background: var(--surface); }
.alert.amber .alert-ic { color: var(--amber-text); border-color: var(--amber-border); background: var(--surface); }
.alert.red .alert-ic { color: var(--red-text); border-color: var(--red-border); background: var(--surface); }
/* compact one-line alert (form errors, small notes) */
.alert.sm { align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.alert.sm > .ic { width: 17px; height: 17px; flex: none; align-self: flex-start; margin-top: 1px; }
.alert.sm.violet > .ic { color: var(--violet-text); }
.alert.sm.green > .ic { color: var(--green-text); }
.alert.sm.amber > .ic { color: var(--amber-text); }
.alert.sm.red > .ic { color: var(--red-text); }
.alert.sm .alert-text { margin: 0; flex: 1; min-width: 0; color: var(--text); }
/* banner: a pill + one line, like the maintenance notice (link on the right) */
.alert.banner { align-items: center; padding: 10px 12px 10px 14px; }
.alert.banner .alert-text { margin: 0; flex: 1; min-width: 0; color: var(--text-2); }
.alert.banner .alert-text strong { color: var(--text); font-weight: 600; }
@container (max-width: 600px) {
  .alert.banner { flex-wrap: wrap; align-items: flex-start; }
  .alert.banner .alert-text { flex-basis: 100%; order: 2; }
}

/* ==========================================================================
   Tables + phone cards. Give every <td> a data-label; on narrow screens (main < 620 px) each row becomes a card:
   .cell-title = card title (top left), .cell-end = top right (amount / status), .cell-actions = bottom row,
   other cells = "label  value" lines. Wrap in <div class="card table-card"><div class="table-wrap">…</div></div>.
   ========================================================================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; color: var(--text-2); }
.table th {
  padding: 10px 16px; text-align: left; white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.table td { padding: 13px 16px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .t-main { display: block; font-weight: 600; color: var(--text); }
.table .t-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.table a.t-link { font-weight: 600; color: var(--accent-text); border-radius: 4px; white-space: nowrap; }
.table a.t-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table th.cell-actions { text-align: right; }
.table-card .table th:first-child, .table-card .table td:first-child { padding-left: 18px; }
.table-card .table th:last-child, .table-card .table td:last-child { padding-right: 18px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
@container (max-width: 619.98px) {
  .table-card { border: 0; background: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .table-card .table-foot { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .table-wrap { overflow: visible; }
  .table-stack, .table-stack tbody { display: block; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .table-stack tbody { display: flex; flex-direction: column; gap: 10px; }
  .table-stack tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs);
  }
  .table-stack tbody tr:hover { background: var(--surface); }
  .table-stack td, .table-card .table-stack td:first-child, .table-card .table-stack td:last-child {
    grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0; border: 0; font-size: 13px; text-align: right; min-width: 0;
  }
  .table-stack td[data-label]::before { content: attr(data-label); flex: none; text-align: left; font-weight: 500; color: var(--muted); }
  .table-stack td.cell-title { grid-column: 1; grid-row: 1; display: block; text-align: left; font-size: 14px; font-weight: 600; color: var(--text); }
  .table-stack td.cell-end { grid-column: 2; grid-row: 1; justify-content: flex-end; font-weight: 600; color: var(--text); }
  .table-stack td.cell-sub { display: block; text-align: left; color: var(--muted); margin-top: -4px; }
  .table-stack td.cell-title::before, .table-stack td.cell-end::before, .table-stack td.cell-sub::before, .table-stack td.cell-actions::before { content: none; }
  .table-stack td.cell-actions { justify-content: flex-end; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
  .table-stack td.cell-actions > .btn { flex: 1 1 0; }
  .table-stack td:empty { display: none; }
}

/* ==========================================================================
   Tabs (underline) and segmented control. Same markup contract, wired by shell.js (click + arrow keys):
   <div class="tabs" role="tablist" data-tabs><button class="tab" role="tab" aria-selected="true" aria-controls="p1">All<span class="count">3</span></button>…</div>
   <div role="tabpanel" id="p1">…</div>   (tabs without aria-controls just fire the "nxl:tab" event — use them as filters)
   ========================================================================== */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px;
  border: 0; border-radius: 8px 8px 0 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab .ic { width: 15px; height: 15px; }
.tab[aria-selected="true"] { color: var(--text); font-weight: 600; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.tab[aria-selected="true"] .count { background: var(--accent-soft); color: var(--accent-text); }
.tab:focus-visible { outline-offset: -3px; }
.tab-panel:focus-visible { outline-offset: 4px; border-radius: 4px; }

.segmented { display: inline-flex; max-width: 100%; gap: 2px; padding: 3px; overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-3); scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented > button {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 0; border-radius: 7px; background: none; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.segmented > button:hover { color: var(--text); }
/* the keyboard ring is drawn inside the segment: the track scrolls sideways (overflow), which cut a ring drawn outside by
   1 px (by 4 px where a page gives the track no padding) */
.segmented > button:focus-visible { outline-offset: -2px; }
.segmented > button .ic { width: 15px; height: 15px; }
.segmented > [aria-selected="true"], .segmented > [aria-pressed="true"] { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.segmented.block { display: flex; }
.segmented.block > button { flex: 1 1 0; }

/* Accordion (native <details>, keyboard-ready):
   <div class="accordion"><details class="acc" name="faq"><summary><span class="acc-q">Question</span><svg class="ic acc-chev"/></summary><div class="acc-body">…</div></details>…</div> */
.accordion { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); overflow: hidden; }
.acc + .acc { border-top: 1px solid var(--border); }
.acc > summary {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 18px; list-style: none; cursor: pointer;
  font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); transition: background-color .15s;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--surface-2); }
.acc > summary:focus-visible { outline-offset: -2px; }
.acc-q { flex: 1; min-width: 0; }
.acc-chev, .acc > summary > .ic:last-child { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.acc[open] > summary .acc-chev, .acc[open] > summary > .ic:last-child { transform: rotate(180deg); }
.acc-body { padding: 0 18px 16px; font-size: 13.5px; line-height: 1.65; color: var(--text-2); }
.acc-body p + p { margin-top: 8px; }
.acc-body a { color: var(--accent-text); font-weight: 600; }
.acc mark { background: var(--accent-soft-2); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Modal (a sheet on phones): <div class="modal" id="m1" hidden><div class="modal-box" role="dialog" aria-modal="true" aria-labelledby="m1t">
   <div class="modal-head"><h2 class="modal-title" id="m1t">…</h2><button class="icon-btn" data-modal-close aria-label="Close">…</button></div>
   <div class="modal-body">…</div><div class="modal-foot">…</div></div></div>   open: data-modal-open="m1" or NXL.modal.open('m1') */
.modal {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in .14s ease-out; overflow-y: auto;
}
.modal-box {
  width: min(520px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  animation: pal-in .16s ease-out;
}
.modal-box.sm { width: min(420px, 100%); }
.modal-box.lg { width: min(720px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 14px; }
.modal-head > .icon-btn:last-child { margin: -8px -10px 0 auto; }
.modal-ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; border: 1px solid; }
.modal-ic .ic { width: 19px; height: 19px; }
.modal-title { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.modal-sub { margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.modal-body { padding: 0 20px 18px; overflow-y: auto; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
html.modal-open { overflow: hidden; }

/* Stepper (checkout progress): <ol class="stepper"><li class="is-done"><span class="step-dot"><svg/></span><span class="step-label">Plan</span></li>
   <li class="is-current" aria-current="step"><span class="step-dot">2</span><span class="step-label">Details</span></li><li>…</li></ol> */
.stepper { display: flex; align-items: flex-start; }
.stepper > li { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.stepper > li::before {
  content: ""; position: absolute; top: 15px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; border-radius: 2px; background: var(--border);
}
.stepper > li:first-child::before { display: none; }
.stepper > li.is-done::before, .stepper > li.is-current::before { background: var(--accent); }
.step-dot {
  position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 600 13px/1 var(--font); font-variant-numeric: tabular-nums;
}
.step-dot .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper .is-done .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper .is-current .step-dot { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-ring); }
.step-label { max-width: 100%; padding: 0 4px; font-size: 13px; line-height: 1.3; font-weight: 500; color: var(--muted); }
.stepper .is-done .step-label { color: var(--text-2); }
.stepper .is-current .step-label { color: var(--text); font-weight: 600; }
.step-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
@container (max-width: 480px) { .step-label { font-size: 12px; } .step-sub { display: none; } }

/* numbered steps (guides, "how it works"): <ol class="steps"><li><div><p class="steps-title">…</p><p class="steps-text">…</p></div></li></ol> */
.steps { display: flex; flex-direction: column; counter-reset: steps; }
.steps > li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  counter-increment: steps; content: counter(steps); position: relative; z-index: 1; flex: none; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--accent-border); background: var(--accent-soft);
  color: var(--accent-text); font: 700 12.5px/1 var(--font);
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--border); }
.steps > li > div { min-width: 0; padding-top: 4px; }
.steps-title { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.steps-text { margin-top: 2px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.steps.row { flex-direction: row; gap: 16px; }
.steps.row > li { flex: 1 1 0; flex-direction: column; gap: 10px; padding-bottom: 0; }
.steps.row > li::after { display: none; }
@container (max-width: 700px) { .steps.row { flex-direction: column; gap: 14px; } .steps.row > li { flex-direction: row; } }

/* Pagination: <nav class="pager" aria-label="Pagination"><p class="pager-info">Showing <strong>1–10</strong> of <strong>12</strong></p>
   <div class="pager-btns"><a class="pager-btn edge" aria-disabled="true">…Previous</a><a class="pager-btn" aria-current="page">1</a>…</div></nav> */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.pager-info { font-size: 13px; color: var(--muted); }
.pager-info strong { font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pager-btns { display: flex; align-items: center; gap: 4px; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 34px; height: 34px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 9px; background: none; color: var(--text-2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s;
}
.pager-btn .ic { width: 15px; height: 15px; }
.pager-btn:hover { background: var(--surface-3); color: var(--text); }
.pager-btn.edge { border-color: var(--border); background: var(--surface); box-shadow: var(--shadow-xs); }
.pager-btn.edge:hover { border-color: var(--border-strong); }
.pager-btn[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); }
.pager-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }
.pager-gap { padding: 0 4px; color: var(--faint); }
@container (max-width: 600px) {
  .pager { justify-content: center; }
  .pager-info { flex-basis: 100%; text-align: center; }
  .pager-btn:not(.edge):not([aria-current]), .pager-gap { display: none; }
  .pager-btn { min-width: 40px; height: 40px; }
}

/* ---------- Small parts ---------- */
/* progress: <div class="progress" role="progressbar" aria-valuenow="64"><span style="--value:64%"></span></div> */
.progress { position: relative; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress > span { position: absolute; inset: 0 auto 0 0; width: var(--value, 0%); border-radius: inherit; background: var(--accent); transition: width .3s; }
.progress.green > span { background: var(--green); }
.progress.amber > span { background: var(--amber); }
.progress.red > span { background: var(--red); }
.progress.sm { height: 5px; }
/* spinner: <span class="spinner" role="status" aria-label="Loading"></span> */
.spinner { display: inline-block; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent-soft-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner.lg { width: 44px; height: 44px; border-width: 3px; }
/* key–value list: <dl class="kv"><div><dt>Invoice</dt><dd>NX-390117</dd></div>…</dl> */
.kv { display: flex; flex-direction: column; margin: 0; }
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.kv > div:first-child { border-top: 0; padding-top: 0; }
.kv > div:last-child { padding-bottom: 0; }
.kv dt { flex: none; color: var(--muted); }
.kv dd { margin: 0; min-width: 0; text-align: right; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
/* check list: <ul class="checklist"><li><svg class="ic"/>Text</li></ul>  (.violet for brand ticks) */
.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist > li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 20px; color: var(--text-2); }
.checklist > li > .ic { flex: none; width: 20px; height: 20px; padding: 3.5px; border-radius: 50%; border: 1px solid var(--green-border); background: var(--green-soft); color: var(--green-text); stroke-width: 3; }
.checklist.violet > li > .ic { border-color: var(--violet-border); background: var(--violet-soft); color: var(--violet-text); }
/* divider with text: <div class="divider">or</div> */
.divider { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.rule { height: 1px; margin: 16px 0; border: 0; background: var(--border); }   /* a divider line: name list items differently (.rule-item) */
/* small note with an icon: <p class="note"><svg class="ic"/>Activation is instant with UPI.</p> */
.note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.note > .ic { flex: none; width: 15px; height: 15px; margin-top: 1px; }
/* inline code / reference numbers */
.code-ref { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--code-bg); font: 500 12px/1 var(--mono); color: var(--text-2); white-space: nowrap; }
/* skeleton line while something "loads" */
.skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-hover) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ==========================================================================
   Demo states (bottom of a page that has ?state= variants). shell.js marks the current chip and keeps the
   other URL parameters. Markup: components.html and the page templates.
   ========================================================================== */
.demo-states { margin-top: 40px; padding: 14px 16px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.ds-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.ds-head .ic { width: 15px; height: 15px; }
.ds-title { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); }
.ds-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ds-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: border-color .15s, color .15s, background-color .15s;
}
.ds-chip:hover { border-color: var(--border-strong); color: var(--text); }
.ds-chip[aria-current="true"] { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-text); font-weight: 600; }
.ds-chip .ic { width: 13px; height: 13px; }
.ds-text { margin-top: 10px; max-width: 920px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.ds-text code { font: 500 12px/1 var(--mono); color: var(--text-2); white-space: nowrap; }   /* never "?" on one line and "state=…" on the next */

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { border-radius: 4px; }
.footer-links a:hover { color: var(--text); }
.footer-links .mail { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; }
.footer-links .mail .ic { width: 14px; height: 14px; color: var(--muted); }

/* ==========================================================================
   Command palette
   ========================================================================== */
.palette {
  position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start;
  padding: 11vh 16px 16px; background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: fade-in .14s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.pal-box {
  width: min(660px, 100%); max-height: min(580px, 78vh); display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: pal-in .16s ease-out;
}
@keyframes pal-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.pal-top { display: flex; align-items: center; gap: 12px; height: 60px; flex: none; padding: 0 12px 0 18px; border-bottom: 1px solid var(--border); }
.pal-search-ic { color: var(--muted); }
.pal-search-ic .ic, .pal-search-ic.ic { width: 20px; height: 20px; }
.pal-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: 500 16px/1 var(--font); }
.pal-input::placeholder { color: var(--muted); font-weight: 400; }
.pal-esc { border: 0; background: none; padding: 6px; border-radius: 8px; }
.pal-cancel { display: none; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.pal-esc:hover { background: var(--surface-3); }
.pal-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; overscroll-behavior: contain; }
.pal-group { padding: 12px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pal-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.pal-opt[aria-selected="true"] { background: var(--surface-3); }
.pal-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.pal-ico .ic { width: 16px; height: 16px; }
.pal-opt[aria-selected="true"] .pal-ico { background: var(--surface); }
.pal-ico.tone-red, .pal-ico.tone-amber { border-color: transparent; }
.pal-ico.tone-red { color: var(--red-text); background: var(--red-soft); }
.pal-ico.tone-amber { color: var(--amber-text); background: var(--amber-soft); }
.pal-logo { width: 96px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; padding: 0 9px; border-radius: 9px; border: 1px solid var(--border); background: var(--plate); filter: var(--plate-filter); }
.pal-logo img { width: 100%; height: 22px; object-fit: scale-down; }
.pal-logo.locked { opacity: .6; }
.pal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pal-label { font-size: 14px; line-height: 19px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-label mark { background: none; color: var(--accent-text); font-weight: 600; }
.pal-hint { font-size: 12.5px; line-height: 17px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-right { flex: none; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pal-enter { display: none; }
.pal-opt[aria-selected="true"] .pal-enter { display: inline-flex; }
.pal-opt[aria-selected="true"] .pal-kind { display: none; }
.pal-none { padding: 36px 16px 40px; text-align: center; color: var(--muted); font-size: 13.5px; }
.pal-none strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.pal-foot { display: flex; align-items: center; gap: 18px; flex: none; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--muted); }
.pal-foot span { display: inline-flex; align-items: center; gap: 4px; }
.pal-foot kbd { height: 19px; min-width: 19px; font-size: 10.5px; }
.pal-brand { margin-left: auto; gap: 6px !important; font-weight: 600; color: var(--text-2); }
.pal-brand img { width: 14px; height: 14px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px));
  padding: 10px 10px 10px 14px; border-radius: 12px; background: #18181D; color: #F4F4F6; border: 1px solid #2A2A33;
  box-shadow: var(--shadow-lg); font-size: 13.5px; line-height: 1.4; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.in { opacity: 1; transform: none; }
.toast .ic { width: 17px; height: 17px; color: #C4B5FD; }
.toast-msg { flex: 1; min-width: 0; padding-right: 4px; }
.toast-act { border: 0; background: rgba(255, 255, 255, .08); color: #DDD6FE; font: 600 12.5px/1 var(--font); padding: 8px 10px; border-radius: 8px; }
.toast-act:hover { background: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .toast { background: #26262F; border-color: var(--border-strong); }

/* ---------- Scrim + bottom bar ---------- */
.scrim { position: fixed; inset: 0; z-index: 44; background: var(--scrim); animation: fade-in .15s ease-out; }
.bottombar { display: none; }
.bb-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; padding: 0;
  border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 500; border-radius: 10px;
}
.bb-item .ic { width: 22px; height: 22px; }
.bb-item[aria-current="page"] { color: var(--accent-text); font-weight: 600; }
.bb-item:focus-visible { outline-offset: -2px; }   /* the bar ends at the screen's bottom edge, which cut a ring drawn outside */
.bb-fab { width: 34px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 6px 14px -6px rgba(109, 40, 217, .8); }
.bb-fab .ic { width: 18px; height: 18px; }
.bb-search { color: var(--text-2); }
.bb-badge, .bb-dot { position: absolute; top: 6px; left: calc(50% + 6px); }
.bb-badge { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; box-shadow: 0 0 0 2px var(--surface); }
.bb-badge:empty { display: none; }
.bb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); top: 8px; left: calc(50% + 8px); }
.toast.is-success .ic { color: #86EFAC; }
.toast.is-error .ic { color: #FCA5A5; }
.toast.is-warning .ic { color: #FCD34D; }
.bb-item.is-current { color: var(--accent-text); font-weight: 600; }

/* ==========================================================================
   Responsive (shell + shared components)
   ========================================================================== */
@media (max-width: 1279.98px) {
  .acct-text { display: none; }
}

/* Tablet + phone: sidebar becomes a drawer */
@media (max-width: 1023.98px) {
  .sidebar {
    width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; box-shadow: none;
    transition: transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s;
  }
  html.drawer-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  .sb-toggle { display: none; }
  .sb-close { display: inline-grid; }
  .sb-head { padding: 0 10px 0 20px; }
  .main-wrap { margin-left: 0; }
  .topbar { padding: 0 24px; gap: 8px; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .brand-top { display: inline-flex; margin-right: 8px; }
  .search-trigger { max-width: 340px; margin-left: auto; }
  .topbar-right { margin-left: 4px; }
  .main { padding: 24px 24px 32px; }
}

/* Phone */
@media (max-width: 767.98px) {
  .topbar { padding: 0 12px 0 16px; height: 60px; }
  .search-trigger { display: none; }
  .search-icon-btn { display: inline-grid; }
  .topbar-right { margin-left: auto; gap: 0; }
  .vsep { display: none; }
  .acct-btn { min-width: 40px; justify-content: center; padding: 0 3px; gap: 4px; }
  .acct-chev { display: none; }
  .acct-btn .avatar { width: 32px; height: 32px; }   /* only the header button shrinks; .avatar-sm/-lg/-xl keep their sizes */
  html { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { align-items: flex-start; }
  .page-title { font-size: 21px; line-height: 28px; }
  .page-sub { font-size: 13px; }
  .page-sub .sep { display: none; }
  .ph-actions { width: 100%; }
  .ph-actions > .btn { flex: 1 1 0; }
  .seg { padding: 12px 14px; }
  .seg-value { margin-top: 4px; font-size: 12.5px; }
  .seg-value .big { font-size: 17px; line-height: 22px; }
  .seg-value .unit { display: none; }
  .launcher { padding: 14px 14px 16px; }
  .launch-head { margin-bottom: 10px; }
  .search-input { height: 52px; padding-right: 56px; font-size: 16px; }
  .search-aside { right: 6px; }
  .search-clear { width: 40px; height: 40px; }
  .kbd-hint, .enter-hint { display: none !important; }
  /* 4 px above and 6 px below the chips inside the sideways-scrolling row, so a focused chip's ring and its 44 px touch
     area are not cut off by the row. The row is drawn 4 px higher and its bottom margin takes the space back, so the
     chips and everything around them stay exactly where they were (also where a page sets its own top margin) */
  .chips { flex-wrap: nowrap; overflow-x: auto; position: relative; top: -4px; margin: 12px -14px -8px; padding: 4px 14px 6px; scrollbar-width: none; scroll-padding: 0 14px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; height: 40px; }
  .btn-sm, .btn-xs { height: 40px; }
  .link-btn { padding: 13px 8px; margin: -13px -8px; }
  .empty-suggest button { height: 40px; padding: 0 14px; }
  .sec { margin-top: 22px; }
  .sec-aside .nav-hints { display: none; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .plate { height: 72px; padding: 0 12px; margin: 5px 5px 0; }
  .plate img { height: 36px; }
  .tile--compact .plate { height: 58px; padding: 0 10px; }
  .tile--compact .plate img { height: 30px; }
  .tile-foot { padding: 9px 10px 10px 11px; gap: 6px; margin-top: 5px; }
  .tile-name { font-size: 13px; }
  .tile-cat { font-size: 11.5px; }
  .tile-line .pill .ic, .tile-cat .ic { display: none; }   /* 2-up tiles: room for "ChatGPT · New" and "AI Chat & Assistants" */
  .tile-go { width: 32px; height: 32px; padding: 0; justify-content: center; }
  .tile-go .go-label { display: none; }
  .bottombar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 6px env(safe-area-inset-bottom);
    background: var(--topbar-bg); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--border);
  }
  /* toasts sit at the top, 8 px under the 60 px header, and slide in from above (24 Nov 2026): just above the bottom bar
     they lay over the controls there for 3.6 s and took their taps ("Save changes" at the screen's bottom edge, the
     bottom bar, a bottom sheet's buttons). While a dialog is open (a bottom sheet) they sit higher still, clear of the
     sheet's top edge. While the account menu or the notifications are open they sit at the bottom, so "Username copied"
     never lies over the menu it came from. That selector weighs no more than .toasts (:where), so a page's own rule
     that lifts the toasts above its bar still wins there: the total bar of Order / Renew (finish-b1-verify: with the
     menu open the toast lay over that bar) */
  .toasts { left: 16px; right: 16px; top: calc(68px + env(safe-area-inset-top)); bottom: auto; align-items: stretch; }
  html.modal-open .toasts { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }
  :where(html:has(.topbar .pop:not([hidden]))) .toasts { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
  .toast:not(.in) { transform: translateY(-8px); }
  html:has(.topbar .pop:not([hidden])) .toast:not(.in) { transform: translateY(8px); }
  .palette { padding: 0; align-items: stretch; }
  .pal-box { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .pal-foot { display: none; }
  .pal-esc { min-height: 40px; padding: 0 8px; }
  .pal-esc kbd { display: none; }
  .pal-cancel { display: inline; }
  /* no "↵" key on the selected row of the phone sheet either (it has no key hints): it shows "Open" like the other rows */
  .pal-opt[aria-selected="true"] .pal-enter { display: none; }
  .pal-opt[aria-selected="true"] .pal-kind { display: inline; }
  .pop-notif { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
  .pop-acct { position: fixed; top: 64px; right: 12px; }
  .footer { flex-direction: column; align-items: flex-start; margin-top: 32px; }
  /* shared components on phones */
  .input, .select, .textarea { font-size: 16px; }   /* no zoom-on-focus in iOS Safari */
  .input, .select { height: 44px; }
  .input-sm { height: 40px; }
  .input-lg { height: 48px; }
  .check, .switch { min-height: 24px; }
  .tab { height: 44px; }
  .segmented > button { height: 36px; }
  .modal { align-items: flex-end; padding: 0; }
  .modal-box, .modal-box.sm, .modal-box.lg {
    width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom); animation: sheet-in .22s cubic-bezier(.2, .8, .2, 1);
  }
  .modal-box::before { content: ""; flex: none; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--border-strong); }
  .modal-head { padding-top: 12px; }
  .modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .modal-foot .btn { width: 100%; height: 44px; }
  .demo-states { margin-top: 32px; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* Phones and touch screens */
@media (max-width: 767.98px), (pointer: coarse) {
  /* the button inside a field (show password, copy, clear) is 40 px: on touch tablets too (it was 32), and beside the
     sign-in page's large field as well (it stayed 36) */
  .input-btn, .input-lg ~ .input-btn { width: 40px; height: 40px; right: 2px; }
  /* footer links (FAQs, Help Desk): 44 px tap targets; the padding is taken back by a negative margin, so nothing moves
     (9 px a side = half of the 18 px gap, so the two never overlap) */
  .footer-links a { padding: 13px 9px; margin: -13px -9px; }
  /* a link button's touch padding (13 px) reaches the edge of its card, whose overflow cut off the lower part of its focus
     ring (Affiliate terms, My Wallet's FAQs, All FAQs): the ring is drawn just inside */
  .card-foot .link-btn:focus-visible { outline-offset: -3px; }
}

@media (max-width: 380px) {   /* 360-wide Android phones: every tool name and category still fits */
  .seg-value .big { font-size: 16px; }
  .brand-top .brand-name { font-size: 15px; }
  .tile--compact .tile-arrow { display: none; }
  .tile-foot { padding: 9px 8px 10px 10px; gap: 4px; }
  .tile-go { width: 28px; height: 28px; }
  .tile-name { font-size: 12.5px; }
  .tile-cat { font-size: 11px; }
}

/* Touch devices: no hover, bigger hit areas, no keyboard-only hints */
@media (hover: none) and (pointer: coarse) {
  .kbd-hint, .nav-hints, .st-keys, .pal-foot { display: none !important; }
  .pal-opt[aria-selected="true"] .pal-enter { display: none !important; }   /* the search sheet's selected row: "Open", no "↵" */
  .pal-opt[aria-selected="true"] .pal-kind { display: inline; }
}
@media (hover: none) {
  .tile:hover { transform: none; }
}
@media (pointer: coarse) {
  .btn-xs, .btn-sm { min-height: 40px; }
  .link-btn { position: relative; padding: 13px 8px; margin: -13px -8px; }
  .link-btn::before { content: ""; position: absolute; inset: -2px 0; }   /* 45 px tap area; box, focus ring and layout as before */
  .chip { height: 40px; }
  .chip-locked { height: 38px; }
  .search-clear { width: 40px; height: 40px; }
  .empty-suggest button { height: 40px; }
  .toast-act { min-height: 40px; }
  .seg-link { position: relative; }
  .seg-link::after { content: ""; position: absolute; inset: -11px -8px; }
  .ds-chip, .pager-btn { min-height: 40px; }
  .check, .switch { padding: 8px 0; margin: -8px 0; }

  /* 44 px tap areas. Most are invisible frames around the part (a ::before / ::after), so nothing changes size or look.
     The insets count from the padding box, 1 px inside a part's border (none for .input-btn, segmented buttons, links) */
  .btn::before { content: ""; position: absolute; inset: -4px 0; }   /* 38 px buttons (::after is the loading spinner) */
  .btn-sm::before, .btn-xs::before { inset: -3px 0; }                 /* small buttons are 40 px on touch */
  .btn-lg::before { content: none; }                                  /* 46 px already */
  /* aMember's own submit buttons (<input class="btn">: Send ticket, Send reply) cannot draw a frame: they grow to 44 px,
     and a button in the same row grows with them, so the row stays even */
  input.btn:not(.btn-lg) { min-height: 44px; }
  .btn-row:has(input.btn:not(.btn-lg)) > .btn:not(.btn-lg) { min-height: 44px; }
  /* header, drawer and account buttons: their boxes stay 40 px (phones: see below) */
  .topbar .icon-btn::after, .sb-head .icon-btn::after, .acct-btn::after, .search-trigger::after { content: ""; position: absolute; inset: -3px; }
  .acct-btn, .search-trigger { position: relative; }
  .brand { position: relative; }
  .brand::after { content: ""; position: absolute; inset: -2px 0; }   /* the logo link (home), 40 px tall */
  .sb-toggle::before { inset: -10px; }                                /* the 26 px collapse toggle */
  .alert-close::after { content: ""; position: absolute; inset: -7px; }   /* the 32 px dismiss X */
  .input-btn::after { content: ""; position: absolute; inset: -2px; }    /* show password / copy, 40 px */
  .crumbs a { position: relative; }
  .crumbs a::after { content: ""; position: absolute; inset: -16px -4px -8px; }   /* 44 px; the title 8 px below stays clear */
  .chip { position: relative; }
  .chip::after { content: ""; position: absolute; inset: -3px 0; }    /* chips 40 px, */
  .chip-locked::after { inset: -4px 0; }                              /* locked ones 38 px */
  /* the search box's clear (x), the "no tools match" suggestions and a message's action button (e.g. "Undo" after
     clearing "Recently opened"): 40 px boxes, 44 px tap areas (1 Dec 2026) */
  .search-clear, .empty-suggest button, .toast-act { position: relative; }
  .search-clear::after { content: ""; position: absolute; inset: -2px; }
  .toast-act::after { content: ""; position: absolute; inset: -2px 0; }
  .empty-suggest button::after { content: ""; position: absolute; inset: -3px 0; }   /* 1 px border: counted from inside it */
  /* parts that grow, as on phones: menu items, fields, tabs, and the segmented buttons (38 px + the track's 3 px above
     and below = 44 px, like the All tools filter) */
  .nav-item { min-height: 44px; }
  .pop-acct .menu-item { min-height: 44px; }   /* the account menu's rows, the username row too */
  .input, .select { height: 44px; }
  .input-sm { height: 40px; }
  .input-lg { height: 48px; }
  .tab { height: 44px; }
  .segmented > button { position: relative; height: 38px; }
  .segmented > button::after { content: ""; position: absolute; inset: -3px 0; }
}
/* the phone header's buttons sit 4 px apart (they touched), so the menu, search, bell and light / dark buttons keep the
   44 x 44 frame of every touch screen (2 px past each side of their 40 px boxes) and no frame reaches over a neighbour
   (24 Nov 2026: they were 40 px wide). The room comes from the free space between the logo and the buttons; the logo's
   8 px right margin (only needed beside the wide search field, hidden on phones) goes, so a 360 px phone still fits */
@media (pointer: coarse) and (max-width: 767.98px) {
  .topbar-right { gap: 4px; }
  .brand-top { margin-right: 0; }
  .acct-btn::after { inset: -3px 0; }
  /* the account button is the last part of the header: its frame also reaches 5 px into the header's 12 px right
     padding, so its tap area is 44 px wide, like the menu rows it opens (24 Nov 2026) */
  .acct-btn::after { right: -5px; }
}

html.no-anim *, html.no-anim *::before, html.no-anim *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .tile:hover { transform: none; }
}
@media (forced-colors: active) {
  .tile, .card, .strip, .chip, .search-input { border: 1px solid CanvasText; }
  .chip[aria-pressed="true"] { outline: 2px solid Highlight; }
  /* a chosen radio is a fill + an inner ring, which forced colours remove (it looked unticked): system colours instead */
  .check > input[type="radio"]:checked, .radio-card > input[type="radio"]:checked, .plan-pick > input[type="radio"]:checked {
    forced-color-adjust: none; background: Highlight; border-color: Highlight; box-shadow: inset 0 0 0 3.5px Canvas;
  }
  /* the focused tile's ring is a border colour + shadow, which forced colours remove; an outline stays */
  .tile:has(.tile-link:focus-visible) { outline: 3px solid Highlight; outline-offset: 2px; }
}

/* Print (invoice, receipts): only the page content, always in light colours (shell.js switches the theme while printing) */
@media print {
  .sidebar, .topbar, .bottombar, .scrim, .palette, .toasts, .skip-link, .footer, .demo-states, .no-print, .auth-top, .auth-foot, .auth-aside { display: none !important; }
  .main-wrap { margin: 0 !important; }
  body { background: #fff; }
  .main { max-width: none; padding: 0; }
  .card, .stat, .alert { box-shadow: none !important; break-inside: avoid; }
}
