/* =============================================================
   ACIS Professional - UI v2 (ACIS design system)
   Rebuilt 2026-07-13: tokens, cards, buttons, badges and layout
   match acis.css / index.html. Checkout styles preserved intact
   at the end of this file (do not restyle them).
   ============================================================= */

:root {
  color-scheme: light;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #f5f7fc;
  --bg-subtle: #edf1fb;
  --surface: #ffffff;
  --surface-alt: #f9fbff;
  --ink: #1f2937;
  --ink-subtle: #374151;
  --muted: #6b7280;
  --muted-soft: #828899;
  --border: #d7dde7;
  --card-border: rgba(209, 217, 230, 0.9);
  --accent: #3a7bff;
  --accent-dark: #1f53d5;
  --accent-50: #f1f5ff;
  --accent-100: #dfe9ff;
  --accent-200: #c2d6ff;
  --success: #0f9d58;
  --danger: #d64248;
  --tier-quick: #22c55e;
  --tier-optimized: #3b82f6;
  --tier-full: #a855f7;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.03);
  /* legacy aliases used by preserved checkout styles */
  --ink-soft: #374151;
  --line: #d7dde7;
  --line-soft: #e8eef5;
  --blue: #3a7bff;
  --blue-dark: #1f53d5;
  --purple: #a855f7;
  --green: #0f9d58;
  --cyan: #0ea5e9;
  --red: #d64248;
  --amber: #b7791f;
  --navy: #0f172a;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }
/* The hidden attribute must always win: modal backdrops use display:grid,
   which would otherwise override [hidden] and keep them permanently open. */
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  /* Keep the workspace frame stationary when routes have different heights. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }

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

/* ---------- Shared primitives ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow-on-dark { background: rgba(59, 130, 246, 0.14); color: var(--accent-dark); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-subtle);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.button:hover { transform: translateY(-1px); border-color: var(--accent-200); color: var(--accent-dark); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(58, 123, 255, 0.25);
}
.button-primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); color: #ffffff; }

.button-secondary { background: var(--surface); }
.button-wide { width: 100%; }
.button-small { padding: 8px 14px; font-size: 0.88rem; }

.text-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.text-button:hover { text-decoration: underline; }

.field { display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink-subtle); font-weight: 600; }
.field > span:first-child { display: flex; align-items: baseline; gap: 6px; }
.field small { color: var(--muted-soft); font-weight: 500; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.15);
}
.field textarea { resize: vertical; min-height: 92px; }

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.15);
}
.input-shell i { color: var(--muted-soft); font-size: 0.95rem; }
.input-shell input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: none;
  background: none;
  color: var(--ink);
  font-weight: 500;
}
.input-shell input:focus { outline: none; box-shadow: none; }

.select-input,
.select-control {
  position: relative;
  display: block;
}
.select-input select,
.select-control select {
  width: 100%;
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
}
.select-input i,
.select-control i {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted-soft);
  font-size: 0.8rem;
}
.select-control select {
  padding: 11px 38px 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-subtle);
  font-weight: 600;
}

.message {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
}
.message.error {
  background: #fdf2f2;
  border-color: #f5c6c6;
  color: var(--danger);
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mini-tag-green { background: color-mix(in srgb, var(--tier-quick), white 88%); color: color-mix(in srgb, var(--tier-quick), black 25%); }
.mini-tag-blue { background: color-mix(in srgb, var(--tier-optimized), white 88%); color: color-mix(in srgb, var(--tier-optimized), black 20%); }
.mini-tag-purple { background: color-mix(in srgb, var(--tier-full), white 88%); color: color-mix(in srgb, var(--tier-full), black 15%); }

/* ---------- Boot loader (prevents auth-screen flash on reload) ---------- */

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
}
.boot-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--accent-100);
  border-top-color: var(--accent);
  animation: bootSpin 0.8s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }

/* ---------- Auth screen ---------- */

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.auth-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 4vw, 60px);
  background:
    radial-gradient(circle at 88% 6%, rgba(58, 123, 255, 0.34), transparent 42%),
    radial-gradient(circle at 2% 100%, rgba(139, 92, 246, 0.22), transparent 46%),
    linear-gradient(160deg, #0f1c34 0%, #0a1120 55%, #100e28 100%);
  overflow: hidden;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 82% 14%, rgba(0, 0, 0, 0.6), transparent 60%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.brand small {
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.auth-showcase > .brand {
  position: absolute;
  top: clamp(30px, 4vw, 52px);
  left: clamp(32px, 4vw, 58px);
  z-index: 2;
  gap: 13px;
}
.auth-showcase > .brand img { width: 50px; height: 50px; border-radius: 13px; }
.auth-showcase > .brand span { font-size: 1.3rem; }
.auth-showcase > .brand small { font-size: 0.74rem; letter-spacing: 0.16em; }
.brand-on-dark { position: relative; z-index: 1; color: #f8fafc; }
.brand-on-dark small { color: #7fb2ff; }

.auth-showcase-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  width: min(100%, 430px);
}

.auth-showcase-copy { display: grid; gap: 14px; }
.auth-showcase-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #bfdbfe;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.auth-showcase-badge > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}
.auth-showcase-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: #ffffff;
  text-wrap: balance;
}
.auth-showcase-copy p {
  margin: 0;
  color: #b6c2d9;
  line-height: 1.65;
  font-size: 0.98rem;
  text-wrap: balance;
}

.auth-proof { display: grid; gap: 12px; padding-top: 4px; }
.auth-proof span {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #dbe6f5;
}
.auth-proof i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.auth-preview-card {
  width: 100%;
  padding: 18px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 60px -24px rgba(2, 6, 23, 0.7), 0 0 0 1px rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 12px;
}
.auth-preview-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.95rem; font-weight: 800; color: var(--ink); }
.auth-preview-top b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--success);
}
.auth-preview-top b i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.auth-preview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.auth-preview-metrics span {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f7f9fd;
  border: 1px solid var(--line-soft);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.auth-preview-metrics strong { font-size: 1.3rem; font-weight: 900; color: var(--ink); }

.auth-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-subtle);
}
.auth-preview-row b {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--success);
}
.auth-preview-row b.is-progress { color: var(--accent-dark); }

@media (prefers-reduced-motion: no-preference) {
  .brand-on-dark { animation: authShowcaseReveal 0.55s ease both; }
  .auth-showcase-copy > * { animation: authShowcaseReveal 0.6s ease both; }
  .auth-showcase-copy > :nth-child(1) { animation-delay: 0.06s; }
  .auth-showcase-copy > :nth-child(2) { animation-delay: 0.12s; }
  .auth-showcase-copy > :nth-child(3) { animation-delay: 0.18s; }
  .auth-showcase-copy > :nth-child(4) { animation-delay: 0.24s; }
  .auth-preview-card { animation: authPreviewReveal 0.7s 0.24s ease both; }
}

@keyframes authShowcaseReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes authPreviewReveal {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-height: 760px) and (min-width: 921px) {
  .auth-showcase { gap: 18px; padding-block: 28px; }
  .auth-showcase-stage { gap: 24px; padding-bottom: 0; }
  .auth-showcase-copy { gap: 12px; }
  .auth-showcase-copy h1 { font-size: clamp(2rem, 3vw, 2.65rem); }
  .auth-preview-card { padding: 17px; gap: 10px; }
  .auth-preview-metrics span { padding: 9px 11px; }
  .auth-preview-row { padding-block: 9px; }
}

.auth-panel-wrap {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 48px);
}

.auth-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: clamp(26px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.auth-panel h2 { margin: 0; font-size: 1.5rem; font-weight: 900; letter-spacing: -0.01em; }
.auth-panel > p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.auth-mobile-brand { display: none; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-legal { margin: 4px 0 0; font-size: 0.78rem; color: var(--muted-soft); line-height: 1.55; }

/* ---------- App chrome ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px clamp(16px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--card-border);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-subtle);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.topbar-link:hover { border-color: var(--accent-200); color: var(--accent-dark); }

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--accent-100);
  background: var(--accent-50);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.credit-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(58, 123, 255, 0.18); }

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-button:hover { border-color: var(--danger); color: var(--danger); }

.app-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 30px);
}

.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  display: grid;
  gap: 16px;
}
.sidebar-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
  padding: 0 6px;
}

.side-nav { display: grid; gap: 6px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--ink-subtle);
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.side-nav a i { color: var(--muted-soft); transition: color 0.2s ease; }
.side-nav a:hover { background: var(--surface); border-color: var(--card-border); }
.side-nav a.active {
  background: var(--surface);
  border-color: var(--accent-100);
  color: var(--accent-dark);
  box-shadow: var(--shadow-xs);
}
.side-nav a.active i { color: var(--accent); }
.side-nav b {
  margin-left: auto;
  min-width: 24px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.sidebar-guide {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-xs);
  font-size: 0.85rem;
}
.sidebar-guide-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-50);
  color: var(--accent-dark);
}
.sidebar-guide strong { color: var(--ink); font-size: 0.9rem; }
.sidebar-guide p { margin: 0; color: var(--muted); line-height: 1.55; }
.sidebar-guide a { font-weight: 700; text-decoration: none; }
.sidebar-guide a:hover { text-decoration: underline; }

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--card-border);
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #ffffff;
  font-weight: 800;
}
.sidebar-account span:last-child { display: grid; line-height: 1.3; min-width: 0; }
.sidebar-account strong { font-size: 0.88rem; color: var(--ink); }
.sidebar-account small { font-size: 0.76rem; color: var(--muted-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main-content { display: grid; gap: 22px; align-content: start; min-width: 0; }

/* ---------- Views ---------- */

.view {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 20px;
  animation: viewIn 0.35s ease;
}
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.view-heading > div { display: grid; gap: 8px; }
.view-heading .eyebrow { justify-self: start; }
.view-heading h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.view-heading p { margin: 0; color: var(--muted); max-width: 60ch; line-height: 1.65; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.metric-card:hover { transform: translateY(-2px); border-color: var(--accent-200); }
.metric-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.metric-card-green .metric-icon { background: color-mix(in srgb, var(--tier-quick), white 90%); color: color-mix(in srgb, var(--tier-quick), black 25%); }
.metric-card-purple .metric-icon { background: color-mix(in srgb, var(--tier-full), white 90%); color: color-mix(in srgb, var(--tier-full), black 15%); }
.metric-card-cyan .metric-icon { background: #e0f2fe; color: #0369a1; }
.metric-card > div { display: grid; line-height: 1.35; }
.metric-card small { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-soft); }
.metric-card strong { font-size: 1.5rem; font-weight: 900; color: var(--ink); }
.metric-card p { margin: 0; font-size: 0.8rem; color: var(--muted); }

.surface {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(18px, 2.4vw, 26px);
}

.surface-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.surface-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.surface-toolbar h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }

.toolbar-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.search-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.search-control i { color: var(--muted-soft); font-size: 0.85rem; }
.search-control input { border: none; background: none; padding: 10px 0; min-width: 190px; color: var(--ink); font-weight: 500; }
.search-control input:focus { outline: none; }
.search-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.15); }

/* ---------- Tables ---------- */

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-soft);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-subtle);
  font-weight: 500;
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-alt); }
.table-subtext { display: block; font-size: 0.78rem; color: var(--muted-soft); margin-top: 2px; }
.participant-dashboard-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s ease;
}
.participant-dashboard-link i {
  color: var(--accent);
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}
.participant-dashboard-link:hover,
.participant-dashboard-link:focus-visible { color: var(--accent-dark); }
.participant-dashboard-link:hover i,
.participant-dashboard-link:focus-visible i { transform: translate(2px, -2px); }
.participant-dashboard-link:focus-visible { outline: 2px solid var(--accent-200); outline-offset: 4px; border-radius: 3px; }
.table-actions { display: flex; gap: 8px; justify-content: flex-end; }
.table-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-subtle);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.table-action:hover { border-color: var(--accent-200); color: var(--accent-dark); }
.table-action.danger:hover { border-color: var(--danger); color: var(--danger); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.created { background: var(--accent-50); color: var(--accent-dark); }
.status-badge.in_progress { background: #fef8e7; color: #92600a; }
.status-badge.completed { background: #e7f6ee; color: #0b7a44; }
.status-badge.expired { background: #f1f3f7; color: var(--muted); }
.status-badge.revoked { background: #fdf2f2; color: var(--danger); }

.assessment-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.assessment-badge.quick { background: color-mix(in srgb, var(--tier-quick), white 88%); color: color-mix(in srgb, var(--tier-quick), black 25%); }
.assessment-badge.optimized { background: color-mix(in srgb, var(--tier-optimized), white 88%); color: color-mix(in srgb, var(--tier-optimized), black 20%); }
.assessment-badge.full { background: color-mix(in srgb, var(--tier-full), white 88%); color: color-mix(in srgb, var(--tier-full), black 15%); }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 1.3rem;
}
.empty-state strong { color: var(--ink); font-size: 1rem; }
.empty-state p { margin: 0; font-size: 0.9rem; }

/* ---------- Credits view ---------- */

.billing-overview { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 14px; }

.balance-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: var(--radius);
  border: 1px solid var(--accent-100);
  background: linear-gradient(180deg, var(--surface), var(--accent-50));
  box-shadow: var(--shadow-card);
}
.balance-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--accent-dark); font-weight: 800; font-size: 0.85rem; }
.balance-card-top span { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.balance-card-top span i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.balance-number { display: flex; align-items: baseline; gap: 8px; }
.balance-number strong { font-size: 2.6rem; font-weight: 900; letter-spacing: -0.02em; color: var(--ink); line-height: 1; }
.balance-number span { color: var(--muted); font-weight: 700; }
.balance-card > p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.bucket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bucket-grid span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--card-border);
}
.bucket-grid small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-soft); }
.bucket-grid strong { font-size: 1.15rem; font-weight: 900; color: var(--ink); }

.paygo-card { display: grid; gap: 12px; align-content: start; }
.paygo-card h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }
.paygo-card > p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.paygo-card .mini-tag { justify-self: start; }

.amount-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.amount-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.15); }
.amount-control span { font-weight: 800; color: var(--muted-soft); }
.amount-control small { font-weight: 700; color: var(--muted-soft); font-size: 0.75rem; }
.amount-control input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 8px 0;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ink);
}
.amount-control input:focus { outline: none; }

.amount-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.amount-presets button {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-subtle);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.amount-presets button:hover { border-color: var(--accent-200); color: var(--accent-dark); }
.amount-presets button.active {
  background: var(--accent-50);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.cost-card { display: grid; gap: 12px; align-content: start; }
.cost-card h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.cost-list { display: grid; gap: 10px; }
.cost-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.cost-list > div > span:nth-child(2) { display: grid; line-height: 1.3; flex: 1; }
.cost-list strong { font-size: 0.92rem; color: var(--ink); font-weight: 800; }
.cost-list small { font-size: 0.78rem; color: var(--muted-soft); }
.cost-list b { font-size: 1.1rem; font-weight: 900; color: var(--ink); }
.cost-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.cost-icon-green { background: color-mix(in srgb, var(--tier-quick), white 88%); color: color-mix(in srgb, var(--tier-quick), black 25%); }
.cost-icon-blue { background: color-mix(in srgb, var(--tier-optimized), white 88%); color: color-mix(in srgb, var(--tier-optimized), black 20%); }
.cost-icon-purple { background: color-mix(in srgb, var(--tier-full), white 88%); color: color-mix(in srgb, var(--tier-full), black 15%); }
.charge-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.charge-note i { color: var(--accent-dark); }

.plan-section { display: grid; gap: 16px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.section-heading h2 { margin: 6px 0 0; font-size: 1.35rem; font-weight: 900; letter-spacing: -0.01em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 42ch; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  padding-top: 18px;
}

.selection-option {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.selection-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 520px;
  height: 100%;
  padding: 70px 28px 26px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(209, 217, 230, 0.9);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.03);
  cursor: default;
  text-align: left;
  line-height: 1.65;
  z-index: 1;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.selection-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-color);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1), 0 4px 14px rgba(15, 23, 42, 0.06);
}

.selection-card--quick {
  --card-color: #22c55e;
  --card-gradient: linear-gradient(135deg, #22c55e, #16a34a);
}
.selection-card--optimized {
  --card-color: #3b82f6;
  --card-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
}
.selection-card--full {
  --card-color: #a855f7;
  --card-gradient: linear-gradient(135deg, #a855f7, #9333ea);
}

.selection-card--featured {
  border: 1.5px solid var(--card-color);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--card-color), transparent 90%),
    0 26px 50px -24px color-mix(in srgb, var(--card-color), transparent 45%),
    0 8px 24px rgba(15, 23, 42, 0.06);
  z-index: 2;
}
.selection-card--featured:hover { border-color: var(--card-color); }

.selection-flag {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  background: var(--card-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--card-color), transparent 35%);
  z-index: 3;
}
.selection-flag i { font-size: 0.8rem; }

.selection-price {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(209, 217, 230, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  z-index: 2;
}
.selection-price .price-was {
  margin-right: 6px;
  color: #d64248;
  font-size: 0.62em;
  font-weight: 700;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.pro-plan-price-period {
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
}

.selection-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 10px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--card-color), white 88%);
  color: color-mix(in srgb, var(--card-color), black 12%);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 2;
}
.pro-plan-card.is-current .selection-card {
  border-color: #4f46e5;
  box-shadow: 0 20px 48px -26px rgba(79, 70, 229, 0.62);
}
.pro-plan-card.is-current .selection-badge {
  color: #4338ca;
  background: #eef2ff;
}

.selection-icon {
  position: relative;
  width: 66px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--card-gradient);
  color: #ffffff;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--card-color), transparent 70%);
  z-index: 1;
  transition: transform 220ms ease;
}
.selection-icon i { font-size: 1.9rem; line-height: 1; }
.pro-plan-card:hover .pro-plan-icon { transform: translateY(-4px) scale(1.08) rotate(-3deg); }

.selection-head { margin-bottom: 18px; }
.selection-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}
.selection-head p {
  min-height: 76px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.selection-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.selection-stat {
  padding: 12px 10px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(209, 217, 230, 0.88);
  text-align: center;
}
.selection-stat strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}
.selection-stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.selection-list {
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.selection-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  color: var(--ink-subtle);
  font-size: 0.9rem;
  font-weight: 500;
}
.selection-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--card-color);
  box-shadow: 0 0 8px var(--card-color);
}

.selection-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}
.selection-cta,
.selection-example-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.selection-cta {
  appearance: none;
  margin: 0;
  color: #ffffff;
  background: var(--card-gradient);
  border: 1px solid transparent;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--card-color), transparent 72%);
  cursor: pointer;
}
.selection-cta:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--card-color), transparent 35%);
}
.selection-cta:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.selection-example-link {
  margin-top: 10px;
  color: var(--card-color);
  background: color-mix(in srgb, var(--card-color), white 94%);
  border: 1px solid color-mix(in srgb, var(--card-color), white 60%);
}
.selection-example-link i { font-size: 1rem; transition: transform 0.24s ease; }
.selection-example-link:hover {
  color: var(--card-color);
  background: color-mix(in srgb, var(--card-color), white 89%);
  border-color: color-mix(in srgb, var(--card-color), white 42%);
  transform: translateY(-1px);
}
.selection-example-link:hover i { transform: translateX(4px); }
.selection-cta:focus-visible,
.selection-example-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--card-color), transparent 68%); outline-offset: 2px; }

.pending-plan-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- Results view ---------- */

.result-filter-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.result-filter-card h2 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; }
.result-filter-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.result-filter-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.result-filter-actions .field { min-width: 230px; }

.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.result-stats article {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.result-stats small { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-soft); }
.result-stats strong { font-size: 1.5rem; font-weight: 900; color: var(--ink); }

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---------- Analytics view ---------- */

.analytics-filter-card .result-filter-actions { align-items: flex-end; }
.analytics-filter-card .field { min-width: 190px; }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analytics-card {
  display: grid;
  align-content: start;
  gap: 20px;
}

.analytics-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.analytics-card-heading h2 { margin: 0; font-size: 1.15rem; font-weight: 800; }

.analytics-total {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--accent-100);
  border-radius: 100px;
  background: var(--accent-50);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-bars { display: grid; gap: 16px; }
.analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.85fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: 12px;
}
.analytics-bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-subtle);
  font-size: 0.82rem;
  font-weight: 700;
}
.analytics-bar-label i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bar-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--bar-color), transparent 50%);
}
.analytics-track {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  background: var(--bg-subtle);
}
.analytics-track span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color);
  transition: width 0.35s ease;
}
.analytics-bar-value {
  min-width: 54px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
}
.analytics-bar-value small { display: block; color: var(--muted-soft); font-size: 0.68rem; font-weight: 600; }

.analytics-cohorts .table td:first-child strong { display: block; }
.analytics-rate {
  display: inline-flex;
  align-items: center;
  min-width: 52px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--tier-quick), white 90%);
  color: color-mix(in srgb, var(--tier-quick), black 28%);
  font-size: 0.75rem;
  font-weight: 800;
}

.suite-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 4px 8px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-soft);
  font-size: 0.8rem;
}
.suite-footer p { margin: 0; max-width: 68ch; line-height: 1.55; }
.suite-footer a { color: var(--muted); font-weight: 600; text-decoration: none; margin-left: 14px; }
.suite-footer a:hover { color: var(--accent-dark); }

/* ---------- Create modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

.create-dialog {
  width: min(760px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: 0 36px 80px rgba(2, 6, 23, 0.28);
  overflow: hidden;
  animation: dialogIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 14px;
}
.dialog-step {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.dialog-header h2 { margin: 0 0 4px; font-size: 1.35rem; font-weight: 900; letter-spacing: -0.01em; }
.dialog-header p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.dialog-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.dialog-close:hover { color: var(--ink); }

.dialog-progress { display: flex; gap: 6px; padding: 0 24px 14px; }
.dialog-progress i { height: 4px; flex: 1; border-radius: 100px; background: var(--line-soft); transition: background 0.25s ease; }
.dialog-progress i.active { background: var(--accent); }

.dialog-body { padding: 4px 24px 20px; overflow-y: auto; }

.participant-dialog { width: min(760px, 100%); }
.participant-detail-body { flex: 1; min-height: 0; display: block; }
.participant-detail-body > * + * { margin-top: 18px; }
.participant-detail-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--accent-100);
  border-radius: var(--radius);
  background: var(--accent-50);
}
.participant-detail-summary .choice-icon { background: var(--surface); color: var(--accent-dark); }
.participant-detail-summary > div { display: grid; gap: 3px; min-width: 0; }
.participant-detail-summary strong { color: var(--ink); font-size: 1rem; }
.participant-detail-summary p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.participant-detail-section { display: grid; gap: 10px; }
.participant-detail-section > h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.participant-context-grid,
.participant-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.participant-context-grid > div,
.participant-index-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.participant-context-grid small,
.participant-index-grid small { color: var(--muted-soft); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.participant-context-grid strong { overflow-wrap: anywhere; color: var(--ink-subtle); font-size: 0.88rem; }
.participant-index-grid strong { color: var(--accent-dark); font-size: 1.35rem; font-weight: 900; line-height: 1.1; }
.participant-index-grid span { color: var(--muted); font-size: 0.72rem; }
.participant-detail-empty { margin: 0; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--muted); font-size: 0.84rem; }
.participant-disclosure {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}
.participant-disclosure-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}
.participant-disclosure-toggle:hover { background: var(--surface-alt); }
.participant-disclosure-toggle > span { display: grid; gap: 3px; min-width: 0; }
.participant-disclosure-toggle strong { color: var(--ink); font-size: 0.92rem; font-weight: 800; }
.participant-disclosure-toggle small { color: var(--muted); font-size: 0.74rem; line-height: 1.4; }
.participant-disclosure-toggle > i { color: var(--accent-dark); transition: transform 0.22s ease; }
.participant-disclosure-toggle[aria-expanded="true"] > i { transform: rotate(180deg); }
.participant-disclosure-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-alt);
}
.participant-score-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.participant-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.participant-score-row > div { display: grid; gap: 2px; min-width: 0; }
.participant-score-row > div:first-child strong { overflow-wrap: anywhere; color: var(--ink-subtle); font-size: 0.82rem; }
.participant-score-row small { color: var(--muted-soft); font-size: 0.66rem; }
.participant-score-value { justify-items: end; flex-shrink: 0; text-align: right; }
.participant-score-value strong { color: var(--muted); font-size: 0.8rem; }
.participant-score-row.is-available .participant-score-value strong { color: var(--accent-dark); font-size: 1.1rem; font-weight: 900; }
.participant-advanced-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.assessment-picker { display: grid; gap: 12px; }
.assessment-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.assessment-choice:hover { border-color: var(--accent-200); box-shadow: var(--shadow-xs); }
.choice-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-size: 1.15rem;
}
.assessment-choice-green .choice-icon { background: color-mix(in srgb, var(--tier-quick), white 88%); color: color-mix(in srgb, var(--tier-quick), black 25%); }
.assessment-choice-blue .choice-icon { background: color-mix(in srgb, var(--tier-optimized), white 88%); color: color-mix(in srgb, var(--tier-optimized), black 20%); }
.assessment-choice-purple .choice-icon { background: color-mix(in srgb, var(--tier-full), white 88%); color: color-mix(in srgb, var(--tier-full), black 15%); }
.assessment-choice > div:nth-child(2) { flex: 1; display: grid; gap: 4px; min-width: 0; }
.assessment-choice .mini-tag { justify-self: start; }
.assessment-choice h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.assessment-choice p { margin: 0; font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.choice-meta { display: flex; gap: 12px; flex-shrink: 0; }
.choice-meta span { display: grid; justify-items: center; gap: 1px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-soft); }
.choice-meta strong { font-size: 1.05rem; font-weight: 900; color: var(--ink); }

.counter { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.counter button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-subtle);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.counter button:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-50); }
.counter output { min-width: 30px; text-align: center; font-size: 1.15rem; font-weight: 900; color: var(--ink); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-wide { grid-column: 1 / -1; }

.privacy-note,
.warning-note {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 0.86rem;
}
.privacy-note { background: var(--accent-50); border: 1px solid var(--accent-100); }
.privacy-note > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface); color: var(--accent-dark); flex-shrink: 0; }
.privacy-note strong { color: var(--ink); }
.privacy-note p { margin: 2px 0 0; color: var(--muted); line-height: 1.55; }
.warning-note { background: #fef8e7; border: 1px solid #f5e3b3; }
.warning-note > i { color: #92600a; font-size: 1.05rem; margin-top: 2px; }
.warning-note strong { color: #92600a; }
.warning-note p { margin: 2px 0 0; color: #7c5a10; line-height: 1.55; }

.review-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.review-main h3 { margin: 4px 0 12px; font-size: 1.1rem; font-weight: 800; }
.review-items { display: grid; gap: 8px; }
.review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-subtle);
}
.review-summary {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent-50);
  border: 1px solid var(--accent-100);
}
.review-summary > span { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-dark); }
.review-summary > strong { font-size: 2rem; font-weight: 900; color: var(--ink); line-height: 1.1; }
.review-summary small { color: var(--muted); font-weight: 600; }
.review-summary small b { color: var(--ink); }
.review-rule { height: 1px; background: var(--accent-100); margin: 8px 0; }
.review-summary p { display: flex; gap: 8px; margin: 0; font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.review-summary p i { color: var(--accent-dark); margin-top: 2px; }

.success-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.success-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e7f6ee;
  color: #0b7a44;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.success-heading h3 { margin: 2px 0; font-size: 1.2rem; font-weight: 900; }
.success-heading p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.links-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.links-toolbar > span { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.links-toolbar > div { display: flex; gap: 8px; }
.links-box {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8rem;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-alt);
}
.cost-preview { display: grid; line-height: 1.3; }
.cost-preview span { font-size: 0.76rem; font-weight: 700; color: var(--muted-soft); }
.cost-preview strong { font-size: 1.05rem; font-weight: 900; color: var(--ink); }
.dialog-actions > div:last-child { display: flex; gap: 10px; }

/* ---------- Mobile nav ---------- */

.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.mobile-nav a {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}
.mobile-nav a.active { color: var(--accent-dark); background: var(--accent-50); }
.mobile-nav i { font-size: 1.05rem; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-overview { grid-template-columns: 1fr 1fr; }
  .billing-overview .cost-card { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    text-decoration: none;
    color: var(--ink);
    font-weight: 900;
    margin-bottom: 4px;
  }
  .auth-mobile-brand img { width: 34px; height: 34px; border-radius: 9px; }
  .app-layout { grid-template-columns: 1fr; padding-bottom: 90px; }
  .sidebar { position: static; }
  .side-nav, .sidebar-label { display: none; }
  .sidebar-guide { display: none; }
  .mobile-nav { display: grid; }
  .plans-grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .selection-card { min-height: 0; }
  .selection-head p { min-height: 0; }
}

@media (max-width: 720px) {
  .view-heading { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .billing-overview { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-filter-card .result-filter-actions { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .review-layout { grid-template-columns: 1fr; }
  .assessment-choice { flex-wrap: wrap; }
  .choice-meta { width: 100%; justify-content: flex-start; }
  .counter { margin-left: auto; }
  .topbar-link span { display: none; }
}

@media (max-width: 440px) {
  .analytics-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; }
  .analytics-track { grid-column: 1 / -1; grid-row: 2; }
  .analytics-bar-value { grid-column: 2; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .selection-card,
  .pro-plan-icon,
  .selection-cta,
  .selection-example-link i { transition: none; }
  .selection-card:hover,
  .pro-plan-card:hover .pro-plan-icon,
  .selection-cta:hover { transform: none; }
}

/* ---------- Email verification (cloned from the assessment registration design) ---------- */

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.15);
}
.form-hint { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted-soft); }
.form-error { display: block; font-size: 0.8rem; color: var(--danger); font-weight: 600; }


.email-verification-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.email-verification-wrapper .form-input {
  flex: 1;
  min-width: 0;
}

.send-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.send-code-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.send-code-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.send-code-btn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.verification-code-section {
  margin-top: 12px;
  padding: 0;
  background: none;
  border: none;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.verification-label {
  font-size: 0.85rem !important;
  margin-bottom: 8px !important;
  color: var(--muted, #6b7280);
  font-weight: 600;
}

.verification-code-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 12px;
  width: 100%;
}

.digit-inputs-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.digit-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem !important;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid var(--border-color, #e5e7eb) !important;
  background: var(--surface, #ffffff);
  color: var(--text-base, #1a1a2e);
  padding: 0 !important;
  transition: all 0.2s ease;
}

.digit-input:focus {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  outline: none;
}

.digit-input.error {
  border-color: #ef4444 !important;
  background-color: #fef2f2;
}

.verify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 56px;
  width: min(100%, 340px);
  margin-inline: auto;
  align-self: center;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.verify-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.verify-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.verify-btn svg {
  width: 14px;
  height: 14px;
}

.verification-status {
  margin-top: 6px;
  font-size: 0.82rem;
  min-height: 16px;
  color: #6b7280;
}

.verification-status.sending {
  color: #8b5cf6;
}

.verification-status.success {
  color: #059669;
  font-weight: 500;
}

.verification-status.error {
  color: #dc2626;
}

.resend-link {
  display: inline-block;
  margin-top: 8px;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.resend-link span {
  color: #8b5cf6;
  font-weight: 600;
}

.resend-link:hover span {
  text-decoration: underline;
}

.email-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

.email-verified-badge svg {
  color: #10b981;
  width: 16px;
  height: 16px;
}



/* =============================================================
   PRESERVED CHECKOUT STYLES (do not modify - owner instruction)
   ============================================================= */

.icon-button,
.dialog-close,
.checkout-close {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: #536078;
}
.icon-button:hover,
.dialog-close:hover,
.checkout-close:hover { color: var(--ink); border-color: #aebed1; }
/* Create flow */

.modal-backdrop,
.checkout-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(12, 22, 39, 0.64); backdrop-filter: blur(10px); }
/* Checkout */

.checkout-backdrop { z-index: 120; background: linear-gradient(135deg, rgba(10, 16, 28, 0.93), rgba(15, 23, 42, 0.96)); backdrop-filter: blur(16px); }
.checkout-dialog { position: relative; width: min(640px, 100%); max-height: 90vh; display: flex; overflow: hidden; border-radius: 22px; background: #ffffff; box-shadow: 0 36px 80px rgba(2, 6, 23, 0.28), 0 12px 28px rgba(2, 6, 23, 0.14); animation: checkoutEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes checkoutEnter { from { opacity: 0; transform: scale(0.93) translateY(32px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.checkout-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.04); }
.checkout-scroll { width: 100%; overflow-y: auto; }
.checkout-header { padding: 27px 28px 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); text-align: center; }
.checkout-badge { display: inline-flex; padding: 6px 15px; border-radius: 999px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 4px 12px rgba(47, 115, 246, 0.3); color: #ffffff; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.checkout-badge.green { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3); }
.checkout-badge.purple { background: linear-gradient(135deg, #9c3cf3, #7e35db); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.checkout-header h2 { margin: 13px 0 7px; font-size: 1.58rem; letter-spacing: -0.035em; }
.checkout-header p { max-width: 510px; margin: 0 auto; color: #5b6474; font-size: 0.82rem; line-height: 1.55; }
.checkout-summary { padding: 20px 28px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.checkout-product { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 15px; padding-bottom: 16px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.checkout-product-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); box-shadow: 0 6px 16px rgba(47, 115, 246, 0.3); color: #ffffff; font-size: 1.25rem; }
.checkout-product-icon.green { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3); }
.checkout-product-icon.purple { background: linear-gradient(135deg, #9c3cf3, #7e35db); box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3); }
.checkout-product h3 { margin: 0 0 4px; font-size: 0.98rem; }
.checkout-product p { margin: 0; color: #5b6474; font-size: 0.74rem; line-height: 1.45; }
.checkout-price { font-size: 1.65rem; letter-spacing: -0.05em; }
.checkout-price small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.57rem; font-weight: 500; letter-spacing: 0; text-align: right; }
.checkout-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 15px 0; }
.checkout-metrics span { padding: 10px 8px; border: 1px solid rgba(209, 217, 230, 0.9); border-radius: 13px; background: #f8fafc; text-align: center; }
.checkout-metrics strong,
.checkout-metrics small { display: block; }
.checkout-metrics strong { color: #0f172a; font-size: 0.92rem; }
.checkout-metrics small { margin-top: 4px; color: #64748b; font-size: 0.57rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.checkout-emphasis { margin: 0 0 15px; padding-left: 13px; border-left: 3px solid rgba(59, 130, 246, 0.5); color: #334155; font-size: 0.78rem; line-height: 1.55; }
.checkout-features { display: grid; gap: 8px; max-width: 440px; margin: 0 auto; padding: 0; list-style: none; }
.checkout-features li { position: relative; padding-left: 21px; color: #4b5563; font-size: 0.74rem; line-height: 1.5; }
.checkout-features li::before { position: absolute; left: 0; top: 1px; color: #22b965; font-family: "bootstrap-icons"; content: "\f26e"; }
.checkout-status { margin: 15px 28px 0; padding: 13px 14px; border: 1px solid #c8dafc; border-radius: 11px; background: #eef4ff; color: #2852ad; font-size: 0.72rem; line-height: 1.5; }
.checkout-status.error { border-color: #f2bbb7; background: #fff1f0; color: #a3322a; }
.checkout-status.success { border-color: #b8e7ca; background: #eefaf2; color: #187a42; }
.coupon-section { padding: 10px 28px 8px; background: #ffffff; position: relative; min-height: 44px; }
.coupon-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 9px 12px; background: transparent; border: 1px dashed rgba(0, 0, 0, 0.12); border-radius: 10px; color: #3b82f6; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; }
.coupon-toggle:hover { background: rgba(59, 130, 246, 0.04); border-color: rgba(59, 130, 246, 0.3); }
.coupon-toggle i { width: 16px; height: 16px; font-size: 16px; line-height: 16px; }
.coupon-form { display: none; gap: 10px; }
.coupon-form.show { display: flex; }
.coupon-input { min-width: 0; flex: 1; padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 10px; background: #ffffff; color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.coupon-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.coupon-input::placeholder { color: #9ca3af; font-weight: 400; letter-spacing: normal; text-transform: none; }
.coupon-input.is-error { border-color: #ef4444; }
.coupon-apply { flex: 0 0 auto; padding: 12px 22px; background: #3b82f6; color: #ffffff; border: none; border-radius: 10px; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; }
.coupon-apply:hover:not(:disabled) { background: #2563eb; transform: translateY(-1px); }
.coupon-apply:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.coupon-message { margin-top: 12px; padding: 12px 16px; border-radius: 10px; font-size: 0.88rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.coupon-message.success { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #059669; border: 1px solid #a7f3d0; }
.coupon-message.error { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; border: 1px solid #fecaca; }
.coupon-message i { width: 18px; height: 18px; flex-shrink: 0; font-size: 18px; line-height: 18px; }
.payment-price { color: #111827; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.payment-price.discounted { color: #059669; }
.payment-price-original { margin-bottom: 2px; color: #9ca3af; font-size: 0.9rem; font-weight: 500; letter-spacing: 0; line-height: 1.2; text-decoration: line-through; }
.payment-discount-badge { display: inline-block; margin-top: 4px; padding: 3px 8px; border-radius: 5px; background: linear-gradient(135deg, #059669, #10b981); color: #ffffff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.checkout-guarantee { display: flex; align-items: flex-start; gap: 10px; margin: 15px 28px 4px; padding: 12px 14px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; color: #166534; }
.checkout-guarantee > i { margin-top: 1px; color: #16a34a; font-size: 1.05rem; }
.checkout-guarantee strong { display: block; font-size: 0.76rem; }
.checkout-guarantee p { margin: 2px 0 0; color: #356c49; font-size: 0.68rem; line-height: 1.45; }
.checkout-actions { padding: 10px 28px 8px; }
.paypal-sdk-slot { min-height: 49px; }
.paypal-sdk-slot > div:last-child { min-height: 49px; }
.paypal-sdk-slot iframe { min-height: 45px !important; }
.checkout-action-button { width: 100%; min-height: 49px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 11px; background: linear-gradient(90deg, var(--blue), var(--purple)); box-shadow: 0 8px 18px rgba(77, 89, 224, 0.22); color: #ffffff; font-size: 0.86rem; font-weight: 700; transition: transform 0.18s ease, filter 0.18s ease; }
.checkout-action-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.04); }
.checkout-action-button:disabled { opacity: 0.62; cursor: wait; }
.checkout-action-button.is-danger { background: #fff1f0; color: var(--red); box-shadow: none; border: 1px solid #efbcb7; }
.checkout-secure { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 28px 12px; border-top: 1px solid rgba(0, 0, 0, 0.05); color: #6b7280; font-size: 0.68rem; line-height: 1.5; text-align: center; }
.checkout-secure i { color: #003087; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 160; max-width: 390px; padding: 13px 16px; border-radius: 11px; background: #17243b; box-shadow: 0 14px 45px rgba(8, 18, 35, 0.25); color: #ffffff; font-size: 0.78rem; line-height: 1.45; }
@media (max-width: 700px) {
  .topbar { padding: 0 13px; }
  .topbar-link { display: none; }
  .brand small { display: none; }
  .credit-pill { padding: 0 10px; }
  .main-content { padding: 26px 13px 100px; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .view-heading .button { width: 100%; }
  .view-heading h1 { font-size: 2.4rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 108px; }
  .surface-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-controls { width: 100%; flex-direction: column; }
  .search-control { min-width: 0; width: 100%; }
  .select-control { width: 100%; }
  .billing-overview { grid-template-columns: 1fr; }
  .balance-card,
  .paygo-card,
  .cost-card { min-height: auto; }
  .cost-card { grid-column: auto; }
  .cost-list { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .result-filter-card { align-items: stretch; flex-direction: column; }
  .result-filter-actions { align-items: stretch; flex-direction: column; }
  .result-filter-actions .field { min-width: 0; }
  .result-stats { grid-template-columns: 1fr; }
  .privacy-chip { max-width: 100%; }
  .suite-footer { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .create-dialog { max-height: calc(100vh - 20px); }
  .dialog-header,
  .dialog-body,
  .dialog-actions { padding-left: 18px; padding-right: 18px; }
  .dialog-progress { padding: 0 18px; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
  .dialog-actions > div:last-child { width: 100%; }
  .dialog-actions .button { flex: 1; }
  .links-toolbar { align-items: flex-start; flex-direction: column; }
  .link-row { grid-template-columns: 72px 74px minmax(0, 1fr); }
  .link-row .table-action { grid-column: 1 / -1; justify-content: center; }
  .checkout-dialog { max-height: calc(100vh - 16px); border-radius: 20px; }
  .checkout-header,
  .checkout-summary,
  .coupon-section,
  .checkout-actions,
  .checkout-secure { padding-left: 20px; padding-right: 20px; }
  .checkout-guarantee,
  .checkout-status { margin-left: 20px; margin-right: 20px; }
  .checkout-product { grid-template-columns: 48px minmax(0, 1fr); }
  .checkout-product-icon { width: 48px; height: 48px; }
  .checkout-price { grid-column: 1 / -1; text-align: right; }
  .checkout-price small { text-align: right; }
  .checkout-metrics { grid-template-columns: 1fr; }
}

/* ---------- Mobile workspace refinement ---------- */

@media (max-width: 960px) {
  .sidebar { display: none; }
  .app-layout { gap: 0; }
}

@media (max-width: 700px) {
  html { scrollbar-gutter: auto; }

  .topbar {
    min-height: 58px;
    padding: 8px 12px;
    gap: 8px;
  }
  .brand { gap: 7px; }
  .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .brand span { font-size: 0.96rem; }
  .topbar-actions { gap: 6px; }
  .credit-pill {
    min-height: 36px;
    padding: 7px 10px;
    gap: 6px;
    font-size: 0.78rem;
  }
  .icon-button { width: 36px; height: 36px; }

  .app-layout {
    width: 100%;
    padding: 18px 14px calc(88px + env(safe-area-inset-bottom));
  }
  .main-content { width: 100%; padding: 0; gap: 18px; }
  .view { gap: 16px; }
  .view-heading { gap: 14px; }
  .view-heading > div {
    width: 100%;
    justify-items: center;
    gap: 7px;
    text-align: center;
  }
  .view-heading .eyebrow { justify-self: center; }
  .view-heading h1 {
    font-size: clamp(1.72rem, 8.2vw, 2rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }
  .view-heading p {
    max-width: 34rem;
    margin-inline: auto;
    font-size: 0.9rem;
    line-height: 1.55;
  }
  .view-heading .button { min-height: 46px; }
  .eyebrow { padding: 4px 8px; font-size: 0.64rem; letter-spacing: 0.07em; }

  .stats-grid,
  .analytics-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric-card {
    min-height: 0;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border-radius: 14px;
  }
  .metric-icon { width: 36px; height: 36px; font-size: 0.95rem; }
  .metric-card small { font-size: 0.62rem; line-height: 1.25; letter-spacing: 0.045em; }
  .metric-card strong { font-size: 1.32rem; line-height: 1.12; }
  .metric-card p { font-size: 0.7rem; line-height: 1.3; }

  .surface,
  .balance-card { padding: 16px; border-radius: 16px; }
  .surface-toolbar { gap: 12px; margin-bottom: 14px; }
  .surface-toolbar h2 { font-size: 1.08rem; }
  .surface-kicker { font-size: 0.64rem; letter-spacing: 0.09em; }
  .toolbar-controls { gap: 8px; }
  .search-control input { width: 100%; min-width: 0; }

  .billing-overview { gap: 12px; }
  .balance-card { gap: 10px; }
  .balance-number strong { font-size: 2.2rem; }
  .bucket-grid { gap: 8px; }
  .bucket-grid span { padding: 9px 10px; }
  .paygo-card,
  .cost-card { gap: 10px; }
  .amount-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .amount-presets button { width: 100%; padding: 7px 4px; }
  .cost-list { gap: 8px; }
  .cost-list > div { padding: 10px 11px; }
  .charge-note { align-items: flex-start; }

  .plan-section { gap: 12px; }
  .section-heading { gap: 8px; }
  .section-heading h2 { font-size: 1.2rem; line-height: 1.25; }
  .section-heading p { font-size: 0.82rem; line-height: 1.5; }
  .plans-grid { width: 100%; max-width: none; gap: 22px; padding-top: 18px; }
  .selection-option { width: 100%; min-width: 0; }
  .selection-card {
    width: 100%;
    min-height: 0;
    padding: 66px 18px 20px;
    border-radius: 20px;
  }
  .selection-price {
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    padding: 8px 12px;
    font-size: 1.35rem;
  }
  .selection-badge { top: 14px; right: 14px; padding: 5px 8px; font-size: 0.56rem; }
  .selection-flag { top: -13px; padding: 6px 13px; font-size: 0.62rem; }
  .selection-icon { width: 58px; height: 58px; margin-bottom: 14px; border-radius: 15px; }
  .selection-icon i { font-size: 1.65rem; }
  .selection-card h3 { font-size: 1.28rem; }
  .selection-head { margin-bottom: 15px; }
  .selection-head p { min-height: 0; font-size: 0.86rem; line-height: 1.52; }
  .selection-stats { gap: 6px; margin-bottom: 14px; }
  .selection-stat { padding: 10px 5px; border-radius: 12px; }
  .selection-stat strong { font-size: 0.96rem; }
  .selection-stat span { font-size: 0.58rem; letter-spacing: 0.06em; }
  .selection-list { margin-bottom: 14px; }
  .selection-list li { gap: 9px; padding: 6px 0; font-size: 0.82rem; }
  .selection-list li::before { width: 7px; height: 7px; }

  .result-filter-card { gap: 14px; }
  .result-filter-actions { width: 100%; gap: 9px; }
  .result-filter-actions .field,
  .analytics-filter-card .field { width: 100%; min-width: 0; }
  .result-filter-actions .button { width: 100%; }
  .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .result-stats article { gap: 3px; padding: 11px 9px; border-radius: 13px; }
  .result-stats small { font-size: 0.58rem; letter-spacing: 0.05em; line-height: 1.25; }
  .result-stats strong { font-size: 1.3rem; }
  .privacy-chip { width: fit-content; padding: 6px 10px; font-size: 0.68rem; line-height: 1.35; }

  .analytics-grid { gap: 12px; }
  .analytics-card { gap: 16px; }
  .analytics-card-heading { gap: 10px; }
  .analytics-card-heading h2 { font-size: 1.05rem; }
  .analytics-total { min-height: 28px; padding: 4px 8px; font-size: 0.66rem; }
  .analytics-bars { gap: 13px; }

  /* Convert wide desktop tables into compact, tappable mobile records. */
  #administrationTable,
  #resultsTable,
  #analyticsCohortTable { overflow: visible; }
  #administrationTable .table,
  #resultsTable .table,
  #analyticsCohortTable .table,
  #administrationTable tbody,
  #resultsTable tbody,
  #analyticsCohortTable tbody { display: block; width: 100%; }
  #administrationTable thead,
  #resultsTable thead,
  #analyticsCohortTable thead { display: none; }
  #administrationTable tbody,
  #resultsTable tbody,
  #analyticsCohortTable tbody { display: grid; gap: 10px; }
  #administrationTable tr,
  #resultsTable tr,
  #analyticsCohortTable tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 9px 12px;
    padding: 14px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }
  #administrationTable td,
  #resultsTable td,
  #analyticsCohortTable td {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  #administrationTable td:nth-child(1) { grid-column: 1; grid-row: 1; }
  #administrationTable td:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; }
  #administrationTable td:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 9px;
    border-top: 1px solid var(--line-soft);
    color: var(--ink);
    font-weight: 700;
  }
  #administrationTable td:nth-child(3)::before {
    content: "Cohort";
    display: block;
    margin-bottom: 2px;
    color: var(--muted-soft);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  #administrationTable td:nth-child(4) { grid-column: 1; grid-row: 3; align-self: end; }
  #administrationTable td:nth-child(5) { display: none; }
  #administrationTable td:nth-child(6) { grid-column: 2; grid-row: 3; align-self: end; text-align: right; color: var(--muted); font-size: 0.7rem; }
  #administrationTable td:nth-child(6)::before { content: "Expires"; display: block; margin-bottom: 2px; color: var(--muted-soft); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
  #administrationTable td:nth-child(7) { grid-column: 1 / -1; grid-row: 4; }

  #resultsTable td:nth-child(1) { grid-column: 1; grid-row: 1; }
  #resultsTable td:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: end; }
  #resultsTable td:nth-child(3) { grid-column: 1; grid-row: 2; }
  #resultsTable td:nth-child(5) { grid-column: 2; grid-row: 2; display: grid; justify-items: end; color: var(--ink); }
  #resultsTable td:nth-child(5)::before { content: "FSIQ"; color: var(--muted-soft); font-size: 0.56rem; font-weight: 800; letter-spacing: 0.08em; }
  #resultsTable td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 0.7rem; }
  #resultsTable td:nth-child(4)::before { content: "Completed: "; color: var(--muted-soft); font-weight: 800; }
  #resultsTable td:nth-child(6) { grid-column: 1 / -1; grid-row: 4; }

  #analyticsCohortTable td:nth-child(1) { grid-column: 1 / -1; grid-row: 1; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
  #analyticsCohortTable td:nth-child(2) { grid-column: 1; grid-row: 2; }
  #analyticsCohortTable td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right; }
  #analyticsCohortTable td:nth-child(4) { grid-column: 1; grid-row: 3; }
  #analyticsCohortTable td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; }
  #analyticsCohortTable td:nth-child(6) { grid-column: 1 / -1; grid-row: 4; color: var(--muted); }
  #analyticsCohortTable td:nth-child(7) { grid-column: 1 / -1; grid-row: 5; }
  #analyticsCohortTable td:nth-child(2)::before,
  #analyticsCohortTable td:nth-child(3)::before,
  #analyticsCohortTable td:nth-child(4)::before,
  #analyticsCohortTable td:nth-child(5)::before,
  #analyticsCohortTable td:nth-child(6)::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted-soft);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
  #analyticsCohortTable td:nth-child(2)::before { content: "Participants"; }
  #analyticsCohortTable td:nth-child(3)::before { content: "Completion"; }
  #analyticsCohortTable td:nth-child(4)::before { content: "In progress"; }
  #analyticsCohortTable td:nth-child(5)::before { content: "Credits"; }
  #analyticsCohortTable td:nth-child(6)::before { content: "Average completion"; }

  #administrationTable .table-actions,
  #resultsTable .table-actions,
  #analyticsCohortTable .table-actions { width: 100%; justify-content: stretch; }
  #administrationTable .table-action,
  #resultsTable .table-action,
  #analyticsCohortTable .table-action { width: 100%; min-height: 38px; justify-content: center; }

  .suite-footer { gap: 8px; padding: 12px 2px 4px; font-size: 0.72rem; line-height: 1.45; }
  .suite-footer div { display: flex; gap: 14px; }
  .suite-footer a { margin-left: 0; }

  .mobile-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.08);
  }
  .mobile-nav a { min-width: 0; padding: 7px 2px; font-size: 0.64rem; }
  .mobile-nav i { font-size: 1rem; }

  .modal-backdrop { padding: 8px; }
  .create-dialog { width: 100%; max-height: calc(100dvh - 16px); border-radius: 20px; }
  .dialog-header { padding: 18px 16px 10px; }
  .dialog-header h2 { font-size: 1.25rem; }
  .dialog-header p { font-size: 0.82rem; }
  .dialog-progress { padding: 0 16px 12px; }
  .dialog-body { padding: 4px 16px 18px; }
  .participant-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .participant-index-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .participant-context-grid > div,
  .participant-index-grid > div { padding: 11px 10px; }
  .participant-disclosure-toggle { padding: 13px 14px; }
  .participant-disclosure-body { padding: 10px 12px 13px; }
  .participant-score-list { grid-template-columns: 1fr; }
  .participant-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .participant-detail-actions .cost-preview { display: none; }
  .participant-detail-actions > div:last-child { width: 100%; }
  .assessment-choice {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
  }
  .choice-icon { width: 42px; height: 42px; }
  .choice-meta {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }
  .counter { grid-column: 2 / -1; justify-self: end; margin-left: 0; }
  .dialog-actions { padding: 12px 16px; }
  .dialog-actions > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-actions > div:last-child .button:only-child { grid-column: 1 / -1; }

  .checkout-backdrop { padding: 6px; }
  .checkout-dialog { width: 100%; max-height: calc(100dvh - 12px); border-radius: 18px; }
  .checkout-header { padding-top: 22px; }
  .checkout-header h2 { font-size: 1.35rem; }
  .checkout-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .checkout-metrics span { padding: 9px 5px; }
  .checkout-metrics small { font-size: 0.5rem; letter-spacing: 0.06em; }
  .toast { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; }
}
