/* ============================================================
   AICAF — AI Capability & Adoption Framework
   Tech Partners LLC
   ============================================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #f5f5f5;
  --color-surface-offset: #efedec;
  --color-surface-offset-2: #e6e4e3;
  --color-surface-dynamic: #dad8d6;
  --color-divider: #e4e2e0;
  --color-border: #d6d4d2;

  /* Text */
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-text-faint: #9c9a98;
  --color-text-inverse: #ffffff;

  /* Primary accent — Tech Red */
  --color-primary: #b22234;
  --color-primary-hover: #921b2a;
  --color-primary-active: #6e141f;
  --color-primary-highlight: #f5dde0;

  /* Semantic (data / status use only) */
  --color-success: #3f7a45;
  --color-success-highlight: #dfeade;
  --color-warning: #b3720e;
  --color-warning-highlight: #f3e3c4;
  --color-error: #b22234;
  --color-error-highlight: #f5dde0;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0 0 / 0.06);
  --shadow-md: 0 4px 14px oklch(0.2 0 0 / 0.09);
  --shadow-lg: 0 16px 36px oklch(0.2 0 0 / 0.14);

  --content-narrow: 640px;
  --content-default: 880px;
  --content-wide: 1160px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'General Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #141414;
  --color-surface: #1a1a1a;
  --color-surface-2: #202020;
  --color-surface-offset: #242424;
  --color-surface-offset-2: #2b2b2b;
  --color-surface-dynamic: #363636;
  --color-divider: #2c2c2c;
  --color-border: #3a3a3a;

  --color-text: #f0eeec;
  --color-text-muted: #aba9a7;
  --color-text-faint: #6e6c6a;
  --color-text-inverse: #1a1a1a;

  --color-primary: #e2687a;
  --color-primary-hover: #eb8290;
  --color-primary-active: #c9455a;
  --color-primary-highlight: #3a2023;

  --color-success: #71ae76;
  --color-success-highlight: #223227;
  --color-warning: #dcac4f;
  --color-warning-highlight: #382e1c;
  --color-error: #e2687a;
  --color-error-highlight: #3a2023;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 36px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141414;
    --color-surface: #1a1a1a;
    --color-surface-2: #202020;
    --color-surface-offset: #242424;
    --color-surface-offset-2: #2b2b2b;
    --color-surface-dynamic: #363636;
    --color-divider: #2c2c2c;
    --color-border: #3a3a3a;
    --color-text: #f0eeec;
    --color-text-muted: #aba9a7;
    --color-text-faint: #6e6c6a;
    --color-text-inverse: #1a1a1a;
    --color-primary: #e2687a;
    --color-primary-hover: #eb8290;
    --color-primary-active: #c9455a;
    --color-primary-highlight: #3a2023;
    --color-success: #71ae76;
    --color-success-highlight: #223227;
    --color-warning: #dcac4f;
    --color-warning-highlight: #382e1c;
    --color-error: #e2687a;
    --color-error-highlight: #3a2023;
  }
}

/* ---------- Type scale ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ---------- Base ---------- */
body {
  background-image: radial-gradient(
    circle at 50% 0%,
    var(--color-surface-offset) 0%,
    var(--color-bg) 55%
  );
  background-attachment: fixed;
}

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

p {
  max-width: 68ch;
}

a {
  color: var(--color-primary);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.brand__mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.brand__mark .brand-accent {
  fill: var(--color-primary);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
}
.brand__tag {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.topbar__by {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: none;
}
@media (min-width: 640px) {
  .topbar__by {
    display: inline;
  }
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  background: var(--color-primary-active);
}
.btn-secondary {
  background: transparent;
  border-color: oklch(from var(--color-text) l c h / 0.18);
  color: var(--color-text);
}
.btn-secondary:hover {
  background: var(--color-surface-offset);
  border-color: oklch(from var(--color-text) l c h / 0.28);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding-inline: var(--space-3);
}
.btn-ghost:hover {
  color: var(--color-text);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn-block {
  width: 100%;
}

/* ---------- Intro / Hero ---------- */
.hero {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24)) clamp(var(--space-10), 6vw, var(--space-16));
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}
.hero h1 {
  font-size: var(--text-2xl);
  font-weight: 700;
  max-width: 22ch;
  margin-bottom: var(--space-5);
}
.hero p.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-8);
  font-family: var(--font-body);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-12);
}
.hero__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.pillars-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  margin-top: var(--space-4);
}
.pillar-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
}
.pillar-card__index {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: var(--space-2);
  display: block;
}
.pillar-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.pillar-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Wizard ---------- */
.wizard {
  padding-block: var(--space-10) var(--space-24);
}
.progress {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.progress__seg {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  overflow: hidden;
}
.progress__seg > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.progress__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  display: flex;
  justify-content: space-between;
}

.step {
  animation: step-in 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.step__head {
  margin-bottom: var(--space-8);
}
.step__kicker {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
  display: block;
}
.step h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.step__desc {
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

.field-group {
  margin-bottom: var(--space-10);
}
.field-group__label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.field-group__hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: calc(-1 * var(--space-2));
  margin-bottom: var(--space-3);
  display: block;
}

.option-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
}
.option-grid--2col {
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}

.opt-card {
  position: relative;
  display: block;
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
}
.opt-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.opt-card:hover {
  border-color: oklch(from var(--color-text) l c h / 0.24);
  background: var(--color-surface-offset);
}
.opt-card.is-checked {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.opt-card__title {
  font-weight: 600;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.opt-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.opt-card__check {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid oklch(from var(--color-text) l c h / 0.28);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.opt-card__check svg {
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition-interactive);
}
.opt-card.is-checked .opt-card__check {
  border-color: var(--color-primary);
  background: var(--color-primary);
}
.opt-card.is-checked .opt-card__check svg {
  opacity: 1;
}
.opt-card--checkbox .opt-card__check {
  border-radius: var(--radius-sm);
}

.opt-card--level {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.opt-card--level .opt-card__badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-faint);
  flex-shrink: 0;
  width: 2ch;
}
.opt-card--level.is-checked .opt-card__badge {
  color: var(--color-primary);
}
.opt-card--level ul {
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: grid;
  gap: var(--space-1);
}
.opt-card--level li::before {
  content: '—';
  margin-right: var(--space-2);
  color: var(--color-text-faint);
}

/* ---------- Allocator (workforce composition) ---------- */
.allocator {
  border: 1px solid oklch(from var(--color-text) l c h / 0.1);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
}
.allocator__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
.allocator__total-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.allocator__total-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
}
.allocator__total-value.is-good {
  color: var(--color-success);
}
.allocator__total-value.is-off {
  color: var(--color-warning);
}
.allocator-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) 1fr 52px;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-2);
}
.allocator-row__label {
  font-size: var(--text-sm);
  font-weight: 500;
}
.allocator-row__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  min-height: 44px;
  padding-block: 19px;
  background-clip: content-box;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 3px solid var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
input[type='range']::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid var(--color-surface);
  border-radius: var(--radius-full);
  background: var(--color-primary);
  cursor: pointer;
}
.allocator__balance {
  margin-top: var(--space-4);
}

/* ---------- Step nav ---------- */
.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

/* ---------- Review ---------- */
.review-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  margin-bottom: var(--space-8);
}
.review-item {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
}
.review-item__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.review-item__value {
  font-size: var(--text-sm);
  font-weight: 600;
}
.lead-box {
  border: 1px solid oklch(from var(--color-text) l c h / 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-8);
}
.lead-box h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.lead-box p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.lead-box__fields {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.field label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.field input {
  border: 1px solid oklch(from var(--color-text) l c h / 0.16);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-surface);
  font-size: var(--text-sm);
  min-height: 44px;
}
.field input:focus-visible {
  border-color: var(--color-primary);
}

/* ---------- Results ---------- */
.results {
  padding-block: var(--space-10) var(--space-24);
  display: none;
}
.results.is-visible {
  display: block;
}
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.results-toolbar__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

#report {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-16);
}
.report-header {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-xl);
}
.report-header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}
.report-header h1 {
  font-size: var(--text-xl);
  font-weight: 700;
}
.report-header__date {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.snapshot-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
}
.snapshot-item__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}
.snapshot-item__value {
  font-size: var(--text-sm);
  font-weight: 600;
}

.report-section__head {
  margin-bottom: var(--space-6);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.report-section__num {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-2);
}
.report-section h2 {
  font-size: var(--text-lg);
  font-weight: 700;
}
.report-section__intro {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: 70ch;
  margin-top: var(--space-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.badge--primary {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.badge--success {
  background: var(--color-success-highlight);
  color: var(--color-success);
}
.badge--warning {
  background: var(--color-warning-highlight);
  color: var(--color-warning);
}

/* Maturity */
.maturity-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}
.maturity-card__level {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: 1;
}
.maturity-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}
.maturity-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.next-steps {
  display: grid;
  gap: var(--space-2);
}
.next-steps li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-divider);
}
.next-steps li:first-child {
  border-top: none;
  padding-top: 0;
}
.next-steps li .step-index {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* Persona bars */
.persona-list {
  display: grid;
  gap: var(--space-3);
}
.persona-bar {
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface);
}
.persona-bar__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.persona-bar__name {
  font-weight: 600;
  font-size: var(--text-sm);
}
.persona-bar__examples {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.persona-bar__score {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-primary);
  flex-shrink: 0;
}
.persona-bar__track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
  overflow: hidden;
  margin-bottom: var(--space-3);
}
.persona-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}
.persona-bar__detail {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.persona-bar.is-priority .persona-bar__detail {
  display: grid;
}
.persona-bar__detail strong {
  display: block;
  color: var(--color-text);
  font-size: var(--text-xs);
  margin-bottom: var(--space-1);
}

/* Capability roadmap */
.roadmap-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.roadmap-card {
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: var(--color-surface);
}
.roadmap-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.roadmap-card h3 {
  font-size: var(--text-sm);
  font-weight: 700;
}
.roadmap-levels {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.roadmap-levels svg {
  width: 13px;
  height: 13px;
  color: var(--color-text-faint);
}
.roadmap-card ul {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: grid;
  gap: var(--space-1-5, 0.375rem);
  margin-bottom: var(--space-3);
}
.roadmap-card li::before {
  content: '—';
  margin-right: var(--space-2);
  color: var(--color-text-faint);
}
.roadmap-card__resources {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
}
.roadmap-card__resources p {
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.resource-link {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--color-divider);
}
.resource-link:last-child {
  border-bottom: none;
}
.resource-link:hover {
  color: var(--color-primary);
}
.resource-link__meta {
  color: var(--color-text-faint);
  display: block;
  font-size: var(--text-xs);
}

/* Platform table */
.platform-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
.platform-card {
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: var(--color-surface);
}
.platform-card.is-recommended {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.platform-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.platform-card h3 {
  font-size: var(--text-sm);
  font-weight: 700;
}
.platform-tool {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-divider);
}
.platform-tool:first-of-type {
  border-top: none;
  padding-top: 0;
}
.platform-tool__name {
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}
.platform-tool__name a {
  color: var(--color-text);
}
.platform-tool__name a:hover {
  color: var(--color-primary);
}
.platform-tool__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.platform-tool__meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}

/* Governance */
.gov-grid {
  display: grid;
  gap: var(--space-4);
}
.gov-card {
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: var(--color-surface);
}
.gov-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.gov-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-surface-offset);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.gov-card__icon svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}
.gov-card h3 {
  font-size: var(--text-sm);
  font-weight: 700;
}
.gov-card ul {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.gov-card li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  gap: var(--space-2);
}
.gov-card li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.5em;
}
.gov-card__resources {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-3);
  display: grid;
  gap: var(--space-1);
}

/* Activity table */
.activity-table-wrap {
  overflow-x: auto;
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
}
table.activity-table {
  font-size: var(--text-sm);
}
table.activity-table th,
table.activity-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
table.activity-table th {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
}
table.activity-table tr:last-child td {
  border-bottom: none;
}

/* Action plan */
.action-list {
  display: grid;
  gap: var(--space-3);
}
.action-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.action-item__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex-shrink: 0;
  width: 1.5ch;
}
.action-item h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.action-item p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Sources appendix */
.sources-cols {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}
.sources-cols h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.sources-cols ol {
  display: grid;
  gap: var(--space-2);
  list-style: decimal;
  padding-left: 1.1em;
}
.sources-cols li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.sources-cols a {
  color: var(--color-text);
}
.sources-cols a:hover {
  color: var(--color-primary);
}

/* Follow-up CTA */
.followup {
  padding: var(--space-8);
  background: var(--color-text);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  display: grid;
  gap: var(--space-4);
}
[data-theme='dark'] .followup {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.followup h2 {
  font-size: var(--text-lg);
  color: inherit;
}
.followup p {
  color: color-mix(in oklab, var(--color-text-inverse) 70%, transparent);
  font-size: var(--text-sm);
}
[data-theme='dark'] .followup p {
  color: var(--color-text-muted);
}
.followup__fields {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
}
.followup .field input {
  background: color-mix(in oklab, var(--color-text-inverse) 10%, transparent);
  border-color: color-mix(in oklab, var(--color-text-inverse) 20%, transparent);
  color: var(--color-text-inverse);
}
[data-theme='dark'] .followup .field input {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.followup .field label {
  color: color-mix(in oklab, var(--color-text-inverse) 65%, transparent);
}
[data-theme='dark'] .followup .field label {
  color: var(--color-text-muted);
}
.followup__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.followup .btn-primary {
  background: var(--color-primary);
}

.restart-row {
  text-align: center;
  padding-top: var(--space-4);
}

/* ---------- Footer CTA ---------- */
.footer-cta {
  margin-top: var(--space-16);
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.footer-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  padding-block: var(--space-10);
}
.footer-cta__text h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.footer-cta__text p {
  color: var(--color-text-muted);
  max-width: 56ch;
}
.footer-cta .btn {
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .footer-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-10);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.site-footer a {
  color: var(--color-text-muted);
}
.site-footer__disclaimer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
}
.site-footer__disclaimer p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: 90ch;
}

/* ---------- Report disclaimer ---------- */
.report-disclaimer {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}
.mt-8 {
  margin-top: var(--space-8);
}

/* ---------- Print ---------- */
@media print {
  .no-print {
    display: none !important;
  }
}
.pdf-mode .no-print {
  display: none !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .allocator-row {
    grid-template-columns: 1fr 44px;
    grid-template-areas: 'label value' 'slider slider';
    row-gap: var(--space-1);
  }
  .allocator-row__label {
    grid-area: label;
  }
  .allocator-row__value {
    grid-area: value;
  }
  .allocator-row input[type='range'] {
    grid-area: slider;
  }
  .maturity-card {
    grid-template-columns: 1fr;
  }
  .step-nav {
    flex-direction: column-reverse;
    gap: var(--space-3);
    align-items: stretch;
  }
  .step-nav .btn {
    width: 100%;
  }
}

/* Safety net: html2pdf's offscreen render overlay must never intercept clicks,
   even if it is not cleaned up promptly after export. */
.html2pdf__overlay {
  pointer-events: none !important;
}
