/* Contrasto base per le verifiche incorporate nella pagina corso. */
body.va-learning :is(.test-question, .test-question legend, .question-rich-text, .question-rich-text *, .test-option, .test-option *, .option-rich-text, .option-rich-text *, .test-answer-label, .test-answer-label *, .answer-result-line, .answer-result-line *, .embedded-test-workspace, .embedded-test-workspace .test-question, .embedded-test-workspace .test-option, .embedded-test-workspace .test-option *) {
    color: #17243a !important;
}
body.va-learning :is(.test-question, .embedded-test-workspace, .test-option) {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}
html[data-va-theme='dark'] body.va-learning :is(.test-question, .test-question legend, .question-rich-text, .question-rich-text *, .test-option, .test-option *, .option-rich-text, .option-rich-text *, .test-answer-label, .test-answer-label *, .answer-result-line, .answer-result-line *, .embedded-test-workspace, .embedded-test-workspace .test-question, .embedded-test-workspace .test-option, .embedded-test-workspace .test-option *) {
    color: #e8f2fc !important;
}
html[data-va-theme='dark'] body.va-learning :is(.test-question, .embedded-test-workspace, .test-option) {
    background: #0d1d2e !important;
    border-color: #38547f !important;
}

/* VENTURINI ACADEMY · Studio 03
   Shared semantic tokens for the public site, student area and admin tools. */
@font-face {
    font-family: 'Manrope'; src: url('./fonts/Manrope.ttf') format('truetype');
    font-weight: 200 800; font-style: normal; font-display: swap;
}

/* Correzioni finali condivise dalle pagine didattiche. */
body.va-learning .course-index-item .index-type {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: 100%;
    align-items: center;
    justify-self: start;
    margin: 0 0 5px;
    padding: 3px 8px;
    line-height: 1.2;
    white-space: nowrap;
}
:root[data-va-theme='light'] body.learning-theme-test .test-question {
    color: var(--va-ink, #17243a) !important;
    background: var(--va-surface, #ffffff) !important;
    border-color: var(--va-line, #d7e0ea) !important;
}
:root[data-va-theme='light'] body.learning-theme-test :is(.question-rich-text, .option-rich-text, .test-answer-label, .answer-result-line, .test-answer-note, .test-open-text, .test-text-input) {
    color: var(--va-ink, #17243a) !important;
}
:root[data-va-theme='light'] body.learning-theme-test :is(.test-option, .embedded-test-workspace, .notice-item) {
    color: var(--va-ink, #17243a) !important;
    background: var(--va-surface-soft, #f8fafc) !important;
    border-color: var(--va-line, #d7e0ea) !important;
}

body .va-capture-shield-dark,
body .va-capture-shield-dark .va-capture-shield-card {
    color: #ffffff !important;
    background: #020617 !important;
}
body .va-capture-shield-dark .va-capture-shield-card p { color: #cbd5e1 !important; }

:root {
    --va-font: 'Manrope', system-ui, -apple-system, sans-serif;
    --va-canvas: #f5f7fa; --va-surface: #ffffff; --va-surface-soft: #eef2f7;
    --va-ink: #192638; --va-muted: #59677a; --va-line: #dbe2eb;
    --va-accent: #245bd6; --va-accent-hover: #1c49b0; --va-on-accent: #ffffff;
    --va-tint: #e8efff; --va-tint-ink: #244a9d; --va-focus: #245bd6;
    --va-success: #18704b; --va-success-bg: #e4f3eb;
    --va-warning: #875900; --va-warning-bg: #fff3d6;
    --va-danger: #b62d3b; --va-danger-bg: #fce9eb;
    --va-contrast-surface: #ffffff; --va-contrast-ink: #192638; --va-contrast-muted: #59677a;
    --va-radius-card: 24px; --va-radius-control: 12px; --va-radius-pill: 999px;
    --va-space-1: 4px; --va-space-2: 8px; --va-space-3: 12px;
    --va-space-4: 16px; --va-space-6: 24px; --va-space-8: 32px;
    --va-space-10: 40px; --va-space-12: 48px; --va-space-16: 64px;
    --va-motion: 160ms;
}
:root[data-va-theme='dark'] {
    --va-canvas: #0b1630; --va-surface: #142341; --va-surface-soft: #1b2e52;
    --va-ink: #f4f7ff; --va-muted: #b8c8e2; --va-line: #38547f;
    --va-accent: #8fb3ff; --va-accent-hover: #adc7ff; --va-on-accent: #10254c;
    --va-tint: #243f70; --va-tint-ink: #d2dfff; --va-focus: #8fb3ff;
    --va-success: #79dbad; --va-success-bg: #173d36;
    --va-warning: #ffd683; --va-warning-bg: #493817;
    --va-danger: #ffb1bb; --va-danger-bg: #4a2735;
    --va-contrast-surface: #f7faff; --va-contrast-ink: #17243a; --va-contrast-muted: #526279;
}
/* Bridge the existing components to semantic roles, in both themes. */
:root[data-va-theme] {
    --bg: var(--va-canvas); --bg-secondary: var(--va-canvas); --header: var(--va-surface);
    --card: var(--va-surface); --card-hover: var(--va-surface-soft); --card-inner: var(--va-surface-soft);
    --text: var(--va-ink); --muted: var(--va-muted); --border: var(--va-line);
    --primary: var(--va-accent); --primary-dark: var(--va-accent-hover); --primary-light: var(--va-tint);
    --border-strong: var(--va-accent); --shadow: none;
    --success: var(--va-success); --success-bg: var(--va-success-bg); --success-light: var(--va-success-bg);
    --warning: var(--va-warning); --warning-bg: var(--va-warning-bg); --warning-light: var(--va-warning-bg);
    --error: var(--va-danger); --danger: var(--va-danger); --error-light: var(--va-danger-bg); --danger-bg: var(--va-danger-bg);
    --purple: var(--va-tint-ink);
}
.va-design { background: var(--va-canvas); color: var(--va-ink); font-family: var(--va-font); font-size: 1rem; line-height: 1.6; }
.va-design [hidden] { display: none !important; }
.va-design .background-glow { display: none; }
.va-design :is(button, input, textarea, select) { font-family: inherit; }
.va-design :is(h1,h2,h3,h4) { color: var(--va-ink); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.va-design :is(h2,h3,h4) { text-wrap: balance; }
.va-design :is(h2) { font-size: 1.4rem; }
.va-design :is(h3) { font-size: 1.1rem; }
.va-design a { text-underline-offset: 4px; }
.va-design :is(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--va-focus); outline-offset: 4px; }
.va-design :is(button,a) { transition: background var(--va-motion), color var(--va-motion), border-color var(--va-motion); }
.va-design :is(button,a):hover { transform: none; }
.va-design :is(.card,.content-card,.security-panel,.booking-choice-card,.review-card,.modal-card,.calendar-card,.course-card) {
    color: var(--va-ink); background: var(--va-surface); border: 1px solid var(--va-line);
    border-radius: var(--va-radius-card); box-shadow: none;
}
.va-design .card { padding: 32px; }
.va-design .card:hover { transform: none; box-shadow: none; border-color: var(--va-line); }
.va-design :is(.card-description,.hero-description,.student-info,.section-heading p,.booking-choice-card p,.booking-policy-note,.va-meta) { color: var(--va-muted); font-size: .9375rem; font-weight: 400; line-height: 1.65; }
.va-design :is(label,.field-label) { color: var(--va-ink); font-size: .875rem; font-weight: 600; }
.va-design :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
    color: var(--va-ink); background: var(--va-canvas); border: 1px solid var(--va-line);
    border-radius: var(--va-radius-control); padding: 12px 14px; box-shadow: none; font-size: 1rem; min-height: 46px;
}
.va-design :is(input,textarea)::placeholder { color: var(--va-muted); opacity: 1; }
.va-design select option { background: var(--va-surface); color: var(--va-ink); }
.va-design input:is([type=checkbox],[type=radio]) { accent-color: var(--va-accent); }
.va-design button { background: var(--va-accent); color: var(--va-on-accent); border: 1px solid transparent; border-radius: var(--va-radius-pill); min-height: 44px; font-size: .875rem; font-weight: 650; box-shadow: none; }
.va-design button:hover { background: var(--va-accent-hover); box-shadow: none; }
.va-design button:disabled { opacity: .55; cursor: not-allowed; }
.va-design button:is(.danger,.btn-danger,.delete-button),.va-design .booking-action-button.danger { color: var(--va-danger); background: var(--va-danger-bg); border-color: var(--va-danger); }
.va-design :is(.password-toggle,.modal-close,.close-modal,.calendar-close) { color: var(--va-muted); background: transparent; }
.va-design :is(.password-toggle,.modal-close,.close-modal,.calendar-close):hover { color: var(--va-ink); background: var(--va-surface-soft); }
.va-design .password-toggle { min-height: 38px; }
.va-design :is(.password-toggle,.va-password-toggle):hover { transform: translateY(-50%); }
.va-design .va-password-toggle { color: var(--va-muted); background: transparent; min-height: 38px; }
.va-design :is(.empty-state,.password-requirements,.editor-empty,.booking-history-empty,.review-access-message,.ai-notice) { background: var(--va-surface-soft); color: var(--va-muted); border-color: var(--va-line); box-shadow: none; border-radius: 16px; }
.va-design :is(.badge,.role-badge,.booking-type-badge,.badge-in-progress,.badge-not-started,.status-badge,.legacy-option) { background: var(--va-tint); color: var(--va-tint-ink); border: 1px solid transparent; font-size: .75rem; font-weight: 650; border-radius: 999px; }
.va-design :is(.badge-submitted,.badge-completed,.session-current-note,.appointment-status,.success) { color: var(--va-success); }
.va-design :is(.badge-submitted,.badge-completed,.appointment-status,.notice-item.success) { background: var(--va-success-bg); border-color: var(--va-success); }
.va-design :is(.notice-item.error,.error-message) { background: var(--va-danger-bg); color: var(--va-danger); border-color: var(--va-danger); }
.va-design :is(.badge-pending,.notice-item.warning,.warning-message) { background: var(--va-warning-bg); color: var(--va-warning); border-color: var(--va-warning); }
.va-design :is(.security-row,.archive-card,.archive-item,.editor-row,.test-result-card,.test-result-answer,.student-test-result,.booking-history-item,.booking-upcoming-item,.booking-record-card) { background: var(--va-surface); color: var(--va-ink); border-color: var(--va-line); box-shadow: none; }
.va-design :is(.current-admin-summary,.security-row-head,.test-result-title,.archive-title,.appointment-detail,.appointment-card h3,.booking-history-item strong) { color: var(--va-ink); }
.va-design :is(.scroll-region,.security-scroll-list) { scrollbar-color: var(--va-line) transparent; }
.va-design :is(.preview-box,.editor-panel,.inner-panel,.archive-toolbar,.archive-summary,.student-summary,.booking-policy-note) { background: var(--va-surface-soft); color: var(--va-muted); border-color: var(--va-line); }
.va-design :is(.card-heading,.section-heading) { margin-bottom: 24px; }
.va-design :is(.card-heading h2,.section-heading h2) { margin: 0 0 8px; }
.va-design :is(.card-heading p,.section-heading p) { margin: 0; }

/* Shared top bar and appearance selector. */
.va-design :is(header,.admin-header) { background: var(--va-surface); color: var(--va-ink); border-bottom: 1px solid var(--va-line); box-shadow: none; backdrop-filter: none; }
.va-design .header-inner { width: min(1440px, calc(100% - 64px)); min-height: 88px; gap: 24px; }
.va-design :is(.brand-title,#brand-title) { color: var(--va-ink); font-size: 1.05rem; font-weight: 750; letter-spacing: -.045em; }
.va-design .brand-subtitle { color: var(--va-muted); font-size: .75rem; font-weight: 500; letter-spacing: .02em; }
.va-design .brand-mark { background: var(--va-accent); color: var(--va-on-accent); width: 42px; height: 42px; border-radius: 14px; font-size: .95rem; font-weight: 750; border: none; box-shadow: none; }
.va-design :is(.header-link,.header-button,.header-nav-link,.header-logout,.public-header-link) { color: var(--va-muted); background: transparent; border: 0; font-size: .875rem; font-weight: 600; border-radius: 999px; min-height: 44px; padding: 10px 14px; }
.va-design :is(.header-link,.header-button,.header-nav-link,.header-logout,.public-header-link):hover { background: var(--va-surface-soft); color: var(--va-ink); }
.va-design .header-nav-link.current { color: var(--va-tint-ink); background: var(--va-tint); box-shadow: none; }
.va-design .va-theme-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--va-line); background: var(--va-canvas); border-radius: 999px; }
.va-design .va-theme-switch button { width: auto; min-height: 36px; padding: 7px 13px; margin: 0; color: var(--va-muted); background: transparent; font-size: .8125rem; border: 0; }
.va-design .va-theme-switch button[aria-pressed=true] { color: var(--va-on-accent); background: var(--va-accent); }
.va-design .va-theme-switch button:hover { color: var(--va-ink); background: var(--va-surface-soft); }
.va-design .va-theme-switch button[aria-pressed=true]:hover { color: var(--va-on-accent); background: var(--va-accent-hover); }
.va-design > .va-theme-switch-auto { position: fixed; z-index: 90; top: 16px; right: 16px; box-shadow: 0 8px 30px rgb(6 15 32 / .14); }
.va-design .va-theme-switch-icons { gap: 3px; padding: 3px; }
.va-design .va-theme-switch-icons button { width: 38px; min-width: 38px; min-height: 38px; padding: 0; display: inline-grid; place-items: center; font-size: 1.15rem; line-height: 1; }

/* Admin: calm workspace, persistent navigation, compact overview. */
.va-admin .page { width: min(1440px, calc(100% - 64px)); max-width: 1440px; padding: 0; margin: 0 auto 64px; }
.va-admin .hero { padding: 42px 0 36px 260px; margin: 0; border: 0; background: transparent; box-shadow: none; }
.va-admin .hero h1 { color: var(--va-ink); font-size: clamp(2rem, 3.5vw, 2.75rem); font-weight: 600; letter-spacing: -.045em; margin: 12px 0; }
.va-admin .hero-description { max-width: 720px; margin: 0; }
.va-admin .hero::before,.va-admin .hero::after { display: none; }
.va-admin .eyebrow,.va-eyebrow { color: var(--va-muted); font-size: .75rem; letter-spacing: .13em; font-weight: 700; background: none; border: 0; padding: 0; margin: 0; }
.va-admin .dashboard-layout { grid-template-columns: 228px minmax(0,1fr); gap: 32px; }
.va-admin .section-nav { top: 112px; padding: 0 16px 16px 0; max-height: calc(100vh - 136px); border: 0; border-right: 1px solid var(--va-line); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.va-admin .section-nav-title { color: var(--va-muted); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: none; padding: 0 12px; margin-bottom: 18px; }
.va-admin .section-nav-list { gap: 4px; }
.va-admin .section-nav-link { color: var(--va-muted); font-size: .875rem; line-height: 1.4; font-weight: 550; padding: 10px 12px; min-height: 42px; border: none; border-radius: 12px; }
.va-admin .section-nav-link:hover { color: var(--va-ink); background: var(--va-surface-soft); border: none; }
.va-admin .section-nav-link:is(.active,[aria-current=true]) { color: var(--va-tint-ink); background: var(--va-tint); box-shadow: none; border: none; }
.va-admin .section-nav-menu { min-width: 0; }
.va-admin .section-nav-menu details { min-width: 0; }
.va-admin .section-nav-menu summary {
    min-height: 42px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--va-muted);
    border-radius: 12px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    list-style: none;
}
.va-admin .section-nav-menu summary::-webkit-details-marker { display: none; }
.va-admin .section-nav-menu summary::after { content: '⌄'; color: var(--va-muted); font-size: 1rem; transition: transform var(--va-motion); }
.va-admin .section-nav-menu details[open] > summary { color: var(--va-ink); background: var(--va-surface-soft); }
.va-admin .section-nav-menu details[open] > summary::after { transform: rotate(180deg); }
.va-admin .section-nav-submenu { display: grid; gap: 2px; margin: 3px 0 8px 10px; padding: 3px 0 3px 8px; list-style: none; border-left: 1px solid var(--va-line); }
.va-admin .section-nav-submenu .section-nav-link { min-height: 38px; padding: 8px 10px; font-size: .8125rem; }
.va-admin .dashboard-grid { gap: 24px; }
.va-admin .dashboard-section { scroll-margin-top: 120px; }
.va-admin .dashboard-grid.dashboard-viewing { display: block; min-height: min(720px, calc(100dvh - 156px)); }
.va-admin .dashboard-grid .dashboard-section.dashboard-section-hidden { display: none !important; }
.va-admin .dashboard-grid.dashboard-viewing .dashboard-section.dashboard-section-visible {
    max-height: calc(100dvh - 132px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.va-admin .dashboard-home-button { color: var(--va-tint-ink); background: var(--va-tint); }
.va-overview { margin: 0 0 32px; scroll-margin-top: 120px; }
.va-section-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.va-section-line h2 { margin: 0; font-size: 1.125rem; }
.va-section-line > span,.va-meta { font-size: .8125rem; color: var(--va-muted); }
.va-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.va-metric { display: flex; flex-direction: column; align-items: stretch; padding: 24px; border: 1px solid var(--va-line); border-radius: 20px; background: var(--va-surface); color: var(--va-ink); text-decoration: none; }
.va-metric:hover { background: var(--va-tint); border-color: var(--va-accent); }
.va-metric strong { font-size: 2.5rem; font-weight: 550; line-height: 1.4; letter-spacing: -.055em; font-variant-numeric: tabular-nums; margin: 12px 0 4px; }
.va-metric-label { display: flex; justify-content: space-between; font-size: .875rem; font-weight: 650; }
.va-metric-label span { color: var(--va-accent); }
.va-metric > span:last-child { font-size: .75rem; color: var(--va-muted); }
.va-overview .va-meta { margin: 12px 0 0; }
.va-economic-overview { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--va-line); }
.va-economic-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.va-economic-metrics .va-metric strong { font-size: clamp(1.6rem, 2.2vw, 2.25rem); }
.va-chart-card { display: grid; gap: 16px; margin-top: 18px; padding: 20px 24px; border: 1px solid var(--va-line); border-radius: 20px; background: var(--va-surface); }
.va-chart-card > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: var(--va-ink); font-size: .875rem; font-weight: 650; }
.va-chart-card > div:first-child span { color: var(--va-muted); font-size: .75rem; font-weight: 400; }
.va-weekly-chart { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; min-height: 150px; }
.va-chart-column { min-width: 0; height: 100%; display: grid; grid-template-rows: 1fr auto auto; align-items: end; gap: 5px; text-align: center; }
.va-chart-column i { display: block; min-height: 5px; border-radius: 8px 8px 3px 3px; background: var(--va-accent); }
.va-chart-column strong { color: var(--va-ink); font-size: .8125rem; font-weight: 650; }
.va-chart-column span { color: var(--va-muted); font-size: .75rem; }
.va-admin .security-panel { background: var(--va-canvas); border-radius: 16px; padding: 24px; }
.va-admin .security-panel h3 { color: var(--va-ink); font-weight: 650; }
.va-admin .card-heading h2 { font-size: 1.5rem; }
.va-admin .current-admin-summary { font-size: .875rem; margin-bottom: 24px; }
.va-admin .security-panel form { gap: 16px; }
.va-admin :is(.adv-item,.archive-item,.archive-card) {
    color: var(--va-ink);
    background: var(--va-surface);
    border-color: var(--va-line);
}
.va-admin :is(.adv-item,.archive-item,.archive-card):hover {
    color: var(--va-ink);
    background: var(--va-tint);
    border-color: var(--va-accent);
}
.va-admin :is(.adv-item-title,.archive-title) { color: var(--va-ink); }
.va-admin :is(button:not(:disabled),a[href]) {
    transition: color var(--va-motion),background var(--va-motion),border-color var(--va-motion),box-shadow var(--va-motion),transform var(--va-motion);
}
.va-admin :is(button:not(:disabled),a[href]):hover {
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--va-accent) 17%,transparent),0 8px 20px rgb(20 40 80 / .13);
    transform: translateY(-1px);
}

/* Calendario amministrativo leggibile in entrambi i temi. */
.va-admin .trial-calendar-wrapper {
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}
.va-admin .trial-day-actions {
    color: var(--va-ink);
    background: var(--va-surface);
    border-color: var(--va-line);
}
.va-admin .trial-day-actions-copy strong { color: var(--va-ink); }
.va-admin .trial-day-actions-copy span { color: var(--va-muted); }
.va-admin .trial-day-tab {
    color: var(--va-muted);
    background: var(--va-surface);
    border-color: var(--va-line);
}
.va-admin .trial-day-tab:hover {
    color: var(--va-ink);
    background: var(--va-tint);
    border-color: var(--va-accent);
}
.va-admin .trial-day-tab.active,
.va-admin .trial-day-tab.active:hover {
    color: var(--va-on-accent);
    background: var(--va-accent);
    border-color: var(--va-accent);
}
.va-admin .trial-day-action-buttons .block-day {
    color: var(--va-danger);
    background: var(--va-danger-bg);
    border-color: var(--va-danger);
}
.va-admin .trial-day-action-buttons .free-day {
    color: var(--va-success);
    background: var(--va-success-bg);
    border-color: var(--va-success);
}
.va-admin :is(.booking-legend-item.free,.trial-slot-chip.free) {
    color: var(--va-success);
    background: var(--va-success-bg);
    border-color: var(--va-success);
}
.va-admin :is(.booking-legend-item.trial,.trial-slot-chip.trial) {
    color: #075985;
    background: #e0f2fe;
    border-color: #38bdf8;
}
.va-admin :is(.booking-legend-item.full,.trial-slot-chip.full) {
    color: #6b21a8;
    background: #f3e8ff;
    border-color: #a855f7;
}
.va-admin :is(.booking-legend-item.blocked,.trial-slot-chip.blocked) {
    color: var(--va-danger);
    background: var(--va-danger-bg);
    border-color: var(--va-danger);
}
.va-admin .trial-slot-chip { min-height: 72px; }
.va-admin .trial-slot-chip .slot-time {
    color: inherit;
    font-size: .86rem;
    font-weight: 750;
}
.va-admin .trial-slot-chip .slot-student {
    max-width: 100%;
    color: inherit;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}
:root[data-va-theme='dark'] .va-admin :is(.booking-legend-item.trial,.trial-slot-chip.trial) {
    color: #bae6fd;
    background: #123b52;
    border-color: #38bdf8;
}
:root[data-va-theme='dark'] .va-admin :is(.booking-legend-item.full,.trial-slot-chip.full) {
    color: #ead7ff;
    background: #34224c;
    border-color: #a855f7;
}

/* Student: a spacious introduction and a clear booking / course hierarchy. */
.va-student .header-inner { display: flex; flex-wrap: wrap; }
.va-student #brand-title { display: flex; align-items: center; gap: 12px; white-space: nowrap; margin-right: auto; }
.va-student #brand-title::before { content: 'VA'; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; font-size: .95rem; color: var(--va-on-accent); background: var(--va-accent); }
.va-student .va-theme-switch { order: 4; }
.va-student :is(.student-nav,.public-header-nav) { justify-content: flex-end; flex: 1 1 auto; gap: 2px; }
.va-student main { width: min(1200px, calc(100% - 64px)); max-width: 1200px; margin: 0 auto; padding: 0 0 64px; }
.va-student #student-section { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 32px; }
.va-student #student-section > * { grid-column: 1 / -1; min-width: 0; }
.va-student .student-hero { background: transparent; box-shadow: none; border: 0; padding: 48px 0 8px; margin: 0; border-radius: 0; }
.va-student #student-greeting { margin: 16px 0 12px; font-size: clamp(2.25rem,4vw,3.4rem); font-weight: 550; letter-spacing: -.055em; color: var(--va-ink); }
.va-student .student-info { max-width: 760px; }
.va-student .hero-actions { gap: 12px; margin: 24px 0 0; }
.va-student .hero-link { min-height: 46px; display: inline-flex; align-items: center; gap: 24px; padding: 12px 22px; border: 1px solid var(--va-line); color: var(--va-ink); background: var(--va-surface); border-radius: 999px; font-size: .875rem; font-weight: 650; text-decoration: none; box-shadow: none; }
.va-student .hero-link.primary { background: var(--va-accent); color: var(--va-on-accent); border-color: transparent; }
.va-student .hero-link:hover { background: var(--va-surface-soft); }
.va-student .hero-link.primary:hover { background: var(--va-accent-hover); }
.va-student #lesson-booking-section { grid-column: 1 / -1; margin: 0; padding: 32px; align-self: start; }
.va-student #recommended-courses-section { grid-column: 1 / -1; grid-row: auto; margin: 0; padding: 32px; border: 1px solid var(--va-line); border-radius: 24px; background: var(--va-surface); align-self: start; }
.va-student #recommended-courses-list { grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 16px; }
.va-student .section-heading h2 { font-size: 1.4rem; }
.va-student .booking-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.va-student .booking-choice-card { background: var(--va-canvas); padding: 24px; border-radius: 20px; border-color: var(--va-line); box-shadow: none; }
.va-student .booking-choice-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.va-student .booking-choice-card:has(.booking-type-badge) h3 { margin-top: 14px; }
.va-student .booking-choice-card .booking-type-badge { color: var(--va-tint-ink); background: var(--va-tint); font-weight: 650; }
.va-student .booking-choice-card button { color: var(--va-tint-ink); background: var(--va-tint); border: 0; padding: 12px 16px; }
.va-student .booking-choice-card button:hover { color: var(--va-on-accent); background: var(--va-accent); }
.va-student .booking-choice-card label { display: grid; gap: 8px; margin-top: 20px; font-weight: 550; }
.va-student .booking-choice-card select { width: 100%; margin: 0; background: var(--va-surface); }
.va-student .booking-choice-card > button { width: 100%; margin-top: 16px; }
.va-student .booking-state { color: var(--va-muted); background: var(--va-surface); border-color: var(--va-line); }
.va-student .booking-state:empty { display: none; }
.va-student .appointment-card { padding: 24px; border: 1px solid var(--va-success); border-radius: 20px; background: linear-gradient(115deg,var(--va-success-bg),var(--va-surface)); color: var(--va-ink); box-shadow: none; }
.va-student .appointment-entry { padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--va-ink); }
.va-student .appointment-card::before,.va-student .appointment-card::after { display: none; }
.va-student .appointment-card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 24px; }
.va-student .appointment-detail { min-width: 0; white-space: nowrap; font-size: .9375rem; font-weight: 650; background: transparent; border: 0; padding: 0; box-shadow: none; }
.va-student .appointment-entry .appointment-detail span { color: var(--va-muted); font-size: .75rem; font-weight: 500; }
.va-student .appointment-entry .appointment-status { background: var(--va-success-bg); color: var(--va-success); }
.va-student .appointment-status { white-space: nowrap; flex-shrink: 0; }
.va-student .appointment-entry .appointment-detail { background: transparent; color: var(--va-ink); }
.va-student .appointment-entry-header h3 { color: var(--va-ink); }
.va-student .booking-action-button {
    color: var(--va-tint-ink);
    background: var(--va-surface);
    border: 1px solid var(--va-line);
    transition: color var(--va-motion),background var(--va-motion),border-color var(--va-motion),box-shadow var(--va-motion),transform var(--va-motion);
}
.va-student .booking-action-button:hover {
    color: var(--va-on-accent);
    background: var(--va-accent);
    border-color: var(--va-accent);
    box-shadow: 0 8px 18px rgb(36 91 214 / .18);
    transform: translateY(-1px);
}
.va-student .booking-action-button.danger:hover {
    color: #ffffff;
    background: var(--va-danger);
    border-color: var(--va-danger);
    box-shadow: 0 8px 18px rgb(182 45 59 / .18);
    transform: translateY(-1px);
}
.va-student .booking-history-section { margin-top: 32px; border-color: var(--va-line); }
.va-student .booking-history-heading p { color: var(--va-muted); font-size: .875rem; }
.va-student .booking-history-list {
    max-height: 392px;
    padding-right: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}
.va-student :is(.modal-close,.review-modal-close) {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border: 1px solid var(--va-line);
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
}
.va-student :is(.modal-close,.review-modal-close):hover {
    color: var(--va-on-accent);
    background: var(--va-accent);
    border-color: var(--va-accent);
}
:root[data-va-theme='dark'] .va-student #review-section .review-consent-box {
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}
:root[data-va-theme='dark'] .va-student #review-section .review-consent-box .inline-checkbox { color: var(--va-ink); }
:root[data-va-theme='dark'] .va-student #review-section .review-consent-box p { color: var(--va-muted); }
:root[data-va-theme='dark'] .va-student #review-section .review-consent-box a { color: var(--va-accent); }
.va-student .student-section-block { margin: 0; }
.va-student .content-card { background: var(--va-canvas); padding: 24px; border-radius: 20px; }
.va-student .content-card h3 { color: var(--va-ink); font-size: 1.125rem; }
.va-student .content-card p { color: var(--va-muted); }
.va-student .content-card a { color: var(--va-accent); }
.va-student .course-card { padding: 24px; background: var(--va-canvas); border-radius: 20px; }
.va-student .course-card h3 { color: var(--va-ink); font-size: 1.25rem; margin: 12px 0; font-weight: 650; }
.va-student .course-card-description { color: var(--va-muted); font-size: .9375rem; line-height: 1.65; }
.va-student :is(.content-badge.course,.va-course-subject) { color: var(--va-tint-ink); background: var(--va-tint); display: inline-block; align-self: flex-start; padding: 5px 10px; border-radius: 999px; font-size: .75rem; font-weight: 650; }
.va-student :is(.enroll-button,.course-enroll-button) { background: var(--va-surface); color: var(--va-tint-ink); border: 1px solid var(--va-line); box-shadow: none; margin-top: 24px; }
.va-student :is(.enroll-button,.course-enroll-button):hover { background: var(--va-tint); color: var(--va-tint-ink); }
.va-student :is(.profile-reminder,.booking-eligibility-message,.verify-warning-banner,.guardian-warning-banner) { background: var(--va-warning-bg); color: var(--va-warning); border-color: var(--va-warning); border-radius: 16px; }
.va-student .booking-eligibility-message { display: flex; align-items: flex-start; gap: 14px; padding: 18px; margin-bottom: 20px; }
.va-student .booking-alert-mark { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; font-weight: 800; }
.va-student .booking-alert-copy { display: grid; gap: 4px; }
.va-student .booking-alert-copy > span { color: var(--va-ink); }
.va-student .booking-alert-copy :is(a,button) { width: fit-content; min-height: 0; margin: 4px 0 0; padding: 0; color: var(--va-warning); background: transparent; border: 0; border-radius: 0; font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.va-student .booking-alert-copy :is(a,button):hover { color: var(--va-ink); background: transparent; }
.va-student :is(.social-section,.public-story-section,.platform-section,.free-registration-banner,.trial-cta) { background: var(--va-surface); color: var(--va-ink); border-color: var(--va-line); box-shadow: none; }
.va-student :is(.public-story-copy,.platform-copy,.social-card,.social-grid a,.free-registration-banner p) { color: var(--va-muted); }
.va-student .social-grid a { background: var(--va-contrast-surface); color: var(--va-contrast-ink); border-color: color-mix(in srgb,var(--va-contrast-muted) 32%,transparent); }
.va-student .social-grid a :is(strong,h3) { color: var(--va-contrast-ink); }
.va-student .social-grid a :is(span,p,.social-copy) { color: var(--va-contrast-muted); }
.va-student .back-to-student-top { color: var(--va-on-accent); background: var(--va-accent); }
.va-student #reviews-public-section { scroll-margin-top: 112px; }
.va-student :is(.slot-chip.unavailable,.slot-chip.disabled,.slot-chip.taken,.slot-chip.booked,.slot-chip.trial,.slot-chip.full,.slot-chip.blocked):disabled {
    color: #ffffff !important;
    background: #dc2626 !important;
    border-color: #b91c1c !important;
    opacity: 1;
}
.va-student footer { color: var(--va-muted); background: var(--va-canvas); border-color: var(--va-line); }
.va-student footer.legal-footer {
    color: #17243a !important;
    background: transparent !important;
    border: 0 !important;
}
.va-student footer.legal-footer :is(a,a:visited,a:hover,a:focus-visible) {
    color: #17243a !important;
}
:root[data-va-theme='dark'] .va-student footer.legal-footer,
:root[data-va-theme='dark'] .va-student footer.legal-footer :is(a,a:visited,a:hover,a:focus-visible) {
    color: #ffffff !important;
}
.va-student.auth-pending::before { background: var(--va-canvas); color: var(--va-muted); font-weight: 500; }
.va-design :is(.modal-overlay,.va-modal-overlay) { background: rgb(8 16 30 / .6); }
.va-design :is(.modal-card,.va-modal-dialog,.calendar-panel,.trial-calendar-panel) { background: var(--va-surface); color: var(--va-ink); border: 1px solid var(--va-line); box-shadow: 0 24px 80px rgb(0 0 0 / .2); }
.va-design .va-modal-message { color: var(--va-muted); }
.va-design .va-modal-field { color: var(--va-ink); }
.va-design .va-modal-checkbox-field { color: var(--va-ink); background: var(--va-canvas); border-color: var(--va-line); }
.va-design .va-modal-button.secondary { color: var(--va-tint-ink); background: var(--va-tint); }
.va-design .va-modal-button.primary { color: var(--va-on-accent); background: var(--va-accent); }
.va-design .va-modal-button.primary.danger,.va-design .va-modal-error { color: var(--va-danger); background: var(--va-danger-bg); }
.va-design :is(.va-ai-notice,.enroll-requirements,.support-account-summary) { color: var(--va-muted); background: var(--va-surface-soft); border-color: var(--va-line); }

/* Authentication and account verification. */
.va-auth,.va-verification { min-height: 100vh; padding: 72px 24px 32px; background: var(--va-canvas); }
.va-auth main,.va-verification main { width: min(540px,100%); margin: auto; }
.va-auth .card,.va-verification .card { padding: clamp(28px,6vw,44px); border: 1px solid var(--va-line); border-radius: 28px; background: var(--va-surface); box-shadow: none; }
.va-auth :is(h1,h2),.va-verification h1 { color: var(--va-ink); }
.va-auth :is(p,.field-help,.remember-help,.session-security-note),.va-verification :is(.message,.note) { color: var(--va-muted); }
.va-auth :is(.legal-box,.guardian-box,.guardian-student-summary,.session-security-note),.va-verification .note { color: var(--va-muted); background: var(--va-surface-soft); border-color: var(--va-line); border-radius: 16px; }
.va-auth :is(.switch-auth,.text-link,.back-link),.va-verification .secondary { color: var(--va-tint-ink); }
.va-auth .secondary,.va-verification .secondary { color: var(--va-tint-ink); background: var(--va-tint); border-color: transparent; }
.va-auth .secondary:hover { color: var(--va-tint-ink); background: color-mix(in srgb,var(--va-tint) 78%,var(--va-accent)); }
.va-verification .primary { color: var(--va-on-accent); background: var(--va-accent); }
.va-verification .icon { border: 1px solid currentColor; }
.va-auth .status,.va-auth .success-panel { border-radius: 16px; box-shadow: none; }

/* Student profile. */
.va-profile main { width: min(980px,calc(100% - 48px)); padding-top: 48px; }
.va-profile .page-intro { padding: 0 0 28px; }
.va-profile .page-intro h1 { margin: 8px 0 10px; font-size: clamp(2rem,5vw,3rem); font-weight: 550; letter-spacing: -.05em; }
.va-profile :is(.intro-text,.field-help,.field-guidance,.profile-summary) { color: var(--va-muted); }
.va-profile .form-section {
    min-width: 0;
    padding: clamp(20px,3vw,28px);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}
.va-profile :is(.form-grid,label) { min-width: 0; }
.va-profile :is(input:not([type=checkbox]):not([type=radio]),select) {
    width: 100%;
    max-width: 100%;
}
.va-profile .form-section-heading { color: var(--va-ink); }
.va-profile :is(.guardian-status-box,.legal-status-box,.age-preview) { color: var(--va-muted); background: var(--va-surface-soft); border-color: var(--va-line); border-radius: 16px; }
.va-profile :is(.submit-button,.secondary-button) { min-height: 48px; padding-inline: 22px; }
.va-profile .secondary-button { color: var(--va-tint-ink); background: var(--va-tint); }
:root[data-va-theme='dark'] .va-profile .profile-summary {
    color: var(--va-warning);
    background: var(--va-warning-bg);
    border-color: var(--va-warning);
}
:root[data-va-theme='dark'] .va-profile :is(.legal-checks,.guardian-section) {
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}
:root[data-va-theme='dark'] .va-profile .guardian-section :is(h3,p) { color: var(--va-ink); }
:root[data-va-theme='dark'] .va-profile :is(input[readonly],input:disabled,select:disabled,.age-preview) {
    color: var(--va-muted);
    background: var(--va-canvas);
    border-color: var(--va-line);
}
:root[data-va-theme='dark'] .va-profile .checkbox-label a { color: var(--va-accent); }

/* Learning library, courses, lessons and tests. */
:root[data-va-theme] {
    --learning-bg: var(--va-canvas); --learning-surface: var(--va-surface); --learning-surface-soft: var(--va-surface-soft);
    --learning-text: var(--va-ink); --learning-muted: var(--va-muted); --learning-border: var(--va-line);
    --learning-primary: var(--va-accent); --learning-primary-dark: var(--va-accent-hover); --learning-primary-soft: var(--va-tint);
    --learning-success: var(--va-success); --learning-success-soft: var(--va-success-bg);
    --learning-warning: var(--va-warning); --learning-warning-soft: var(--va-warning-bg);
    --learning-danger: var(--va-danger); --learning-danger-soft: var(--va-danger-bg);
    --learning-header: var(--va-surface); --learning-sidebar: var(--va-surface); --learning-shadow: none;
    --learning-radius-large: 24px; --learning-radius-medium: 16px; --learning-radius-small: 12px;
}
body.va-learning { color: var(--va-ink); background: var(--va-canvas); }
body.va-learning .learning-header { color: var(--va-ink); background: var(--va-surface); border-bottom: 1px solid var(--va-line); box-shadow: none; backdrop-filter: none; }
body.va-learning .learning-header-inner { width: min(1200px,calc(100% - 48px)); min-height: 88px; gap: 16px; }
body.va-learning .learning-brand { color: var(--va-ink); font-size: 1.05rem; font-weight: 750; letter-spacing: -.04em; }
body.va-learning .learning-brand::before { content: 'VA'; display: inline-grid; place-items: center; width: 42px; height: 42px; margin-right: 12px; border-radius: 14px; color: var(--va-on-accent); background: var(--va-accent); font-size: .9rem; }
body.va-learning :is(.learning-nav-link,.learning-logout) { min-height: 42px; padding: 9px 13px; color: var(--va-muted); background: transparent; border-radius: 999px; font-size: .875rem; font-weight: 600; }
body.va-learning :is(.learning-nav-link,.learning-logout):hover { color: var(--va-ink); background: var(--va-surface-soft); }
body.va-learning .learning-nav-link.current { color: var(--va-tint-ink); background: var(--va-tint); }
body.va-learning .learning-logout { color: var(--va-danger); }
body.va-learning :is(.learning-page,.learning-layout) { width: min(1200px,calc(100% - 48px)); margin: 40px auto 72px; }
body.va-learning .learning-hero { padding: clamp(28px,5vw,48px); color: var(--va-ink); background: var(--va-surface); border: 1px solid var(--va-line); border-radius: 28px; box-shadow: none; }
body.va-learning .learning-eyebrow { color: var(--va-muted); }
body.va-learning .learning-hero h1 { color: var(--va-ink); font-size: clamp(2.25rem,5vw,3.4rem); font-weight: 550; }
body.va-learning :is(.learning-hero-description,.learning-student-email) { color: var(--va-muted); }
body.va-learning :is(.summary-card,.learning-section,.learning-main-card,.library-card,.course-intro-card,.course-continue-card,.lesson-block,.test-question,.test-intro,.embedded-test-shell) { color: var(--va-ink); background: var(--va-surface); border-color: var(--va-line); border-radius: 20px; box-shadow: none; }
body.va-learning .summary-value { color: var(--va-ink); font-size: 2rem; font-weight: 550; }
body.va-learning :is(.summary-label,.library-card-description,.library-card-meta,.content-description,.overview-description,.index-subtitle,.lesson-block-text,.test-answer-note,.test-autosave-status) { color: var(--va-muted); }
body.va-learning .course-sidebar { color: var(--va-ink); background: var(--va-surface); border: 1px solid var(--va-line); border-radius: 20px; box-shadow: none; }
body.va-learning :is(.sidebar-back,.course-index-item) { color: var(--va-muted); background: transparent; border-color: var(--va-line); }
body.va-learning .course-index-item:hover,body.va-learning .course-index-item.current { color: var(--va-tint-ink); background: var(--va-tint); }
body.va-learning :is(.learning-badge,.index-type,.question-meta) { color: var(--va-tint-ink); background: var(--va-tint); border-radius: 999px; }
body.va-learning :is(.learning-button,.test-submit-button) { color: var(--va-on-accent); background: var(--va-accent); border-radius: 999px; box-shadow: none; }
body.va-learning :is(.learning-button-secondary,.content-navigation a,.embedded-external-link) { color: var(--va-tint-ink); background: var(--va-tint); border-color: var(--va-line); }
body.va-learning :is(.test-option,.test-open-text,.test-text-input,.embedded-test-workspace,.notice-block,.progress-track) { color: var(--va-ink); background: var(--va-surface-soft); border-color: var(--va-line); }
body.va-learning .progress-fill { background: var(--va-accent); }
body.va-learning .library-card.course,body.va-learning .library-card.lesson,body.va-learning .library-card.test { background: var(--va-surface); border-color: var(--va-line); box-shadow: none; }
body.va-learning .library-card.course .learning-button { background: var(--va-accent); }
body.va-learning .learning-badge.course { color: var(--va-tint-ink); background: var(--va-tint); }
body.va-learning.auth-pending::after { color: var(--va-muted); background: var(--va-canvas); }

/* Detailed admin student record. */
.va-admin-detail { background: var(--va-canvas); color: var(--va-ink); }
.va-admin-detail .topbar { color: var(--va-ink); background: var(--va-surface); border-color: var(--va-line); box-shadow: none; backdrop-filter: none; }
.va-admin-detail .topbar-inner,.va-admin-detail .page { width: min(1240px,calc(100% - 48px)); }
.va-admin-detail .brand strong { color: var(--va-ink); }
.va-admin-detail .brand span { color: var(--va-muted); }
.va-admin-detail .button { color: var(--va-tint-ink); background: var(--va-tint); border-color: transparent; border-radius: 999px; }
.va-admin-detail .button.primary { color: var(--va-on-accent); background: var(--va-accent); }
.va-admin-detail .hero { color: var(--va-ink); background: var(--va-surface); border-color: var(--va-line); border-radius: 28px; box-shadow: none; }
.va-admin-detail :is(.eyebrow,.hero-email,.summary-label,.section-copy,.data-label,.assignment-card p,.stat span) { color: var(--va-muted); }
.va-admin-detail :is(.summary-card,.section-card,.data-field,.assignment-card,.stat,.loading,.empty) { color: var(--va-ink); background: var(--va-surface); border-color: var(--va-line); box-shadow: none; }
.va-admin-detail :is(.summary-value,.data-value,.stat strong,th,td) { color: var(--va-ink); }
.va-admin-detail .tabs { background: var(--va-canvas); border-color: var(--va-line); backdrop-filter: none; }
.va-admin-detail .tab-button { color: var(--va-muted); border-radius: 999px; }
.va-admin-detail .tab-button.active { color: var(--va-on-accent); background: var(--va-accent); }
.va-admin-detail :is(th,.table-wrap) { background: var(--va-surface-soft); border-color: var(--va-line); }
.va-admin-detail :is(td,th) { border-color: var(--va-line); }

/* Legal pages. */
.va-legal { background: var(--va-canvas); color: var(--va-ink); }
.va-legal main { width: min(940px,calc(100% - 48px)); margin: 72px auto 40px; padding: clamp(28px,5vw,48px); background: var(--va-surface); border: 1px solid var(--va-line); border-radius: 28px; box-shadow: none; }
.va-legal h1 { margin-top: 0; font-size: clamp(2rem,5vw,3rem); font-weight: 550; letter-spacing: -.05em; }
.va-legal h2 { padding-top: 8px; border-top: 1px solid var(--va-line); }
.va-legal :is(.meta,.small) { color: var(--va-muted); }
.va-legal :is(a,.back) { color: var(--va-accent); }
.va-legal .notice { color: var(--va-tint-ink); background: var(--va-tint); border-color: var(--va-accent); border-radius: 16px; }
.va-legal .warning { color: var(--va-warning); background: var(--va-warning-bg); border-color: var(--va-warning); border-radius: 16px; }
.va-legal :is(table,th,td) { color: var(--va-ink); border-color: var(--va-line); }
.va-legal th,.va-legal code { color: var(--va-ink); background: var(--va-surface-soft); }

/* Privacy, Termini e Cookie Policy restano sempre in modalità chiara. */
html[data-va-theme] body.va-legal.va-legal-fixed-light,
body.va-legal.va-legal-fixed-light {
    color: #182033 !important;
    background: #f4f7fb !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light main,
body.va-legal.va-legal-fixed-light main {
    color: #182033 !important;
    background: #ffffff !important;
    border-color: #d9e2ef !important;
    box-shadow: 0 18px 45px rgb(15 23 42 / .07) !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light :is(h1,h2,h3,p,li,address,strong,td,th,code),
body.va-legal.va-legal-fixed-light :is(h1,h2,h3,p,li,address,strong,td,th,code) {
    color: #182033 !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light :is(.meta,.small),
body.va-legal.va-legal-fixed-light :is(.meta,.small) {
    color: #667085 !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light :is(a,.back),
body.va-legal.va-legal-fixed-light :is(a,.back) {
    color: #1d4ed8 !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light .notice,
body.va-legal.va-legal-fixed-light .notice {
    color: #1e3a8a !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light .warning,
body.va-legal.va-legal-fixed-light .warning {
    color: #9a3412 !important;
    background: #fff7ed !important;
    border-color: #fed7aa !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light :is(th,code),
body.va-legal.va-legal-fixed-light :is(th,code) {
    background: #f8fafc !important;
}
html[data-va-theme] body.va-legal.va-legal-fixed-light :is(table,th,td),
body.va-legal.va-legal-fixed-light :is(table,th,td) {
    border-color: #d9e2ef !important;
}

@media (max-width: 1200px) {
    .va-metric { padding: 20px; }
    .va-admin .dashboard-layout { grid-template-columns: 200px minmax(0,1fr); gap: 24px; }
    .va-admin .hero { padding-left: 224px; }
    .va-student .header-inner { padding-block: 16px; gap: 12px; }
    .va-student :is(.student-nav,.public-header-nav) { order: 5; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; }
    .va-admin .admin-security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
    .va-admin .hero { padding-left: 0; }
    .va-admin .dashboard-layout { grid-template-columns: 1fr; }
    .va-admin .section-nav { top: 88px; padding: 8px; background: var(--va-canvas); border: 1px solid var(--va-line); border-radius: 16px; overflow: visible; max-height: none; }
    .va-admin .section-nav-list { display: flex; flex-wrap: wrap; width: 100%; gap: 4px; }
    .va-admin .section-nav-list > li { flex: 1 1 auto; }
    .va-admin .section-nav-list > li:first-child { flex: 0 0 auto; }
    .va-admin .section-nav-menu details { position: relative; }
    .va-admin .section-nav-menu .section-nav-submenu {
        position: absolute;
        z-index: 50;
        top: calc(100% + 5px);
        left: 0;
        width: min(300px, calc(100vw - 48px));
        margin: 0;
        padding: 8px;
        background: var(--va-surface);
        border: 1px solid var(--va-line);
        border-radius: 14px;
        box-shadow: 0 14px 34px rgb(23 36 58 / .14);
    }
    .va-admin .section-nav-title { display: none; }
    .va-admin .dashboard-section,.va-overview { scroll-margin-top: 168px; }
    .va-admin .dashboard-grid.dashboard-viewing .dashboard-section.dashboard-section-visible { max-height: none; }
    .va-student #student-section { grid-template-columns: 1fr; gap: 24px; }
    .va-student #student-section > .student-section-block:has(#recommended-courses-list),.va-student #lesson-booking-section { grid-column: 1; }
    .va-student #recommended-courses-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .va-design .header-inner { width: calc(100% - 32px); gap: 12px; min-height: 76px; }
    .va-admin .header-inner { display: flex; flex-wrap: wrap; padding: 16px 0; }
    .va-admin .header-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
    .va-admin .header-actions > * { flex: 0 1 auto; }
    .va-admin .section-nav { top: 0; position: sticky; z-index: 80; }
    .va-admin .page,.va-student main { width: calc(100% - 32px); }
    .va-design .card,.va-student #lesson-booking-section,.va-student #student-section > .student-section-block:has(#recommended-courses-list) { padding: 24px; }
    .va-admin .hero { padding: 32px 0; }
    .va-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .va-economic-metrics { grid-template-columns: 1fr; }
    .va-chart-card { padding: 18px; }
    .va-chart-card > div:first-child { display: grid; gap: 3px; }
    .va-metric { padding: 18px; }
    .va-metric strong { font-size: 2rem; }
    .va-metric > span:last-child { font-size: .75rem; }
    .va-section-line { align-items: flex-start; flex-direction: column; gap: 4px; }
    .va-admin .dashboard-grid,.va-admin .admin-security-grid { grid-template-columns: 1fr; }
    .va-admin .security-panel { padding: 18px; }
    .va-student #brand-title { font-size: .9375rem; gap: 8px; }
    .va-student #brand-title::before { width: 32px; height: 32px; border-radius: 10px; font-size: .75rem; }
    .va-student .va-theme-switch { gap: 0; padding: 3px; }
    .va-student .va-theme-switch button { padding: 7px 9px; font-size: .75rem; }
    .va-student .student-hero { padding: 32px 0 8px; }
    .va-student #student-greeting { font-size: 2.25rem; }
    .va-student .booking-choice-grid,.va-student #recommended-courses-list { grid-template-columns: 1fr; }
    .va-student .appointment-card-grid { grid-template-columns: 1fr; gap: 12px; }
    .va-student .appointment-detail { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
    .va-student .appointment-entry .appointment-detail span { flex: 0 0 auto; }
    .va-student .appointment-entry-header { flex-wrap: wrap; align-items: flex-start; }
    .va-student .hero-actions { flex-wrap: wrap; }
    .va-design :is(.card,.security-panel,.content-card) { overflow-wrap: anywhere; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .va-design *, .va-design *::before, .va-design *::after { transition: none !important; animation: none !important; }
}

/* Studio 04 · home pubblica e accesso sempre chiari. */
body.va-public-mixed {
    --va-canvas: #ffffff;
    --va-surface: #ffffff;
    --va-surface-soft: #f3f6fa;
    --va-ink: #17243a;
    --va-muted: #526279;
    --va-line: #dbe2eb;
    --va-accent: #2d63dc;
    --va-accent-hover: #214fb9;
    --va-on-accent: #ffffff;
    --va-tint: #e7efff;
    --va-tint-ink: #244a9d;
    min-height: 100vh;
    background: var(--va-canvas);
    color-scheme: light;
}
body.va-public-mixed :is(header,.admin-header) {
    color: var(--va-ink);
    background: #ffffff;
    border-color: var(--va-line);
}
body.va-public-mixed header :is(#brand-title,.brand-title,h1) { color: var(--va-ink); }
body.va-public-mixed header :is(.public-header-link,.header-nav-link) { color: var(--va-muted); }
body.va-public-mixed header :is(.public-header-link,.header-nav-link):hover {
    color: var(--va-ink);
    background: var(--va-surface-soft);
}
body.va-public-mixed .va-theme-switch { display: none !important; }
body.va-public-mixed.va-auth main { color: var(--va-ink); }
body.va-public-mixed.va-student #public-section {
    padding-top: clamp(40px,6vw,72px);
}
body.va-public-mixed.va-student .trial-cta {
    padding: clamp(40px,6vw,64px) clamp(24px,5vw,56px);
    border: 1px solid var(--va-line);
}
body.va-public-mixed.va-student .trial-cta h2 {
    margin-bottom: 16px;
    font-size: clamp(2rem,5vw,3.35rem);
}
body.va-public-mixed.va-student .trial-cta > p {
    max-width: 720px;
    margin: 0 auto 30px;
}
body.va-public-mixed.va-student .btn-trial {
    min-height: 58px;
    padding: 16px 30px;
    color: var(--va-on-accent);
    background: var(--va-accent);
    font-size: 1.075rem;
    font-weight: 750;
    box-shadow: 0 10px 26px rgb(45 99 220 / .22);
}
body.va-public-mixed.va-student .btn-trial:hover {
    color: var(--va-on-accent);
    background: var(--va-accent-hover);
}
body.va-public-mixed #public-section > :is(section,div) {
    color: var(--va-ink);
    background: var(--va-surface);
    border-color: var(--va-line);
}
body.va-public-mixed #public-section :is(h1,h2,h3,h4,strong) { color: var(--va-ink); }
body.va-public-mixed #public-section :is(p,small,.public-story-kicker) { color: var(--va-muted); }
body.va-public-mixed footer {
    color: var(--va-muted);
    background: #ffffff;
    border-color: var(--va-line);
}
body.va-public-mixed footer a { color: var(--va-tint-ink); }

.va-design *, .va-design *::before, .va-design *::after { box-sizing: border-box; }
.va-design :is(
    .card,.content-card,.security-panel,.booking-choice-card,.review-card,
    .modal-card,.calendar-card,.course-card,.archive-card,.archive-item,
    .editor-panel,.editor-row,.library-card,.learning-section,.summary-card
) {
    min-width: 0;
    overflow-wrap: anywhere;
}
.va-design :is(
    .card,.content-card,.security-panel,.booking-choice-card,.review-card,
    .course-card,.archive-card,.archive-item,.editor-panel,.editor-row,
    .library-card,.learning-section,.summary-card
) > :first-child { margin-top: 0; }
.va-design :is(
    .card,.content-card,.security-panel,.booking-choice-card,.review-card,
    .course-card,.archive-card,.archive-item,.editor-panel,.editor-row,
    .library-card,.learning-section,.summary-card
) > :last-child { margin-bottom: 0; }
.va-design button:disabled {
    color: var(--va-muted) !important;
    background: var(--va-surface-soft) !important;
    border-color: var(--va-line) !important;
    opacity: 1;
}
.va-design :is(.empty-state,.editor-empty,.archive-empty,.booking-history-empty) {
    padding: 18px 20px;
}
.va-admin .dashboard-grid > .card,
.va-admin .admin-security-grid > .security-panel { align-self: start; }
.va-admin :is(.card,.security-panel) { padding: clamp(22px,3vw,30px); }
.va-admin :is(.adv-item,.security-row,.archive-item,.editor-row) { padding: 18px; }
.va-admin :is(.adv-item-description,.course-audience-summary,.course-video-summary) {
    margin-top: 8px;
    color: var(--va-muted);
    font-size: .84rem;
    line-height: 1.55;
}
.va-admin .course-audience-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.va-admin .course-audience-summary strong { color: var(--va-ink); }
.va-admin .course-video-summary { color: var(--va-tint-ink); overflow-wrap: anywhere; }
.va-admin select[multiple] { min-height: 190px; padding: 8px; }
.va-admin select[multiple] option { padding: 8px 10px; border-radius: 8px; }
.va-admin .field-guidance { display: block; margin-top: 7px; color: var(--va-muted); font-size: .78rem; font-weight: 450; }

.va-student .booking-choice-card {
    align-self: start;
    min-height: 0;
    padding: clamp(22px,3vw,28px);
}
.va-student .booking-choice-card label { margin-top: 18px; }
.va-student .booking-choice-card > button { margin-top: 18px; }
.va-student .appointment-entry + .appointment-entry {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--va-line);
}
.va-student .course-card,
body.va-learning .library-card { padding: clamp(20px,3vw,26px); }
body.va-learning .library-card.locked { background: var(--va-surface-soft); }
body.va-learning .library-card.locked .learning-button { width: 100%; }
body.va-learning :is(.learning-section,.summary-card,.learning-main-card,.course-intro-card,.course-continue-card) {
    padding: clamp(22px,3vw,30px);
}

/* Le superfici a contrasto restano leggibili; i social seguono invece il tema. */
:root[data-va-theme='dark'] .va-design .contrast-card {
    color: var(--va-contrast-ink);
    background: var(--va-contrast-surface);
}
:root[data-va-theme='dark'] .va-design .contrast-card :is(h1,h2,h3,h4,strong) {
    color: var(--va-contrast-ink);
}
:root[data-va-theme='dark'] .va-design .contrast-card :is(p,span,small) {
    color: var(--va-contrast-muted);
}
:root[data-va-theme='dark'] .va-student .social-grid a {
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}
:root[data-va-theme='dark'] .va-student .social-grid a :is(strong,h3) { color: var(--va-ink); }
:root[data-va-theme='dark'] .va-student .social-grid a :is(span,p,.social-copy) { color: var(--va-muted); }
:root[data-va-theme='dark'] .va-student .about-card,
:root[data-va-theme='dark'] .va-student .about-media-card,
:root[data-va-theme='dark'] .va-student .about-detail,
:root[data-va-theme='dark'] .va-student .about-stat,
:root[data-va-theme='dark'] .va-student .about-principle {
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}
:root[data-va-theme='dark'] .va-student .about-content :is(h3,strong,summary),
:root[data-va-theme='dark'] .va-student .about-profile-line strong { color: var(--va-ink); }
:root[data-va-theme='dark'] .va-student .about-content :is(p,span),
:root[data-va-theme='dark'] .va-student .about-profile-line span { color: var(--va-muted); }
:root[data-va-theme='dark'] .va-student .review-read-more {
    color: var(--va-tint-ink);
    background: var(--va-tint);
    border-color: var(--va-line);
}
:root[data-va-theme='dark'] .va-student :is(.slot-chip.unavailable,.slot-chip.disabled,.slot-chip.taken,.slot-chip.booked,.slot-chip.trial,.slot-chip.full,.slot-chip.blocked) {
    color: #fff;
    background: #b91c1c;
    border-color: #f87171;
}

.va-student #appointment-card.appointment-card {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.va-student #appointment-card .appointment-entry {
    padding: 24px;
    border: 1px solid var(--va-success);
    border-radius: 20px;
    background: linear-gradient(115deg, var(--va-success-bg), var(--va-surface));
    color: var(--va-ink);
    box-shadow: none;
}
.va-student .appointment-title-group { min-width: 0; }
.va-student .appointment-deadline {
    margin: 5px 0 0;
    color: var(--va-muted);
    font-size: .875rem;
    line-height: 1.45;
    text-decoration: none;
}

@media (max-width: 640px) {
    .va-admin :is(.card,.security-panel),
    .va-student :is(.card,.student-section-block,.booking-choice-card),
    body.va-learning :is(.learning-section,.summary-card,.library-card) {
        padding: 20px;
    }
}

/* Intestazione coerente nelle tre sezioni dell'account studente. */
.va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-header-inner {
    width: min(1440px, calc(100% - 64px));
    min-height: 88px;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 24px;
}
.va-student .student-account-header:has(.student-account-nav:not(.hidden)) #brand-title {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 0;
    color: var(--va-ink);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}
.va-student .student-account-header:has(.student-account-nav:not(.hidden)) #brand-title::before {
    content: 'VA';
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 14px;
    color: var(--va-on-accent);
    background: var(--va-accent);
    font-size: .95rem;
    font-weight: 750;
    letter-spacing: normal;
}
.va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-nav {
    grid-column: 2;
    display: grid;
    grid-template-columns: 236px auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    overflow: visible;
}
.va-student .student-account-context {
    width: 236px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}
.va-student .student-account-primary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    white-space: nowrap;
}
.va-student .student-account-placeholder {
    visibility: hidden;
    pointer-events: none;
}
.va-student .student-account-header :is(.header-nav-link,.learning-nav-link,.header-logout,.learning-logout) {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    color: var(--va-muted);
    background: transparent;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.va-student .student-account-header :is(.header-nav-link,.learning-nav-link):hover {
    color: var(--va-ink);
    background: var(--va-surface-soft);
}
.va-student .student-account-header :is(.header-nav-link,.learning-nav-link).current {
    color: var(--va-tint-ink);
    background: var(--va-tint);
}
.va-student .student-account-header :is(.header-logout,.learning-logout) {
    color: #ffffff;
    background: #b62d3b;
    border: 1px solid #b62d3b;
}
.va-student .student-account-header :is(.header-logout,.learning-logout):hover {
    color: #ffffff;
    background: #941f2d;
    border-color: #941f2d;
    box-shadow: 0 6px 16px rgb(148 31 45 / .2);
}

/* Il selettore studente vive nel Profilo e occupa solo lo spazio necessario. */
.va-profile .profile-theme-control {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 6px 7px 6px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--va-ink);
    background: var(--va-surface);
    border: 1px solid var(--va-line);
    border-radius: 999px;
}
.va-profile .profile-theme-control > span {
    color: var(--va-ink);
    font-size: .875rem;
    font-weight: 650;
    white-space: nowrap;
}
.va-profile .profile-theme-control .va-theme-switch {
    width: auto;
    min-height: 0;
    margin: 0;
}

/* Mantiene regolare il bordo inferiore della card principale in Home. */
.va-student #lesson-booking-section {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    grid-column: 1 / -1;
    overflow: hidden;
    background-clip: padding-box;
    border-radius: var(--va-radius-card);
}
.va-student #lesson-booking-section > .section-heading {
    max-width: none;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--va-line);
}
.va-student #lesson-booking-section > .section-heading h2 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -.055em;
    line-height: 1.08;
}
.va-student #lesson-booking-section > .section-heading p {
    max-width: 680px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Se la lezione gratuita non è disponibile, la scelta completa non lascia
   inutilizzata la seconda colonna della card di prenotazione. */
.va-student #trial-offer-banner:has(> #trial-booking-card.hidden) {
    grid-template-columns: minmax(0, 1fr);
}
.va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card {
    grid-column: 1 / -1;
}

@media (min-width: 900px) {
    .va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card {
        display: grid;
        grid-template-columns: minmax(210px, .8fr) minmax(220px, 1fr) minmax(240px, 1fr);
        grid-template-rows: auto auto auto;
        column-gap: clamp(24px, 3vw, 44px);
        row-gap: 8px;
        align-items: end;
    }
    .va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card > h3 {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
        margin: 0;
    }
    .va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card > p {
        grid-column: 1;
        grid-row: 2;
        align-self: start;
        margin: 0;
    }
    .va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card > label {
        grid-column: 2;
        grid-row: 1 / 4;
        align-self: end;
        margin-top: 0;
    }
    .va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card > .booking-state {
        grid-column: 1;
        grid-row: 3;
        align-self: start;
        margin: 0;
    }
    .va-student #trial-offer-banner:has(> #trial-booking-card.hidden) > #full-booking-card > button {
        grid-column: 3;
        grid-row: 1 / 4;
        align-self: end;
        min-height: 46px;
        margin-top: 0;
    }
}

/* Contrasto delle verifiche nel tema chiaro. */
:root[data-va-theme='light'] body.va-learning {
    --learning-bg: var(--va-canvas);
    --learning-surface: var(--va-surface);
    --learning-surface-soft: var(--va-surface-soft);
    --learning-text: var(--va-ink);
    --learning-muted: var(--va-muted);
    --learning-border: var(--va-line);
    --learning-header: var(--va-surface);
    --learning-sidebar: var(--va-surface);
}
:root[data-va-theme='light'] body.learning-theme-test :is(
    .question-rich-text,.option-rich-text,.test-answer-label,.answer-result-line
) {
    color: var(--va-ink);
}
:root[data-va-theme='light'] body.learning-theme-test .test-timer {
    color: var(--va-tint-ink);
    background: var(--va-tint);
    border-color: var(--va-accent);
}
:root[data-va-theme='light'] body.learning-theme-test .test-timer.warning {
    color: var(--va-warning);
    background: var(--va-warning-bg);
    border-color: var(--va-warning);
}
:root[data-va-theme='light'] body.learning-theme-test .test-timer.danger {
    color: var(--va-danger);
    background: var(--va-danger-bg);
    border-color: var(--va-danger);
}
:root[data-va-theme='light'] body.learning-theme-test :is(.test-intro,.test-question,.test-result-summary) {
    color: var(--va-ink);
    background: var(--va-surface);
    border-color: var(--va-line);
}
:root[data-va-theme='light'] body.learning-theme-test .pending-review-summary {
    color: var(--va-warning);
    background: var(--va-warning-bg);
    border-color: var(--va-warning);
}
:root[data-va-theme='light'] body.learning-theme-test .answer-result.pending {
    color: var(--va-warning);
    background: var(--va-warning-bg);
}
:root[data-va-theme='light'] body.learning-theme-test .answer-result.neutral {
    color: var(--va-tint-ink);
    background: var(--va-tint);
}
:root[data-va-theme='light'] body.learning-theme-test :is(.test-text-input,.test-open-text) {
    color: var(--va-ink);
    background: var(--va-canvas);
    border-color: var(--va-line);
}
:root[data-va-theme='light'] body.learning-theme-test .notice-item {
    color: var(--va-ink);
    background: var(--va-surface-soft);
    border-color: var(--va-line);
}

:root[data-va-theme='light'] body.va-learning :is(.learning-badge.complete,.badge-completed,.badge-submitted) {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}
:root[data-va-theme='light'] body.va-learning :is(.course-sidebar,.learning-main-card,.lesson-block,.test-question,.test-intro,.test-result-summary) {
    color: var(--va-ink);
}

@media (max-width: 1180px) {
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-header-inner {
        grid-template-columns: minmax(0, 1fr);
        padding-block: 16px;
        gap: 12px 20px;
    }
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) #brand-title {
        grid-column: 1;
        grid-row: 1;
    }
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-nav {
        grid-column: 1;
        grid-row: 2;
        display: block;
        overflow-x: auto;
    }
    .va-student .student-account-context {
        display: none;
    }
    .va-student .student-account-primary {
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-header-inner {
        width: calc(100% - 32px);
        grid-template-columns: minmax(0, 1fr);
    }
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) #brand-title,
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-nav {
        grid-column: 1;
    }
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) #brand-title { grid-row: 1; }
    .va-student .student-account-header:has(.student-account-nav:not(.hidden)) .student-account-nav { grid-row: 2; }
    .va-student .student-account-primary {
        width: max-content;
        justify-content: flex-start;
    }
    .va-profile .profile-theme-control {
        flex-wrap: wrap;
        border-radius: 18px;
    }
    .va-student #lesson-booking-section > .section-heading {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
    .va-student #lesson-booking-section > .section-heading h2 {
        font-size: clamp(1.85rem, 9vw, 2.4rem);
    }
}

/* Correzioni finali condivise dalle pagine didattiche. */
body.va-learning .course-index-item .index-type {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: 100%;
    align-items: center;
    justify-self: start;
    margin: 0 0 5px;
    padding: 3px 8px;
    line-height: 1.2;
    white-space: nowrap;
}
:root[data-va-theme='light'] body.learning-theme-test .test-question {
    color: var(--va-ink, #17243a) !important;
    background: var(--va-surface, #ffffff) !important;
    border-color: var(--va-line, #d7e0ea) !important;
}
:root[data-va-theme='light'] body.learning-theme-test :is(.question-rich-text, .option-rich-text, .test-answer-label, .answer-result-line, .test-answer-note, .test-open-text, .test-text-input) {
    color: var(--va-ink, #17243a) !important;
}
:root[data-va-theme='light'] body.learning-theme-test :is(.test-option, .embedded-test-workspace, .notice-item) {
    color: var(--va-ink, #17243a) !important;
    background: var(--va-surface-soft, #f8fafc) !important;
    border-color: var(--va-line, #d7e0ea) !important;
}
