/* Shared reading preferences and keyboard support. */
html { font-size:calc(100% * var(--va-scale,1)); }
body { padding-bottom:0; }
.site-footer,.vpt-game>footer { padding-bottom:5rem; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline:3px solid #123f4b!important; outline-offset:3px!important; box-shadow:0 0 0 6px #fff!important; }
main:focus { outline:none; }
:where(p,li,dt,dd,label,h1,h2,h3,h4,button,a) { overflow-wrap:break-word; }
:where(input,select,textarea) { max-width:100%; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea { border-color:#738b8e; }
.va-skip-link { position:fixed; top:8px; left:8px; z-index:2147483647; padding:12px 18px; background:#fff; color:#123f4b; transform:translateY(-180%); }
.va-skip-link:focus { transform:none; }
#va-accessibility { position:fixed; right:18px; bottom:16px; z-index:100000; display:inline-flex; align-items:center; justify-content:center; min-height:48px; max-width:calc(100vw - 36px); padding:10px 19px; border:2px solid #fff; border-radius:30px; background:#164f5a; color:#fff; box-shadow:0 3px 18px #143e4c33; font:700 1rem/1.4 system-ui,sans-serif; cursor:pointer; }
#va-accessibility-panel { width:29rem; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; padding:1.7rem; border:1px solid #8ba4a7; border-radius:22px; color:#133d47; background:#fffdf8; box-shadow:0 20px 90px #123f4b55; font:1rem/1.6 system-ui,sans-serif; }
#va-accessibility-panel::backdrop { background:#102f3bb3; }
#va-accessibility-panel h2 { margin:0 2.5rem .6rem 0; font-size:1.65rem; line-height:1.25; color:inherit; }
#va-accessibility-panel p { margin:0 0 1rem; font-size:1rem; }
#va-accessibility-panel .va-close { position:absolute; right:.7rem; top:.6rem; min-width:44px; min-height:44px; padding:2px; border:1px solid #7b969c; border-radius:50%; background:#fff; color:#133d47; font:1.7rem/1 system-ui; }
#va-accessibility-panel .va-setting { display:grid; gap:.35rem; margin:1rem 0; font-weight:650; }
#va-accessibility-panel select { width:100%; min-height:46px; border:1px solid #738b8e; border-radius:9px; padding:.55rem; background:#fff; color:#133d47; font:inherit; }
#va-accessibility-panel .va-check { display:flex; align-items:flex-start; gap:.7rem; margin:.9rem 0; cursor:pointer; }
#va-accessibility-panel .va-check input { flex:none; width:1.3rem; height:1.3rem; margin:.15rem 0 0; accent-color:#145c67; }
#va-accessibility-panel .va-help { color:#425d64; font-size:.9rem; }
#va-accessibility-panel .va-status { min-height:1.6em; margin:.4rem 0; }
#va-accessibility-panel .va-actions { display:flex; flex-wrap:wrap; gap:.6rem; justify-content:space-between; }
#va-accessibility-panel .va-actions button { min-height:44px; padding:.6rem 1rem; border:1px solid #54777d; border-radius:10px; background:#fff; color:#133d47; font:inherit; cursor:pointer; }
#va-accessibility-panel .va-actions .va-done { background:#145c67; color:#fff; }
html:not([data-va-size="100"])[data-va-size] body :where(p,small,label,input,select,textarea,button,li,dt,dd,td,th,.eyebrow,.va-eyebrow,.vl-eyebrow,.save-note) { font-size:1rem!important; }
html[data-va-spacing] body :where(p,li,dt,dd,label,textarea,.entry-content) { line-height:1.85!important; letter-spacing:.025em!important; word-spacing:.08em!important; }
html[data-va-links] a { text-decoration:underline!important; text-underline-offset:.2em; text-decoration-thickness:.1em; }
html[data-va-motion] *,html[data-va-motion] *::before,html[data-va-motion] *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Readable controls in the standard palette, before any personal settings. */
.button--primary,.header-register { background:#a4492d!important; color:#fff!important; }
.vl-button:not(.vl-button--secondary),.va-button { background:#145d69!important; color:#fff!important; }
.vl-button--secondary { color:#123f4b!important; background:#fff!important; }
.eyebrow--orange,.va-eyebrow { color:#96472c; }
html:not([data-va-size="100"])[data-va-size] :where(.header-actions,.vl-button-row,.vm-material-actions,.scene-header,.vl-student-month) { flex-wrap:wrap; }
html:not([data-va-size="100"])[data-va-size] :where(.membership-card .button,.contact-card .button,.vl-button,.va-button) { white-space:normal; max-width:100%; }

html[data-va-theme="light"] { --veshtina-a11y-surface:#fff; --veshtina-a11y-text:#102e38; --veshtina-a11y-link:#005564; --veshtina-a11y-border:#536d75; --veshtina-a11y-button:#064e5b; --veshtina-a11y-button-text:#fff; color-scheme:light; }
html[data-va-theme="dark"] { --veshtina-a11y-surface:#12212a; --veshtina-a11y-text:#f6f5e9; --veshtina-a11y-link:#a8f0f1; --veshtina-a11y-border:#a5bec5; --veshtina-a11y-button:#b6eff0; --veshtina-a11y-button-text:#102e38; color-scheme:dark; }
html[data-va-theme] { --v-ink:var(--veshtina-a11y-text); --v-ink-deep:var(--veshtina-a11y-text); --v-muted:var(--veshtina-a11y-text); --v-teal:var(--veshtina-a11y-link); --v-white:var(--veshtina-a11y-surface); --v-paper:var(--veshtina-a11y-surface); --vl-ink:var(--veshtina-a11y-text); --vl-ink-deep:var(--veshtina-a11y-text); --vl-muted:var(--veshtina-a11y-text); --vl-teal:var(--veshtina-a11y-link); --ink:var(--veshtina-a11y-text); --muted:var(--veshtina-a11y-text); --green:var(--veshtina-a11y-link); }
html[data-va-theme] body,html[data-va-theme] body :where(header,footer,main,section,article,aside,nav,dialog,details,summary,form,fieldset,table,thead,tbody,tr,td,th,[class*="card"],[class*="panel"],[class*="notice"],[class*="field"],.site-notice,.scene-copy,.feedback,.task-goal,.knowledge-tag,.pocket,.va-help,.vm-dialog-header,.vm-material-copy) { background:var(--veshtina-a11y-surface)!important; color:var(--veshtina-a11y-text)!important; border-color:var(--veshtina-a11y-border)!important; }
html[data-va-theme] body :where(h1,h2,h3,h4,h5,h6,p,small,label,li,dt,dd,strong,em,span) { color:var(--veshtina-a11y-text)!important; text-shadow:none!important; }
html[data-va-theme] body a { color:var(--veshtina-a11y-link)!important; }
html[data-va-theme] body :where(button,.button,.vl-button,.va-button,.primary,.secondary),html[data-va-theme] #va-accessibility,html[data-va-theme] #va-accessibility-panel .va-actions button,html[data-va-theme] #va-accessibility-panel .va-close { background:var(--veshtina-a11y-button)!important; color:var(--veshtina-a11y-button-text)!important; border:2px solid var(--veshtina-a11y-border)!important; text-shadow:none!important; }
html[data-va-theme] body :where(button,.button,.vl-button,.va-button,.primary,.secondary) :where(span,strong,small) { color:inherit!important; }
html[data-va-theme] body :where(input,select,textarea) { color:var(--veshtina-a11y-text)!important; background:var(--veshtina-a11y-surface)!important; border-color:var(--veshtina-a11y-border)!important; }
html[data-va-theme] body :where(input,textarea)::placeholder { color:var(--veshtina-a11y-text); opacity:.85; }
html[data-va-theme] :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-color:var(--veshtina-a11y-link)!important; box-shadow:0 0 0 6px var(--veshtina-a11y-surface)!important; }
html[data-va-theme] :where(.picture-hotspot,.hotspot) { background:transparent!important; }
html[data-va-theme] :where(button:disabled,[aria-disabled="true"]) { opacity:1; border-style:dashed!important; }
html[data-va-theme] .pocket span { opacity:1; }
.vm-accessible-text { padding:1.3rem; border:1px solid #738b8e; border-radius:16px; margin-bottom:1.3rem; background:#f4faf8; }
.vm-accessible-text summary { cursor:pointer; font-weight:700; min-height:44px; }
.vm-accessible-text__content { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; margin-top:1rem; }
@media(max-width:600px) { #va-accessibility { right:12px; bottom:12px; } #va-accessibility-panel { padding:1.2rem; } }
@media print { #va-accessibility,#va-accessibility-panel,.va-skip-link { display:none!important; } body { padding-bottom:0; } }

html[data-va-theme] body a:is(.button,.vl-button,.va-button,.primary,.secondary,.vm-preview-button) { color:var(--veshtina-a11y-button-text)!important; background:var(--veshtina-a11y-button)!important; border-color:var(--veshtina-a11y-border)!important; }
html[data-va-theme] .nav-shell { background:var(--veshtina-a11y-surface)!important; border-color:var(--veshtina-a11y-border)!important; }
@media(min-width:981px){
 html:is([data-va-size="150"],[data-va-size="200"]) .header-main { grid-template-columns:150px minmax(0,1fr); gap:1rem; padding-block:1rem; }
 html:is([data-va-size="150"],[data-va-size="200"]) .header-stack { display:flex; flex-direction:column; gap:1rem; min-width:0; }
 html:is([data-va-size="150"],[data-va-size="200"]) .header-actions { justify-content:flex-end; flex-wrap:wrap; }
 html:is([data-va-size="150"],[data-va-size="200"]) .nav-shell { width:100%; }
 html:is([data-va-size="150"],[data-va-size="200"]) .primary-navigation ul { justify-content:center; }
}

/* Catalogue links and compact labels also need a surface in contrast modes. */
html[data-va-theme] body :where(.va-grade,.va-subject,.va-subject-icon,.vl-language-badge,.vm-file-count,.vm-thumb-fallback,.vm-lesson-bottom,.vm-preview-hint,.vm-dialog-top,[class*="badge"],[class*="pill"],.vl-tag,.status-tag,.knowledge-tag) {
 background:var(--veshtina-a11y-surface)!important;
 color:var(--veshtina-a11y-text)!important;
 border-color:var(--veshtina-a11y-border)!important;
 text-shadow:none!important;
}
html[data-va-theme] body :where(.va-grade,.va-subject) {
 border:1px solid var(--veshtina-a11y-border)!important;
 border-left:5px solid var(--veshtina-a11y-link)!important;
}
html[data-va-theme] body :where(.va-grade,.va-subject,.vl-language-badge,[class*="badge"],[class*="pill"]) :where(span,strong,small,em) {
 color:inherit!important;
}
html[data-va-theme] body :where(.va-grade,.va-subject) :where(strong,small,.va-grade-stage,.va-grade-number,.va-grade-bottom) {
 opacity:1!important;
}
