/* ─── Reset & base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Accessibility & micro-interactions ─────────────────────────── */

::selection { background: rgba(79, 70, 229, 0.15); color: var(--c-text, #0F172A); }

:focus-visible {
  outline: 2px solid #4F46E5;
  outline-offset: 2px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
body { animation: page-fade-in 0.22s ease-out; }

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

:root {
  --c-bg:      #F8FAFC;
  --c-alt:     #F1F5F9;
  --c-surface: #FFFFFF;
  --c-border:  #E2E8F0;
  --c-text:    #0F172A;
  --c-muted:   #64748B;
  --c-primary: #4F46E5;
  --c-primary-hover: #4338CA;
  --c-success: #059669;
  --c-danger:  #DC2626;
  --c-accent:  #EEF2FF;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout helpers ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon { font-size: 20px; }

.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.3px;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
  padding: 12px 22px;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--c-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
  border-radius: 10px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}
.btn-outline:hover {
  background: var(--c-accent);
}

.btn-white {
  background: #fff;
  color: var(--c-primary);
  font-weight: 700;
}
.btn-white:hover { background: #f0f0f0; }

.btn-arrow { font-size: 18px; transition: transform 0.15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 72px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-headline {
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--c-text);
  margin-bottom: 20px;
}

.headline-accent {
  display: block;
  color: var(--c-primary);
}

.hero-sub {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--c-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 60px;
}

.cta-note {
  font-size: 13px;
  color: var(--c-muted);
}

/* ─── Stats row ──────────────────────────────────────────────────── */
.stats {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 24px;
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.4;
}

.stat-divider {
  width: 1px;
  background: var(--c-border);
  align-self: stretch;
}

/* ─── Generic section ────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: var(--c-alt); }

.section-title {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 17px;
  color: var(--c-muted);
  margin-bottom: 52px;
}

/* ─── Steps ──────────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step {
  flex: 1;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 0 0 6px var(--c-accent);
}

.step-body { padding-top: 4px; }

.step-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
}

.step-connector {
  flex-shrink: 0;
  width: 40px;
  height: 2px;
  background: var(--c-border);
  margin-top: 21px;
}

/* ─── Pain / Compare grid ────────────────────────────────────────── */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.pain-text {
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 20px;
}

.pain-compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.compare-card.compare-good {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-accent), var(--shadow-sm);
}

.compare-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.compare-label-bad { color: var(--c-muted); }
.compare-label-good { color: var(--c-primary); }

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.compare-list li {
  font-size: 14px;
  color: var(--c-muted);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.compare-bad .compare-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: var(--c-danger);
  font-weight: 700;
  font-size: 13px;
}

.compare-good .compare-list li {
  color: var(--c-text);
}

.compare-good .compare-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--c-success);
  font-weight: 700;
  font-size: 13px;
}

/* ─── Guarantee strip ────────────────────────────────────────────── */
.guarantee-strip {
  background: var(--c-primary);
  padding: 28px 0;
}

.guarantee-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.guarantee-icon { font-size: 28px; flex-shrink: 0; }

.guarantee-copy {
  flex: 1;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

.guarantee-copy strong {
  color: #fff;
  font-weight: 700;
}

/* ─── FAQ ────────────────────────────────────────────────────────── */
.faq-container { max-width: 720px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 40px;
}

.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.12s;
}

.faq-q::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--c-muted);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.2s;
}

.faq-item[open] .faq-q { background: var(--c-alt); }
.faq-item[open] .faq-q::after { transform: rotate(45deg); }
.faq-q:hover { background: var(--c-alt); }

.faq-a {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
  border-top: 1px solid var(--c-border);
  margin-top: 0;
  padding-top: 14px;
}

/* ─── Final CTA ──────────────────────────────────────────────────── */
.final-cta {
  background: var(--c-text);
  text-align: center;
}

.final-cta-inner { max-width: 640px; margin: 0 auto; }

.final-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.final-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  background: var(--c-text);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.footer-logo { color: rgba(255,255,255,0.8); text-decoration: none; }

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-align: right;
  max-width: 480px;
  line-height: 1.5;
}

/* ─── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 52px 0 48px; }

  .stats {
    flex-direction: column;
    max-width: 100%;
  }
  .stat-divider {
    width: 100%;
    height: 1px;
  }

  .steps {
    flex-direction: column;
    gap: 32px;
  }
  .step-connector { display: none; }

  .pain-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .guarantee-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-copy { text-align: center; max-width: 100%; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
  .hero-headline { letter-spacing: -0.8px; }
}

/* ─── Nav step label ─────────────────────────────────────────────── */
.nav-step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-muted);
}

/* ─── Diagnose page header ───────────────────────────────────────── */
.diagnose-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 40px 0 36px;
}

.diagnose-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.progress-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.progress-step-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.progress-step-active .progress-step-num {
  background: var(--c-primary);
  color: #fff;
}
.progress-step-active .progress-step-label { color: var(--c-text); }

.progress-step-upcoming .progress-step-num {
  background: var(--c-border);
  color: var(--c-muted);
}
.progress-step-upcoming .progress-step-label { color: var(--c-muted); }

.progress-connector {
  flex: 1;
  height: 2px;
  background: var(--c-border);
  margin: 0 12px;
  max-width: 80px;
}

.diagnose-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}

.diagnose-sub {
  font-size: 16px;
  color: var(--c-muted);
  line-height: 1.6;
  max-width: 560px;
}

/* ─── Diagnose form body & layout ────────────────────────────────── */
.diagnose-body {
  padding: 40px 0 72px;
}

.diagnose-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: flex-start;
}

/* ─── Error banner ───────────────────────────────────────────────── */
.error-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #991B1B;
}

.error-banner-icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.5;
}

.error-list {
  margin: 6px 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ─── Form sections & controls ───────────────────────────────────── */
.diagnose-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-section {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--c-muted);
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.form-optional {
  font-size: 12px;
  font-weight: 400;
  color: var(--c-muted);
}

.form-required {
  color: var(--c-danger);
  font-weight: 700;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  background: var(--c-surface);
}

.form-input::placeholder { color: var(--c-muted); opacity: 0.7; }

.form-input-date {
  cursor: pointer;
}

.form-input-error {
  border-color: var(--c-danger);
}
.form-input-error:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}

.form-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  background: var(--c-surface);
}

.form-textarea::placeholder {
  color: var(--c-muted);
  opacity: 0.65;
  white-space: pre-line;
}

.form-hint {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
}

.form-submit-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 8px;
}

.form-submit-btn { width: auto; min-width: 240px; justify-content: center; }

.form-submit-note {
  font-size: 13px;
  color: var(--c-muted);
}

/* ─── Diagnose sidebar ───────────────────────────────────────────── */
.diagnose-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-icon {
  font-size: 22px;
  margin-bottom: 10px;
}

.sidebar-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 14px;
}

.sidebar-steps-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-steps-list li {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  padding-left: 4px;
}

.sidebar-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-tips-list li {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.sidebar-tips-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--c-primary);
  font-size: 12px;
  top: 1px;
}

.sidebar-tips-list li strong { color: var(--c-text); }

.sidebar-guarantee {
  background: var(--c-accent);
  border: 1px solid rgba(79,70,229,0.15);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.guarantee-mini-icon { font-size: 18px; flex-shrink: 0; }

.sidebar-guarantee p {
  font-size: 13px;
  color: var(--c-primary);
  line-height: 1.5;
}

/* ─── Diagnosis results: success header ──────────────────────────── */
.diag-success-header {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  padding: 32px 0;
}

.diag-success-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.diag-check-circle {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  font-weight: 700;
}

.diag-success-copy { flex: 1; }

.diag-success-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.diag-success-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.retake-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  min-width: 80px;
}

.retake-badge-num {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.retake-badge-label {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
}

.retake-urgent { background: rgba(220,38,38,0.25); border-color: rgba(220,38,38,0.5); }
.retake-soon   { background: rgba(234,179,8,0.2);  border-color: rgba(234,179,8,0.4); }

/* ─── Diagnosis page body ────────────────────────────────────────── */
.diag-page-body {
  padding: 36px 0 72px;
}

.diag-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: flex-start;
}

.diag-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── Diagnosis cards ────────────────────────────────────────────── */
.diag-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.diag-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.diag-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.2px;
}

.link-muted {
  font-size: 13px;
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.12s;
}
.link-muted:hover { color: var(--c-primary); }

.link-sm { font-size: 12px; }

.diag-field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
}
.diag-field-row:last-child { border-bottom: none; }

.diag-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.diag-field-value {
  font-size: 14px;
  color: var(--c-text);
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.diag-field-value-strong {
  font-weight: 600;
}

.field-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.field-tag-urgent { background: #FEE2E2; color: #991B1B; }
.field-tag-warn   { background: #FEF3C7; color: #92400E; }
.field-tag-ok     { background: #D1FAE5; color: #065F46; }

.diag-field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--c-border);
  margin-top: 4px;
}

.diag-field-text {
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--c-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.diag-field-text-muted { color: var(--c-muted); }

/* ─── Analysis card & skeleton ───────────────────────────────────── */
.diag-card-analysis { border-color: rgba(79,70,229,0.2); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-analyzing {
  background: #EEF2FF;
  color: var(--c-primary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.diag-analysis-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.analysis-skeleton {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--c-bg);
  border-radius: var(--radius);
}

.skeleton-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-muted);
  flex-shrink: 0;
}

.skeleton-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.skeleton-line {
  height: 10px;
  border-radius: 5px;
  background: var(--c-border);
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.skeleton-line-title { width: 100%; }
.skeleton-line-sub   { width: 60%; }

@keyframes skeleton-shimmer {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

.skeleton-chip {
  width: 52px;
  height: 22px;
  border-radius: 100px;
  background: var(--c-border);
  flex-shrink: 0;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.diag-analysis-note {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
  background: var(--c-alt);
  border-radius: var(--radius);
  padding: 12px 14px;
}

/* ─── Diagnosis sidebar ──────────────────────────────────────────── */
.diag-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

/* ─── Unlock card ────────────────────────────────────────────────── */
.unlock-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.unlock-card-top {
  background: var(--c-text);
  padding: 24px;
}

.unlock-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.unlock-price {
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.unlock-period {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}

.unlock-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.unlock-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.unlock-features {
  list-style: none;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.unlock-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--c-text);
  line-height: 1.5;
}

.feature-check {
  color: var(--c-success);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 0px;
}

.btn-unlock {
  width: calc(100% - 48px);
  margin: 0 24px 4px;
  justify-content: center;
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-unlock-active {
  opacity: 1;
  cursor: pointer;
}

.unlock-note {
  font-size: 11px;
  color: var(--c-muted);
  text-align: center;
  padding: 8px 24px 20px;
}

/* ─── Save link card ─────────────────────────────────────────────── */
.save-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.save-card-icon { font-size: 20px; margin-bottom: 8px; }

.save-card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.save-card-desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.save-card-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-card-url {
  flex: 1;
  font-size: 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--c-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  min-width: 0;
}

.copy-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.copy-btn:hover { background: var(--c-primary-hover); }
.copy-btn-success { background: var(--c-success); }

/* ─── Guarantee mini card ────────────────────────────────────────── */
.diag-guarantee-card {
  background: var(--c-accent);
  border: 1px solid rgba(79,70,229,0.15);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.guarantee-mini-text {
  font-size: 13px;
  color: var(--c-primary);
  line-height: 1.5;
}
.guarantee-mini-text strong { font-weight: 700; }

/* ─── Responsive: diagnose + diagnosis pages ─────────────────────── */
@media (max-width: 860px) {
  .diagnose-layout,
  .diag-page-layout {
    grid-template-columns: 1fr;
  }

  .diagnose-sidebar,
  .diag-sidebar-col {
    position: static;
  }

  .diagnose-progress {
    display: none;
  }
}

@media (max-width: 600px) {
  .diag-success-inner {
    flex-wrap: wrap;
    gap: 16px;
  }
  .retake-badge {
    margin-left: auto;
  }
  .diag-field-row {
    flex-direction: column;
    gap: 4px;
  }
  .diag-field-value {
    text-align: left;
    justify-content: flex-start;
  }
  .form-section { padding: 20px 16px; }
  .diag-card { padding: 20px; }
}

/* ─── Misconception list (Feature 3) ─────────────────────────────── */
.status-done {
  background: #D1FAE5;
  color: #065F46;
}

.status-dot-done {
  animation: none;
  background: var(--c-success);
}

.misconception-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.misconception-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  border-left-width: 4px;
  transition: box-shadow 0.15s;
}

.misconception-item:hover {
  box-shadow: var(--shadow-sm);
}

.misconception-high  { border-left-color: var(--c-danger); }
.misconception-medium { border-left-color: #F59E0B; }
.misconception-low   { border-left-color: #94A3B8; }

.misconception-rank {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--c-text);
  margin-top: 2px;
}

.misconception-body {
  flex: 1;
  min-width: 0;
}

.misconception-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.misconception-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.severity-chip {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.severity-high   { background: #FEE2E2; color: #991B1B; }
.severity-medium { background: #FEF3C7; color: #92400E; }
.severity-low    { background: #F1F5F9; color: var(--c-muted); }

.misconception-gap {
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gap-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 10px;
  margin-right: 4px;
  color: var(--c-muted);
}

.misconception-explain {
  font-size: 13px;
  color: #475569;
  line-height: 1.65;
}

.analysis-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--c-accent);
  border: 1px solid rgba(79,70,229,0.12);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--c-primary);
  line-height: 1.5;
}

.analysis-footer-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Pending state (if analysis not yet done) ───────────────────── */
.analysis-pending-state {
  text-align: center;
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pending-icon {
  font-size: 32px;
}

.pending-text {
  font-size: 14px;
  color: var(--c-muted);
}

@media (max-width: 600px) {
  .misconception-item { padding: 14px 16px; gap: 12px; }
  .misconception-rank { width: 28px; height: 28px; font-size: 12px; }
  .misconception-header-row { flex-wrap: wrap; }
  .misconception-gap { white-space: normal; }
}

/* ═══════════════════════════════════════════════════════════════════
   PLAN PAGE
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Plan header ──────────────────────────────────────────────────── */
.plan-header {
  background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 100%);
  padding: 36px 0 32px;
}

.plan-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.plan-header-text { flex: 1; }

.plan-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}

.plan-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #fff;
  margin-bottom: 8px;
}

.plan-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  max-width: 520px;
}

.plan-countdown {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 16px 22px;
  text-align: center;
  min-width: 90px;
}

.plan-countdown-num {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -1px;
}

.plan-countdown-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.plan-countdown-urgent { border-color: #FCA5A5; background: rgba(239,68,68,0.2); }
.plan-countdown-soon   { border-color: #FCD34D; background: rgba(245,158,11,0.2); }
.plan-countdown-ok     { border-color: rgba(255,255,255,0.2); }

/* ─── Plan body layout ──────────────────────────────────────────────── */
.plan-body { padding: 36px 0 72px; }

.plan-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: flex-start;
}

/* ─── Coverage card ────────────────────────────────────────────────── */
.plan-coverage-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.plan-coverage-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
  margin-bottom: 14px;
}

.plan-coverage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coverage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.coverage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.coverage-dot-high   { background: #DC2626; }
.coverage-dot-medium { background: #D97706; }
.coverage-dot-low    { background: #059669; }

.coverage-name {
  flex: 1;
  color: var(--c-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coverage-days {
  font-size: 12px;
  color: var(--c-muted);
  background: var(--c-alt);
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Day cards ─────────────────────────────────────────────────────── */
.plan-days-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.plan-day-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.plan-day-card:hover { box-shadow: var(--shadow-md); }

.plan-day-high   { border-left-color: #DC2626; }
.plan-day-medium { border-left-color: #D97706; }
.plan-day-low    { border-left-color: #059669; }

.plan-day-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--c-border);
}

.plan-day-num-badge {
  flex-shrink: 0;
  background: var(--c-text);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-day-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.plan-day-date {
  font-size: 12px;
  color: var(--c-muted);
  font-weight: 500;
}

.plan-day-gap-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-day-severity-chip {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.severity-chip-high   { background: #FEF2F2; color: #DC2626; }
.severity-chip-medium { background: #FFFBEB; color: #D97706; }
.severity-chip-low    { background: #ECFDF5; color: #059669; }

.plan-day-gap-context {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 20px 0;
}

.gap-context-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }

.gap-context-text {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.4;
}

/* ─── Practice problems ──────────────────────────────────────────────── */
.plan-problems-list {
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-problem-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.problem-num-badge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-alt);
  border: 1.5px solid var(--c-border);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.problem-body { flex: 1; min-width: 0; }

.problem-statement {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ─── Answer reveal (details/summary) ───────────────────────────────── */
.answer-reveal {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-bg);
}

.answer-reveal-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.12s;
}

.answer-reveal-toggle::-webkit-details-marker { display: none; }

.answer-reveal-toggle:hover { background: var(--c-accent); }

.toggle-hide { display: none; }

.toggle-arrow {
  margin-left: auto;
  font-size: 18px;
  font-weight: 400;
  color: var(--c-muted);
  transition: transform 0.2s;
  line-height: 1;
}

.answer-reveal.is-open .toggle-show { display: none; }
.answer-reveal.is-open .toggle-hide { display: inline; }
.answer-reveal.is-open .toggle-arrow { transform: rotate(90deg); }

.answer-reveal-content {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--c-border);
}

.answer-final {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.answer-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
  flex-shrink: 0;
}

.answer-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-success);
}

.answer-steps {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.answer-steps li {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  padding-left: 4px;
}

.plan-problems-empty {
  padding: 12px 20px 20px;
  font-size: 13px;
  color: var(--c-muted);
}

/* ─── Error / empty states ──────────────────────────────────────────── */
.plan-error-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.plan-error-icon { font-size: 22px; flex-shrink: 0; }

.plan-error-text strong {
  display: block;
  font-size: 16px;
  color: #991B1B;
  margin-bottom: 6px;
}

.plan-error-text p {
  font-size: 14px;
  color: #991B1B;
  line-height: 1.5;
}

.plan-empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.plan-empty-icon { font-size: 36px; margin-bottom: 16px; }

.plan-empty-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.plan-empty-desc {
  font-size: 14px;
  color: var(--c-muted);
  margin-bottom: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ─── Bottom CTA ────────────────────────────────────────────────────── */
.plan-bottom-cta {
  margin-top: 24px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.plan-bottom-cta-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.plan-bottom-icon { font-size: 22px; flex-shrink: 0; }

.plan-bottom-text { flex: 1; }

.plan-bottom-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.plan-bottom-text p {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.4;
}

/* ─── Sidebar ────────────────────────────────────────────────────────── */
.plan-sidebar-col {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-sidebar-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.plan-sidebar-icon { font-size: 20px; margin-bottom: 10px; }

.plan-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.plan-how-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-how-list li {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  padding-left: 4px;
}

.plan-sidebar-retake {
  background: var(--c-alt);
  border-color: var(--c-border);
}

.plan-retake-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-retake-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-retake-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}

.plan-retake-countdown-mini {
  margin-top: 12px;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
}

.plan-countdown-urgent .plan-retake-countdown-mini,
.plan-retake-countdown-mini.plan-countdown-urgent {
  background: #FEF2F2; color: #DC2626;
}
.plan-countdown-soon .plan-retake-countdown-mini,
.plan-retake-countdown-mini.plan-countdown-soon {
  background: #FFFBEB; color: #D97706;
}
.plan-countdown-ok .plan-retake-countdown-mini,
.plan-retake-countdown-mini.plan-countdown-ok {
  background: var(--c-accent); color: var(--c-primary);
}

.plan-guarantee-card {
  background: var(--c-accent);
  border: 1px solid rgba(79,70,229,0.15);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.guarantee-mini-text {
  font-size: 13px;
  color: var(--c-primary);
  line-height: 1.55;
}
.guarantee-mini-text strong { display: block; margin-bottom: 2px; }

.plan-back-link {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  text-decoration: none;
  padding: 10px;
  border-radius: var(--radius);
  transition: color 0.12s, background 0.12s;
}
.plan-back-link:hover {
  color: var(--c-primary);
  background: var(--c-accent);
}

/* ─── Paywall banner (between Day 1 and locked days) ─────────────── */
.plan-paywall-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 100%);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 8px 0;
}

.paywall-banner-lock {
  font-size: 28px;
  flex-shrink: 0;
}

.paywall-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.paywall-banner-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: block;
}

.paywall-banner-text span {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.paywall-btn {
  flex-shrink: 0;
  background: #fff;
  color: var(--c-primary);
  font-weight: 700;
  white-space: nowrap;
}
.paywall-btn:hover {
  background: #F0F0FF;
}

/* ─── Locked day cards ───────────────────────────────────────────── */
.plan-day-locked {
  opacity: 0.75;
  background: var(--c-alt);
}

.plan-day-header-locked {
  opacity: 0.6;
}

.plan-day-num-badge-locked {
  background: var(--c-muted);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.plan-locked-chip {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: #F1F5F9;
  color: var(--c-muted);
  white-space: nowrap;
}

.plan-day-locked-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 16px;
  font-size: 13px;
  color: var(--c-muted);
}

.plan-locked-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.plan-locked-text { flex: 1; }

.plan-locked-link {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
  text-decoration: none;
  padding: 4px 10px;
  border: 1.5px solid var(--c-primary);
  border-radius: var(--radius);
  transition: background 0.12s;
}
.plan-locked-link:hover { background: var(--c-accent); }

/* ─── Day 1 free preview badge ───────────────────────────────────── */
.plan-day-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c-success);
  background: #D1FAE5;
  padding: 4px 12px;
  margin: 0 20px 4px;
  border-radius: 100px;
}
.preview-badge-icon { font-size: 13px; }

/* ─── Bottom paywall CTA ──────────────────────────────────────────── */
.plan-paywall-bottom {
  margin-top: 24px;
  background: var(--c-text);
  border-radius: var(--radius-lg);
  padding: 28px 28px 28px;
}

.plan-paywall-bottom-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.paywall-bottom-price {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 0 0;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.paywall-price-num {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
}

.paywall-price-period {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  white-space: nowrap;
  margin-top: 3px;
}

.paywall-bottom-text {
  flex: 1;
}

.paywall-bottom-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.paywall-bottom-text p {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

.paywall-bottom-btn {
  flex-shrink: 0;
  background: var(--c-primary);
  white-space: nowrap;
}

/* ─── Sidebar unlock card ─────────────────────────────────────────── */
.plan-sidebar-unlock-card {
  background: var(--c-text);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-unlock-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sidebar-unlock-price-num {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.8px;
  line-height: 1;
}

.sidebar-unlock-price-period {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.sidebar-unlock-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.sidebar-unlock-btn {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
}

.sidebar-unlock-note {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  line-height: 1.4;
}

/* ─── Nav plan actions ──────────────────────────────────────────────── */
.nav-plan-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Plan page mobile ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .plan-layout {
    grid-template-columns: 1fr;
  }
  .plan-sidebar-col {
    position: static;
    order: -1;
  }
  .plan-header-inner {
    flex-direction: column;
    gap: 16px;
  }
  .plan-countdown {
    align-self: flex-start;
    flex-direction: row;
    gap: 10px;
    padding: 10px 16px;
  }
  .plan-countdown-num { font-size: 24px; }
}

@media (max-width: 480px) {
  .plan-day-header { flex-wrap: wrap; gap: 8px; }
  .plan-day-gap-label { white-space: normal; }
  .plan-bottom-cta-inner { flex-direction: column; align-items: flex-start; }
  .plan-problem-item { gap: 10px; }
  .plan-paywall-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .plan-paywall-bottom-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .paywall-bottom-price { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding: 0 0 16px 0; width: 100%; flex-direction: row; gap: 8px; align-items: baseline; }
  .paywall-bottom-btn { width: 100%; justify-content: center; }
}

/* ─── Diagnosis page: unlock note variants ───────────────────────── */
.unlock-note-paid {
  color: var(--c-success);
  font-weight: 600;
}

.unlock-preview-link {
  color: var(--c-muted);
  text-decoration: underline;
  font-size: 11px;
}
.unlock-preview-link:hover { color: var(--c-primary); }

/* ═══════════════════════════════════════════════════════════════════
   CHECKOUT PAGE
   ═══════════════════════════════════════════════════════════════════ */

.checkout-body {
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.checkout-nav {
  background: var(--c-surface);
}

.checkout-nav-secure {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
}

/* ─── Test mode banner ───────────────────────────────────────────── */
.checkout-test-banner {
  background: #FEF3C7;
  border-bottom: 1px solid #FDE68A;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #92400E;
  line-height: 1.5;
}

.test-banner-icon { font-size: 16px; flex-shrink: 0; }
.checkout-test-banner strong { font-weight: 700; color: #78350F; }

/* ─── Checkout layout ────────────────────────────────────────────── */
.checkout-page-body {
  flex: 1;
  padding: 40px 0 72px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: flex-start;
  max-width: 900px;
}

/* ─── Order summary (left) ───────────────────────────────────────── */
.checkout-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-summary-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--c-muted);
  margin-bottom: 16px;
}

.checkout-product-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
}

.checkout-product-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.checkout-product-info {
  flex: 1;
}

.checkout-product-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 4px;
}

.checkout-product-desc {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
}

.checkout-product-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--c-text);
  white-space: nowrap;
  flex-shrink: 0;
}

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

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  margin-bottom: 20px;
}

.checkout-total-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.checkout-total-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.5px;
}

.checkout-summary-guarantee {
  background: var(--c-accent);
  border: 1px solid rgba(79,70,229,0.12);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.checkout-summary-guarantee .guarantee-mini-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }

.checkout-summary-guarantee p {
  font-size: 13px;
  color: var(--c-primary);
  line-height: 1.55;
}

.checkout-summary-guarantee strong { font-weight: 700; display: block; margin-bottom: 3px; }

.checkout-whats-included {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.checkout-included-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
  margin-bottom: 10px;
}

.checkout-included-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.checkout-included-list li {
  font-size: 13px;
  color: var(--c-text);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.ci-check {
  color: var(--c-success);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 13px;
}

.checkout-back-link {
  font-size: 13px;
  color: var(--c-muted);
  text-decoration: none;
  display: inline-block;
  padding: 6px 0;
  transition: color 0.12s;
}
.checkout-back-link:hover { color: var(--c-primary); }

/* ─── Payment form panel (right) ─────────────────────────────────── */
.checkout-form-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.checkout-form-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 24px;
  letter-spacing: -0.2px;
}

.checkout-stripe-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: #991B1B;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ─── Card form ──────────────────────────────────────────────────── */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cf-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.cf-group:last-of-type { margin-bottom: 0; }

.cf-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.cf-group-half { flex: 1; margin-bottom: 0; }

.cf-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-card-icons {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.cf-card-icon {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.3px;
  background: #1A56DB;
  color: #fff;
  padding: 2px 5px;
  border-radius: 3px;
}

.cf-card-mc { background: #EA5C0A; }

.cf-input-wrap {
  position: relative;
}

.cf-input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.cf-input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
  background: var(--c-surface);
}

.cf-input::placeholder { color: var(--c-muted); opacity: 0.65; }

.cf-input-card { padding-right: 44px; }

.cf-card-overlay {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 0;
  opacity: 0.5;
}

.cf-cvc-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-border);
  font-size: 10px;
  font-weight: 700;
  color: var(--c-muted);
  cursor: default;
  margin-left: auto;
}

.cf-submit-btn {
  width: 100%;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 22px;
  font-size: 15px;
}

.cf-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cf-submit-lock { display: flex; align-items: center; }

.cf-submit-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--c-muted);
  text-align: center;
  line-height: 1.6;
}

.cf-terms-link {
  color: var(--c-primary);
  text-decoration: underline;
}

.checkout-footer { margin-top: auto; }

/* ─── Checkout mobile ────────────────────────────────────────────── */
@media (max-width: 720px) {
  .checkout-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .checkout-form-panel { padding: 20px; }
  .cf-row { flex-direction: column; gap: 0; }
  .cf-group-half { margin-bottom: 16px; }
}

/* ─── Feature 6: daily practice tracking ────────────────────────── */

/* Progress strip above the day cards */
.plan-progress-strip {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.progress-strip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-completed-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.streak-badge-zero {
  background: var(--c-alt);
  color: var(--c-muted);
  border-color: var(--c-border);
}

.progress-bar-track {
  height: 10px;
  background: var(--c-alt);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4F46E5 0%, #059669 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
  min-width: 0;
}

.progress-complete-banner {
  margin-top: 14px;
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* Completed day card state */
.plan-day-completed {
  opacity: 0.85;
  background: #F0FDF4;
}

.plan-day-completed .plan-day-header {
  border-bottom-color: #BBF7D0;
}

.plan-day-num-badge-done {
  background: var(--c-success) !important;
  color: #fff !important;
}

.plan-done-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #BBF7D0;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Completion controls bar at bottom of each day card */
.day-completion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--c-border);
  margin-top: 8px;
  background: var(--c-alt);
  border-radius: 0 0 var(--radius) var(--radius);
  flex-wrap: wrap;
}

.day-completion-done {
  background: #F0FDF4;
  border-top-color: #BBF7D0;
}

.day-done-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--c-success);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.day-done-meta {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-undo-complete {
  background: none;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius);
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-undo-complete:hover {
  color: var(--c-danger);
  border-color: var(--c-danger);
}

.day-complete-hint {
  font-size: 13px;
  color: var(--c-muted);
  flex: 1;
}

.btn-mark-complete {
  background: var(--c-success);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.btn-mark-complete:hover { background: #047857; }
.btn-mark-complete:active { transform: translateY(1px); }

/* Sidebar progress card */
.plan-sidebar-progress-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.sidebar-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sidebar-progress-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
}

.sidebar-streak-badge {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-progress-counts {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.sidebar-progress-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--c-text);
  line-height: 1;
}

.sidebar-progress-denom {
  font-size: 15px;
  color: var(--c-muted);
  font-weight: 500;
}

.sidebar-progress-bar-track {
  height: 8px;
  background: var(--c-alt);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.sidebar-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-success) 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
  min-width: 0;
}

.sidebar-progress-note {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
}

.sidebar-progress-done-note {
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  line-height: 1.5;
}

/* Bottom CTA success variant */
.plan-bottom-cta-success {
  border-color: #BBF7D0;
  background: #F0FDF4;
}

.plan-bottom-cta-success .plan-bottom-icon { font-size: 28px; }
.plan-bottom-cta-success .plan-bottom-text strong { color: #166534; }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER NAV (all pages)
   ═══════════════════════════════════════════════════════════════════ */

.footer-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-nav-link {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.12s;
}
.footer-nav-link:hover { color: rgba(255,255,255,0.85); }

@media (max-width: 640px) {
  .footer-nav { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   GUARANTEE PAGE
   ═══════════════════════════════════════════════════════════════════ */

.guarantee-page-hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 100%);
  padding: 56px 0 52px;
}

.guarantee-hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.guarantee-hero-icon {
  font-size: 64px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.guarantee-hero-copy { flex: 1; }

.guarantee-hero-copy .badge {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}

.guarantee-hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.guarantee-hero-title .headline-accent {
  display: inline;
  color: #A5B4FC;
}

.guarantee-hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  max-width: 600px;
}

@media (max-width: 640px) {
  .guarantee-hero-inner { flex-direction: column; gap: 20px; align-items: flex-start; }
  .guarantee-hero-icon { font-size: 44px; }
}

/* ─── Guarantee requirements ─────────────────────────────────────── */
.guarantee-reqs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 760px;
}

.guarantee-req {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.guarantee-req:hover { box-shadow: var(--shadow-md); }

.guarantee-req-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 0 0 6px var(--c-accent);
}

.guarantee-req-body { flex: 1; }

.guarantee-req-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
}

.guarantee-req-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
}

@media (max-width: 560px) {
  .guarantee-req { gap: 16px; padding: 18px 20px; flex-wrap: wrap; }
}

/* ─── Guarantee compare grid ─────────────────────────────────────── */
.guarantee-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 640px) {
  .guarantee-compare-grid { grid-template-columns: 1fr; }
}

/* ─── Guarantee claim section ────────────────────────────────────── */
.guarantee-claim-section { max-width: 960px; }

/* ═══════════════════════════════════════════════════════════════════
   REFUND PAGE
   ═══════════════════════════════════════════════════════════════════ */

.refund-header {
  background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 100%);
  padding: 32px 0;
}

.refund-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.refund-header-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.refund-header-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.refund-header-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

/* ─── Refund body layout ──────────────────────────────────────────── */
.refund-body { padding: 36px 0 72px; }

.refund-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: flex-start;
}

.refund-main-col { display: flex; flex-direction: column; gap: 20px; }

/* ─── State cards ─────────────────────────────────────────────────── */
.refund-state-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.refund-state-card.refund-state-blocked {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.refund-state-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.refund-state-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.refund-state-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
}

/* ─── Incomplete state ────────────────────────────────────────────── */
.refund-state-incomplete .refund-state-title { color: #92400E; }
.refund-state-incomplete { border-color: #FDE68A; background: #FFFBEB; }

.refund-progress-row { margin: 20px 0 0; }

.refund-progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 8px;
}

.refund-progress-track {
  height: 10px;
  background: #FDE68A;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}

.refund-progress-fill {
  height: 100%;
  background: #D97706;
  border-radius: 99px;
  transition: width 0.4s ease;
  min-width: 0;
}

.refund-incomplete-note {
  font-size: 13px;
  color: #78350F;
  background: rgba(251,191,36,0.15);
  border: 1px solid #FDE68A;
  border-radius: var(--radius);
  padding: 10px 14px;
  line-height: 1.5;
}

/* ─── Eligible state ──────────────────────────────────────────────── */
.refund-state-eligible { border-color: #BBF7D0; }

.refund-eligible-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #BBF7D0;
}

.refund-eligible-check {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--c-success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

/* ─── Refund form ─────────────────────────────────────────────────── */
.refund-form-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.refund-form-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
}

.refund-form-intro {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.refund-form { display: flex; flex-direction: column; gap: 0; }

.refund-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.refund-form-group:last-of-type { margin-bottom: 0; }

.refund-form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}

.refund-submit-btn {
  margin-top: 20px;
  align-self: flex-start;
}

.refund-submit-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ─── Submitted / already claimed state ───────────────────────────── */
.refund-state-submitted {
  border-color: #BBF7D0;
  background: #F0FDF4;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.refund-submitted-check {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--c-success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.refund-state-submitted .refund-state-title { color: #166534; }
.refund-state-submitted .refund-state-desc { color: #166534; opacity: 0.8; }

.refund-claim-meta {
  margin-top: 20px;
  background: rgba(255,255,255,0.7);
  border: 1px solid #BBF7D0;
  border-radius: var(--radius);
  overflow: hidden;
}

.refund-claim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #BBF7D0;
  font-size: 13px;
}
.refund-claim-row:last-child { border-bottom: none; }

.refund-claim-label {
  font-weight: 600;
  color: #166534;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.4px;
}

.refund-claim-value {
  color: var(--c-text);
  font-weight: 500;
}

.refund-claim-status {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  text-transform: uppercase;
}
.refund-status-pending  { background: #FEF3C7; color: #92400E; }
.refund-status-approved { background: #D1FAE5; color: #065F46; }
.refund-status-denied   { background: #FEE2E2; color: #991B1B; }

/* ─── Refund sidebar ─────────────────────────────────────────────── */
.refund-sidebar-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 80px;
}

.refund-terms-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  transition: opacity 0.12s;
}
.refund-terms-link:hover { opacity: 0.75; }

.refund-plan-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.refund-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.refund-plan-row:last-child { border-bottom: none; }

.refund-plan-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.refund-plan-value {
  font-weight: 600;
  color: var(--c-text);
}

/* ─── Refund mobile ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .refund-layout { grid-template-columns: 1fr; }
  .refund-sidebar-col { position: static; order: -1; }
}

@media (max-width: 480px) {
  .refund-state-card { padding: 20px; }
  .refund-eligible-header { flex-wrap: wrap; gap: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════
   ERROR PAGES (404 / 500)
   ═══════════════════════════════════════════════════════════════════ */

.error-page {
  min-height: calc(100vh - 60px - 73px); /* viewport minus nav minus footer */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
}

.error-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 40px 44px;
}

.error-code {
  display: block;
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--c-primary);
  margin-bottom: 20px;
}

.error-code-500 { color: var(--c-danger); }

.error-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--c-text);
  margin-bottom: 12px;
}

.error-message {
  font-size: 15px;
  color: var(--c-muted);
  line-height: 1.65;
  max-width: 360px;
  margin: 0 auto 28px;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 420px) {
  .error-card { padding: 36px 22px 32px; }
  .error-code { font-size: 60px; }
  .error-actions { flex-direction: column; }
  .error-actions .btn { width: 100%; justify-content: center; }
}
