/* CFF Performance Audit — brand palette only: #0A4049 #154149 #7D2D6C #C99A69 #EFEDE8 #E7EAE8 #FFFFFF */
.pa { display: grid; gap: 18px; max-width: 980px; }
.pa-card { border-radius: 12px; }
.pa-kicker { font-size: .8rem; font-weight: 700; color: #7d2d6c; margin-bottom: 8px; }
.pa-headline { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.15; color: #0a4049; }
.pa-sub { margin-top: 10px; font-size: 1.02rem; color: #154149; max-width: 60ch; }
.pa-h3 { font-family: var(--font-display); font-size: 1.15rem; color: #0a4049; margin-bottom: 12px; }
.pa-h4 { font-family: var(--font-display); font-size: .98rem; margin: 16px 0 8px; color: #0a4049; }
.pa-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pa-actions-tight { margin-top: 8px; gap: 8px; }
.pa-privacy { font-size: .8rem; color: #154149; opacity: .85; margin-top: 14px; border-left: 3px solid #c99a69; padding-left: 10px; }
.pa-fine { font-size: .78rem; color: #154149; margin-top: 12px; }
.pa-link { background: none; border: 0; padding: 4px 0; color: #0a4049; font: 600 .88rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pa-link:hover { color: #7d2d6c; }
.pa-link:focus-visible, .pa .btn:focus-visible, .pa-choice input:focus-visible + span { outline: 3px solid #c99a69; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* welcome */
.pa-welcome { position: relative; overflow: hidden; padding: 36px 32px; }
.pa-quad-mini { position: absolute; right: 28px; top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 92px; opacity: .9; }
.pa-quad-mini span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font: 700 1rem var(--font-display); background: #efede8; color: #154149; }
.pa-quad-mini span:nth-child(2) { background: #0a4049; color: #c99a69; }
.pa-welcome .pa-headline { padding-right: 110px; }

/* list */
.pa-list { list-style: none; display: grid; gap: 8px; }
.pa-row { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid #e7eae8; border-radius: 8px; }
.pa-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pa-row-main .text-muted { font-size: .8rem; }
.pa-grade { width: 40px; height: 40px; flex: none; border-radius: 8px; display: grid; place-items: center; font: 700 1.15rem var(--font-display); }
.pa-grade-A { background: #0a4049; color: #c99a69; }
.pa-grade-B { background: #154149; color: #ffffff; }
.pa-grade-C { background: #efede8; color: #0a4049; border: 1.5px solid #c99a69; }
.pa-grade-D { background: #7d2d6c; color: #ffffff; }
.pa-grade-draft { background: #e7eae8; color: #154149; font: 600 .66rem var(--font-body); }
.pa-empty { padding: 22px; border: 1.5px dashed #e7eae8; border-radius: 8px; color: #154149; text-align: center; }

/* progress */
.pa-top { display: flex; align-items: center; gap: 14px; }
.pa-prog { flex: 1; height: 8px; background: #e7eae8; border-radius: 999px; overflow: hidden; }
.pa-prog-fill { height: 100%; background: #c99a69; transform-origin: left; transition: transform .35s ease; }
.pa-prog-num { font-weight: 700; font-size: .85rem; min-width: 3ch; color: #0a4049; }

/* question */
.pa-q { padding: 32px; animation: pa-in .25s ease; }
@keyframes pa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pa-step { font-size: .8rem; font-weight: 600; color: #7d2d6c; margin-bottom: 10px; }
.pa-qlabel { display: block; font-family: var(--font-display); font-size: clamp(1.15rem, 2.6vw, 1.45rem); font-weight: 600; line-height: 1.3; color: #0a4049; margin-bottom: 12px; }
.pa-qlabel:focus { outline: none; }
.pa-opt { font: 500 .8rem var(--font-body); color: #154149; }
.pa-help { font-size: .88rem; color: #154149; margin: -4px 0 12px; }
.pa-note { background: #efede8; border-radius: 8px; padding: 10px 14px; font-size: .9rem; margin-bottom: 14px; }
.pa-sublabel { margin-top: 16px; }
.pa-fieldset { border: 0; }
.pa-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pa-choices-wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pa-choice { margin: 0; cursor: pointer; }
.pa-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pa-choice span { display: block; padding: 14px 16px; border: 1.5px solid #e7eae8; border-radius: 8px; font-weight: 600; font-size: .92rem; background: #ffffff; transition: border-color .15s, background .15s; }
.pa-choice:hover span { border-color: #154149; }
.pa-choice input:checked + span { border-color: #0a4049; background: #0a4049; color: #ffffff; }
.pa-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid #e7eae8; }
.pa-save-state { font-size: .82rem; color: #154149; text-align: center; flex: 1; }
.pa-msg { padding: 12px 14px; border-radius: 8px; font-size: .88rem; margin-top: 14px; border-left: 3px solid #154149; background: #efede8; }
.pa-msg.is-error { border-left-color: var(--danger); background: rgba(192,57,43,.07); }
.pa-msg.is-warn { border-left-color: #c99a69; }
.pa-msg.is-ok { border-left-color: var(--success); }

.pa-values { display: grid; gap: 8px; margin-bottom: 10px; }
.pa-vrow { display: flex; gap: 8px; }
.pa-kpis { display: grid; gap: 10px; margin-bottom: 10px; }
.pa-kpi { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 12px; background: #efede8; border-radius: 8px; }
.pa-kpi label { font-size: .74rem; margin-bottom: 3px; }

.pa-score { padding: 18px; border-radius: 12px; background: #efede8; }
.pa-score-big { font: 700 2.6rem var(--font-display); color: #0a4049; line-height: 1; margin-bottom: 12px; }
.pa-score.is-unset .pa-score-big { font-size: 1.3rem; color: #7d2d6c; }
.pa-score.is-unset input[type=range] { opacity: .45; }
.pa-score input[type=range] { padding: 0; border: 0; background: transparent; accent-color: #c99a69; height: 28px; }
.pa-score-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pa-score-row input { width: 100px; }
.pa-score-ticks { position: relative; height: 16px; font-size: .72rem; color: #154149; margin-top: 4px; }
.pa-score-ticks span { position: absolute; transform: translateX(-50%); }
.pa-score-ticks span:nth-child(1) { left: 0; transform: none; }
.pa-score-ticks span:nth-child(2) { left: 60%; }
.pa-score-ticks span:nth-child(3) { left: 85%; }
.pa-score-ticks span:nth-child(4) { right: 0; transform: none; }

.pa-summary { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1.5px solid #c99a69; border-radius: 12px; margin-bottom: 18px; background: #ffffff; }
.pa-summary.is-empty { border-style: dashed; color: #154149; font-size: .88rem; }
.pa-summary-grade { width: 54px; height: 54px; border-radius: 8px; display: grid; place-items: center; font: 700 1.6rem var(--font-display); flex: none; }
.pa-summary-title { font-weight: 700; }
.pa-summary-nums { font-size: .88rem; color: #154149; }

/* review */
.pa-review { list-style: none; margin-top: 10px; }
.pa-rev-sec { font-family: var(--font-display); font-weight: 600; color: #7d2d6c; padding: 16px 0 6px; }
.pa-rev { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e7eae8; font-size: .9rem; align-items: start; }
.pa-rev-q { color: #154149; }
.pa-rev-a { font-weight: 600; word-break: break-word; }
.pa-rev-t, .pa-rev-c { white-space: pre-wrap; }
.pa-rev-c { display: block; font-weight: 400; color: #154149; }

/* results */
.pa-results-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.pa-report { display: grid; gap: 18px; }
.pa-res-head { background: #ffffff; color: #0a4049; border-color: #e7eae8; }
.pa-res-head .pa-headline { color: #0a4049; }
.pa-res-head .pa-kicker { color: #7d2d6c; }
.pa-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.pa-facts dt { font-size: .74rem; color: #154149; }
.pa-facts dd { font-weight: 600; }
.pa-res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pa-class-letter { width: 84px; height: 84px; border-radius: 12px; display: grid; place-items: center; font: 700 3rem var(--font-display); }
.pa-class-name { font-family: var(--font-display); font-size: 1.2rem; margin: 12px 0 4px; }
.pa-flag { display: inline-block; font-size: .8rem; padding: 4px 10px; border-radius: 999px; background: #efede8; color: #7d2d6c; font-weight: 600; }
.pa-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.pa-nums div { background: #efede8; border-radius: 8px; padding: 10px; }
.pa-nums span { display: block; font-size: .74rem; color: #154149; }
.pa-nums strong { font: 700 1.4rem var(--font-display); }
.pa-gwc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pa-gwc-cell { border: 1.5px solid #e7eae8; border-radius: 8px; padding: 8px 10px; }
.pa-gwc-cell span { display: block; font-size: .74rem; }
.pa-gwc-yes { border-color: #0a4049; }
.pa-gwc-no { border-color: #7d2d6c; }
.pa-bullets { padding-left: 18px; font-size: .9rem; }
.pa-matrix svg, .pa-matrix img { width: 100%; height: auto; display: block; max-width: 440px; margin: 0 auto; }
.pa-m-bg { fill: #efede8; } .pa-m-a { fill: #0a4049; opacity: .16; } .pa-m-b { fill: #154149; opacity: .08; } .pa-m-d { fill: #7d2d6c; opacity: .14; }
.pa-m-line { stroke: #154149; stroke-width: 1.2; } .pa-m-dash { stroke-dasharray: 4 4; }
.pa-m-q { font: 700 22px 'Playfair Display', serif; fill: #154149; opacity: .5; }
.pa-m-tick { font: 10px 'Raleway', sans-serif; fill: #154149; } .pa-m-axis { font: 600 10px 'Raleway', sans-serif; fill: #0a4049; }
.pa-m-dot { fill: #c99a69; stroke: #0a4049; stroke-width: 2.5; } .pa-m-dlabel { font: 700 11px 'Raleway', sans-serif; fill: #0a4049; }
.pa-text { white-space: pre-wrap; word-break: break-word; font-size: .94rem; line-height: 1.65; }
.pa-plan { border-top: 4px solid #c99a69; }
.pa-cmp th[scope=row] { text-align: left; font-weight: 600; }
.pa-delta.up { color: var(--success); font-weight: 700; } .pa-delta.down { color: var(--danger); font-weight: 700; }
.pa-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.pa-next p { margin: 4px 0 8px; }

/* skeleton */
.pa-skel { display: grid; gap: 12px; padding: 24px; background: #ffffff; border-radius: 12px; border: 1px solid #e7eae8; }
.pa-skel-bar, .pa-skel-block { background: #e7eae8; border-radius: 8px; animation: pa-pulse 1.2s ease-in-out infinite; }
.pa-skel-bar { height: 18px; } .pa-skel-bar.w60 { width: 60%; } .pa-skel-bar.w90 { width: 90%; } .pa-skel-block { height: 160px; }
@keyframes pa-pulse { 50% { opacity: .5; } }

@media (max-width: 768px) {
  .pa-welcome { padding: 26px 20px; }
  .pa-quad-mini { display: none; } .pa-welcome .pa-headline { padding-right: 0; }
  .pa-q { padding: 22px 18px; }
  .pa-res-grid, .pa-facts { grid-template-columns: 1fr 1fr; }
  .pa-res-grid { grid-template-columns: 1fr; }
  .pa-kpi { grid-template-columns: 1fr 1fr; }
  .pa-kpi > div:first-child { grid-column: 1 / -1; }
  .pa-rev { grid-template-columns: 1fr auto; } .pa-rev-a { grid-column: 1; }
  .pa-row { flex-wrap: wrap; }
  .pa-nav .btn { flex: 1; } .pa-save-state { order: -1; flex-basis: 100%; }
  .pa-nav { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .pa-q, .pa-prog-fill, .pa-skel-bar, .pa-skel-block { animation: none; transition: none; } }

@media print {
  body.pa-printing * { visibility: hidden; }
  body.pa-printing #pa-print, body.pa-printing #pa-print * { visibility: visible; }
  body.pa-printing #pa-print { position: absolute; left: 0; top: 0; width: 100%; }
  body.pa-printing .no-print { display: none !important; }
  body.pa-printing .pa-card { box-shadow: none; break-inside: avoid; }
  body.pa-printing .pa-res-grid { grid-template-columns: 1fr 1fr; }
}
.pa-err { color: var(--danger); font-size: .82rem; margin-top: 6px; min-height: 1em; }
