/* NSW Selective Tests — Frontend Styles */
*, *::before, *::after { box-sizing: border-box; }

/* ── Hub ── */
.nsw-hub {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.nsw-hub__title { font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.nsw-hub__sub   { color: #555; margin: 0 0 24px; }
.nsw-hub__welcome { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 16px; margin-bottom: 24px; color: #166534; }
.nsw-hub__auth  { display: flex; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }

.nsw-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.nsw-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px 18px 20px;
    background: var(--card-bg, #fff);
    transition: box-shadow .15s, transform .15s;
}
.nsw-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-2px); }

.nsw-card__icon { width: 36px; height: 36px; color: var(--card-color, #333); margin-bottom: 10px; }
.nsw-card__icon svg { width: 36px; height: 36px; }
.nsw-card__title { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--card-color, #111); }
.nsw-card__desc  { font-size: 13px; color: #555; line-height: 1.5; margin: 0 0 16px; }
.nsw-card__btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--card-color, #333);
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: opacity .15s;
}
.nsw-card__btn:hover { opacity: .85; }

/* ── Buttons ── */
.nsw-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background .15s, border-color .15s, opacity .15s;
    line-height: 1.4;
}
.nsw-btn--primary  { background: #2563eb; color: #fff; }
.nsw-btn--primary:hover  { background: #1d4ed8; }
.nsw-btn--outline  { background: transparent; border-color: #2563eb; color: #2563eb; }
.nsw-btn--outline:hover  { background: #eff6ff; }
.nsw-btn--ghost    { background: transparent; color: #555; }
.nsw-btn--ghost:hover    { background: #f3f4f6; }
.nsw-btn--lg       { padding: 13px 30px; font-size: 17px; }
.nsw-btn--full     { width: 100%; text-align: center; }
.nsw-btn:disabled, .nsw-btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }

/* ── Test App ── */
.nsw-app {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.nsw-state { text-align: center; }

/* Loading */
.nsw-spinner {
    width: 44px; height: 44px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: nsw-spin .7s linear infinite;
    margin: 60px auto 16px;
}
@keyframes nsw-spin { to { transform: rotate(360deg); } }

/* Error */
.nsw-error-icon { font-size: 48px; color: #ef4444; margin: 40px 0 12px; }
.nsw-error-msg  { color: #ef4444; margin-bottom: 20px; font-size: 16px; }

/* Start screen */
.nsw-start { max-width: 520px; margin: 0 auto; text-align: left; padding: 20px 0; }
.nsw-start__badge { display: inline-block; background:#dbeafe; color:#1d4ed8; padding:4px 12px; border-radius:20px; font-weight:700; font-size:13px; margin-bottom:12px; }
.nsw-start__title { font-size: 26px; font-weight: 700; margin: 0 0 10px; }
.nsw-start__meta  { color: #555; margin-bottom: 16px; font-size: 15px; }
.nsw-start__rules { background: #f9fafb; border-radius: 8px; padding: 14px 18px; margin-bottom: 24px; }
.nsw-start__rules ul { margin: 8px 0 0 0; padding-left: 18px; }
.nsw-start__rules li { margin-bottom: 6px; font-size: 14px; color: #444; line-height: 1.5; }
.nsw-start__actions { display: flex; gap: 12px; align-items: center; }

/* Top bar */
.nsw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.nsw-topbar__progress { flex: 1; }
.nsw-topbar__counter  { font-size: 14px; color: #555; font-weight: 600; margin-bottom: 6px; display: block; }
.nsw-progress { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.nsw-progress__fill { height: 100%; background: #2563eb; border-radius: 4px; transition: width .4s; }

/* Timer */
.nsw-clock { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.nsw-clock__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.nsw-clock__track { fill: none; stroke: #e5e7eb; stroke-width: 3; }
.nsw-clock__arc   { fill: none; stroke: #2563eb; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .9s linear, stroke .4s; }
.nsw-clock--warning .nsw-clock__arc { stroke: #f59e0b; }
.nsw-clock--danger  .nsw-clock__arc { stroke: #ef4444; }
.nsw-clock__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #333;
}
.nsw-clock--danger .nsw-clock__label { color: #ef4444; }

/* Difficulty badge */
.nsw-diff-wrap { margin-bottom: 10px; }
.nsw-diff {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.nsw-diff--easy   { background: #dcfce7; color: #15803d; }
.nsw-diff--medium { background: #fef9c3; color: #854d0e; }
.nsw-diff--hard   { background: #fee2e2; color: #991b1b; }

/* Question body */
.nsw-qbody { text-align: left; margin-bottom: 20px; }

.nsw-passage {
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-bottom: 18px;
}
.nsw-passage__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #2563eb; margin-bottom: 8px; }
.nsw-passage__text  { font-size: 14px; line-height: 1.7; color: #333; white-space: pre-line; max-height: 220px; overflow-y: auto; }

.nsw-qimg { margin-bottom: 16px; }
.nsw-qimg img { max-width: 100%; border-radius: 8px; border: 1px solid #e5e7eb; }

.nsw-qtext { font-size: 17px; font-weight: 600; line-height: 1.55; color: #111; margin-bottom: 20px; }
.nsw-qtext p { margin: 0; }

/* Multi-question page layout */
.nsw-question-item { margin-bottom: 4px; }
.nsw-question-item__num {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #2563eb;
    margin-bottom: 10px;
}
.nsw-q-divider {
    border: none;
    border-top: 2px dashed #e5e7eb;
    margin: 24px 0;
}

/* Options */
.nsw-options { display: flex; flex-direction: column; gap: 10px; }
.nsw-opt {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s;
    text-align: left;
    font-size: 15px;
    width: 100%;
}
.nsw-opt:hover:not(:disabled)    { border-color: #93c5fd; background: #eff6ff; }
.nsw-opt.selected                 { border-color: #2563eb; background: #eff6ff; }
.nsw-opt.correct                  { border-color: #16a34a; background: #f0fdf4; }
.nsw-opt.incorrect                { border-color: #ef4444; background: #fef2f2; }
.nsw-opt:disabled                 { cursor: default; }
.nsw-opt__letter {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: #e5e7eb; font-weight: 700; font-size: 13px;
    flex-shrink: 0; color: #555;
}
.nsw-opt.selected .nsw-opt__letter  { background: #2563eb; color: #fff; }
.nsw-opt.correct  .nsw-opt__letter  { background: #16a34a; color: #fff; }
.nsw-opt.incorrect .nsw-opt__letter { background: #ef4444; color: #fff; }
.nsw-opt__text { line-height: 1.5; color: #222; padding-top: 4px; }

/* Writing area */
.nsw-write__label { display: block; font-weight: 600; margin-bottom: 8px; color: #333; }
.nsw-write__ta {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}
.nsw-write__ta:focus { outline: none; border-color: #2563eb; }
.nsw-write__meta { font-size: 13px; color: #777; margin-top: 6px; }

/* Question footer */
.nsw-qfoot { display: flex; justify-content: flex-end; }

/* Results */
.nsw-results { max-width: 580px; margin: 0 auto; text-align: left; padding: 20px 0; }
.nsw-results__title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.nsw-results__score {
    text-align: center;
    margin-bottom: 20px;
    padding: 24px;
    background: #f0f9ff;
    border-radius: 12px;
}
.nsw-score-circle {
    width: 100px; height: 100px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    margin: 0 auto 12px;
    font-weight: 700;
    background: #2563eb; color: #fff;
}
.nsw-score-circle__pct { font-size: 28px; line-height: 1; }
.nsw-score-circle__label { font-size: 11px; opacity: .8; }
.nsw-score-raw { font-size: 16px; color: #555; }

.nsw-results__stats { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.nsw-stat-box {
    flex: 1; min-width: 120px;
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 10px; padding: 14px 12px; text-align: center;
}
.nsw-stat-box__val  { font-size: 22px; font-weight: 700; color: #111; }
.nsw-stat-box__lbl  { font-size: 12px; color: #666; margin-top: 2px; }

.nsw-results__breakdown { margin-bottom: 28px; }
.nsw-bd-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.nsw-bd-item {
    border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 14px; margin-bottom: 10px; background: #fff;
}
.nsw-bd-item__q    { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: #111; }
.nsw-bd-item__info { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.nsw-bd-correct    { color: #15803d; font-weight: 600; }
.nsw-bd-incorrect  { color: #dc2626; font-weight: 600; }
.nsw-bd-skipped    { color: #6b7280; font-weight: 600; }
.nsw-bd-sample     { margin-top: 10px; background: #f0fdf4; border-radius: 6px; padding: 10px 12px; font-size: 13px; color: #166534; }
.nsw-bd-sample strong { display: block; margin-bottom: 4px; }

.nsw-results__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── AI Marking feedback panel ── */
.nsw-feedback-panel {
    background: #f8f4ff;
    border: 1px solid #d8b4fe;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.nsw-feedback-panel__title {
    font-size: 16px;
    font-weight: 700;
    color: #6d28d9;
    margin-bottom: 14px;
}
.nsw-feedback-panel__status {
    font-size: 14px;
    color: #7c3aed;
    font-style: italic;
}
.nsw-score-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 14px;
}
.nsw-score-table td { padding: 5px 8px; }
.nsw-score-table td:last-child { text-align: right; font-weight: 600; color: #6d28d9; }
.nsw-score-table__total td { border-top: 1px solid #d8b4fe; font-weight: 700; color: #2c3e50; padding-top: 8px; }
.nsw-score-table__total td:last-child { color: #2c3e50; }
.nsw-feedback-panel__text {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    border-left: 3px solid #7c3aed;
    padding-left: 12px;
}

/* ── Sign-up page ── */
.nsw-signup {
    max-width: 480px;
    margin: 32px auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.nsw-signup__card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.nsw-signup__logo { text-align: center; color: #2563eb; margin-bottom: 12px; }
.nsw-signup__title { font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 6px; }
.nsw-signup__sub   { font-size: 14px; color: #555; text-align: center; margin: 0 0 24px; }
.nsw-signup__login { text-align: center; font-size: 14px; color: #555; margin-top: 18px; }

.nsw-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nsw-field { margin-bottom: 16px; }
.nsw-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.nsw-field input[type=text],
.nsw-field input[type=email],
.nsw-field input[type=password] {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 15px;
    transition: border-color .15s;
    font-family: inherit;
}
.nsw-field input:focus { outline: none; border-color: #2563eb; }
.nsw-field__hint { font-size: 12px; color: #9ca3af; display: block; margin-top: 3px; }
.nsw-req { color: #ef4444; }

.nsw-msg {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}
.nsw-msg--error   { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.nsw-msg--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }

/* Login gate */
.nsw-login-gate {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #555;
}
.nsw-already-in {
    text-align: center;
    padding: 24px;
    font-size: 15px;
}

/* ── Performance Page ── */
.nsw-perf {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.nsw-perf__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.nsw-perf__title { font-size: 28px; font-weight: 700; margin: 0 0 6px; }
.nsw-perf__sub   { color: #555; margin: 0; font-size: 15px; }

/* Loading / error */
.nsw-perf__loading { text-align: center; padding: 48px 0; color: #555; }
.nsw-perf__error   { text-align: center; padding: 48px 0; }

/* Summary strip */
.nsw-perf__summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.nsw-perf__sum-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 14px;
    text-align: center;
}
.nsw-perf__sum-val { font-size: 26px; font-weight: 700; color: #111; }
.nsw-perf__sum-lbl { font-size: 12px; color: #777; margin-top: 3px; }

/* Tabs */
.nsw-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.nsw-tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 6px 6px 0 0;
    transition: color .15s, border-color .15s;
}
.nsw-tab:hover        { color: #2563eb; }
.nsw-tab--active      { color: #2563eb; border-bottom-color: #2563eb; background: #eff6ff; }

/* Type cards grid */
.nsw-perf__type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.nsw-perf__type-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 14px;
}
.nsw-perf__type-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 8px;
}
.nsw-perf__type-name { font-weight: 700; font-size: 14px; }
.nsw-perf__type-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.nsw-perf__no-data { font-size: 13px; color: #9ca3af; margin: 6px 0; }
.nsw-perf__ai-mark { font-size: 13px; color: #374151; margin: 6px 0; }
.nsw-perf__ai-mark strong { font-size: 18px; color: #16a34a; }

/* Bar */
.nsw-bar-wrap  { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.nsw-bar-fill  { height: 100%; border-radius: 4px; transition: width .5s ease; }
.nsw-bar-label { font-size: 12px; color: #666; }

/* Trend badges */
.nsw-trend { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.nsw-trend--up     { color: #15803d; background: #dcfce7; }
.nsw-trend--down   { color: #dc2626; background: #fee2e2; }
.nsw-trend--stable { color: #d97706; background: #fef9c3; }

/* Stat pills */
.nsw-stat-pill { background: rgba(0,0,0,.05); border-radius: 8px; padding: 4px 10px; text-align: center; }
.nsw-stat-pill__val { display: block; font-size: 14px; font-weight: 700; color: #111; }
.nsw-stat-pill__lbl { display: block; font-size: 10px; color: #777; text-transform: uppercase; letter-spacing: .4px; }

/* Section title */
.nsw-perf__section-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

/* Table */
.nsw-table-wrap { overflow-x: auto; }
.nsw-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nsw-table th { background: #f9fafb; font-weight: 600; color: #374151; padding: 10px 12px; text-align: left; border-bottom: 2px solid #e5e7eb; }
.nsw-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.nsw-table tr:last-child td { border-bottom: none; }
.nsw-table tr:hover td { background: #f9fafb; }

/* Badges */
.nsw-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.nsw-badge--top     { background: #dcfce7; color: #15803d; }
.nsw-badge--mid     { background: #fef9c3; color: #854d0e; }
.nsw-badge--low     { background: #fee2e2; color: #991b1b; }
.nsw-badge--neutral { background: #f1f5f9; color: #64748b; }
.nsw-badge--writing { background: #e0e7ff; color: #3730a3; }

/* Empty state */
.nsw-perf__empty { text-align: center; padding: 48px 20px; color: #555; }
.nsw-perf__empty p { margin-bottom: 20px; font-size: 16px; }

/* Comparison bars (peers / benchmark) */
.nsw-perf__peer-card,
.nsw-perf__bench-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 16px;
    margin-bottom: 16px;
}
.nsw-perf__peer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
}
.nsw-cmp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nsw-cmp-row__label { width: 130px; font-size: 13px; font-weight: 600; color: #374151; flex-shrink: 0; text-align: right; }
.nsw-cmp-row__track { flex: 1; height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.nsw-cmp-row__fill  { height: 100%; border-radius: 6px; transition: width .5s ease; }
.nsw-cmp-row__val   { width: 48px; text-align: right; font-size: 13px; font-weight: 700; color: #111; }
.nsw-perf__peer-note { font-size: 12px; color: #9ca3af; margin-top: 10px; }

/* Benchmark intro */
.nsw-perf__bench-intro {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #0c4a6e;
    margin-bottom: 20px;
    line-height: 1.6;
}
.nsw-perf__bench-note { font-size: 12px; color: #9ca3af; margin-top: 10px; }
.nsw-perf__best-note  { font-size: 12px; color: #16a34a; font-weight: 600; margin-top: 6px; }

/* Readiness ring */
.nsw-perf__readiness {
    display: flex;
    align-items: center;
    gap: 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.nsw-perf__readiness-ring { position: relative; width: 90px; height: 90px; flex-shrink: 0; }
.nsw-readiness-svg { width: 90px; height: 90px; transform: rotate(-90deg); }
.nsw-readiness-label {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: #111;
    transform: rotate(0deg);
}
.nsw-readiness-label span { font-size: 10px; font-weight: 600; color: #777; text-transform: uppercase; letter-spacing: .5px; }
.nsw-perf__readiness-text h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.nsw-perf__readiness-text p  { margin: 0 0 6px; font-size: 14px; color: #444; }
.nsw-perf__gap-hint { color: #ef4444 !important; font-size: 13px !important; }

/* ── Clickable history row ── */
.nsw-history-row { cursor: pointer; }
.nsw-history-row:hover td { background: #eff6ff !important; }
.nsw-review-hint { font-size: 11px; color: #2563eb; font-weight: 600; opacity: .7; }

/* ── Review modal ── */
body.nsw-modal-open { overflow: hidden; }

.nsw-review-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.nsw-review-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
}
.nsw-review-modal__box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%; max-width: 680px;
    max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    overflow: hidden;
}
.nsw-review-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.nsw-review-modal__title { margin: 0; font-size: 17px; font-weight: 700; }
.nsw-review-modal__close {
    background: none; border: none; cursor: pointer;
    font-size: 22px; line-height: 1; color: #6b7280; padding: 0 4px;
}
.nsw-review-modal__close:hover { color: #111; }
.nsw-review-modal__body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

/* ── Review question blocks ── */
.nsw-review-q {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fafafa;
}
.nsw-review-q--writing { background: #f0fdf4; border-color: #bbf7d0; }
.nsw-review-q__num { font-size: 12px; font-weight: 700; color: #9ca3af; text-transform: uppercase; margin-bottom: 4px; }
.nsw-review-q__prompt { font-weight: 600; color: #1e293b; margin-bottom: 12px; line-height: 1.5; }
.nsw-review-q__response {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
}
.nsw-review-skipped { font-size: 13px; color: #9ca3af; font-style: italic; }

/* ── MCQ options ── */
.nsw-review-options { margin: 0; padding-left: 24px; }
.nsw-review-opt { padding: 7px 10px; margin: 4px 0; border-radius: 6px; font-size: 14px; color: #374151; }
.nsw-review-opt--correct { background: #dcfce7; color: #15803d; font-weight: 600; }
.nsw-review-opt--wrong   { background: #fee2e2; color: #991b1b; font-weight: 600; }
.nsw-review-opt--answer  { background: #fef9c3; color: #854d0e; font-weight: 600; }
.nsw-review-tag { font-size: 11px; font-weight: 700; margin-left: 6px; opacity: .8; }
.nsw-review-tag--correct { color: #15803d; }

/* ── Writing feedback section ── */
.nsw-review-feedback {
    margin-top: 14px;
    background: #fff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 14px;
}
.nsw-review-feedback__label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: #16a34a; margin-bottom: 10px;
}
.nsw-review-score-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.nsw-review-score-table td { padding: 4px 8px; border-bottom: 1px solid #f0fdf4; }
.nsw-review-score-table tr:last-child td { border-bottom: none; }
.nsw-review-feedback__text { margin: 0; font-size: 14px; line-height: 1.6; color: #374151; }

/* ── Responsive ── */
@media (max-width: 500px) {
    .nsw-form-2col { grid-template-columns: 1fr; }
    .nsw-signup__card { padding: 24px 18px; }
    .nsw-hub__grid { grid-template-columns: 1fr; }
    .nsw-start__actions { flex-direction: column; }
    .nsw-perf__summary { grid-template-columns: 1fr; }
    .nsw-perf__type-grid { grid-template-columns: 1fr; }
    .nsw-cmp-row__label { width: 80px; font-size: 12px; }
    .nsw-perf__readiness { flex-direction: column; text-align: center; }
    .nsw-tab { padding: 8px 12px; font-size: 13px; }
}
