/* Assessment Suite — Frontend Styles v2 */
:root {
  --as-primary: #2563eb;
  --as-border:  #e5e7eb;
  --as-bg:      #f9fafb;
  --as-text:    #111827;
  --as-muted:   #6b7280;
  --as-radius:  10px;
  --as-shadow:  0 2px 16px rgba(0,0,0,.07);
}

.as-survey {
  font-family: var(--as-font-family, Georgia, serif);
  color: var(--as-text);
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 60px;
  border-radius: var(--as-survey-card-radius, var(--as-radius));
}

/* Loading */
.as-survey__loading { text-align:center; padding:40px; }
.as-spinner { display:inline-block; width:28px; height:28px; border:3px solid var(--as-border); border-top-color:var(--as-section-title-color,var(--as-primary)); border-radius:50%; animation:as-spin .7s linear infinite; }
@keyframes as-spin { to { transform:rotate(360deg); } }

/* Header */
.as-survey__header { text-align:center; padding:32px 24px 24px; border-bottom:1px solid var(--as-border); margin-bottom:28px; }
.as-survey__title { font-size:24px; font-weight:700; margin:0 0 8px; }
.as-survey__description { font-size:var(--as-survey-desc-size,14px); color:var(--as-survey-desc-color,var(--as-muted)); margin:0; line-height:1.5; }

/* Progress */
.as-survey__progress { margin-bottom:24px; }
.as-survey__progress-track { height:5px; background:var(--as-border); border-radius:3px; overflow:hidden; margin-bottom:6px; }
.as-survey__progress-fill { height:100%; background:var(--as-progress-fill,var(--as-primary)); border-radius:3px; transition:width .4s ease; }
.as-survey__progress-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.as-survey__progress-section { font-size:12px; font-weight:600; color:var(--as-muted); text-transform:uppercase; letter-spacing:.05em; }
.as-survey__progress-pct { font-size:12px; color:var(--as-muted); flex-shrink:0; margin-left:12px; }

/* Section */
.as-section { margin-bottom:28px; }
.as-section__header { margin-bottom:16px; }
.as-section__title { font-size:18px; font-weight:700; margin:0 0 5px; color:var(--as-primary); }
.as-section__description { font-size:14px; color:var(--as-muted); margin:0; line-height:1.5; }

/* Question section label (one-per-page mode) */
.as-question-section-label { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--as-section-tag-color,var(--as-primary)); background:var(--as-section-tag-bg,rgba(37,99,235,.07)); display:inline-block; padding:3px 10px; border-radius:20px; margin-bottom:14px; }

/* Scale legend */
.as-scale-legend { display:none; gap:0; border:1px solid var(--as-border); border-radius:8px; overflow:hidden; margin-bottom:20px; background:var(--as-bg); }
.as-scale-legend__item { flex:1; text-align:center; padding:7px 4px; border-right:1px solid var(--as-border); font-size:12px; color:var(--as-muted); }
.as-scale-legend__item:last-child { border-right:none; }
.as-scale-legend__item strong { display:block; font-size:14px; color:var(--as-text); }
.as-scale-legend__item em { display:block; font-style:normal; font-size:10px; margin-top:1px; line-height:1.2; }

/* Question */
.as-question { padding:16px 0; border-bottom:1px solid var(--as-border); }
.as-question:last-child { border-bottom:none; }
.as-question__prompt { display:flex; gap:8px; margin-bottom:12px; align-items:flex-start; }
.as-question__num { font-size:11px; font-weight:700; color:var(--as-bubble-color,var(--as-primary)); background:var(--as-bubble-bg,rgba(37,99,235,.1)); width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; }
.as-question__text { font-size:15px; line-height:1.55; }

/* Likert */
.as-likert-row { display:flex; gap:6px; padding:4px; border-radius:8px; transition:background .2s; }
.as-likert-row.as-error { background:#fef2f2; outline:2px solid #f87171; }
.as-likert-option { flex:1; }
.as-likert-radio { position:absolute; opacity:0; width:0; height:0; }
.as-likert-btn { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:10px 4px; border:1.5px solid var(--as-border); border-radius:8px; cursor:pointer; transition:all .15s; background:#fff; min-height:52px; text-align:center; user-select:none; }
.as-likert-btn:hover { border-color:var(--as-likert-hover-border,var(--as-primary)); background:var(--as-likert-hover-bg,#eff6ff); }
.as-likert-radio:checked + .as-likert-btn { border-color:var(--as-likert-selected-border,var(--as-primary)); background:var(--as-likert-selected-bg,var(--as-primary)); color:var(--as-likert-selected-color,#fff); }
.as-likert-num { font-size:15px; font-weight:700; line-height:1; }
.as-likert-label { font-size:var(--as-answer-size, 9px); line-height:1.2; opacity:.8; max-width:52px; }

/* Contact step */
.as-contact-step { padding:20px 0; }
.as-contact-fields { max-width:380px; display:flex; flex-direction:column; gap:14px; margin-top:20px; }
.as-contact-name-row { display:flex; gap:12px; }
.as-contact-name-row .as-field { flex:1; min-width:0; }
.as-field { display:flex; flex-direction:column; gap:5px; }
.as-field label { font-size:13px; font-weight:600; }
.as-field-input { padding:9px 12px; border:1.5px solid var(--as-border); border-radius:8px; font-size:14px; font-family:inherit; transition:border-color .15s; }
.as-field-input:focus { outline:none; border-color:var(--as-primary); box-shadow:0 0 0 3px rgba(37,99,235,.1); }
.as-field-note { font-size:11px; color:var(--as-muted); margin:0; }
.as-optional { font-size:11px; color:var(--as-muted); font-weight:400; }

/* Nav */
.as-survey__nav { display:flex; justify-content:space-between; align-items:center; padding:24px 0 0; border-top:1px solid var(--as-border); margin-top:8px; }
.as-nav-right { display:flex; gap:10px; }
.as-btn { display:inline-flex; align-items:center; gap:6px; padding:11px 22px; border-radius:8px; font-size:14px; font-weight:600; font-family:inherit; cursor:pointer; border:1.5px solid transparent; transition:all .15s; line-height:1; }
.as-btn--primary { background:var(--as-primary); color:#fff; border-color:var(--as-primary); }
.as-btn--primary:hover { filter:brightness(1.08); }
.as-btn--ghost { background:transparent; color:var(--as-muted); border-color:var(--as-border); }
.as-btn--ghost:hover { background:var(--as-bg); }
.as-btn--secondary { background:transparent; color:var(--as-results-link-color,var(--as-nav-btn,var(--as-primary))); border-color:var(--as-results-link-color,var(--as-nav-btn,var(--as-primary))); }
.as-btn--secondary:hover { background:var(--as-bg); }
.as-btn--locked-secondary { background:transparent; color:currentColor; border-color:currentColor; }
.as-btn--locked-secondary:hover { opacity:.75; }
.as-btn:disabled { opacity:.6; cursor:not-allowed; }
.as-locked__actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:16px; }

/* Error */
.as-survey__error { margin-top:12px; padding:10px 14px; background:#fef2f2; border:1px solid #fca5a5; border-radius:8px; color:#dc2626; font-size:14px; }
.as-error-msg { display:none; }

/* Results */
.as-survey__results { padding:4px 0; max-width: 1060px; margin: 0 auto; }

/* Full results page (shortcode) — wider canvas for report feel */
.as-results-page {
  font-family: var(--as-font-family, Georgia, serif);
  color: var(--as-text);
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.as-results__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 32px 28px 28px;
  border-bottom: 2px solid var(--as-border);
  margin-bottom: 32px;
  border-radius: var(--as-results-header-radius, 0px);
}
.as-results__header-text { flex: 1; min-width: 0; }
.as-results__title { font-size: var(--as-results-title-size, 36px); font-weight: 800; margin: 0 0 6px; line-height: 1.15; letter-spacing: -.01em; }
.as-results__subtitle { font-size: var(--as-results-subtitle-size, 15px); color: var(--as-results-subtitle-color, var(--as-muted)); margin: 0 0 4px; }
.as-results__name { font-size: var(--as-results-subtitle-size, 15px); font-weight: 600; color: var(--as-results-subtitle-color, var(--as-text)); margin: 0; }
.as-results__header-actions { display: flex; align-items: flex-start; padding-top: 4px; flex-shrink: 0; }

/* 2-column card grid at wider viewports */
.as-results__cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) {
  .as-results__cards { grid-template-columns: 1fr 1fr; }
  .as-results__cards > .as-result-card--overall { grid-column: 1 / -1; }
}

/* Result cards */
.as-result-card { background: #fff; border: 1px solid var(--as-border); border-radius: var(--as-radius); padding: 24px 28px; box-shadow: var(--as-shadow); }
.as-result-card__header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.as-result-card__section { font-size: var(--as-card-title-size, 18px); font-weight: 700; margin: 0; }
.as-result-card__badge { display:inline-block; padding: 4px 14px; background:var(--as-primary); color:#fff; border-radius:20px; font-size: var(--as-card-numbers-size, 13px); font-weight: 600; }
.as-result-card__score { display:flex; justify-content:space-between; margin-bottom:8px; }
.as-result-card__numbers { font-size: var(--as-card-numbers-size, 13px); color:var(--as-muted); }
.as-result-card__pct { font-size: 15px; font-weight: 700; }
.as-progress-bar { background:var(--as-bg); border-radius:4px; height: 12px; overflow:hidden; margin-bottom: 16px; }
.as-progress-bar__fill { height:100%; background:var(--as-progress-fill, var(--as-primary)); border-radius:4px; transition:width .6s ease; }
.as-result-card__description { font-size: var(--as-card-body-size, 15px); color: var(--as-card-body-color, var(--as-text)); line-height: 1.7; margin: 0 0 14px; }
.as-result-card__section-desc { font-size: var(--as-section-desc-size, 14px); color: var(--as-section-desc-color, var(--as-muted)); margin-top: 0; line-height: 1.6; }
.as-result-card__recommendations { border-top: 1px solid var(--as-border); border-left: 3px solid var(--as-reco-border, var(--as-primary)); padding: 14px 16px; background: var(--as-reco-bg, var(--as-bg)); border-radius: 0 8px 8px 0; margin-top: 4px; }
.as-result-card__recommendations strong { display:block; font-size: var(--as-reco-title-size, 11px); font-weight: 700; color: var(--as-reco-title-color, var(--as-muted)); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.as-result-card__recommendations p { font-size: var(--as-reco-body-size, 14px); color: var(--as-reco-body-color, var(--as-muted)); margin: 0; line-height: 1.6; }

/* Error state */
.as-error { color:#dc2626; font-size:14px; padding:12px; border:1px solid #fca5a5; border-radius:8px; background:#fef2f2; }

/* Mobile */
@media(max-width:560px) {
  .as-likert-row { flex-direction:column; gap:4px; }
  .as-likert-option { flex:none; width:100%; }
  .as-likert-btn { flex-direction:row; justify-content:flex-start; min-height:44px; padding:10px 14px; gap:10px; }
  .as-likert-num { font-size:15px; min-width:24px; text-align:center; }
  .as-likert-label { font-size:13px; max-width:none; opacity:1; }
  .as-scale-legend { display:none; }
  .as-survey__title { font-size:20px; }
}

/* ── Print styles ──────────────────────────────────────────────────────────── */
.as-print-btn { margin-top: 0; }
.as-print-logo { display: none; }
/* Pre-generated chart snapshot is screen-hidden; only shown at print time */
.as-chart-print-img { display: none; }

@page {
  margin: 1.5cm 2cm;
}

@media print {

  /* ── Blanket font consistency including SVG text ── */
  .as-results-page *,
  .as-results-page text { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important; }

  /* ── Hide screen-only elements ── */
  .as-survey__form,
  .as-survey__progress,
  .as-survey__nav,
  .as-print-btn,
  .as-results__link,
  .as-results__header-actions,
  header, footer, nav, aside { display: none !important; }

  .as-results-page,
  .as-survey__results { display: block !important; }

  /* ── Page canvas ── */
  .as-results-page {
    max-width: 100%;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #000;
  }

  /* ── Print logo — visible only at print ── */
  .as-print-logo {
    display: flex !important;
    align-items: center;
    gap: 10pt;
    margin-bottom: 10pt;
  }
  .as-print-logo__img {
    height: 36pt;
    width: auto;
    display: block;
  }
  .as-print-logo__name {
    font-size: 13pt;
    font-weight: 700;
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  /* ── Header — typographic, no background dependency ── */
  .as-results__header {
    display: block;
    border: none !important;
    border-bottom: 1pt solid #000 !important;
    border-radius: 0 !important;
    padding: 0 0 12pt 0;
    margin-bottom: 22pt;
    background: none !important;
    box-shadow: none !important;
  }
  .as-results__header-text { display: block; border: none !important; }
  .as-results__title {
    font-size: 20pt !important;
    font-weight: 700 !important;
    letter-spacing: -.01em;
    margin: 0 0 3pt;
    color: #000 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }
  .as-results__subtitle {
    font-size: 10pt !important;
    color: #444 !important;
    margin: 0 0 2pt;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }
  .as-results__name {
    font-size: 10pt !important;
    font-weight: 600 !important;
    color: #000 !important;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  /* ── Hero row — stack for print ── */
  .as-results__hero {
    display: block;
    margin-bottom: 20pt;
  }
  .as-results__hero-main { display: block; margin-bottom: 16pt; }
  .as-results__hero-chart {
    display: block;
    max-width: 480pt;
    margin: 0 auto;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ── Overall result — no card chrome ── */
  .as-result-card--overall {
    background: none !important;
    border: none !important;
    border-left: 3pt solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 0 0 12pt !important;
    margin-bottom: 0 !important;
    height: auto !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .as-result-card--overall .as-result-card__section {
    font-size: 16pt;
    font-weight: 700;
    color: #000;
    margin-bottom: 4pt;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }
  .as-result-card--overall .as-result-card__description {
    font-size: 11pt;
    color: #222;
    line-height: 1.6;
    margin-bottom: 8pt;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  /* ── Badge — bold inline text, no box ── */
  .as-result-card__badge {
    background: none !important;
    color: #000 !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 10pt;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
    padding: 0 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* ── Score line ── */
  .as-result-card__score { margin-bottom: 4pt; }
  .as-result-card__pct { font-size: 11pt; font-weight: 700; }
  .as-result-card__numbers { font-size: 10pt; color: #555; }

  /* ── Progress bar — thin, minimal ── */
  .as-progress-bar {
    height: 4pt;
    background: #e5e7eb;
    border-radius: 0;
    margin-bottom: 10pt;
  }
  .as-progress-bar__fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* ── Recommendations — indented block, no fill ── */
  .as-result-card__recommendations {
    background: none !important;
    border-left: 2pt solid #999 !important;
    border-top: none !important;
    border-radius: 0 !important;
    padding: 4pt 0 4pt 10pt !important;
    margin-top: 6pt;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .as-result-card__recommendations strong {
    font-size: 8pt;
    color: #555;
    letter-spacing: .05em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }
  .as-result-card__recommendations p {
    font-size: 10pt;
    color: #222;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  /* ── Chart — no card chrome, full width ── */
  .as-spider-wrap,
  .as-spider-wrap--bar {
    max-width: 100%;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* SVG chart children — preserve fill colors in print */
  .as-spider-wrap svg,
  .as-spider-wrap--bar svg {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* Bar chart: hide live canvas, show PNG snapshot injected by JS */
  .as-spider-wrap--bar canvas {
    display: none !important;
  }
  .as-chart-print-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  /* ── Section cards — typographic blocks, no card chrome, no forced breaks ── */
  .as-results__cards { display: block; }
  .as-result-card {
    background: none !important;
    border: none !important;
    border-top: 1pt solid #ccc !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 16pt 0 !important;
    margin-bottom: 0 !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .as-result-card__section {
    font-size: 13pt;
    font-weight: 700;
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }
  .as-result-card__description {
    font-size: 11pt;
    color: #222;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }
  .as-result-card__section-desc {
    font-size: 10pt;
    color: #444;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  }

  body { font-size: 11pt; color: #000; }

  /* ── Section detail — breathe, don't force page break ── */
  .as-profile-sections-detail {
    margin-top: 20pt;
    break-before: auto !important;
    page-break-before: auto !important;
  }
}

/* ── Overall result card accent ────────────────────────────────────────────── */
.as-result-card--overall {
  border-left: var(--as-overall-card-border-width, 5px) solid var(--as-overall-card-accent, #6c63ff);
  background: var(--as-overall-card-bg, #f9f8ff);
  margin-bottom: 0;
  height: 100%;
  box-sizing: border-box;
}
.as-result-card--overall .as-result-card__section { font-size: var(--as-card-title-size, 20px); }
.as-result-card--overall .as-result-card__description {
  font-size: var(--as-card-body-size, 16px);
  color: var(--as-card-body-color, var(--as-text));
  line-height: 1.75;
}
/* Quiz full results page: the overall card is rendered as a standalone block
   directly above .as-results__cards, not inside a grid (like the inline quiz
   panel, which gets spacing from .as-results__cards' grid gap) or inside
   .as-results__hero (like Standard/Profile, which gets spacing from its
   margin-bottom). Without this, .as-result-card--overall's own margin-bottom:0
   leaves no space before the section cards below it. 20px matches the grid
   gap used in the inline panel for visual consistency between the two quiz
   results surfaces. */
.as-result-card--overall-standalone { margin-bottom: 20px; }

/* ── Hero row: overall card + chart side by side ────────────────────────────── */
.as-results__hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}
.as-results__hero-main {
  flex: 1 1 58%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.as-results__hero-chart {
  flex: 1 1 42%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
}
.as-results__hero--chart-only {
  justify-content: center;
}
.as-results__hero--chart-only .as-spider-wrap {
  margin: 0 auto;
}

@media (min-width: 860px) {
  .as-results__hero {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Spider chart SVG wrapper */
.as-spider-wrap {
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius);
  padding: 16px;
  box-shadow: var(--as-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.as-spider-wrap--bar {
  width: 100%;
  max-width: 100%;
  justify-content: stretch;
  align-items: stretch;
  display: block; /* canvas needs block container, not flex */
  padding: 16px;
}
/* Canvas bar chart — height is set inline by JS based on bar count */
.as-spider-wrap--bar canvas {
  display: block;
  width: 100% !important;
}
/* Legacy SVG bar chart class kept for backwards compat */
.as-bar-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.as-spider-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible; /* labels outside viewBox are still visible */
}

/* Spider chart CSS custom properties (overridable via theme) */
:root {
  --as-spider-axis:              #d1d5db;
  --as-spider-ring:              #e5e7eb;
  --as-spider-ring-label-color:  #9ca3af;
  --as-spider-ring-label-size:   7px;
  --as-spider-fill:              rgba(37,99,235,0.18);
  --as-spider-stroke:            rgba(37,99,235,0.75);
  --as-spider-dot:               #2563eb;
  --as-spider-label-color:       #374151;
  --as-spider-label-size:        9px;
}

/* Profile card */
.as-profile-detail { display: flex; flex-direction: column; gap: 20px; }

.as-profile-card {
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius);
  padding: 20px;
  box-shadow: var(--as-shadow);
}
.as-profile-card__intensity {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.as-intensity--moderate     { background: #dbeafe; color: #1d4ed8; }
.as-intensity--strong       { background: #ede9fe; color: #6d28d9; }
.as-intensity--very-strong  { background: #fce7f3; color: #9d174d; }

.as-profile-card__label {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--as-text);
  line-height: 1.2;
}
.as-profile-card__description {
  font-size: 14px;
  color: var(--as-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}
.as-profile-card__reco {
  background: var(--as-bg);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 12px;
}
.as-profile-card__reco strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--as-muted); margin-bottom: 6px; }
.as-profile-card__reco p { margin: 0; line-height: 1.5; }

/* Dimension bars */
.as-dim-bars {
  background: #fff;
  border: 1px solid var(--as-border);
  border-radius: var(--as-radius);
  padding: 16px;
  box-shadow: var(--as-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.as-dim-bar__label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.as-dim-bar__pct { color: var(--as-primary); }
.as-dim-bar__track {
  height: 28px;
  background: var(--as-border);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.as-dim-bar__fill {
  height: 100%;
  background: var(--as-primary);
  border-radius: 5px;
  transition: width .5s ease;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 2px;
}
.as-dim-bar__inner-label {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 20px);
  pointer-events: none;
}
.as-dim-bar__midline {
  display: none;
}

/* ── Sprint 4B: Quiz choice button styles ──────────────────────────────────── */

/* Choice container */
.as-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.as-choices.as-error {
  outline: 2px solid #f87171;
  border-radius: 8px;
  padding: 4px;
  background: #fef2f2;
}

/* Individual choice label wrapper */
.as-choice {
  display: block;
  cursor: pointer;
}

/* Hidden radio */
.as-choice-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Choice button — uses choice_* CSS custom properties, not likert_* */
.as-choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--as-choice-default-border, #e5e7eb);
  border-radius: 8px;
  background: var(--as-choice-default-bg, #fff);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
  font-size: 14px;
  line-height: 1.45;
  width: 100%;
  text-align: left;
}

.as-choice-btn:hover {
  border-color: var(--as-choice-hover-border, var(--as-primary));
  background: var(--as-choice-hover-bg, #eff6ff);
}

.as-choice-radio:checked + .as-choice-btn {
  border-color: var(--as-choice-selected-border, var(--as-primary));
  background: var(--as-choice-selected-bg, var(--as-primary));
  color: var(--as-choice-selected-color, #fff);
}

/* Key label (A, B, C …) */
.as-choice-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .06);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.as-choice-radio:checked + .as-choice-btn .as-choice-key {
  background: rgba(255, 255, 255, .25);
}

/* Choice text */
.as-choice-text {
  flex: 1;
}

/* Result-state indicator icon (✓ / ✗) — shown at far right of choice button in results */
.as-choice-indicator {
  margin-left: auto;
  font-size: 16px;
  flex-shrink: 0;
}

/* Correct / incorrect reveal states (full results page) */
.as-choice-btn--correct {
  border-color: var(--as-choice-correct-border, #16a34a) !important;
  background: var(--as-choice-correct-bg, #dcfce7) !important;
  color: #14532d !important;
}

.as-choice-btn--incorrect {
  border-color: var(--as-choice-incorrect-border, #dc2626) !important;
  background: var(--as-choice-incorrect-bg, #fee2e2) !important;
  color: #7f1d1d !important;
}

.as-choice-btn--correct .as-choice-key {
  background: rgba(22, 101, 52, .15);
}

.as-choice-btn--incorrect .as-choice-key {
  background: rgba(153, 27, 27, .15);
}

/* Mobile: no layout change needed — choices already stack vertically */

/* ── Sprint 4B: Quiz results feedback styles ───────────────────────────────── */

/* Answer result indicators (✓ / ✗) used in feedback list */
.as-answer-result {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.as-answer-result--correct {
  color: #16a34a;
}

.as-answer-result--incorrect {
  color: #dc2626;
}

/* Feedback block inside a result card */
.as-quiz-feedback {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  border-top: 1px solid var(--as-border);
  padding-top: 14px;
}

/* Single answer row */
.as-quiz-answer {
  font-size: 13px;
}

.as-quiz-answer__prompt {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 5px;
}

.as-quiz-answer__num {
  font-size: 11px;
  font-weight: 700;
  color: var(--as-bubble-color, var(--as-primary));
  background: var(--as-bubble-bg, rgba(37, 99, 235, .1));
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.as-quiz-answer__text {
  font-size: var(--as-answer-size, 13px);
  color: var(--as-text);
  line-height: 1.5;
}

.as-quiz-answer__chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 28px; /* align under prompt text (past num bubble) */
}

.as-quiz-answer__label {
  color: var(--as-muted);
  font-size: var(--as-answer-size, 13px);
}

/* Correct-answer reveal block */
.as-quiz-answer__reveal {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--as-reco-bg, #f9fafb);
  border-left: 3px solid var(--as-choice-correct-border, #16a34a);
  border-radius: 0 6px 6px 0;
  font-size: 13px;
}

.as-quiz-answer__correct-label {
  margin: 0 0 4px;
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}

.as-quiz-answer__correct-badge {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: .03em;
  flex-shrink: 0;
}

.as-quiz-answer__correct-text {
  color: #166534;
  font-weight: 600;
}

.as-quiz-answer__explanation {
  margin: 4px 0 0;
  color: var(--as-muted);
  line-height: 1.55;
}

/* ── Sprint 4B: Skip-warning styles ─────────────────────────────────────────── */

.as-skip-warning {
  margin-top: 16px;
}

.as-skip-warning__box {
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
}

.as-skip-warning__msg {
  margin: 0 0 12px;
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}

.as-skip-warning__msg strong {
  font-weight: 700;
}

.as-skip-warning__btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Login nudge ---------------------------------------------------------------- */
.as-notice { padding:10px 14px; border-radius:8px; margin-bottom:16px; border-left:4px solid transparent; }
.as-notice p { margin:0; font-size:14px; }
.as-notice--info { background:#eff6ff; border-color:#3b82f6; color:#1e40af; text-align:center; }
.as-notice--info a { color:#1e40af; font-weight:600; }
.as-notice--info a:hover { text-decoration:underline; }
.as-login-nudge { margin-bottom:16px; }
