/* IFS Customer Portal shell. Tokens live in tokens.css.

   Structure: sign-in (brand panel + card), then the app: a navy sidebar, a
   frosted top bar, and a content column. Each product carries its colour
   through [data-product], so its cards, hero, tabs and bots read as one app. */

/* ---------- base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
/* Browser-drawn parts carry the palette too. */
::selection { background: color-mix(in srgb, var(--blue) 24%, transparent); }
html { scrollbar-color: var(--line-2) transparent; }
input, textarea { caret-color: var(--link); }
.admin-table, .admin-tile dd { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
/* On the navy panels the brand-blue ring falls under 3:1. Sky reads at 5.5:1
   or better there; the product cards' brighter glow needs white (4.3:1+). */
.sidebar :focus-visible, .hero :focus-visible,
.auth-brand :focus-visible, .tour-card-center :focus-visible { outline-color: var(--sky); }
.product-live :focus-visible { outline-color: #fff; }
/* Headings and notes take focus (tabindex -1) only so a screen reader starts
   there after a change of view; they are not controls and show no ring. */
[tabindex="-1"]:focus { outline: none; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

[data-icon] { display: inline-flex; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: var(--s2) var(--s4); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3);
}
.skip-link:focus { top: var(--s4); }

.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.stack { display: grid; gap: var(--s4); }
.stack-tight { display: grid; gap: var(--s1); min-width: 0; }

/* Product colour. Unknown ids keep brand blue. --pc-solid is the fill
   behind white text (see tokens.css). */
:root { --pc: var(--blue); --pc-solid: var(--blue); }
[data-product="bankware"] { --pc: var(--p-bankware); --pc-solid: var(--p-bankware-solid); }
[data-product="amltrac"] { --pc: var(--p-amltrac); --pc-solid: var(--p-amltrac-solid); }
[data-product="ibank"] { --pc: var(--p-ibank); --pc-solid: var(--p-ibank-solid); }
[data-product="cumulus"] { --pc: var(--p-cumulus); --pc-solid: var(--p-cumulus-solid); }
[data-product="ipayu"] { --pc: var(--p-ipayu); --pc-solid: var(--p-ipayu-solid); }
/* Text in the product's colour, mixed toward the ink so it reads at 4.5:1 or
   better on light and dark surfaces. Declared with the product so it follows it. */
:root, [data-product] { --pc-text: color-mix(in srgb, var(--pc-solid) 65%, var(--ink)); }

/* ---------- type ---------- */

.eyebrow {
  display: flex; align-items: center; gap: var(--s3);
  margin: 0 0 var(--s3);
  font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--link);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.eyebrow-sky { color: var(--sky); }

.display, .hero-title, .page-title, .auth-title, .reader-title {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
}
.display em, .hero-title em { font-style: italic; color: var(--sky); }

/* ---------- wordmark ---------- */

.wordmark {
  display: inline-flex; align-items: center; gap: 0;
  font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--navy); text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark-i { color: var(--blue); }
.wordmark-light { color: #fff; }
.wordmark-light .wordmark-i { color: var(--sky); }
.wordmark-sep { width: 1px; height: 18px; margin: 0 var(--s3); background: currentColor; opacity: 0.3; }
.wordmark-product { font-weight: 400; opacity: 0.75; letter-spacing: 0; font-size: 0.95rem; }
.wordmark-compact { font-size: 1rem; }
.wordmark-muted { color: var(--ink-2); margin-right: var(--s2); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s5);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: var(--t-sm); letter-spacing: 0.01em;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { text-decoration: none; border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-quiet { background: transparent; }
.btn-quiet:hover { background: var(--surface); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: var(--t-base); }
.btn .icon { transition: transform 0.2s var(--ease); }
.btn:hover .icon { transform: translateX(2px); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--line-2); }
.icon-btn-dark { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); color: #dfe8f7; }
.icon-btn-dark:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); }

.status { min-height: 1.2em; font-size: var(--t-sm); color: var(--ink-2); }
.status-ok { color: var(--ok-ink); font-weight: 600; }
.is-busy { opacity: 0.75; pointer-events: none; }

/* ---------- sign in ---------- */

.auth {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(min(100%, 26.25rem), 0.85fr);
  background: var(--canvas);
}

.auth-brand {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(14, 106, 221, 0.35), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(143, 181, 242, 0.12), transparent 60%),
    var(--navy);
  color: #fff;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 22, 51, 0) 50%, rgba(7, 22, 51, 0.8) 100%);
}
.wave { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.auth-brand-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s7);
  height: 100%; padding: clamp(28px, 5vw, 64px);
}
.auth-copy { max-width: 36rem; }
.display { font-size: clamp(2.75rem, 5.6vw, 5.25rem); line-height: 1.02; color: #fff; }
.auth-lead { margin-top: var(--s5); max-width: 30rem; font-size: var(--t-lg); color: rgba(255, 255, 255, 0.74); line-height: 1.55; }

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); max-width: 32rem; }
.auth-points li {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78); font-size: var(--t-sm);
}
.auth-points strong { color: #fff; font-weight: 600; }
.auth-point-icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 10px; background: rgba(143, 181, 242, 0.14); color: var(--sky);
}

.auth-panel { display: grid; place-items: center; padding: clamp(24px, 5vw, 64px); }
.auth-card { width: min(100%, 420px); display: grid; gap: var(--s2); }
.auth-card > .wordmark { margin-bottom: var(--s6); }
.auth-title { font-size: var(--t-3xl); color: var(--ink); }
.auth-form { display: grid; gap: var(--s4); margin-top: var(--s5); }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--navy-3));
  color: #fff; font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.02em;
}
.avatar-lg { width: 40px; height: 40px; font-size: var(--t-sm); }
.avatar-xl { width: 72px; height: 72px; font-size: 1.35rem; }

.signin-note {
  display: flex; gap: var(--s2); align-items: flex-start;
  margin-top: var(--s5); padding: var(--s3) var(--s4);
  border: 1px solid var(--unknown-line); border-radius: var(--r-md);
  background: var(--unknown-bg); color: var(--unknown-ink);
  font-size: var(--t-sm); line-height: 1.5;
}
.signin-note .icon { margin-top: 2px; }

/* ---------- app frame ---------- */

.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar);
  display: flex; flex-direction: column;
  background:
    radial-gradient(420px 320px at 0% 100%, rgba(14, 106, 221, 0.22), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, #081a3d 100%);
  color: #dfe8f7;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.sidebar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; pointer-events: none;
  background-image: radial-gradient(rgba(143, 181, 242, 0.35) 1px, transparent 1.5px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent);
  mask-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent);
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar); padding: 0 var(--s5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: var(--s4) var(--s3); display: grid; align-content: start; gap: 2px; }
.nav-group {
  margin: var(--s5) var(--s3) var(--s2);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(223, 232, 247, 0.6);
}
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: var(--s3);
  min-height: 40px; padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  color: rgba(223, 232, 247, 0.78); font-size: var(--t-sm); font-weight: 500;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; text-decoration: none; }
.nav-link[aria-current="page"] { background: rgba(143, 181, 242, 0.14); color: #fff; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-product.is-open { background: rgba(255, 255, 255, 0.04); border-radius: var(--r-md); padding-bottom: var(--s2); }
.nav-product.is-open .nav-link-product { color: #fff; font-weight: 600; }
.nav-areas { display: grid; gap: 1px; padding-left: var(--s5); margin-left: var(--s4); border-left: 1px solid rgba(255, 255, 255, 0.1); }
.nav-link-area { min-height: 34px; font-size: var(--t-sm); }
.nav-link-locked { color: rgba(223, 232, 247, 0.6); }
.nav-lock {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 8px; border: 1px dashed rgba(223, 232, 247, 0.3);
}
.nav-lock .icon { width: 14px; height: 14px; }

.sidebar-foot { position: relative; z-index: 1; padding: var(--s3); border-top: 1px solid rgba(255, 255, 255, 0.06); }
.user-chip {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2); border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
}
.user-text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.user-name { font-size: var(--t-sm); font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-bank { font-size: var(--t-xs); color: rgba(223, 232, 247, 0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.workspace { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s3);
  height: var(--topbar); padding: 0 clamp(16px, 3vw, 40px);
  background: color-mix(in srgb, var(--canvas) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-spacer { flex: 1; }
.drawer-only { display: none; }

.crumbs { min-width: 0; }
.crumb-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: var(--s1); font-size: var(--t-sm); white-space: nowrap; }
.crumb-list li { display: inline-flex; align-items: center; gap: var(--s1); min-width: 0; }
.crumb-list a { color: var(--ink-2); }
.crumb-here { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumb-sep { color: var(--ink-3); width: 14px; height: 14px; }

.switcher-wrap { position: relative; }
.switch-btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 44px; min-width: 44px; justify-content: center; padding: 0 var(--s2) 0 var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); box-shadow: var(--shadow-1);
  font-size: var(--t-sm); font-weight: 500; cursor: pointer;
}
.switch-btn:hover { border-color: var(--line-2); }
.switch-btn[aria-expanded="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(14, 106, 221, 0.14); }
.kbd {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2);
  font-family: var(--sans); font-size: 0.6875rem; color: var(--ink-3);
}

.switcher {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: min(360px, calc(100vw - 32px));
  padding: var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-3);
  animation: pop 0.18s var(--ease);
}
.switcher .eyebrow { margin: var(--s1) var(--s2) var(--s3); }
.switcher hr { border: 0; border-top: 1px solid var(--line); margin: var(--s2) 0; }
.switch-item {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2); border-radius: var(--r-sm);
  color: var(--ink); text-decoration: none;
}
.switch-item:hover, .switch-item:focus-visible { background: var(--surface-sunk); text-decoration: none; outline-offset: -2px; }
.switch-text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.switch-name { font-weight: 600; font-size: var(--t-sm); }
.switch-sub { font-size: var(--t-xs); color: var(--ok-ink); }
.switch-go { color: var(--ink-3); opacity: 0; transition: opacity 0.15s, transform 0.15s; }
.switch-item:hover .switch-go, .switch-item:focus-visible .switch-go { opacity: 1; transform: translateX(2px); }
.switch-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-sunk); color: var(--ink-2); }
.switch-empty { padding: var(--s2); font-size: var(--t-sm); color: var(--ink-2); }

@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

.demo-strip {
  padding: 6px clamp(16px, 3vw, 40px);
  background: var(--unknown-bg); border-bottom: 1px solid var(--unknown-line);
  color: var(--unknown-ink); font-size: var(--t-xs); font-weight: 500;
}
.demo-strip p { max-width: var(--content); margin: 0 auto; display: flex; align-items: center; gap: var(--s2); }
.demo-strip p::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.session-warning { padding: var(--s3) clamp(16px, 3vw, 40px); background: var(--unknown-bg); color: var(--unknown-ink); border-bottom: 1px solid var(--unknown-line); }
.session-warning p { display: flex; align-items: center; gap: var(--s2); font-weight: 600; font-size: var(--t-sm); }

.main {
  flex: 1; width: 100%; max-width: calc(var(--content) + 2 * clamp(16px, 3vw, 40px));
  margin: 0 auto; padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 40px) var(--s8);
  outline: none;
}

.footer { padding: var(--s5) clamp(16px, 3vw, 40px); border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--t-xs); }
.footer p { max-width: var(--content); margin: 0 auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1); }

.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(7, 22, 51, 0.5); backdrop-filter: blur(2px); }

/* ---------- monograms ---------- */

.monogram {
  display: inline-grid; place-items: center; flex: none;
  width: 2.75rem; height: 2.75rem; border-radius: 14px;
  background: linear-gradient(145deg, var(--pc-solid), color-mix(in srgb, var(--pc-solid) 75%, var(--navy)));
  color: #fff; font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.monogram-sm { width: 1.625rem; height: 1.625rem; border-radius: 8px; font-size: 0.6875rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.monogram-lg { width: 4.5rem; height: 4.5rem; border-radius: 22px; font-size: 1.5rem; }
.monogram-locked { background: var(--locked-bg); color: var(--locked-ink); box-shadow: none; border: 1px dashed var(--locked-line); }
.monogram-discover {
  background: color-mix(in srgb, var(--pc) 12%, var(--surface));
  color: var(--pc-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 25%, transparent);
}
.monogram-wrap { position: relative; display: inline-flex; }
.lock-pip {
  position: absolute; right: -6px; bottom: -6px;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); color: var(--locked-ink);
  box-shadow: 0 0 0 1px var(--locked-line), var(--shadow-1);
}
.lock-pip .icon { width: 12px; height: 12px; stroke-width: 2.2; }

/* ---------- badges and tags ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px 0 8px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.badge-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.badge-locked { background: var(--locked-bg); color: var(--locked-ink); border-color: var(--locked-line); }
.badge-discover { background: var(--discover-bg); color: var(--discover-ink); border-color: var(--discover-line); }
.badge-unknown { background: var(--unknown-bg); color: var(--unknown-ink); border-color: var(--unknown-line); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--unknown-bg); color: var(--unknown-ink);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
}

/* ---------- page heads and sections ---------- */

.page-head { padding: var(--s5) 0 var(--s4); }
.page-title { font-size: var(--t-4xl); line-height: 1.05; }
.page-intro { margin-top: var(--s3); max-width: 44rem; font-size: var(--t-lg); color: var(--ink-2); }

.section { margin-top: var(--s7); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); letter-spacing: -0.015em; }
.section-titles .eyebrow { margin-bottom: var(--s2); }

.grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 26.25rem), 1fr)); }
.grid-discover { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(min(100%, 21.25rem), 26.25rem); gap: var(--s6); align-items: start; }
.split-side { position: sticky; top: calc(var(--topbar) + var(--s5)); margin-top: var(--s7); }
/* Large text makes the side column wider than the room left; stack it when
   the content column is narrower than about 52rem, whatever the viewport. */
.main { container-type: inline-size; }
@container (max-width: 52rem) {
  .split { grid-template-columns: 1fr; }
  .split-side { position: static; margin-top: var(--s6); }
}

/* ---------- heroes ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-xl);
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(14, 106, 221, 0.45), transparent 60%),
    radial-gradient(600px 400px at 0% 120%, rgba(143, 181, 242, 0.14), transparent 60%),
    var(--navy);
  color: #fff;
  box-shadow: var(--shadow-3);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 22, 51, 0.85) 0%, rgba(7, 22, 51, 0.2) 55%, rgba(7, 22, 51, 0) 100%);
}
.hero .wave { z-index: 0; }
.hero-inner { position: relative; z-index: 1; padding: clamp(24px, 4vw, 48px); }
.hero-title { font-size: clamp(2.25rem, 4.6vw, 3.75rem); line-height: 1.04; color: #fff; outline: none; }
.hero-lead { margin-top: var(--s4); max-width: 36rem; color: rgba(255, 255, 255, 0.72); font-size: var(--t-md); }

.hero-counts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: var(--s5) 0 0; font-size: var(--t-sm); color: rgba(255, 255, 255, 0.78); font-variant-numeric: tabular-nums; }
.hero-counts strong { color: #fff; font-weight: 600; }

.hero-product {
  background:
    radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--pc) 70%, transparent), transparent 62%),
    radial-gradient(600px 400px at 0% 120%, color-mix(in srgb, var(--pc) 22%, transparent), transparent 60%),
    var(--navy);
}
.hero-product-inner { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.hero-product-inner .stack-tight { flex: 1; min-width: 220px; }
.hero-product-inner .eyebrow { margin-bottom: var(--s1); }
.hero-product .monogram-lg { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.hero-product .badge-ok { background: rgba(255, 255, 255, 0.1); color: #c9f2dd; border-color: rgba(201, 242, 221, 0.35); }

/* ---------- area tabs (segmented control) ---------- */

.tabs {
  position: sticky; top: calc(var(--topbar) + 10px); z-index: 20;
  display: flex; gap: 4px; margin-top: var(--s5); padding: 5px;
  overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-2);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: 1 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4);
  border-radius: var(--r-sm);
  color: var(--ink-2); font-size: var(--t-sm); font-weight: 600; white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tabs a:hover { background: var(--surface-sunk); color: var(--ink); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--pc-solid); color: #fff; }

/* ---------- cards ---------- */

.card {
  position: relative;
  padding: var(--s5);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.product-card { display: grid; gap: var(--s4); align-content: start; }
.product-card .head { display: flex; align-items: center; gap: var(--s4); }
.product-card .name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); min-width: 0; }
.product-card h3 { font-size: var(--t-xl); letter-spacing: -0.02em; }
.product-card .blurb { color: var(--ink-2); }
.reason { font-size: var(--t-sm); color: var(--ink-2); }
.card-locked .name, .card-discover .name { flex-direction: column; align-items: flex-start; gap: var(--s1); }

/* Entitled: a rich app card in the product's colour. */
.product-live {
  overflow: hidden; isolation: isolate;
  padding: var(--s5);
  border: 0;
  background:
    radial-gradient(520px 260px at 100% 0%, color-mix(in srgb, var(--pc) 75%, transparent), transparent 70%),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  color: #fff;
  box-shadow: var(--shadow-3);
}
.card-dots {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(420px 240px at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(420px 240px at 100% 0%, #000, transparent 75%);
}
.product-open {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4);
  color: #fff; text-decoration: none;
  padding-bottom: var(--s5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.product-open:hover { text-decoration: none; }
.product-open .monogram { width: 3.5rem; height: 3.5rem; border-radius: 18px; font-size: 1.15rem; }
.product-open h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; letter-spacing: -0.02em; }
.product-live .badge-ok { background: rgba(255, 255, 255, 0.1); color: #c9f2dd; border-color: rgba(201, 242, 221, 0.35); }
.product-go {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: var(--s2);
  height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-pill); background: #fff; color: var(--navy);
  font-size: var(--t-sm); font-weight: 600;
  transition: transform 0.2s var(--ease);
}
.product-open:hover .product-go { transform: translateX(3px); }

.area-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); gap: var(--s2); }
.area-links a {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2);
  padding: var(--s3);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86); font-size: var(--t-xs); font-weight: 600; line-height: 1.25;
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.area-links a:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.22); text-decoration: none; }
.area-links .icon { width: 20px; height: 20px; color: color-mix(in srgb, var(--pc) 45%, #fff); }

/* Locked: visibly greyed, still readable and focusable. */
.card-locked {
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--locked-line) 35%, transparent) 10px 11px),
    var(--surface-2);
  border: 1px dashed var(--locked-line);
  box-shadow: none;
}
.card-locked h3 { color: var(--locked-ink); }
.card-locked h3:focus-visible { outline-offset: 4px; }

/* Discover: a light card; the monogram carries the product colour. */
.card-discover:hover { border-color: var(--line-2); }

.discover-teaser {
  display: flex; align-items: center; gap: var(--s4);
  margin-top: var(--s7); padding: var(--s5);
  color: var(--ink); text-decoration: none;
  background: var(--surface);
  transition: border-color 0.2s var(--ease);
}
.discover-teaser:hover { text-decoration: none; border-color: var(--line-2); }
.teaser-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.teaser-icon .icon { width: 22px; height: 22px; }
.teaser-text { display: grid; gap: 2px; flex: 1; }
.teaser-text strong { font-size: var(--t-md); }
.teaser-text span { color: var(--ink-2); font-size: var(--t-sm); }
.teaser-go { color: var(--blue); width: 22px; height: 22px; transition: transform 0.2s var(--ease); }
.discover-teaser:hover .teaser-go { transform: translateX(4px); }

/* ---------- notices and empty states ---------- */

.notice {
  display: flex; gap: var(--s4); align-items: flex-start;
  margin-top: var(--s5); padding: var(--s5);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.notice-warn { background: var(--unknown-bg); border-color: var(--unknown-line); color: var(--unknown-ink); }
.notice-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--surface-sunk); color: var(--ink-2); }
.notice-warn .notice-icon { background: rgba(255, 255, 255, 0.5); color: var(--unknown-ink); }
.notice-body { display: grid; gap: var(--s2); justify-items: start; }
.notice-body h2 { font-size: var(--t-lg); }
.notice-body .btn { margin-top: var(--s2); }

.empty {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s5);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  color: var(--ink-2);
}
.empty-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-sunk); }

/* ---------- guides and news ---------- */

.doc-list { display: grid; gap: var(--s2); }
.doc-row {
  display: flex; align-items: center; gap: var(--s4);
  min-height: 72px; padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.doc-row:hover { text-decoration: none; border-color: color-mix(in srgb, var(--pc) 40%, var(--line)); }
.doc-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: color-mix(in srgb, var(--pc) 12%, var(--surface)); color: var(--pc);
}
.doc-text { display: grid; flex: 1; min-width: 0; }
.doc-text .title { font-weight: 600; }
.doc-meta { font-size: var(--t-xs); color: var(--ink-3); }
.doc-go { color: var(--ink-3); transition: transform 0.2s var(--ease); }
.doc-row:hover .doc-go { transform: translateX(3px); color: var(--ink); }
.skeleton {
  border-color: transparent;
  background: linear-gradient(90deg, var(--surface-sunk) 0%, var(--surface) 50%, var(--surface-sunk) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.reader { max-width: 760px; padding: clamp(20px, 4vw, 40px); display: grid; gap: var(--s3); justify-items: start; }
.reader-title { font-size: var(--t-3xl); line-height: 1.1; }
.reader .eyebrow { margin: var(--s3) 0 0; }
.back-link { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.back-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.doc-body { margin-top: var(--s3); font-size: 1.0625rem; line-height: 1.75; color: var(--ink); max-width: 66ch; white-space: pre-line; }

/* ---------- chat ---------- */

.chat {
  display: flex; flex-direction: column;
  height: min(640px, calc(100vh - 260px)); min-height: 460px;
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--shadow-2);
  overflow: hidden;
}
.split-side .chat { height: min(600px, calc(100vh - 140px)); }
.split-side .chat-empty-text { font-size: var(--t-lg); }
.chat-head {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.chat-avatar {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px;
  background: linear-gradient(145deg, var(--pc-solid), color-mix(in srgb, var(--pc-solid) 75%, var(--navy)));
  color: #fff;
}
.chat-titles { flex: 1; min-width: 0; }
.chat-titles h2 { font-size: var(--t-md); }
.chat-status { display: flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--ink-3); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #1fbf75; }

.chat-log {
  flex: 1; overflow-y: auto; padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s4);
  background: var(--surface-2);
  scroll-behavior: smooth;
}
.chat-empty { margin: auto; max-width: 26rem; text-align: center; display: grid; justify-items: center; gap: var(--s2); }
.chat-empty-mark {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; margin-bottom: var(--s2);
  background: color-mix(in srgb, var(--pc) 12%, var(--surface)); color: var(--pc);
}
.chat-empty-mark .icon { width: 28px; height: 28px; }
.chat-empty-text { font-family: var(--serif); font-size: var(--t-xl); line-height: 1.3; color: var(--ink); }

.msg { display: flex; align-items: flex-end; gap: var(--s2); max-width: 86%; animation: rise 0.25s var(--ease); }
.msg-user { align-self: flex-end; }
.msg-bot { align-self: flex-start; }
.msg-avatar {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 10px;
  background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: var(--pc);
}
.msg-avatar .icon { width: 16px; height: 16px; }
.msg-avatar-user { border-radius: 50%; background: var(--navy-3); color: #fff; font-size: 0.6875rem; font-weight: 600; }
.bubble {
  display: grid; gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-radius: 18px 18px 18px 6px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.msg-user .bubble { border-radius: 18px 18px 6px 18px; background: var(--pc-solid); border-color: transparent; color: #fff; }
.bubble-muted { background: var(--surface-sunk); color: var(--ink-2); }
.citation {
  display: inline-flex; align-items: center; gap: 6px; justify-self: start;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--pc) 10%, var(--surface)); color: var(--pc-text);
  font-size: var(--t-xs); font-weight: 600;
}
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
.msg-typing .bubble { padding: var(--s3) var(--s4); }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat-foot { padding: var(--s3) var(--s4) var(--s3); border-top: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; }
.bot { margin: 0; }
.chat-composer {
  display: flex; align-items: flex-end; gap: var(--s2);
  padding: 6px 6px 6px var(--s4);
  border: 1px solid var(--line-2); border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.chat-composer:focus-within { border-color: var(--pc-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 16%, transparent); }
.chat-composer textarea {
  flex: 1; min-height: 44px; max-height: 180px; padding: 11px 0;
  border: 0; outline: none; resize: none; background: transparent; line-height: 1.45;
}
.send-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 12px; background: var(--pc-solid); color: #fff; cursor: pointer;
  transition: filter 0.15s var(--ease);
}
.send-btn:hover { filter: brightness(1.08); }
.chat-foot .status { min-height: 0; }
.chat-hint { font-size: 0.6875rem; color: var(--ink-3); padding-left: var(--s2); }

.tag-official { background: var(--ok-bg); color: var(--ok-ink); }
.live-text { white-space: pre-wrap; }
.screen-picker { border-bottom: 1px solid var(--line); background: var(--surface); }
.screen-bar { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s5); font-size: var(--t-sm); }
.screen-bar > .icon { color: var(--pc); }
.screen-label { color: var(--ink-2); }
.screen-label.is-set { color: var(--ink); font-weight: 600; }
.screen-change, .screen-clear { font-size: var(--t-xs); }
.screen-clear { color: var(--ink-3); }
.screen-panel { padding: 0 var(--s5) var(--s3); display: grid; gap: var(--s2); }
.screen-search {
  width: 100%; min-height: 40px; padding: 0 var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); font-size: var(--t-sm);
}
.screen-search:focus { outline: none; border-color: var(--pc-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 16%, transparent); }
.screen-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; display: grid; gap: 2px; }
.screen-option {
  width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3);
  padding: 6px var(--s3); border: 0; border-radius: var(--r-sm); background: none; text-align: left;
  font: inherit; font-size: var(--t-sm); cursor: pointer; color: var(--ink);
}
.screen-option:hover, .screen-option:focus-visible { background: color-mix(in srgb, var(--pc) 8%, var(--surface)); }
.screen-option.level-0 { font-weight: 600; }
.screen-option.level-1 { padding-left: var(--s6); }
.screen-title { min-width: 0; }
.screen-context { font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; }
.screen-note { margin: 0; }
.msg-live .bubble { border-color: color-mix(in srgb, var(--pc) 30%, var(--line)); }
.bubble-tag { justify-self: start; height: 18px; font-size: 0.625rem; }
.answer-note { font-size: var(--t-xs); color: var(--ink-3); font-style: italic; }
.answer-steps { margin: 2px 0 0; padding-left: 1.4em; display: grid; gap: 6px; }
.answer-steps li::marker { color: var(--pc-text); font-weight: 700; }
.answer-bullets { gap: 2px; }
.answer-field { margin: 0; padding: var(--s3); border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.answer-field dt { font-weight: 700; }
.answer-field dd { margin: 2px 0 0; color: var(--ink-2); }
.answer-tip { display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); font-size: var(--t-sm); color: var(--ink); }
.answer-tip .icon { margin-top: 2px; color: color-mix(in srgb, var(--gold) 60%, var(--ink)); }
.follow-ups { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 38px; animation: rise 0.25s var(--ease); }
.follow-up {
  padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--pc) 35%, var(--line));
  background: var(--surface); color: var(--pc-text); font-size: var(--t-xs); font-weight: 600; cursor: pointer;
}
.follow-up:hover { background: color-mix(in srgb, var(--pc) 10%, var(--surface)); }
/* "Was this right?" under an official Help Bot answer */
.feedback { display: grid; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.feedback-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.feedback-q { font-size: var(--t-sm); color: var(--ink-3); }
.feedback-btn {
  min-height: 40px; padding: 0 var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-sm); cursor: pointer;
}
.feedback-btn:hover { border-color: var(--ink-3); }
.feedback-note { width: 100%; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); font: inherit; font-size: var(--t-sm); resize: vertical; }
.feedback-done { font-size: var(--t-sm); color: var(--ink-3); }
.human-card { display: grid; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: var(--blue-soft); font-size: var(--t-sm); }
.chat-context { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s5); background: color-mix(in srgb, var(--pc) 8%, var(--surface)); border-bottom: 1px solid var(--line); font-size: var(--t-xs); font-weight: 600; color: var(--pc-text); }
.reader-purpose { font-size: var(--t-lg); }
.reader-h { margin-top: var(--s4); font-size: var(--t-md); }
.reader-steps { margin: 0; padding-left: 1.4em; display: grid; gap: var(--s2); font-size: 1.0625rem; line-height: 1.6; }
.reader-steps li::marker { color: var(--pc-text); font-weight: 700; }
.reader-fields { margin: 0; display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: var(--s2) var(--s4); }
.reader-fields dt { font-weight: 700; }
.reader-fields dd { margin: 0; color: var(--ink-2); }
.reader-actions { margin-top: var(--s4); }
.guide-search { max-width: 560px; }
.screen-row.level-1 { margin-left: var(--s6); min-height: 56px; }
.screen-row.level-0 .title { font-size: var(--t-md); }
.help-reader { max-width: 860px; }
.help-doc { display: grid; gap: var(--s3); width: 100%; font-size: 1rem; line-height: 1.7; color: var(--ink); }
.help-doc p { margin: 0; }
.help-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.help-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); line-height: 1.55; }
.help-table th, .help-table td { padding: var(--s2) var(--s3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.help-table th { background: var(--surface-2); font-weight: 600; }
.help-table tr:last-child td { border-bottom: 0; }
.help-table td:first-child { font-weight: 600; min-width: 9em; }
.help-table p { margin: 0 0 var(--s1); }
.help-table p:last-child { margin-bottom: 0; }
.help-table ul { margin: 0 0 var(--s1); }
.help-table td.help-table-span, .help-table th.help-table-span { font-weight: 400; background: var(--surface-2); }
.help-table p.help-table-note { font-style: italic; }
/* The CHM's fold-outs: secondary screens, definitions, sub-topics */
.foldouts { display: grid; gap: var(--s2); width: 100%; }
.foldout { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.foldout > summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); row-gap: 2px;
  padding: var(--s3) var(--s4); cursor: pointer; list-style: none;
}
.foldout > summary::-webkit-details-marker { display: none; }
.foldout > summary::after { content: "+"; grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ink-3); font-weight: 600; font-size: var(--t-lg); }
.foldout[open] > summary::after { content: "\2212"; }
.foldout-kind, .foldout-title { grid-column: 1; }
.foldout-kind { font-size: var(--t-xs); color: var(--ink-3); }
.foldout-title { font-weight: 600; }
.foldout-body { display: grid; gap: var(--s3); padding: 0 var(--s4) var(--s4); }
.foldout-body .foldout { background: var(--surface-2); }
.foldout-page { display: inline-flex; align-items: center; gap: var(--s1); font-size: var(--t-sm); }
.help-doc ul, .help-doc ol { margin: 0; padding-left: 1.5em; display: grid; gap: 4px; }
.help-doc li > ul, .help-doc li > ol { margin-top: 4px; }
.help-doc li > p.help-li-more { margin-top: 4px; }
.help-fold-link { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--pc-text); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.help-fold-link:focus-visible { outline: 2px solid var(--pc); outline-offset: 2px; border-radius: 2px; }
.help-doc li > .foldout, .help-table td > .foldout, .help-doc > .foldout { margin-top: var(--s2); }
.help-doc ol > li::marker { color: var(--pc-text); font-weight: 700; }
.help-h { margin: var(--s3) 0 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.help-note { padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); background: color-mix(in srgb, var(--pc) 7%, var(--surface)); display: grid; gap: var(--s2); }
.help-img { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; border-radius: 4px; }
.help-rule { border: 0; border-top: 1px solid var(--line); width: 100%; }
.help-figure { margin: var(--s2) 0; display: grid; gap: var(--s2); }
.help-diagram { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.help-figure figcaption { font-size: var(--t-xs); color: var(--ink-3); }
.screen-steps a { font-weight: 600; }

/* ---------- escalation ---------- */

.escalation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s5); align-items: start; }
.esc-card { display: grid; gap: var(--s3); justify-items: start; padding: var(--s6); }
.esc-card h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.esc-card-wide { min-width: 0; }
.esc-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: var(--s2);
  background: color-mix(in srgb, var(--pc) 12%, var(--surface)); color: var(--pc);
}
.esc-icon .icon { width: 22px; height: 22px; }
.slack-line { display: grid; gap: var(--s2); justify-items: start; margin-top: var(--s2); color: var(--ink-2); }
.inline-note {
  display: flex; gap: var(--s2); align-items: flex-start;
  padding: var(--s3); border-radius: var(--r-sm);
  background: var(--unknown-bg); color: var(--unknown-ink); font-size: var(--t-sm);
}
.inline-note .icon { margin-top: 2px; }
.draft-form { display: grid; gap: var(--s3); width: 100%; margin-top: var(--s2); }
.draft-form label { font-weight: 600; font-size: var(--t-sm); }
.draft-form textarea {
  width: 100%; min-height: 150px; padding: var(--s3) var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); resize: vertical; line-height: 1.5;
}
.draft-form textarea:focus { outline: none; border-color: var(--pc-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 16%, transparent); }
.draft-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); font-size: var(--t-sm); color: var(--ink-2); }
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px 0 8px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--pc) 12%, var(--surface)); color: var(--pc-text);
}
.stamp .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* ---------- sign-in steps ---------- */

.auth-root { min-height: 420px; }
.auth-step { display: grid; gap: var(--s2); animation: rise 0.3s var(--ease); }
.auth-step > .muted { margin-bottom: var(--s2); }
.auth-progress { list-style: none; margin: var(--s3) 0 var(--s2); padding: 0; display: flex; gap: var(--s4); font-size: var(--t-xs); color: var(--ink-3); }
.auth-progress li { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; }
.auth-progress li.is-done { color: var(--ink); }
.auth-progress li[aria-current="step"] { color: var(--link); }
.auth-progress-dot {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line-2); font-size: 0.6875rem;
}
.auth-progress li.is-done .auth-progress-dot { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.auth-progress li[aria-current="step"] .auth-progress-dot { background: var(--blue); border-color: var(--blue); color: #fff; }

.field { position: relative; display: grid; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--t-md);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(14, 106, 221, 0.16); }
.field-action {
  position: absolute; right: 6px; bottom: 6px; height: 36px; padding: 0 var(--s3);
  border: 0; border-radius: var(--r-sm); background: var(--surface-sunk); color: var(--ink-2);
  font-size: var(--t-xs); font-weight: 600; cursor: pointer;
}
.field-action:hover { color: var(--ink); }
.status-error { color: var(--danger); font-weight: 500; }

.code-input {
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: 1.75rem !important; letter-spacing: 0.5em; text-align: center; min-height: 60px !important;
  padding-left: 0.5em !important;
}
.mono-input { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; }
.mfa-mark {
  display: grid; place-items: center; width: 56px; height: 56px; margin: var(--s2) 0;
  border-radius: 18px; background: var(--blue-soft); color: var(--blue);
}
.mfa-mark .icon { width: 26px; height: 26px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0;
  border: 0; background: none; color: var(--link); font-weight: 600; font-size: var(--t-sm); cursor: pointer;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.enrol-steps { list-style: none; counter-reset: enrol; margin: var(--s3) 0 0; padding: 0; display: grid; gap: var(--s4); }
.enrol-steps > li {
  counter-increment: enrol; position: relative;
  padding: var(--s4) var(--s4) var(--s4) 56px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.enrol-steps > li::before {
  content: counter(enrol); position: absolute; left: var(--s4); top: var(--s4);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: var(--t-xs); font-weight: 700;
}
.enrol-steps h2 { font-size: var(--t-base); margin-bottom: var(--s1); }
.enrol-steps .auth-form { margin-top: var(--s3); }
.qr-frame {
  display: inline-grid; margin: var(--s3) 0; padding: var(--s2);
  border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;
  box-shadow: var(--shadow-2);
}
.qr { display: block; width: 196px; height: 196px; image-rendering: pixelated; }
.manual-key summary { cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--link); }
.manual-key[open] { display: grid; gap: var(--s2); }
.key {
  display: block; padding: var(--s3); border-radius: var(--r-sm); background: var(--surface-sunk);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--t-sm); letter-spacing: 0.06em;
  word-break: break-all; user-select: all;
}
.btn-sm { min-height: 34px; padding: 0 var(--s3); font-size: var(--t-xs); }

.codes { display: grid; gap: var(--s3); margin: var(--s3) 0; }
.codes-grid {
  list-style: none; margin: 0; padding: var(--s4);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s5);
  border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface-2);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--t-base); letter-spacing: 0.04em;
  user-select: all;
}
.invite-input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.25rem !important;
  letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
}
.readonly-input { background: var(--surface-sunk) !important; color: var(--ink-2); }
.auth-divider {
  display: flex; align-items: center; gap: var(--s3); margin: var(--s5) 0 var(--s2);
  font-size: var(--t-xs); color: var(--ink-3); font-weight: 600;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-step > .inline-note { margin-top: var(--s1); }
.rules { list-style: none; margin: -4px 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--t-sm); color: var(--ink-3); }
.rules li { display: flex; align-items: center; gap: var(--s2); transition: color 0.2s var(--ease); }
.rules .icon { width: 16px; height: 16px; padding: 2px; border-radius: 50%; border: 1.5px solid var(--line-2); stroke-width: 2.6; color: transparent; transition: all 0.2s var(--ease); }
.rules li.is-met { color: var(--ok-ink); }
.rules li.is-met .icon { background: var(--ok-ink); border-color: var(--ok-ink); color: #fff; }
.remember { display: grid; gap: 2px; }
.remember .check { margin: 0; }
.remember .muted { padding-left: 32px; }
.check { display: flex; align-items: center; gap: var(--s3); margin: var(--s2) 0 var(--s3); font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.check-input { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }

.user-link { display: flex; align-items: center; gap: var(--s3); flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.user-link:hover { text-decoration: none; }
.user-link:hover .user-name { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- point-of-need suggestions ---------- */

.msg-suggest { max-width: 92%; }
.msg-avatar-ghost { background: transparent; }
.suggest {
  display: grid; gap: var(--s3); flex: 1;
  padding: var(--s4);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.suggest-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--gold) 60%, var(--ink));
}
.suggest-eyebrow .icon { width: 15px; height: 15px; }
.suggest-lead { font-size: var(--t-sm); color: var(--ink-2); margin-top: -4px; }
.suggest-card {
  display: grid; gap: var(--s2);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.suggest-head { display: flex; align-items: center; gap: var(--s3); }
.suggest-head .monogram { width: 2.375rem; height: 2.375rem; border-radius: 12px; font-size: 0.8125rem; }
.suggest-titles h4 { margin: 0; font-size: var(--t-md); }
.suggest-cap { font-size: var(--t-sm); color: var(--pc-text); font-weight: 600; }
.suggest-text { font-size: var(--t-sm); color: var(--ink-2); }
.suggest-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s1); }
.suggest-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; }
.suggest-note { font-size: 0.6875rem; color: var(--ink-3); }

.interest { display: inline-flex; align-items: center; gap: var(--s2); }
.interest-status { font-size: var(--t-xs); color: var(--ink-3); }
.interest-status:empty { display: none; }
.btn-interest {
  min-height: 38px; padding: 0 var(--s4);
  border-color: color-mix(in srgb, var(--gold) 60%, var(--line-2));
  background: color-mix(in srgb, var(--gold) 10%, var(--surface));
  color: color-mix(in srgb, var(--gold) 60%, var(--ink));
}
.btn-interest:hover { border-color: var(--gold); }
.btn-interest.is-done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); cursor: default; }
.btn-interest.is-done + .interest-status { display: none; }

.cap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--t-sm); }
.cap-list li { display: flex; gap: var(--s2); align-items: flex-start; }
.cap-list .icon { margin-top: 3px; width: 14px; height: 14px; stroke-width: 2.4; color: var(--pc); }
.card-discover .interest { margin-top: var(--s1); }
.card-discover.is-focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 45%, transparent), var(--shadow-3); outline: none; }

/* ---------- account ---------- */

.acct-grid { display: grid; gap: var(--s5); }
.acct-profile { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; padding: var(--s6); }
.acct-name { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.acct-bank { font-size: var(--t-sm); font-weight: 600; color: var(--link); }
.acct-meta { margin: 0 0 0 auto; display: flex; gap: var(--s6); flex-wrap: wrap; }
.acct-meta dt { font-size: var(--t-xs); color: var(--ink-3); }
.acct-meta dd { margin: 2px 0 0; font-weight: 600; font-size: var(--t-sm); }
.acct-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--s5); align-items: start; }
.acct-card { display: grid; gap: var(--s3); align-content: start; }
.acct-card h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.acct-facts { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* ---------- first-time guide ---------- */

.help-btn { position: relative; }
.help-dot {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 2px var(--surface);
}
.help-menu { width: min(300px, calc(100vw - 32px)); }
.help-menu .switch-item { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; }
.new-pill {
  margin-left: auto; padding: 2px 8px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--gold) 18%, var(--surface)); color: color-mix(in srgb, var(--gold) 60%, var(--ink));
  font-size: 0.6875rem; font-weight: 700;
}

.tour { position: fixed; inset: 0; z-index: 90; }
.tour-spot {
  position: fixed; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(7, 22, 51, 0.62), 0 0 0 3px var(--sky);
  transition: top 0.3s var(--ease), left 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease);
}
.tour-spot.is-off { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; }
.tour-still .tour-spot, .tour-still .tour-card { transition: none; }
.tour-card {
  position: fixed; width: min(360px, calc(100vw - 24px));
  display: grid; gap: var(--s2);
  padding: var(--s5); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3);
  border: 1px solid var(--line);
  transition: top 0.3s var(--ease), left 0.3s var(--ease);
  animation: pop 0.25s var(--ease);
}
.tour-card-center {
  top: 50% !important; left: 50% !important; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 24px)); padding: var(--s6);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(14, 106, 221, 0.4), transparent 65%),
    var(--navy);
  color: #fff; border-color: rgba(255, 255, 255, 0.1);
}
.tour-card-center .tour-title { font-size: var(--t-3xl); }
.tour-card-center .tour-text { color: rgba(255, 255, 255, 0.78); }
.tour-card-center .tour-count, .tour-card-center .tour-skip { color: var(--sky); }
.tour-card-center .tour-dots i { background: rgba(255, 255, 255, 0.25); }
.tour-card-center .tour-dots i.is-on { background: var(--sky); }
.tour-card-sheet { top: auto !important; left: 12px !important; right: 12px; bottom: 12px; width: auto; }
.tour-top { display: flex; align-items: center; justify-content: space-between; }
.tour-count { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--link); }
.tour-skip { font-size: var(--t-xs); color: var(--ink-3); }
.tour-title { font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); letter-spacing: -0.01em; }
.tour-text { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: width 0.2s var(--ease); }
.tour-dots i.is-on { width: 18px; border-radius: 3px; background: var(--blue); }
.tour-buttons { display: flex; gap: var(--s2); }
.tour-open { overflow: hidden; }

.checklist {
  margin-top: var(--s5); padding: var(--s5) var(--s6);
  background: var(--surface);
}
/* AMLtrac's checklist on its Guides page: clear of the sticky header when the ? menu scrolls to it */
.product-checklist { scroll-margin-top: 96px; }
.checklist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); }
.checklist-head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--t-2xl); }
.checklist-head .eyebrow { margin-bottom: var(--s1); }
.checklist-bar { height: 6px; margin: var(--s4) 0; border-radius: 3px; background: var(--surface-sunk); overflow: hidden; }
.checklist-fill { display: block; height: 100%; border-radius: 3px; background: var(--blue); transition: width 0.5s var(--ease); }
.checklist-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s2); }
.checklist-row {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
  text-decoration: none; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.checklist-row:hover, button.checklist-row:hover { text-decoration: none; border-color: var(--blue); }
.checklist-tick {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line-2); color: transparent;
}
.checklist-tick .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.checklist-text { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.checklist-label { font-weight: 600; font-size: var(--t-sm); }
.checklist-hint { font-size: var(--t-xs); color: var(--ink-3); }
.checklist-go { color: var(--blue); }
.checklist-items li.is-done .checklist-row { cursor: default; background: var(--surface-2); }
.checklist-items li.is-done .checklist-tick { background: var(--ok-ink); border-color: var(--ok-ink); color: #fff; }
.checklist-items li.is-done .checklist-label { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }

.whats-new-scrim { position: fixed; inset: 0; z-index: 85; background: rgba(7, 22, 51, 0.45); backdrop-filter: blur(2px); }
.whats-new {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 86; width: min(440px, 100vw);
  display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-3);
  animation: slide-in 0.3s var(--ease);
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.whats-new-head { display: flex; align-items: flex-start; justify-content: space-between; padding: var(--s6) var(--s5) var(--s4); border-bottom: 1px solid var(--line); }
.whats-new-head h2 { font-family: var(--serif); font-weight: 400; font-size: var(--t-3xl); }
.whats-new-head .eyebrow { margin-bottom: var(--s1); }
.whats-new-list { list-style: none; margin: 0; padding: var(--s5); overflow-y: auto; display: grid; gap: var(--s5); align-content: start; }
.whats-new-list li { position: relative; padding-left: var(--s5); border-left: 1px solid var(--line); }
.whats-new-list li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); box-shadow: 0 0 0 3px var(--surface); }
.whats-new-list li.is-new::before { background: var(--gold); }
.whats-new-list time { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }
.whats-new-list h3 { margin: 4px 0 6px; font-size: var(--t-md); }
.whats-new-list p { font-size: var(--t-sm); color: var(--ink-2); }

/* ---------- administration ---------- */

.admin { display: grid; gap: 0; }
.admin-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px);
  padding: var(--s3) var(--s5); border-radius: var(--r-pill);
  background: var(--navy); color: #fff; font-size: var(--t-sm); font-weight: 500;
  box-shadow: var(--shadow-3); opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.admin-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.admin-toast.is-bad { background: #8a1c12; }
.invite-slot:empty { display: none; }
.invite-slot { margin-top: var(--s5); scroll-margin-top: calc(var(--topbar) + var(--s4)); }
.invite-panel {
  display: grid; gap: var(--s2); justify-items: start;
  padding: var(--s5); border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.invite-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.75rem; font-weight: 600;
  letter-spacing: 0.12em; color: var(--ink); user-select: all;
}
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.25rem), 1fr)); gap: var(--s4); margin: var(--s5) 0 0; }
.admin-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--s3);
  padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1);
}
.admin-tile-icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); align-self: center; }
.admin-tile dt { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }
.admin-tile dd { margin: 0; font-family: var(--serif); font-size: 2rem; font-weight: 300; line-height: 1.1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.admin-table th, .admin-table td { padding: var(--s3) var(--s4); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.admin-table thead th { font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; background: var(--surface-2); white-space: nowrap; }
.admin-table tbody tr:last-child > * { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-table tr.is-protected { background: color-mix(in srgb, var(--blue) 4%, var(--surface)); }
.admin-table th[scope="row"] { font-weight: 400; }
.th-product { display: inline-flex; align-items: center; gap: var(--s2); text-transform: none; letter-spacing: 0; font-size: var(--t-sm); color: var(--ink); }
.cell-strong { display: block; font-weight: 600; color: var(--ink); }
.cell-sub { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.person { display: flex; align-items: center; gap: var(--s3); }
.admin-people td .badge { margin-top: 4px; }
.licence-select {
  min-height: 34px; padding: 0 var(--s3); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600;
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer;
}
.licence-select.is-yes { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.licence-select.is-no { background: var(--discover-bg); color: var(--discover-ink); border-color: var(--discover-line); }
.licence-select.is-unset { background: var(--unknown-bg); color: var(--unknown-ink); border-color: var(--unknown-line); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1px dashed var(--line-2); background: transparent; color: var(--ink-3); font-size: var(--t-xs); font-weight: 600; cursor: pointer;
}
.chip:hover { border-color: var(--pc); color: var(--ink); }
.chip.is-on { border-style: solid; border-color: transparent; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: var(--pc-text); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-danger-quiet { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); min-height: 34px; padding: 0 var(--s3); font-size: var(--t-xs); }
.btn-danger-quiet.is-armed { background: var(--danger-solid); color: #fff; border-color: var(--danger-solid); }
.admin-card { display: grid; gap: var(--s3); }
.admin-card h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); }
.admin-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: var(--s3); align-items: end; }
.admin-add { display: grid; gap: var(--s4); justify-items: start; }
.admin-add .admin-inline { width: 100%; }
.admin-products { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.admin-products legend { font-size: var(--t-sm); font-weight: 600; margin-bottom: var(--s2); }
.check-chip { margin: 0; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .split { grid-template-columns: 1fr; }
  .split-side { position: static; margin-top: var(--s6); }
}

@media (max-width: 1023px) {
  .drawer-only { display: inline-grid; }
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform 0.3s var(--ease), visibility 0s linear 0.3s; box-shadow: none; }
  .drawer-open .sidebar { transform: none; visibility: visible; transition: transform 0.3s var(--ease); box-shadow: var(--shadow-3); }
  .workspace { margin-left: 0; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: 380px; }
  .auth-points { display: none; }
  .auth-card > .wordmark { display: none; }
  .acct-meta { margin-left: 0; }
  .escalation { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .switch-label, .kbd { display: none; }
  .crumb-list li:not(:last-child) { display: none; }
  .auth-brand { min-height: 300px; }
  .auth-panel { padding: 24px 16px 40px; }
  .hero { border-radius: var(--r-lg); }
  .product-go { margin-left: 0; }
  .tabs a { flex: 0 0 auto; }
  .chat { height: calc(100vh - 200px); min-height: 420px; border-radius: var(--r-lg); }
  .msg { max-width: 94%; }
  .esc-card { padding: var(--s5); }
  .grid, .grid-discover { grid-template-columns: 1fr; }
  .codes-grid { grid-template-columns: 1fr 1fr; gap: var(--s2); padding: var(--s3); font-size: var(--t-sm); }
  .enrol-steps > li { padding-left: 48px; }
}

/* Touch screens: the dense admin controls and sidebar links grow to 44px.
   A mouse keeps the compact sizes. */
@media (pointer: coarse) {
  .nav-link, .nav-link-area, .user-link, .sidebar-head .wordmark { min-height: 44px; }
  .btn-sm, .btn-danger-quiet, .licence-select, .chip, .seat-input { min-height: 44px; }
  .check-chip { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Reduced motion: panels, messages and steps still arrive and confirm, by
   fading rather than moving; nothing slides, bounces or drifts. */
@media (prefers-reduced-motion: reduce) {
  @keyframes pop { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rise { from { opacity: 0; } to { opacity: 1; } }
  @keyframes slide-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
  .skeleton { animation: none; }
  .sidebar, .drawer-open .sidebar { transition: none; }
  .btn:active, .btn:hover .icon, .switch-item:hover .switch-go, .switch-item:focus-visible .switch-go,
  .product-open:hover .product-go, .discover-teaser:hover .teaser-go, .doc-row:hover .doc-go { transform: none; }
  .chat-log { scroll-behavior: auto; }
}

/* ---------- service status ---------- */

.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 10px 0 8px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
}
.status-pill .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.status-normal { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }
.status-degraded { background: var(--unknown-bg); color: var(--unknown-ink); border-color: var(--unknown-line); }
.status-outage { background: var(--outage-bg); color: var(--outage-ink); border-color: var(--outage-line); }
.status-maintenance { background: var(--discover-bg); color: var(--discover-ink); border-color: var(--discover-line); }
.status-not_reported { background: var(--surface-sunk); color: var(--ink-2); border-color: var(--line-2); border-style: dashed; }
.status-unknown { background: var(--locked-bg); color: var(--locked-ink); border-color: var(--locked-line); border-style: dashed; }

.status-card { display: grid; gap: var(--s3); padding: var(--s5); }
.status-summary { font-weight: 600; }
.status-sub { font-size: var(--t-md); margin-top: var(--s2); }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; }
.status-row { display: grid; gap: 4px; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.status-list > .status-row:first-child { border-top: 0; }
.status-row-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); }
.status-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.status-when, .status-meta { color: var(--ink-2); font-size: var(--t-sm); }
.status-note { white-space: pre-line; overflow-wrap: anywhere; font-size: var(--t-sm); }

.status-banner {
  display: flex; align-items: flex-start; gap: var(--s3);
  margin-top: var(--s4); padding: var(--s3) var(--s4);
  border: 1px solid var(--unknown-line); border-radius: var(--r-md);
  background: var(--unknown-bg); color: var(--unknown-ink);
}
.status-banner > .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.status-banner.is-outage { background: var(--outage-bg); color: var(--outage-ink); border-color: var(--outage-line); }
.status-banner.is-maintenance { background: var(--discover-bg); color: var(--discover-ink); border-color: var(--discover-line); }
.status-banner.is-unknown { background: var(--locked-bg); color: var(--locked-ink); border-color: var(--locked-line); }
.status-banner-body { flex: 1; min-width: 0; display: grid; gap: 2px; overflow-wrap: anywhere; white-space: pre-line; }
.status-banner .btn { flex: none; }
.status-banner-slot:empty { display: none; }
.status-banner-title { display: flex; flex-wrap: wrap; gap: 0 4px; }
.status-row.is-scheduled .status-name, .status-row.is-history .status-name { font-weight: 500; }
.status-row.is-history { color: var(--ink-2); }

.answer-incident {
  display: flex; gap: var(--s2); align-items: flex-start;
  margin-top: var(--s3); padding: var(--s2) var(--s3);
  border: 1px solid var(--unknown-line); border-radius: var(--r-sm);
  background: var(--unknown-bg); color: var(--unknown-ink); font-size: var(--t-sm);
}
.answer-incident.is-outage { background: var(--outage-bg); color: var(--outage-ink); border-color: var(--outage-line); }
.answer-incident.is-maintenance { background: var(--discover-bg); color: var(--discover-ink); border-color: var(--discover-line); }
.answer-incident > .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.answer-incident > div { display: grid; gap: 2px; min-width: 0; }
.answer-incident a { color: inherit; font-weight: 600; }

.status-events { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.status-events li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.admin-add > .field { width: 100%; max-width: 40rem; }
.licence-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) 0; border-top: 1px solid var(--line); }
.status-list > .licence-row:first-child { border-top: 0; }
.licence-name { font-weight: 600; }
.licence-stale { color: var(--unknown-ink); }
.tag-placeholder { background: var(--locked-bg); color: var(--locked-ink); border: 1px dashed var(--locked-line); margin: 2px 0; }
.explore-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.explore-tile { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); color: inherit; }
.explore-tile:hover { text-decoration: none; border-color: var(--line-2); }
.explore-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.explore-text span { color: var(--ink-2); font-size: var(--t-sm); }
.explore-assistant { display: grid; gap: var(--s3); padding: var(--s5); }
.explore-about-row { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); }
.explore-about { min-height: 44px; padding: 0 var(--s3); }
.answer-facts { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--t-sm); }
.answer-facts li { display: flex; gap: var(--s2); align-items: flex-start; }
.answer-facts .icon { width: 15px; height: 15px; margin-top: 3px; }
.works-with { font-size: var(--t-sm); padding: var(--s2) var(--s3); border: 1px solid var(--ok-line); background: var(--ok-bg); border-radius: var(--r-sm); }
.suggest-why { font-size: var(--t-xs); color: var(--ink-2); }
.suggest-dismiss-wrap { margin-left: auto; display: inline-flex; gap: var(--s2); align-items: center; }
.suggest-dismiss { font-size: var(--t-sm); }
.suggest-handoff { border-color: var(--ok-line); }
.seat-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); margin-top: var(--s2); }
.seat-label { font-size: var(--t-xs); color: var(--ink-2); }
.seat-input { width: 6.5em; padding: 2px 6px; }
.seat-over { color: var(--outage-ink); font-weight: 600; }
.seat-line.is-over .cell-sub { color: var(--outage-ink); font-weight: 600; }
.admin-add > .field input { width: 100%; }

@media (max-width: 640px) {
  .status-card { padding: var(--s4); }
  .status-banner { flex-wrap: wrap; }
}

/* ---------- dark theme touches ---------- */

@media (prefers-color-scheme: dark) {
  .wordmark { color: var(--ink); }
  .wordmark-light { color: #fff; }
  .product-go { background: #eaf1ff; }
  .notice-warn .notice-icon { background: rgba(0, 0, 0, 0.2); }
  .msg-avatar-user { background: var(--blue); }
}
