    /* ═══════════════════════════════════════════
       Tupelo Honey Nursing Prep — Editorial Design System
       ═══════════════════════════════════════════ */

    :root {
      /* Palette */
      --navy:       #1B3A5C;
      --cream:      #FAFAF7;
      --forest:     #1B4332;
      --burgundy:   #6B2737;
      --brown:      #7F4F24;
      --text:       #1a1a1a;
      --text-muted: #5a5a5a;
      --border:     #e0ddd8;
      --bg:         #FAFAF7;
      --card:       #ffffff;
      --correct:    #1B4332;
      --wrong:      #6B2737;
      --warning:    #7F4F24;

      /* Domain colors */
      --dom-american-democracy:  #1B4332;
      --dom-us-constitution:     #7F4F24;
      --dom-founding-documents:  #1B3A5C;
      --dom-landmark-impact:     #6B2737;

      /* Typography */
      --font-heading: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
      --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

      /* Spacing */
      --max-width:  640px;
      --pad:        20px;
      --radius:     4px;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { font-size: 16px; -webkit-text-size-adjust: 100%; }

    body {
      font-family: var(--font-body);
      color: var(--text);
      background: var(--bg);
      line-height: 1.55;
      min-height: 100vh;
    }

    a { color: var(--navy); text-decoration: none; }
    a:hover { text-decoration: underline; }

    h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; }
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.25rem; margin-bottom: 12px; }
    h3 { font-size: 1.05rem; }

    .text-muted { color: var(--text-muted); font-size: 0.875rem; }
    .text-correct { color: var(--correct); }
    .text-wrong { color: var(--wrong); }
    .text-warning { color: var(--warning); }

    /* ── Top Bar ── */
    .topbar {
      background: var(--navy);
      color: #fff;
      padding: 0 var(--pad);
      height: 52px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 100;
      border-bottom: 3px solid var(--burgundy);
    }
    .topbar-brand {
      font-family: var(--font-heading);
      font-size: 1.05rem;
      font-weight: 700;
      color: #fff;
      text-decoration: none;
      letter-spacing: -0.01em;
    }
    .topbar-nav { display: flex; align-items: center; gap: 16px; }
    .topbar-link {
      color: rgba(255,255,255,0.8);
      font-size: 0.85rem;
      font-weight: 500;
      text-decoration: none;
      transition: color 0.15s;
    }
    .topbar-link:hover { color: #fff; text-decoration: none; }
    .topbar-user {
      color: rgba(255,255,255,0.9);
      font-size: 0.82rem;
      font-weight: 500;
    }

    /* ── Flash Messages ── */
    .flash-messages { padding: 12px var(--pad) 0; }
    .flash {
      padding: 10px 14px;
      border-left: 3px solid;
      margin-bottom: 8px;
      font-size: 0.875rem;
      border-radius: 0 var(--radius) var(--radius) 0;
    }
    .flash-success { background: #eef6ee; border-color: var(--correct); color: var(--correct); }
    .flash-error   { background: #f9eeef; border-color: var(--wrong); color: var(--wrong); }
    .flash-warning { background: #fdf4e7; border-color: var(--brown); color: var(--brown); }
    .flash-info    { background: #eef2f8; border-color: var(--navy); color: var(--navy); }

    /* ── App Container ── */
    .app-body {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: var(--pad);
      padding-bottom: 80px;
    }

    /* ── Bottom Nav ── */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: #fff;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: center;
      gap: 0;
      padding: 6px 0 env(safe-area-inset-bottom, 8px);
      z-index: 100;
    }
    .nav-item {
      flex: 1;
      max-width: 120px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      padding: 8px 4px;
      font-size: 0.7rem;
      font-weight: 500;
      color: var(--text-muted);
      text-decoration: none;
      transition: color 0.15s;
    }
    .nav-item:hover { color: var(--navy); text-decoration: none; }
    .nav-item.active { color: var(--navy); font-weight: 700; }
    .nav-icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

    /* ── Section Titles ── */
    .section-title {
      font-family: var(--font-heading);
      font-size: 1.1rem;
      font-weight: 700;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 2px solid var(--border);
    }

    /* ── Cards ── */
    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      margin-bottom: 12px;
    }

    /* ── Buttons ── */
    .btn {
      display: inline-block;
      padding: 10px 20px;
      font-family: var(--font-body);
      font-size: 0.9rem;
      font-weight: 600;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      text-decoration: none;
      text-align: center;
      transition: opacity 0.15s;
    }
    .btn:hover { opacity: 0.85; text-decoration: none; }
    .btn-primary { background: var(--navy); color: #fff; }
    .btn-secondary { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
    .btn-danger { background: var(--wrong); color: #fff; }
    .btn-full { display: block; width: 100%; }

    /* ── Forms ── */
    .form-group { margin-bottom: 16px; }
    .form-group label {
      display: block;
      font-size: 0.85rem;
      font-weight: 600;
      margin-bottom: 6px;
      color: var(--text);
    }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="date"],
    .form-group input[type="number"] {
      width: 100%;
      padding: 10px 12px;
      font-family: var(--font-body);
      font-size: 0.95rem;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: #fff;
      color: var(--text);
      transition: border-color 0.15s;
    }
    .form-group input:focus {
      outline: none;
      border-color: var(--navy);
      box-shadow: 0 0 0 2px rgba(27,58,92,0.12);
    }

    /* ── Auth Card ── */
    .auth-card {
      max-width: 380px;
      margin: 40px auto 0;
    }
    .auth-card h1 { margin-bottom: 6px; }
    .auth-card .subtitle { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
    .auth-link { margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
    .auth-link a { color: var(--navy); font-weight: 600; }

    /* ── Progress Ring ── */
    .readiness-ring {
      position: relative;
      width: 140px;
      height: 140px;
      margin: 0 auto 12px;
    }
    .readiness-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
    .progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 6; }
    .progress-ring-circle {
      fill: none;
      stroke: var(--navy);
      stroke-width: 6;
      stroke-linecap: round;
      transition: stroke-dashoffset 0.6s ease;
    }
    .readiness-pct {
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      font-family: var(--font-heading);
      font-size: 1.75rem;
      font-weight: 700;
      color: var(--text);
    }

    /* ── Domain Cards (Dashboard) ── */
    .domain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
    .domain-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px;
      text-decoration: none;
      color: var(--text);
      transition: border-color 0.15s;
      display: block;
    }
    .domain-card:hover { border-color: var(--navy); text-decoration: none; color: var(--text); }
    .domain-card-icon {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 0.8rem;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .domain-card-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
    .domain-card-pct { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; }
    .domain-card-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

    /* ── Question Top Bar ── */
    .question-topbar {
      display: flex;
      align-items: center;
      gap: 12px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 16px;
    }
    .question-back {
      background: none;
      border: none;
      font-size: 0.85rem;
      color: var(--text-muted);
      cursor: pointer;
      padding: 4px 0;
      font-family: var(--font-body);
    }
    .question-back:hover { color: var(--text); }
    .question-domain-tag {
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--navy);
    }
    .question-counter {
      margin-left: auto;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-muted);
    }

    /* ── Progress Bar ── */
    .progress-bar-track {
      width: 100%;
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      margin-bottom: 20px;
      overflow: hidden;
    }
    .progress-bar-fill {
      height: 100%;
      background: var(--navy);
      border-radius: 2px;
      transition: width 0.3s ease;
    }

    /* ── Stimulus Passage ── */
    .stimulus-block {
      background: #f5f3ee;
      border-left: 3px solid var(--navy);
      padding: 14px 16px;
      margin-bottom: 16px;
      font-size: 0.9rem;
      line-height: 1.65;
      color: var(--text-muted);
      border-radius: 0 var(--radius) var(--radius) 0;
    }
    .stimulus-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--navy);
      margin-bottom: 8px;
    }

    /* ── Question Text ── */
    .question-text {
      font-family: var(--font-heading);
      font-size: 1.08rem;
      line-height: 1.5;
      margin-bottom: 20px;
    }

    /* ── Choices ── */
    .choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
    .choice {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
      font-size: 0.92rem;
      line-height: 1.45;
    }
    .choice:hover { border-color: var(--navy); }
    .choice.selected { border-color: var(--navy); background: #f0f4f8; }
    .choice.correct { border-color: var(--correct); background: #eef6ee; }
    .choice.wrong { border-color: var(--wrong); background: #f9eeef; }
    .choice.feedback-locked { cursor: default; }
    .choice-letter {
      flex-shrink: 0;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.8rem;
      color: var(--text-muted);
    }
    .choice.selected .choice-letter { border-color: var(--navy); background: var(--navy); color: #fff; }
    .choice.correct .choice-letter { border-color: var(--correct); background: var(--correct); color: #fff; }
    .choice.wrong .choice-letter { border-color: var(--wrong); background: var(--wrong); color: #fff; }
    .choice-text { flex: 1; }

    /* ── Confidence ── */
    .confidence-section { margin-bottom: 20px; }
    .confidence-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 10px; color: var(--text-muted); }
    .confidence-track {
      display: flex;
      gap: 0;
      position: relative;
    }
    .confidence-node {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      padding: 10px 0;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      transition: background 0.15s, border-color 0.15s;
    }
    .confidence-node:first-child { border-radius: var(--radius) 0 0 var(--radius); }
    .confidence-node:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
    .confidence-node.active { background: #eef2f8; border-color: var(--navy); }
    .confidence-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 2px solid var(--border);
      transition: background 0.15s, border-color 0.15s;
    }
    .confidence-node.active .confidence-dot { background: var(--navy); border-color: var(--navy); }
    .confidence-node-text { font-size: 0.72rem; font-weight: 500; color: var(--text-muted); }
    .confidence-node.active .confidence-node-text { color: var(--navy); font-weight: 600; }
    .confidence-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

    /* ── Submit Button ── */
    .submit-btn {
      display: block;
      width: 100%;
      padding: 12px;
      font-family: var(--font-body);
      font-size: 0.95rem;
      font-weight: 600;
      background: var(--navy);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      transition: opacity 0.15s;
      text-decoration: none;
      text-align: center;
    }
    .submit-btn:hover { opacity: 0.85; }
    .submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    /* ── Feedback Banner ── */
    .feedback-banner {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      border-radius: var(--radius);
      margin-bottom: 12px;
      font-size: 0.9rem;
      font-weight: 500;
    }
    .feedback-correct { background: #eef6ee; color: var(--correct); border: 1px solid #d0e4d0; }
    .feedback-wrong { background: #f9eeef; color: var(--wrong); border: 1px solid #e4c8cc; }
    .feedback-icon { font-size: 1.1rem; font-weight: 700; }

    /* ── Feedback Explanation ── */
    .feedback-explanation {
      background: #f5f3ee;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px;
      margin-bottom: 16px;
      font-size: 0.88rem;
      line-height: 1.55;
    }
    .feedback-explanation .explanation-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--navy);
      margin-bottom: 6px;
    }
    .hidden { display: none !important; }

    /* ── Per-Choice Breakdown ── */
    .feedback-breakdown {
      margin-bottom: 16px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .breakdown-item {
      border-radius: var(--radius);
      padding: 12px 14px;
      border-left: 3px solid var(--border);
    }
    .breakdown-correct {
      background: #f0f7f2;
      border-left-color: var(--correct);
    }
    .breakdown-wrong {
      background: #faf5f0;
      border-left-color: #c4a882;
    }
    .breakdown-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .breakdown-letter {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      font-size: 0.75rem;
      font-weight: 700;
      flex-shrink: 0;
      background: var(--border);
      color: var(--text);
    }
    .breakdown-correct .breakdown-letter {
      background: var(--correct);
      color: #fff;
    }
    .breakdown-wrong .breakdown-letter {
      background: #c4a882;
      color: #fff;
    }
    .breakdown-answer {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text);
      flex: 1;
    }
    .breakdown-wrong .breakdown-answer {
      text-decoration: line-through;
      color: var(--text-muted);
    }
    .breakdown-badge {
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 2px 8px;
      border-radius: 3px;
      flex-shrink: 0;
    }
    .badge-correct {
      background: var(--correct);
      color: #fff;
    }
    .badge-wrong {
      background: #c4a882;
      color: #fff;
    }
    .breakdown-reason {
      font-size: 0.85rem;
      line-height: 1.55;
      color: var(--text-muted);
      padding-left: 32px;
    }

    .reveal-link {
      background: none;
      border: none;
      color: var(--navy);
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      padding: 0;
      font-family: var(--font-body);
    }
    .reveal-link:hover { text-decoration: underline; }

    /* ── Results ── */
    .results-summary {
      text-align: center;
      padding: 28px 0;
      border-bottom: 2px solid var(--border);
      margin-bottom: 24px;
    }
    .results-score {
      font-family: var(--font-heading);
      font-size: 3.5rem;
      font-weight: 700;
      color: var(--navy);
      line-height: 1;
      margin-bottom: 4px;
    }
    .results-score-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
    .results-detail-row {
      display: flex;
      justify-content: center;
      gap: 32px;
    }
    .results-detail-value { font-size: 1.25rem; font-weight: 700; }
    .results-detail-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

    /* ── Mistake Cards ── */
    .mistake-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 14px;
      margin-bottom: 10px;
    }
    .mistake-question { font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
    .mistake-answers { font-size: 0.85rem; line-height: 1.6; }
    .mistake-explanation { font-size: 0.83rem; color: var(--text-muted); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }

    /* ── Stats ── */
    .subject-breakdown { margin-bottom: 16px; }
    .subject-breakdown-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
    .subject-breakdown-name { font-weight: 600; font-size: 0.88rem; }
    .subject-breakdown-pct { font-weight: 700; font-size: 0.9rem; }
    .subject-breakdown-track {
      width: 100%;
      height: 6px;
      background: var(--border);
      border-radius: 3px;
      overflow: hidden;
    }
    .subject-breakdown-fill {
      height: 100%;
      border-radius: 3px;
      transition: width 0.4s ease;
    }
    .subject-breakdown-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

    /* ── Domain Dots ── */
    .domain-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }

    /* ── Streak ── */
    .streak { text-align: center; padding: 16px 0; }
    .streak-number { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--navy); }
    .streak-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
    .streak-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

    /* ── Weekly Chart ── */
    .weekly-chart {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      height: 100px;
      gap: 8px;
      padding: 0 4px;
    }
    .weekly-bar-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      height: 100%;
      justify-content: flex-end;
    }
    .weekly-bar-count { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
    .weekly-bar {
      width: 100%;
      max-width: 32px;
      background: var(--navy);
      border-radius: 2px 2px 0 0;
      min-height: 2px;
      transition: height 0.3s ease;
    }
    .weekly-bar-label { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }

    /* ── Score List ── */
    .score-list { list-style: none; }
    .score-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }
    .score-item:last-child { border-bottom: none; }
    .score-item-name { font-weight: 600; font-size: 0.88rem; }
    .score-item-date { font-size: 0.75rem; color: var(--text-muted); }
    .score-item-pct { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; }
    .score-item-questions { font-size: 0.72rem; color: var(--text-muted); text-align: right; }

    /* ── Settings ── */
    .settings-page { max-width: 480px; margin: 0 auto; }
    .settings-section {
      padding: 16px 0;
      border-bottom: 1px solid var(--border);
    }
    .settings-section-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px; }
    .settings-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      font-size: 0.9rem;
    }
    .settings-label { font-weight: 500; }
    .settings-value { color: var(--text-muted); font-size: 0.88rem; }
    .version-info { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding: 24px 0; }

    /* ── Recommendation Items ── */
    .rec-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.85rem;
    }
    .rec-item:last-child { border-bottom: none; }
    .rec-tag {
      font-size: 0.68rem;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 10px;
      color: #fff;
    }

    /* ── Recent Sessions ── */
    .session-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.85rem;
    }
    .session-item:last-child { border-bottom: none; }

    /* ── Countdown Card ── */
    .countdown-card {
      background: var(--navy);
      color: #fff;
      border-radius: var(--radius);
      padding: 16px;
      text-align: center;
      margin-bottom: 16px;
    }
    .countdown-days { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; }
    .countdown-label { font-size: 0.8rem; opacity: 0.8; }

    /* ── Utility ── */
    .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

    /* ── Responsive ── */
    @media (max-width: 420px) {
      .domain-grid { grid-template-columns: 1fr; }
      .results-detail-row { gap: 20px; }
      .results-score { font-size: 2.75rem; }
      h1 { font-size: 1.4rem; }
    }

/* ------------------------------------------------------------------ */
/* Pricing / upgrade page                                              */
/* ------------------------------------------------------------------ */
.pricing-page { max-width: 720px; margin: 0 auto; padding: 2rem 1rem; }
.pricing-header { text-align: center; margin-bottom: 1.75rem; }
.pricing-sub { color: #556; font-size: 1.02rem; }
.current-plan-badge {
  background: #e8f6ee; border: 1px solid #2d6a4f33; color: #1b4332;
  padding: 0.7rem 1rem; border-radius: var(--radius); text-align: center;
  margin-bottom: 1.5rem; font-weight: 600;
}
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
.plan-card {
  border: 1px solid #dde; border-radius: var(--radius);
  padding: 1.75rem; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.plan-highlight { border: 2px solid var(--navy); }
.plan-name { font-family: var(--font-heading); font-size: 1.3rem; color: var(--navy); margin-bottom: 0.5rem; }
.plan-price { font-size: 2.2rem; font-weight: 700; color: var(--ink, #222); margin-bottom: 1rem; }
.plan-period { font-size: 0.95rem; font-weight: 400; color: #667; }
.plan-features { margin: 0 0 1.25rem; padding-left: 1.25rem; color: #334; line-height: 1.7; }
.plan-cta { margin-top: 0.25rem; }
.plan-cta:disabled { opacity: 0.55; cursor: not-allowed; }
.pricing-note { text-align: center; color: #667; font-size: 0.92rem; margin: 0.5rem 0; }
.pricing-note a { color: var(--navy); }

.pricing-note a { color: var(--navy); }

/* Free-access banner */
.launch-banner {
  border: 1px solid var(--navy);
  background: #F0F4F8;
  color: var(--navy);
  padding: 0.85rem 1.1rem;
  margin: 0 auto 1.4rem;
  max-width: 640px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.55;
}
.launch-banner strong { text-transform: uppercase; letter-spacing: 0.06em; }

/* ══════════════════════════════════════════════════════════════════
   Template A (app.css — navy/gold SaaS) — loaded SECOND so it wins the cascade.
   ══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   Tupelo Honey Nursing Prep — Template A shell (navy/gold light SaaS)
   Loaded AFTER the base stylesheet / inline styles so shell overrides win.
   Desktop-first: fixed sidebar + sticky top bar; mobile drawer.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --a-navy-50:  #EEF3F8;
  --a-navy-100: #DCE6F0;
  --a-navy-300: #8FB0CF;
  --a-navy-500: #2E5A8F;
  --a-navy-600: #1B3A5C;   /* primary */
  --a-navy-700: #142C47;
  --a-navy-800: #0F2136;
  --a-gold-300: #FCD34D;
  --a-gold-400: #FBBF24;
  --a-gold-500: #D97706;
  --a-gold-600: #B45309;
  --a-gray-50:  #F9FAFB;
  --a-gray-100: #F3F4F6;
  --a-gray-200: #E5E7EB;
  --a-gray-300: #D1D5DB;
  --a-gray-400: #9CA3AF;
  --a-gray-500: #6B7280;
  --a-gray-600: #4B5563;
  --a-gray-700: #374151;
  --a-gray-800: #1F2937;
  --a-gray-900: #111827;
  --a-green-500: #10B981;
  --a-green-600: #059669;
  --a-red-500: #EF4444;
  --a-amber-500: #F59E0B;
  --a-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --a-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --a-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --a-radius: 12px;

  /* Legacy semantic vars remapped to A palette — templates use var(--correct),
     var(--wrong), var(--warning), var(--font-heading) inline; legacy.css defines
     them as forest/burgundy/brown/serif. Redeclaring here (app.css loads AFTER
     legacy.css) makes every inline var() resolve to Template A colors/fonts. */
  --correct:     var(--a-green-600);   /* was #1B4332 forest  */
  --wrong:       var(--a-red-500);     /* was #6B2737 burgundy */
  --warning:     var(--a-amber-500);   /* was #7F4F24 brown    */
  --font-heading: var(--a-font);       /* was Libre Baskerville */
  --navy:        var(--a-navy-600);    /* was #1B3A5C (identical) */
  --border:      var(--a-gray-200);    /* was #e0ddd8 warm border */
  --card:        #ffffff;              /* was #ffffff (identical) */
  --text-muted:  var(--a-gray-500);    /* was #5a5a5a */
  --bg:          var(--a-gray-100);    /* was #FAFAF7 cream */
  --surface:        #ffffff;
  --text-secondary: var(--a-gray-500);
  --radius:        var(--a-radius);    /* was 4px editorial — unify to Template A */
}

/* ——— Global overrides (A look everywhere) ——— */
body.a-shell { background: var(--a-gray-100); }
.a-shell h1, .a-shell h2, .a-shell h3,
.a-shell .topbar-brand, .a-shell .brand-name,
.a-shell .countdown-days {
  font-family: var(--a-font) !important;
  letter-spacing: -0.02em;
}
.a-shell a:not([class*="btn"]) { color: var(--a-navy-600); }
.a-shell .app-body { max-width: 1200px; }

/* ——— Shell layout ——— */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 252px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--a-gray-200);
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  transform: translateX(-100%);
  transition: transform .25s ease;
}
@media (min-width: 1024px) {
  .sidebar { position: sticky; top: 0; height: 100vh; transform: none; }
}
.sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(15,23,42,.4); }
@media (min-width: 1024px) { .sidebar.open { box-shadow: none; } }

.sidebar-overlay { display: none; }
@media (max-width: 1023.98px) {
  .sidebar.open + .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15,23,42,.4); }
}

/* Brand */
.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--a-gray-100);
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--a-navy-600); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
.logo-mark svg { width: 19px; height: 19px; }
.logo-mark .gold-dot {
  position: absolute; top: -3px; right: -3px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--a-gold-400);
  border: 2px solid #fff;
}
.brand-name { font-size: 15px; font-weight: 800; color: var(--a-gray-900); line-height: 1.2; }
.brand-sub { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--a-gray-400); font-weight: 600; }

/* Nav */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px 12px; }
.nav-group { margin-bottom: 20px; }
.nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--a-gray-400); padding: 0 10px; margin-bottom: 6px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--a-gray-600); font-size: 13.5px; font-weight: 500;
  text-decoration: none; margin-bottom: 1px;
  transition: background .12s, color .12s;
}
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--a-gray-400); }
.nav-link:hover { background: var(--a-gray-50); color: var(--a-gray-900); text-decoration: none; }
.nav-link.active { background: var(--a-navy-600); color: #fff; }
.nav-link.active svg { color: #fff; }
.nav-link .nav-pct { margin-left: auto; font-size: 12px; font-weight: 700; }
.nav-link .nav-pct.ok { color: var(--a-green-500); }
.nav-link .nav-pct.mid { color: var(--a-navy-500); }
.nav-link .nav-pct.warn { color: var(--a-gold-600); }

/* AI Tutor availability — greyed out until an LLM is wired */
.nav-link--offline { opacity: 0.45; }
.nav-link--offline:hover { background: transparent; color: var(--a-gray-600); }
.nav-offline-badge { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--a-gray-200); color: var(--a-gray-500); padding: 2px 6px; border-radius: 999px; }
.tutor-offline-banner { background: var(--a-gray-100); border: 1px solid var(--a-gray-200); color: var(--a-gray-500); border-radius: var(--a-radius); padding: 12px 16px; font-size: 13.5px; margin-bottom: 14px; }

/* Dashboard — the single "what should I do now" step */
.next-action {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--a-navy-50);
  border: 1px solid var(--a-navy-100);
  border-left: 4px solid var(--a-gold-400);
  border-radius: var(--a-radius);
  padding: 16px 20px;
  margin: 4px 0 16px;
}
.next-action-body { flex: 1; min-width: 220px; }
.next-action-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--a-gold-600); margin-bottom: 4px; }
.next-action-title { font-size: 16.5px; font-weight: 700; color: var(--a-navy-700); line-height: 1.3; }
.next-action-detail { font-size: 13px; color: var(--a-gray-500); margin-top: 3px; }
.next-action .btn-a { flex-shrink: 0; }

/* Path indicator — where the student is in the loop */
.path-track {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 0 12px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius);
  overflow-x: auto;
}
.path-step { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.path-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--a-gray-100); color: var(--a-gray-400);
  border: 1px solid var(--a-gray-200);
}
.path-step.is-current .path-dot { background: var(--a-navy-600); color: #fff; border-color: var(--a-navy-600); }
.path-step.is-done .path-dot { background: var(--a-green-500); color: #fff; border-color: var(--a-green-500); }
.path-label { font-size: 12.5px; font-weight: 600; color: var(--a-gray-400); white-space: nowrap; }
.path-step.is-current .path-label { color: var(--a-navy-700); font-weight: 700; }
.path-step.is-done .path-label { color: var(--a-gray-500); }
.path-connector { width: 16px; height: 1px; background: var(--a-gray-300); flex-shrink: 0; }
.nav-badge {
  margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 999px;
  background: var(--a-gold-400); color: #fff;
}

/* Sidebar footer: plan + user */
.sidebar-foot { padding: 14px; border-top: 1px solid var(--a-gray-100); }
.plan-card {
  background: var(--a-navy-600); border-radius: var(--a-radius);
  padding: 13px 14px; color: #fff;
}
.plan-card .plan-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.plan-card .plan-title svg { width: 14px; height: 14px; color: var(--a-gold-400); }
.plan-card .plan-status {
  margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .06em;
  color: #A7F3D0; background: rgba(16,185,129,.15);
  border: 1px solid rgba(16,185,129,.3); padding: 1px 7px; border-radius: 999px;
}
.plan-card p { color: rgba(255,255,255,.75); font-size: 11.5px; line-height: 1.45; margin-top: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 4px 0; }
.side-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--a-gray-200); color: var(--a-navy-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.side-user .who { font-size: 13px; font-weight: 600; color: var(--a-gray-800); line-height: 1.2; }
.side-user .email { font-size: 11px; color: var(--a-gray-400); }

/* ——— Main column ——— */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: 60px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--a-gray-200);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
}
.topbar .menu-btn { display: none; }
@media (max-width: 1023.98px) { .topbar .menu-btn { display: inline-flex; } }
.menu-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--a-gray-200);
  background: #fff; color: var(--a-gray-600); align-items: center; justify-content: center;
  cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }
.crumb { font-size: 13px; color: var(--a-gray-500); }
.crumb b { color: var(--a-gray-800); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.exam-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--a-navy-600); color: #fff;
  border-radius: 999px; padding: 5px 14px;
  font-size: 12.5px; font-weight: 600;
}
.exam-pill svg { width: 14px; height: 14px; color: var(--a-gold-400); }
.exam-pill .sep { color: rgba(255,255,255,.55); font-weight: 400; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--a-gray-200);
  background: #fff; color: var(--a-gray-500); display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }

/* ——— Page furniture (Template A dashboard) ——— */
.a-page { padding: 28px 28px 56px; }
.a-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.a-heading h1 { font-size: 26px; font-weight: 800; color: var(--a-gray-900); }
.a-heading .lede { color: var(--a-gray-500); font-size: 13.5px; margin-top: 3px; }
.a-actions { display: flex; gap: 10px; }

.btn-a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; border-radius: 9px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.btn-a:hover { text-decoration: none; }
.btn-a-primary { background: var(--a-navy-600); color: #fff; }
.btn-a-primary:hover { background: var(--a-navy-700); }
.btn-a-ghost { background: #fff; color: var(--a-gray-700); border-color: var(--a-gray-200); }
.btn-a-ghost:hover { border-color: var(--a-gray-300); }
.btn-a-gold { background: var(--a-gold-500); color: #fff; }
.btn-a-gold:hover { background: var(--a-gold-600); }
.btn-a-block { width: 100%; justify-content: center; }

.a-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 1100px) { .a-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .a-cards { grid-template-columns: 1fr; } }
.a-card {
  background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius);
  box-shadow: var(--a-shadow-sm); padding: 18px;
}
.a-card .ic-row { display: flex; align-items: center; justify-content: space-between; }
.a-chip-icon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.a-chip-icon svg { width: 17px; height: 17px; }
.ic-navy { background: var(--a-navy-50); color: var(--a-navy-600); }
.ic-gold { background: #FEF3C7; color: var(--a-gold-600); }
.ic-green { background: #D1FAE5; color: var(--a-green-600); }
.ic-red { background: #FEE2E2; color: var(--a-red-500); }
.a-tag { font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; }
.a-tag.green { background: #D1FAE5; color: var(--a-green-600); }
.a-tag.gold { background: #FEF3C7; color: var(--a-gold-600); }
.a-card .c-label { margin-top: 14px; font-size: 12px; color: var(--a-gray-500); font-weight: 500; }
.a-card .c-value { font-size: 24px; font-weight: 800; color: var(--a-gray-900); letter-spacing: -.01em; margin-top: 1px; }
.a-card .c-value small { font-size: 13px; font-weight: 600; color: var(--a-gray-400); }
.a-card .c-sub { font-size: 12px; color: var(--a-gray-400); margin-top: 4px; }
.a-card .c-sub .up { color: var(--a-green-600); font-weight: 600; }
.a-track { height: 6px; border-radius: 999px; background: var(--a-gray-100); margin-top: 12px; overflow: hidden; }
.a-track i { display: block; height: 100%; border-radius: 999px; background: var(--a-navy-500); }

.a-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.a-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.a-col2 { grid-column: span 2; }
@media (max-width: 1000px) { .a-grid2, .a-grid4 { grid-template-columns: 1fr; } .a-col2 { grid-column: span 1; } }

.a-panel { background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm); }
.a-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--a-gray-100); }
.a-panel-head h2 { font-size: 15px !important; font-weight: 700; color: var(--a-gray-800); margin: 0; }
.a-panel-head .hint { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--a-gray-400); }
.a-panel-head a.link { font-size: 12.5px; font-weight: 600; color: var(--a-navy-600); }
.a-panel-head a.link:hover { text-decoration: underline; }

/* subject rows */
.a-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--a-gray-100); }
.a-row:last-child { border-bottom: none; }
.a-row .r-name { font-weight: 600; font-size: 14px; color: var(--a-gray-800); width: 210px; flex-shrink: 0; display: flex; align-items: center; gap: 9px; }
.a-row .r-name .dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.a-row .r-track { flex: 1; height: 6px; border-radius: 999px; background: var(--a-gray-100); overflow: hidden; }
.a-row .r-track i { display: block; height: 100%; border-radius: 999px; }
.a-row .r-pct { width: 48px; text-align: right; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.a-row .r-delta { width: 60px; text-align: right; font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* weak list */
.a-weak { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--a-gray-100); }
.a-weak:last-child { border-bottom: none; }
.a-weak .idx { font-size: 11px; font-weight: 700; color: var(--a-gray-400); width: 18px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.a-weak .w-body { flex: 1; min-width: 0; }
.a-weak .w-body .t { font-size: 13.5px; font-weight: 600; color: var(--a-gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-weak .w-body .m { font-size: 11.5px; color: var(--a-gray-400); margin-top: 1px; }
.a-weak .w-body .m b { font-weight: 700; }
.a-weak a { font-size: 12.5px; font-weight: 600; color: var(--a-navy-600); white-space: nowrap; }
.a-weak a:hover { text-decoration: underline; }

/* simple bar chart */
.a-bars { display: flex; align-items: flex-end; gap: 5px; height: 84px; padding: 16px 18px 4px; }
.a-bars .b { flex: 1; border-radius: 2px 2px 0 0; background: var(--a-gray-200); }
.a-bars .b.hot { background: var(--a-gold-500); }
.a-bars .b.on { background: var(--a-navy-300); }
.a-xlab { display: flex; justify-content: space-between; padding: 6px 18px 14px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--a-gray-400); }
.a-note { padding: 0 18px 16px; font-size: 12px; color: var(--a-gray-500); }
.a-note b { color: var(--a-green-600); }

/* readiness ring (reuse inline classes but widen) */
.a-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0 2px; }
.a-ring-wrap .ring-cap { font-size: 12px; color: var(--a-gray-500); }

/* big CTA band */
.a-cta { border-radius: var(--a-radius); padding: 20px 22px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(100deg, var(--a-navy-600), var(--a-navy-800)); color: #fff; }
.a-cta .cta-title { font-size: 16px; font-weight: 800; }
.a-cta .cta-sub { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 2px; }
.a-cta .btn-a-gold { background: var(--a-gold-400); color: var(--a-navy-800); }
.a-cta .btn-a-gold:hover { background: var(--a-gold-300); }

/* tables (recent sessions in A) */
.a-table { width: 100%; border-collapse: collapse; }
.a-table th { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--a-gray-400); text-align: left; padding: 10px 18px; border-bottom: 1px solid var(--a-gray-200); }
.a-table td { padding: 12px 18px; border-bottom: 1px solid var(--a-gray-100); font-size: 13.5px; vertical-align: middle; }
.a-table tr:last-child td { border-bottom: none; }
.a-table .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.verdict-a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12.5px; }
.verdict-a::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.verdict-a.ok { color: var(--a-green-600); } .verdict-a.ok::before { background: var(--a-green-500); }
.verdict-a.warn { color: var(--a-gold-600); } .verdict-a.warn::before { background: var(--a-amber-500); }
.verdict-a.fail { color: var(--a-red-500); } .verdict-a.fail::before { background: var(--a-red-500); }
.a-subj-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--a-navy-50); color: var(--a-navy-600); }

.a-foot { margin-top: 18px; border-top: 1px solid var(--a-gray-200); padding-top: 14px; display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--a-gray-400); font-weight: 600; }

/* Auth pages: center a narrow column */
body.auth-page .app-body { max-width: 460px; }

/* ── Standalone (no app shell) surfaces ──
   Auth pages + assessment flow pages (question/answer/results screens)
   render WITHOUT sidebar/topbar. Content centers in a narrow column. */
body.standalone { background: var(--a-gray-100); }
body.standalone .app-body {
  max-width: 720px; margin: 0 auto;
  padding: 40px 20px 60px;
}
body.standalone.auth-standalone .app-body {
  max-width: 440px; padding-top: 60px;
}
body.standalone .standalone-wrap { min-height: 100vh; }
body.standalone .flash-messages { max-width: 720px !important; margin: 12px auto 0; }
body.standalone .auth-card { margin-top: 8px; }
body.standalone .auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 0 4px;
}

.auth-logo-link { display: flex; align-items: center; gap: 14px; line-height: 1; text-decoration: none; }
.auth-logo-icon { height: 90px; width: auto; flex: none; }
.auth-logo-word { display: flex; flex-direction: column; gap: 3px; }
.auth-logo-name { font-weight: 800; font-size: 28px; letter-spacing: -0.01em; color: #1B3A5C; text-align: center; }
.auth-logo-sub { font-weight: 600; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: #f58220; text-align: center; }
/* Standalone pages should not offer the sidebar toggle */
body.standalone .menu-btn, body.standalone .sidebar-overlay { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   Template A — component skin (legacy classes → A language)
   Loaded last: overrides editorial component styles app-wide.
   ═══════════════════════════════════════════════════════════════ */

/* Wrappers + type */
.container { max-width: 1000px; }
.section-title {
  font-size: 15px !important; font-weight: 700; color: var(--a-gray-800);
  margin: 22px 0 12px; letter-spacing: -0.01em;
}
.subtitle { color: var(--a-gray-500); }
.card {
  background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius);
  box-shadow: var(--a-shadow-sm); padding: 18px;
}

/* Buttons */
.btn, .btn-lg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 9px; font-size: 14px; font-weight: 600;
  font-family: var(--a-font); line-height: 1.2; cursor: pointer; border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s; text-decoration: none;
}
.btn:hover, .btn-lg:hover { text-decoration: none; filter: none; }
.btn-primary, .submit-btn {
  background: var(--a-navy-600); color: #fff;
}
.btn-primary:hover, .submit-btn:hover { background: var(--a-navy-700); color: #fff; }
.btn-secondary, .btn-ghost {
  background: #fff; color: var(--a-gray-700); border-color: var(--a-gray-200);
}
.btn-secondary:hover, .btn-ghost:hover { border-color: var(--a-gray-300); color: var(--a-gray-900); }
.btn-full { width: 100%; }
.btn:disabled, .btn-lg:disabled { opacity: .55; cursor: not-allowed; }

/* Forms */
.form-group label { font-weight: 600; color: var(--a-gray-700); font-size: 13px; margin-bottom: 5px; display: inline-block; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], select, textarea {
  width: 100%; padding: 10px 13px; font-size: 14px; font-family: var(--a-font);
  color: var(--a-gray-800); background: #fff;
  border: 1px solid var(--a-gray-300); border-radius: 9px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--a-navy-500); box-shadow: 0 0 0 3px rgba(27, 58, 92, .12); }

/* Links + muted text */
.text-muted { color: var(--a-gray-500) !important; }
.text-correct { color: var(--a-green-600) !important; }
.text-wrong { color: var(--a-red-500) !important; }
.text-warning { color: var(--a-gold-600) !important; }
.link { color: var(--a-navy-600); font-weight: 600; }

/* Auth */
.auth-card {
  background: #fff; border: 1px solid var(--a-gray-200); border-radius: 14px;
  box-shadow: var(--a-shadow); padding: 30px 28px; margin-top: 30px;
}
.auth-card h1, .auth-card h2 { font-size: 22px; font-weight: 800; color: var(--a-gray-900); }
.auth-link { color: var(--a-navy-600); font-weight: 600; }

/* Quiz flow */
.progress-bar-track {
  height: 8px; border-radius: 999px; background: var(--a-gray-100); overflow: hidden;
}
.progress-bar-track > div, .progress-bar-track i, .progress-fill { background: var(--a-navy-500) !important; border-radius: 999px; height: 100%; }
.choice-letter {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; background: var(--a-gray-100); color: var(--a-gray-600);
}
.breakdown-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.breakdown-reason { background: var(--a-gray-50); border-left: 3px solid var(--a-gray-200); border-radius: 0 8px 8px 0; padding: 10px 12px; font-size: 13px; color: var(--a-gray-600); }
.breakdown-reason.correct { border-color: var(--a-green-500); }
.breakdown-reason.wrong { border-color: var(--a-red-500); }
.domain-chip, .suggestion-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--a-navy-50); color: var(--a-navy-600); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; font-weight: 600;
}

/* Results */
.results-score { color: var(--a-navy-700); font-size: 4rem; font-weight: 800; }
.results-summary, .results-detail-row { border: 1px solid var(--a-gray-200); border-radius: var(--a-radius); background: #fff; box-shadow: var(--a-shadow-sm); }
.results-detail-label { color: var(--a-gray-500); font-size: 12px; font-weight: 600; }
.results-detail-value { color: var(--a-gray-800); font-weight: 700; font-size: 16px; }
.mistake-card, .mistake-question { background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm); }
.mistake-answers { border-top: 1px solid var(--a-gray-100); }

/* Stats */
.stat-card {
  background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius);
  box-shadow: var(--a-shadow-sm); padding: 16px 18px;
}
.stat-value { font-size: 24px; font-weight: 800; color: var(--a-gray-900); }
.stat-label { color: var(--a-gray-500); font-size: 12px; }

/* Settings */
.settings-section { background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm); padding: 20px; margin-bottom: 18px; }
.settings-section-title { font-size: 15px; font-weight: 700; color: var(--a-gray-800); }
.settings-row { border-top: 1px solid var(--a-gray-100); padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings-label { font-weight: 600; color: var(--a-gray-700); font-size: 13.5px; }
.settings-value { color: var(--a-gray-500); font-size: 13.5px; }

/* Tutor */
.tutor-tab { border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; color: var(--a-gray-600); }
.tutor-tab.active { background: var(--a-navy-50); color: var(--a-navy-700); }
.tab-content { background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm); padding: 18px; }
.confidence-dot { border-color: var(--a-gray-300); }

/* Misc chips/cards on diagnostic & stimulus pages */
.pa-card, .stimulus-card { background: #fff; border: 1px solid var(--a-gray-200); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm); padding: 18px; }
.pa-empty, .pa-note { color: var(--a-gray-500); }

/* ── ID/specificity cleanups (beat legacy.css) ─────────────────── */
#submit-btn:disabled, .submit-btn:disabled {
  background: var(--a-navy-600) !important; color: #fff !important; opacity: .55; cursor: not-allowed;
}
#submit-btn:not(:disabled) { opacity: 1; cursor: pointer; }

/* ── Pricing page: 3-tier cards (Step 2) ────────────────────────── */
.pricing-page { max-width: 980px; }
.pricing-page .pricing-header { margin-bottom: 2rem; }
.tier-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px; align-items: stretch; margin-bottom: 1.5rem;
}
.tier-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--a-gray-200);
  border-radius: var(--a-radius); padding: 22px 22px 20px;
  box-shadow: var(--a-shadow-sm);
}
.tier-card.is-featured { border: 2px solid var(--a-navy-600); box-shadow: var(--a-shadow); }
.tier-name { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--a-gray-500); }
.tier-price { font-size: 34px; font-weight: 800; color: var(--a-navy-700); margin: 4px 0 2px; line-height: 1.1; }
.tier-period { color: var(--a-gray-400); font-size: 13px; margin-bottom: 16px; min-height: 18px; }
.tier-features { flex: 1; margin: 0 0 20px; padding-left: 18px; color: var(--a-gray-600); font-size: 14px; line-height: 1.6; }
.tier-features li { margin-bottom: 4px; }
.tier-cta {
  display: block; width: 100%; text-align: center; box-sizing: border-box;
  padding: 11px 14px; border-radius: 10px; text-decoration: none;
  font-size: 14.5px; font-weight: 700; border: 1px solid var(--a-gray-200);
  background: var(--a-gray-100); color: var(--a-gray-500);
  cursor: not-allowed; opacity: .85;
}
.tier-cta--go { background: var(--a-navy-600); border-color: var(--a-navy-600); color: #fff; cursor: pointer; opacity: 1; }
.tier-cta--go:hover { background: var(--a-navy-700); color: #fff; text-decoration: none; }
.tier-flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--a-gold-400); color: var(--a-navy-800);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.tier-current {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  background: var(--a-green-600); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
}
.current-plan-badge { border-color: #2d6a4f33; }

/* ---------------------------------------------------------------------------
   Study Coach  (.sc-*)
   Namespaced on purpose: app.css already claims .card, .a-panel, .stat-card,
   .progress-bar-track, .plan-card and friends for other components, and
   reusing any of them here renders wrong on this page. Loaded last, so it wins
   for its own names only.
   --------------------------------------------------------------------------- */

.sc-page { max-width: 1040px; }

.sc-head { margin: 0 0 18px; }
.sc-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 26px; line-height: 1.2; color: #1B3A5C; margin: 0 0 6px;
}
.sc-sub { color: #4A5568; font-size: 14.5px; line-height: 1.55; margin: 0; max-width: 60ch; }

.sc-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
@media (max-width: 860px) { .sc-grid { grid-template-columns: 1fr; } }

.sc-panel {
  background: #fff; border: 1px solid #E2E5EA; border-radius: 14px;
  padding: 18px 20px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.sc-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin: 0 0 12px; flex-wrap: wrap;
}
.sc-panel-head h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 17.5px; color: #1B3A5C; margin: 0;
}

.sc-chip {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  color: #7A4F01; background: #FDF3D7; border: 1px solid #F5DE9B;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.sc-chip--quiet { color: #4A5568; background: #F4F5F7; border-color: #E2E5EA; font-weight: 500; }

.sc-blocks { list-style: none; margin: 0; padding: 0; }
.sc-block {
  display: grid; grid-template-columns: 66px 1fr; gap: 4px 12px;
  padding: 11px 0; border-top: 1px solid #EEF0F3;
}
.sc-block:first-child { border-top: 0; }
.sc-kind {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #1B3A5C; background: #EEF2F7; border-radius: 5px;
  padding: 3px 0; text-align: center; align-self: start;
}
.sc-block--timed .sc-kind { color: #7A4F01; background: #FDF3D7; }
.sc-block--new .sc-kind { color: #1B4332; background: #E6F0EA; }
.sc-block-text { font-size: 14.5px; color: #1F2937; line-height: 1.45; }
.sc-topic { grid-column: 2; font-size: 12.5px; color: #6B7280; }

.sc-empty { color: #4A5568; font-size: 14px; margin: 0 0 12px; }
.sc-cta-row { margin: 0; }

.sc-range {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 20px; color: #1B3A5C; margin: 0 0 2px;
}
.sc-range--empty { font-size: 15px; font-family: inherit; color: #4A5568; }
.sc-pass { font-size: 12.5px; color: #6B7280; margin: 0 0 12px; }
.sc-meter {
  height: 9px; background: #EDF0F4; border-radius: 999px; overflow: hidden; margin: 0 0 8px;
}
.sc-meter-fill { display: block; height: 100%; background: #FBBF24; border-radius: 999px; }
.sc-band { font-size: 14px; font-weight: 600; color: #1F2937; margin: 0 0 6px; }
.sc-note { font-size: 12.5px; color: #6B7280; line-height: 1.5; margin: 6px 0 0; }
.sc-note a { color: #1B3A5C; text-decoration: underline; }

.sc-read-title {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 16px; color: #1F2937; margin: 0 0 3px;
}
.sc-read-meta { font-size: 12.5px; color: #6B7280; margin: 0 0 10px; }
.sc-read-then { font-size: 14px; color: #1F2937; margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.sc-rows { list-style: none; margin: 0; padding: 0; }
.sc-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid #EEF0F3; font-size: 13.5px;
}
.sc-row:first-child { border-top: 0; }
.sc-code { font-size: 12.5px; color: #1B3A5C; background: #F4F6F9; padding: 2px 6px; border-radius: 5px; }
.sc-miss { color: #8A2B2B; font-weight: 600; }
.sc-att { color: #6B7280; font-size: 12.5px; }

.sc-attrib {
  font-size: 11.5px; color: #8A93A0; line-height: 1.6; margin: 6px 0 0;
  border-top: 1px solid #EEF0F3; padding-top: 12px;
}
.sc-attrib a { color: #8A93A0; text-decoration: underline; }

/* ---------------------------------------------------------------------------
   Per-answer coach note  (.coach-note-*)
   Names the misconception behind a wrong answer, or the shaky footing behind a
   lucky one. Distinct from .sc-* (the Study Coach page) on purpose: this renders
   inside the question shell, so it stays narrow and does not set its own layout.
   --------------------------------------------------------------------------- */
.coach-note {
  border: 1px solid #E2E8F0;
  border-left: 4px solid var(--navy);
  background: #F8FAFC;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.coach-note-misconception { border-left-color: #B45309; background: #FFFBEB; border-color: #FDE68A; }
.coach-note-gap           { border-left-color: var(--navy); }
.coach-note-fragile       { border-left-color: #94A3B8; }
.coach-note-head { margin-bottom: 10px; }
.coach-note-title {
  display: block;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.4;
  color: #14283F;
}
.coach-note-misconception .coach-note-title { color: #7C2D12; }
.coach-note-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
}
.coach-note-row { margin-top: 10px; }
.coach-note-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 3px;
}
.coach-note-text {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.6;
  color: #1E293B;
}
.coach-note-generic {
  margin: 10px 0 0;
  font-size: 0.88rem;
  font-style: italic;
  color: #64748B;
}
.coach-note-read {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid #E2E8F0;
  font-size: 0.9rem;
  color: #334155;
}
.coach-note-read strong { color: #14283F; }
