/* ==========================================================================
   MRCOG Academy — Shared component library
   Used by both the public site and the authenticated student area.
   ========================================================================== */

/* ==========================================================================
   1. Buttons
   ========================================================================== */

.btn {
  --btn-bg: var(--plum-700);
  --btn-fg: var(--white);
  --btn-border: var(--plum-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }

.btn--primary { --btn-bg: var(--plum-700); --btn-border: var(--plum-700); }
.btn--primary:hover { --btn-bg: var(--plum-800); --btn-border: var(--plum-800); }

.btn--gold {
  --btn-bg: var(--gold-500);
  --btn-border: var(--gold-500);
  --btn-fg: var(--plum-900);
}
.btn--gold:hover { --btn-bg: var(--gold-400); --btn-border: var(--gold-400); }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--plum-700);
  --btn-border: var(--plum-300);
}
.btn--secondary:hover {
  --btn-bg: var(--plum-050);
  --btn-border: var(--plum-500);
  --btn-fg: var(--plum-800);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-secondary);
  --btn-border: transparent;
  box-shadow: none;
}
.btn--ghost:hover {
  --btn-bg: var(--ink-050);
  --btn-fg: var(--text-primary);
  box-shadow: none;
}

.btn--on-dark {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-border: rgba(255, 255, 255, 0.35);
}
.btn--on-dark:hover {
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-border: rgba(255, 255, 255, 0.6);
}

.btn--light {
  --btn-bg: var(--white);
  --btn-fg: var(--plum-800);
  --btn-border: var(--white);
}
.btn--light:hover { --btn-bg: var(--ivory); --btn-border: var(--ivory); }

.btn--danger {
  --btn-bg: transparent;
  --btn-fg: var(--state-incorrect);
  --btn-border: var(--state-incorrect-border);
}
.btn--danger:hover { --btn-bg: var(--state-incorrect-bg); }

.btn--lg { padding: 0.95rem 1.85rem; font-size: var(--fs-base); }
.btn--sm { padding: 0.5rem 0.9rem; font-size: var(--fs-2xs); }
.btn--block { display: flex; width: 100%; }
.btn--icon { padding: 0.55rem; aspect-ratio: 1; }

.btn[aria-disabled="true"],
.btn:disabled,
.btn--disabled {
  --btn-bg: var(--ink-100);
  --btn-fg: var(--ink-400);
  --btn-border: var(--ink-100);
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-arrow { font-size: 1.05em; line-height: 1; transition: transform var(--t-fast) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(2px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  color: var(--plum-600);
}
.link-arrow:hover { color: var(--plum-800); }
.link-arrow::after {
  content: "→";
  transition: transform var(--t-fast) var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(3px); }

/* ==========================================================================
   2. Badges, chips, access labels
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.28rem 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-default);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  line-height: 1.35;
  white-space: nowrap;
}
.badge--included {
  background: var(--state-included-bg);
  border-color: var(--state-included-border);
  color: var(--state-included);
}
.badge--preview {
  background: var(--state-preview-bg);
  border-color: var(--state-preview-border);
  color: var(--state-preview);
}
.badge--owned {
  background: var(--state-owned-bg);
  border-color: var(--state-owned-border);
  color: var(--state-owned);
}
.badge--locked {
  background: var(--state-locked-bg);
  border-color: var(--state-locked-border);
  color: var(--state-locked);
}
.badge--separate {
  background: var(--plum-800);
  border-color: var(--plum-800);
  color: var(--gold-300);
}
.badge--correct {
  background: var(--state-correct-bg);
  border-color: var(--state-correct-border);
  color: var(--state-correct);
}
.badge--incorrect {
  background: var(--state-incorrect-bg);
  border-color: var(--state-incorrect-border);
  color: var(--state-incorrect);
}
.badge--warning {
  background: var(--state-warning-bg);
  border-color: var(--state-warning-border);
  color: var(--state-warning);
}
.badge--gold {
  background: var(--gold-100);
  border-color: var(--gold-300);
  color: var(--gold-700);
}
.badge--plum {
  background: var(--plum-050);
  border-color: var(--plum-200);
  color: var(--plum-700);
}
.badge--lg { padding: 0.4rem 0.8rem; font-size: var(--fs-2xs); }

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--text-secondary);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.chip:hover {
  border-color: var(--plum-400);
  color: var(--plum-700);
  background: var(--plum-050);
}
.chip--active,
.chip[aria-pressed="true"] {
  background: var(--plum-700);
  border-color: var(--plum-700);
  color: var(--white);
}
.chip--active:hover { background: var(--plum-800); color: var(--white); }
.chip-count {
  font-size: var(--fs-3xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.chip--active .chip-count { color: rgba(255, 255, 255, 0.75); }

/* Access legend */
.access-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
}
.access-legend-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}
.access-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex: none;
  border: 1px solid;
}
.access-swatch--included { background: var(--state-included-bg); border-color: var(--state-included); }
.access-swatch--preview { background: var(--state-preview-bg); border-color: var(--state-preview); }
.access-swatch--owned { background: var(--state-owned-bg); border-color: var(--state-owned); }
.access-swatch--locked { background: var(--state-locked-bg); border-color: var(--state-locked); }

/* ==========================================================================
   3. Cards
   ========================================================================== */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card--flat { box-shadow: none; }
.card--raised { box-shadow: var(--shadow-md); }
.card--pad { padding: var(--sp-6); }
.card--pad-lg { padding: var(--sp-7); }
.card--sunken { background: var(--surface-sunken); box-shadow: none; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
}
.card-head h3,
.card-head h2 { margin: 0; font-size: var(--fs-lg); }
.card-body { padding: var(--sp-6); }
.card-body--tight { padding: var(--sp-5); }
.card-foot {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-sunken);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.card-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--plum-200);
  color: inherit;
}

/* ---------- Feature card ---------- */
.feature-card {
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.feature-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.feature-card p { color: var(--text-secondary); font-size: var(--fs-sm); margin: 0; line-height: var(--lh-relaxed); }

.feature-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--plum-050);
  border: 1px solid var(--plum-100);
  color: var(--plum-700);
  font-size: 1.25rem;
  margin-bottom: var(--sp-4);
}
.feature-icon--gold { background: var(--gold-100); border-color: var(--gold-300); color: var(--gold-700); }

/* ---------- Metric / stat ---------- */
.metric {
  padding: var(--sp-5) var(--sp-6);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.metric-label {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.metric-value {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--plum-800);
  font-variant-numeric: tabular-nums;
}
.metric-value--sm { font-size: var(--fs-xl); }
.metric-note {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
.metric-note--up { color: var(--state-included); }
.metric-note--down { color: var(--state-incorrect); }

.metric--inverse {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}
.metric--inverse .metric-value { color: var(--white); }
.metric--inverse .metric-label { color: var(--gold-300); }
.metric--inverse .metric-note { color: var(--text-on-dark-muted); }

/* ---------- Course card ---------- */
.course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.course-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-4);
  background: var(--grad-plum);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.course-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.16), transparent 46%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 13px);
}
.course-cover--oncology { background: linear-gradient(140deg, #2E1330 0%, #5B2350 60%, #7C3A5E 100%); }
.course-cover--fetal { background: linear-gradient(140deg, #14262E 0%, #285264 60%, #3D7185 100%); }
.course-cover--labour { background: linear-gradient(140deg, #3A1220 0%, #7A2C3E 60%, #9E4A5C 100%); }
.course-cover--gov { background: linear-gradient(140deg, #21212C 0%, #3D3A52 60%, #565073 100%); }
.course-cover--repro { background: linear-gradient(140deg, #1F2A22 0%, #2F5844 60%, #4B7A62 100%); }
.course-cover--premium { background: linear-gradient(140deg, #240C1F 0%, #4A1D3F 45%, #8A6A3C 130%); }
.course-cover--urogyn { background: linear-gradient(140deg, #241C33 0%, #40355C 60%, #5E5182 100%); }
.course-cover--stats { background: linear-gradient(140deg, #1B2430 0%, #34485E 60%, #4F6884 100%); }

.course-cover-eyebrow {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.course-cover-badges {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
}
.course-cover-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
  margin: 0;
  color: var(--white);
  position: relative;
}

.course-card-body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}
.course-card-body h3 { font-size: var(--fs-lg); margin: 0; }
.course-card-body > p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  list-style: none;
  padding: 0;
  margin: 0;
}
.course-meta li { display: flex; align-items: center; gap: 0.3rem; margin: 0; }

.course-card-foot {
  margin-top: auto;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  background: var(--surface-sunken);
}

.instructor {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plum-100);
  color: var(--plum-700);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  flex: none;
  border: 1px solid var(--plum-200);
}
.avatar--gold { background: var(--gold-100); border-color: var(--gold-300); color: var(--gold-700); }
.avatar--lg { width: 52px; height: 52px; font-size: var(--fs-sm); }
.avatar--sm { width: 28px; height: 28px; font-size: var(--fs-3xs); }
.instructor-name { font-size: var(--fs-xs); font-weight: var(--fw-semibold); display: block; }
.instructor-role { font-size: var(--fs-3xs); color: var(--text-muted); display: block; }

/* Locked overlay treatment */
.course-card--locked .course-cover { filter: saturate(0.45); }
.course-card--locked .course-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 26, 34, 0.45);
}
.lock-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   4. Progress
   ========================================================================== */

.progress {
  height: 8px;
  background: var(--ink-100);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--plum-600);
  transition: width var(--t-slow) var(--ease-out);
}
.progress-bar--gold { background: var(--grad-gold); }
.progress-bar--success { background: var(--state-included); }
.progress-bar--warning { background: #C99A2E; }
.progress-bar--danger { background: #B4544F; }
.progress--sm { height: 5px; }
.progress--lg { height: 12px; }

.progress-row {
  display: grid;
  gap: var(--sp-2);
}
.progress-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}
.progress-row-label { font-weight: var(--fw-medium); color: var(--text-primary); }
.progress-row-value {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Circular-style score ring built with conic-gradient */
.score-ring {
  --value: 72;
  --ring-color: var(--plum-600);
  width: 132px; height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-color) calc(var(--value) * 1%), var(--ink-100) 0);
  position: relative;
  flex: none;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--white);
}
.score-ring-inner {
  position: relative;
  text-align: center;
  line-height: 1.1;
}
.score-ring-value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--plum-800);
  font-variant-numeric: tabular-nums;
}
.score-ring-label {
  display: block;
  font-size: var(--fs-3xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.score-ring--sm { width: 92px; height: 92px; }
.score-ring--sm::before { inset: 8px; }
.score-ring--sm .score-ring-value { font-size: var(--fs-lg); }

/* CSS bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-3);
  height: 180px;
  padding: var(--sp-4) 0 0;
  border-bottom: 1px solid var(--border-default);
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-2);
  height: 100%;
  min-width: 0;
}
.bar-fill {
  width: 100%;
  max-width: 46px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: linear-gradient(180deg, var(--plum-500), var(--plum-700));
  position: relative;
  min-height: 4px;
}
.bar-fill--gold { background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); }
.bar-value {
  font-size: var(--fs-3xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.bar-label {
  font-size: var(--fs-3xs);
  color: var(--text-muted);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
.chart-legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.legend-key { width: 10px; height: 10px; border-radius: 2px; flex: none; }

/* Threshold meter */
.threshold-meter {
  position: relative;
  height: 34px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, #E7C9C9 0%, #F0E0C2 48%, #C8E0D3 100%);
  overflow: visible;
}
.threshold-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 3px;
  background: var(--plum-800);
  border-radius: 2px;
}
.threshold-marker::after {
  content: attr(data-label);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-semibold);
  color: var(--plum-800);
  white-space: nowrap;
}
.threshold-pass {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: var(--ink-700);
  border-radius: 2px;
  opacity: 0.65;
}
.threshold-pass::after {
  content: attr(data-label);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-3xs);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   5. Alerts / notes
   ========================================================================== */

.alert {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border-default);
  border-left-width: 3px;
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
}
.alert strong { color: var(--text-primary); display: block; margin-bottom: 2px; }
.alert-icon { flex: none; font-size: 1.1rem; line-height: 1.35; }
.alert--info { background: var(--state-preview-bg); border-color: var(--state-preview-border); border-left-color: var(--state-preview); }
.alert--success { background: var(--state-correct-bg); border-color: var(--state-correct-border); border-left-color: var(--state-correct); }
.alert--warning { background: var(--state-warning-bg); border-color: var(--state-warning-border); border-left-color: var(--state-warning); }
.alert--danger { background: var(--state-incorrect-bg); border-color: var(--state-incorrect-border); border-left-color: var(--state-incorrect); }
.alert--plum { background: var(--plum-050); border-color: var(--plum-200); border-left-color: var(--plum-600); }
.alert--gold { background: var(--gold-100); border-color: var(--gold-300); border-left-color: var(--gold-600); }

/* Prominent commercial notice — used for "sold separately" messaging */
.notice-separate {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--plum-900);
  color: var(--text-on-dark);
  border: 1px solid var(--plum-700);
  box-shadow: var(--shadow-md);
}
.notice-separate h4 { color: var(--gold-300); margin: 0 0 var(--sp-2); font-size: var(--fs-base); }
.notice-separate p { color: var(--text-on-dark-muted); font-size: var(--fs-sm); margin: 0; line-height: var(--lh-relaxed); }
.notice-separate-mark {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: rgba(176, 141, 87, 0.18);
  border: 1px solid var(--gold-700);
  color: var(--gold-300);
  font-size: 1.15rem;
}

/* Locked / empty states */
.state-panel {
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-sunken);
}
.state-panel-mark {
  width: 52px; height: 52px;
  margin: 0 auto var(--sp-4);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border-default);
  font-size: 1.4rem;
  color: var(--text-muted);
}
.state-panel h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.state-panel p {
  max-width: 46ch;
  margin: 0 auto var(--sp-5);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}
.state-panel--locked {
  background: linear-gradient(180deg, var(--plum-050), var(--white));
  border-style: solid;
  border-color: var(--plum-200);
}

/* ==========================================================================
   6. Forms
   ========================================================================== */

.field { margin-bottom: var(--sp-5); }
.field:last-child { margin-bottom: 0; }

.label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}
.label-optional {
  font-weight: var(--fw-regular);
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  margin-left: var(--sp-2);
}
.hint {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  line-height: var(--lh-normal);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: 1.45;
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: var(--ink-400); }
.input:hover,
.select:hover,
.textarea:hover { border-color: var(--border-strong); }
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--plum-500);
  box-shadow: 0 0 0 3px rgba(116, 56, 101, 0.14);
}
.textarea { min-height: 120px; resize: vertical; }

.select {
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236E6678' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.input-group { display: flex; gap: var(--sp-2); }
.input-group .input { flex: 1; }

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  cursor: pointer;
}
.check input[type="checkbox"],
.check input[type="radio"] {
  width: 18px; height: 18px;
  margin: 2px 0 0;
  accent-color: var(--plum-700);
  flex: none;
  cursor: pointer;
}
.check a { font-weight: var(--fw-medium); }

/* Selectable option card driven by :checked */
.option-card {
  display: block;
  position: relative;
  cursor: pointer;
}
.option-card input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.option-card-face {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--white);
  transition: all var(--t-fast) var(--ease-out);
}
.option-card:hover .option-card-face { border-color: var(--plum-400); background: var(--plum-050); }
.option-card input:focus-visible + .option-card-face {
  outline: 2px solid var(--plum-600);
  outline-offset: 2px;
}
.option-card input:checked + .option-card-face {
  border-color: var(--plum-700);
  background: var(--plum-050);
  box-shadow: inset 0 0 0 1px var(--plum-700);
}
.option-marker {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--white);
  display: grid;
  place-items: center;
  margin-top: 1px;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  transition: all var(--t-fast) var(--ease-out);
}
.option-card input:checked + .option-card-face .option-marker {
  border-color: var(--plum-700);
  background: var(--plum-700);
  color: var(--white);
}
.option-card-text { flex: 1; min-width: 0; }
.option-card-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); display: block; }
.option-card-desc { font-size: var(--fs-2xs); color: var(--text-muted); display: block; margin-top: 2px; }

/* Payment card visuals */
.pay-methods { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.pay-mark {
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--border-default);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
}

.secure-note {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}

/* Social auth */
.social-auth { display: grid; gap: var(--sp-3); }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease-out);
}
.social-btn:hover { border-color: var(--border-strong); background: var(--surface-sunken); color: var(--text-primary); }

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
  font-size: var(--fs-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ==========================================================================
   7. Tables
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 560px;
}
.table caption {
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.table th,
.table td {
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table thead th {
  background: var(--surface-sunken);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--plum-050); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .tick { color: var(--state-included); font-weight: var(--fw-bold); }
.table .cross { color: var(--ink-400); font-weight: var(--fw-bold); }

/* ==========================================================================
   8. Navigation components — tabs, breadcrumbs, pagination
   ========================================================================== */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-2xs);
  color: var(--text-muted);
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumbs li + li::before { content: "/"; color: var(--ink-300); }
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--plum-700); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--text-primary); font-weight: var(--fw-medium); }
.breadcrumbs--on-dark { color: var(--text-on-dark-muted); }
.breadcrumbs--on-dark a { color: var(--plum-200); }
.breadcrumbs--on-dark a:hover { color: var(--white); }
.breadcrumbs--on-dark [aria-current="page"] { color: var(--white); }
.breadcrumbs--on-dark li + li::before { color: rgba(255, 255, 255, 0.4); }

.tabs {
  display: flex;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow-x: auto;
  scrollbar-width: thin;
}
.tab {
  padding: 0.55rem 1rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease-out);
}
.tab:hover { background: var(--white); color: var(--text-primary); }
.tab--active,
.tab[aria-current="page"] {
  background: var(--white);
  color: var(--plum-800);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-xs);
}

.tabs-underline {
  display: flex;
  gap: var(--sp-6);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.tab-underline {
  padding: var(--sp-3) 0;
  border-bottom: 2px solid transparent;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.tab-underline:hover { color: var(--text-primary); }
.tab-underline[aria-current="page"],
.tab-underline--active {
  border-bottom-color: var(--plum-700);
  color: var(--plum-800);
  font-weight: var(--fw-semibold);
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin: var(--sp-7) 0 0;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination li { margin: 0; }
.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--plum-400); color: var(--plum-700); background: var(--plum-050); }
.pagination [aria-current="page"] {
  background: var(--plum-700);
  border-color: var(--plum-700);
  color: var(--white);
}
.pagination .is-disabled { color: var(--ink-300); background: var(--surface-sunken); }

/* ==========================================================================
   9. FAQ (details/summary)
   ========================================================================== */

.faq-list {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-item:last-child { border-bottom: 0; }
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  transition: background var(--t-fast) var(--ease-out);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { background: var(--plum-050); }
.faq-item > summary::after {
  content: "+";
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  color: var(--plum-700);
  font-size: 1rem;
  font-weight: var(--fw-regular);
  line-height: 1;
  transition: transform var(--t-base) var(--ease-out);
}
.faq-item[open] > summary { background: var(--plum-050); }
.faq-item[open] > summary::after {
  content: "−";
  background: var(--plum-700);
  border-color: var(--plum-700);
  color: var(--white);
}
.faq-answer {
  padding: 0 var(--sp-6) var(--sp-5);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  max-width: 78ch;
}

/* ==========================================================================
   10. Testimonials
   ========================================================================== */

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  height: 100%;
  padding: var(--sp-6);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.testimonial-quote {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}
.testimonial-quote::before { content: "“"; color: var(--gold-500); font-family: var(--font-display); font-size: 1.6em; line-height: 0; vertical-align: -0.25em; margin-right: 2px; }
.stars { color: var(--gold-600); font-size: var(--fs-sm); letter-spacing: 0.12em; }
.testimonial-meta { display: flex; align-items: center; gap: var(--sp-3); }

/* ==========================================================================
   11. Header
   ========================================================================== */

.announce {
  background: var(--plum-900);
  color: var(--text-on-dark);
  font-size: var(--fs-2xs);
  letter-spacing: 0.01em;
}
.announce-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: 0.6rem 0;
  text-align: center;
}
.announce a { color: var(--gold-300); font-weight: var(--fw-semibold); text-decoration: underline; text-underline-offset: 3px; }
.announce a:hover { color: var(--gold-100); }
.announce-tag {
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-xs);
  background: rgba(176, 141, 87, 0.22);
  border: 1px solid var(--gold-700);
  color: var(--gold-300);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(251, 248, 244, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--text-primary);
  flex: none;
}
.brand-mark {
  width: 36px; height: 36px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--grad-plum);
  color: var(--gold-300);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.015em;
  color: var(--plum-800);
}
.brand-sub {
  font-size: var(--fs-3xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: var(--fw-medium);
}
.brand--on-dark .brand-name { color: var(--white); }
.brand--on-dark .brand-sub { color: var(--plum-200); }
.brand--on-dark { color: var(--white); }

.primary-nav { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
.primary-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease-out);
}
.primary-nav a:hover { color: var(--plum-800); background: var(--plum-050); }
.primary-nav a[aria-current="page"] {
  color: var(--plum-800);
  font-weight: var(--fw-semibold);
  background: var(--plum-050);
}
.header-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

/* Mobile navigation — checkbox toggle, no JS */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  margin-left: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  flex: none;
}
.burger {
  position: relative;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--plum-800);
  display: block;
}
.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--plum-800);
  transition: transform var(--t-base) var(--ease-out), top var(--t-base) var(--ease-out);
}
.burger::before { top: -6px; }
.burger::after { top: 6px; }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--grad-plum-deep);
  color: var(--text-on-dark);
  padding: var(--sp-6) var(--gutter) var(--sp-9);
  overflow-y: auto;
  flex-direction: column;
}
.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-8);
}
.mobile-nav-close {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.mobile-nav-links { display: grid; gap: var(--sp-1); list-style: none; padding: 0; margin: 0 0 var(--sp-7); }
.mobile-nav-links li { margin: 0; }
.mobile-nav-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--white);
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
}
.mobile-nav-links a::after { content: "→"; font-family: var(--font-body); font-size: var(--fs-base); color: var(--gold-400); }
.mobile-nav-links a:hover { color: var(--gold-300); }
.mobile-nav-meta {
  margin-top: auto;
  padding-top: var(--sp-6);
  font-size: var(--fs-2xs);
  color: var(--text-on-dark-muted);
  line-height: var(--lh-relaxed);
}
.mobile-nav-actions { display: grid; gap: var(--sp-3); }

.nav-toggle:checked ~ .mobile-nav { display: flex; }
.nav-toggle:checked ~ .site-header { position: static; }
.mobile-nav-toggle:focus-within,
.nav-toggle:focus-visible + .header-inner .mobile-nav-toggle { outline: 2px solid var(--plum-600); outline-offset: 2px; }

/* Authenticated header extras */
.header-icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  transition: all var(--t-fast) var(--ease-out);
}
.header-icon-btn:hover { border-color: var(--plum-400); color: var(--plum-700); background: var(--plum-050); }
.header-icon-dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rose-600);
  border: 1.5px solid var(--white);
}
.header-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.28rem 0.7rem 0.28rem 0.35rem;
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: all var(--t-fast) var(--ease-out);
}
.header-user:hover { border-color: var(--plum-400); background: var(--plum-050); color: inherit; }
.header-user-name { font-size: var(--fs-xs); font-weight: var(--fw-semibold); display: block; line-height: 1.2; }
.header-user-plan { font-size: var(--fs-3xs); color: var(--gold-700); display: block; line-height: 1.2; }

/* ==========================================================================
   12. Footer
   ========================================================================== */

.site-footer {
  background: var(--plum-900);
  color: var(--text-on-dark-muted);
  padding-top: var(--sp-10);
  font-size: var(--fs-sm);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: var(--sp-8) var(--sp-6);
  padding-bottom: var(--sp-9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand-block p {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-on-dark-muted);
  max-width: 34ch;
}
.footer-col h3 {
  font-family: var(--font-body);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: var(--sp-4);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--sp-3); }
.footer-col a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: color var(--t-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

.footer-newsletter {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-7) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-newsletter h3 { color: var(--white); font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.footer-newsletter p { font-size: var(--fs-sm); margin: 0; color: var(--text-on-dark-muted); }
.newsletter-form { display: flex; gap: var(--sp-3); }
.newsletter-form .input {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}
.newsletter-form .input::placeholder { color: rgba(255, 255, 255, 0.45); }
.newsletter-form .input:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.22);
}

.footer-disclaimer {
  padding: var(--sp-7) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-disclaimer p {
  font-size: var(--fs-2xs);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, 0.62);
  max-width: 92ch;
  margin: 0;
}
.footer-disclaimer strong { color: rgba(255, 255, 255, 0.86); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6) 0;
  font-size: var(--fs-2xs);
  color: rgba(255, 255, 255, 0.6);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); list-style: none; padding: 0; margin: 0; }
.footer-legal li { margin: 0; }
.footer-legal a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.footer-legal a:hover { color: var(--white); text-decoration: underline; }

.social-list { display: flex; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-5) 0 0; }
.social-list li { margin: 0; }
.social-list a {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: all var(--t-fast) var(--ease-out);
}
.social-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-500);
  color: var(--white);
}

/* ==========================================================================
   13. Medical / clinical image placeholders (pure CSS)
   ========================================================================== */

.clinical-image {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  background: var(--grad-scan);
  overflow: hidden;
  border: 1px solid var(--ink-700);
  isolation: isolate;
}
.clinical-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 34% at 50% 54%, rgba(226, 234, 238, 0.88) 0%, rgba(176, 196, 206, 0.42) 40%, transparent 72%),
    radial-gradient(ellipse 14% 11% at 42% 47%, rgba(20, 30, 36, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 9% 8% at 58% 60%, rgba(20, 30, 36, 0.55) 0%, transparent 70%),
    conic-gradient(from 200deg at 50% -12%, transparent 0deg, rgba(255, 255, 255, 0.10) 22deg, transparent 44deg);
}
.clinical-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  opacity: 0.55;
  pointer-events: none;
}
.clinical-image--histology { background: linear-gradient(140deg, #4A2438 0%, #7B3E58 55%, #A9718A 100%); }
.clinical-image--histology::before {
  background:
    radial-gradient(circle at 22% 30%, rgba(255, 222, 235, 0.55) 0 6px, transparent 7px),
    radial-gradient(circle at 58% 22%, rgba(255, 222, 235, 0.42) 0 9px, transparent 10px),
    radial-gradient(circle at 76% 62%, rgba(255, 222, 235, 0.5) 0 7px, transparent 8px),
    radial-gradient(circle at 34% 72%, rgba(255, 222, 235, 0.38) 0 11px, transparent 12px),
    radial-gradient(circle at 66% 84%, rgba(255, 222, 235, 0.45) 0 5px, transparent 6px),
    radial-gradient(circle at 12% 58%, rgba(255, 222, 235, 0.3) 0 8px, transparent 9px);
}
.clinical-image--histology::after { opacity: 0.18; }

.clinical-image--trace {
  background: #FDF6EC;
  border-color: var(--ink-200);
}
.clinical-image--trace::before {
  background:
    repeating-linear-gradient(90deg, rgba(190, 108, 108, 0.28) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(0deg, rgba(190, 108, 108, 0.28) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(190, 108, 108, 0.5) 0 1.5px, transparent 1.5px 60px);
}
.clinical-image--trace::after {
  background: none;
  opacity: 1;
  border-top: 2px solid rgba(42, 15, 36, 0.75);
  border-radius: 50%;
  inset: 26% 6% 44% 6%;
  transform: rotate(-1.5deg);
  box-shadow: 0 26px 0 -1px rgba(42, 15, 36, 0.28), 0 46px 0 -2px rgba(42, 15, 36, 0.2);
}

.clinical-image-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(180deg, transparent, rgba(10, 14, 18, 0.82));
  color: rgba(255, 255, 255, 0.94);
  font-size: var(--fs-2xs);
  line-height: var(--lh-normal);
}
.clinical-image--trace .clinical-image-caption {
  background: linear-gradient(180deg, transparent, rgba(42, 15, 36, 0.86));
}
.clinical-image-tag {
  position: absolute;
  top: var(--sp-3); left: var(--sp-3);
  z-index: 2;
  padding: 0.22rem 0.5rem;
  border-radius: var(--r-xs);
  background: rgba(10, 14, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.clinical-image--trace .clinical-image-tag {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--ink-300);
  color: var(--plum-800);
}
.clinical-scale {
  position: absolute;
  right: var(--sp-3);
  top: var(--sp-3);
  bottom: 32%;
  z-index: 2;
  width: 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(180deg, #fff, #888, #111);
  border-radius: 2px;
}

/* Video placeholder */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  background: var(--grad-plum-deep);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--plum-700);
}
.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(176, 141, 87, 0.18), transparent 52%),
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px);
}
.video-play {
  position: relative;
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  font-size: 1.5rem;
  text-decoration: none;
  padding-left: 5px;
  transition: all var(--t-base) var(--ease-out);
}
.video-play:hover { background: rgba(255, 255, 255, 0.25); color: var(--white); transform: scale(1.05); }
.video-caption {
  position: absolute;
  left: var(--sp-5); bottom: var(--sp-5);
  color: var(--white);
  z-index: 2;
}
.video-caption span {
  display: block;
  font-size: var(--fs-3xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 2px;
}
.video-caption strong { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.video-timebar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 2;
}
.video-timebar span { display: block; height: 100%; background: var(--gold-500); }

/* ==========================================================================
   14. Misc shared blocks
   ========================================================================== */

.page-hero {
  background: var(--grad-plum-deep);
  color: var(--text-on-dark);
  padding-block: clamp(2.75rem, 5vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(176, 141, 87, 0.20), transparent 46%),
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 18px);
  pointer-events: none;
}
.page-hero > * { position: relative; }
.page-hero h1 { color: var(--white); max-width: 20ch; }
.page-hero p { color: var(--text-on-dark-muted); max-width: 62ch; font-size: var(--fs-md); }
.page-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.page-hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
  color: var(--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.page-hero-stat span {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--gold-300);
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.checklist li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  margin: 0;
}
.checklist li::before {
  content: "✓";
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--state-included-bg);
  color: var(--state-included);
  font-size: var(--fs-3xs);
  font-weight: var(--fw-bold);
}
.checklist--excluded li::before {
  content: "×";
  background: var(--state-locked-bg);
  color: var(--ink-400);
}
.checklist--gold li::before { background: var(--gold-100); color: var(--gold-700); }
.checklist--on-dark li { color: var(--text-on-dark-muted); }
.checklist--on-dark li::before { background: rgba(176, 141, 87, 0.2); color: var(--gold-300); }

.numbered-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--sp-6);
  counter-reset: step;
}
.numbered-steps li {
  display: flex;
  gap: var(--sp-5);
  margin: 0;
  counter-increment: step;
}
.numbered-steps li::before {
  content: counter(step, decimal-leading-zero);
  flex: none;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--gold-300);
  color: var(--gold-700);
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
}
.numbered-steps h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.numbered-steps p { font-size: var(--fs-sm); color: var(--text-secondary); margin: 0; line-height: var(--lh-relaxed); }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4) var(--sp-8);
  padding: var(--sp-6) 0;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}
.trust-item strong { color: var(--text-primary); font-weight: var(--fw-semibold); }

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--r-xl);
  background: var(--grad-plum-deep);
  color: var(--text-on-dark);
  text-align: center;
  border: 1px solid var(--plum-600);
}
.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 100%, rgba(176, 141, 87, 0.24), transparent 50%),
    radial-gradient(circle at 85% 0%, rgba(158, 74, 92, 0.24), transparent 50%);
  pointer-events: none;
}
.cta-panel > * { position: relative; }
.cta-panel h2 { color: var(--white); max-width: 22ch; margin-inline: auto; }
.cta-panel p { color: var(--text-on-dark-muted); max-width: 56ch; margin-inline: auto var(--sp-6); font-size: var(--fs-md); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }

/* Content prose block for explanations */
.prose { max-width: 74ch; }
.prose p { font-size: var(--fs-md); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.prose h3 { margin-top: var(--sp-6); }
.prose h4 { margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.prose ul, .prose ol { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }
.prose ul li::marker { color: var(--gold-600); }

.ref-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.ref-list li {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--white);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0;
}
.ref-tag {
  flex: none;
  font-size: var(--fs-3xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  color: var(--gold-700);
  padding-top: 1px;
}

.kv-list { display: grid; gap: 0; margin: 0; }
.kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: var(--fs-sm);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row dt { color: var(--text-secondary); margin: 0; }
.kv-row dd { margin: 0; font-weight: var(--fw-semibold); text-align: right; font-variant-numeric: tabular-nums; }
.kv-row--total {
  border-bottom: 0;
  border-top: 1px solid var(--border-default);
  margin-top: var(--sp-2);
  padding-top: var(--sp-4);
  font-size: var(--fs-base);
}
.kv-row--total dd { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--plum-800); }
