/* AuthMantra design system.
   Tokens first, then base, components, and page layouts.
   Light is the default theme. Pages that opt in with <html data-theme="auto">
   follow the OS dark-mode setting. */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/sora-latin.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/dm-sans-latin.woff2") format("woff2");
}

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  /* Brand: a teal spectrum from deep lagoon to bright aqua, with cyan and sky-blue for gradients */
  --teal-50: #EAFDF9;
  --teal-100: #C9F8EF;
  --teal-200: #93F0E0;
  --teal-300: #5EE3D0;
  --teal-400: #2DD4BF;
  --teal-500: #0BB5A8;
  --teal-600: #08968D;
  --teal-700: #087A72;
  --teal-800: #0A5F5A;
  --teal-900: #0B4A47;
  --teal-950: #032A2B;
  --cyan-400: #22D3EE;
  --cyan-600: #0891B2;
  --sky-500: #3B82F6;
  --emerald-400: #34D399;
  --violet-400: #A78BFA;

  --navy: #06363A;               /* "ink" surfaces: deep teal, not black */
  --navy-2: #0A4B4F;
  --turquoise: var(--teal-500);
  --turquoise-strong: var(--teal-600);
  --turquoise-ink: #067068;      /* AA text on white */
  --turquoise-tint: #E3FAF6;
  --indigo: #2F7FE8;             /* sky-blue partner accent */
  --indigo-tint: #E6F1FE;
  --saffron: #F2994A;

  --grad-brand: linear-gradient(120deg, var(--teal-400) 0%, var(--cyan-400) 55%, #60A5FA 100%);
  /* White text stays at 4.5:1 or better across this whole gradient */
  --grad-action: linear-gradient(120deg, #087A72 0%, #0A7C92 50%, #1E62C6 100%);
  --grad-ink: linear-gradient(160deg, #021E20 0%, #04393B 48%, #06304A 100%);
  --grad-soft: linear-gradient(135deg, #EAFDF9 0%, #E6F6FE 100%);
  --glow-teal: 0 10px 30px -10px rgba(11, 181, 168, 0.55);

  /* Surfaces & text */
  --bg: #F3F8F8;
  --surface: #FFFFFF;
  --surface-2: #F0F6F6;
  --surface-3: #E3EEEE;
  --text: #0B2427;
  --text-muted: #4A5F63;
  --text-subtle: #566A6E;  /* 5.3:1 on white */
  --border: #DCE8E8;
  --border-strong: #C3D5D5;

  /* Status */
  --success: #0E8A5F;
  --success-tint: #E6F6EF;
  --danger: #C62D3A;
  --danger-tint: #FDECEE;
  --warning: #A15C07;
  --warning-tint: #FEF4E4;

  /* Actions */
  --primary: var(--turquoise);
  --primary-hover: var(--turquoise-strong);
  --on-primary: var(--navy);
  --link: var(--turquoise-ink);
  --focus-ring: 0 0 0 3px rgba(11, 181, 168, 0.38);

  /* Type */
  --font-head: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape & depth */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 999px;
  --shadow-xs: 0 1px 2px rgba(3, 42, 43, 0.06);
  --shadow-sm: 0 1px 3px rgba(3, 42, 43, 0.07), 0 1px 2px rgba(3, 42, 43, 0.04);
  --shadow-md: 0 8px 20px -6px rgba(3, 42, 43, 0.14), 0 2px 4px rgba(3, 42, 43, 0.05);
  --shadow-lg: 0 24px 48px -14px rgba(3, 42, 43, 0.24), 0 4px 10px rgba(3, 42, 43, 0.05);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 180ms;
  --header-h: 64px;

  /* Aliases for older templates that reference the previous token names */
  --card: var(--surface);
  --card-subtle: var(--surface-2);
  --line: var(--border);
  --line-dark: var(--border-strong);
  --ink: var(--text);
  --muted: var(--text-muted);
  --paper: var(--bg);
  --blue: var(--turquoise-ink);
  --saffron-border: rgba(10, 191, 188, 0.28);
}

/* Dark theme: only for pages that opt in (data-theme="auto" or "dark"). */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #031A1C;
    --surface: #072628;
    --surface-2: #0A3033;
    --surface-3: #0E3B3E;
    --text: #E6F6F4;
    --text-muted: #9FC0BD;
    --text-subtle: #7FA3A0;
    --border: #12403F;
    --border-strong: #1B5452;
    --turquoise-tint: rgba(45, 212, 191, 0.14);
    --indigo-tint: rgba(96, 165, 250, 0.16);
    --link: #5EEAD4;
    --success: #4ED19C;
    --success-tint: rgba(78, 209, 156, 0.12);
    --danger: #FF8A94;
    --danger-tint: rgba(255, 138, 148, 0.12);
    --warning: #F6C26B;
    --warning-tint: rgba(246, 194, 107, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  }
}

/* ── Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 590; margin: 0.5rem 0 1rem; letter-spacing: -0.035em; line-height: 1.06; }
h2 { font-weight: 590; }
h3 { font-weight: 590; }
p { margin: 0 0 0.75rem; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--font-mono); font-size: 0.85em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 0.08em 0.4em; border-radius: var(--radius-xs); word-break: break-word; }
img, svg { display: inline-block; vertical-align: middle; }
::selection { background: rgba(10, 191, 188, 0.28); }

:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; border-radius: var(--radius-xs); }

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.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: 1rem; top: -3rem; z-index: 200;
  background: var(--navy); color: #fff; padding: 0.5rem 0.9rem; border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; text-decoration: none; }
[hidden] { display: none !important; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ── Brand mark ─────────────────────────────────────────────────── */
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-head); font-weight: 590; font-size: 1.12rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .accent { color: var(--turquoise-ink); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark .node { fill: var(--surface); stroke: var(--turquoise); }
.brand-mark .edge { stroke: var(--turquoise); }
.brand-mark .core { fill: var(--turquoise); }
.brand .flag { display: none; }
:root[data-theme="auto"] .brand .accent { color: var(--link); }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: #FFFFFF;
  --btn-border: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 40px; padding: 0.55rem 1.05rem;
  font: 590 0.92rem/1.2 var(--font-body);
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-border); border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; --btn-bg: var(--navy-2); --btn-border: var(--navy-2); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

.btn.primary, .btn.saffron {
  --btn-bg: var(--turquoise); --btn-fg: var(--navy); --btn-border: var(--turquoise);
}
.btn.primary:hover, .btn.saffron:hover { --btn-bg: #18CFCC; --btn-border: #18CFCC; box-shadow: 0 8px 20px -8px rgba(10, 191, 188, 0.7); }
.btn.ghost {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-border: var(--border-strong);
}
.btn.ghost:hover { --btn-bg: var(--surface-2); --btn-border: var(--border-strong); box-shadow: none; }
.btn.subtle { --btn-bg: transparent; --btn-fg: var(--text-muted); --btn-border: transparent; }
.btn.subtle:hover { --btn-bg: var(--surface-2); --btn-fg: var(--text); box-shadow: none; }
.btn.danger { --btn-bg: var(--danger); --btn-border: var(--danger); --btn-fg: #fff; }
.btn.small { min-height: 32px; padding: 0.35rem 0.75rem; font-size: 0.84rem; }
.btn.lg { min-height: 48px; padding: 0.75rem 1.4rem; font-size: 1rem; border-radius: var(--radius-md); }
.btn.block { width: 100%; }
.btn .spinner { display: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
.btn[aria-busy="true"] .btn-arrow { display: none; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .btn:not(.primary):not(.saffron):not(.ghost):not(.subtle):not(.danger) {
    --btn-bg: #E8EEF4; --btn-fg: var(--navy); --btn-border: #E8EEF4;
  }
  :root[data-theme="auto"] .btn:not(.primary):not(.saffron):not(.ghost):not(.subtle):not(.danger):hover {
    --btn-bg: #FFFFFF; --btn-border: #FFFFFF;
  }
}

/* ── Badges & chips ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font: 590 0.74rem/1.2 var(--font-body); letter-spacing: 0.01em;
  padding: 0.22rem 0.55rem; border-radius: var(--radius-full);
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.residency, .badge.active, .badge.kyc { background: var(--turquoise-tint); color: var(--turquoise-ink); border-color: transparent; }
:root[data-theme="auto"] .badge.residency, :root[data-theme="auto"] .badge.active, :root[data-theme="auto"] .badge.kyc { color: var(--link); }
.badge.saml { background: var(--indigo-tint); color: #4350C9; border-color: transparent; }
.badge.oidc { background: var(--turquoise-tint); color: var(--turquoise-ink); border-color: transparent; }
.badge.scim { background: var(--indigo-tint); color: #4350C9; border-color: transparent; }
.badge.suspended { background: var(--danger-tint); color: var(--danger); border-color: transparent; }
.badge.admin { background: var(--surface-2); color: var(--text); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .badge.saml, :root[data-theme="auto"] .badge.scim { color: #AEB6FF; }
  :root[data-theme="auto"] .badge.oidc { color: var(--link); }
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ── Cards, grids, notices ──────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-xs);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.08rem; }

.notice, .alert {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--turquoise-tint); color: var(--text);
  border: 1px solid rgba(10, 191, 188, 0.28); border-radius: var(--radius-md);
  padding: 0.85rem 1rem; margin-bottom: 1.25rem;
}
.notice { display: block; }
.notice h4 { margin: 0 0 0.25rem; font-size: 0.95rem; font-weight: 590; }
.notice p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.notice.india { background: var(--surface-2); border-color: var(--border); }
.alert .icon { margin-top: 2px; }
.alert p { margin: 0; }

.error, .alert.error {
  color: var(--danger); background: var(--danger-tint);
  border: 1px solid rgba(198, 45, 58, 0.25); border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem;
}
.alert.error { display: flex; }
.success, .alert.success {
  color: var(--success); background: var(--success-tint);
  border: 1px solid rgba(14, 138, 95, 0.25); border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem;
}

.code-box {
  background: #0F1724; color: #E2E8F0;
  padding: 1rem 1.2rem; border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.65; overflow-x: auto;
}

/* ── Forms ──────────────────────────────────────────────────────── */
.stack { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
label { display: block; font-size: 0.86rem; font-weight: 590; color: var(--text); margin-bottom: 0.35rem; }
label .hint { font-weight: 400; color: var(--text-muted); }
input, select, textarea {
  width: 100%; min-height: 42px;
  padding: 0.6rem 0.8rem;
  font: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input:hover, select:hover, textarea:hover { border-color: var(--text-subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turquoise); box-shadow: var(--focus-ring); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(198, 45, 58, 0.22); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--turquoise); }
.field { display: grid; gap: 0; }
.field-hint { font-size: 0.82rem; color: var(--text-muted); margin: 0.35rem 0 0; }
.field-error { font-size: 0.82rem; color: var(--danger); margin: 0.35rem 0 0; min-height: 0; }
.field-error:empty { display: none; }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 3rem; }
.input-wrap .input-action {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: var(--radius-xs); color: var(--text-muted); cursor: pointer;
}
.input-wrap .input-action:hover { color: var(--text); background: var(--surface-2); }
.input-wrap .input-action:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.input-action .icon-hide { display: none; }
.input-action[aria-pressed="true"] .icon-show { display: none; }
.input-action[aria-pressed="true"] .icon-hide { display: inline-block; }

input.code-input {
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 590;
  letter-spacing: 0.5em; text-align: center; padding: 0.7rem 0 0.7rem 0.5em; min-height: 58px;
  font-variant-numeric: tabular-nums;
}

/* ── Tables ─────────────────────────────────────────────────────── */
.table-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow-x: auto; box-shadow: var(--shadow-xs);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.8rem 1.05rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: top; }
th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 590; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn {
  padding: 0.65rem 0.9rem; font-weight: 590; font-size: 0.9rem; color: var(--text-muted);
  border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap;
}
.tab-btn.active, .tab-btn:hover { color: var(--text); border-bottom-color: var(--turquoise); text-decoration: none; }

/* ── App header (launchpad, profile, home, admin) ───────────────── */
.app-header, .topbar, .admin-top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: var(--header-h); padding: 0 clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand-wrapper { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a:not(.btn) {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--text-muted); font-weight: 510; font-size: 0.9rem;
  padding: 0.45rem 0.7rem; border-radius: var(--radius-sm); text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav form { display: inline-flex; margin: 0; }
.nav-divider { width: 1px; height: 22px; background: var(--border); margin: 0 0.35rem; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font: 590 0.78rem/1 var(--font-head); color: var(--navy);
  background: linear-gradient(135deg, #7FE3E1, #B9C0FF);
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.user-chip { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.2rem 0.3rem; min-width: 0; }
.user-chip .who { display: grid; line-height: 1.2; min-width: 0; }
.user-chip .who b { font-size: 0.86rem; font-weight: 590; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.user-chip .who span { font-size: 0.76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

.page { max-width: 1180px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1rem, 3vw, 1.75rem) 4rem; }
.page.narrow { max-width: 1000px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.page-header h1, .page-header h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.025em; line-height: 1.15; }
.page-header p { margin: 0.35rem 0 0; color: var(--text-muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 590 0.76rem/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--turquoise-ink);
}
:root[data-theme="auto"] .eyebrow { color: var(--link); }

/* ── Auth (login, set password, sign out) ───────────────────────── */
.auth-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy); color: #E9F1F7;
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
}
.auth-brand .brand { color: #FFFFFF; }
:root .auth-brand .brand .accent, :root[data-theme] .auth-brand .brand .accent { color: var(--turquoise); }
.auth-brand .brand-mark .node { fill: var(--navy); }
.mesh { position: absolute; inset: -20%; z-index: -1; filter: blur(60px); opacity: 0.9; }
.mesh span { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.mesh .m1 { width: 55%; height: 55%; left: 5%; top: 10%; background: radial-gradient(circle, rgba(10, 191, 188, 0.75), transparent 65%); animation: drift1 18s var(--ease) infinite alternate; }
.mesh .m2 { width: 50%; height: 50%; right: 0; top: 30%; background: radial-gradient(circle, rgba(110, 123, 242, 0.7), transparent 65%); animation: drift2 22s var(--ease) infinite alternate; }
.mesh .m3 { width: 45%; height: 45%; left: 25%; bottom: 0; background: radial-gradient(circle, rgba(10, 191, 188, 0.45), transparent 65%); animation: drift3 26s var(--ease) infinite alternate; }
.grid-overlay {
  position: absolute; inset: 0; z-index: -1; opacity: 0.25;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
@keyframes drift1 { to { transform: translate(18%, 12%) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-20%, -10%) scale(0.9); } }
@keyframes drift3 { to { transform: translate(10%, -18%) scale(1.2); } }

.auth-value { max-width: 30rem; }
.auth-value h1 { color: #FFFFFF; font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin: 0 0 1rem; }
.auth-value h1 em { font-style: normal; background: linear-gradient(90deg, #5FE6E3, #B3BBFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-value p { color: #B8C6D6; font-size: 1.02rem; max-width: 26rem; }
.auth-points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.7rem; }
.auth-points li { display: flex; gap: 0.65rem; align-items: center; color: #D5E0EA; font-size: 0.94rem; }
.auth-points .icon { color: var(--turquoise); }
.auth-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.8rem; color: #8FA0B3; }
.auth-foot .pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); color: #D5E0EA; }
.auth-foot .pill .dot { color: var(--turquoise); }

.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(1.25rem, 4vw, 3rem); background: var(--bg); }
.auth-panel { width: 100%; max-width: 420px; }
.auth-panel .mobile-brand { display: none; margin-bottom: 1.75rem; }
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-lg);
}
.auth-split .auth-card { max-width: none; }
.auth-card.wide { max-width: 540px; }
.auth-header { margin-bottom: 1.5rem; }
.auth-header h1, .auth-header h2 { font-size: 1.55rem; margin: 0 0 0.35rem; letter-spacing: -0.025em; line-height: 1.2; }
.auth-header p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.auth-header .badge { margin-bottom: 0.9rem; }
.auth-alt { margin-top: 1.25rem; text-align: center; font-size: 0.88rem; color: var(--text-muted); }
.auth-meta { margin-top: 1.5rem; display: flex; justify-content: center; gap: 1rem; font-size: 0.8rem; color: var(--text-subtle); }

.steps { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.4rem; list-style: none; padding: 0; }
.steps li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 590; color: var(--text-subtle); }
.steps .num {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; border: 1.5px solid var(--border-strong); color: var(--text-muted); background: var(--surface);
}
.steps li[aria-current="step"] { color: var(--text); }
.steps li[aria-current="step"] .num { border-color: var(--turquoise); background: var(--turquoise); color: var(--navy); }
.steps li.done .num { border-color: var(--turquoise); color: var(--turquoise-ink); background: var(--turquoise-tint); }
.steps .bar { flex: 1; height: 2px; max-width: 48px; background: var(--border); border-radius: 2px; position: relative; overflow: hidden; }
.steps .bar.filled::after { content: ""; position: absolute; inset: 0; background: var(--turquoise); animation: fill 600ms var(--ease) both; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.step-enter { animation: stepIn 420ms var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 520ms var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.is-leaving { opacity: 0.55; transition: opacity 220ms var(--ease); }

.method-card {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 0.9rem 1rem; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 1.1rem;
}
.method-card .method-icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--turquoise-tint); color: var(--turquoise-ink);
}
:root[data-theme="auto"] .method-card .method-icon { color: var(--link); }
.method-card h2, .method-card h3 { font-size: 0.95rem; margin: 0 0 0.2rem; }
.method-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.method-card b { color: var(--text); font-family: var(--font-head); letter-spacing: 0.12em; }
.secret-box {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-top: 0.6rem; padding: 0.5rem 0.6rem 0.5rem 0.8rem;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
}
.secret-box code { background: none; border: 0; padding: 0; font-size: 0.86rem; letter-spacing: 0.06em; word-break: break-all; }
.sandbox-note {
  display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.25rem;
  font-size: 0.84rem; color: var(--warning); background: var(--warning-tint);
  border-radius: var(--radius-sm); padding: 0.65rem 0.8rem;
}
.sandbox-note .icon { margin-top: 1px; }

/* Single-card auth pages (no brand panel) */
.auth-shell {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 2rem 1rem; position: relative; overflow: hidden; isolation: isolate;
}
.auth-shell::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(40rem 26rem at 15% 0%, rgba(10, 191, 188, 0.16), transparent 60%),
    radial-gradient(36rem 24rem at 90% 100%, rgba(110, 123, 242, 0.14), transparent 60%);
}
.auth-shell > .brand { margin-bottom: 0.25rem; }

/* ── Home (signed-out landing) ──────────────────────────────────── */
.landing { position: relative; overflow: hidden; isolation: isolate; }
.landing-bg {
  position: absolute; inset: 0 0 auto 0; height: 900px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48rem 30rem at 10% -10%, rgba(10, 191, 188, 0.20), transparent 60%),
    radial-gradient(40rem 28rem at 95% 0%, rgba(110, 123, 242, 0.18), transparent 60%);
}
.landing-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: 0.5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 1.75rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 6vw, 5rem); }
.hero-copy .lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-muted); max-width: 34rem; margin: 0 0 2rem; }
.hero-copy h1 .grad { background: linear-gradient(92deg, var(--turquoise-ink), var(--indigo)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="auto"] .hero-copy h1 .grad { background-image: linear-gradient(92deg, var(--link), #9AA5FF); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero-meta { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; color: var(--text-muted); font-size: 0.86rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-meta .icon { color: var(--turquoise-ink); }
:root[data-theme="auto"] .hero-meta .icon { color: var(--link); }

/* Product mock in the hero */
.mock { position: relative; }
.mock-window {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition: transform 600ms var(--ease);
}
.mock:hover .mock-window { transform: perspective(1400px) rotateY(0) rotateX(0); }
.mock-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); display: block; }
.mock-bar .mock-url { margin-left: 0.6rem; flex: 1; height: 22px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); font-size: 0.7rem; color: var(--text-subtle); display: flex; align-items: center; padding: 0 0.6rem; }
.mock-body { padding: 1.2rem; }
.mock-greet { font: 590 0.95rem/1.3 var(--font-head); margin-bottom: 0.15rem; }
.mock-sub { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem; }
.mock-search { height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; padding: 0 0.6rem; color: var(--text-subtle); font-size: 0.76rem; }
.mock-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mock-tile { border: 1px solid var(--border); border-radius: 12px; padding: 0.7rem; display: grid; gap: 0.45rem; background: var(--surface); }
.mock-tile .mono-sq { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font: 590 0.7rem/1 var(--font-head); color: #fff; }
.mock-tile .ln { height: 7px; border-radius: 4px; background: var(--surface-3); }
.mock-tile .ln.short { width: 60%; }
.mono-a { background: linear-gradient(135deg, #0ABFBC, #0A8F8D); }
.mono-b { background: linear-gradient(135deg, #6E7BF2, #4C58C9); }
.mono-c { background: linear-gradient(135deg, #F2994A, #D9762B); }
.mono-d { background: linear-gradient(135deg, #1A2332, #3A4A64); }
.mono-e { background: linear-gradient(135deg, #2BB673, #178A55); }
.mono-f { background: linear-gradient(135deg, #E25C8A, #B83C69); }
.mock-float {
  position: absolute; left: -1.5rem; bottom: -1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: 0.75rem 0.9rem; display: flex; gap: 0.65rem; align-items: center;
  animation: floaty 6s ease-in-out infinite;
}
.mock-float .method-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--turquoise-tint); color: var(--turquoise-ink); }
.mock-float b { display: block; font-size: 0.82rem; }
.mock-float span { font-size: 0.74rem; color: var(--text-muted); }
.mock-float.two { left: auto; right: -1rem; top: -1.25rem; bottom: auto; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

.section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.5rem 0 0.75rem; letter-spacing: -0.03em; }
.section-head p { color: var(--text-muted); font-size: 1.02rem; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem; transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .f-icon { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; background: var(--turquoise-tint); color: var(--turquoise-ink); }
.feature:nth-child(3n+2) .f-icon { background: var(--indigo-tint); color: #4350C9; }
:root[data-theme="auto"] .feature .f-icon { color: var(--link); }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .feature:nth-child(3n+2) .f-icon { color: #AEB6FF; } }
.feature h3 { font-size: 1.02rem; margin: 0 0 0.4rem; }
.feature p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.feature .f-meta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.checklist { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.75rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--text-muted); }
.checklist li b { color: var(--text); font-weight: 590; }
.checklist .icon { color: var(--turquoise-ink); margin-top: 3px; }
:root[data-theme="auto"] .checklist .icon { color: var(--link); }
.endpoint-list { display: grid; gap: 0.5rem; }
.endpoint {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.endpoint:hover { text-decoration: none; border-color: var(--turquoise); transform: translateX(3px); box-shadow: var(--shadow-sm); }
.endpoint .ep-left { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.endpoint code { background: none; border: 0; padding: 0; color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.endpoint .method { font: 590 0.68rem/1 var(--font-mono); padding: 0.3rem 0.4rem; border-radius: 5px; background: var(--turquoise-tint); color: var(--turquoise-ink); }
:root[data-theme="auto"] .endpoint .method { color: var(--link); }
.endpoint b { font-weight: 590; font-size: 0.92rem; }

.compare { border-radius: var(--radius-lg); }
.compare td:first-child { font-weight: 590; color: var(--text); }
.compare td:last-child { color: var(--text); }
.compare td:nth-child(2) { color: var(--text-muted); }
.compare th:last-child { color: var(--turquoise-ink); }
:root[data-theme="auto"] .compare th:last-child { color: var(--link); }

.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-xl); background: var(--navy); color: #fff;
  padding: clamp(2rem, 5vw, 3.25rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin: 0 0 0.35rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.cta-band p { color: #B8C6D6; margin: 0; }
.cta-band .mesh { opacity: 0.6; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; color: var(--text-muted); font-size: 0.85rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }

.sandbox-card {
  display: flex; gap: 0.9rem; align-items: flex-start;
  background: var(--warning-tint); color: var(--text); border-radius: var(--radius-md);
  padding: 1rem 1.15rem; border: 1px solid rgba(161, 92, 7, 0.2);
}
.sandbox-card .icon { color: var(--warning); margin-top: 2px; }
.sandbox-card p { margin: 0.15rem 0 0; color: var(--text-muted); font-size: 0.9rem; }

/* ── Launchpad ─────────────────────────────────────────────────── */
.greeting { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.75rem; }
.greeting h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0.35rem 0 0.3rem; letter-spacing: -0.03em; }
.greeting p { margin: 0; color: var(--text-muted); }
.org-line { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.86rem; color: var(--text-muted); }
.org-line b { color: var(--text); font-weight: 590; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 1.5rem; }
.search {
  position: relative; flex: 1 1 280px; max-width: 420px;
}
.search .icon { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.search input { padding-left: 2.4rem; padding-right: 2.6rem; min-height: 44px; border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); }
.search kbd {
  position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
  font: 590 0.72rem/1 var(--font-mono); color: var(--text-subtle);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0.2rem 0.4rem; background: var(--surface-2);
}
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 34px; padding: 0.35rem 0.8rem; border-radius: var(--radius-full);
  font: 510 0.85rem/1.2 var(--font-body); color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip .count { font-size: 0.74rem; opacity: 0.7; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .chip[aria-pressed="true"] { background: var(--turquoise); color: var(--navy); border-color: var(--turquoise); }
}

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin: 2rem 0 0.9rem; }
.section-title h2 { font-size: 1rem; font-weight: 590; margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; letter-spacing: -0.01em; }
.section-title .count { font: 510 0.78rem/1 var(--font-body); color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 0.2rem 0.5rem; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; }
.tile-grid.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tile {
  --tile-accent: var(--turquoise);
  position: relative; display: flex; flex-direction: column; gap: 0.85rem;
  padding: 1.05rem; min-height: 148px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow-xs);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  animation: fadeUp 420ms var(--ease) both;
}
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tile-accent) 45%, var(--border)); }
.tile:focus-visible { outline: none; box-shadow: var(--focus-ring), var(--shadow-md); transform: translateY(-2px); }
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(18rem 8rem at 0% 0%, color-mix(in srgb, var(--tile-accent) 14%, transparent), transparent 70%);
  transition: opacity 220ms var(--ease);
}
.tile:hover::after { opacity: 1; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.monogram {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font: 590 0.95rem/1 var(--font-head); letter-spacing: -0.01em; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tile-accent) 88%, #fff), color-mix(in srgb, var(--tile-accent) 80%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 10px -4px color-mix(in srgb, var(--tile-accent) 70%, transparent);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.tile .launch-hint { color: var(--text-subtle); opacity: 0; transform: translate(-4px, 4px); transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.tile:hover .launch-hint, .tile:focus-visible .launch-hint { opacity: 1; transform: none; color: var(--text-muted); }
.tile-name { font: 590 0.98rem/1.3 var(--font-head); letter-spacing: -0.015em; margin: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-desc { font-size: 0.8rem; color: var(--text-muted); margin: 0.2rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-foot { margin-top: auto; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tile-foot .badge { font-size: 0.7rem; padding: 0.15rem 0.45rem; }
.tile.compact { min-height: 0; flex-direction: row; align-items: center; padding: 0.75rem 0.85rem; gap: 0.75rem; }
.tile.compact .monogram { width: 36px; height: 36px; border-radius: 10px; font-size: 0.8rem; }
.tile.compact .tile-name { font-size: 0.9rem; -webkit-line-clamp: 1; }

.empty {
  text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-xl); background: var(--surface);
}
.empty-art { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--turquoise-tint); color: var(--turquoise-ink); }
:root[data-theme="auto"] .empty-art { color: var(--link); }
.empty h2, .empty h3 { font-size: 1.1rem; margin: 0 0 0.35rem; }
.empty p { color: var(--text-muted); margin: 0 auto; max-width: 28rem; }

.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; }
.info-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; margin-top: 2.5rem; }
.info-strip .side-card { display: flex; gap: 0.8rem; align-items: flex-start; }
.info-strip .side-card .method-icon { width: 36px; height: 36px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-muted); }
.info-strip h3 { font-size: 0.92rem; margin: 0 0 0.2rem; }
.info-strip p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.info-strip a { font-size: 0.85rem; font-weight: 590; }

/* ── Profile ───────────────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.2rem 1.35rem 0; }
.panel-head h2 { font-size: 1.02rem; margin: 0; }
.panel-head p { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.88rem; }
.panel-body { padding: 1.1rem 1.35rem 1.35rem; }
.panel + .panel, .profile-grid + .panel { margin-top: 1.25rem; }
dl.facts { margin: 0; display: grid; grid-template-columns: minmax(120px, 38%) 1fr; }
dl.facts dt, dl.facts dd { padding: 0.6rem 0; border-bottom: 1px solid var(--border); margin: 0; font-size: 0.9rem; }
dl.facts dt { color: var(--text-muted); }
dl.facts dd { font-weight: 510; min-width: 0; overflow-wrap: anywhere; }
dl.facts dt:last-of-type, dl.facts dd:last-of-type { border-bottom: 0; }
.status-row { display: flex; align-items: center; gap: 0.5rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.inset { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.inset p { margin: 0.25rem 0; font-size: 0.9rem; }
.request-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.request-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.88rem; }
.request-list .req-main { min-width: 0; }
.request-list .req-main b { display: block; font-weight: 590; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-list .req-main span { color: var(--text-muted); font-size: 0.8rem; }

/* ── Admin console ─────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.side {
  position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); overflow-y: auto;
  border-right: 1px solid var(--border); background: var(--surface); padding: 1.1rem 0.75rem 2rem;
}
.side-header { padding: 0.25rem 0.6rem 1rem; margin-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.side-header .org-title { font: 590 0.95rem/1.3 var(--font-head); margin: 0 0 0.15rem; color: var(--text); }
.side-label { padding: 0.9rem 0.65rem 0.35rem; font-size: 0.7rem; font-weight: 590; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-subtle); }
.side a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.65rem; margin-bottom: 2px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.9rem; font-weight: 510; text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.side a:hover { background: var(--surface-2); color: var(--text); }
.side a.active { background: var(--turquoise-tint); color: var(--text); font-weight: 590; }
.side a.active .icon { color: var(--turquoise-ink); }
.side a .ext { margin-left: auto; opacity: 0.6; }
.main { padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2.5rem) 3rem; max-width: 1300px; min-width: 0; }
.layout .main > .page-header h2 { font-size: 1.6rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.15rem 1.25rem; box-shadow: var(--shadow-xs); }
.stat .label { font-size: 0.76rem; font-weight: 590; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.stat b { display: block; font: 590 1.9rem/1.2 var(--font-head); letter-spacing: -0.03em; margin-top: 0.25rem; color: var(--text); }

/* Catalog and admin app cards (legacy tile markup) */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.app-tile {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow-xs);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.app-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.app-tile-top { display: flex; align-items: flex-start; gap: 0.9rem; margin-bottom: 0.9rem; }
.app-icon {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font: 590 0.95rem/1 var(--font-head); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.app-meta h4 { margin: 0 0 0.15rem; font-size: 1rem; }
.app-meta p { margin: 0; font-size: 0.84rem; color: var(--text-muted); }
.app-tile-bottom { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; border-top: 1px solid var(--border); padding-top: 0.85rem; margin-top: 0.5rem; }

/* Legacy marketing helpers still used by a few pages */
.hero { max-width: 1040px; margin: 3.5rem auto 2rem; padding: 0 1.5rem; text-align: center; }
.lede { font-size: 1.15rem; color: var(--text-muted); }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-md { display: none !important; }
}
@media (max-width: 960px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); } /* not 1fr: that column may never be narrower than its content, which overflowed 320px screens */
  .auth-brand { display: none; }
  .auth-panel .mobile-brand { display: flex; justify-content: center; }
  .auth-main { min-height: 100vh; align-items: flex-start; padding-top: clamp(2rem, 8vh, 4rem); background:
    radial-gradient(30rem 20rem at 0% 0%, rgba(10, 191, 188, 0.14), transparent 60%),
    radial-gradient(30rem 20rem at 100% 100%, rgba(110, 123, 242, 0.12), transparent 60%), var(--bg); }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .mock { max-width: 520px; margin: 0 auto; width: 100%; }
  .mock-window { transform: none; }
  .layout { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto; display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.6rem 0.75rem;
    border-right: 0; border-bottom: 1px solid var(--border); scrollbar-width: thin;
  }
  .side-header, .side-label { display: none; }
  .side a { white-space: nowrap; margin: 0; flex: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-grid, .two-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .feature-grid { grid-template-columns: 1fr; }
  .nav .hide-xs, .hide-xs { display: none !important; }
  .user-chip .who { display: none; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .tile { min-height: 132px; padding: 0.9rem; }
  .tile-desc { display: none; }
  .search { max-width: none; flex-basis: 100%; }
  .search kbd { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .chip { flex: none; }
  .mock-float { display: none; }
  .actions .btn { flex: 1 1 auto; }
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; font-size: 0.8rem; }
  .page-header { align-items: flex-start; }
}
@media (max-width: 380px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .monogram { width: 40px; height: 40px; font-size: 0.85rem; }
  .app-header, .topbar, .admin-top { padding: 0 0.75rem; gap: 0.5rem; }
  .brand { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .mesh span { animation: none !important; }
  .mock-window { transform: none !important; }
}

/* ── Small additions ───────────────────────────────────────────── */
.split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0.5rem 0 0.75rem; letter-spacing: -0.03em; }
.split .actions { margin-top: 1.5rem; }
label.consent { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; font-size: 0.84rem; font-weight: 400; color: var(--text-muted); }
label.consent input { margin-top: 0.2rem; }
label.consent b { color: var(--text); }
.auth-shell .auth-card > .empty-art { margin: 0 0 1.25rem; }
.inset h3 { margin: 0 0 0.35rem; }
.request-list + p, .panel-body > p:last-child { margin-bottom: 0; }
.app-group + .app-group .section-title { margin-top: 2.25rem; }
#appsContainer > .app-group:first-child .section-title { margin-top: 0.5rem; }

/* Narrow screens: keep everything inside the viewport */
.chips { min-width: 0; }
.toolbar > * { min-width: 0; }
@media (max-width: 640px) {
  .chips { flex: 1 1 100%; }
  .label-xs { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav { gap: 0.15rem; }
  .nav a:not(.btn) { padding: 0.45rem 0.55rem; }
  .info-strip { grid-template-columns: 1fr; }
}

/* Label with a trailing link (e.g. "Forgot password?") */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.small-link { font-size: 0.85rem; font-weight: 510; color: var(--accent-text, #067a78); text-decoration: none; }
.small-link:hover, .small-link:focus-visible { text-decoration: underline; }
.debug-links { word-break: break-all; font-size: 0.82rem; }

/* Authenticator QR code */
.totp-qr { display: block; width: 200px; height: 200px; margin: 0.75rem 0; padding: 8px; background: #fff;
  border: 1px solid var(--line, #e5e7eb); border-radius: 12px; }
.badge.link { background: var(--accent-soft, #e6f8f8); color: var(--accent-text, #067a78); }

/* ═══════════════════════════════════════════════════════════════════
   Aurora layer: vibrant teal gradients, the admin shell and the
   interactive pieces (command palette, toasts, step-up, live feed).
   ═══════════════════════════════════════════════════════════════════ */

body {
  background:
    radial-gradient(70rem 32rem at 100% -12rem, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(60rem 30rem at -10% -8rem, rgba(11, 181, 168, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
::selection { background: rgba(45, 212, 191, 0.32); }
:focus-visible { outline-color: var(--teal-500); }

/* Brand mark picks up the gradient */
.brand-mark .node { stroke: var(--teal-500); }
.brand-mark .edge { stroke: var(--teal-500); }
.brand-mark .core { fill: var(--teal-400); }
.brand .accent {
  background: var(--grad-action); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn { border-radius: 10px; }
.btn.primary, .btn.saffron {
  --btn-fg: #FFFFFF; --btn-border: transparent;
  background: var(--grad-action); background-size: 180% 100%; background-position: 0% 50%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 6px 16px -8px rgba(8, 122, 114, 0.7);
  transition: background-position 420ms var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn.primary:hover, .btn.saffron:hover {
  background-position: 100% 50%; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, var(--glow-teal);
  transform: translateY(-1px);
}
.btn.primary:active, .btn.saffron:active { transform: translateY(0); }
.btn.ghost:hover { --btn-border: var(--teal-300); --btn-fg: var(--turquoise-ink); }
.btn.glass {
  --btn-bg: rgba(255, 255, 255, 0.10); --btn-fg: #FFFFFF; --btn-border: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn.glass:hover { --btn-bg: rgba(255, 255, 255, 0.18); --btn-border: rgba(255, 255, 255, 0.36); box-shadow: none; }
.btn.danger-ghost { --btn-bg: transparent; --btn-fg: var(--danger); --btn-border: rgba(198, 45, 58, 0.3); }
.btn.danger-ghost:hover { --btn-bg: var(--danger-tint); --btn-border: var(--danger); box-shadow: none; }
.btn.passkey {
  --btn-fg: var(--text);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-brand) border-box;
  border: 1.5px solid transparent;
}
.btn.passkey:hover { box-shadow: var(--glow-teal); --btn-fg: var(--turquoise-ink); }
.btn.passkey .icon { color: var(--teal-600); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .btn.passkey:hover { --btn-fg: var(--teal-200); }
}

/* ── Badges ──────────────────────────────────────────────────────── */
.badge { border-radius: 999px; }
.badge.active, .badge.kyc, .badge.residency, .badge.oidc { background: var(--teal-50); color: var(--turquoise-ink); border-color: rgba(11, 181, 168, 0.22); }
.badge.saml, .badge.scim { background: var(--indigo-tint); color: #1F5FBF; border-color: rgba(47, 127, 232, 0.2); }
.badge.warn { background: var(--warning-tint); color: var(--warning); border-color: rgba(161, 92, 7, 0.2); }
.badge.pill-grad { background: var(--grad-brand); color: #04302E; border: 0; }
.badge .dot { width: 6px; height: 6px; }
.badge.live { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.25); }
.badge.live .dot { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); } 80%, 100% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } }

/* ── Cards, tables, notices ──────────────────────────────────────── */
.card, .panel, .table-container, .stat, .app-tile, .side-card {
  border-color: var(--border); box-shadow: 0 1px 2px rgba(3, 42, 43, 0.05), 0 8px 24px -18px rgba(3, 42, 43, 0.25);
}
.card { border-radius: 18px; }
.panel { border-radius: 18px; }
.panel-feature { position: relative; overflow: hidden; }
.panel-feature::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-brand);
}
.panel-head h2 { display: flex; align-items: center; gap: 0.45rem; }
th { background: linear-gradient(180deg, #F3FAF9, #EDF6F6); color: #3E5A5D; }
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover td { background: #F2FBFA; }
.notice, .alert { border-radius: 14px; }
.notice { background: var(--grad-soft); border-color: rgba(11, 181, 168, 0.25); }

/* ── Admin shell ─────────────────────────────────────────────────── */
.admin-top {
  background: color-mix(in srgb, #FFFFFF 78%, transparent);
  border-bottom: 1px solid rgba(11, 181, 168, 0.16);
}
.admin-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.7), rgba(34, 211, 238, 0.6), transparent);
}
.cmdk-trigger {
  display: inline-flex; align-items: center; gap: 0.55rem; min-width: min(340px, 34vw); height: 38px;
  padding: 0 0.6rem 0 0.75rem; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-subtle);
  font: 510 0.88rem/1 var(--font-body); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.admin-top .cmdk-trigger { flex: 0 1 380px; min-width: 0; margin: 0 auto; }
.admin-top .nav a, .admin-top .nav .btn { white-space: nowrap; }
@media (max-width: 1240px) { .admin-top .residency { display: none; } }
.cmdk-trigger:hover { border-color: var(--teal-300); box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12); color: var(--text-muted); }
.cmdk-trigger kbd {
  margin-left: auto; font: 590 0.72rem/1 var(--font-mono); color: var(--text-subtle);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0.2rem 0.4rem; background: var(--surface);
}

.layout { grid-template-columns: 264px minmax(0, 1fr); }
.side {
  background: var(--grad-ink); border-right: 0; color: #A7D3CF;
  padding: 1rem 0.75rem 2rem; isolation: isolate;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.side::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(18rem 14rem at 0% 0%, rgba(45, 212, 191, 0.22), transparent 70%),
    radial-gradient(16rem 16rem at 100% 100%, rgba(59, 130, 246, 0.18), transparent 70%);
}
.side-header { border-bottom-color: rgba(255, 255, 255, 0.08); }
.side-header .org-title { color: #FFFFFF; }
.side-header .small, .side-header .muted { color: #7FB5B0; }
.side-org { display: flex; align-items: center; gap: 0.65rem; }
.org-mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font: 590 0.82rem/1 var(--font-head); color: #04302E; background: var(--grad-brand);
  box-shadow: 0 6px 16px -6px rgba(45, 212, 191, 0.7);
}
.side-label { color: #5FA29C; letter-spacing: 0.1em; }
.side a { color: #B5DCD8; position: relative; border-radius: 10px; }
.side a .icon { color: #6FCFC4; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.side a:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.side a:hover .icon { color: var(--teal-300); transform: translateX(1px); }
.side a.active {
  color: #FFFFFF; font-weight: 590;
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.26), rgba(34, 211, 238, 0.10) 70%, transparent);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.18);
}
.side a.active::before {
  content: ""; position: absolute; left: -0.75rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--teal-300), var(--cyan-400));
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
}
.side a.active .icon { color: var(--teal-300); }
.side .side-new { margin-left: auto; font-size: 0.64rem; font-weight: 590; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.12rem 0.4rem; border-radius: 999px; color: #04302E; background: var(--grad-brand); }
.side-foot {
  margin: 1.5rem 0.35rem 0; padding: 0.9rem; border-radius: 14px; font-size: 0.8rem; color: #A7D3CF;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08);
}
.side-foot b { color: #FFFFFF; display: block; margin-bottom: 0.2rem; font-size: 0.84rem; }
.main { animation: fadeUp 360ms var(--ease) both; }
.page-header .eyebrow { margin-bottom: 0.35rem; }
.page-header h2 { letter-spacing: -0.03em; }

/* ── Dashboard hero, KPIs, posture and trend ─────────────────────── */
.hero-band {
  position: relative; overflow: hidden; isolation: isolate; color: #E6FFFB;
  border-radius: 22px; padding: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1.5rem;
  background: var(--grad-ink); box-shadow: 0 30px 60px -30px rgba(3, 42, 43, 0.65);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center;
}
.hero-band .mesh { opacity: 0.85; }
.hero-band .mesh .m1 { background: radial-gradient(circle, rgba(45, 212, 191, 0.75), transparent 65%); }
.hero-band .mesh .m2 { background: radial-gradient(circle, rgba(59, 130, 246, 0.6), transparent 65%); }
.hero-band .mesh .m3 { background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 65%); }
.hero-band .grid-overlay { opacity: 0.35; }
.hero-band h2 { color: #FFFFFF; margin: 0.35rem 0 0.4rem; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.035em; }
.hero-band p { color: #A8D8D2; margin: 0; max-width: 40rem; }
.hero-band .eyebrow { color: var(--teal-300); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.hero-band .grad-text { background: linear-gradient(90deg, var(--teal-300), var(--cyan-400), #93C5FD); -webkit-background-clip: text; background-clip: text; color: transparent; }

.posture { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem; border-radius: 18px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(8px); }
.ring {
  --p: 0; display: block; width: 108px; height: 108px; border-radius: 50%; flex: none; position: relative;
  background: conic-gradient(from -90deg, var(--teal-300), var(--cyan-400) calc(var(--p) * 0.6%), #60A5FA calc(var(--p) * 1%), rgba(255, 255, 255, 0.10) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px));
  animation: ringIn 900ms var(--ease) both;
}
@keyframes ringIn { from { transform: rotate(-90deg) scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
.ring-wrap { position: relative; display: block; flex: none; width: 108px; height: 108px; }
.posture-copy { display: block; }
.posture:hover { text-decoration: none; background: rgba(255, 255, 255, 0.09); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font: 590 1.9rem/1 var(--font-head); color: #FFFFFF; letter-spacing: -0.04em; }
.ring-label span { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8CCFC7; }
.posture-copy b { display: block; color: #FFFFFF; font-family: var(--font-head); }
.posture-copy span { font-size: 0.84rem; color: #A8D8D2; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi {
  --kpi: var(--grad-brand);
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 1.1rem 1.15rem 1rem; text-decoration: none; color: var(--text);
  box-shadow: 0 1px 2px rgba(3, 42, 43, 0.05), 0 8px 24px -18px rgba(3, 42, 43, 0.3);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
  animation: fadeUp 480ms var(--ease) both;
}
.kpi:nth-child(2) { --kpi: linear-gradient(135deg, #22D3EE, #3B82F6); animation-delay: 60ms; }
.kpi:nth-child(3) { --kpi: linear-gradient(135deg, #34D399, #0BB5A8); animation-delay: 120ms; }
.kpi:nth-child(4) { --kpi: linear-gradient(135deg, #60A5FA, #A78BFA); animation-delay: 180ms; }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: var(--kpi); opacity: 0.10; filter: blur(4px); transition: opacity 220ms var(--ease), transform 400ms var(--ease); }
.kpi:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(11, 181, 168, 0.35); box-shadow: var(--shadow-lg); }
.kpi:hover::after { opacity: 0.2; transform: scale(1.15); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-icon { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: #FFFFFF; background: var(--kpi); box-shadow: 0 8px 18px -8px rgba(8, 122, 114, 0.7); }
.kpi-label { font-size: 0.78rem; font-weight: 590; color: var(--text-muted); letter-spacing: 0.02em; margin-top: 0.9rem; }
.kpi-value { font: 590 2rem/1.1 var(--font-head); letter-spacing: -0.04em; margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 0.8rem; color: var(--text-muted); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 0.5rem 0 0; }
.chart .bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; position: relative; min-width: 0; }
.chart .bar i { display: block; border-radius: 6px 6px 3px 3px; background: var(--grad-brand); height: var(--h); min-height: 3px;
  transform-origin: bottom; animation: grow 700ms var(--ease) both; animation-delay: calc(var(--i) * 35ms); }
.chart .bar i.failed { background: linear-gradient(180deg, #FB7185, #E11D48); border-radius: 3px; min-height: 0; }
.chart .bar:hover i { filter: brightness(1.08) saturate(1.1); }
.chart .bar .tip {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); opacity: 0; pointer-events: none;
  white-space: nowrap; font-size: 0.74rem; padding: 0.3rem 0.5rem; border-radius: 8px; background: var(--navy); color: #fff;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease); z-index: 2;
}
.chart .bar:hover .tip, .chart .bar:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.chart-axis { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-subtle); margin-top: 0.45rem; }
.legend { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--text-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; background: var(--grad-brand); }
.legend i.failed { background: #F43F5E; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.checks a { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.65rem; border-radius: 10px; color: var(--text); font-size: 0.88rem; text-decoration: none; }
.checks a:hover { background: var(--surface-2); text-decoration: none; }
.checks .tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.checks .done .tick { background: var(--grad-brand); color: #04302E; }
.checks .todo .tick { border: 1.5px dashed var(--border-strong); color: var(--text-subtle); }
.checks .todo { color: var(--text-muted); }
.checks .go { margin-left: auto; color: var(--text-subtle); opacity: 0; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.checks a:hover .go { opacity: 1; transform: translateX(2px); }

.section-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 0.9rem; }
.section-row h3 { margin: 0; font-size: 1.05rem; }

/* Event feed rows (dashboard, audit live tail) */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .ev-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-50); color: var(--turquoise-ink); }
.feed .denied .ev-icon, .feed .failure .ev-icon, .feed .error .ev-icon { background: var(--danger-tint); color: var(--danger); }
.feed .warning .ev-icon { background: #FEF3C7; color: #92400E; }
.feed .ev-main { min-width: 0; }
.feed li:not(:has(> .ev-icon)) { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.feed li:not(:has(> .ev-icon)) > .ev-main { flex: 1 1 18rem; }
.feed li:not(:has(> .ev-icon)) > .ev-main b { white-space: normal; display: inline; }
.feed li:not(:has(> .ev-icon)) > form { flex: 0 0 auto; margin: 0; }
.feed .ev-main b { display: block; font-size: 0.88rem; font-weight: 590; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .ev-main span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.feed time { font-size: 0.75rem; color: var(--text-subtle); white-space: nowrap; }
.row-new td, li.row-new { animation: rowIn 1.6s var(--ease) both; }
@keyframes rowIn { 0% { background: rgba(45, 212, 191, 0.28); } 100% { background: transparent; } }

/* App chips on the dashboard */
.app-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }
.app-chip { display: flex; align-items: center; gap: 0.7rem; padding: 0.75rem 0.85rem; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.app-chip:hover { text-decoration: none; border-color: rgba(11, 181, 168, 0.4); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.app-chip .app-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 0.8rem; }
.app-chip b { display: block; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-chip span { font-size: 0.76rem; color: var(--text-muted); }
.app-chip > div { min-width: 0; }

/* ── Integration pages (domains, provisioning, SIEM) ─────────────── */
.integration-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.conn { display: grid; gap: 0.9rem; grid-template-columns: minmax(0, 1fr); }
.conn > * { min-width: 0; }
.conn-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem 1.2rem;
  box-shadow: 0 1px 2px rgba(3, 42, 43, 0.05), 0 8px 24px -18px rgba(3, 42, 43, 0.3); animation: fadeUp 420ms var(--ease) both; }
.conn-card.is-off { opacity: 0.72; }
.conn-head { display: flex; align-items: flex-start; gap: 0.85rem; }
.conn-head .app-icon { width: 42px; height: 42px; }
.conn-head h3 { margin: 0; font-size: 1rem; }
.conn-head p { margin: 0.15rem 0 0; font-size: 0.82rem; color: var(--text-muted); overflow-wrap: anywhere; }
.conn-head .spacer { margin-left: auto; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.conn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 1rem 0 0.9rem; }
.conn-stats div { background: var(--surface-2); border-radius: 12px; padding: 0.6rem 0.75rem; }
.conn-stats b { display: block; font: 590 1.25rem/1.2 var(--font-head); letter-spacing: -0.02em; }
.conn-stats span { font-size: 0.74rem; color: var(--text-muted); }
.conn-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.conn-actions form { margin: 0; }
.conn-error { font-size: 0.82rem; color: var(--danger); background: var(--danger-tint); border-radius: 10px; padding: 0.5rem 0.7rem; margin: 0 0 0.8rem; overflow-wrap: anywhere; }
.dns-box { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.dns-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 0.6rem; align-items: center;
  padding: 0.55rem 0.7rem; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: 0.82rem; }
.dns-row code { background: none; border: 0; padding: 0; overflow-wrap: anywhere; }
.dns-row .rtype { font: 590 0.72rem/1 var(--font-mono); color: var(--turquoise-ink); }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 0.6rem; font-size: 0.88rem; color: var(--text-muted); }
.steps-list li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font: 590 0.76rem/1 var(--font-head); color: #04302E; background: var(--grad-brand); }
.steps-list b { color: var(--text); }
.swatches { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.swatches label { margin: 0; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatches span { display: block; width: 32px; height: 32px; border-radius: 10px; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.swatches input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); transform: scale(1.06); }
.swatches input:focus-visible + span { box-shadow: var(--focus-ring); }
.empty-mini { text-align: center; padding: 2rem 1rem; border: 1.5px dashed var(--border-strong); border-radius: 18px; color: var(--text-muted); background: var(--surface); }
.empty-mini .empty-art { margin-bottom: 0.75rem; background: var(--grad-soft); }
.checkbox-row { display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 510; font-size: 0.86rem; color: var(--text-muted); }
.checkbox-row input { margin-top: 0.2rem; }
.nowrap { white-space: nowrap; }
.center-cell { text-align: center; padding: 2rem; }
button.badge { border: 0; cursor: pointer; font: inherit; font-size: 0.75rem; font-weight: 590; }
button.badge[aria-pressed="false"] { background: var(--surface-2); color: var(--text-muted); }
button.badge[aria-pressed="false"] .dot { animation: none; background: var(--text-subtle); box-shadow: none; }
.code-block { margin: 0.75rem 0 0; padding: 0.9rem 1rem; border-radius: 14px; background: var(--navy); color: #B8F1E8; overflow-x: auto;
  font: 0.76rem/1.6 var(--font-mono); }
.code-block code { background: none; border: 0; padding: 0; color: inherit; }
.mono-chip { font: 590 0.75rem/1 var(--font-mono); padding: 0.25rem 0.45rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); }

/* ── Command palette, dialogs and toasts ─────────────────────────── */
dialog { border: 0; padding: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(2, 24, 26, 0.52); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cmdk[open], .modal[open] { animation: popIn 220ms var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
.cmdk { width: min(640px, 94vw); margin: 12vh auto auto; }
.cmdk-box { background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: 0 40px 80px -24px rgba(2, 24, 26, 0.6), 0 0 0 1px rgba(11, 181, 168, 0.2); }
.cmdk-input { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--border); }
.cmdk-input .icon { color: var(--teal-600); }
.cmdk-input input { border: 0; box-shadow: none; padding: 0; min-height: 34px; font-size: 1.05rem; background: transparent; }
.cmdk-input input:focus { box-shadow: none; }
.cmdk-list { list-style: none; margin: 0; padding: 0.5rem; max-height: min(420px, 56vh); overflow-y: auto; }
.cmdk-group { padding: 0.55rem 0.7rem 0.3rem; font-size: 0.7rem; font-weight: 590; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.cmdk-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.7rem; border-radius: 12px; color: var(--text); text-decoration: none; cursor: pointer; }
.cmdk-item:hover { text-decoration: none; }
.cmdk-item[aria-selected="true"] { background: linear-gradient(90deg, rgba(45, 212, 191, 0.18), rgba(34, 211, 238, 0.08)); box-shadow: inset 0 0 0 1px rgba(11, 181, 168, 0.22); }
.cmdk-item .ci { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--turquoise-ink); flex: none; }
.cmdk-item[aria-selected="true"] .ci { background: var(--grad-brand); color: #04302E; }
.cmdk-item b { font-size: 0.92rem; font-weight: 590; display: block; }
.cmdk-item span { font-size: 0.78rem; color: var(--text-muted); }
.cmdk-item .kind { margin-left: auto; font-size: 0.7rem; color: var(--text-subtle); }
.cmdk-empty { padding: 1.4rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.cmdk-foot { display: flex; gap: 1rem; padding: 0.6rem 1rem; border-top: 1px solid var(--border); font-size: 0.74rem; color: var(--text-subtle); background: var(--surface-2); }
.cmdk-foot kbd { font: 590 0.7rem/1 var(--font-mono); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0.12rem 0.35rem; background: var(--surface); margin-right: 0.25rem; }

.modal { width: min(440px, 94vw); margin: auto; }
.modal-box { position: relative; overflow: hidden; background: var(--surface); border-radius: 22px; padding: 1.6rem;
  box-shadow: 0 40px 80px -24px rgba(2, 24, 26, 0.6); }
.modal-box::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-brand); }
.modal-icon { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-brand); color: #04302E; margin-bottom: 0.9rem; box-shadow: var(--glow-teal); }
.modal-box h2 { font-size: 1.25rem; margin: 0 0 0.3rem; }
.modal-box > p { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 1.1rem; }
.method-list { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.method-btn { display: flex; align-items: center; gap: 0.75rem; width: 100%; text-align: left; padding: 0.75rem 0.85rem; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.method-btn:hover, .method-btn:focus-visible { border-color: var(--teal-400); box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.14); outline: none; transform: translateY(-1px); }
.method-btn .mi { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-50); color: var(--turquoise-ink); flex: none; }
.method-btn b { display: block; font-size: 0.92rem; }
.method-btn span { font-size: 0.78rem; color: var(--text-muted); }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.4rem; }
.modal .field-error { margin-top: 0.5rem; }

.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 400; display: grid; gap: 0.6rem; width: min(380px, calc(100vw - 2.5rem)); }
.toast { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.85rem 1rem; border-radius: 16px; color: #E6FFFB;
  background: linear-gradient(135deg, #04393B, #06304A); box-shadow: 0 24px 48px -16px rgba(2, 24, 26, 0.55), inset 0 0 0 1px rgba(94, 234, 212, 0.2);
  animation: toastIn 360ms var(--ease) both; font-size: 0.9rem; }
.toast .icon { color: var(--teal-300); margin-top: 1px; }
.toast.error { background: linear-gradient(135deg, #4C0519, #3B0A1E); box-shadow: 0 24px 48px -16px rgba(30, 0, 10, 0.55), inset 0 0 0 1px rgba(251, 113, 133, 0.3); }
.toast.error .icon { color: #FDA4AF; }
.toast.leaving { animation: toastOut 260ms var(--ease) both; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: 0.6; cursor: pointer; padding: 0 0.15rem; font-size: 1rem; line-height: 1; }
.toast button:hover { opacity: 1; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* ── Sign-in: aurora panel, discovery chip, passkey ──────────────── */
.auth-brand { background: var(--grad-ink); }
.auth-brand .brand-mark .node { fill: #04393B; }
.mesh .m1 { background: radial-gradient(circle, rgba(45, 212, 191, 0.8), transparent 65%); }
.mesh .m2 { background: radial-gradient(circle, rgba(59, 130, 246, 0.6), transparent 65%); }
.mesh .m3 { background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 65%); }
.auth-value h1 em { background-image: linear-gradient(90deg, var(--teal-300), var(--cyan-400), #93C5FD); }
.auth-value p, .auth-foot { color: #A8D8D2; }
.auth-points li { color: #D2F3EE; }
.auth-points .icon { color: var(--teal-300); }
.auth-stat-row { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }
.auth-stat { padding: 0.75rem 0.9rem; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); min-width: 120px; }
.auth-stat b { display: block; font: 590 1.2rem/1.2 var(--font-head); color: #FFFFFF; }
.auth-stat span { font-size: 0.76rem; color: #8CCFC7; }
.auth-card { position: relative; overflow: hidden; border-radius: 24px; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tenant-grad, var(--grad-brand)); }
.steps li[aria-current="step"] .num { background: var(--grad-brand); border-color: transparent; color: #04302E; }
.steps .bar.filled::after { background: var(--grad-brand); }
.or-divider { display: flex; align-items: center; gap: 0.75rem; color: var(--text-subtle); font-size: 0.78rem; margin: 1.1rem 0; text-transform: uppercase; letter-spacing: 0.08em; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.tenant-chip { display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 0.75rem; border-radius: 14px; margin: -0.25rem 0 1.1rem;
  background: var(--grad-soft); border: 1px solid rgba(11, 181, 168, 0.22); animation: fadeUp 320ms var(--ease) both; }
.tenant-chip .org-mark { width: 32px; height: 32px; font-size: 0.74rem; background: var(--tenant, var(--grad-brand)); color: #FFFFFF; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }
.tenant-chip b { display: block; font-size: 0.9rem; }
.tenant-chip span { font-size: 0.76rem; color: var(--text-muted); }
.tenant-chip.is-known { background: transparent; border: 1px dashed var(--border, #d5e0ea); } /* a known organisation that is not a customer: quieter, never branded */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .tenant-chip { background: rgba(45, 212, 191, 0.08); }
  :root[data-theme="auto"] th { background: var(--surface-2); color: var(--text-muted); }
  :root[data-theme="auto"] tbody tr:hover td { background: var(--surface-2); }
}

/* ── Launchpad greeting band ─────────────────────────────────────── */
.greeting {
  position: relative; overflow: hidden; isolation: isolate; padding: clamp(1.25rem, 3vw, 1.9rem); border-radius: 22px;
  background: var(--grad-ink); color: #E6FFFB; box-shadow: 0 30px 60px -32px rgba(3, 42, 43, 0.6);
}
.greeting::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(26rem 14rem at 0% 0%, rgba(45, 212, 191, 0.38), transparent 70%),
              radial-gradient(22rem 16rem at 100% 100%, rgba(59, 130, 246, 0.32), transparent 70%);
}
.greeting h1 { color: #FFFFFF; }
.greeting p, .greeting .org-line { color: #A8D8D2; }
.greeting .org-line b { color: #FFFFFF; }
.greeting .eyebrow { color: var(--teal-300); }
.greeting .badge { background: rgba(255, 255, 255, 0.08); color: #D2F3EE; border-color: rgba(255, 255, 255, 0.16); }
.tile:hover { border-color: rgba(11, 181, 168, 0.4); }
.chip[aria-pressed="true"] { background: var(--grad-action); border-color: transparent; color: #fff; }

/* ── Responsive for the new pieces ───────────────────────────────── */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .integration-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .side { background: var(--grad-ink); }
  .side a.active::before { display: none; }
  .side-foot { display: none; }
  .hero-band { grid-template-columns: 1fr; }
  .cmdk-trigger { min-width: 0; }
  .cmdk-trigger .label-md { display: none; }
  .dns-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .kpi-value { font-size: 1.6rem; }
  .conn-stats { grid-template-columns: 1fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ring, .kpi, .chart .bar i, .conn-card, .main, .toast { animation: none !important; }
}

/* ── Hero preview carousel: the three dots in the window bar switch slides ─────── */
.mock-dots { display: inline-flex; align-items: center; gap: 0.15rem; }
.mock-dot {
  position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
}
.mock-dot::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong);
  transition: background-color 200ms var(--ease), transform 200ms var(--ease), width 200ms var(--ease);
}
.mock-dot:hover::before { background: var(--turquoise); transform: scale(1.2); }
.mock-dot[aria-selected="true"]::before { background: var(--turquoise); width: 18px; border-radius: 6px; }
.mock-dot:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 1px; }
.mock-bar .mock-url { transition: opacity 160ms var(--ease); }
.mock-slides { position: relative; min-height: 292px; }
.mock-panel[hidden] { display: none; }
.mock-panel.is-active { animation: mockIn 380ms var(--ease) both; }
@keyframes mockIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.mock-float b, .mock-float span { transition: opacity 180ms var(--ease); }
.mock-float.is-swapping b, .mock-float.is-swapping span { opacity: 0; }

.mock-passkey { display: grid; justify-items: center; text-align: center; gap: 0.35rem; padding: 1.4rem 1rem;
  border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); margin-bottom: 0.9rem; }
.mock-passkey b { font: 590 0.9rem/1.3 var(--font-head); }
.mock-passkey > span:last-child { font-size: 0.74rem; color: var(--text-muted); }
.mock-passkey-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--grad-brand, linear-gradient(135deg, #0ABFBC, #6E7BF2)); color: #04302E; }
.mock-passkey-icon .icon { width: 26px; height: 26px; }
.mock-methods { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mock-methods span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.6rem; background: var(--surface); }
.mock-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.mock-feed li { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; align-items: center; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 0.78rem; }
.mock-feed li > span:last-child { grid-column: 2; color: var(--text-muted); font-size: 0.72rem; }
.mock-pill { grid-row: span 2; font: 590 0.66rem/1 var(--font-head); padding: 0.3rem 0.5rem; border-radius: 6px; }
.mock-pill.ok { background: var(--turquoise-tint); color: var(--turquoise-ink); }
.mock-pill.info { background: #E8EAFE; color: #3C48B8; }
.mock-pill.off { background: #FDE8EC; color: #A33556; }
@media (prefers-reduced-motion: reduce) {
  .mock-panel.is-active { animation: none; }
  .mock-dot::before { transition: none; }
}

/* Footer of the sign-in brand panel: the region pill and the product line share one baseline. */
.auth-foot { align-items: center; justify-content: space-between; row-gap: 0.6rem; }
.auth-foot > span:not(.pill) { line-height: 1; letter-spacing: 0.01em; }
.auth-foot .pill { line-height: 1; }

/* Passkey type picker on the profile page */
.choice-label { font-weight: 590; font-size: 0.88rem; margin: 0.9rem 0 0.5rem; }
.passkey-choices { display: grid; gap: 0.6rem; }
.choice {
  display: flex; align-items: center; gap: 0.85rem; width: 100%; text-align: left; cursor: pointer;
  padding: 0.8rem 0.95rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  color: inherit; font: inherit; transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}
.choice:hover { border-color: var(--turquoise); box-shadow: var(--shadow-md, 0 6px 18px rgba(26, 35, 50, 0.08)); transform: translateY(-1px); }
.choice:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; }
.choice[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.choice[hidden] { display: none; }
.choice-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--turquoise-tint); color: var(--turquoise-ink); }
.choice b { display: block; font-size: 0.92rem; }
.choice small { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: 0.1rem; }
@media (prefers-reduced-motion: reduce) { .choice { transition: none; } .choice:hover { transform: none; } }

/* Keep the floating cards off the slide content */
.mock-slides { padding-bottom: 2.1rem; }
.mock-float:not(.two) { bottom: -2.6rem; left: -1.75rem; }
@media (max-width: 900px) { .mock-slides { padding-bottom: 0.5rem; } }

/* ── BEGIN offboarding receipts ───────────────────────────────────── */
.badge.verdict { font-weight: 590; letter-spacing: 0.04em; }
.badge.verdict.verified { background: rgba(16, 185, 129, 0.14); color: #047857; border-color: rgba(16, 185, 129, 0.3); }
.badge.verdict.partial { background: var(--warning-tint); color: var(--warning); border-color: rgba(161, 92, 7, 0.25); }
.badge.verdict.failed { background: var(--danger-tint); color: var(--danger); border-color: rgba(200, 50, 50, 0.25); }
.badge.small { font-size: 0.7rem; padding: 0.1rem 0.4rem; }
.receipt-summary-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.receipt-summary.verdict-failed { border-color: rgba(200, 50, 50, 0.45); }
.probe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.row-form { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.row-form select { min-width: 18rem; }
.verify-shell { max-width: 46rem; margin: 2rem auto; padding: 0 1rem; }
.verify-shell .drop { border: 2px dashed var(--border); border-radius: 12px; padding: 1rem; margin: 1rem 0; display: grid; gap: 0.5rem; }
.verify-shell .drop.is-drag { border-color: var(--turquoise-ink, #067a78); background: var(--surface-2); }
.verify-shell textarea { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; }
.vr-lines { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.35rem; }
.vr-line { display: grid; grid-template-columns: 4rem 8rem 1fr; gap: 0.5rem; align-items: baseline; font-size: 0.9rem; }
.vr-tag { font-weight: 590; font-size: 0.75rem; }
.vr-line.pass .vr-tag { color: #047857; }
.vr-line.fail .vr-tag { color: var(--danger); }
.vr-line.skip .vr-tag { color: var(--warning); }
.certificate { max-width: 52rem; margin: 1.5rem auto; padding: 0 1rem 3rem; color: var(--text); }
.cert-actions { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.cert-head h1 { margin: 0.2rem 0; }
.cert-sub { color: var(--muted, #5b6573); margin: 0; }
.cert-verdict { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin: 1.25rem 0; }
.cert-verdict.verdict-failed { border-color: rgba(200, 50, 50, 0.5); }
.cert-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem 1.5rem; margin: 1rem 0; }
.cert-facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted, #5b6573); }
.cert-facts dd { margin: 0; word-break: break-all; }
.cert-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.cert-table th, .cert-table td { border-bottom: 1px solid var(--border); padding: 0.4rem 0.5rem; text-align: left; vertical-align: top; }
@media print {
  .no-print, .skip-link { display: none !important; }
  .certificate { max-width: none; margin: 0; }
  .cert-table tr { break-inside: avoid; }
}
/* ── END offboarding receipts ─────────────────────────────────────── */

/* A long address in a chip must wrap instead of widening the page on a phone. */
.mono-chip, .conn-head p, .conn-error { overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.conn-head > div { min-width: 0; }

/* Demo relying-party pages: the header and long values wrap instead of widening the page on a phone. */
@media (max-width: 640px) {
  .topbar { height: auto; min-height: 64px; position: static; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; }
  .topbar .brand-wrapper, .topbar .nav { flex-wrap: wrap; gap: 0.5rem; }
  .topbar + .main { padding: 1.5rem 1rem !important; }
  .main .card { padding: 2rem 1.1rem !important; }
  .main .btn { white-space: normal; max-width: 100%; height: auto; line-height: 1.3; }
  .table-container { overflow-x: auto; }
  .table-container code, main code { overflow-wrap: anywhere; word-break: break-word; }
}

/* Sign-up: open-your-mail buttons and the inline "Send it again" link */
.signup-mail { margin: 4px 0 6px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ui-accent, #0E9F9A); font-weight: 590; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.auth-card .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
