/* tokens.css */
/*
 * Design tokens. The palette, gradient, radii and shadows are PassPartA's
 * (client/src/index.css and tailwind.config.ts in Part-A-Generator-Live),
 * kept so the product has the same identity: the indigo-to-sky gradient
 * page, white tiles with soft tinted washes, a 1.3rem radius and the
 * "seneca" shadow. Brand colours are mirrored in src/config/brand.ts.
 */

:root {
  /* The company mark's tile: the landing page's night with a soft light. */
  --mark-gradient: radial-gradient(circle at 78% 16%, rgba(134, 210, 255, 0.5), transparent 58%), linear-gradient(150deg, #0f0d2e 0%, #1c185a 52%, #2f2a8f 100%);
  color-scheme: light;

  /* Brand */
  --brand-1: #5b4ef0;
  --brand-2: #4d67f1;
  --brand-3: #3a6ce4;
  --brand-sky: #86d2ff;
  --brand-gradient: linear-gradient(90deg, var(--brand-1), var(--brand-3));
  --brand-gradient-diag: linear-gradient(135deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  --brand-gradient-hover: linear-gradient(90deg, #4f42e3, #346ce6);

  /*
   * The page: PassPartA's paid-dashboard gradient. It is sized to the page
   * (--app-gradient-size), so a long phone page shows the same rich range as
   * a short desktop one instead of scrolling into the pale band. The ISM
   * Code's version has the same lightness at every stop, in its green.
   */
  --app-gradient: linear-gradient(180deg, #5b4ef0 0%, #4d67f1 16%, #3f79f2 34%, #86d2ff 52%, #4f86ec 70%, #2e58c9 86%, #5b4ef0 100%);
  --app-gradient-ism: linear-gradient(180deg, #06816f 0%, #028b87 16%, #06929e 34%, #73dcd6 52%, #0c9ca8 70%, #006f82 86%, #06816f 100%);
  --app-gradient-size: 100% 260%;
  --brand-glow: rgba(67, 56, 202, 0.75);
  --accent-wash: rgba(99, 102, 241, 0.08);
  --accent-ring: rgba(79, 70, 229, 0.15);
  /* Charts: one series hue, and its ramp for the heat grid (validated, see docs/ARCHITECTURE.md). */
  --series: #4f46e5;
  --series-strong: #4338ca;
  --ramp-0: #e0e4ff;
  --ramp-1: #c7d0ff;
  --ramp-2: #a9b6fa;
  --ramp-3: #7b83f0;
  --ramp-4: #4f46e5;
  --ramp-5: #3730a3;
  --hero-gradient: linear-gradient(160deg, #4f3fe8 0%, #4d67f1 38%, #3f79f2 70%, #5aa8f5 100%);

  /* Ink */
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #475569;
  --muted-2: #64748b;
  --muted-3: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --card: rgba(255, 255, 255, 0.96);

  /* Indigo accents (PassPartA's) */
  --indigo-50: #eef0ff;
  --indigo-100: #e0e5ff;
  --indigo-200: #c7d0ff;
  --indigo-300: #a9b6fa;
  --indigo-400: #8f9ff7;
  --indigo-600: #4d67f1;
  --indigo-700: #4338ca;
  --indigo-900: #312e81;

  /* States */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --emerald-600: #059669;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-200: #fecaca;
  --red-300: #fca5a5;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --rose-600: #e11d48;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;

  /* Shape */
  --radius: 1.3rem;
  --radius-md: 1.05rem;
  --radius-sm: 0.75rem;
  --radius-pill: 999px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 60px -28px rgba(30, 27, 75, 0.45);
  --ring: 0 0 0 3px rgba(143, 159, 247, 0.55);

  /* Type */
  --font: "Inter", "InterVariable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --gutter: 16px;
  --container: 80rem;
  --coach-width: 380px;
  --header-height: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}
@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
  }
}

/* Inside the ISM Code's account the whole page takes the ISM colours, as on its landing card. */
html[data-framework="ism"] {
  /* The same lightness as SIRE 2.0's colours, stop for stop. */
  --brand-1: #018077;
  --brand-2: #0485a6;
  --brand-3: #0378cf;
  --brand-gradient-hover: linear-gradient(90deg, #02746c, #0578cd);
  --brand-glow: rgba(4, 133, 166, 0.75);
  /* The accent scale keeps its names but turns teal, so every card, pill and chart follows. */
  --indigo-50: #effcfa;
  --indigo-100: #d5f5f0;
  --indigo-200: #a7e6dd;
  --indigo-300: #6fcfc4;
  --indigo-400: #3bb3a8;
  --indigo-600: #0e7490;
  --indigo-700: #0f766e;
  --indigo-900: #134e4a;
  --accent-wash: rgba(20, 184, 166, 0.09);
  --accent-ring: rgba(13, 148, 136, 0.18);
  --series: #0e7490;
  --series-strong: #0f766e;
  --ramp-0: #dff5f2;
  --ramp-1: #b5e6df;
  --ramp-2: #86d3ca;
  --ramp-3: #4fb4ab;
  --ramp-4: #0e7490;
  --ramp-5: #134e4a;
  background-color: #06816f;
}

/* base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: #4f46e5;
  background-image: var(--app-gradient);
  background-size: var(--app-gradient-size);
  background-repeat: no-repeat;
  overflow-x: hidden;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  /* No background of its own: the page's gradient is the root's, and the ISM Code's fades in over it. */
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Switching framework fades one gradient into the other instead of jumping. */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #06816f;
  background-image: var(--app-gradient-ism);
  background-size: var(--app-gradient-size);
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 700ms ease;
}
html[data-framework="ism"] body::before {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  body::before {
    transition: none;
  }
}

/* The page's scroll bar: a slim, quiet thumb with no track of its own. */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.45) padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, 0.7);
}

/* The landing page sits on a light surface below its gradient hero. */
body.surface-light,
html:has(body.surface-light) {
  background: #f5f7ff;
}
body.surface-light::before {
  display: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
button:disabled {
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
table {
  border-collapse: collapse;
  width: 100%;
}

:focus {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--indigo-400);
  outline-offset: 2px;
  border-radius: 6px;
}
.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: #ffffff;
}

::selection {
  background: rgba(99, 102, 241, 0.25);
}

.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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 5000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--indigo-700);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: top 150ms ease;
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow {
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.stack > * + * {
  margin-top: var(--stack-gap, 16px);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.spacer {
  flex: 1;
}
.muted {
  color: var(--muted);
}
.muted-2 {
  color: var(--muted-2);
}
.small {
  font-size: 0.875rem;
}
.tiny {
  font-size: 0.75rem;
}
.strong {
  font-weight: 600;
}
/* Headings and emphasis default to semibold, never the browser's heavy bold. */
h1,
h2,
h3,
h4,
strong,
b {
  font-weight: 600;
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.text-white {
  color: #fff;
}
.text-balance {
  text-wrap: balance;
}
.link {
  color: var(--indigo-600);
  font-weight: 500;
  text-underline-offset: 3px;
}
.link:hover {
  text-decoration: underline;
}

/* Boot and failure screens (index.html renders the first before any script runs). */
.boot-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: #fff;
  font-family: var(--font);
  font-weight: 500;
}
.boot-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-top-color: transparent;
  animation: spin 0.9s linear infinite;
}
.noscript-note {
  margin: 24px;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: none;
  }
}

.fade-up {
  animation: fadeUp 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.fade-in {
  animation: fadeIn 300ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* components.css */
/* ------------------------------------------------------------- buttons */

.btn {
  --btn-h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
  user-select: none;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.btn-sm {
  --btn-h: 36px;
  padding: 0 12px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  --btn-h: 52px;
  padding: 0 24px;
  font-size: 1rem;
  border-radius: 1.1rem;
}
.btn-block {
  width: 100%;
}
.btn-wrap {
  white-space: normal;
}

.btn-primary {
  color: #fff;
  background-image: var(--brand-gradient);
  background-color: var(--brand-2);
  box-shadow: 0 10px 22px -12px var(--brand-glow);
}
.btn-primary:hover {
  background-image: var(--brand-gradient-hover);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-outline {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line-2);
}
.btn-outline:hover {
  background: var(--indigo-50);
  border-color: var(--indigo-300);
  color: var(--indigo-900);
}
.btn-ghost {
  color: var(--ink-3);
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
}
.btn-soft {
  color: var(--indigo-700);
  background: var(--indigo-50);
  border-color: var(--indigo-200);
}
.btn-soft:hover {
  background: var(--indigo-100);
}
.btn-white {
  color: var(--indigo-900);
  background: #fff;
  box-shadow: 0 12px 26px -14px rgba(15, 23, 42, 0.5);
}
.btn-white:hover {
  background: var(--indigo-50);
}
.btn-glass {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
}
.btn-danger {
  color: #fff;
  background: var(--red-600);
}
.btn-danger:hover {
  background: var(--red-700);
}
.btn-danger-outline {
  color: var(--red-700);
  background: #fff;
  border-color: var(--red-200);
}
.btn-danger-outline:hover {
  background: var(--red-50);
  border-color: var(--red-300);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--muted-2);
  transition: background-color 150ms ease, color 150ms ease;
}
.icon-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--indigo-600);
  font-weight: 600;
  font-size: 0.875rem;
  min-height: 36px;
}
.text-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn svg {
  width: 16px;
  height: 16px;
}

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 20px;
}
@media (min-width: 640px) {
  .card-pad {
    padding: 24px;
  }
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}
.panel {
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fff;
}
.panel-soft {
  border-radius: 1rem;
  border: 1px solid var(--indigo-100);
  background: var(--indigo-50);
  color: var(--indigo-900);
}
.panel-dashed {
  border-radius: 1rem;
  border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.8);
}

/* --------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.pill svg {
  width: 13px;
  height: 13px;
}
.pill-indigo {
  border-color: var(--indigo-200);
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.pill-green {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.pill-red {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}
.pill-amber {
  border-color: var(--amber-200);
  background: var(--amber-50);
  color: var(--amber-800);
}
.pill-slate {
  border-color: var(--line);
  background: var(--surface-3);
  color: var(--muted);
}
.pill-glass {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.pill-solid {
  border-color: transparent;
  background: var(--brand-gradient);
  color: #fff;
}
.pill-caps {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

/* ------------------------------------------------------------- progress */

.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--brand-gradient);
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-thin {
  height: 6px;
}
.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-gradient);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-fill.good {
  background: linear-gradient(90deg, #10b981, #16a34a);
}
.bar-fill.mid {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.bar-fill.low {
  background: linear-gradient(90deg, #fb7185, #ef4444);
}

/* ----------------------------------------------------------------- tiles */
/* PassPartA's dashboard tiles: white with a faint tinted wash, a lift on hover,
   and an icon that moves once while hovered. */

.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  border-radius: var(--radius);
  background: var(--tone-wash, #fff);
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform 300ms ease, box-shadow 300ms ease, background-color 300ms ease;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
@media (hover: none) {
  .tile:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
}
.tile-primary {
  padding: 18px;
  min-height: 112px;
}
.tile-topic {
  padding: 14px 16px;
  min-height: 92px;
}
.tile-thin {
  padding: 16px 18px;
  min-height: 84px;
  border-radius: var(--radius);
}
.tile-aside {
  margin-left: auto;
  flex-shrink: 0;
  display: grid;
  justify-items: end;
  align-content: center;
  padding-left: 8px;
  color: var(--tone-icon, var(--indigo-700));
}
.tile-count {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tile-count-label {
  font-size: 0.72rem;
  color: var(--muted-2);
}
.tile-arrow {
  width: 20px;
  height: 20px;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tile:hover .tile-arrow {
  transform: translateX(4px);
}
@media (min-width: 640px) {
  .tile-primary {
    padding: 24px;
    gap: 22px;
  }
  .tile-topic {
    padding: 16px 18px;
  }
}
.tile-icon {
  flex-shrink: 0;
  color: var(--tone-icon, var(--indigo-600));
}
.tile-primary .tile-icon svg {
  width: 36px;
  height: 36px;
}
.tile-topic .tile-icon svg,
.tile-thin .tile-icon svg {
  width: 28px;
  height: 28px;
}
@media (min-width: 640px) {
  .tile-primary .tile-icon svg {
    width: 42px;
    height: 42px;
  }
  .tile-topic .tile-icon svg {
    width: 32px;
    height: 32px;
  }
}
.tile-body {
  min-width: 0;
  flex: 1;
}
.tile-title {
  display: block;
  font-weight: 600;
  font-size: 1.0625rem;
  color: #1f2937;
  letter-spacing: -0.005em;
}
.tile-primary .tile-title {
  font-size: 1.2rem;
}
@media (min-width: 640px) {
  .tile-primary .tile-title {
    font-size: 1.3rem;
  }
}
.tile-subtitle {
  display: block;
  color: #4b5563;
  font-size: 0.875rem;
}
.tile-meta {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.78rem;
}
.tile-meta.alert {
  color: var(--red-600);
  font-weight: 600;
}
.tile-corner {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--muted-3);
}
.tile-corner svg {
  width: 16px;
  height: 16px;
  transition: transform 300ms ease;
}
.tile[aria-expanded="true"] .tile-corner svg {
  transform: rotate(180deg);
}
.tile-mini-bar {
  margin-top: 8px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}
.tile-mini-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

/* Sub-tiles that drop down beneath an expandable tile (PassPartA's nav-tile-expand). */
.expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.expand.open {
  grid-template-rows: 1fr;
}
.expand > div {
  overflow: hidden;
  min-height: 0;
}
.subtile-grid {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 560px) {
  .subtile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .subtile-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.subtile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border-radius: 1rem;
  text-align: left;
  background: var(--tone-wash, #fff);
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  transition: transform 300ms ease, box-shadow 300ms ease;
}
.subtile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.subtile .tile-icon svg {
  width: 26px;
  height: 26px;
}
.subtile-glow {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4338ca 60%, #1e1447);
}
.subtile-glow .tile-title,
.subtile-glow .tile-icon {
  color: #fff;
}
.subtile-glow .tile-subtitle {
  color: #ddd6fe;
}

/* Tones: PassPartA's washes and icon colours. */
.tone-indigo {
  --tone-wash: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(255, 255, 255, 0.96) 45%, rgba(59, 130, 246, 0.04));
  --tone-icon: #7c3aed;
  --tone-bar: linear-gradient(90deg, #8b5cf6, #6366f1);
}
.tone-red {
  --tone-wash: linear-gradient(135deg, rgba(239, 68, 68, 0.055), rgba(255, 255, 255, 0.96) 48%, rgba(249, 115, 22, 0.04));
  --tone-icon: #ef4444;
  --tone-bar: linear-gradient(90deg, #fb7185, #ef4444);
}
.tone-blue {
  --tone-wash: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(255, 255, 255, 0.96) 50%, rgba(59, 130, 246, 0.035));
  --tone-icon: #4d67f1;
  --tone-bar: linear-gradient(90deg, #38bdf8, #4d67f1);
}
.tone-amber {
  --tone-wash: linear-gradient(135deg, rgba(245, 158, 11, 0.07), rgba(255, 255, 255, 0.965) 50%, rgba(217, 119, 6, 0.035));
  --tone-icon: #b45309;
  --tone-bar: linear-gradient(90deg, #fbbf24, #d97706);
}
.tone-green {
  --tone-wash: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(255, 255, 255, 0.965) 50%, rgba(16, 185, 129, 0.04));
  --tone-icon: #16a34a;
  --tone-bar: linear-gradient(90deg, #34d399, #16a34a);
}
.tone-teal {
  --tone-wash: linear-gradient(135deg, rgba(13, 148, 136, 0.055), rgba(255, 255, 255, 0.965) 50%, rgba(45, 212, 191, 0.035));
  --tone-icon: #0d9488;
  --tone-bar: linear-gradient(90deg, #2dd4bf, #0d9488);
}
.tone-cyan {
  --tone-wash: linear-gradient(135deg, rgba(6, 182, 212, 0.055), rgba(255, 255, 255, 0.965) 50%, rgba(59, 130, 246, 0.035));
  --tone-icon: #0891b2;
  --tone-bar: linear-gradient(90deg, #22d3ee, #0891b2);
}
.tone-slate {
  --tone-wash: linear-gradient(135deg, rgba(100, 116, 139, 0.05), rgba(255, 255, 255, 0.97) 50%, rgba(148, 163, 184, 0.03));
  --tone-icon: #475569;
  --tone-bar: linear-gradient(90deg, #94a3b8, #475569);
}
.tone-violet {
  --tone-wash: linear-gradient(135deg, rgba(139, 92, 246, 0.055), rgba(255, 255, 255, 0.965) 50%, rgba(99, 102, 241, 0.035));
  --tone-icon: #6d28d9;
  --tone-bar: linear-gradient(90deg, #a78bfa, #6d28d9);
}
.tone-rose {
  --tone-wash: linear-gradient(135deg, rgba(244, 63, 94, 0.05), rgba(255, 255, 255, 0.965) 50%, rgba(236, 72, 153, 0.03));
  --tone-icon: #be123c;
  --tone-bar: linear-gradient(90deg, #fb7185, #be123c);
}

/* Icon movements on hover: each kind of tile has its own (after PassPartA's
   tiles: rocking anchors, rolling ships, turning pages, rattling locks). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile:hover .anim-anchor,
  .subtile:hover .anim-anchor {
    animation: anchorRock 1.5s ease-in-out;
  }
  .tile:hover .anim-compass,
  .subtile:hover .anim-compass {
    animation: compassSpin 2s ease-in-out;
  }
  .tile:hover .anim-ship,
  .subtile:hover .anim-ship {
    animation: shipRoll 2s ease-in-out;
  }
  .tile:hover .anim-package {
    animation: packageOpen 1s ease-in-out;
  }
  .tile:hover .anim-alert {
    animation: alertFlash 1.2s ease-in-out;
  }
  .tile:hover .anim-lifebuoy {
    animation: buoySwing 1.4s ease-in-out;
  }
  .tile:hover .anim-cog {
    animation: cogSpin 1.5s ease-in-out;
  }
  .tile:hover .anim-wrench {
    animation: wrenchTurn 1s ease-in-out;
  }
  .tile:hover .anim-check {
    animation: checkDraw 1.2s ease-in-out;
  }
  .tile:hover .anim-file {
    animation: pageTurn 900ms ease-in-out;
  }
  .tile:hover .anim-clipboard {
    animation: clipLift 620ms ease-in-out;
  }
  .tile:hover .anim-target {
    animation: aimSweep 1.1s ease-in-out;
  }
  .tile:hover .anim-users {
    animation: groupHop 700ms ease-in-out;
  }
  .tile:hover .anim-building {
    animation: buildingRise 900ms cubic-bezier(0.3, 0.7, 0.3, 1);
  }
  .tile:hover .anim-lock {
    animation: lockRattle 460ms ease-in-out;
  }
  .tile:hover .anim-droplet {
    animation: dropBounce 1.1s ease-in-out;
  }
  .tile:hover .anim-x,
  .subtile:hover .anim-x {
    animation: xGrow 240ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .tile:hover .anim-star {
    animation: starTwirl 900ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .tile:hover .anim-sparkles {
    animation: sparkleTwinkle 900ms ease-in-out;
  }
  .tile:hover .anim-chart {
    animation: barsGrow 800ms cubic-bezier(0.3, 0.7, 0.3, 1);
  }
}
@keyframes alertFlash {
  0%, 100% { filter: brightness(1); transform: translateX(0); }
  20% { filter: brightness(1.5) drop-shadow(0 0 8px currentColor); transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { filter: brightness(1.4) drop-shadow(0 0 6px currentColor); transform: translateX(-1px); }
}
@keyframes buoySwing {
  0%, 100% { transform: rotate(0) translateY(0); }
  30% { transform: rotate(-24deg) translateY(-2px); }
  65% { transform: rotate(16deg) translateY(1px); }
}
@keyframes wrenchTurn {
  0%, 100% { transform: rotate(0); }
  40% { transform: rotate(-34deg); }
  70% { transform: rotate(6deg); }
}
@keyframes pageTurn {
  0%, 100% { transform: perspective(60px) rotateY(0); }
  40% { transform: perspective(60px) rotateY(-28deg); }
  75% { transform: perspective(60px) rotateY(14deg); }
}
@keyframes clipLift {
  0%, 100% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(-3px) rotate(-6deg); }
}
@keyframes aimSweep {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-18deg); }
  65% { transform: rotate(12deg); }
}
@keyframes groupHop {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-2px); }
}
@keyframes buildingRise {
  0% { transform: scaleY(1); }
  35% { transform: scaleY(0.88); }
  70% { transform: scaleY(1.06); }
  100% { transform: scaleY(1); }
}
@keyframes lockRattle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  50% { transform: rotate(9deg); }
  75% { transform: rotate(-5deg); }
}
@keyframes starTwirl {
  0% { transform: rotate(0) scale(1); }
  60% { transform: rotate(144deg) scale(1.15); }
  100% { transform: rotate(144deg) scale(1); }
}
@keyframes sparkleTwinkle {
  0%, 100% { transform: rotate(0) scale(1); filter: brightness(1); }
  45% { transform: rotate(-18deg) scale(1.18); filter: brightness(1.3) drop-shadow(0 0 4px rgba(250, 204, 21, 0.6)); }
}
@keyframes barsGrow {
  0% { transform: scaleY(1); }
  30% { transform: scaleY(0.55); }
  100% { transform: scaleY(1); }
}
.anim-building,
.anim-chart {
  transform-origin: 50% 100%;
}
.anim-wrench {
  transform-origin: 30% 70%;
}
@keyframes anchorRock {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  25% { transform: rotate(-15deg) translateX(-2px); }
  75% { transform: rotate(15deg) translateX(2px); }
}
@keyframes compassSpin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}
@keyframes shipRoll {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  25% { transform: rotate(-8deg) translateX(-3px); }
  50% { transform: rotate(0deg) translateX(0); }
  75% { transform: rotate(8deg) translateX(3px); }
}
@keyframes packageOpen {
  0%, 100% { transform: scaleY(1) translateY(0); }
  50% { transform: scaleY(0.82) translateY(-3px); }
}
@keyframes emergencyGlow {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.5) drop-shadow(0 0 10px currentColor); transform: scale(1.1); }
}
@keyframes cogSpin {
  to { transform: rotate(360deg); }
}
@keyframes checkDraw {
  0% { transform: scale(1); opacity: 1; }
  20% { transform: scale(0.82); opacity: 0.7; }
  60% { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes radioPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.75; }
}
@keyframes dropBounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  70% { transform: translateY(1px); }
}
@keyframes xGrow {
  to { transform: scale(1.22); }
}
@keyframes starShine {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.2); filter: brightness(1.6) drop-shadow(0 0 8px currentColor); }
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #fff, var(--stat-tint, var(--indigo-50)));
  box-shadow: var(--shadow);
  min-width: 0;
  text-align: left;
}
button.stat {
  transition: transform 300ms ease, box-shadow 300ms ease;
}
button.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.stat-icon {
  flex-shrink: 0;
  color: var(--stat-colour, var(--indigo-600));
}
.stat-icon svg {
  width: 18px;
  height: 18px;
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--stat-colour, var(--indigo-700));
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-2);
  margin-left: 2px;
}
.stat-green {
  --stat-tint: #f0fdf4;
  --stat-colour: #16a34a;
}
.stat-amber {
  --stat-tint: #fefce8;
  --stat-colour: #d97706;
}
.stat-indigo {
  --stat-tint: #eef0ff;
  --stat-colour: #4338ca;
}
.stat-red {
  --stat-tint: #fef2f2;
  --stat-colour: #dc2626;
}
.stat-purple {
  --stat-tint: #faf5ff;
  --stat-colour: #9333ea;
}

/* --------------------------------------------------------------- header */

.app-header {
  position: relative;
  z-index: 30;
  padding: 12px 0;
}
.app-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  color: #fff;
}
.brand-mark {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-gradient-diag);
  box-shadow: 0 6px 14px -6px rgba(30, 27, 75, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  color: #fff;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
}
/*
 * The company mark: PassPart's brain. On dark backgrounds a white tile with
 * lines in the night gradient; on light ones the night tile with white lines.
 */
.brand-mark.company {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.55);
  transition: box-shadow 420ms ease;
}
.brand-mark.company::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--mark-gradient);
  opacity: 0;
  transition: opacity 420ms ease;
}
.brand-mark.company svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 23px;
  height: 23px;
  transition: opacity 420ms ease;
}
.brand-mark.company .mark-lines-light {
  opacity: 0;
}
.brand.on-light .brand-mark.company {
  box-shadow: 0 6px 16px -6px rgba(15, 13, 46, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.brand.on-light .brand-mark.company::before,
.brand.on-light .brand-mark.company .mark-lines-light {
  opacity: 1;
}
.brand.on-light .brand-mark.company .mark-lines-dark {
  opacity: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.brand-name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
.brand-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}
.brand.on-light {
  color: var(--ink);
}
.brand.on-light .brand-name {
  text-shadow: none;
}

.fw-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
/* The white pill behind the chosen framework, sliding when it changes. */
.fw-switch-pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 10px -4px rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: transform 460ms cubic-bezier(0.65, 0, 0.35, 1), opacity 200ms ease;
}
.fw-switch.at-0 .fw-switch-pill,
.fw-switch.at-1 .fw-switch-pill {
  opacity: 1;
}
.fw-switch.at-1 .fw-switch-pill {
  transform: translateX(calc(100% + 2px));
}
@media (prefers-reduced-motion: reduce) {
  .fw-switch-pill {
    transition: none;
  }
}
.fw-switch a,
.fw-switch button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 160ms ease, color 360ms ease;
}
.fw-switch a:hover {
  background: rgba(255, 255, 255, 0.14);
}
.fw-switch a[aria-current="true"] {
  color: var(--indigo-900);
}
.fw-switch a[aria-current="true"]:hover {
  background: transparent;
}
/* The framework's name and page fade in when switching, rather than jumping. */
.fw-mark-wrap {
  display: inline-flex;
  min-width: 0;
}
.fw-fade {
  animation: fwFade 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes fwFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
/* The page itself only fades: a moving wrapper would carry its fixed bars with it. */
.app-main > .fw-fade {
  animation-name: fwFadeOnly;
}
@keyframes fwFadeOnly {
  from {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fw-fade {
    animation: none;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 550;
}
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.nav-links svg {
  width: 16px;
  height: 16px;
}

/* Bottom navigation on phones and small tablets. */
.mobile-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, 0.4);
}
@media (min-width: 900px) {
  .mobile-nav {
    display: none;
  }
}
.mobile-nav a,
.mobile-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  border-radius: 12px;
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 600;
}
.mobile-nav svg {
  width: 21px;
  height: 21px;
}
.mobile-nav [aria-current="page"] {
  color: var(--indigo-700);
  background: var(--indigo-50);
}
.has-mobile-nav {
  padding-bottom: calc(76px + var(--safe-bottom));
}
@media (min-width: 900px) {
  .has-mobile-nav {
    padding-bottom: 0;
  }
}

/* ---------------------------------------------------------------- dialog */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 180ms ease both;
  overflow-y: auto;
}
.dialog {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 1.6rem;
  background: #fff;
  box-shadow: 0 28px 70px -24px rgba(15, 23, 42, 0.6);
  animation: popIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.dialog-wide {
  max-width: 54rem;
}
.dialog-body {
  padding: 22px;
}
@media (min-width: 640px) {
  .dialog-body {
    padding: 28px;
  }
}
.dialog-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding-right: 36px;
}
.dialog-description {
  margin-top: 6px;
  color: var(--muted);
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
@media (max-width: 479px) {
  .dialog-actions > .btn {
    flex: 1 1 100%;
  }
}

/* ----------------------------------------------------------------- toast */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  z-index: 4000;
  display: grid;
  gap: 8px;
  width: min(92vw, 26rem);
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-size: 0.875rem;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.6);
  animation: popIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: auto;
}
.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #86efac;
}

/* ------------------------------------------------------------------ tabs */

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-3);
}
.tabs button {
  flex: 1;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------- notices */

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.notice-info {
  background: var(--indigo-50);
  border: 1px solid var(--indigo-200);
  color: var(--indigo-900);
}
.notice-amber {
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  color: var(--amber-800);
}
.notice-glass {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-heading h2 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
.section-heading p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 32px 20px;
  text-align: center;
}
.empty svg {
  width: 36px;
  height: 36px;
  color: var(--indigo-400);
}
.empty h1,
.empty h3 {
  font-size: 1.05rem;
  font-weight: 600;
}
.empty p {
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 3px solid var(--indigo-600);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

.kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
  color: var(--ink-3);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 16px 0;
}

/* -------------------------------------------------------------- footer */

.app-footer {
  padding: 28px 0 36px;
}
@media (min-width: 900px) {
  .app-footer {
    padding-bottom: 104px;
  }
}
.app-footer {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
}
.app-footer a {
  color: #fff;
  font-weight: 600;
}
.app-footer a:hover {
  text-decoration: underline;
}
.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}

/* ----------------------------------------------------------------- forms */

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
}
.form-optional {
  font-weight: 500;
  color: var(--muted-2);
}
.form-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  font: inherit;
  font-size: 1rem; /* 16px keeps phones from zooming in on focus */
  color: var(--ink);
}
.form-input:focus {
  outline: none;
  border-color: var(--indigo-400);
  box-shadow: var(--ring);
}
.form-field.has-error .form-input {
  border-color: var(--red-300);
  background: var(--red-50);
}
select.form-input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}
.form-error {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red-700);
}
.form-row {
  display: grid;
  gap: 14px;
}
@media (min-width: 560px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* The bot trap: out of sight and out of the tab order. */
.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-privacy {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--muted);
}
.form-privacy svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ------------------------------------------------- guided demo walkthrough */

.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(15, 23, 42, 0.5);
  animation: fadeIn 250ms ease both;
  pointer-events: none;
}
.tour-spot {
  position: fixed;
  z-index: 2200;
  border-radius: 18px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 9999px rgba(15, 23, 42, 0.5);
  pointer-events: none;
  /* It follows its target exactly (no easing), so a layout change never makes it overshoot and settle. */
  animation: fadeIn 300ms ease both;
}
.tour-card {
  position: fixed;
  z-index: 2300;
  width: min(360px, calc(100vw - 24px));
  padding: 16px 16px 14px;
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(15, 23, 42, 0.04);
  animation: tourIn 320ms ease both;
}
@keyframes tourIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
.tour-centre {
  top: 50%;
  left: 50%;
  width: min(440px, calc(100vw - 32px));
  padding: 22px 22px 18px;
  transform: translate(-50%, -50%);
  animation: tourInCentre 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes tourInCentre {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(0.98);
  }
}
.tour-inline {
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 12px 16px;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--indigo-100);
  box-shadow: inset 4px 0 0 var(--indigo-600), 0 8px 24px -18px rgba(15, 23, 42, 0.5);
  animation: fadeUp 300ms ease both;
}
.tour-inline-title {
  margin-top: 4px;
  font-weight: 600;
  color: var(--ink);
}
.tour-inline .tour-text {
  margin-top: 0;
}
.tour-inline .text-btn {
  margin-top: 4px;
  font-size: 0.8rem;
}
.tour-sheet,
.tour-paused {
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  width: auto;
  max-width: 440px;
  margin: 0 auto;
}
@media (max-width: 899px) {
  .tour-sheet,
  .tour-paused {
    bottom: calc(80px + var(--safe-bottom));
  }
}
@media (min-width: 900px) {
  .tour-paused {
    left: auto;
    right: 24px;
    bottom: 24px;
    margin: 0;
    width: 340px;
  }
}
.tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tour-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-700);
}
.tour-kicker svg {
  width: 14px;
  height: 14px;
}
.tour-close {
  margin: -6px -6px -6px 0;
}
.tour-title {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}
.tour-centre .tour-title {
  font-size: 1.25rem;
}
.tour-text {
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.tour-progress {
  display: flex;
  gap: 4px;
  margin-top: 12px;
}
.tour-progress span {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 300ms ease;
}
.tour-progress span.done {
  background: var(--indigo-300);
}
.tour-progress span.current {
  background: var(--indigo-600);
}
.tour-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
@media (max-width: 479px) {
  .tour-sheet .tour-text {
    font-size: 0.84rem;
  }
}

/* quiz.css */
/* ------------------------------------------------------------ quiz shell */

.quiz-shell {
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding: 8px 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.quiz-topbar {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.5);
}
@media (min-width: 640px) {
  .quiz-topbar {
    padding: 12px 16px;
  }
}
.quiz-topbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiz-exit {
  flex-shrink: 0;
  padding-left: 6px;
}
.quiz-title {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.quiz-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quiz-count {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.quiz-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.quiz-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiz-progress-row .progress {
  flex: 1;
}
.quiz-score {
  color: var(--muted);
  white-space: nowrap;
}
.timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-3);
  font-weight: 600;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.timer svg {
  width: 15px;
  height: 15px;
}
.timer.low {
  border-color: var(--amber-200);
  background: var(--amber-50);
  color: var(--amber-700);
}
/* Phones, timed: the clock stays beside the title and Submit drops beside the progress bar. */
@media (max-width: 479px) {
  .quiz-topbar.has-timer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "exit title timer"
      "progress progress submit";
    column-gap: 8px;
  }
  .quiz-topbar.has-timer .quiz-topbar-row,
  .quiz-topbar.has-timer .quiz-topbar-actions {
    display: contents;
  }
  .quiz-topbar.has-timer .quiz-exit {
    grid-area: exit;
  }
  .quiz-topbar.has-timer .quiz-title {
    grid-area: title;
  }
  .quiz-topbar.has-timer .timer {
    grid-area: timer;
  }
  .quiz-topbar.has-timer .quiz-topbar-actions > .btn {
    grid-area: submit;
  }
  .quiz-topbar.has-timer .quiz-progress-row {
    grid-area: progress;
  }
}
.timer > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.timer-toggle {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: -6px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.timer-toggle:hover {
  background: rgba(15, 23, 42, 0.06);
}
.timer-toggle svg {
  width: 13px;
  height: 13px;
}
.timer.paused {
  border-color: var(--indigo-200);
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.timer.paused [role="timer"] {
  animation: timerBlink 1.6s ease-in-out infinite;
}
@keyframes timerBlink {
  50% {
    opacity: 0.45;
  }
}

/* -------------------------------------------- mock: location on the route */

.station-bar {
  display: grid;
  gap: 8px;
  padding: 10px 14px 12px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.5);
}
.station-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}
.station-steps li {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color 400ms ease;
}
.station-steps li.done {
  background: var(--indigo-300);
}
.station-steps li.current {
  background: var(--indigo-600);
}
.station-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  animation: stationIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.station-name {
  font-weight: 600;
  color: var(--ink);
}
.station-where {
  font-size: 0.82rem;
  color: var(--muted);
}
@keyframes stationIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.paused-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 36px 20px;
  animation: fadeUp 300ms ease both;
}
.paused-card .dialog-actions {
  justify-content: center;
}
.paused-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--indigo-50);
  color: var(--indigo-600);
}
.paused-icon svg {
  width: 20px;
  height: 20px;
}

/* ---------------------------------------------------------- question card */

.question-card {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--indigo-600);
  animation: fadeUp 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (min-width: 640px) {
  .question-card {
    padding: 22px 26px 16px;
  }
}
.question-card.marked-correct {
  border-left-color: var(--green-600);
}
.question-card.marked-incorrect,
.question-card.marked-partial {
  border-left-color: var(--red-600);
}
.question-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}
.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.question-prompt {
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  outline: none;
}
@media (min-width: 640px) {
  .question-prompt {
    font-size: 1.22rem;
  }
}
.question-id {
  margin-top: 14px;
  color: var(--muted-3);
  text-align: right;
}
.bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted-3);
  font-size: 0.8rem;
  font-weight: 600;
  transition: color 150ms ease, background-color 150ms ease;
}
.bookmark-btn.compact {
  width: 40px;
  justify-content: center;
  padding: 0;
}
.bookmark-btn svg {
  width: 19px;
  height: 19px;
}
.bookmark-btn:hover {
  color: var(--amber-500);
  background: var(--amber-50);
}
.bookmark-btn.saved {
  color: var(--amber-500);
}

.answer-area {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.answer-instruction {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.scenario {
  border-radius: 1.1rem;
  border: 1px solid var(--indigo-100);
  background: linear-gradient(135deg, #f8faff, var(--indigo-50));
  padding: 14px 16px;
  color: var(--indigo-900);
  line-height: 1.6;
  font-size: 0.97rem;
}
.scenario-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--indigo-700);
}
.scenario-label svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------- options */

.options {
  display: grid;
  gap: 10px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 1.65rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-sm);
  text-align: left;
  color: var(--ink-3);
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.option:not(:disabled):hover {
  border-color: var(--indigo-300);
  background: rgba(238, 240, 255, 0.7);
}
.option:not(:disabled):active {
  transform: scale(0.995);
}
.option:disabled {
  cursor: default;
}
.option-letter {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 150ms ease;
}
.option-text {
  flex: 1;
  min-width: 0;
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.45;
}
.option-selected {
  border-color: var(--indigo-300);
  background: rgba(238, 240, 255, 0.75);
  color: var(--ink);
}
.option-selected .option-letter {
  border-color: var(--indigo-600);
  background: var(--indigo-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.option-correct {
  border-color: var(--green-300);
  background: var(--green-50);
  color: var(--ink);
}
.option-incorrect {
  border-color: var(--red-300);
  background: var(--red-50);
  color: var(--ink);
}
.option-missed {
  border-color: var(--green-300);
  background: rgba(240, 253, 244, 0.7);
}
.option-correct .option-letter,
.option-missed .option-letter {
  border-color: var(--green-300);
  background: var(--green-600);
  color: #fff;
}
.option-incorrect .option-letter {
  border-color: var(--red-300);
  background: var(--red-600);
  color: #fff;
}
.option-ring {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--indigo-400);
}
.option-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.option-mark.ok {
  color: var(--green-600);
}
.option-mark.bad {
  color: var(--red-600);
}
.option-pill {
  flex-shrink: 0;
}

/* ------------------------------------------------------------ true/false */

.tf-list {
  display: grid;
  gap: 10px;
}
.tf-row {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 1.65rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  transition: background-color 150ms ease, border-color 150ms ease;
}
@media (min-width: 640px) {
  .tf-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 16px;
    min-height: 62px;
  }
  .tf-correction {
    grid-column: 1 / -1;
  }
}
.tf-selected {
  border-color: var(--indigo-300);
  background: rgba(238, 240, 255, 0.7);
}
.tf-correct {
  border-color: var(--green-300);
  background: rgba(240, 253, 244, 0.85);
}
.tf-incorrect,
.tf-missing {
  border-color: var(--red-300);
  background: rgba(254, 242, 242, 0.85);
}
.tf-text {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-3);
}
.tf-number {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 1px;
}
.tf-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tf-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) {
  .tf-toggle {
    width: 11rem;
    height: 44px;
  }
}
.tf-slider {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  opacity: 0;
  transition: transform 200ms ease, background-color 200ms ease, opacity 150ms ease;
}
.tf-toggle.at-false .tf-slider {
  transform: translateX(100%);
}
.slider-true .tf-slider {
  opacity: 1;
  background: var(--emerald-600);
}
.slider-false .tf-slider {
  opacity: 1;
  background: var(--rose-600);
}
.slider-correct .tf-slider {
  opacity: 1;
  background: var(--green-600);
}
.slider-incorrect .tf-slider {
  opacity: 1;
  background: var(--red-600);
}
.slider-true,
.slider-false {
  border-color: var(--indigo-300);
}
.slider-correct {
  border-color: #4ade80;
}
.slider-incorrect {
  border-color: #f87171;
}
.tf-toggle button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
.tf-toggle button svg {
  width: 15px;
  height: 15px;
}
.tf-toggle button.on {
  color: #fff;
}
.tf-toggle button.off-true {
  color: #065f46;
}
.tf-toggle button.off-false {
  color: #be123c;
}
.tf-toggle button:disabled {
  cursor: default;
}
.tf-correction {
  font-size: 0.85rem;
  color: var(--red-800);
}

/* -------------------------------------------------------------- matching */

.match-layout {
  display: grid;
  gap: 14px;
}
@media (min-width: 860px) {
  .match-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }
}
.match-heading {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.match-answers ul {
  display: grid;
  gap: 8px;
}
.match-answer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 1rem;
  border: 1px solid var(--indigo-100);
  background: #f7f8ff;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--indigo-900);
  transition: opacity 150ms ease;
}
.match-answer.used {
  opacity: 0.6;
}
.match-letter {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--indigo-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.match-items ol {
  display: grid;
  gap: 10px;
}
.match-item {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: #fff;
}
.match-selected {
  border-color: var(--indigo-300);
  background: rgba(238, 240, 255, 0.55);
}
.match-correct {
  border-color: var(--green-300);
  background: rgba(240, 253, 244, 0.85);
}
.match-incorrect,
.match-missing {
  border-color: var(--red-300);
  background: rgba(254, 242, 242, 0.85);
}
.match-item-text {
  display: flex;
  gap: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-3);
}
.match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 34px;
}
.match-chip {
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 150ms ease;
}
.match-chip:not(:disabled):hover {
  border-color: var(--indigo-300);
  background: var(--indigo-50);
}
.match-chip:disabled {
  cursor: default;
}
.chip-chosen {
  border-color: var(--indigo-600);
  background: var(--indigo-600);
  color: #fff;
}
.chip-used {
  border-style: dashed;
  color: var(--muted-3);
}
.chip-correct {
  border-color: var(--green-600);
  background: var(--green-600);
  color: #fff;
}
.chip-incorrect {
  border-color: var(--red-600);
  background: var(--red-600);
  color: #fff;
}
.chip-answer {
  border-color: var(--green-300);
  background: var(--green-50);
  color: var(--green-700);
}
.match-correction {
  padding-left: 34px;
  font-size: 0.85rem;
  color: var(--red-800);
}

/* ------------------------------------------------------ connect the lines */

.connect-hint {
  margin-top: -4px;
  font-size: 0.86rem;
  color: var(--muted);
}
.connect-board {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(72px, 16%, 150px) minmax(0, 1fr);
}
/* The shorter column spreads out to the taller one's height, so lines run gently. */
.connect-column {
  display: flex;
  flex-direction: column;
}
.connect-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
}
.connect-lines {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.connect-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 1rem;
  border: 1px solid var(--line-2);
  background: #fff;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-3);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.connect-left {
  padding-right: 24px;
}
.connect-right {
  padding-left: 24px;
}
.connect-text {
  flex: 1;
  min-width: 0;
}
.connect-item:not(:disabled):hover,
.connect-item.over {
  border-color: var(--indigo-300);
  background: var(--indigo-50);
}
.connect-item.selected {
  border-color: var(--indigo-600);
  background: var(--indigo-50);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.connect-item.state-joined {
  border-color: var(--indigo-200);
}
.connect-item:disabled {
  cursor: default;
}
.connect-item.state-correct {
  border-color: var(--green-300);
  background: rgba(240, 253, 244, 0.85);
}
.connect-item.state-incorrect,
.connect-item.state-missing {
  border-color: var(--red-300);
  background: rgba(254, 242, 242, 0.85);
}
/* The dots on each card's inner edge, above the lines. */
.connect-dot {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  transition: border-color 150ms ease;
}
.connect-dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  transition: background-color 150ms ease;
}
.connect-left .connect-dot {
  right: -10px;
}
.connect-right .connect-dot {
  left: -10px;
}
.connect-item.selected .connect-dot,
.connect-item.over .connect-dot,
.connect-item.state-joined .connect-dot {
  border-color: var(--indigo-600);
}
.connect-item.state-joined .connect-dot::after,
.connect-item.selected .connect-dot::after {
  background: var(--indigo-600);
}
.connect-item.state-correct .connect-dot {
  border-color: var(--green-600);
}
.connect-item.state-correct .connect-dot::after {
  background: var(--green-600);
}
.connect-item.state-incorrect .connect-dot,
.connect-item.state-missing .connect-dot {
  border-color: var(--red-600);
}
.connect-item.state-incorrect .connect-dot::after {
  background: var(--red-600);
}
.connect-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}
.line-joined {
  animation: lineIn 260ms ease both;
}
@keyframes lineIn {
  from {
    opacity: 0;
  }
}
.line-drag {
  stroke-width: 3;
  stroke-dasharray: 10 10;
  opacity: 0.85;
}
.line-correct {
  stroke: var(--green-600);
  stroke-width: 4.5;
}
.line-incorrect {
  stroke: var(--red-600);
  stroke-width: 4.5;
}
.line-answer {
  stroke: var(--green-600);
  stroke-width: 2.5;
  stroke-dasharray: 6 7;
  opacity: 0.7;
}
.connect-corrections {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--red-800);
}
.connect-board.dragging,
.connect-board.dragging * {
  cursor: grabbing;
}

/* ------------------------------------------------- put in order, sort into groups */

.place-board {
  display: grid;
  gap: 12px;
}
.place-tray {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 1.1rem;
  border: 1px solid var(--indigo-100);
  background: linear-gradient(135deg, #f8faff, var(--indigo-50));
  transition: border-color 150ms ease, background-color 150ms ease;
}
.place-tray.over {
  border-color: var(--indigo-400);
}
.place-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.place-tray-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.place-empty-note {
  font-size: 0.86rem;
  color: var(--muted);
}
.place-back {
  justify-self: start;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px dashed var(--indigo-400);
  background: #fff;
  color: var(--indigo-700);
  font-size: 0.86rem;
  font-weight: 600;
}
.place-card-wrap {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.place-tray .place-card-wrap {
  flex: 1 1 15rem;
}
.place-card-wrap.lifted {
  opacity: 0.4;
}
.place-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 0.9rem;
  border: 1px solid var(--line-2);
  background: #fff;
  box-shadow: 0 2px 6px -4px rgba(15, 23, 42, 0.25);
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink-3);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.place-card:disabled {
  cursor: default;
  box-shadow: none;
}
.place-card:not(:disabled):hover {
  border-color: var(--indigo-300);
}
.place-card.selected {
  border-color: var(--indigo-600);
  background: var(--indigo-50);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.place-card.state-correct {
  border-color: var(--green-300);
  background: rgba(240, 253, 244, 0.9);
}
.place-card.state-incorrect {
  border-color: var(--red-300);
  background: rgba(254, 242, 242, 0.9);
}
.place-text {
  flex: 1;
  min-width: 0;
}
/* Six dots: the handle that says "this moves". */
.place-grip {
  flex-shrink: 0;
  width: 8px;
  height: 14px;
  background-image: radial-gradient(circle, var(--muted-3) 1.2px, transparent 1.4px);
  background-size: 4px 4.7px;
}
.place-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.state-correct .place-mark {
  color: var(--green-600);
}
.state-incorrect .place-mark {
  color: var(--red-600);
}
.place-note {
  padding-left: 14px;
  font-size: 0.8rem;
  color: var(--red-800);
}
.place-remove {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border-radius: 999px;
  color: var(--muted);
}
.place-remove:hover {
  background: var(--surface-3);
  color: var(--ink);
}
.place-remove svg {
  width: 15px;
  height: 15px;
}
.place-target .place-card {
  padding-right: 42px;
}
.place-targets {
  display: grid;
  gap: 8px;
}
.place-target {
  display: grid;
  gap: 8px;
  transition: background-color 150ms ease;
}
.place-ordering .place-target {
  grid-template-columns: 2.6rem minmax(0, 1fr);
  align-items: center;
}
.place-target-label {
  display: grid;
  justify-items: center;
  gap: 2px;
}
.place-position {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand-gradient-diag);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}
.place-position.small {
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
}
.place-end {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.place-target-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.place-slot {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 0.9rem;
  border: 1.5px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.84rem;
  color: var(--muted-2);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.place-slot.ready {
  border-color: var(--indigo-400);
  background: var(--indigo-50);
  color: var(--indigo-700);
  font-weight: 600;
}
.place-slot.empty {
  border-color: var(--red-300);
  color: var(--red-800);
}
.place-target.over .place-slot,
.place-target.over .place-card {
  border-color: var(--indigo-600);
  background: var(--indigo-50);
}
/* Groups: side by side once there is room, each a column that collects its items. */
.place-groups .place-targets {
  gap: 12px;
}
@media (min-width: 640px) {
  .place-groups .place-targets {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  }
}
.place-groups .place-target {
  align-content: start;
  padding: 12px;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: #fbfcff;
}
.place-groups .place-target.over {
  border-color: var(--indigo-400);
  background: var(--indigo-50);
}
.place-groups .place-target-label {
  justify-items: start;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--indigo-900);
}
.place-answer {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 1rem;
  border: 1px solid var(--green-300);
  background: rgba(240, 253, 244, 0.7);
  font-size: 0.88rem;
  color: var(--ink-3);
}
.place-answer li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.place-answer .place-answer-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-700);
}
.place-ghost {
  position: fixed;
  z-index: 1000;
  max-width: 18rem;
  padding: 10px 14px;
  border-radius: 0.9rem;
  border: 1px solid var(--indigo-300);
  background: #fff;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, 0.45);
  font-size: 0.9rem;
  color: var(--ink-3);
  pointer-events: none;
  transform: translate(-50%, -60%) rotate(-1.5deg);
}
.place-board.dragging,
.place-board.dragging * {
  cursor: grabbing;
}

/* ----------------------------------------------------------------- typed */

.typed-input {
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 1.1rem;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.typed-input:focus {
  border-color: var(--indigo-400);
  box-shadow: var(--ring);
}
.typed-input:disabled {
  opacity: 1;
  cursor: default;
}
.typed-correct {
  border-color: var(--green-300);
  background: var(--green-50);
}
.typed-incorrect {
  border-color: var(--red-300);
  background: var(--red-50);
}
.typed-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--muted);
}
.typed-hint svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--indigo-400);
}
.typed-accepted {
  display: grid;
  gap: 6px;
}

/* -------------------------------------------------------------- feedback */

.feedback {
  margin-top: 16px;
  padding: 16px;
  border-radius: 1.2rem;
  border: 2px solid var(--green-200);
  background: var(--green-50);
  animation: fadeUp 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (min-width: 640px) {
  .feedback {
    padding: 18px 22px;
  }
}
.feedback-incorrect,
.feedback-partial {
  border-color: var(--red-200);
  background: var(--red-50);
}
.feedback-unanswered {
  border-color: var(--line-2);
  background: var(--surface-2);
}
.feedback.compact {
  margin-top: 12px;
  border-width: 1px;
}
.feedback-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feedback-head > svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--green-600);
}
.feedback-incorrect .feedback-head > svg,
.feedback-partial .feedback-head > svg {
  color: var(--red-600);
}
.feedback-unanswered .feedback-head > svg {
  color: var(--muted-2);
}
.feedback-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--green-800);
}
.feedback-incorrect .feedback-title,
.feedback-partial .feedback-title {
  color: var(--red-800);
}
.feedback-unanswered .feedback-title {
  color: var(--ink-3);
}
.feedback-sub {
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--ink-3);
}
.explanation {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 1rem;
  border: 1px solid var(--indigo-200);
  background: var(--indigo-50);
  color: var(--indigo-900);
  font-size: 0.93rem;
  line-height: 1.6;
}
.explanation-label {
  font-weight: 600;
}
.sources {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.sources-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.verify-badge svg {
  width: 13px;
  height: 13px;
}
.verify-verified {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.verify-partially_verified {
  background: var(--amber-50);
  color: var(--amber-800);
  border: 1px solid var(--amber-200);
}
.verify-unverified {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-200);
}
.sources ul {
  display: grid;
  gap: 6px;
}
.source-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 0.9rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 150ms ease, background-color 150ms ease;
}
.source-link:hover {
  border-color: var(--indigo-300);
  background: #fff;
}
.source-link > svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--indigo-600);
}
.source-text {
  display: grid;
  min-width: 0;
  flex: 1;
}
.source-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.source-sub {
  font-size: 0.74rem;
  color: var(--muted-2);
  overflow-wrap: anywhere;
}
.sources-note {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 0.75rem;
  color: var(--muted-2);
}
.sources-note svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --------------------------------------------------------------- actions */

/* The question's buttons sit on a white bar of their own, so the primary one never blends into the page. */
.quiz-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 12px 28px -18px rgba(15, 23, 42, 0.55);
}
.quiz-primary {
  min-width: 10rem;
}
@media (max-width: 479px) {
  .quiz-actions {
    position: sticky;
    bottom: 0;
    z-index: 15;
    margin: 0 calc(-1 * var(--gutter));
    padding: 10px var(--gutter) calc(10px + var(--safe-bottom));
    border-radius: 0;
    border-width: 1px 0 0;
    border-color: var(--line);
    box-shadow: 0 -10px 24px -18px rgba(15, 23, 42, 0.5);
  }
  /* On phones the primary button takes all the room the spacer would have had. */
  .quiz-actions .spacer {
    display: none;
  }
  .quiz-primary {
    min-width: 0;
    flex: 1;
  }
  .hide-xs {
    display: none;
  }
}
.quiz-actions .btn-ghost {
  color: var(--ink-3);
}
.quiz-actions .btn-ghost:hover {
  background: rgba(15, 23, 42, 0.05);
}
.flag-btn.on,
.quiz-actions .flag-btn.on {
  color: var(--amber-700);
  background: var(--amber-50);
}
.keyboard-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}
.keyboard-hint svg {
  width: 16px;
  height: 16px;
}
.keyboard-hint .kbd {
  background: rgba(255, 255, 255, 0.9);
}
@media (hover: hover) and (min-width: 900px) {
  .keyboard-hint {
    display: flex;
  }
}

.revision-reasons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--indigo-900);
}
.revision-reasons > svg {
  width: 16px;
  height: 16px;
  color: #7c3aed;
}

/* ------------------------------------------------------------- navigator */

.navigator {
  padding: 14px 16px;
}
.navigator-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.navigator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 8px;
}
.nav-chip {
  position: relative;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nav-chip.nav-complete {
  border-color: var(--indigo-600);
  background: var(--indigo-600);
  color: #fff;
}
.nav-chip.nav-partial {
  border-color: var(--indigo-300);
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.nav-chip.current {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--indigo-400);
}
.nav-chip.flagged::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--amber-500);
  border: 2px solid #fff;
}
.navigator-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: -6px;
}
.legend-dot.answered {
  background: var(--indigo-600);
}
.legend-dot.partial {
  background: var(--indigo-100);
  border: 1px solid var(--indigo-300);
}
.legend-dot.flagged {
  border-radius: 999px;
  background: var(--amber-500);
}
.incomplete-list {
  margin-top: 14px;
  display: grid;
  gap: 2px;
  max-height: 14rem;
  overflow-y: auto;
}
.incomplete-list .text-btn {
  gap: 10px;
}

/* --------------------------------------------------------------- results */

.results {
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding: 8px 0 32px;
  display: grid;
  gap: 14px;
}
.results-hero {
  overflow: hidden;
}
.results-hero-inner {
  padding: 26px 20px 18px;
  text-align: center;
  background: linear-gradient(90deg, var(--indigo-50), #f4f6ff);
}
.results-title {
  margin-top: 4px;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--indigo-900);
}
.results-score {
  margin: 10px 0 6px;
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--indigo-600);
  font-variant-numeric: tabular-nums;
}
.results-line {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--indigo-700);
  font-weight: 500;
  font-size: 0.95rem;
}
.results-notice {
  max-width: 36rem;
  margin: 12px auto 0;
  text-align: left;
}
.results-counts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--indigo-100);
}
@media (min-width: 640px) {
  .results-counts {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  }
}
.results-counts > div {
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.results-counts dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.results-counts dt svg {
  width: 15px;
  height: 15px;
}
.results-counts dd {
  margin: 4px 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.results-counts dd small {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-2);
}
.results-feedback .notice {
  margin-top: 12px;
}
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.results-actions .btn {
  flex: 1 1 auto;
}
@media (min-width: 640px) {
  .results-actions .btn {
    flex: 0 1 auto;
  }
}
.results-footnote {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}
.topic-bars {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.topic-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
}
.results-review-head {
  align-items: flex-start;
  flex-wrap: wrap;
}
.review-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.review-item {
  border-radius: 1rem;
  border: 1px solid var(--line);
  overflow: hidden;
}
.review-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  text-align: left;
  background: var(--green-50);
  transition: background-color 150ms ease;
}
.review-toggle:hover {
  background: var(--green-100);
}
.review-incorrect .review-toggle,
.review-partial .review-toggle {
  background: var(--red-50);
}
.review-incorrect .review-toggle:hover,
.review-partial .review-toggle:hover {
  background: var(--red-100);
}
.review-unanswered .review-toggle {
  background: var(--surface-2);
}
.review-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--green-600);
}
.review-incorrect .review-icon,
.review-partial .review-icon {
  color: var(--red-600);
}
.review-unanswered .review-icon {
  color: var(--muted-2);
}
.review-number {
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}
.review-topic {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.review-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted-2);
  transition: transform 250ms ease;
}
.review-toggle[aria-expanded="true"] .review-chevron {
  transform: rotate(180deg);
}
@media (max-width: 479px) {
  .review-topic {
    display: none;
  }
}
.review-body {
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.reviewed-prompt {
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------------------------------------------- mock inspection report */

.report-route {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 640px) {
  .report-route {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.report-stop {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "number name"
    "dots dots"
    "count count";
  gap: 6px 8px;
  align-items: center;
  padding: 12px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  animation: fadeUp 360ms ease both;
}
.report-stop:nth-child(2) { animation-delay: 50ms; }
.report-stop:nth-child(3) { animation-delay: 100ms; }
.report-stop:nth-child(4) { animation-delay: 150ms; }
.report-stop:nth-child(5) { animation-delay: 200ms; }
.report-stop:nth-child(6) { animation-delay: 250ms; }
.report-stop.all {
  border-color: var(--green-100);
  background: var(--green-50);
}
.report-stop.none {
  border-color: var(--red-100);
  background: var(--red-50);
}
.report-stop-number {
  grid-area: number;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-3);
}
.report-stop-name {
  grid-area: name;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.report-stop-dots {
  grid-area: dots;
  display: flex;
  gap: 4px;
}
.report-stop-dots i {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
}
.report-stop-dots i.dot-matched {
  background: var(--green-600);
}
.report-stop-dots i.dot-partly {
  background: var(--amber-500, #f59e0b);
}
.report-stop-dots i.dot-learning {
  background: var(--red-600);
}
.report-stop-count {
  grid-area: count;
  font-size: 0.78rem;
  color: var(--muted);
}
.report-breakdown {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .report-breakdown {
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
  }
  .report-breakdown.single {
    grid-template-columns: 1fr;
  }
}
.report-breakdown-title {
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.report-section + .report-section {
  margin-top: 6px;
}
.report-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-top: 18px;
}
.report-section-name {
  font-weight: 600;
  color: var(--ink);
}
.report-section-note {
  font-size: 0.82rem;
  color: var(--muted);
}
.report-section .review-list {
  margin-top: 8px;
}
.report-toggle {
  align-items: flex-start;
}
.report-toggle .review-icon {
  margin-top: 2px;
}
.report-q {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}
.report-prompt {
  font-size: 0.88rem;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.report-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.report-type {
  white-space: nowrap;
}
.report-outcome {
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
}
.report-outcome.outcome-matched {
  color: var(--green-700, #047857);
}
.report-outcome.outcome-learning {
  color: var(--red-700, #b91c1c);
}
.report-outcome.outcome-partly {
  color: var(--amber-700);
}
@media (max-width: 520px) {
  .report-toggle {
    flex-wrap: wrap;
  }
  .report-q {
    flex-basis: calc(100% - 64px);
  }
  .report-tags {
    order: 3;
    flex-direction: row;
    width: 100%;
    padding-left: 29px;
    align-items: center;
  }
}
.report-actions {
  justify-content: flex-start;
  margin-top: 16px;
}
.report-real p + p,
.report-real .card-title + p {
  margin-top: 8px;
}
.report-real p.small {
  color: var(--ink-3);
  line-height: 1.6;
}

/* coach.css */
/* The Training Assistant panel (PassPartA's Study Coach layout). */

.coach-dock {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2000;
  width: var(--coach-width);
  height: 100vh;
  height: 100dvh;
  background: #fff;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.1);
  animation: slideInRight 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.app {
  transition: padding-right 300ms ease;
}
html.coach-docked .app {
  padding-right: var(--coach-width);
}
.coach-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.45);
  animation: fadeIn 200ms ease both;
}
.coach-sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 26rem;
  height: 100%;
  background: #fff;
  box-shadow: -10px 0 35px rgba(15, 23, 42, 0.2);
  animation: slideInRight 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.coach-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: radial-gradient(circle at 100% 0%, var(--accent-wash), transparent 40%), #fff;
}
.coach-panel > :not(.coach-lines) {
  position: relative;
  z-index: 1;
}
/* PassPartA's moving hairlines: strong behind the header and tabs, fading out below them. */
.coach-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 96px, rgba(0, 0, 0, 0.25) 150px, transparent 230px);
  mask-image: linear-gradient(to bottom, #000 0, #000 96px, rgba(0, 0, 0, 0.25) 150px, transparent 230px);
}
.coach-lines svg {
  width: 100%;
  height: 100%;
}
.coach-lines-base {
  stroke: #cbd5e1;
  stroke-width: 0.55;
  opacity: 0.9;
}
.coach-lines-lit {
  stroke-width: 1.1;
}
/* A soft haze keeps the words clear of the lines behind them. */
.coach-title,
.coach-sub,
.coach-tabs button {
  text-shadow: 0 0 6px #fff, 0 0 12px #fff, 0 0 2px #fff;
}
/* The ISM Code account's assistant takes its green, not violet. */
html[data-framework="ism"] .coach-tab-underline::after,
html[data-framework="ism"] .chat-reasoning {
  background: var(--indigo-600);
}
html[data-framework="ism"] .chat-reasoning {
  background: none;
  border-left-color: var(--indigo-200);
}
html[data-framework="ism"] .chat-activity-toggle > svg:first-child,
html[data-framework="ism"] .chat-off-steps svg {
  color: var(--indigo-600);
}
html[data-framework="ism"] .chat-sources a:hover {
  color: var(--indigo-700);
}
.coach-tabs {
  background: transparent;
}
.coach-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 10px 16px;
}
.coach-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--brand-gradient-diag);
  color: #fff;
  box-shadow: 0 8px 18px -10px var(--brand-glow);
}
.coach-mark svg {
  width: 21px;
  height: 21px;
}
.coach-heading {
  flex: 1;
  min-width: 0;
}
.coach-title {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.coach-sub {
  font-size: 0.78rem;
  color: var(--muted-2);
}
/* PassPartA's underlined tabs: plain words, a short violet bar sliding under the chosen one. */
.coach-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.coach-tabs button {
  padding: 10px 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  transition: color 200ms ease;
}
.coach-tabs button:hover {
  color: #334155;
}
.coach-tabs button[aria-selected="true"] {
  font-weight: 600;
  color: #0f172a;
}
.coach-tab-underline {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: calc(100% / 3);
  height: 2px;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.coach-tabs.at-1 .coach-tab-underline {
  transform: translateX(100%);
}
.coach-tabs.at-2 .coach-tab-underline {
  transform: translateX(200%);
}
.coach-tab-underline::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #7c3aed;
}
.coach-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 24px;
  scrollbar-width: thin;
}
.coach-body-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.coach-pane {
  animation: paneInForward 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.coach-pane.slide-back {
  animation-name: paneInBack;
}
.coach-body-chat .coach-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
@keyframes paneInForward {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}
@keyframes paneInBack {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
}
.coach-stack {
  display: grid;
  gap: 18px;
}
.coach-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 1.1rem;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.8);
}
.dial {
  position: relative;
  flex-shrink: 0;
  width: 66px;
  height: 66px;
}
.dial svg {
  width: 66px;
  height: 66px;
}
.dial span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--indigo-900);
}
.coach-summary-title {
  font-weight: 600;
  font-size: 0.92rem;
}
.coach-summary-text {
  margin-top: 2px;
  font-size: 0.83rem;
  color: var(--ink-3);
  line-height: 1.45;
}
.coach-summary-meta {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--muted-2);
}
.coach-section-title {
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.coach-focus,
.coach-actions {
  display: grid;
  gap: 8px;
}
.coach-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.coach-row:hover {
  border-color: var(--indigo-300);
  box-shadow: var(--shadow-sm);
}
.coach-row-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.coach-row-icon svg {
  width: 18px;
  height: 18px;
}
.coach-row-review .coach-row-icon {
  background: var(--red-50);
  color: var(--red-600);
}
.coach-row-bookmarks .coach-row-icon {
  background: var(--amber-50);
  color: var(--amber-600);
}
.coach-row-revision .coach-row-icon {
  background: #f5f3ff;
  color: #7c3aed;
}
.coach-row-body {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.coach-row-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.coach-row-detail {
  font-size: 0.76rem;
  color: var(--muted-2);
  line-height: 1.4;
}
.coach-row-cta {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--indigo-600);
}
.coach-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-3);
  transition: transform 200ms ease;
}
.coach-row:hover .coach-chevron {
  transform: translateX(2px);
}
.coach-mini-bar {
  display: block;
  height: 4px;
  margin-top: 4px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.coach-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
}
/* ------------------------------------------------------- the plan */

.plan-generating {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 1.1rem;
  border: 1px solid var(--indigo-100);
  background: linear-gradient(180deg, var(--indigo-50), #fff);
}
.plan-generating-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--indigo-900);
}
.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}
.plan-steps {
  display: grid;
  gap: 8px;
}
.plan-steps li {
  position: relative;
  padding-left: 22px;
  font-size: 0.84rem;
  color: var(--muted-3);
  transition: color 300ms ease;
}
.plan-steps li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.4em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--line-2);
  transition: background-color 300ms ease, border-color 300ms ease;
}
.plan-steps li.current {
  color: var(--ink-2);
}
.plan-steps li.current::before {
  border-color: var(--indigo-600);
  animation: stepPulse 1s ease-in-out infinite;
}
.plan-steps li.done {
  color: var(--ink-3);
}
.plan-steps li.done::before {
  border-color: var(--indigo-600);
  background: var(--indigo-600);
}
@keyframes stepPulse {
  50% {
    box-shadow: 0 0 0 4px var(--accent-ring);
  }
}
.plan-skeleton {
  display: grid;
  gap: 8px;
}
.plan-skeleton span {
  height: 64px;
  border-radius: 1rem;
  background: linear-gradient(90deg, var(--indigo-50), #fafbff, var(--indigo-50));
  background-size: 200% 100%;
  animation: skeletonSweep 1.4s ease-in-out infinite;
}
@keyframes skeletonSweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.plan-rebuild {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
}
.plan-rebuild svg {
  width: 13px;
  height: 13px;
}
.plan-days {
  display: grid;
  gap: 10px;
}
.plan-day {
  padding: 14px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  animation: dayIn 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.plan-day.today {
  border-color: var(--indigo-200);
  background: color-mix(in srgb, var(--indigo-50) 70%, transparent);
}
@keyframes dayIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.plan-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan-day-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.plan-day.today .plan-day-label {
  color: var(--indigo-700);
}
.plan-day-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--muted-2);
}
.plan-day-time svg {
  width: 12px;
  height: 12px;
}
.plan-day-title {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
.plan-day-detail {
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-3);
}
.plan-day-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--indigo-200);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--indigo-700);
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.plan-chip:hover {
  background: var(--indigo-50);
  border-color: var(--indigo-300);
}
.plan-chip svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  transition: transform 200ms ease;
}
.plan-chip:hover svg {
  transform: translateX(2px);
}

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

.chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 8px;
  scrollbar-width: thin;
}
.chat-welcome {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 8px 8px;
  text-align: center;
}
.chat-welcome-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--indigo-50);
  color: var(--indigo-600);
}
.chat-welcome-mark svg {
  width: 22px;
  height: 22px;
  animation: twinkle 2.8s ease-in-out infinite;
}
.chat-welcome-title {
  font-weight: 600;
  color: var(--ink);
}
.chat-welcome-text {
  max-width: 19rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--muted);
}
.chat-list {
  display: grid;
  gap: 18px;
}
.chat-row {
  animation: fadeUp 260ms ease both;
}
.chat-user {
  display: grid;
  justify-items: end;
  gap: 4px;
}
.chat-about {
  max-width: 85%;
  font-size: 0.72rem;
  color: var(--muted-2);
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 18px 18px 5px 18px;
  background: var(--brand-gradient-diag);
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-assistant {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.chat-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 9px;
  background: var(--brand-gradient-diag);
  color: #fff;
}
.chat-avatar svg {
  width: 14px;
  height: 14px;
}
.chat-text {
  font-size: 15px;
  line-height: 1.75;
  color: #1e293b;
  overflow-wrap: anywhere;
}
.chat-text p + p,
.chat-text p + ul,
.chat-text p + ol,
.chat-text ul + p,
.chat-text ol + p {
  margin-top: 10px;
}
.chat-text ul,
.chat-text ol {
  display: grid;
  gap: 4px;
  padding-left: 1.2em;
}
.chat-text ul {
  list-style: disc;
}
.chat-text ol {
  list-style: decimal;
}
/* The activity row: what the assistant did, and its reasoning behind a toggle. */
.chat-activity {
  margin-bottom: 6px;
}
.chat-activity-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 13px;
  line-height: 1.3;
  color: #64748b;
  text-align: left;
}
.chat-activity-toggle:hover {
  color: #334155;
}
.chat-activity-toggle > svg:first-child {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #7c3aed;
}
.chat-activity-chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: transform 300ms ease;
}
.chat-activity.open .chat-activity-chevron {
  transform: rotate(180deg);
}
.chat-activity-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms ease;
}
.chat-activity.open .chat-activity-body {
  grid-template-rows: 1fr;
}
.chat-activity-body > div {
  min-height: 0;
  overflow: hidden;
}
.chat-text .chat-steps {
  list-style: none;
  padding-left: 2px;
}
.chat-steps {
  display: grid;
  gap: 6px;
  margin: 4px 0 6px;
  padding-left: 2px;
}
.chat-steps li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}
.chat-steps svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--green-600);
}
.chat-step-text {
  display: block;
}
.chat-step-detail {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: var(--muted-2);
}
.chat-reasoning-toggle {
  font-size: 12.5px;
}
.chat-reasoning {
  display: grid;
  gap: 8px;
  margin: 6px 0 4px;
  padding: 8px 0 8px 12px;
  border-left: 2px solid #ddd6fe;
  font-size: 13px;
  line-height: 1.6;
  color: #64748b;
  animation: fadeUp 220ms ease both;
}
.chat-reasoning p + p {
  margin-top: 0;
}
.spin-soft {
  animation: twinkle 1.6s ease-in-out infinite;
}
.chat-text strong {
  font-weight: 600;
  color: #0f172a;
}
/* Sources: full-width rows, each opening the official page. */
.chat-sources {
  margin-top: 12px;
  animation: fadeUp 260ms ease both;
}
.chat-sources-label {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #94a3b8;
}
.chat-text .chat-sources ul {
  display: grid;
  gap: 0;
  padding-left: 0;
  list-style: none;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}
.chat-sources li {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.chat-sources a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 2px;
  color: #334155;
  transition: color 150ms ease;
}
.chat-sources a:hover {
  color: #6d28d9;
}
.chat-sources a > svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #94a3b8;
}
.chat-sources a > span {
  display: grid;
  flex: 1;
  min-width: 0;
}
.chat-source-title {
  font-size: 13px;
  line-height: 1.4;
}
.chat-source-detail {
  font-size: 11.5px;
  line-height: 1.4;
  color: #94a3b8;
}
.chat-error .chat-text {
  font-size: 0.86rem;
  color: var(--red-700);
}
.chat-thinking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}
.shimmer {
  background: linear-gradient(90deg, #94a3b8 0%, #334155 50%, #94a3b8 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.chat-dots {
  display: inline-flex;
  gap: 3px;
}
.chat-dots i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #94a3b8;
  animation: dotBounce 1.2s ease-in-out infinite;
}
.chat-dots i:nth-child(2) {
  animation-delay: 150ms;
}
.chat-dots i:nth-child(3) {
  animation-delay: 300ms;
}
@keyframes dotBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}
.chat-foot {
  display: grid;
  gap: 8px;
  padding: 10px 16px calc(14px + var(--safe-bottom));
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.96);
}
.chat-pinned {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 6px 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--indigo-100);
  background: var(--indigo-50);
  animation: fadeUp 240ms ease both;
}
.chat-pinned-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.chat-pinned-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--indigo-700);
}
.chat-pinned-prompt {
  font-size: 0.8rem;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.icon-btn-sm {
  width: 30px;
  height: 30px;
}
.icon-btn-sm svg {
  width: 15px;
  height: 15px;
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.78rem;
  color: var(--ink-3);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.chat-chip:hover:not(:disabled) {
  border-color: var(--indigo-300);
  background: var(--indigo-50);
  color: var(--indigo-900);
}
.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 6px 18px -14px rgba(15, 23, 42, 0.45);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.chat-composer:focus-within {
  border-color: var(--indigo-300);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.chat-composer textarea {
  flex: 1;
  min-height: 36px;
  max-height: 132px;
  padding: 8px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}
.chat-send {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand-gradient-diag);
  color: #fff;
  transition: opacity 150ms ease, transform 150ms ease;
}
.chat-send:hover:not(:disabled) {
  transform: scale(1.05);
}
.chat-send:disabled {
  opacity: 0.4;
}
.chat-send svg {
  width: 17px;
  height: 17px;
  transform: rotate(-90deg);
}
.chat-note {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted-2);
}
.chat-clear {
  margin-top: 14px;
  text-align: center;
}
.chat-clear .text-btn {
  font-size: 0.76rem;
  color: var(--muted-2);
}
/* Chat switched off: a calm card, the ways on, and a faint picture of an answer. */
.chat-off {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 26px 6px 8px;
  text-align: center;
}
.chat-off-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--brand-gradient-diag);
  color: #fff;
  box-shadow: 0 14px 28px -14px var(--brand-glow);
}
.chat-off-mark svg {
  width: 24px;
  height: 24px;
  animation: twinkle 2.8s ease-in-out infinite;
}
.chat-off h3 {
  margin-top: 4px;
  font-size: 1.02rem;
  font-weight: 600;
}
.chat-off p {
  max-width: 21rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}
.chat-off-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.chat-off-sample {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border-radius: 1.1rem;
  border: 1px dashed var(--line-2);
  background: rgba(248, 250, 255, 0.8);
  text-align: left;
  opacity: 0.85;
}
.chat-off-sample-label {
  font-size: 0.68rem !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2) !important;
}
.chat-off-q {
  justify-self: end;
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--brand-gradient-diag);
  color: #fff !important;
  font-size: 0.8rem !important;
}
.chat-off-a {
  display: grid;
  gap: 7px;
}
.chat-off-steps,
.chat-off-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--muted);
}
.chat-off-steps svg {
  width: 13px;
  height: 13px;
  color: #7c3aed;
}
.chat-off-source svg {
  width: 13px;
  height: 13px;
}
.chat-off-line {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0, #eef2f7);
}
.chat-off-line.short {
  width: 64%;
}

/* "Ask about this question", under the feedback and in reports. */
.feedback-foot {
  margin-top: 12px;
}
.ask-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #ddd6fe;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6d28d9;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.ask-btn:hover {
  background: #f5f3ff;
  border-color: #c4b5fd;
}
.ask-btn svg {
  width: 15px;
  height: 15px;
}
html[data-framework="ism"] .ask-btn {
  border-color: var(--indigo-200);
  color: var(--indigo-700);
}
html[data-framework="ism"] .ask-btn:hover {
  background: var(--indigo-50);
  border-color: var(--indigo-300);
}
.ask-btn.compact {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 0.8rem;
}
.coach-footnote {
  font-size: 0.74rem;
  color: var(--muted-2);
  line-height: 1.5;
}
.coach-saved {
  display: grid;
  gap: 8px;
}
.coach-saved li {
  padding: 10px 12px;
  border-radius: 1rem;
  border: 1px solid var(--amber-200);
  background: #fff;
}
.coach-saved-topic {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-600);
}
.coach-saved-text {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.coach-history {
  display: grid;
  gap: 8px;
}
.coach-history li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 1rem;
  border: 1px solid var(--line);
}
.coach-history-score {
  font-weight: 600;
  font-size: 1rem;
  color: var(--indigo-700);
  font-variant-numeric: tabular-nums;
}

.coach-bubble {
  position: fixed;
  right: 16px;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 1900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  min-width: 56px;
  padding: 0 16px;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-gradient-diag);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(30, 27, 75, 0.7);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.coach-bubble:hover {
  transform: scale(1.04);
}
.coach-bubble svg {
  width: 23px;
  height: 23px;
  animation: twinkle 2.8s ease-in-out infinite;
}
.coach-bubble-label {
  display: none;
  font-weight: 600;
  font-size: 0.9rem;
}
/* Below 900px the bottom bar has its own Coach button, so the bubble would only cover content. */
@media (max-width: 899px) {
  .coach-bubble {
    display: none;
  }
}
@media (min-width: 900px) {
  .coach-bubble {
    right: 24px;
    bottom: 24px;
  }
  .coach-bubble-label {
    display: inline;
  }
}
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.12) rotate(8deg); opacity: 0.85; }
}

/* landing.css */
/* The landing page. */

.landing {
  background: #f5f7ff;
  color: var(--ink);
  min-height: 100vh;
}
.lp-inner {
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

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

.lp-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  isolation: isolate;
  transition: box-shadow 400ms ease;
}
/* Two layers, white and night, cross-fade so the change of tone is smooth. */
.lp-nav::before,
.lp-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease;
}
.lp-nav::before {
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
}
.lp-nav::after {
  background:
    radial-gradient(28rem 8rem at 85% 0%, rgba(134, 210, 255, 0.28), transparent 70%),
    linear-gradient(100deg, rgba(15, 13, 46, 0.97) 0%, rgba(28, 24, 90, 0.97) 55%, rgba(47, 42, 143, 0.97) 100%);
}
.lp-nav.tone-light::before,
.lp-nav.tone-dark::after {
  opacity: 1;
}
.lp-nav.tone-light,
.lp-nav.tone-dark {
  box-shadow: 0 10px 28px -20px rgba(15, 23, 42, 0.6);
}
.lp-nav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 74rem;
  margin: 0 auto;
  padding: 10px var(--gutter);
}
.lp-nav-links {
  display: none;
  gap: 2px;
  margin-left: 18px;
}
.lp-nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 550;
  font-size: 0.92rem;
  transition: color 420ms ease, background-color 200ms ease;
}
.lp-nav-links a:hover {
  background: rgba(255, 255, 255, 0.14);
}
.lp-nav.tone-light .lp-nav-links a {
  color: var(--ink-3);
}
.lp-nav.tone-light .lp-nav-links a:hover {
  background: var(--indigo-50);
  color: var(--indigo-900);
}
@media (min-width: 980px) {
  .lp-nav-links {
    display: flex;
  }
}
/* The nav's Discover button: white on the dark tones, the brand gradient on white, fading between. */
.lp-nav-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: color 420ms ease, box-shadow 420ms ease;
}
.lp-nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 420ms ease;
}
.lp-nav.tone-light .lp-nav-cta {
  color: #fff;
  box-shadow: 0 8px 18px -10px var(--brand-glow);
}
.lp-nav.tone-light .lp-nav-cta::before {
  opacity: 1;
}
@media (max-width: 359px) {
  .lp-nav-cta {
    display: none;
  }
}
.lp-menu-button {
  color: #fff;
  transition: color 420ms ease;
}
.lp-nav.tone-light .lp-menu-button {
  color: var(--ink);
}
@media (min-width: 980px) {
  .lp-menu-button {
    display: none;
  }
}
.lp-nav .brand,
.lp-nav .brand-name {
  transition: color 420ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .lp-nav::before,
  .lp-nav::after,
  .lp-nav-cta::before {
    transition: none;
  }
}
.lp-nav .brand-name {
  max-width: 11rem;
}
@media (min-width: 1100px) {
  .lp-nav .brand-name {
    max-width: none;
  }
}
@media (max-width: 420px) {
  .lp-nav .brand-text {
    display: none;
  }
}
.lp-menu {
  display: grid;
  gap: 4px;
  padding: 6px var(--gutter) 16px;
  max-width: 74rem;
  margin: 0 auto;
}
.lp-menu a {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.lp-menu .btn {
  margin-top: 10px;
}

/* ----------------------------------------------------------------- hero */

/*
 * The night background with spotlights: a deep indigo, two pools of light
 * that drift slowly, and a faint grid of lines that fades out from the
 * light. Used by the header, the solution, the technology and the contact.
 */
.lp-night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(46rem 28rem at 84% 6%, rgba(134, 210, 255, 0.3), transparent 62%),
    radial-gradient(42rem 30rem at 6% 96%, rgba(124, 108, 255, 0.42), transparent 62%),
    linear-gradient(150deg, #0f0d2e 0%, #1c185a 38%, #2f2a8f 72%, #3557d6 100%);
}
.lp-lights {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.lp-lights::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 62% 30%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 62% 30%, #000, transparent 75%);
}
.lp-lights span {
  position: absolute;
  width: 38rem;
  height: 38rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.4;
  animation: spotDrift 26s ease-in-out infinite alternate;
}
.lp-lights span:nth-child(1) {
  top: -16rem;
  right: -8rem;
  background: #60a5fa;
}
.lp-lights span:nth-child(2) {
  bottom: -20rem;
  left: -10rem;
  background: #7c6cff;
  animation-duration: 32s;
  animation-direction: alternate-reverse;
}
.lp-lights span:nth-child(3) {
  top: 30%;
  left: 40%;
  width: 22rem;
  height: 22rem;
  background: #38bdf8;
  opacity: 0.16;
  animation-duration: 38s;
}
@keyframes spotDrift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-6rem, 4rem) scale(1.12);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lp-lights span {
    animation: none;
  }
}

.lp-hero {
  padding: 92px 0 26px;
}
@media (min-width: 1024px) {
  .lp-hero {
    padding: 112px 0 30px;
  }
}
.lp-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.85);
}
.lp-hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lp-hero-trust svg {
  width: 16px;
  height: 16px;
  color: #86d2ff;
}

/* ------------------------------------------------------------ previews */

.preview-frame {
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  color: var(--ink);
  text-align: left;
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--line);
}
.preview-dots {
  display: inline-flex;
  gap: 5px;
}
.preview-dots i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #cbd5e1;
}
.preview-dots i:first-child {
  background: #fca5a5;
}
.preview-dots i:nth-child(2) {
  background: #fcd34d;
}
.preview-dots i:nth-child(3) {
  background: #86efac;
}
.preview-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-body {
  padding: 16px;
  max-height: 34rem;
  overflow-y: auto;
  scrollbar-width: thin;
}
@media (min-width: 640px) {
  .preview-body {
    padding: 20px;
  }
}
.preview-skeleton {
  display: grid;
  gap: 10px;
}
.preview-skeleton span {
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.preview-skeleton span:first-child {
  height: 64px;
  border-radius: 14px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.live-question {
  display: grid;
  gap: 10px;
}
.live-question .answer-area {
  margin-top: 4px;
}
.live-question-prompt {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
}
.live-question.compact .option {
  min-height: 48px;
  padding: 8px 12px;
}
.live-question.compact .feedback {
  margin-top: 4px;
}
/* Feedback eases in when answered, and eases out before "Try it again" resets. */
.live-question .feedback,
.live-question .live-reset {
  animation: liveIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.live-question.resetting .feedback,
.live-question.resetting .live-reset {
  animation: liveOut 220ms ease both;
}
.live-question .option,
.live-question .tf-toggle,
.live-question .match-chip {
  transition: background-color 260ms ease, border-color 260ms ease, color 260ms ease, box-shadow 260ms ease;
}
@keyframes liveIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes liveOut {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}
.live-hint {
  font-size: 0.78rem;
  color: var(--muted-2);
}
.live-reset {
  justify-self: start;
}
.preview-tiles {
  display: grid;
  gap: 10px;
}
@media (min-width: 560px) {
  .preview-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.preview-tiles .tile-topic {
  min-height: 74px;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(15, 23, 42, 0.05);
}
.coach-preview {
  margin: -16px;
}
@media (min-width: 640px) {
  .coach-preview {
    margin: -20px;
  }
}
/* ------------------------------------------------------------- sections */

.lp-section {
  padding: 64px 0;
}
@media (min-width: 900px) {
  .lp-section {
    padding: 88px 0;
  }
}
/*
 * Backgrounds alternate so no two plain sections meet: night, light, night,
 * white, gradient, light, night, white, night.
 */
.lp-challenge,
.lp-org {
  background: #f5f7ff;
}
.lp-licensing {
  background: #fff;
}
.lp-heading {
  max-width: 46rem;
  margin-bottom: 32px;
}
.lp-kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--indigo-600);
}
.lp-heading h2 {
  margin-top: 10px;
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lp-lead {
  margin-top: 14px;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.6;
  color: var(--ink-3);
}
.lp-heading.on-dark .lp-kicker {
  color: rgba(255, 255, 255, 0.85);
}
.lp-heading.on-dark h2 {
  color: #fff;
}
.lp-heading.on-dark .lp-lead {
  color: rgba(255, 255, 255, 0.9);
}
.lp-cards {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .lp-cards.four,
  .lp-cards.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .lp-cards.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .lp-cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.lp-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 22px;
  border-radius: 1.3rem;
  background: #fff;
  border: 1px solid #e6eaf5;
  box-shadow: 0 10px 30px -24px rgba(30, 27, 75, 0.45);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.lp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -26px rgba(30, 27, 75, 0.5);
}
.lp-licensing .lp-card {
  background: #f8faff;
}
.lp-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-gradient-diag);
  color: #fff;
}
.lp-card-icon svg {
  width: 22px;
  height: 22px;
}
.lp-card h3 {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.lp-card p {
  color: var(--ink-3);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* solution */
.lp-solution-grid {
  display: grid;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .lp-solution-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 36px;
  }
}
.lp-capabilities {
  display: grid;
  gap: 10px;
}
.lp-capability {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 1.2rem;
  border: 1px solid #e6eaf5;
  background: #fff;
  text-align: left;
  transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.lp-capability:hover {
  border-color: var(--indigo-200);
}
.lp-capability.on {
  border-color: var(--indigo-300);
  background: linear-gradient(135deg, #f4f3ff, #fff 60%);
  box-shadow: 0 14px 30px -22px rgba(67, 56, 202, 0.6);
}
.lp-capability-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.lp-capability.on .lp-capability-icon {
  background: var(--brand-gradient-diag);
  color: #fff;
}
.lp-capability-icon svg {
  width: 21px;
  height: 21px;
}
.lp-capability-body {
  display: grid;
  gap: 4px;
}
.lp-capability-title {
  font-size: 1.1rem;
  font-weight: 600;
}
.lp-capability-summary {
  color: var(--ink-3);
  font-size: 0.92rem;
}
/* The active capability's detail opens smoothly instead of popping in. */
.lp-capability-more {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}
.lp-capability.on .lp-capability-more {
  grid-template-rows: 1fr;
  opacity: 1;
}
.lp-capability-more > ul {
  min-height: 0;
  overflow: hidden;
}
.lp-capability-points {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}
.lp-capability-points li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.86rem;
  color: var(--ink-3);
}
.lp-capability-points svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--green-600);
}
.lp-solution-preview {
  min-width: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}
.lp-solution-preview.leaving {
  opacity: 0;
  transform: translateY(6px);
}
.lp-preview-swap {
  animation: previewIn 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes previewIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* frameworks: one card per framework, each in its own colour, with the route of its mock. */
.lp-frameworks {
  background: #fff;
}
.lp-framework-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 960px) {
  .lp-framework-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}
.lp-framework {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 22px;
  border-radius: 1.6rem;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(28rem 18rem at 100% 0%, rgba(134, 210, 255, 0.34), transparent 62%),
    radial-gradient(24rem 20rem at 0% 100%, rgba(124, 108, 255, 0.45), transparent 60%),
    linear-gradient(150deg, #1c185a 0%, #3b31c4 46%, #3f79f2 100%);
  box-shadow: 0 30px 60px -34px rgba(49, 46, 129, 0.9);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 300ms ease;
}
.lp-framework.ism {
  background:
    radial-gradient(28rem 18rem at 100% 0%, rgba(110, 231, 183, 0.3), transparent 62%),
    radial-gradient(24rem 20rem at 0% 100%, rgba(56, 189, 248, 0.32), transparent 60%),
    linear-gradient(150deg, #083d3a 0%, #0f766e 46%, #0e7490 78%, #1d6fb8 100%);
  box-shadow: 0 30px 60px -34px rgba(8, 61, 58, 0.9);
}
@media (min-width: 640px) {
  .lp-framework {
    padding: 28px;
  }
}
.lp-framework:hover,
.lp-framework:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 40px 70px -34px rgba(49, 46, 129, 0.95);
}
.lp-framework.ism:hover,
.lp-framework.ism:focus-visible {
  box-shadow: 0 40px 70px -34px rgba(8, 61, 58, 0.95);
}
.lp-framework-watermark {
  position: absolute;
  z-index: -1;
  right: -48px;
  bottom: -56px;
  width: 260px;
  height: 260px;
  opacity: 0.07;
  stroke-width: 1.2;
  pointer-events: none;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.lp-framework:hover .lp-framework-watermark {
  transform: rotate(-8deg) scale(1.05);
}
.lp-framework-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 14px;
}
.lp-framework-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.lp-framework-icon svg {
  width: 26px;
  height: 26px;
}
.lp-framework-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.lp-framework-title {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.lp-framework-focus {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
}
.lp-framework-live {
  grid-column: 1 / -1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lp-framework-live i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6ee7b7;
}
.lp-framework-live i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid #6ee7b7;
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  from {
    transform: scale(0.5);
    opacity: 1;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}
@container (min-width: 480px) {
  .lp-framework-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .lp-framework-live {
    grid-column: auto;
    align-self: start;
  }
}
.lp-framework-text {
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}

/* The route of the mock: numbered stops, read down each column. */
.lp-framework-route {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lp-framework-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.lp-framework-length {
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}
.lp-framework-stops {
  display: grid;
  gap: 4px 18px;
}
@container (min-width: 460px) {
  .lp-framework-stops {
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.lp-framework-stop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}
/* The thread between one stop and the next. */
.lp-framework-stop::before {
  content: "";
  position: absolute;
  left: 12px;
  top: calc(50% + 13px);
  height: calc(100% - 22px);
  width: 1px;
  background: rgba(255, 255, 255, 0.28);
}
.lp-framework-stop:last-child::before {
  display: none;
}
@container (min-width: 460px) {
  .lp-framework-stop:nth-child(3)::before {
    display: none;
  }
}
.lp-framework-stop i {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
  transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}
/* Pointing at the card walks the route, one stop after another. */
.lp-framework:hover .lp-framework-stop i,
.lp-framework:focus-visible .lp-framework-stop i {
  background: #fff;
  color: #312e81;
  transform: scale(1.06);
}
.lp-framework.ism:hover .lp-framework-stop i,
.lp-framework.ism:focus-visible .lp-framework-stop i {
  color: #134e4a;
}
.lp-framework-stop:nth-child(2) i {
  transition-delay: 70ms;
}
.lp-framework-stop:nth-child(3) i {
  transition-delay: 140ms;
}
.lp-framework-stop:nth-child(4) i {
  transition-delay: 210ms;
}
.lp-framework-stop:nth-child(5) i {
  transition-delay: 280ms;
}
.lp-framework-stop:nth-child(6) i {
  transition-delay: 350ms;
}
.lp-framework-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lp-framework-topics span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  font-weight: 500;
}
.lp-framework-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.lp-framework-stats {
  display: flex;
  gap: 22px;
}
.lp-framework-stats > span {
  display: grid;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}
.lp-framework-stats b {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
}
.lp-framework-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #fff;
  color: #312e81;
  font-weight: 600;
  box-shadow: 0 12px 24px -14px rgba(0, 0, 0, 0.6);
}
.lp-framework.ism .lp-framework-cta {
  color: #134e4a;
}
.lp-framework-cta svg {
  width: 17px;
  height: 17px;
  transition: transform 250ms ease;
}
.lp-framework:hover .lp-framework-cta svg {
  transform: translateX(3px);
}
@media (max-width: 419px) {
  .lp-framework-cta {
    flex: 1 1 100%;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lp-framework-live i::after {
    animation: none;
  }
}
.lp-future {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 1.2rem;
  border: 1px dashed var(--line-2);
  background: #f8faff;
  color: var(--ink-3);
  font-size: 0.92rem;
}
.lp-future svg {
  width: 22px;
  height: 22px;
  color: var(--indigo-600);
}
.lp-future p {
  flex: 1;
  min-width: 14rem;
}

/* try it */
.lp-try {
  padding: 72px 0;
}
.lp-try-card {
  padding: 18px;
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.lp-try-card .demo-choices {
  margin-top: 0;
}

/* organisation */
.lp-split {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 1024px) {
  .lp-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }
}
.lp-split .lp-heading {
  margin-bottom: 20px;
}
.lp-ticks {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.lp-ticks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-3);
}
.lp-ticks svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--indigo-600);
}
.lp-note {
  margin: 18px 0;
  font-size: 0.86rem;
  color: var(--muted);
}

/* technology */
.lp-columns {
  display: grid;
  gap: 18px;
}
@media (min-width: 860px) {
  .lp-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.lp-column {
  padding: 22px;
  border-radius: 1.3rem;
  border: 1px solid #e6eaf5;
  background: #fff;
}
.lp-column.available {
  border-color: #a7f3d0;
  background: linear-gradient(160deg, #f0fdf4, #fff 50%);
}
.lp-column.planned {
  border-style: dashed;
  background: #fbfcff;
}
.lp-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 600;
}
.lp-column-title svg {
  width: 20px;
  height: 20px;
  color: var(--green-600);
}
.lp-column.planned .lp-column-title svg {
  color: var(--indigo-600);
}
.lp-column ul {
  display: grid;
  gap: 10px;
}
.lp-column li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-3);
  font-size: 0.93rem;
  line-height: 1.5;
}
.lp-column.available li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--green-600);
}

/* contact */
.lp-contact {
  padding: 72px 0;
  color: #fff;
  background:
    radial-gradient(40rem 22rem at 0% 100%, rgba(91, 78, 240, 0.6), transparent 60%),
    linear-gradient(140deg, #1e1b4b, #312e81 45%, #3a6ce4);
}
.lp-contact-inner {
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}
.lp-contact h2 {
  max-width: 40rem;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lp-contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.lp-contact-fallback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 600;
}
.lp-contact-fallback svg,
.lp-contact-note svg {
  width: 18px;
  height: 18px;
}
.lp-contact-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.85);
}
.lp-contact-note svg {
  flex-shrink: 0;
}
.lp-contact-note a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* footer */
.lp-footer {
  padding: 36px 0 44px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.lp-footer-inner {
  display: grid;
  gap: 20px;
}
@media (min-width: 860px) {
  .lp-footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}
.lp-footer-note {
  margin-top: 12px;
  max-width: 44rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}
.lp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo-700);
}
.lp-footer-links a:hover {
  text-decoration: underline;
}

/* Cards keep dark text wherever they sit, including on the dark sections. */
.lp-card,
.lp-capability,
.lp-column,
.lp-try-card,
.preview-frame {
  color: var(--ink);
}

/* On the night sections: capabilities and columns on glass; the chosen capability turns white. */
.lp-night .lp-capability {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lp-night .lp-capability:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
}
.lp-night .lp-capability-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.lp-night .lp-capability-summary {
  color: rgba(255, 255, 255, 0.74);
}
.lp-night .lp-capability.on {
  color: var(--ink);
  background: #fff;
  border-color: #fff;
  box-shadow: 0 24px 50px -26px rgba(0, 0, 0, 0.7);
}
.lp-night .lp-capability.on .lp-capability-icon {
  background: var(--brand-gradient-diag);
}
.lp-night .lp-capability.on .lp-capability-summary {
  color: var(--ink-3);
}
.lp-night .preview-frame {
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.lp-night .lp-column {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lp-night .lp-column li {
  color: rgba(255, 255, 255, 0.84);
}
.lp-night .lp-column.available {
  border-color: rgba(110, 231, 183, 0.42);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.16), rgba(255, 255, 255, 0.04) 55%);
}
.lp-night .lp-column.available .lp-column-title svg {
  color: #6ee7b7;
}
.lp-night .lp-column.available li::before {
  background: #6ee7b7;
}
.lp-night .lp-column.planned {
  border-color: rgba(255, 255, 255, 0.26);
}
.lp-night .lp-column.planned .lp-column-title svg {
  color: #a5b4fc;
}
.lp-night .lp-column .pill-slate {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.92);
}

.lp-licensing-cta {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ------------------------------------------------------------- showcase */

/* The header's slides: each one the full width, passing right to left. */
.hero-carousel {
  position: relative;
  display: grid;
}
/* Arrows on the slides' edges, in the margins beside the content: tall, quiet, no outline. */
.hero-arrow {
  position: absolute;
  z-index: 2;
  top: 15rem;
  display: none;
  place-items: center;
  width: 48px;
  height: 72px;
  margin-top: -36px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.04);
  transition: color 200ms ease, background-color 200ms ease, transform 250ms ease;
}
.hero-arrow svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.5;
}
.hero-arrow:hover,
.hero-arrow:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.hero-arrow-prev {
  left: max(12px, calc(50% - 37rem - 72px));
}
.hero-arrow-next {
  right: max(12px, calc(50% - 37rem - 72px));
}
.hero-arrow-prev:hover {
  transform: translateX(-3px);
}
.hero-arrow-next:hover {
  transform: translateX(3px);
}
@media (min-width: 1360px) {
  .hero-arrow {
    display: grid;
  }
  .showcase-chevron {
    display: none !important;
  }
}
.hero-viewport {
  overflow: hidden;
}
.hero-track {
  display: flex;
}
.hero-track.animate {
  transition: transform 900ms cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-slide {
  flex: 0 0 100%;
  min-width: 0;
}
.hero-slide-grid {
  display: grid;
  gap: 26px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-slide-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    height: 30rem;
  }
}
.hero-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
  align-content: center;
}
/* The words arrive a moment after the slide does. */
.hero-copy > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-slide.active .hero-copy > * {
  opacity: 1;
  transform: none;
}
.hero-slide.active .hero-copy > :nth-child(2) {
  transition-delay: 120ms;
}
.hero-slide.active .hero-copy > :nth-child(3) {
  transition-delay: 220ms;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a5b4fc;
}
.hero-kicker-number {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  letter-spacing: 0.08em;
}
.hero-pill {
  font-weight: 500;
}
.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.hero-title-sub {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
}
.hero-text {
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}
.hero-visual {
  min-width: 0;
}
.hero-stage {
  position: relative;
  display: grid;
  align-content: safe center;
  height: 21rem;
  padding: 18px;
  border-radius: 1.4rem;
  overflow: hidden;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(0.97);
  opacity: 0.75;
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1), opacity 600ms ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}
@media (min-width: 640px) {
  .hero-stage {
    height: 24rem;
  }
}
@media (min-width: 1024px) {
  .hero-stage {
    height: 27rem;
    padding: 22px;
  }
}
.hero-slide.active .hero-stage {
  transform: none;
  opacity: 1;
}
/* Slides that are pictures rather than product stand on the night itself, without a frame. */
.hero-slide-intro .hero-stage,
.hero-slide-challenge .hero-stage,
.hero-slide-frameworks .hero-stage {
  overflow: visible;
  padding: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.hero-slide-intro .hero-stage {
  height: auto;
}
/* The live question can be answered, so its feedback can be scrolled to. */
.hero-slide-assess .hero-stage {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.hero-slide-assess .hero-stage::-webkit-scrollbar {
  display: none;
}
.hero-stage .live-hint {
  display: none;
}
@media (max-width: 639px) {
  .hero-stage .question-meta {
    display: none;
  }
  .hero-stage {
    height: 24rem;
    padding: 14px;
  }
  /* On a phone the frameworks slide names the two programmes; the cards below give the routes. */
  .showcase-framework-label,
  .showcase-framework-route {
    display: none;
  }
}
.hero-stage .coach-embed {
  margin: -22px;
}
.hero-stage .preview-tiles,
.hero-stage .live-question,
.hero-stage .feedback {
  min-width: 0;
}

/* The opening slide's picture: a mock report and the assistant's plan. */
.hero-shot {
  position: relative;
  padding: 8px 18px 28px 0;
}
.hero-shot-window {
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero-shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.75);
}
.hero-shot-bar i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}
.hero-shot-bar span {
  margin-left: 8px;
}
.hero-shot-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}
.hero-shot-score {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-shot-score > span:last-child {
  display: grid;
  gap: 2px;
  font-size: 0.92rem;
}
.hero-shot-score small {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}
.hero-shot-ring {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}
.hero-shot-ring svg {
  width: 64px;
  height: 64px;
}
.hero-shot-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.hero-shot-route {
  display: grid;
  gap: 8px;
}
.hero-shot-route li {
  display: grid;
  grid-template-columns: 22px minmax(0, 9rem) minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
  animation: shotRow 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-shot-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.68rem;
}
.hero-shot-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-shot-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.hero-shot-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #86d2ff, #a78bfa);
}
.hero-shot-route li.learn .hero-shot-track span {
  background: linear-gradient(90deg, #fdba74, #fca5a5);
}
.hero-shot-route svg {
  width: 16px;
  height: 16px;
  color: #6ee7b7;
}
.hero-shot-route li.learn svg {
  color: #fca5a5;
}
@keyframes shotRow {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
}
.hero-shot-float {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.7);
  animation: floatY 6s ease-in-out infinite;
}
.hero-shot-float span:last-child {
  display: grid;
  font-size: 0.86rem;
}
.hero-shot-float small {
  font-size: 0.7rem;
  color: var(--muted);
}
.hero-shot-float-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-gradient-diag);
}
.hero-shot-float-mark svg {
  width: 16px;
  height: 16px;
}
@keyframes floatY {
  50% {
    transform: translateY(-8px);
  }
}
@media (max-width: 479px) {
  .hero-shot-route li {
    grid-template-columns: 22px minmax(0, 1fr) 4.5rem 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-shot-float {
    animation: none;
  }
}

/* The challenges, on glass. */
.showcase-challenges {
  display: grid;
  gap: 10px;
}
.showcase-challenges li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.98rem;
  color: #fff;
}
.showcase-challenges svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #a5b4fc;
}
.hero-slide.active .showcase-challenges li {
  animation: shotRow 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-slide.active .showcase-challenges li:nth-child(2) {
  animation-delay: 90ms;
}
.hero-slide.active .showcase-challenges li:nth-child(3) {
  animation-delay: 180ms;
}
.hero-slide.active .showcase-challenges li:nth-child(4) {
  animation-delay: 270ms;
}
.showcase-frameworks {
  display: grid;
  gap: 14px;
}
.showcase-framework {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 1.2rem;
  color: #fff;
  background:
    radial-gradient(18rem 10rem at 100% 0%, rgba(134, 210, 255, 0.32), transparent 60%),
    linear-gradient(150deg, #3b31c4, #3f79f2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 56px -30px rgba(0, 0, 0, 0.75);
}
.showcase-framework.ism {
  background:
    radial-gradient(18rem 10rem at 100% 0%, rgba(110, 231, 183, 0.28), transparent 60%),
    linear-gradient(150deg, #0f766e, #0e7490 60%, #1d6fb8);
}
.hero-slide.active .showcase-framework {
  animation: shotRow 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-slide.active .showcase-framework:nth-child(2) {
  animation-delay: 140ms;
}
.showcase-framework-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.showcase-framework-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.showcase-framework-icon svg {
  width: 22px;
  height: 22px;
}
.showcase-framework-names {
  display: grid;
  min-width: 0;
}
.showcase-framework-name {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}
.showcase-framework-focus {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
}
.showcase-framework-meta {
  align-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.74rem;
  white-space: nowrap;
}
.showcase-framework-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.showcase-framework-route {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.showcase-framework-route li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
}
.showcase-framework-route i {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 600;
  color: #312e81;
  background: #fff;
}
.showcase-framework.ism .showcase-framework-route i {
  color: #134e4a;
}

/* Under the slides: the named steps, then the way in. */
.hero-bar {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}
.hero-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
@media (max-width: 479px) {
  .hero-footer .btn {
    flex: 1 1 100%;
  }
}
.showcase-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.showcase-steps {
  flex: 1;
  display: flex;
  gap: 8px;
  min-width: 0;
}
.showcase-step {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 4px 0;
  text-align: left;
}
.showcase-step-label {
  display: none;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 300ms ease;
}
@media (min-width: 700px) {
  .showcase-step-label {
    display: block;
  }
}
.showcase-step:hover .showcase-step-label,
.showcase-step.on .showcase-step-label {
  color: #fff;
}
.showcase-step-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.showcase-step-bar span {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #86d2ff, #fff);
  border-radius: inherit;
}
.showcase-step.on .showcase-step-bar span {
  transform: scaleX(1);
}
.showcase-step.running .showcase-step-bar span {
  animation: showcaseProgress linear both;
}
@keyframes showcaseProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
/* Beside the pause button on narrower screens: plain chevrons, unlike the round pause button. */
.showcase-chevron {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 34px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 200ms ease, transform 200ms ease;
}
.showcase-chevron svg {
  width: 20px;
  height: 20px;
}
.showcase-chevron:hover {
  color: #fff;
}
.showcase-chevron + .showcase-pause,
.showcase-pause + .showcase-chevron {
  margin-left: -8px;
}
.showcase-chevron:first-of-type:hover {
  transform: translateX(-2px);
}
.showcase-chevron:last-of-type:hover {
  transform: translateX(2px);
}
.showcase-pause {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.showcase-pause:hover {
  background: rgba(255, 255, 255, 0.2);
}
.showcase-pause svg {
  width: 14px;
  height: 14px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-track.animate,
  .hero-copy > *,
  .hero-stage {
    transition: none;
  }
}

/* The topic tiles shown as a picture in previews. */
.tile-static {
  cursor: default;
}

/* The note that the questions are examples. */
.lp-examples-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--indigo-50);
  color: var(--indigo-900);
  font-size: 0.9rem;
  line-height: 1.5;
}
.lp-examples-note svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

/* pages.css */
/* ------------------------------------------------------------- app frame */

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app-main {
  flex: 1;
  padding-top: 4px;
  padding-bottom: 24px;
}
.focus-mode .app-footer {
  display: none;
}
.gate {
  max-width: 30rem;
  margin: 48px auto;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.gate-icon {
  width: 36px;
  height: 36px;
  color: var(--amber-600);
}
.dev-warning {
  margin-bottom: 14px;
}
.dev-warning ul {
  margin-top: 6px;
  padding-left: 18px;
  list-style: disc;
}
.storage-notice {
  margin-bottom: 14px;
}
.empty-card {
  max-width: 36rem;
  margin: 32px auto;
}

/* ---------------------------------------------------------- select page */

.select-page {
  display: grid;
  gap: 20px;
  padding-bottom: 12px;
}
.select-hero {
  max-width: 46rem;
  margin: 12px auto 4px;
  text-align: center;
  color: #fff;
}
.select-hero h1 {
  margin-top: 14px;
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 12px rgba(30, 27, 75, 0.25);
}
.select-hero p {
  margin-top: 14px;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
}
.programme-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 860px) {
  .programme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}
.programme-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}
@media (min-width: 640px) {
  .programme-card {
    padding: 30px;
  }
}
.programme-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--brand-gradient-diag);
  color: #fff;
  box-shadow: 0 12px 24px -12px var(--brand-glow);
}
.tone-teal .programme-icon {
  background: linear-gradient(135deg, #0d9488, #0891b2 60%, #3a6ce4);
  box-shadow: 0 12px 24px -12px rgba(13, 148, 136, 0.7);
}
.programme-icon svg {
  width: 30px;
  height: 30px;
}
.programme-body {
  display: grid;
  gap: 6px;
}
.programme-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tone-icon);
}
.programme-name {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.programme-text {
  color: var(--ink-3);
  line-height: 1.55;
}
.programme-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.programme-facts > span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}
.programme-facts > .programme-progress {
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.programme-cta {
  margin-top: auto;
}
.future-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 46rem;
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.9rem;
}
.future-note > svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.future-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-left: 4px solid var(--indigo-600);
}

/* ------------------------------------------------------------- dashboard */

.dashboard,
.performance {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
@media (min-width: 640px) {
  .dashboard,
  .performance {
    gap: 24px;
  }
}
.dash-title {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.dash-title-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.dash-title-icon svg {
  width: 26px;
  height: 26px;
}
.dash-title h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(30, 27, 75, 0.25);
}
.dash-title p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
}
.primary-tiles {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .primary-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}
.topic-grid {
  display: grid;
  gap: 12px;
}
/* Topic tiles always fill their rows: a lone tile at the end of a row
   stretches across it, and a pair shares it, so there are no gaps. */
@media (min-width: 560px) {
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .topic-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1000px) {
  html:not(.coach-docked) .topic-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
  html:not(.coach-docked) .topic-grid > * {
    grid-column: span 2;
  }
  html:not(.coach-docked) .topic-grid > :last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }
  html:not(.coach-docked) .topic-grid > :nth-last-child(2):nth-child(3n + 1),
  html:not(.coach-docked) .topic-grid > :last-child:nth-child(3n + 2) {
    grid-column: span 3;
  }
}
/* Three in a row only where each has room; otherwise one long tile each, like the last topic tile. */
.thin-tiles {
  display: grid;
  gap: 12px;
}
@media (min-width: 1000px) {
  html:not(.coach-docked) .thin-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (min-width: 1680px) {
  html.coach-docked .thin-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
.thin-tiles .tile-thin {
  height: 100%;
}
.thin-tiles .tile-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thin-tiles .tile-subtitle {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.basis-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 0.86rem;
  line-height: 1.55;
}
.basis-note > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.basis-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.first-visit-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
  text-align: center;
}
.first-visit-hint svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --------------------------------------------------------- start dialog */

.choice-group {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}
.choice-group legend {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.choice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.choice.on {
  border-color: var(--indigo-300);
  background: var(--indigo-50);
}
.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--indigo-600);
}
.choice > span {
  display: grid;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 1rem;
  border: 1px solid var(--line);
  cursor: pointer;
}
.switch-row > span:first-child {
  display: grid;
}
.switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color 150ms ease;
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease;
}
.switch.on span {
  background: var(--indigo-600);
}
.switch.on span::after {
  transform: translateX(20px);
}
.switch input:focus-visible + span {
  box-shadow: var(--ring);
}
.rules-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--ink-3);
}
.rules-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.rules-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--indigo-600);
}

/* ------------------------------------------------- mock briefing (opening) */

.mock-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.mock-facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--indigo-50);
  color: var(--indigo-700);
  font-size: 0.84rem;
  font-weight: 500;
}
.mock-facts svg {
  width: 15px;
  height: 15px;
}
.mock-route {
  position: relative;
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding: 4px 0;
}
.mock-route::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: linear-gradient(var(--indigo-200), #ddd6fe);
}
.mock-route li {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  animation: routeIn 360ms ease both;
}
.mock-route-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--indigo-300);
  color: var(--indigo-700);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 1;
}
.mock-route-text {
  display: grid;
  min-width: 0;
}
.mock-route-name {
  font-weight: 600;
  color: var(--ink);
}
.mock-route-note {
  font-size: 0.82rem;
  color: var(--muted);
}
.mock-route-count {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
@keyframes routeIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
@media (max-width: 480px) {
  .mock-route li {
    grid-template-columns: 32px 1fr;
  }
  .mock-route-count {
    grid-column: 2;
    margin-top: -6px;
  }
}

/* ------------------------------------------------------------ performance */

.perf-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.ring {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.ring svg {
  width: 100%;
  height: 100%;
}
.ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--indigo-900);
}
.perf-numbers {
  flex: 1;
  min-width: 16rem;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}
@media (min-width: 640px) {
  .perf-numbers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.perf-numbers dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.perf-numbers dd {
  margin: 2px 0 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.perf-numbers dd small {
  font-size: 0.8rem;
  color: var(--muted-2);
  font-weight: 600;
}
.framework-compare {
  display: grid;
  gap: 14px;
}
@media (min-width: 640px) {
  .framework-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.compare-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid transparent;
  transition: border-color 150ms ease, transform 200ms ease;
}
.compare-card:hover {
  transform: translateY(-2px);
}
.compare-card.current {
  border-color: var(--indigo-300);
}
.compare-card .ring {
  width: 72px;
  height: 72px;
}
.compare-card .ring span {
  font-size: 1rem;
}
.topic-bar-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 12px;
  width: calc(100% + 16px);
}
.topic-bar-button:hover {
  background: var(--surface-2);
}
.topic-bars.compact {
  margin-top: 4px;
  gap: 8px;
}
.records {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.record {
  border-radius: 1rem;
  border: 1px solid var(--line);
  overflow: hidden;
}
.record-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
}
.record-head:hover {
  background: var(--surface-2);
}
.record-score {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-weight: 600;
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.record-score.good {
  background: #ecfdf5;
  color: #047857;
}
.record-score.mid {
  background: var(--amber-50);
  color: var(--amber-700);
}
.record-score.low {
  background: #fff1f2;
  color: #be123c;
}
.record-text {
  flex: 1;
  min-width: 0;
  display: grid;
}
.record-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  transition: transform 200ms ease;
}
.record-head[aria-expanded="true"] .record-chevron {
  transform: rotate(180deg);
}
.record-body {
  display: grid;
  gap: 16px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.record-items {
  display: grid;
  gap: 18px;
}
.bookmark-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}
.bookmark-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 1rem;
  border: 1px solid var(--amber-200);
}
.bookmark-list li > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--amber-500);
  margin-top: 2px;
}
.bookmark-list li > span {
  display: grid;
  gap: 2px;
}
.bookmark-text {
  font-size: 0.9rem;
  color: var(--ink-3);
}
.privacy-card .row svg {
  width: 20px;
  height: 20px;
  color: var(--indigo-600);
}
.privacy-card .btn {
  margin-top: 14px;
}

/* ------------------------------------------------------------ demo chooser */

.demo-choices {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
@media (min-width: 720px) {
  .demo-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.demo-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: 1.4rem;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.demo-choice:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--indigo-200);
}
.demo-choice-guided {
  background: linear-gradient(160deg, #f4f3ff, #fff 55%);
}
.demo-choice-test {
  background: linear-gradient(160deg, #effaf9, #fff 55%);
}
.demo-choice-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #fff;
  background: var(--brand-gradient-diag);
}
.demo-choice-test .demo-choice-icon {
  background: linear-gradient(135deg, #0d9488, #0891b2 60%, #3a6ce4);
}
.demo-choice-icon svg {
  width: 24px;
  height: 24px;
}
.demo-choice-body {
  display: grid;
  gap: 4px;
}
.demo-choice-kicker {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.demo-choice-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.demo-choice-text {
  color: var(--ink-3);
  font-size: 0.92rem;
  line-height: 1.55;
}
.demo-choice-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}
.demo-choice-test .demo-choice-cta {
  background: #fff;
  color: var(--indigo-900);
  border: 1px solid var(--line-2);
}
.demo-choice-cta svg {
  width: 17px;
  height: 17px;
}
.demo-choices-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}
.demo-choices-note svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.demo-page-main {
  max-width: 64rem;
  padding-bottom: 48px;
  display: grid;
  gap: 18px;
}

/* ---------------------------------------------------------- page footnote */

.sources-page {
  display: grid;
  /* minmax(0, 1fr): a wide table or long word must not stretch the page past the screen. */
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.page-footnote {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  text-align: center;
}
.page-footnote svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.page-footnote a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------- sources */

.method-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-left: 18px;
  list-style: disc;
  color: var(--ink-3);
  font-size: 0.93rem;
  line-height: 1.6;
}
.framework-sources {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .framework-sources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
html.coach-docked .framework-sources {
  grid-template-columns: minmax(0, 1fr);
}
.source-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.principal-sources {
  display: grid;
  gap: 8px;
}
.register-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.register-tabs {
  min-width: 15rem;
}
.register {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}
.register-topic-title {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.register-topic ul {
  display: grid;
  gap: 6px;
}
.register-row {
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  overflow: hidden;
}
.register-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
}
.register-head:hover {
  background: var(--surface-2);
}
.register-head[aria-expanded="true"] .record-chevron {
  transform: rotate(180deg);
}
.register-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--indigo-700);
}
.register-prompt {
  font-size: 0.86rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 639px) {
  .register-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .register-head .verify-badge {
    display: none;
  }
}
.register-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.register-sources {
  display: grid;
  gap: 6px;
  padding-left: 16px;
  list-style: disc;
  font-size: 0.86rem;
}
.register-notes {
  padding: 10px 12px;
  border-radius: 0.8rem;
  background: var(--amber-50);
  color: var(--amber-800);
}
.inline-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 3px;
  vertical-align: -1px;
}
.future-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 640px) {
  .future-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------- the assistant, embedded */

.coach-embed {
  overflow: hidden;
}
.coach-embed .coach-panel {
  height: auto;
}
.coach-embed .coach-body {
  overflow: visible;
}
/* ---------------------------------------------------------------- admin */

.admin-main {
  padding-block: 24px 48px;
}
.admin-signin {
  display: grid;
  gap: 12px;
  max-width: 26rem;
  margin: 24px auto 0;
  text-align: center;
}
.admin-signin h1 {
  font-size: 1.5rem;
  font-weight: 600;
}
.admin-signin-icon {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.admin-signin-icon svg {
  width: 24px;
  height: 24px;
}
.admin-signin-form {
  display: grid;
  gap: 10px;
  text-align: left;
}
.admin-signin-form label {
  font-size: 0.85rem;
  font-weight: 600;
}
.admin-signin .notice {
  text-align: left;
}
.admin-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 56rem;
  margin: 0 auto;
}
.admin-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
}
.admin-title h1 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 600;
}
.admin-title p {
  opacity: 0.9;
}
.admin-tabs {
  max-width: 24rem;
}
.admin-enquiries {
  display: grid;
  gap: 12px;
}
.admin-enquiry {
  display: grid;
  gap: 10px;
  padding: 18px;
}
.admin-enquiry.is-handled {
  opacity: 0.85;
}
.admin-enquiry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-enquiry-name {
  font-weight: 600;
  font-size: 1.05rem;
}
.admin-enquiry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
}
.admin-enquiry-meta a {
  color: var(--indigo-700);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.admin-enquiry-message {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.admin-enquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-delete {
  color: var(--red-700);
}
.admin-views {
  max-width: 56rem;
  margin: 0 auto 18px;
}
@media (min-width: 640px) {
  .admin-views {
    max-width: 22rem;
    margin-left: max(0px, calc((100% - 56rem) / 2));
  }
}
.admin-enquiry-origin {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--indigo-50);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.admin-enquiry-origin strong {
  font-weight: 600;
  color: var(--indigo-700);
}
.admin-enquiry-origin span {
  color: var(--muted);
}

/* Admin: visitor statistics. */
.visit-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 760px) {
  .visit-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.visit-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.visit-card .card-subtitle {
  margin-top: -6px;
}
.visit-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .visit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.visit-tally li {
  grid-template-columns: minmax(0, 1fr) minmax(5rem, 40%);
}
.visit-tally .bar-list-label {
  display: grid;
  gap: 1px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.visit-tally-note {
  font-size: 0.74rem;
  color: var(--muted-2);
}
@media (max-width: 479px) {
  .visit-tally li {
    grid-template-columns: minmax(0, 1fr);
  }
}
.visit-rows {
  display: grid;
  border-top: 1px solid var(--line);
}
.visit-row {
  border-bottom: 1px solid var(--line);
}
.visit-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 10px 2px;
  cursor: pointer;
  list-style: none;
}
.visit-row summary::-webkit-details-marker {
  display: none;
}
@media (min-width: 760px) {
  .visit-row summary {
    grid-template-columns: 11rem minmax(0, 12rem) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
  }
}
.visit-row-when {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.visit-row-source {
  font-weight: 600;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.visit-row-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.visit-row-detail {
  display: grid;
  gap: 6px;
  padding: 0 2px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.visit-row-detail strong {
  font-weight: 600;
}
.visit-own .text-btn {
  min-height: 0;
  font-weight: 600;
}
.visit-footnote {
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

/* -------------------------------------------------------------- enquiry */

.enquire {
  min-height: 100vh;
  background: var(--surface-2);
}
.enquire-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.enquire-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 76rem;
  margin: 0 auto;
  padding: 12px var(--gutter);
}
.enquire-back {
  color: var(--ink-3);
}
.enquire-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 0 48px;
}
@media (min-width: 960px) {
  .enquire-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 32px;
    padding: 40px var(--gutter) 64px;
    align-items: start;
  }
}
/* The left panel: the deep gradient of the landing page's closing band. */
.enquire-intro {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 36px var(--gutter);
  color: #fff;
  background:
    radial-gradient(40rem 22rem at 0% 100%, rgba(91, 78, 240, 0.6), transparent 60%),
    linear-gradient(140deg, #1e1b4b, #312e81 45%, #3a6ce4);
}
@media (min-width: 960px) {
  .enquire-intro {
    position: sticky;
    top: 96px;
    padding: 40px;
    border-radius: 1.6rem;
    box-shadow: 0 30px 60px -36px rgba(30, 27, 75, 0.8);
  }
}
.enquire-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.enquire-intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.enquire-lead {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
}
.enquire-covers {
  display: grid;
  gap: 14px;
}
.enquire-covers li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.enquire-cover-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.enquire-cover-icon svg {
  width: 19px;
  height: 19px;
}
.enquire-cover-title {
  display: block;
  font-weight: 600;
}
.enquire-cover-text {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}
.enquire-next {
  padding: 18px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.enquire-next-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.enquire-next ol {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.enquire-next li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.45;
}
.enquire-step {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: #312e81;
  font-size: 0.78rem;
  font-weight: 600;
}
.enquire-privacy {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}
.enquire-privacy a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.enquire-privacy svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.enquire-card {
  margin: -18px var(--gutter) 0;
  padding: 22px;
  border-radius: 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -34px rgba(15, 23, 42, 0.45);
}
@media (min-width: 640px) {
  .enquire-card {
    padding: 32px;
  }
}
@media (min-width: 960px) {
  .enquire-card {
    margin: 0;
  }
}
.enquire-form {
  display: grid;
  gap: 16px;
}
.enquire-section-label {
  padding-top: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo-600);
}
.enquire-section-label:not(:first-child) {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.enquire-frameworks {
  border: 0;
  padding: 0;
  margin: 0;
}
.enquire-frameworks legend {
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-3);
}
.enquire-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.enquire-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-size: 0.9rem;
  color: var(--ink-3);
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.enquire-chip:hover {
  border-color: var(--indigo-300);
}
.enquire-chip.on {
  border-color: var(--indigo-400);
  background: var(--indigo-50);
  color: var(--indigo-800, #3730a3);
}
.enquire-chip svg {
  width: 15px;
  height: 15px;
}
.enquire-form-note {
  font-size: 0.78rem;
  color: var(--muted-2);
  text-align: center;
}
.enquire-sent {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px 0;
  text-align: center;
}
.enquire-sent h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
.enquire-sent p {
  max-width: 26rem;
  color: var(--muted);
}
.enquire-sent-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-600);
  animation: liveIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.enquire-sent-icon svg {
  width: 32px;
  height: 32px;
}

/* Admin: the enquiry's corporate details. */
.admin-enquiry-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 10px 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.admin-enquiry-facts dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.admin-enquiry-facts dd {
  font-size: 0.9rem;
  color: var(--ink);
}

/* ------------------------------------------- performance: views and team */

.perf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
}
.perf-head h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.perf-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.88);
}
.perf-views {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.perf-views button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #fff;
  transition: background-color 200ms ease, color 200ms ease;
}
.perf-views button svg {
  width: 15px;
  height: 15px;
}
.perf-views button[aria-selected="true"] {
  background: #fff;
  color: var(--indigo-700);
  box-shadow: 0 6px 16px -10px rgba(30, 27, 75, 0.6);
}
.perf-you,
.team {
  display: grid;
  gap: 20px;
  animation: fadeUp 360ms ease both;
}
.team > * {
  min-width: 0;
}
.sample-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #fde68a;
  box-shadow: inset 4px 0 0 #f59e0b;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.sample-notice svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #b45309;
}
.team-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
}
.seg button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 0.84rem;
  color: var(--ink-3);
  transition: background-color 150ms ease, color 150ms ease;
}
.seg button[aria-checked="true"] {
  background: var(--indigo-600);
  color: #fff;
}
.team-select select {
  min-height: 40px;
  padding: 0 34px 0 12px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.95)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  box-shadow: var(--shadow-sm);
  font: inherit;
  font-size: 0.86rem;
  color: var(--ink-2);
  appearance: none;
}
.team-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 900px) {
  .team-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.team-stat {
  padding: 16px;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.team-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.team-stat-value {
  margin-top: 4px;
  font-size: clamp(1.4rem, 3.4vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.team-stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--muted-2);
}
.team-stat-change svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.team-stat-change.up {
  color: #047857;
}
.team-stat-change.down {
  color: #c2410c;
}
.team-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 1000px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.team-card {
  min-width: 0;
}
.team-card .chart,
.team-card .bar-list,
.team-card .heat {
  margin-top: 14px;
}
.team-footnote {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 52rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.92);
}
.team-footnote svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}
/* Who sees what: three roles over the same figures. */
.roles {
  display: grid;
  gap: 10px;
}
@media (min-width: 900px) {
  .roles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
.role {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
  color: var(--ink);
  box-shadow: 0 10px 30px -24px rgba(15, 23, 42, 0.6);
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.role:hover {
  background: #fff;
  transform: translateY(-1px);
}
.role.on {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 18px 36px -24px rgba(15, 23, 42, 0.7);
}
.role-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.role.on .role-icon {
  background: var(--brand-gradient-diag);
  color: #fff;
}
.role-icon svg {
  width: 19px;
  height: 19px;
}
.role-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.role-who {
  font-weight: 600;
}
.role-what {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.role-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--indigo-700);
}
.role-action svg {
  width: 14px;
  height: 14px;
  transition: transform 200ms ease;
}
.role:hover .role-action svg {
  transform: translateX(2px);
}
/* One dot per stop of the mock's route. */
.area-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.area-dots i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--line-2);
}
.area-dots i.dot-matched {
  background: var(--green-600);
}
.area-dots i.dot-partly {
  background: #f59e0b;
}
.area-dots i.dot-learning {
  background: var(--red-600);
}
.area-count {
  margin-left: 4px;
  font-size: 0.74rem;
  color: var(--muted);
}
.vessels .vessel-open {
  white-space: nowrap;
}
.vessels .vessel-open svg {
  width: 14px;
  height: 14px;
}
.master-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding: 14px 16px;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 18px 36px -26px rgba(15, 23, 42, 0.7);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-3);
  animation: fadeUp 260ms ease both;
}
.master-banner > span:nth-child(2) {
  flex: 1 1 18rem;
}
.master-banner b {
  font-weight: 600;
  color: var(--ink);
}
.master-banner-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand-gradient-diag);
  color: #fff;
}
.master-banner-icon svg {
  width: 19px;
  height: 19px;
}
.focus-pill {
  margin-left: 6px;
  font-size: 0.68rem;
}

/* charts */
.chart {
  position: relative;
}
.chart svg {
  display: block;
  overflow: visible;
}
.chart svg:focus-visible {
  outline: 2px solid var(--indigo-300);
  outline-offset: 4px;
  border-radius: 6px;
}
.chart-axis {
  font-size: 11px;
  fill: #64748b;
  font-variant-numeric: tabular-nums;
}
.chart-end-label {
  font-size: 12px;
  font-weight: 600;
  fill: #0f172a;
}
.chart-line {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawLine 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}
.chart-column {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: growUp 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: opacity 150ms ease;
}
@keyframes growUp {
  from {
    transform: scaleY(0);
  }
}
.chart-tip {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 1px;
  min-width: 96px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  pointer-events: none;
  transform: translate(12px, -50%);
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.6);
}
.chart-tip.flip {
  transform: translate(calc(-100% - 12px), -50%);
}
.chart-tip-value {
  font-weight: 600;
  font-size: 0.92rem;
}
.chart-tip-label {
  font-size: 0.72rem;
  color: #cbd5e1;
}
.bar-list {
  display: grid;
  gap: 10px;
}
.bar-list li {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  animation: fadeUp 360ms ease both;
}
.bar-list-label {
  font-size: 0.84rem;
  color: var(--ink-2);
}
.bar-list-track {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-list-bar {
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: var(--series);
  transform-origin: left;
  animation: growRight 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bar-list li:hover .bar-list-bar {
  background: var(--series-strong);
}
@keyframes growRight {
  from {
    transform: scaleX(0);
  }
}
.bar-list-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 479px) {
  .bar-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}
.heat-scroll {
  overflow-x: auto;
}
.heat-table {
  width: 100%;
  min-width: 30rem;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 0.78rem;
}
.heat-table th {
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  padding: 0 6px 0 0;
}
.heat-table thead th {
  padding: 0 0 4px;
  text-align: center;
  white-space: normal;
  line-height: 1.2;
  font-size: 0.72rem;
  vertical-align: bottom;
}
.heat-table thead th.heat-corner {
  width: 5.5rem;
  text-align: left;
}
.heat-cell {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 34px;
  border-radius: 6px;
  color: #1e1b4b;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: transform 150ms ease, box-shadow 150ms ease;
  cursor: default;
}
.heat-cell.dark {
  color: #fff;
}
.heat-cell.active,
.heat-cell:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--series);
  outline: none;
}
.heat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--muted);
}
.heat-legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.heat-legend span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.spark {
  display: block;
}
.spark-empty {
  font-size: 0.8rem;
  color: var(--muted-2);
}
.chart-numbers {
  margin-top: 12px;
  font-size: 0.82rem;
}
.chart-numbers summary {
  cursor: pointer;
  color: var(--indigo-700);
  width: fit-content;
}
.chart-numbers-scroll {
  overflow-x: auto;
  margin-top: 8px;
}
.chart-numbers table,
.learners {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.chart-numbers th,
.chart-numbers td,
.learners th,
.learners td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
  vertical-align: middle;
}
.chart-numbers thead th,
.learners thead th {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.learners .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.learners-scroll {
  margin-top: 12px;
  overflow-x: auto;
}
.learners-more {
  margin-top: 12px;
}
.learners tbody tr:hover {
  background: #f8fafc;
}
.learner-name {
  display: block;
  font-weight: 500;
  color: var(--ink);
}
.learner-vessel {
  font-size: 0.76rem;
  color: var(--muted-2);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 0.8rem;
}
.status svg {
  width: 14px;
  height: 14px;
}
.status-on-track {
  color: #047857;
}
.status-attention {
  color: #b45309;
}
.status-not-started {
  color: var(--muted-2);
}
/* Phones and tablets: each learner or vessel becomes a small card, so nothing scrolls sideways. */
@media (max-width: 899px) {
  .learners thead {
    display: none;
  }
  .learners,
  .learners tbody,
  .learners tr,
  .learners th,
  .learners td {
    display: block;
  }
  .learners tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .learners th,
  .learners td {
    padding: 0;
    border: 0;
  }
  .learners th[scope="row"] {
    grid-column: 1 / -1;
  }
  .learners td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.68rem;
    color: var(--muted-2);
  }
  .learners .num {
    text-align: left;
  }
  .learners td[data-label="Areas"] {
    grid-column: 1 / -1;
  }
  .vessels td:last-child {
    grid-column: 1 / -1;
  }
  .vessels td:last-child::before {
    display: none;
  }
}

/* ---------------------------------------------------------------- privacy */

.privacy {
  display: grid;
  gap: 10px;
  max-width: 44rem;
  margin: 0 auto;
  line-height: 1.6;
}
.privacy .admin-signin-icon {
  justify-self: start;
}
.privacy h1 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 600;
}
.privacy h2 {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 600;
}
.privacy-lead {
  color: var(--ink-2);
  font-size: 1.02rem;
}
.privacy ul {
  display: grid;
  gap: 4px;
  padding-left: 1.2rem;
  list-style: disc;
}
.privacy a {
  color: var(--indigo-700);
  font-weight: 600;
}
