/* ============================================================
   STC Tools Engine — Design System
   Version 1.0.0
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  /* Brand */
  --stc-green:        #2E5D2A;
  --stc-green-mid:    #3D7A37;
  --stc-green-light:  #EAF3E8;
  --stc-amber:        #C4813A;
  --stc-amber-light:  #FBF0E3;
  --stc-gold:         #D4A837;
  --stc-gold-light:   #FBF5E0;

  /* Pillars */
  --stc-stabilize:    #4A7EA8;
  --stc-regulate:     #3A8C85;
  --stc-rebuild:      #C47B35;
  --stc-adapt:        #7A9E5C;
  --stc-thrive:       #C4A93A;

  /* Neutrals */
  --stc-bg:           #FAF8F4;
  --stc-bg-card:      #FFFFFF;
  --stc-border:       #E2DDD6;
  --stc-border-soft:  #EDE9E2;
  --stc-text:         #1A1A1A;
  --stc-text-mid:     #4A4A4A;
  --stc-text-soft:    #7A7470;
  --stc-text-xsoft:   #A8A09A;

  /* Feedback */
  --stc-success:      #2E7D32;
  --stc-success-bg:   #E8F5E9;
  --stc-warning:      #E65100;
  --stc-warning-bg:   #FFF3E0;
  --stc-error:        #C62828;
  --stc-error-bg:     #FFEBEE;
  --stc-info:         #1565C0;
  --stc-info-bg:      #E3F2FD;

  /* Scores — semantic colour bands */
  --stc-score-1:      #C62828;  /* 0–20   */
  --stc-score-2:      #E65100;  /* 21–40  */
  --stc-score-3:      #F9A825;  /* 41–60  */
  --stc-score-4:      #2E7D32;  /* 61–80  */
  --stc-score-5:      #1B5E20;  /* 81–100 */

  /* Typography */
  --stc-font-heading: 'Georgia', 'Times New Roman', serif;
  --stc-font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --stc-font-mono:    'JetBrains Mono', 'Consolas', monospace;

  /* Type scale */
  --stc-text-xs:   0.75rem;
  --stc-text-sm:   0.875rem;
  --stc-text-base: 1rem;
  --stc-text-lg:   1.125rem;
  --stc-text-xl:   1.25rem;
  --stc-text-2xl:  1.5rem;
  --stc-text-3xl:  1.875rem;
  --stc-text-4xl:  2.25rem;

  /* Spacing */
  --stc-space-1:   0.25rem;
  --stc-space-2:   0.5rem;
  --stc-space-3:   0.75rem;
  --stc-space-4:   1rem;
  --stc-space-5:   1.25rem;
  --stc-space-6:   1.5rem;
  --stc-space-8:   2rem;
  --stc-space-10:  2.5rem;
  --stc-space-12:  3rem;
  --stc-space-16:  4rem;

  /* Radius */
  --stc-radius-sm:  4px;
  --stc-radius-md:  8px;
  --stc-radius-lg:  12px;
  --stc-radius-xl:  16px;
  --stc-radius-2xl: 24px;
  --stc-radius-full: 9999px;

  /* Shadow */
  --stc-shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --stc-shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --stc-shadow-lg:  0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);
  --stc-shadow-xl:  0 16px 40px rgba(0,0,0,.12);

  /* Transitions */
  --stc-ease:     cubic-bezier(.4,0,.2,1);
  --stc-duration: 200ms;
}

/* ── Reset (scoped) ─────────────────────────────────────────── */
.stc-tools * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.stc-tools {
  font-family: var(--stc-font-body);
  font-size: var(--stc-text-base);
  line-height: 1.6;
  color: var(--stc-text);
  background: var(--stc-bg);
}

/* ── Layout ─────────────────────────────────────────────────── */
.stc-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--stc-space-4);
}

.stc-grid {
  display: grid;
  gap: var(--stc-space-6);
}

.stc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.stc-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 640px) {
  .stc-grid-2,
  .stc-grid-3 { grid-template-columns: 1fr; }
}

/* ── Card ───────────────────────────────────────────────────── */
.stc-card {
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-6);
  box-shadow: var(--stc-shadow-sm);
  transition: box-shadow var(--stc-duration) var(--stc-ease),
              transform  var(--stc-duration) var(--stc-ease);
}

.stc-card:hover { box-shadow: var(--stc-shadow-md); }

.stc-card--elevated {
  box-shadow: var(--stc-shadow-md);
}

.stc-card--featured {
  border-color: var(--stc-green);
  border-width: 2px;
  box-shadow: var(--stc-shadow-md);
}

.stc-card__header {
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
  margin-bottom: var(--stc-space-4);
  padding-bottom: var(--stc-space-4);
  border-bottom: 1px solid var(--stc-border-soft);
}

.stc-card__title {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-xl);
  font-weight: 700;
  color: var(--stc-text);
  line-height: 1.3;
}

.stc-card__subtitle {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-soft);
  margin-top: var(--stc-space-1);
}

/* ── Pillar Badge ───────────────────────────────────────────── */
.stc-pillar {
  display: inline-flex;
  align-items: center;
  gap: var(--stc-space-1);
  padding: var(--stc-space-1) var(--stc-space-3);
  border-radius: var(--stc-radius-full);
  font-size: var(--stc-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stc-pillar--stabilize { background: #E8F0F7; color: var(--stc-stabilize); }
.stc-pillar--regulate  { background: #E6F5F4; color: var(--stc-regulate);  }
.stc-pillar--rebuild   { background: #FBF0E3; color: var(--stc-rebuild);   }
.stc-pillar--adapt     { background: #EFF5E9; color: var(--stc-adapt);     }
.stc-pillar--thrive    { background: #FBF5E0; color: var(--stc-thrive);    }

/* ── Score Gauge ────────────────────────────────────────────── */
.stc-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stc-space-3);
}

.stc-gauge__ring {
  position: relative;
  width: 140px;
  height: 140px;
}

.stc-gauge__ring svg {
  transform: rotate(-90deg);
  overflow: visible;
}

.stc-gauge__track {
  fill: none;
  stroke: var(--stc-border);
  stroke-width: 10;
}

.stc-gauge__fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 339.3;       /* 2π × r=54 */
  stroke-dashoffset: 339.3;
  transition: stroke-dashoffset 1.2s var(--stc-ease),
              stroke            var(--stc-duration) var(--stc-ease);
}

.stc-gauge__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stc-gauge__value {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--stc-text);
}

.stc-gauge__label {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: var(--stc-space-1);
}

.stc-gauge__band {
  font-size: var(--stc-text-sm);
  font-weight: 600;
  padding: var(--stc-space-1) var(--stc-space-4);
  border-radius: var(--stc-radius-full);
}

/* Score colour helpers — applied by JS */
.stc-score--1 { color: var(--stc-score-1); }
.stc-score--2 { color: var(--stc-score-2); }
.stc-score--3 { color: var(--stc-score-3); }
.stc-score--4 { color: var(--stc-score-4); }
.stc-score--5 { color: var(--stc-score-5); }

.stc-score-bg--1 { background: #FFEBEE; color: var(--stc-score-1); }
.stc-score-bg--2 { background: #FFF3E0; color: var(--stc-score-2); }
.stc-score-bg--3 { background: #FFFDE7; color: var(--stc-score-3); }
.stc-score-bg--4 { background: var(--stc-success-bg); color: var(--stc-score-4); }
.stc-score-bg--5 { background: #E8F5E9; color: var(--stc-score-5); }

/* ── Domain Bar ─────────────────────────────────────────────── */
.stc-domains {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-4);
}

.stc-domain {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--stc-space-2) var(--stc-space-4);
  align-items: center;
}

.stc-domain__label {
  font-size: var(--stc-text-sm);
  font-weight: 600;
  color: var(--stc-text-mid);
}

.stc-domain__value {
  font-size: var(--stc-text-sm);
  font-weight: 700;
  color: var(--stc-text);
  min-width: 40px;
  text-align: right;
}

.stc-domain__track {
  grid-column: 1 / -1;
  height: 8px;
  background: var(--stc-border);
  border-radius: var(--stc-radius-full);
  overflow: hidden;
}

.stc-domain__fill {
  height: 100%;
  background: var(--stc-green-mid);
  border-radius: var(--stc-radius-full);
  width: 0%;
  transition: width 1s var(--stc-ease);
}

/* ── Archetype Card ─────────────────────────────────────────── */
.stc-archetype {
  background: linear-gradient(135deg, var(--stc-green-light) 0%, #FFFDF9 100%);
  border: 1px solid var(--stc-green-mid);
  border-radius: var(--stc-radius-xl);
  padding: var(--stc-space-8);
  position: relative;
  overflow: hidden;
}

.stc-archetype::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(61,122,55,.08) 0%, transparent 70%);
  pointer-events: none;
}

.stc-archetype__eyebrow {
  font-size: var(--stc-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--stc-green-mid);
  margin-bottom: var(--stc-space-2);
}

.stc-archetype__name {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-2xl);
  font-weight: 700;
  color: var(--stc-green);
  line-height: 1.2;
  margin-bottom: var(--stc-space-4);
}

.stc-archetype__body {
  font-size: var(--stc-text-base);
  color: var(--stc-text-mid);
  line-height: 1.7;
  max-width: 600px;
}

/* ── Assessment Form ────────────────────────────────────────── */
.stc-assessment {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-6);
}

.stc-assessment__progress {
  display: flex;
  align-items: center;
  gap: var(--stc-space-4);
  margin-bottom: var(--stc-space-2);
}

.stc-assessment__progress-track {
  flex: 1;
  height: 4px;
  background: var(--stc-border);
  border-radius: var(--stc-radius-full);
  overflow: hidden;
}

.stc-assessment__progress-fill {
  height: 100%;
  background: var(--stc-green-mid);
  border-radius: var(--stc-radius-full);
  transition: width .4s var(--stc-ease);
}

.stc-assessment__progress-label {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-soft);
  white-space: nowrap;
}

.stc-question {
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-6);
  transition: border-color var(--stc-duration) var(--stc-ease);
}

.stc-question:focus-within {
  border-color: var(--stc-green-mid);
  box-shadow: 0 0 0 3px rgba(61,122,55,.1);
}

.stc-question__domain {
  font-size: var(--stc-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--stc-text-xsoft);
  margin-bottom: var(--stc-space-2);
}

.stc-question__text {
  font-size: var(--stc-text-lg);
  font-weight: 500;
  color: var(--stc-text);
  line-height: 1.5;
  margin-bottom: var(--stc-space-5);
}

/* Scale 1–10 */
.stc-scale {
  display: flex;
  gap: var(--stc-space-1);
  flex-wrap: wrap;
}

.stc-scale__btn {
  flex: 1;
  min-width: 40px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  font-size: var(--stc-text-sm);
  font-weight: 600;
  cursor: pointer;
  background: var(--stc-bg-card);
  color: var(--stc-text-mid);
  transition: all var(--stc-duration) var(--stc-ease);
}

.stc-scale__btn:hover {
  border-color: var(--stc-green-mid);
  color: var(--stc-green);
  background: var(--stc-green-light);
}

.stc-scale__btn.is-selected {
  border-color: var(--stc-green);
  background: var(--stc-green);
  color: #fff;
  box-shadow: var(--stc-shadow-sm);
}

.stc-scale__labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--stc-space-2);
  font-size: var(--stc-text-xs);
  color: var(--stc-text-xsoft);
}

/* Scale 0–4 (frequency) */
.stc-freq {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--stc-space-2);
}

.stc-freq__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stc-space-2);
  padding: var(--stc-space-3);
  border: 2px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  cursor: pointer;
  background: var(--stc-bg-card);
  transition: all var(--stc-duration) var(--stc-ease);
}

.stc-freq__option:hover {
  border-color: var(--stc-green-mid);
  background: var(--stc-green-light);
}

.stc-freq__option.is-selected {
  border-color: var(--stc-green);
  background: var(--stc-green);
  color: #fff;
}

.stc-freq__value {
  font-size: var(--stc-text-xl);
  font-weight: 700;
}

.stc-freq__label {
  font-size: var(--stc-text-xs);
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .stc-freq { grid-template-columns: repeat(3, 1fr); }
}

/* ── Button ─────────────────────────────────────────────────── */
.stc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--stc-space-2);
  padding: var(--stc-space-3) var(--stc-space-6);
  border-radius: var(--stc-radius-md);
  font-size: var(--stc-text-base);
  font-weight: 600;
  font-family: var(--stc-font-body);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all var(--stc-duration) var(--stc-ease);
  white-space: nowrap;
}

.stc-btn--primary {
  background: var(--stc-green);
  color: #fff;
  border-color: var(--stc-green);
}

.stc-btn--primary:hover {
  background: var(--stc-green-mid);
  border-color: var(--stc-green-mid);
  transform: translateY(-1px);
  box-shadow: var(--stc-shadow-md);
}

.stc-btn--outline {
  background: transparent;
  color: var(--stc-green);
  border-color: var(--stc-green);
}

.stc-btn--outline:hover {
  background: var(--stc-green-light);
}

.stc-btn--ghost {
  background: transparent;
  color: var(--stc-text-mid);
  border-color: transparent;
}

.stc-btn--ghost:hover {
  background: var(--stc-border-soft);
}

.stc-btn--lg {
  padding: var(--stc-space-4) var(--stc-space-8);
  font-size: var(--stc-text-lg);
  border-radius: var(--stc-radius-lg);
}

.stc-btn--sm {
  padding: var(--stc-space-2) var(--stc-space-4);
  font-size: var(--stc-text-sm);
}

.stc-btn:disabled,
.stc-btn.is-disabled {
  opacity: .45;
  pointer-events: none;
}

.stc-btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.stc-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: stc-spin .6s linear infinite;
}

/* ── Tool Card ──────────────────────────────────────────────── */
.stc-tool-card {
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-3);
  transition: all var(--stc-duration) var(--stc-ease);
  text-decoration: none;
  color: inherit;
}

.stc-tool-card:hover {
  border-color: var(--stc-green-mid);
  box-shadow: var(--stc-shadow-md);
  transform: translateY(-2px);
}

.stc-tool-card__name {
  font-size: var(--stc-text-base);
  font-weight: 700;
  color: var(--stc-text);
  line-height: 1.3;
}

.stc-tool-card__score {
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
}

.stc-tool-card__score-num {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-2xl);
  font-weight: 700;
  line-height: 1;
}

.stc-tool-card__meta {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-xsoft);
}

.stc-tool-card__action {
  margin-top: auto;
}

/* Locked overlay for tier gating */
.stc-tool-card.is-locked {
  opacity: .65;
  pointer-events: none;
  position: relative;
}

.stc-tool-card.is-locked::after {
  content: '🔒';
  position: absolute;
  top: var(--stc-space-3);
  right: var(--stc-space-3);
  font-size: var(--stc-text-xl);
}

/* ── Dashboard Stats Row ────────────────────────────────────── */
.stc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--stc-space-4);
}

.stc-stat {
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-4);
  text-align: center;
}

.stc-stat__value {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-3xl);
  font-weight: 700;
  color: var(--stc-green);
  line-height: 1;
}

.stc-stat__label {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: var(--stc-space-2);
}

/* ── Streak Badge ───────────────────────────────────────────── */
.stc-streak {
  display: inline-flex;
  align-items: center;
  gap: var(--stc-space-2);
  background: var(--stc-gold-light);
  border: 1px solid var(--stc-gold);
  border-radius: var(--stc-radius-full);
  padding: var(--stc-space-2) var(--stc-space-4);
  font-size: var(--stc-text-sm);
  font-weight: 700;
  color: var(--stc-amber);
}

.stc-streak__icon { font-size: var(--stc-text-lg); }

/* ── Journal / Textarea ─────────────────────────────────────── */
.stc-field {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
}

.stc-field__label {
  font-size: var(--stc-text-sm);
  font-weight: 600;
  color: var(--stc-text-mid);
}

.stc-field__input,
.stc-field__textarea {
  width: 100%;
  padding: var(--stc-space-3) var(--stc-space-4);
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  font-family: var(--stc-font-body);
  font-size: var(--stc-text-base);
  color: var(--stc-text);
  transition: border-color var(--stc-duration) var(--stc-ease),
              box-shadow    var(--stc-duration) var(--stc-ease);
  outline: none;
}

.stc-field__input:focus,
.stc-field__textarea:focus {
  border-color: var(--stc-green-mid);
  box-shadow: 0 0 0 3px rgba(61,122,55,.1);
}

.stc-field__textarea {
  min-height: 120px;
  resize: vertical;
}

/* ── Section Heading ────────────────────────────────────────── */
.stc-section-heading {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-2xl);
  font-weight: 700;
  color: var(--stc-text);
  line-height: 1.3;
  margin-bottom: var(--stc-space-2);
}

.stc-section-subheading {
  font-size: var(--stc-text-base);
  color: var(--stc-text-soft);
  line-height: 1.6;
  margin-bottom: var(--stc-space-6);
}

/* ── Alert / Notice ─────────────────────────────────────────── */
.stc-alert {
  padding: var(--stc-space-4) var(--stc-space-5);
  border-radius: var(--stc-radius-md);
  border-left: 4px solid;
  font-size: var(--stc-text-sm);
  line-height: 1.5;
}

.stc-alert--success { background: var(--stc-success-bg); border-color: var(--stc-success); color: var(--stc-success); }
.stc-alert--warning { background: var(--stc-warning-bg); border-color: var(--stc-warning); color: var(--stc-warning); }
.stc-alert--error   { background: var(--stc-error-bg);   border-color: var(--stc-error);   color: var(--stc-error);   }
.stc-alert--info    { background: var(--stc-info-bg);    border-color: var(--stc-info);     color: var(--stc-info);    }

/* ── Divider ────────────────────────────────────────────────── */
.stc-divider {
  border: none;
  border-top: 1px solid var(--stc-border-soft);
  margin: var(--stc-space-8) 0;
}

/* ── Empty State ────────────────────────────────────────────── */
.stc-empty {
  text-align: center;
  padding: var(--stc-space-16) var(--stc-space-8);
  color: var(--stc-text-soft);
}

.stc-empty__icon {
  font-size: 3rem;
  margin-bottom: var(--stc-space-4);
  opacity: .5;
}

.stc-empty__title {
  font-size: var(--stc-text-xl);
  font-weight: 600;
  color: var(--stc-text-mid);
  margin-bottom: var(--stc-space-2);
}

.stc-empty__body {
  font-size: var(--stc-text-base);
  max-width: 360px;
  margin: 0 auto var(--stc-space-6);
}

/* ── Loading Skeleton ───────────────────────────────────────── */
.stc-skeleton {
  background: linear-gradient(90deg, var(--stc-border) 25%, var(--stc-border-soft) 50%, var(--stc-border) 75%);
  background-size: 200% 100%;
  animation: stc-shimmer 1.4s infinite;
  border-radius: var(--stc-radius-sm);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes stc-spin    { to { transform: rotate(360deg); } }
@keyframes stc-shimmer { to { background-position: -200% 0; } }
@keyframes stc-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.stc-fade-in { animation: stc-fade-in .3s var(--stc-ease) both; }

/* ── Utility ────────────────────────────────────────────────── */
.stc-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;
}

.stc-text-center { text-align: center; }
.stc-text-right  { text-align: right;  }
.stc-mt-auto     { margin-top: auto;   }
.stc-w-full      { width: 100%;        }


/* ── Dashboard Layout ───────────────────────────────────────── */
.stc-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-6);
  padding: var(--stc-space-6) 0;
}

.stc-dashboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--stc-space-4);
}

.stc-dashboard__welcome {}

.stc-dashboard__name {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-2xl);
  font-weight: 700;
  color: var(--stc-text);
  margin-bottom: var(--stc-space-2);
}

.stc-dashboard__meta {
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
}

.stc-dashboard__section {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-4);
}

/* ── Tools Grid ─────────────────────────────────────────────── */
.stc-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--stc-space-4);
}

@media (max-width: 480px) {
  .stc-tools-grid { grid-template-columns: 1fr; }
}

/* ── Check-In Widget ────────────────────────────────────────── */
.stc-checkin__sliders {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-4);
  margin-bottom: var(--stc-space-5);
}

.stc-checkin__row {
  display: grid;
  grid-template-columns: 120px 1fr 32px;
  align-items: center;
  gap: var(--stc-space-3);
}

.stc-checkin__label {
  font-size: var(--stc-text-sm);
  font-weight: 600;
  color: var(--stc-text-mid);
  white-space: nowrap;
}

.stc-checkin__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--stc-radius-full);
  background: var(--stc-border);
  outline: none;
  cursor: pointer;
}

.stc-checkin__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--stc-green);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: var(--stc-shadow-sm);
  transition: transform var(--stc-duration) var(--stc-ease);
}

.stc-checkin__range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.stc-checkin__range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--stc-green);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: var(--stc-shadow-sm);
}

.stc-checkin__val {
  font-size: var(--stc-text-lg);
  font-weight: 700;
  color: var(--stc-green);
  text-align: center;
}

.stc-checkin__footer {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-3);
}

.stc-checkin__notes {
  min-height: 60px;
  font-size: var(--stc-text-sm);
}

@media (max-width: 500px) {
  .stc-checkin__row {
    grid-template-columns: 100px 1fr 28px;
    gap: var(--stc-space-2);
  }
}

/* ── Recent Results ─────────────────────────────────────────── */
.stc-result-row {
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
  padding: var(--stc-space-3) 0;
  border-bottom: 1px solid var(--stc-border-soft);
}

.stc-result-row:last-child { border-bottom: none; }

.stc-result-row__name {
  flex: 1;
  font-size: var(--stc-text-sm);
  font-weight: 600;
  color: var(--stc-text-mid);
}

.stc-result-row__score {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-xl);
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

.stc-result-row__band {
  font-size: var(--stc-text-xs);
  padding: 2px 8px;
  border-radius: var(--stc-radius-full);
}

.stc-result-row__date {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-xsoft);
  white-space: nowrap;
}

/* ── Goals ──────────────────────────────────────────────────── */
.stc-goal-row {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
  padding: var(--stc-space-3) 0;
  border-bottom: 1px solid var(--stc-border-soft);
}

.stc-goal-row:last-child { border-bottom: none; }

.stc-goal-row__name {
  font-size: var(--stc-text-sm);
  font-weight: 600;
  color: var(--stc-text-mid);
}

.stc-goal-row__progress {
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
}

.stc-goal-row__track {
  flex: 1;
  height: 6px;
  background: var(--stc-border);
  border-radius: var(--stc-radius-full);
  overflow: hidden;
}

.stc-goal-row__fill {
  height: 100%;
  background: var(--stc-green-mid);
  border-radius: var(--stc-radius-full);
  transition: width .8s var(--stc-ease);
}

.stc-goal-row__pct {
  font-size: var(--stc-text-xs);
  font-weight: 700;
  color: var(--stc-text-mid);
  min-width: 32px;
  text-align: right;
}

/* ── Achievements Grid ──────────────────────────────────────── */
.stc-achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--stc-space-4);
}

.stc-achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stc-space-2);
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-4);
  text-align: center;
  transition: all var(--stc-duration) var(--stc-ease);
}

.stc-achievement-badge:hover {
  border-color: var(--stc-gold);
  box-shadow: var(--stc-shadow-md);
}

.stc-achievement-badge__icon { font-size: 2rem; }
.stc-achievement-badge__name {
  font-size: var(--stc-text-xs);
  font-weight: 700;
  color: var(--stc-text-mid);
  line-height: 1.3;
}

.stc-achievement-badge__date {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-xsoft);
}

/* ── Assessment Page ────────────────────────────────────────── */
.stc-assessment-page {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-6);
}

.stc-assessment__submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stc-space-3);
  margin-top: var(--stc-space-4);
}

.stc-assessment__disclaimer {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-xsoft);
  text-align: center;
  max-width: 500px;
  line-height: 1.5;
}

/* ── Empty state (small variant) ───────────────────────────── */
.stc-empty--sm {
  padding: var(--stc-space-8) var(--stc-space-4);
}

/* ── Numeric question input ─────────────────────────────────── */
.stc-numeric-wrap {
  display: flex;
  align-items: center;
  gap: var(--stc-space-2);
  max-width: 320px;
}

.stc-numeric__prefix {
  font-size: var(--stc-text-lg);
  font-weight: 700;
  color: var(--stc-text-mid);
  min-width: 36px;
}

.stc-numeric__input {
  flex: 1;
  appearance: textfield;
  -moz-appearance: textfield;
}
.stc-numeric__input::-webkit-inner-spin-button,
.stc-numeric__input::-webkit-outer-spin-button { -webkit-appearance: none; }

.stc-numeric__suffix {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-soft);
  white-space: nowrap;
}

/* ── Select (radio option cards) ────────────────────────────── */
.stc-select-options {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
}

.stc-select-option {
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
  padding: var(--stc-space-3) var(--stc-space-4);
  border: 2px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  cursor: pointer;
  background: var(--stc-bg-card);
  transition: all var(--stc-duration) var(--stc-ease);
  line-height: 1.4;
}

.stc-select-option:hover {
  border-color: var(--stc-green-mid);
  background: var(--stc-green-light);
}

.stc-select-option.is-selected {
  border-color: var(--stc-green);
  background: var(--stc-green-light);
  box-shadow: 0 0 0 1px var(--stc-green);
}

.stc-select-option__radio {
  accent-color: var(--stc-green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.stc-select-option__label {
  font-size: var(--stc-text-sm);
  font-weight: 500;
  color: var(--stc-text-mid);
}

.stc-select-option.is-selected .stc-select-option__label {
  color: var(--stc-green);
  font-weight: 600;
}

/* ── FFC Hero Card ───────────────────────────────────────────── */
.stc-ffc-hero {
  background: linear-gradient(135deg, var(--stc-green) 0%, var(--stc-green-mid) 100%);
  color: #fff;
  border: none;
}

.stc-ffc-hero__eyebrow {
  font-size: var(--stc-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .75;
  margin-bottom: var(--stc-space-2);
}

.stc-ffc-hero__number {
  font-family: var(--stc-font-heading);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--stc-space-3);
}

.stc-ffc-hero__sub {
  font-size: var(--stc-text-sm);
  opacity: .85;
  margin-bottom: var(--stc-space-5);
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
  flex-wrap: wrap;
}

.stc-ffc-hero .stc-pillar--thrive {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.stc-ffc-hero__target {
  font-size: var(--stc-text-sm);
  opacity: .85;
  margin-top: var(--stc-space-4);
}

/* ── FFC Freedom Progress Bar ───────────────────────────────── */
.stc-ffc-progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--stc-space-2) var(--stc-space-4);
  align-items: center;
}

.stc-ffc-progress__label {
  font-size: var(--stc-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .75;
  grid-column: 1;
}

.stc-ffc-progress__track {
  grid-column: 1;
  height: 8px;
  background: rgba(255,255,255,.25);
  border-radius: var(--stc-radius-full);
  overflow: hidden;
}

.stc-ffc-progress__fill {
  height: 100%;
  background: rgba(255,255,255,.9);
  border-radius: var(--stc-radius-full);
  transition: width 1.2s var(--stc-ease);
}

.stc-ffc-progress__pct {
  grid-row: 1 / 3;
  grid-column: 2;
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-2xl);
  font-weight: 700;
  min-width: 60px;
  text-align: right;
}

/* ── FFC 9-Stage Roadmap ────────────────────────────────────── */
.stc-ffc-stages {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stc-ffc-stage {
  display: flex;
  align-items: flex-start;
  gap: var(--stc-space-4);
  padding: var(--stc-space-3) 0;
  border-bottom: 1px solid var(--stc-border-soft);
  opacity: .55;
  transition: opacity var(--stc-duration);
}

.stc-ffc-stage:last-child { border-bottom: none; }

.stc-ffc-stage.is-done {
  opacity: .65;
}

.stc-ffc-stage.is-current {
  opacity: 1;
}

.stc-ffc-stage__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--stc-border);
  color: var(--stc-text-soft);
  font-size: var(--stc-text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--stc-duration);
}

.stc-ffc-stage.is-done .stc-ffc-stage__num {
  background: var(--stc-success-bg);
  color: var(--stc-success);
}

.stc-ffc-stage.is-current .stc-ffc-stage__num {
  background: var(--stc-green);
  color: #fff;
  box-shadow: var(--stc-shadow-sm);
}

.stc-ffc-stage__body { flex: 1; }

.stc-ffc-stage__name {
  font-size: var(--stc-text-base);
  font-weight: 600;
  color: var(--stc-text-mid);
  line-height: 1.3;
}

.stc-ffc-stage.is-current .stc-ffc-stage__name {
  color: var(--stc-green);
}

.stc-ffc-stage__blocker {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-soft);
  margin-top: var(--stc-space-1);
  line-height: 1.4;
}

/* ── FFC Daily Action + Meta ────────────────────────────────── */
.stc-ffc-daily-action {
  font-size: var(--stc-text-base);
  font-weight: 500;
  color: var(--stc-text-mid);
  line-height: 1.6;
  background: var(--stc-green-light);
  border-left: 3px solid var(--stc-green);
  padding: var(--stc-space-4) var(--stc-space-5);
  border-radius: 0 var(--stc-radius-md) var(--stc-radius-md) 0;
  margin-bottom: var(--stc-space-4);
}

.stc-ffc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--stc-space-2);
}

/* ── FFC Debt Analysis ──────────────────────────────────────── */
.stc-ffc-debt-option {
  background: var(--stc-bg);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  padding: var(--stc-space-4);
}

.stc-ffc-debt-option--boosted {
  border-color: var(--stc-green);
  background: var(--stc-green-light);
}

.stc-ffc-debt-option__label {
  font-size: var(--stc-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--stc-text-soft);
  margin-bottom: var(--stc-space-2);
}

.stc-ffc-debt-option--boosted .stc-ffc-debt-option__label {
  color: var(--stc-green);
}

.stc-ffc-debt-option__months {
  font-family: var(--stc-font-heading);
  font-size: var(--stc-text-2xl);
  font-weight: 700;
  color: var(--stc-text);
  line-height: 1;
  margin-bottom: var(--stc-space-2);
}

.stc-ffc-debt-option__interest {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-soft);
}

.stc-ffc-debt-option__saving {
  font-size: var(--stc-text-sm);
  font-weight: 700;
  color: var(--stc-success);
  margin-top: var(--stc-space-2);
}

/* ── FFC Portfolio Drift ────────────────────────────────────── */
.stc-ffc-pdi-score {
  font-size: var(--stc-text-lg);
  font-weight: 600;
  color: var(--stc-text-mid);
  margin-bottom: var(--stc-space-3);
}

.stc-ffc-drift-actions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
}

.stc-ffc-drift-actions li {
  font-size: var(--stc-text-sm);
  padding: var(--stc-space-2) var(--stc-space-3);
  background: var(--stc-bg);
  border-radius: var(--stc-radius-sm);
  border-left: 3px solid var(--stc-amber);
}

/* ── FFC Regional Accounts ──────────────────────────────────── */
.stc-ffc-accounts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--stc-space-3);
  margin-bottom: var(--stc-space-3);
}

.stc-ffc-account {
  background: var(--stc-bg);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  padding: var(--stc-space-3) var(--stc-space-4);
}

.stc-ffc-account__name {
  font-size: var(--stc-text-sm);
  font-weight: 700;
  color: var(--stc-text-mid);
  margin-bottom: var(--stc-space-1);
}

.stc-ffc-account__limit {
  font-size: var(--stc-text-xs);
  color: var(--stc-green-mid);
  font-weight: 600;
}

.stc-ffc-account__note {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-soft);
  margin-top: var(--stc-space-1);
  line-height: 1.4;
}

/* ── Responsive tweaks for FFC ──────────────────────────────── */
@media (max-width: 600px) {
  .stc-ffc-hero__number { font-size: 2.25rem; }
  .stc-ffc-progress-wrap { grid-template-columns: 1fr; }
  .stc-ffc-progress__pct { grid-row: auto; grid-column: 1; text-align: left; }
}

/* ═══════════════════════════════════════════════════════════════
   Stage 9 — Achievements & Gamification
   ═══════════════════════════════════════════════════════════════ */

/* ── Achievement grid ────────────────────────────────────────── */
.stc-achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--stc-space-3);
  margin-top: var(--stc-space-4);
}

/* ── Badge card ──────────────────────────────────────────────── */
.stc-achievement-badge {
  background: var(--stc-surface);
  border: 1.5px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-4) var(--stc-space-3);
  text-align: center;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stc-achievement-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.stc-achievement-badge__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: var(--stc-space-2);
}
.stc-achievement-badge__name {
  font-size: var(--stc-text-xs);
  font-weight: 700;
  color: var(--stc-text-mid);
  line-height: 1.3;
  margin-bottom: var(--stc-space-1);
}
.stc-achievement-badge__date {
  font-size: var(--stc-text-xs);
  color: var(--stc-green-mid);
  font-weight: 600;
}

/* ── Locked state ────────────────────────────────────────────── */
.stc-achievement-badge--locked {
  opacity: 0.42;
  filter: grayscale(0.7);
  border-style: dashed;
}
.stc-achievement-badge--locked .stc-achievement-badge__icon {
  filter: grayscale(1);
}
.stc-achievement-badge__hint {
  font-size: 10px;
  color: var(--stc-text-soft);
  line-height: 1.3;
  margin-top: var(--stc-space-1);
}

/* ── Achievement toast notification ─────────────────────────── */
.stc-achievement-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: var(--stc-space-3);
  background: var(--stc-surface);
  border: 1.5px solid var(--stc-green-mid);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-3) var(--stc-space-4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 240px;
  max-width: 320px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.stc-achievement-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.stc-achievement-toast__icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.stc-achievement-toast__label {
  font-size: var(--stc-text-xs);
  color: var(--stc-green-mid);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.stc-achievement-toast__name {
  font-size: var(--stc-text-sm);
  font-weight: 700;
  color: var(--stc-text-mid);
}

/* Teaser variant (guests) */
.stc-achievement-toast--teaser {
  border-color: var(--stc-border);
  opacity: 0.92;
}
.stc-achievement-toast--teaser .stc-achievement-toast__label {
  color: var(--stc-text-soft);
}
.stc-achievement-toast__cta {
  display: inline-block;
  margin-top: var(--stc-space-1);
  font-size: var(--stc-text-xs);
  font-weight: 700;
  color: var(--stc-green-mid);
  text-decoration: none;
  pointer-events: all;
}
.stc-achievement-toast__cta:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .stc-achievements-grid { grid-template-columns: repeat(3, 1fr); }
  .stc-achievement-toast { right: 1rem; bottom: 1rem; min-width: 200px; }
}

/* ── AI Coach Analysis card ────────────────────────────────── */
.stc-ai-card {
  border-top: 3px solid var(--stc-thrive);
  margin-top: var(--stc-space-6);
}

/* Locked state (guest users) */
.stc-ai-card--locked {
  border-top-color: var(--stc-border);
  background: linear-gradient(135deg, var(--stc-bg) 0%, #F5F2EC 100%);
}

.stc-ai-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--stc-space-6) var(--stc-space-4);
  gap: var(--stc-space-4);
}

.stc-ai-locked__icon {
  font-size: 2.5rem;
  opacity: 0.55;
}

.stc-ai-locked__text {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-mid);
  max-width: 36ch;
  line-height: 1.6;
  margin: 0;
}

/* Button sizing helper */
.stc-btn--lg {
  padding: var(--stc-space-3) var(--stc-space-6);
  font-size: var(--stc-text-base);
}

/* Action row (logged-in, pre-click) */
.stc-ai-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--stc-space-4);
  padding: var(--stc-space-2) 0 var(--stc-space-2);
}

.stc-ai-action__text {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-mid);
  line-height: 1.65;
  margin: 0;
  max-width: 56ch;
}

/* AI analysis output text */
.stc-ai-content {
  padding: var(--stc-space-4) 0 var(--stc-space-2);
  animation: stc-fade-in 0.3s ease;
}

.stc-ai-text {
  white-space: pre-line;
  font-size: var(--stc-text-sm);
  line-height: 1.8;
  color: var(--stc-text);
  font-family: inherit;
}

/* Section headers the AI returns in ALL-CAPS — make them stand out */
.stc-ai-text {
  white-space: pre-line;
}

@media (max-width: 600px) {
  .stc-ai-locked { padding: var(--stc-space-4) var(--stc-space-3); }
  .stc-ai-action  { align-items: stretch; }
}

/* ── Recommended Reading ────────────────────────────────────── */
.stc-recs-card {
  margin-top: var(--stc-space-6);
}

.stc-book-list {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-5);
}

.stc-book-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--stc-space-4);
  align-items: flex-start;
}

.stc-book-card--soon {
  opacity: 0.9;
}

/* Cover */
.stc-book-card__cover {
  flex-shrink: 0;
}

.stc-book-card__cover-img {
  width: 96px;
  height: 136px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: block;
}

.stc-book-card__cover-placeholder {
  width: 96px;
  height: 136px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--stc-space-2);
  text-align: center;
  gap: var(--stc-space-1);
}

.stc-book-card__cover-title {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stc-book-card__cover-sub {
  font-size: 7.5px;
  color: rgba(255,255,255,0.7);
  line-height: 1.3;
  text-align: center;
}

/* Body */
.stc-book-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
}

.stc-book-card__badge {
  display: inline-block;
  padding: 2px var(--stc-space-2);
  border-radius: 99px;
  font-size: var(--stc-text-xs);
  font-weight: 700;
  background: var(--stc-border-soft);
  color: var(--stc-text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stc-book-card__title {
  font-size: var(--stc-text-base);
  font-weight: 700;
  color: var(--stc-text);
  line-height: 1.3;
}

.stc-book-card__subtitle {
  font-size: var(--stc-text-xs);
  color: var(--stc-text-soft);
  font-style: italic;
}

.stc-book-card__desc {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-mid);
  line-height: 1.6;
}

.stc-book-card__footer {
  margin-top: var(--stc-space-1);
}

.stc-book-card__cta {
  font-size: var(--stc-text-sm);
}

.stc-book-card__cta--notify {
  background: var(--stc-bg);
  color: var(--stc-text-soft);
  border: 1px solid var(--stc-border);
  cursor: default;
}

/* Separator between books */
.stc-book-list > .stc-book-card + .stc-book-card {
  padding-top: var(--stc-space-5);
  border-top: 1px solid var(--stc-border-soft);
}

@media (max-width: 480px) {
  .stc-book-card {
    grid-template-columns: 72px 1fr;
  }
  .stc-book-card__cover-img,
  .stc-book-card__cover-placeholder {
    width: 72px;
    height: 102px;
  }
}

/* ── Pricing Page ───────────────────────────────────────────── */

.stc-pricing-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--stc-space-6) var(--stc-space-4);
}

.stc-pricing-hero {
  text-align: center;
  margin-bottom: var(--stc-space-8);
}

.stc-pricing-hero__title {
  font-size: var(--stc-text-3xl);
  font-weight: 700;
  color: var(--stc-text);
  margin: 0 0 var(--stc-space-2);
}

.stc-pricing-hero__sub {
  font-size: var(--stc-text-lg);
  color: var(--stc-text-mid);
  margin: 0;
}

/* Grid */
.stc-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--stc-space-4);
  align-items: start;
  margin-bottom: var(--stc-space-8);
}

/* Card */
.stc-pricing-card {
  background: var(--stc-bg-card);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-lg);
  padding: var(--stc-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-4);
  position: relative;
  transition: box-shadow .15s ease;
}

.stc-pricing-card:hover {
  box-shadow: var(--stc-shadow-md);
}

.stc-pricing-card--featured {
  border-color: var(--stc-adapt);
  box-shadow: 0 0 0 2px var(--stc-adapt), var(--stc-shadow-md);
}

.stc-pricing-card--current {
  border-color: var(--stc-green);
}

/* Badge (Most Popular / Best Value) */
.stc-pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--stc-adapt);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.stc-pricing-card--current .stc-pricing-badge {
  background: var(--stc-green);
}

/* Card header */
.stc-pricing-card__header {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
}

.stc-pricing-card__tier {
  align-self: flex-start;
}

.stc-pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stc-pricing-card__amount {
  font-size: var(--stc-text-3xl);
  font-weight: 700;
  color: var(--stc-text);
  line-height: 1;
}

.stc-pricing-card__period {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-muted);
}

.stc-pricing-card__desc {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-mid);
  margin: 0;
  line-height: 1.4;
}

/* Features list */
.stc-pricing-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
  flex: 1;
}

.stc-pricing-card__features li {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-mid);
  padding-left: 1.4em;
  position: relative;
}

.stc-pricing-card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--stc-green-mid);
  font-weight: 700;
}

/* Current plan label */
.stc-pricing-current {
  text-align: center;
  cursor: default;
  pointer-events: none;
  opacity: .7;
}

/* Block button variant */
.stc-btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Guarantee strip */
.stc-pricing-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--stc-space-2);
  background: var(--stc-green-light);
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  padding: var(--stc-space-3) var(--stc-space-5);
  font-size: var(--stc-text-sm);
  color: var(--stc-green);
  font-weight: 500;
  margin-bottom: var(--stc-space-8);
}

.stc-pricing-guarantee__icon {
  font-size: 1.2rem;
}

/* FAQ */
.stc-pricing-faq {
  max-width: 680px;
  margin: 0 auto;
}

.stc-pricing-faq__title {
  font-size: var(--stc-text-xl);
  font-weight: 600;
  color: var(--stc-text);
  margin: 0 0 var(--stc-space-4);
}

.stc-pricing-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--stc-space-2);
}

.stc-pricing-faq__item {
  border: 1px solid var(--stc-border);
  border-radius: var(--stc-radius-md);
  background: var(--stc-bg-card);
  overflow: hidden;
}

.stc-pricing-faq__q {
  font-size: var(--stc-text-sm);
  font-weight: 600;
  color: var(--stc-text);
  padding: var(--stc-space-3) var(--stc-space-4);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.stc-pricing-faq__q::-webkit-details-marker { display: none; }

.stc-pricing-faq__q::after {
  content: '+';
  float: right;
  font-size: 1.1rem;
  color: var(--stc-text-muted);
  transition: transform .15s;
}

.stc-pricing-faq__item[open] .stc-pricing-faq__q::after {
  content: '−';
}

.stc-pricing-faq__a {
  font-size: var(--stc-text-sm);
  color: var(--stc-text-mid);
  padding: 0 var(--stc-space-4) var(--stc-space-3);
  margin: 0;
  line-height: 1.6;
}

/* Hub hero */
.stc-hub-hero {
  text-align: center;
  padding: var(--stc-space-8) var(--stc-space-4) var(--stc-space-6);
}

.stc-hub-hero__title {
  font-size: var(--stc-text-3xl);
  font-weight: 700;
  color: var(--stc-text);
  margin: 0 0 var(--stc-space-2);
}

.stc-hub-hero__pillars {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--stc-space-2);
  margin: var(--stc-space-3) 0 var(--stc-space-2);
}

.stc-hub-hero__sub {
  font-size: var(--stc-text-base);
  color: var(--stc-text-mid);
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .stc-pricing-grid {
    grid-template-columns: 1fr;
  }
  .stc-pricing-hero__title {
    font-size: var(--stc-text-2xl);
  }
}
