:root {
    --bg: #f0f4f8;
    --surface: #fff;
    --surface2: #f7fafc;
    --border: #e2e8f0;
    --primary: #1a6cf6;
    --primary-light: #e8f0fe;
    --teal: #0d9488;
    --teal-light: #e0f7f5;
    --accent: #f59e0b;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --success: #22c55e;
    --success-light: #f0fdf4;
    --warn: #f97316;
    --warn-light: #fff7ed;
    --text: #0f172a;
    --text2: #475569;
    --text3: #94a3b8;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,.05), 0 10px 40px rgba(0,0,0,.10);
    --radius: 14px;
    --radius-sm: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ─── APP LAYOUT ─────────────────────────── */
.app {
    display: flex;
    min-height: 100vh;
}

/* ─── SIDEBAR (Desktop) ─────────────────── */
.sidebar {
    width: 240px;
    background: var(--text);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-logo .brand {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.sidebar-logo .sub {
    font-size: 10.5px;
    color: rgba(255,255,255,.35);
    letter-spacing: .8px;
    margin-top: 3px;
    text-transform: uppercase;
}

.sidebar nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    cursor: pointer;
    transition: all .2s;
}

.nav-item:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
}

.nav-item .icon {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.nav-section {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,.22);
    padding: 16px 12px 4px;
}

/* ─── SIDEBAR OVERLAY (Mobile) ───────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

/* ─── MAIN ───────────────────────────────── */
.main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── TOPBAR ─────────────────────────────── */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
}

/* ─── CONTENT ────────────────────────────── */
.content {
    padding: 28px 32px;
    flex: 1;
}

/* ─── BUTTONS ────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .18s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #1558d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,108,246,.3);
}

.btn-teal {
    background: var(--teal);
    color: #fff;
}

.btn-teal:hover {
    background: #0b7d74;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text2);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: 8px;
}

.btn-lg {
    padding: 13px 28px;
    font-size: 15px;
    border-radius: 12px;
}

/* ─── CARDS ──────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.card-sub {
    font-size: 12.5px;
    color: var(--text3);
    margin-top: 2px;
}

/* ─── STATS GRID ─────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 8px;
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.stat-sub {
    font-size: 12px;
    margin-top: 6px;
    color: var(--text3);
}

.stat-card.blue .stat-value { color: var(--primary); }
.stat-card.teal .stat-value { color: var(--teal); }
.stat-card.amber .stat-value { color: var(--accent); }

/* ─── RISK BADGES ────────────────────────── */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
}

.risk-healthy { background: var(--success-light); color: #15803d; }
.risk-moderate { background: var(--warn-light); color: #c2410c; }
.risk-high { background: var(--danger-light); color: var(--danger); }

.risk-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.risk-healthy .risk-dot { background: var(--success); }
.risk-moderate .risk-dot { background: var(--warn); }
.risk-high .risk-dot { background: var(--danger); }

/* ─── FORMS ──────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13.5px;
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,108,246,.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 11.5px;
    color: var(--text3);
    margin-top: 4px;
}

/* ─── TYPE CHIPS ─────────────────────────── */
.type-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.type-chip {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    color: var(--text2);
}

.type-chip.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* ─── OPTIONS LIST ───────────────────────── */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-row .form-control {
    flex: 1;
}

.option-score {
    width: 80px !important;
    flex: none !important;
}

.remove-option {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.remove-option:hover {
    color: var(--danger);
}

/* ─── QUESTION LIST ──────────────────────── */
.question-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.question-item {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all .18s;
    flex-wrap: wrap;
}

.question-item.clickable {
    cursor: pointer;
}

.question-item.clickable:hover {
    border-color: var(--primary);
}

.question-item.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.q-type-badge {
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    white-space: nowrap;
}

.q-type-mc { background: #e0e7ff; color: #4338ca; }
.q-type-yn { background: #dcfce7; color: #166534; }
.q-type-rt { background: #fef3c7; color: #92400e; }
.q-type-sc { background: #fce7f3; color: #9d174d; }

.q-text {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    min-width: 0;
}

.q-meta {
    font-size: 11.5px;
    color: var(--text3);
    white-space: nowrap;
}

.q-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ─── SURVEY CARDS (Selection) ───────────── */
.survey-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.survey-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
}

.survey-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.survey-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.survey-cycle {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--teal-light);
    color: var(--teal);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.survey-name {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
}

.survey-desc {
    font-size: 12.5px;
    color: var(--text2);
    line-height: 1.5;
}

.survey-stats {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.survey-stat {
    font-size: 12px;
    color: var(--text3);
}

.survey-stat strong {
    color: var(--text);
}

/* ─── RESPONSE FLOW ──────────────────────── */
.response-container {
    max-width: 660px;
    margin: 0 auto;
}

.progress-bar-wrap {
    background: var(--border);
    border-radius: 20px;
    height: 5px;
    margin-bottom: 28px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--primary), var(--teal));
    height: 100%;
    border-radius: 20px;
    transition: width .4s ease;
}

.question-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 36px;
}

.q-step {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text3);
    margin-bottom: 10px;
}

.q-title {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 26px;
}

.answer-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-btn {
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all .18s;
    color: var(--text);
    width: 100%;
}

.answer-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.answer-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.rating-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-btn {
    width: 52px;
    height: 52px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
    color: var(--text);
}

.rating-btn:hover,
.rating-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.nav-btns {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
}

/* ─── CONFIRM SCREEN ─────────────────────── */
.confirm-screen {
    max-width: 480px;
    margin: 60px auto;
    text-align: center;
}

.confirm-icon {
    width: 80px;
    height: 80px;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
}

.confirm-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.confirm-sub {
    color: var(--text2);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* ─── ANALYSIS CARDS ─────────────────────── */
.q-analysis-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.q-analysis-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.q-index-bubble {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.q-analysis-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 5px;
}

.q-analysis-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.q-analysis-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ─── OPTION BREAKDOWN ───────────────────── */
.option-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.opt-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.opt-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opt-label {
    font-size: 13.5px;
    font-weight: 500;
}

.opt-pct-label {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--primary);
}

.opt-track {
    background: var(--border);
    border-radius: 20px;
    height: 12px;
    overflow: hidden;
}

.opt-fill {
    height: 100%;
    border-radius: 20px;
    transition: width .8s ease;
}

.opt-count {
    font-size: 11.5px;
    color: var(--text3);
}

/* ─── STAT BOX ───────────────────────────── */
.stat-box {
    background: var(--surface2);
    border-radius: 10px;
    padding: 14px 16px;
    border-left: 3px solid var(--primary);
}

.stat-box-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text3);
    margin-bottom: 4px;
}

.stat-box-value {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 800;
}

.stat-box-sub {
    font-size: 11.5px;
    color: var(--text3);
    margin-top: 2px;
}

/* ─── CHARTS ─────────────────────────────── */
.chart-wrap { position: relative; height: 220px; }
.chart-wrap-md { position: relative; height: 260px; }
.chart-wrap-tall { position: relative; height: 300px; }

.chart-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.chart-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ─── DATA TABLE ─────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table th {
    text-align: left;
    padding: 10px 16px;
    background: var(--surface2);
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--surface2);
}

/* ─── BADGES ─────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-teal { background: var(--teal-light); color: var(--teal); }
.badge-amber { background: #fef3c7; color: #92400e; }

/* ─── UTILITY ────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.text-muted {
    color: var(--text3);
    font-size: 12.5px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* ─── KEY FINDINGS ───────────────────────── */
.key-finding {
    background: linear-gradient(135deg, #eff6ff, #e0f7f5);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border: 1px solid #bfdbfe;
}

.kf-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.kf-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text3);
    margin-bottom: 4px;
}

.kf-value {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 3px;
}

.kf-sub {
    font-size: 12.5px;
    color: var(--text2);
}

/* ─── FILL COLORS ────────────────────────── */
.fill-0 { background: #1a6cf6; }
.fill-1 { background: #0d9488; }
.fill-2 { background: #f59e0b; }
.fill-3 { background: #8b5cf6; }
.fill-4 { background: #ef4444; }
.fill-5 { background: #06b6d4; }
.fill-6 { background: #84cc16; }
.fill-7 { background: #f97316; }

/* ─── EMPTY STATE ────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text3);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text2);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13.5px;
    max-width: 320px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* ─── TOAST MESSAGES ─────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--text);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn .3s ease;
    max-width: 300px;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { background: var(--teal); }
.toast.error { background: var(--danger); }

/* ─── MOBILE BOTTOM NAV ──────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 6px 0;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text3);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-item .mobile-nav-icon {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* ─── SCROLLBAR ──────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── TABLE RESPONSIVE WRAPPER ───────────── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ================================================================
   MOBILE-FIRST RESPONSIVE
   ================================================================ */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .q-analysis-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        padding-bottom: 70px;
    }

    /* Show hamburger */
    .hamburger {
        display: block;
    }

    /* Topbar */
    .topbar {
        padding: 0 16px;
        height: 56px;
    }

    .topbar-title {
        font-size: 16px;
    }

    /* Content */
    .content {
        padding: 16px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-value {
        font-size: 26px;
    }

    .stat-card {
        padding: 16px;
    }

    /* Grids */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Question card */
    .question-card {
        padding: 24px 18px;
    }

    .q-title {
        font-size: 18px;
    }

    /* Rating buttons */
    .rating-btn {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }

    /* Survey select grid */
    .survey-select-grid {
        grid-template-columns: 1fr;
    }

    /* Analysis */
    .q-analysis-body {
        grid-template-columns: 1fr;
    }

    .q-analysis-header {
        flex-direction: column;
    }

    /* Mobile bottom nav */
    .mobile-nav {
        display: block;
    }

    /* Question items */
    .question-item {
        padding: 10px 12px;
    }

    .q-text {
        font-size: 12.5px;
    }

    /* Charts */
    .chart-wrap-tall {
        height: 220px;
    }

    .chart-wrap-md {
        height: 200px;
    }

    /* Table */
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Cards */
    .card {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Confirm */
    .confirm-screen {
        margin: 30px auto;
        padding: 0 16px;
    }

    .confirm-title {
        font-size: 22px;
    }

    /* Key findings */
    .key-finding {
        padding: 14px 16px;
    }

    .kf-value {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 28px;
    }

    .rating-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .nav-btns {
        gap: 10px;
    }

    .nav-btns .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ─── TEXT QUESTION TYPE ─────────────────── */
.q-type-tx { background: #f0e6ff; color: #6b21a8; }

/* ─── TEXT ANSWERS LIST (Analytics) ──────── */
.text-answers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-answer-item {
    background: var(--surface2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    border-left: 3px solid var(--primary);
}

.text-answer-count {
    font-size: 11.5px;
    color: var(--text3);
    margin-bottom: 12px;
    font-weight: 600;
}

/* ─── IN PROGRESS BANNER ────────────────── */
.resume-banner {
    background: linear-gradient(135deg, var(--primary-light), var(--teal-light));
    border: 1.5px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.resume-banner-info {
    flex: 1;
}

.resume-banner-title {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.resume-banner-sub {
    font-size: 12.5px;
    color: var(--text2);
}

.resume-banner-actions {
    display: flex;
    gap: 8px;
}