@font-face { font-family: "Mukta TNS"; font-style: normal; font-weight: 800; font-display: swap; src: url("Mukta-800.woff2") format("woff2"); }
/* v2.css - shared design kit for the v2 customer portals (Breakdowns + Call Handling).
   Tokens are CSS custom properties on :root. Light/dark are resolved with light-dark() driven by
   color-scheme: html[data-theme=light|dark|system]. Density: html[data-density=compact].
   Accent: html[data-accent=navy]. Nav style: html[data-nav=sidebar|rail|top], html[data-rail-open=true]. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f6f8fc, #0a1130);
  --card: light-dark(#ffffff, #101a3e);
  --line: light-dark(#e3e8f3, #22305f);
  --line2: light-dark(#eef2f9, #1a2550);
  --line-strong: light-dark(#cfd7e8, #2c3c7a);
  --soft: light-dark(#eef2f9, #1b2550);
  --input-bg: light-dark(#f6f8fc, #0a1130);
  --ink: light-dark(#0a1130, #eef2f9);
  --slate: light-dark(#48506a, #c3cce6);
  --muted: light-dark(#5c6580, #a3aed0);
  --faint: light-dark(#6b7490, #8f9bc4);
  --reg-bg: light-dark(#fff4b8, #f5d84a);
  --reg-bd: light-dark(#e6d77a, #f5d84a);
  --reg-ink: #0a1130;
  --brand: #16a6ea;
  --brand-ink: #0a1130;

  /* accent (cyan default) */
  --accent: #16a6ea;
  --accent-text: light-dark(#0b6fa4, #6cc8f5);
  --primary: light-dark(#0a73ab, #16a6ea);
  --primary-fg: light-dark(#ffffff, #0a1130);
  --active-bg: light-dark(#e8f4fc, rgba(22, 166, 234, .16));
  --active-fg: light-dark(#0b6fa4, #6cc8f5);
  --ring: light-dark(#0a73ab, #6cc8f5);
  --tile-bd: light-dark(#b9dcf2, rgba(22, 166, 234, .55));

  /* status pills */
  --pill-blue-bg: light-dark(#e8f4fc, rgba(22, 166, 234, .16));   --pill-blue-fg: light-dark(#0b6fa4, #6cc8f5);
  --pill-amber-bg: light-dark(#fff4dc, rgba(245, 181, 74, .16));  --pill-amber-fg: light-dark(#8a4b00, #f5c56e);
  --pill-green-bg: light-dark(#ecfdf3, rgba(61, 220, 151, .14));  --pill-green-fg: light-dark(#067647, #5fe3a8);
  --pill-red-bg: light-dark(#fef3f2, rgba(255, 122, 107, .14));   --pill-red-fg: light-dark(#b42318, #ff9a8e);
  --pill-purple-bg: light-dark(#f1ecff, rgba(195, 166, 255, .16)); --pill-purple-fg: light-dark(#5b3fb0, #c9b3ff);
  --pill-grey-bg: light-dark(#eef2f9, #1b2550);                   --pill-grey-fg: light-dark(#48506a, #c3cce6);
  --danger: #b42318;
  --ok: light-dark(#067647, #5fe3a8);

  /* grove */
  --grove-bg: light-dark(#f1faf5, rgba(61, 220, 151, .08));
  --grove-bd: light-dark(#cfeedd, rgba(61, 220, 151, .25));
  --grove-label: light-dark(#067647, #8fe9bf);
  --grove-value: light-dark(#05603a, #5fe3a8);

  --scrim: rgba(10, 17, 48, .55);
  --shadow-btn: 0 8px 24px -10px rgba(10, 17, 48, .4);
  --shadow-pop: 0 18px 50px -12px rgba(10, 17, 48, .35), 0 2px 8px rgba(10, 17, 48, .12);

  /* density: comfortable */
  --bar-h: 72px;
  --pad-x: 40px;
  --pad-y: 34px;
  --gap: 26px;
  --h1: 36px;
  --kpi-pad: 20px 22px;
  --kpi-size: 34px;
  --row-pad: 14px;
  --ctl-h: 44px;
  --nav-w: 256px;
  --radius: 14px;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="system"] { color-scheme: light dark; }

html[data-accent="navy"] {
  --accent: light-dark(#0a1130, #5b73d0);
  --accent-text: light-dark(#0a1130, #aab9f3);
  --primary: light-dark(#0a1130, #33479a);
  --primary-fg: #ffffff;
  --active-bg: light-dark(#e6eaf4, #222f66);
  --active-fg: light-dark(#0a1130, #b4c1f5);
  --ring: light-dark(#0a1130, #8ea2ec);
  --tile-bd: light-dark(#aab4cf, #4a5a96);
}
html[data-accent="navy"][data-theme="dark"] .v2-btn--primary:hover { background: #3f58b8; border-color: #3f58b8; filter: none; }
@media (prefers-color-scheme: dark) { html[data-accent="navy"][data-theme="system"] .v2-btn--primary:hover { background: #3f58b8; border-color: #3f58b8; filter: none; } }

html[data-density="compact"] {
  --bar-h: 56px;
  --pad-x: 24px;
  --pad-y: 22px;
  --gap: 18px;
  --h1: 28px;
  --kpi-pad: 14px 16px;
  --kpi-size: 26px;
  --row-pad: 9px;
  --ctl-h: 38px;
}
html[data-nav="rail"]:not([data-rail-open="true"]) { --nav-w: 72px; }

@media (max-width: 899.98px) {
  html, html[data-density] {
    --pad-x: 16px; --pad-y: 20px; --gap: 18px; --h1: 28px; --bar-h: 56px; --kpi-size: 28px;
  }
}

/* ---------- base ---------- */
html { background: var(--bg); }
body { margin: 0; background: var(--bg); }
.v2-app, .v2-modal, .v2-drawer, .v2-toasts {
  font: 400 15px/1.5 var(--font-body);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
.v2-app *, .v2-app *::before, .v2-app *::after, .v2-modal *, .v2-drawer * { box-sizing: border-box; }
.v2-app { display: flex; min-height: 100vh; background: var(--bg); }
:where(.v2-app, .v2-modal, .v2-drawer) a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
:where(.v2-app, .v2-modal, .v2-drawer) a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }  /* 15/11: programmatic focus targets (main#v2-content, headings) never show a ring - iOS drew one round the page after closing Create job */
.v2-app button { font-family: inherit; }
.v2-icon { flex: none; display: inline-block; vertical-align: middle; }
.v2-mono { font-family: var(--font-mono); font-size: .93em; }
.v2-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.v2-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--primary); color: var(--primary-fg) !important; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none !important; transition: top .15s; }
.v2-skip:focus { top: 12px; }
html.v2-lock { overflow: hidden; }

/* ---------- shell: nav ---------- */
.v2-nav {
  flex: 0 0 var(--nav-w); width: var(--nav-w);
  position: sticky; top: 0; height: 100vh; align-self: flex-start;
  background: var(--card); border-right: 1px solid var(--line);
  padding: 26px 16px 16px; display: flex; flex-direction: column; gap: 4px; z-index: 40;
}
html.v2-anim .v2-nav { transition: width 200ms ease, flex-basis 200ms ease, padding 200ms ease, margin-right 200ms ease, box-shadow 200ms ease; }
.v2-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 24px; text-decoration: none !important; color: var(--ink) !important; min-width: 0; }
.v2-brand-mark { flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; }
.v2-brand-text { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; overflow: hidden; }
.v2-brand-name { font: 700 20px/1.2 var(--font-head); letter-spacing: -.02em; }
.v2-brand-sub { font-size: 11px; color: var(--muted); }
.v2-nav-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.v2-nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 10px; background: transparent; color: var(--slate) !important; font-size: 15px; font-weight: 400;
  text-decoration: none !important; border: 0; width: 100%; text-align: left; cursor: pointer; white-space: nowrap;
}
.v2-nav-item:hover { background: var(--soft); }
.v2-nav-item[aria-current="page"] { background: var(--active-bg); color: var(--active-fg) !important; font-weight: 600; }
.v2-nav-item .v2-icon { width: 20px; height: 20px; }
.v2-nav-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.v2-nav-badge { flex: none; font-size: 11px; font-weight: 600; color: var(--muted); }
.v2-nav-spacer { flex: 1 1 auto; min-height: 16px; }
.v2-rail-toggle { display: none; color: var(--muted) !important; }
.v2-nav-foot { position: relative; border-top: 1px solid var(--line); padding: 14px 0 0; display: flex; align-items: center; gap: 10px; }
.v2-avatar { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--soft); color: var(--slate); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.v2-acct-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.v2-acct-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-acct-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.v2-topnav, .v2-topbar-brand { display: none; }
.v2-topbar .v2-menubtn, .v2-crumbs.v2-crumbs--page { display: none; }
.v2-crumbs--page { width: 100%; max-width: 1280px; margin: 0 auto; }

/* ---------- shell: main + topbar ---------- */
.v2-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.v2-topbar {
  position: sticky; top: 0; z-index: 30; min-height: var(--bar-h); background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 var(--pad-x);
}
.v2-crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.v2-crumbs a { color: var(--muted) !important; text-decoration: none !important; }
.v2-crumbs a:hover { color: var(--ink) !important; text-decoration: underline !important; }
.v2-crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.v2-topbar-spacer { flex: 1 1 auto; }
.v2-acct-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 280px; height: 36px; padding: 0 10px; font: 400 13px/1 var(--font-body);
  color: var(--slate); border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer;
}
.v2-acct-chip:hover { background: var(--soft); }
.v2-acct-chip strong { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-acct-chip .v2-icon { width: 14px; height: 14px; color: var(--muted); }
.v2-acct-wrap { position: relative; flex: none; min-width: 0; }
.v2-popmenu {
  position: absolute; z-index: 60; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 2px;
}
.v2-popmenu[hidden] { display: none; }
.v2-popmenu--up { top: auto; bottom: calc(100% + 8px); right: auto; left: 0; }
.v2-popmenu-head { padding: 8px 10px 6px; font-size: 12px; color: var(--muted); }
.v2-popmenu-head strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.v2-popmenu a, .v2-popmenu button {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent;
  color: var(--ink) !important; font: 400 14px var(--font-body); text-decoration: none !important; cursor: pointer; text-align: left; width: 100%;
}
.v2-popmenu a:hover, .v2-popmenu button:hover { background: var(--soft); }
.v2-popmenu .v2-icon { width: 18px; height: 18px; color: var(--muted); }
.v2-theme-btn .v2-ico-sun { display: none; }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .v2-theme-btn .v2-ico-sun { display: inline-block; }
  html[data-theme="system"] .v2-theme-btn .v2-ico-moon { display: none; }
}
html[data-theme="dark"] .v2-theme-btn .v2-ico-sun { display: inline-block; }
html[data-theme="dark"] .v2-theme-btn .v2-ico-moon { display: none; }
.v2-content { flex: 1 1 auto; min-width: 0; }

/* ---------- shell: desktop variants ---------- */
@media (min-width: 900px) {
  /* rail */
  html[data-nav="rail"] .v2-rail-toggle { display: flex; margin-top: 8px; }
  html[data-nav="rail"] .v2-nav { padding-left: 12px; padding-right: 12px; overflow-x: clip; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-brand-text { display: none; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) :is(.v2-nav-label, .v2-nav-badge, .v2-acct-text, .v2-powered-text, .v2-nav-caret) { opacity: 0; pointer-events: none; }
  html[data-nav="rail"] :is(.v2-nav-label, .v2-nav-badge, .v2-acct-text, .v2-powered-text, .v2-nav-caret) { transition: opacity 140ms ease; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-nav-foot .v2-iconbtn { opacity: 0; pointer-events: none; }
  html[data-nav="rail"] .v2-nav-foot .v2-iconbtn { transition: opacity 140ms ease; }
  html[data-nav="rail"] .v2-brand { height: 64px; box-sizing: border-box; }
  html[data-nav="rail"] .v2-nav-item .v2-icon { flex: none; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-brand { padding-left: 7px; padding-right: 7px; }
  html[data-nav="rail"] .v2-nav-item { padding: 0 14px; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-popmenu--up { left: 0; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-nav-item[data-tip]::after,
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-iconbtn[data-tip]::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 16px); top: 50%; transform: translateY(-50%) translateX(-4px);
    background: var(--ink); color: var(--bg); font: 500 13px/1 var(--font-body); padding: 8px 10px; border-radius: 8px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 120ms, transform 120ms; z-index: 80; box-shadow: var(--shadow-pop);
  }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-nav-item[data-tip]:is(:hover, :focus-visible)::after,
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-iconbtn[data-tip]:is(:hover, :focus-visible)::after { opacity: 1; transform: translateY(-50%); }
  html[data-nav="rail"] .v2-nav-item.v2-rail-toggle .v2-icon { transition: transform 200ms; }
  html[data-nav="rail"][data-rail-open="true"] .v2-nav-item.v2-rail-toggle .v2-icon { transform: rotate(180deg); }
  .v2-nav-foot .v2-iconbtn { position: relative; }

  /* rail hover slide-out: overlays content (layout keeps 72px), unpinned + hover-capable only */
  html[data-nav="rail"][data-rail-hover="true"]:not([data-rail-open="true"]) .v2-nav {
    flex: 0 0 256px; width: 256px; margin-right: -184px; box-shadow: 8px 0 32px rgba(10, 17, 48, .18); overflow: hidden;
  }
  html[data-nav="rail"][data-rail-hover="true"]:not([data-rail-open="true"]) .v2-popmenu--up { left: 0; }
  html[data-nav="rail"] .v2-pin { display: inline-flex; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-pin { display: none; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-powered-nav[data-tip]::after {
    content: attr(data-tip); position: absolute; left: calc(100% + 16px); top: 50%; transform: translateY(-50%) translateX(-4px);
    background: var(--ink); color: var(--bg); font: 500 13px/1 var(--font-body); padding: 8px 10px; border-radius: 8px; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity 120ms, transform 120ms; z-index: 80; box-shadow: var(--shadow-pop);
  }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-powered-nav[data-tip]:hover::after { opacity: 1; transform: translateY(-50%); }

  /* top */
  html[data-nav="top"] .v2-app { flex-direction: column; }
  html[data-nav="top"] .v2-nav { display: none; }
  html[data-nav="top"] .v2-topnav { display: flex; align-items: stretch; gap: 2px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; margin: 0; padding: 0; list-style: none; }
  html[data-nav="top"] .v2-topbar { gap: 16px; }
  html[data-nav="top"] .v2-topbar .v2-brand--top { display: flex; padding: 0 12px 0 0; }
  html[data-nav="top"] .v2-topbar .v2-crumbs.v2-crumbs--bar { display: none; }
  html[data-nav="top"] .v2-crumbs.v2-crumbs--page { display: flex; padding: 14px var(--pad-x) 0; }
  html[data-nav="top"] .v2-topbar-spacer { display: none; }
}
.v2-brand--top { display: none; }
.v2-brand--top .v2-brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.v2-brand--top .v2-brand-name { font-size: 17px; }
.v2-topnav-item {
  display: flex; align-items: center; min-height: var(--bar-h); padding: 0 12px; color: var(--slate) !important; font-size: 14px; font-weight: 400;
  text-decoration: none !important; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; gap: 8px;
}
.v2-topnav-item:hover { color: var(--ink) !important; background: var(--soft); }
.v2-topnav-item[aria-current="page"] { color: var(--active-fg) !important; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.v2-topnav-item .v2-icon { width: 16px; height: 16px; }
.v2-topnav-item .v2-nav-badge { margin-left: 2px; }

/* ---------- shell: mobile drawer ---------- */
@media (max-width: 899.98px) {
  .v2-nav {
    position: fixed; inset: 0 auto 0 0; z-index: 90; width: min(300px, 86vw); flex: none; height: 100dvh; overflow-y: auto;
    transform: translateX(-104%); visibility: hidden; box-shadow: var(--shadow-pop); padding: 20px 14px 14px;
  }
  html.v2-anim .v2-nav { transition: transform 220ms ease, visibility 0s linear 220ms; }
  .v2-app.is-drawer-open .v2-nav { transform: none; visibility: visible; transition-delay: 0s; }
  .v2-app { flex-direction: column; }
  .v2-topbar .v2-menubtn { display: inline-flex; }
  .v2-topbar-brand { display: flex; align-items: center; gap: 8px; text-decoration: none !important; color: var(--ink) !important; font: 700 17px var(--font-head); min-width: 0; }
  .v2-topbar-brand .v2-brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .v2-topbar-brand > .v2-wm-eb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-crumbs.v2-crumbs--bar { display: none; }
  .v2-topbar-spacer { display: block; }
  .v2-topbar { gap: 8px; }
  .v2-acct-chip { max-width: 150px; padding: 0 8px; }
  .v2-acct-chip .v2-acct-chip-label { display: none; }
  .v2-crumbs.v2-crumbs--page { display: flex; padding: 12px var(--pad-x) 0; }
  .v2-nav-scrim { display: block; }
}
.v2-nav-scrim { display: none; position: fixed; inset: 0; z-index: 85; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity 200ms; }
@media (max-width: 899.98px) { .v2-nav-scrim { display: block; cursor: pointer; } .v2-app.is-drawer-open .v2-nav-scrim { opacity: 1; pointer-events: auto; } }  /* 15/11: display:block here, the base rule above was re-hiding it on phones (tap beside menu did nothing) */
@media (max-width: 899.98px) { .v2-settings .v2-set-group:has(.v2-navcards) { display: none; } }  /* 15/11 Adam: menu style means nothing on a phone (always the slide-out menu) */
@media (min-width: 900px) { .v2-nav-scrim { display: none !important; } }

/* ---------- layout ---------- */
.v2-page { display: flex; flex-direction: column; gap: var(--gap); width: 100%; max-width: 1280px; margin: 0 auto; padding: var(--pad-y) var(--pad-x) 48px; }
.v2-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 16px; }
.v2-pagehead .eyebrow, .v2-eyebrow { flex: 0 0 100%; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.v2-h1 { margin: 0; font: 600 var(--h1)/1.15 var(--font-head); letter-spacing: -.02em; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.v2-pagehead .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.v2-pagehead > div > .eyebrow { display: block; margin-bottom: 6px; }
.v2-grid-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .v2-grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .v2-grid-kpi { grid-template-columns: minmax(0, 1fr); } }
/* KPI rows reflow to the cards actually shown (e.g. no Fleet Grove / no Ongoing card): 2 or 3 visible cards fill the row, no empty slot. 15/11 */
.v2-kpi[hidden] { display: none; }
@media (min-width: 521px) {
  .v2-grid-kpi:has(> :nth-child(3 of :not([hidden]))):not(:has(> :nth-child(4 of :not([hidden])))) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-grid-kpi:has(> :nth-child(2 of :not([hidden]))):not(:has(> :nth-child(3 of :not([hidden])))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-grid-kpi:not(:has(> :nth-child(2 of :not([hidden])))) { grid-template-columns: minmax(0, 1fr); }
}
.v2-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- card + kpi ---------- */
.v2-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.v2-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.v2-card-head h2 { margin: 0; font-size: 16px; font-weight: 600; flex: 1 1 auto; }
.v2-card-body { padding: 18px 20px; }
.v2-card-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.v2-kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--kpi-pad); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.v2-kpi .label, .v2-tiles .label { font-size: 13px; color: var(--muted); }
.v2-kpi .value { font: 600 var(--kpi-size)/1.1 var(--font-head); letter-spacing: -.02em; color: var(--ink); }
.v2-kpi .sub { font-size: 12px; color: var(--muted); }
.v2-kpi--grove { background: var(--grove-bg); border-color: var(--grove-bd); }
.v2-kpi--grove .label, .v2-kpi--grove .sub { color: var(--grove-label); }
.v2-kpi--grove .value { color: var(--grove-value); }
.v2-dl { margin: 0; display: grid; grid-template-columns: minmax(96px, 130px) minmax(0, 1fr); }
.v2-dl dt, .v2-dl dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line2); font-size: 14px; overflow-wrap: anywhere; }
.v2-dl dt { font-size: 13px; color: var(--muted); }
.v2-dl dt:last-of-type, .v2-dl dd:last-of-type { border-bottom: 0; }

/* ---------- buttons ---------- */
.v2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--ctl-h); padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink) !important; font: 500 14px/1 var(--font-body);
  cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background 120ms, border-color 120ms;
}
.v2-btn:hover { background: var(--soft); }
.v2-btn .v2-icon { width: 16px; height: 16px; }
.v2-btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-fg) !important; font-weight: 600; box-shadow: var(--shadow-btn); }
.v2-btn--primary:hover { background: var(--primary); filter: brightness(1.1); }
html[data-theme="dark"] .v2-btn--primary:hover { filter: brightness(.92); }
.v2-btn--ghost { background: transparent; border-color: var(--line); }
.v2-btn--danger { background: var(--danger); border-color: var(--danger); color: #fff !important; font-weight: 600; }
.v2-btn--danger:hover { background: #912018; }
.v2-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.v2-btn[disabled], .v2-btn[aria-disabled="true"], .v2-iconbtn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.v2-iconbtn {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0;
  border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--slate); cursor: pointer;
}
.v2-iconbtn:hover { background: var(--soft); color: var(--ink); }
.v2-iconbtn .v2-icon { width: 18px; height: 18px; }
.v2-linkbtn { border: 0; background: transparent; color: var(--accent-text); font: 500 14px var(--font-body); cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- inputs ---------- */
.v2-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-field > label, .v2-field > .v2-label { font-size: 13px; font-weight: 500; color: var(--slate); }
.v2-field .hint { font-size: 12px; color: var(--muted); }
.v2-input {
  width: 100%; height: var(--ctl-h); padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--input-bg);
  color: var(--ink); font: 400 14px var(--font-body); min-width: 0;
}
textarea.v2-input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.v2-input::placeholder { color: var(--muted); opacity: 1; }
.v2-input:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; border-color: transparent; }
.v2-search {
  display: flex; align-items: center; gap: 8px; height: 40px; flex: 1 1 240px; max-width: 320px; min-width: 0; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--input-bg); color: var(--muted);
}
.v2-search:focus-within { outline: 2px solid var(--ring); outline-offset: 1px; }
.v2-search .v2-icon { width: 16px; height: 16px; }
.v2-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none; font: 400 14px var(--font-body); color: var(--ink); }
.v2-search input::placeholder { color: var(--muted); opacity: 1; }
.v2-seg { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; background: var(--soft); border-radius: 9px; max-width: 100%; }
.v2-seg button { border: 0; border-radius: 7px; height: 32px; padding: 0 12px; font: 500 13px var(--font-body); background: transparent; color: var(--slate); cursor: pointer; white-space: nowrap; }
.v2-seg button:hover { color: var(--ink); }
.v2-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(10, 17, 48, .14), 0 0 0 1px var(--line); }
.v2-switch {
  position: relative; flex: none; width: 38px; height: 22px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--line-strong); transition: background 150ms;
}
.v2-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(10, 17, 48, .3); transition: transform 150ms; }
.v2-switch[aria-checked="true"] { background: var(--accent); }
html[data-accent="navy"] .v2-switch[aria-checked="true"]::after { background: var(--primary-fg); }
.v2-switch[aria-checked="true"]::after { transform: translateX(16px); }
.v2-switch[disabled] { opacity: .5; cursor: not-allowed; }
.v2-switchwrap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); }

/* ---------- table ---------- */
.v2-table-wrap { overflow-x: auto; max-width: 100%; }
.v2-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.v2-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px; white-space: nowrap; }
.v2-table td { padding: var(--row-pad) 12px; border-top: 1px solid var(--line2); vertical-align: middle; }
.v2-table :is(th, td):first-child { padding-left: 20px; }
.v2-table :is(th, td):last-child { padding-right: 20px; }
.v2-table tr.is-clickable { cursor: pointer; }
.v2-table tr.is-clickable:hover td { background: var(--soft); }
.v2-table tr.is-clickable:focus-visible { outline-offset: -2px; }

/* ---------- pills + reg ---------- */
.v2-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.2; border-radius: 999px; padding: 4px 10px; white-space: nowrap; background: var(--pill-grey-bg); color: var(--pill-grey-fg); }
.v2-pill--blue { background: var(--pill-blue-bg); color: var(--pill-blue-fg); }
.v2-pill--amber { background: var(--pill-amber-bg); color: var(--pill-amber-fg); }
.v2-pill--green { background: var(--pill-green-bg); color: var(--pill-green-fg); }
.v2-pill--red { background: var(--pill-red-bg); color: var(--pill-red-fg); }
.v2-pill--purple { background: var(--pill-purple-bg); color: var(--pill-purple-fg); }
.v2-pill--grey { background: var(--pill-grey-bg); color: var(--pill-grey-fg); }
.v2-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; display: inline-block; }
.v2-reg { display: inline-block; font: 500 13px/1.4 var(--font-mono); background: var(--reg-bg); color: var(--reg-ink); border: 1px solid var(--reg-bd); border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.v2-reg--lg { font-size: 20px; padding: 4px 12px; border-radius: 6px; }

/* ---------- timeline + tiles ---------- */
.v2-timeline { list-style: none; margin: 0; padding: 0; }
.v2-timeline > li { position: relative; padding: 0 0 20px 30px; min-height: 28px; }
.v2-timeline > li:last-child { padding-bottom: 0; }
.v2-timeline > li::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: -2px; width: 2px; background: var(--line); }
.v2-timeline > li:last-child::before { display: none; }
.v2-timeline .dot { position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--card); }
.v2-timeline .dot.is-done, .v2-timeline > li.is-done > .dot { background: var(--ok); border-color: var(--ok); }
.v2-timeline .dot.is-done::after, .v2-timeline > li.is-done > .dot::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 9px; border: solid var(--card); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.v2-timeline .dot.is-now, .v2-timeline > li.is-now > .dot { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--active-bg); }
.v2-timeline .dot.is-now::after, .v2-timeline > li.is-now > .dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.v2-timeline .v2-tl-title { font-size: 14px; font-weight: 500; }
.v2-timeline .v2-tl-meta { font-size: 13px; color: var(--muted); }
.v2-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .v2-tiles { grid-template-columns: minmax(0, 1fr); } }
.v2-tiles > *, .v2-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-tiles .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.v2-tiles .value { font: 600 30px/1.1 var(--font-head); }
.v2-tiles .sub { font-size: 13px; color: var(--muted); }
.v2-tiles > .is-current, .v2-tile.is-current { border-color: var(--tile-bd); box-shadow: 0 0 0 4px var(--active-bg); }
.v2-tiles > .is-current .label, .v2-tile.is-current .label { color: var(--active-fg); }
.v2-tiles > .is-empty, .v2-tile.is-empty { border-style: dashed; border-color: var(--line-strong); }
.v2-tiles > .is-empty .value, .v2-tile.is-empty .value { color: var(--faint); }

/* ---------- modal / drawer / scrim ---------- */
.v2-scrim { position: fixed; inset: 0; z-index: 140; background: var(--scrim); opacity: 0; transition: opacity 180ms; }
.v2-scrim.is-open { opacity: 1; }
.v2-modal {
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; flex-direction: column; overflow: hidden;
}
dialog.v2-modal { margin: auto; }
dialog.v2-modal[open] { display: flex; animation: v2-pop 180ms ease-out; }
dialog.v2-modal::backdrop { background: var(--scrim); }
div.v2-modal { display: none; position: fixed; z-index: 150; left: 50%; top: 50%; transform: translate(-50%, -50%); }
div.v2-modal.is-open { display: flex; animation: v2-pop 180ms ease-out; }
.v2-modal--wide { width: min(760px, calc(100vw - 32px)); }
.v2-modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: none; }
.v2-modal-head h2 { margin: 0; font: 600 18px var(--font-head); flex: 1 1 auto; }
.v2-modal-body { padding: 18px 20px; overflow-y: auto; flex: 1 1 auto; }
.v2-modal-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex: none; }
.v2-drawer {
  position: fixed; z-index: 150; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--card); color: var(--ink);
  border-left: 1px solid var(--line); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; transform: translateX(105%); visibility: hidden;
  transition: transform 220ms ease, visibility 0s linear 220ms;
}
.v2-drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
@keyframes v2-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
div.v2-modal.is-open { animation-name: v2-pop-c; }
@keyframes v2-pop-c { from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); } }

/* settings modal */
.v2-set-group { display: flex; flex-direction: column; gap: 10px; }
.v2-set-group + .v2-set-group { margin-top: 22px; }
.v2-set-label { font-size: 13px; font-weight: 600; color: var(--slate); }
.v2-navcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.v2-navcard { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font: 500 13px var(--font-body); text-align: center; }
.v2-navcard:hover { border-color: var(--line-strong); }
.v2-navcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--active-bg); }
.v2-navprev { position: relative; display: block; height: 64px; border-radius: 7px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.v2-navprev i { position: absolute; display: block; border-radius: 3px; background: var(--line-strong); }
.v2-navprev .bar { background: var(--card); border: 0; border-radius: 0; }
.v2-navprev .on { background: var(--accent); }
.v2-navprev .blk { background: var(--card); border: 1px solid var(--line); }
.v2-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.v2-swatch { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font: 500 14px var(--font-body); }
.v2-swatch:hover { border-color: var(--line-strong); }
.v2-swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--active-bg); }
.v2-swatch-dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(10, 17, 48, .25); }
.v2-swatch-dot--cyan { background: #16a6ea; }
.v2-swatch-dot--navy { background: #0a1130; box-shadow: inset 0 0 0 1px rgba(238, 242, 249, .5); }

/* ---------- banner / empty / skeleton / toast ---------- */
.v2-banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
.v2-banner .v2-icon { width: 20px; height: 20px; margin-top: 1px; }
.v2-banner--info { background: var(--pill-blue-bg); color: var(--pill-blue-fg); border-color: light-dark(#b9dcf2, rgba(22, 166, 234, .35)); }
.v2-banner--urgent { background: var(--pill-red-bg); color: var(--pill-red-fg); border-color: light-dark(#fecdca, rgba(255, 122, 107, .4)); animation: v2-ring 2s ease-out infinite; }
@keyframes v2-ring { 0% { box-shadow: 0 0 0 0 rgba(217, 45, 32, .35); } 70%, 100% { box-shadow: 0 0 0 10px rgba(217, 45, 32, 0); } }
.v2-empty { padding: 36px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 14px; font-size: 14px; }
.v2-empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.v2-skeleton { display: block; min-height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--soft) 25%, var(--line) 50%, var(--soft) 75%); background-size: 200% 100%; animation: v2-shimmer 1.4s linear infinite; }
@keyframes v2-shimmer { to { background-position: -200% 0; } }
.v2-toasts { position: fixed; z-index: 300; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.v2-toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-pop); font-size: 14px; animation: v2-toast-in 200ms ease-out; }
.v2-toast .v2-icon { width: 18px; height: 18px; margin-top: 2px; }
.v2-toast-msg { flex: 1 1 auto; overflow-wrap: anywhere; }
.v2-toast button { border: 0; background: transparent; color: inherit; opacity: .75; cursor: pointer; padding: 2px; display: flex; }
.v2-toast button:hover { opacity: 1; }
.v2-toast--success .v2-icon:first-child { color: light-dark(#5fe3a8, #067647); }
.v2-toast--error .v2-icon:first-child { color: light-dark(#ff9a8e, #b42318); }
.v2-toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 160ms, transform 160ms; }
@keyframes v2-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 899.98px) { .v2-toasts { right: 16px; left: 16px; width: auto; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print { .v2-nav, .v2-topbar, .v2-toasts, .v2-nav-scrim { display: none !important; } .v2-app { display: block; } }
.v2-acct-chip .v2-icon { transform: rotate(90deg); }
.v2-set-group .v2-seg { align-self: flex-start; }
@media (max-width: 520px) { .v2-topbar-brand > .v2-wm-eb { display: none; } .v2-acct-chip { max-width: 190px; } .v2-topbar-spacer { display: none; } .v2-acct-wrap { margin-left: auto; } }

@media (prefers-reduced-motion: reduce) { html.v2-anim .v2-nav { transition: none !important; } }

/* pin button (rail only; top-right of the expanded rail, level with the brand) */
.v2-pin { display: none; position: absolute; top: 30px; right: 14px; width: 30px; height: 30px; color: var(--muted); z-index: 2; }
.v2-pin .v2-icon { width: 16px; height: 16px; transition: transform 160ms; }
.v2-pin[aria-pressed="true"] { color: var(--accent-text, var(--primary)); background: var(--accent-soft, var(--soft)); }
.v2-pin[aria-pressed="true"] .v2-icon { fill: currentColor; }
.v2-pin:not([aria-pressed="true"]) .v2-icon { transform: rotate(35deg); }
html[data-nav="rail"][data-rail-hover="true"] .v2-brand { padding-right: 44px; }
html[data-nav="rail"][data-rail-open="true"] .v2-brand { padding-right: 44px; }
.v2-set-pin { margin-top: 12px; }
.v2-set-pin[hidden] { display: none; }

/* Merlin 'powered by' mark + footer */
.v2-powered-nav { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; color: var(--muted); font-size: 11px; line-height: 1.2; white-space: nowrap; }
.v2-powered-nav .v2-icon { width: 14px; height: 14px; color: var(--accent-text, var(--primary)); }
.v2-footer { border-top: 1px solid var(--line); padding: 14px var(--pad-x); margin-top: 24px; }
.v2-footer-in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; font: 400 12px/1.4 var(--font-body); color: var(--muted); }
.v2-footer-in strong { font: 600 12px/1.4 var(--font-head); color: var(--accent-text, var(--primary)); }
.v2-footer-in .v2-icon { width: 14px; height: 14px; color: var(--accent-text, var(--primary)); }
html[data-nav="top"] .v2-powered-nav { display: none; }

/* Merlin About dialog + clickable marks */
button.v2-powered-nav { width: 100%; border: 0; background: transparent; font-family: var(--font-body); cursor: pointer; text-align: left; border-radius: 8px; }
button.v2-powered-nav:hover { color: var(--ink); background: var(--soft); }
.v2-footer-about { border: 0; background: transparent; padding: 0; cursor: pointer; font: 600 12px/1.4 var(--font-head); color: var(--accent-text, var(--primary)); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.v2-footer-about:hover { text-decoration-color: currentColor; }
.v2-about { width: min(640px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
.v2-about .v2-about-band { display: flex; align-items: center; gap: 14px; padding: 22px 22px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--portal) 24%, var(--card)) 0%, color-mix(in srgb, var(--portal) 7%, var(--card)) 75%); }
.v2-about-mark { flex: none; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--card); color: var(--portal); box-shadow: 0 1px 3px rgba(10,17,48,.14), inset 0 0 0 1px color-mix(in srgb, var(--portal) 28%, transparent); }
.v2-about-titles { flex: 1 1 auto; min-width: 0; }
.v2-about-band h2 { margin: 0; font: 600 22px/1.2 var(--font-head); letter-spacing: -.01em; color: var(--ink); }
.v2-about-sub { margin: 4px 0 0; color: var(--slate); font-size: 14px; line-height: 1.45; }
.v2-about-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-about-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.v2-about-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.v2-about-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--portal) 12%, var(--soft)); color: var(--portal); }
.v2-about-ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-about-ct strong { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.v2-about-ct span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.v2-about-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); }
.v2-about-foot { justify-content: flex-end; flex-wrap: nowrap; align-items: center; }
.v2-about-foot .v2-btn { display: inline-flex; align-items: center; gap: 8px; }
.v2-about-ver { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
@media (max-width: 639.98px) {
  dialog.v2-about { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .v2-about .v2-modal-body { overflow-y: auto; flex: 1 1 auto; }
  .v2-about-grid { grid-template-columns: 1fr; }
  .v2-about-foot { flex-direction: column-reverse; align-items: stretch; }
  .v2-about-foot .v2-btn { justify-content: center; }
}

/* TNS 365 wordmark (logo D): portal-name eyebrow above "TNS 365", Mukta ExtraBold, brand tracking -0.0215em.
   Light/dark swap is pure CSS: "TNS" #000 -> #fff, "365" stays brand blue #009cff. */
:root { --wm-t: light-dark(#000, #fff); --wm-n: #009cff; }
.v2-wm { display: inline-flex; text-decoration: none; }
.v2-wm .t, .v2-wm-word .t { color: var(--wm-t); }
.v2-wm .n, .v2-wm-word .n { color: var(--wm-n); }
.v2-wm-word, .v2-wm-stack { font-family: "Mukta TNS", Mukta, "Inter", sans-serif; font-weight: 800; letter-spacing: -.0215em; white-space: nowrap; }
.v2-wm-eb { font: 600 10px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.v2-wm--full { flex-direction: column; align-items: flex-start; gap: 5px; }
.v2-wm--full .v2-wm-word { font-size: 28px; line-height: .9; }
.v2-wm--compact { display: none; }
/* stacked mark: 365 sized/tracked so its ink width equals TNS (measured: TNS 1.6536em, 365 1.5051em at -0.0215em / 0) */
.v2-wm-stack { display: inline-flex; flex-direction: column; font-size: 22px; line-height: .84; }
.v2-wm-stack .n { font-size: 1.06em; letter-spacing: .0275em; margin-left: -.0313em; }
.v2-brand .v2-wm--compact { align-items: center; }
html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-brand { padding-left: 0; padding-right: 0; justify-content: center; }
html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-wm--full { display: none; }
html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-wm--compact { display: inline-flex; }
/* top bar + mobile topbar: one line, eyebrow after the word */
.v2-brand--top, .v2-topbar-brand { gap: 12px; align-items: center; }
.v2-brand--top .v2-wm-word { font-size: 26px; line-height: .9; }
.v2-topbar-brand { text-decoration: none !important; }
.v2-topbar-brand .v2-wm-word { font-size: 24px; line-height: .9; }

/* Account card with the Merlin row joined underneath (logo/about option A) */
.v2-acctcard { margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.v2-acctcard .v2-nav-foot { border-top: 0; padding: 8px 8px 8px 10px; gap: 8px; }
.v2-acctcard .v2-avatar { width: 34px; height: 34px; }
.v2-acctcard .v2-nav-foot .v2-iconbtn { width: 34px; height: 34px; flex: none; }
.v2-acctcard .v2-acct-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; overflow-wrap: anywhere; }
.v2-acctcard .v2-powered-nav { margin: 0; width: 100%; padding: 9px 12px; gap: 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 13px 13px;
  background: var(--soft); color: var(--muted); font: 500 12px/1.2 var(--font-body); }
.v2-acctcard .v2-powered-go { margin-left: auto; display: inline-flex; opacity: 0; transition: opacity 120ms; color: var(--muted); }
.v2-acctcard button.v2-powered-nav:hover, .v2-acctcard button.v2-powered-nav:focus-visible { color: var(--ink); background: var(--soft); }
.v2-acctcard button.v2-powered-nav:hover .v2-powered-go, .v2-acctcard button.v2-powered-nav:focus-visible .v2-powered-go { opacity: 1; }
.v2-acctcard button.v2-powered-nav:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
html[data-nav="rail"] .v2-acctcard .v2-nav-foot { padding: 8px 8px 8px 6px; gap: 8px; flex-wrap: nowrap; }
html[data-nav="rail"] .v2-acctcard .v2-powered-nav { justify-content: flex-start; padding: 9px 16px; white-space: nowrap; }
html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-powered-go { display: none; }

/* "Powered by <strong>Merlin X</strong>" row: muted regular lead-in, product name 600 in accent-text */
.v2-powered-text { overflow: hidden; text-overflow: ellipsis; font-weight: 400; color: var(--muted); }
.v2-powered-text strong { font-weight: 600; color: var(--accent-text, var(--primary)); }
.v2-acctcard .v2-powered-nav { font-size: 12px; }

/* ---------- portal switcher (Breakdown Assist | Call Handling) + per-portal colour cue ---------- */
:root { --portal: var(--accent-text, var(--primary)); --portal-soft: var(--active-bg); }
html[data-portal="ch"] { --portal: var(--pill-purple-fg); --portal-soft: var(--pill-purple-bg); }
.v2-pagehead .eyebrow, .v2-eyebrow { color: var(--portal); }
.v2-topbar-brand > .v2-wm-eb, .v2-brand--top .v2-wm-eb { color: var(--portal); }
.v2-psw { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--soft); border-radius: 10px; flex: 0 0 auto; }
.v2-psw-item {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent;
  font: 500 13px/1 var(--font-body); color: var(--slate) !important; text-decoration: none !important; white-space: nowrap; cursor: pointer;
}
.v2-psw-item .v2-icon { width: 16px; height: 16px; flex: 0 0 auto; }
a.v2-psw-item:hover { color: var(--ink) !important; background: var(--card); }
a.v2-psw-item:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.v2-psw-item.is-current { background: #0877c4; color: #fff !important; cursor: default; border-color: transparent; box-shadow: inset 0 0 0 1px #009cff, 0 1px 2px rgba(10, 17, 48, .18); }
.v2-psw-item.is-current .v2-icon { color: #fff; }
/* current-portal pill: TNS 365 logo blue (#009cff) as the ring, fill #0877c4 so white text stays AA (white on #009cff is only 2.9:1) */
.v2-psw-group { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.v2-psw-group--drawer { display: none; }
.v2-psw-help { position: relative; display: inline-flex; }
.v2-psw-helpbtn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.v2-psw-helpbtn .v2-icon { width: 16px; height: 16px; }
.v2-psw-helpbtn:hover, .v2-psw-helpbtn[aria-expanded="true"] { color: var(--portal); border-color: color-mix(in srgb, var(--portal) 55%, transparent); }
.v2-psw-helpbtn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.v2-psw-pop { right: auto; left: 50%; transform: translateX(-50%); width: min(320px, calc(100vw - 32px)); padding: 14px 16px 12px; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--slate); }
.v2-psw-pop[hidden] { display: none; }
.v2-psw-pop p { margin: 0; }
.v2-psw-pop b { color: var(--ink); font-weight: 600; }
.v2-psw-pop-title { font: 600 14px/1.3 var(--font-head); color: var(--ink); }
.v2-psw-pop .v2-linkbtn { align-self: flex-end; }
/* topbar: left | centre | right (centre = portal switcher, truly centred) */
.v2-tb-left, .v2-tb-center, .v2-tb-right { display: contents; }
@media (max-width: 899.98px) {
  .v2-tb-center .v2-psw-group { display: none; }
  .v2-psw-group--drawer { display: flex; width: 100%; box-sizing: border-box; margin: 0 0 14px; gap: 6px; }
  .v2-psw-group--drawer .v2-psw { flex: 1 1 0; min-width: 0; }
  .v2-psw-group--drawer .v2-psw-item { flex: 1 1 auto; min-width: 0; justify-content: center; gap: 4px; padding: 0 4px; font-size: 11.5px; }
  .v2-psw-group--drawer .v2-psw-item .v2-icon { width: 14px; height: 14px; }
  .v2-psw-group--drawer .v2-psw-label { overflow: hidden; text-overflow: ellipsis; }
  .v2-psw-group--drawer .v2-psw-pop { position: static; transform: none; width: auto; box-shadow: none; margin-top: 8px; }
  .v2-psw-group--drawer .v2-psw-help { display: contents; }
  .v2-psw-group--drawer { flex-wrap: wrap; }
  .v2-psw-group--drawer .v2-psw-pop { flex: 0 0 100%; order: 3; }
}
@media (min-width: 900px) {
  .v2-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(max-content, 1fr); column-gap: 16px; }
  .v2-tb-left { grid-column: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
  .v2-tb-center { grid-column: 2; display: flex; justify-content: center; align-items: center; }
  .v2-tb-center:empty { display: none; }
  .v2-tb-right { grid-column: 3; display: flex; align-items: center; gap: 12px; justify-self: end; margin-left: auto; min-width: 0; }
  html[data-nav="top"] .v2-topbar { display: flex; flex-wrap: wrap; row-gap: 0; column-gap: 16px; }
  html[data-nav="top"] .v2-tb-center { order: -1; flex: 0 0 100%; padding: 8px 0 2px; }
  html[data-nav="top"] .v2-tb-left { flex: 1 1 auto; min-height: var(--bar-h); }
  html[data-nav="top"] .v2-tb-right { margin-left: auto; min-height: var(--bar-h); }
}
/* narrower main column (sidebar/rail leave less room): icon-only segments keep the centre clear of both sides */
@media (min-width: 900px) and (max-width: 1239.98px) { html:not([data-nav="top"]):not([data-nav="rail"]) .v2-psw-label { display: none; } html:not([data-nav="top"]):not([data-nav="rail"]) .v2-psw-item { padding: 0 11px; } }
@media (min-width: 900px) and (max-width: 1059.98px) { html[data-nav="rail"] .v2-psw-label { display: none; } html[data-nav="rail"] .v2-psw-item { padding: 0 11px; } }
@media (min-width: 900px) and (max-width: 1099.98px) { .v2-tb-right .v2-acct-chip-label { display: none; } .v2-tb-right .v2-acct-chip { max-width: 160px; } }

/* ---------- nav children: indented in sidebar/open rail, dropdown in top nav, tab strip in slim rail + small screens ---------- */
.v2-nav-sub { list-style: none; margin: 2px 0 4px; padding: 0 0 0 36px; display: none; flex-direction: column; gap: 2px; }
.v2-nav-sub.is-open { display: flex; }
.v2-nav-subitem { display: block; padding: 6px 10px; border-radius: 8px; font: 500 13px/1.3 var(--font-body); color: var(--slate) !important; text-decoration: none !important; }
.v2-nav-subitem:hover { background: var(--soft); color: var(--ink) !important; }
.v2-nav-subitem[aria-current="page"] { color: var(--active-fg) !important; font-weight: 600; background: var(--active-bg); }
.v2-nav-subitem:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-nav-sub { display: none !important; }
.v2-topnav-group { position: relative; display: inline-flex; }
.v2-topnav-group > .v2-topnav-item .v2-icon:last-child { width: 12px; height: 12px; margin-left: 2px; opacity: .7; }
.v2-topnav-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 40; min-width: 190px; padding: 6px; flex-direction: column; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
}
.v2-topnav-group:hover > .v2-topnav-menu, .v2-topnav-group:focus-within > .v2-topnav-menu { display: flex; }
.v2-topnav-menu a { display: block; padding: 8px 10px; border-radius: 8px; font: 500 13px/1.2 var(--font-body); color: var(--slate) !important; text-decoration: none !important; white-space: nowrap; }
.v2-topnav-menu a:hover { background: var(--soft); color: var(--ink) !important; }
.v2-topnav-menu a[aria-current="page"] { color: var(--active-fg) !important; font-weight: 600; background: var(--active-bg); }
.v2-subtabs { display: none; width: 100%; max-width: 1280px; margin: 0 auto; padding: 12px var(--pad-x) 0; box-sizing: border-box; gap: 4px; }
.v2-subtab { padding: 7px 14px; border-radius: 999px; font: 500 13px/1 var(--font-body); color: var(--slate) !important; text-decoration: none !important; background: var(--soft); border: 1px solid transparent; }
.v2-subtab:hover { color: var(--ink) !important; }
.v2-subtab[aria-current="page"] { background: var(--active-bg); color: var(--active-fg) !important; border-color: var(--tile-bd); font-weight: 600; }
.v2-subtab:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
html[data-nav="rail"]:not([data-rail-open="true"]) .v2-subtabs { display: flex; }
@media (max-width: 899.98px) { .v2-subtabs { display: flex; } }

.v2-popmenu-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; width: auto; }

/* ---------- scrollbars: thin, floating, theme + accent aware ---------- */
:root {
  --thumb: light-dark(rgba(10, 17, 48, .18), rgba(255, 255, 255, .20));
  --thumb-hover: color-mix(in srgb, var(--portal, var(--accent-text, #0b6fa4)) 55%, transparent);
}
html { scrollbar-gutter: stable; }
/* standard props only for Firefox: in Chrome they override the ::-webkit-scrollbar styling and bring back native arrows */
@supports (-moz-appearance: none) { * { scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; } }
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--thumb); background-clip: content-box; border: 2px solid transparent; border-radius: 999px; min-height: 36px; min-width: 36px; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--thumb-hover); background-clip: content-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
/* inside cards, strips, tables, modals, drawers, popovers: 6px */
:is(.v2-card, .v2-table-wrap, .v2-tiles, .v2-modal, .v2-drawer, .v2-popmenu, .v2-timeline, [class*="strip"], [class*="activity"], [class*="ongoing"], .v2-nav)::-webkit-scrollbar,
:is(.v2-card, .v2-table-wrap, .v2-tiles, .v2-modal, .v2-drawer, .v2-popmenu, .v2-timeline, [class*="strip"], [class*="activity"], [class*="ongoing"], .v2-nav) *::-webkit-scrollbar { width: 6px; height: 6px; }
:is(.v2-card, .v2-table-wrap, .v2-tiles, .v2-modal, .v2-drawer, .v2-popmenu, .v2-timeline, [class*="strip"], [class*="activity"], [class*="ongoing"], .v2-nav)::-webkit-scrollbar-thumb,
:is(.v2-card, .v2-table-wrap, .v2-tiles, .v2-modal, .v2-drawer, .v2-popmenu, .v2-timeline, [class*="strip"], [class*="activity"], [class*="ongoing"], .v2-nav) *::-webkit-scrollbar-thumb { border-width: 1px; }

/* ---------- Call TNS + Feedback (sidebar/rail/drawer block, top-nav icon, account-menu entry) ---------- */
.v2-nav-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.v2-nav-act[hidden] { display: none; }
.v2-nav-act { border: 1px solid transparent; border-radius: 12px; font-weight: 500; }
.v2-nav-act--call { background: var(--pill-green-bg); color: var(--pill-green-fg) !important; border-color: color-mix(in srgb, var(--pill-green-fg) 28%, transparent); font-weight: 600; }
.v2-nav-act--call:hover { background: var(--pill-green-bg); filter: brightness(.97); }
html[data-theme="dark"] .v2-nav-act--call:hover { filter: brightness(1.15); }
.v2-nav-act--call .v2-icon, .v2-nav-act--fb .v2-icon { flex: none; }
.v2-nav-act--fb { color: var(--muted) !important; }
.v2-nav-act--fb:hover { color: var(--ink) !important; }
.v2-nav-act--call:focus-visible, .v2-nav-act--fb:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (min-width: 900px) {
  html[data-nav="rail"] .v2-nav-act { justify-content: flex-start; padding: 0 14px; }
}
.v2-call-top { display: none; color: var(--pill-green-fg) !important; background: var(--pill-green-bg); border-color: color-mix(in srgb, var(--pill-green-fg) 28%, transparent); }
html[data-nav="top"] .v2-call-top { display: inline-flex; }
@media (max-width: 899.98px) and (min-width: 521px) { .v2-call-top { display: inline-flex; } }
.v2-pm-fb { display: none !important; }
html[data-nav="top"] .v2-pm-fb:not([hidden]) { display: flex !important; }
/* the shared feedback widget mounts its own topbar button; the entry points above replace it */
.v2-topbar .fb2-btn { display: none !important; }
/* Call TNS label must fit the 256px sidebar */
.v2-nav-act--call { gap: 8px; padding: 0 10px; }
.v2-nav-act--call .v2-nav-label { font-size: 13.5px; letter-spacing: -.005em; text-overflow: clip; }
/* long account names: chip shrinks with an ellipsis instead of overlapping the brand */
.v2-acct-wrap { min-width: 0; }
.v2-acct-chip { max-width: 100%; }
.v2-acct-chip strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 899.98px) { .v2-tb-left { flex: 0 0 auto; } .v2-tb-right { min-width: 0; flex: 0 1 auto; } .v2-acct-chip { max-width: 100%; } }
@media (max-width: 899.98px) { .v2-topbar-brand, .v2-menubtn { flex: none; } .v2-acct-wrap { flex: 0 1 auto; } .v2-acct-chip { max-width: 100%; } .v2-acct-wrap .v2-acct-chip { width: 100%; } }

/* one-shot spin for refresh icons: add .v2-spin to the button or the svg, remove on animationend */
@keyframes v2-spin-once { to { transform: rotate(360deg); } }
.v2-spin, .v2-spin > .v2-icon { animation: v2-spin-once 600ms ease-in-out 1; }
@media (prefers-reduced-motion: reduce) { .v2-spin, .v2-spin > .v2-icon { animation: none; } }

/* ---------- global tooltip (#v2-tip, created by shell.js; replaces native title + the old rail ::after tips) ---------- */
:root { --tip-bg: light-dark(#0a1130, #eef2f9); --tip-fg: light-dark(#eef2f9, #0a1130); }
html[data-nav="rail"] .v2-nav-item[data-tip]::after, html[data-nav="rail"] .v2-iconbtn[data-tip]::after, html[data-nav="rail"] .v2-powered-nav[data-tip]::after { content: none !important; display: none !important; }
#v2-tip {
  position: fixed; left: 0; top: 0; z-index: 1000; max-width: 280px; box-sizing: border-box; pointer-events: none;
  background: var(--tip-bg); color: var(--tip-fg); font: 500 12.5px/1.4 var(--font-body); padding: 6px 9px; border-radius: 8px;
  box-shadow: 0 8px 24px -8px rgba(10, 17, 48, .45), 0 1px 3px rgba(10, 17, 48, .2); overflow-wrap: anywhere; white-space: normal;
  opacity: 0; visibility: hidden; transform: scale(.96); transition: opacity 80ms ease, transform 80ms ease, visibility 0s linear 80ms;
}
#v2-tip.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity 120ms ease, transform 120ms ease, visibility 0s; }
#v2-tip .v2-tip-a { position: absolute; width: 8px; height: 8px; background: var(--tip-bg); transform: rotate(45deg); border-radius: 1px; }
#v2-tip[data-side="top"] .v2-tip-a { bottom: -4px; left: var(--ax, 50%); }
#v2-tip[data-side="bottom"] .v2-tip-a { top: -4px; left: var(--ax, 50%); }
#v2-tip[data-side="right"] .v2-tip-a { left: -4px; top: var(--ay, 50%); }
#v2-tip[data-side="left"] .v2-tip-a { right: -4px; top: var(--ay, 50%); }
@media (prefers-reduced-motion: reduce) { #v2-tip, #v2-tip.is-on { transform: none; transition: opacity 80ms linear, visibility 0s; } }
@media print { #v2-tip { display: none; } }

/* backstop: no page can push horizontal page scroll. Clipped on .v2-app (whole shell) rather than .v2-content, so page popovers that overlap the sidebar side stay visible; only overflow past the viewport edge is cut. clip (not hidden) keeps sticky working */
.v2-app { overflow-x: clip; }

/* nav group caret (items with sub-items) */
.v2-nav-caret { flex: none; display: inline-flex; margin-left: auto; color: var(--muted); transition: transform 160ms; }
.v2-nav-item[aria-expanded="true"] .v2-nav-caret { transform: rotate(180deg); }
html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-nav-caret { display: none; }
@media (prefers-reduced-motion: reduce) { .v2-nav-caret { transition: none; } }

/* rail: the footer keeps one fixed layout in every state; labels fade, nothing reflows on expand/collapse */
html[data-nav="rail"] .v2-powered-text, html[data-nav="rail"] .v2-nav-label { white-space: nowrap; }
html[data-nav="rail"] .v2-acctcard { overflow: hidden; }
html[data-nav="rail"] .v2-acctcard .v2-acct-text { max-height: 34px; overflow: hidden; }

/* rail, collapsed: compact footer card (avatar only, no card chrome); powered-by row tweens to 0 height in the same 200ms as the width */
@media (min-width: 900px) {
  html[data-nav="rail"] .v2-acctcard { transition: background-color 200ms ease, border-color 200ms ease; }
  html[data-nav="rail"] .v2-acctcard .v2-powered-nav { max-height: 44px; overflow: hidden; transition: max-height 200ms ease, padding 200ms ease, border-top-width 200ms ease, opacity 140ms ease; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-acctcard { background: transparent; border-color: transparent; }
  html[data-nav="rail"]:not([data-rail-open="true"]):not([data-rail-hover="true"]) .v2-acctcard .v2-powered-nav { max-height: 0; padding-top: 0; padding-bottom: 0; border-top-width: 0; opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { html[data-nav="rail"] .v2-acctcard, html[data-nav="rail"] .v2-acctcard .v2-powered-nav { transition: none; } }

/* ---------- app loading screen (first load per session) + slow-load progress bar ---------- */
#v2-splash { --splash-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; background: var(--bg); opacity: 1; }
html.v2-splash #v2-splash, html.v2-splash-out #v2-splash { display: flex; }
html.v2-splash-out #v2-splash { opacity: 0; pointer-events: none; transition: opacity 260ms ease; }
.v2-splash-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0 24px; text-align: center; animation: v2-splash-in 420ms ease both; }
.v2-splash-word { font-size: 64px; line-height: .9; }
.v2-splash-svg { display: block; height: 44px; width: auto; color: var(--wm-t); }
.v2-splash-portal { font: 600 14px/1.2 var(--splash-font); letter-spacing: .22em; text-transform: uppercase; color: var(--portal, var(--accent-text)); }
.v2-splash-line { position: relative; display: block; width: 168px; height: 3px; margin-top: 10px; border-radius: 3px; overflow: hidden; background: var(--line); }
.v2-splash-line i { position: absolute; top: 0; bottom: 0; left: 0; width: 42%; border-radius: 3px; background: var(--portal, var(--accent-text)); animation: v2-splash-bar 1.15s cubic-bezier(.45, 0, .25, 1) infinite; }
#v2-splash .v2-splash-msg { margin-top: 2px; font: 500 14px/1.3 var(--splash-font); color: var(--muted); }
#v2-splash .v2-splash-msg--sw { display: none; }
html.v2-sw #v2-splash .v2-splash-msg--sw { display: block; }
/* portal switch: source fades IN once and is never faded out; destination paints solid with no entry animation */
html.v2-sw .v2-splash-in { animation: none; }
#v2-splash { contain: strict; }
/* splash up: the scrollbar stays (same width, no layout change) but is invisible, and the page behind cannot grow the document (its height is clipped inside .v2-app, never on html/body) */
html:is(.v2-splash, .v2-splash-out)::-webkit-scrollbar-thumb, html:is(.v2-splash, .v2-splash-out)::-webkit-scrollbar-track { background: transparent !important; border-color: transparent !important; }
html.v2-splash:not(.v2-sw-src), html.v2-splash-out:not(.v2-sw-src) { overflow-y: scroll; }   /* force the gutter from the first frame so clientWidth does not change at the fade */
html.v2-splash:not(.v2-sw-src) .v2-app { height: 100vh; min-height: 0; max-height: 100vh; overflow: hidden; }
/* switch hand-off: hold the source portal's theme colours until the splash has faded */
html[data-sw-theme="dark"] #v2-splash { color-scheme: dark; }
html[data-sw-theme="light"] #v2-splash { color-scheme: light; }
html.v2-sw-src #v2-splash { animation: v2-splash-fade 180ms ease both; }
@keyframes v2-splash-fade { from { opacity: 0; } }
.v2-splash-line i { animation-delay: var(--v2-sp-delay, 0s); }
@keyframes v2-splash-bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }
@keyframes v2-splash-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 639.98px) { .v2-splash-svg { height: 32px; } .v2-splash-portal { font-size: 12px; } .v2-splash-line { width: 132px; } }
@media (prefers-reduced-motion: reduce) {
  .v2-splash-in { animation: none; }
  .v2-splash-line i { animation: none; width: 100%; opacity: .55; }
}
#v2-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1500; overflow: hidden; pointer-events: none; opacity: 1; transition: opacity 300ms ease; }
#v2-progress.is-done { opacity: 0; }
#v2-progress i { position: absolute; top: 0; bottom: 0; left: 0; width: 35%; background: var(--portal, var(--accent-text)); border-radius: 0 3px 3px 0; animation: v2-progress 1.2s cubic-bezier(.4, 0, .2, 1) infinite; }
@keyframes v2-progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { #v2-progress i { animation: none; width: 100%; opacity: .6; } }
@media print { #v2-splash, #v2-progress { display: none !important; } }
/* 15/11 Adam: iOS Safari zooms the page when a focused field's text is under 16px. Touch screens get 16px fields (pinch-zoom stays allowed). */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]), select, textarea, [contenteditable="true"] { font-size: 16px !important; }
}

/* 15/11: phones - hard cap on the account chip so the brand + icon buttons always fit */
@media (max-width: 520px) { .v2-acct-chip { max-width: 132px; min-width: 0; flex: 0 1 auto; } }
@media (max-width: 380px) { .v2-acct-chip { max-width: 104px; } }

/* 15/11: toasts restyled - theme card (was --ink, white in dark mode), coloured stripe + tinted icon, above maps */
.v2-toasts { z-index: 2000; }
.v2-toast { --tc: light-dark(#0b6fa4, #6cc8f5); align-items: center; gap: 12px; padding: 10px 8px 10px 12px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--tc);
  border-radius: 12px; font-weight: 500; line-height: 1.35; box-shadow: var(--shadow-pop); }
.v2-toast--success { --tc: var(--ok); }
.v2-toast--error { --tc: light-dark(#b42318, #ff9a8e); }
.v2-toast--warn, .v2-toast--warning { --tc: light-dark(#b54708, #fdb022); }
.v2-toast > .v2-icon:first-child, .v2-toast--success .v2-icon:first-child, .v2-toast--error .v2-icon:first-child {
  box-sizing: border-box; flex: none; width: 30px; height: 30px; margin: 0; padding: 7px; border-radius: 50%;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); }
.v2-toast button { color: var(--muted); opacity: 1; border-radius: 8px; padding: 6px; }
.v2-toast button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
/* maps (Leaflet panes go to z-index 1000) stay in their own layer, under toasts/menus */
#map_wrap, .bd2-map, .leaflet-container { isolation: isolate; z-index: 0; }
.v2-toast button .v2-icon, .v2-toast--success button .v2-icon:first-child, .v2-toast--error button .v2-icon:first-child { width: 16px; height: 16px; padding: 0; margin: 0; border-radius: 0; background: none; color: inherit; }
