.menu-page {padding: 0 0 64px; background: var(--c-bg); color: var(--c-dark); min-height: 68vh}
.menu-wrap {width: min(100%, 1200px); margin: 0 auto; padding: 20px clamp(16px,4vw,56px) 0}
.menu-context {display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 12px}
.menu-back,.menu-crumbs a,.menu-extra a,.parent-guide a {color:var(--c-green-700)}
.menu-context .menu-back {display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:6px 15px 6px 13px; line-height:1; background:white; border:1px solid #aacbc2; border-radius:14px; text-decoration:none; font-weight:600}
.menu-back span {font: 26px/.6 var(--f-text); transform:translateY(-1px)}
.menu-crumbs {display:flex; gap:6px; flex-wrap:wrap; font-size:.875rem}
.menu-crumbs a + a::before {content:'/'; display:inline-block; padding-right:6px; color:#648179}
.menu-heading {display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 16px; margin: 0 0 16px}
.menu-heading h1,.menu-section h2,.exam-panel h2,.exam-panel h3 {color:var(--c-dark); font-family:var(--f-display); font-weight:700; text-transform:none; line-height:1.04; margin:0}
.menu-heading h1 {font-size:clamp(2rem,4.3vw,3rem); text-wrap:balance}
.menu-meta {font:600 .9375rem/1.35 var(--f-text); color:var(--c-green-700)}
.menu-section {margin-top:24px}
.menu-section h2,.exam-panel h2 {font-size:clamp(1.5rem,3vw,2rem); margin:0 0 12px}
.menu-section h2 small {display:inline-block; color:var(--c-green-700); font:500 .875rem/1.3 var(--f-text); margin-left:12px; vertical-align:middle}
.menu-grid {list-style:none; padding:0; margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px}
.menu-grid li {min-width:0}
.menu-card {--card-bg:white; --card-ink:var(--c-green-700); --symbol-bg:#e1f2e9; display:flex; align-items:center; gap:14px; height:100%; min-height:62px; text-decoration:none; padding:15px 17px; border:1px solid #c4d9d2; background:var(--card-bg); border-radius:16px; color:var(--c-dark); transition:background .16s ease, border-color .16s ease}
.menu-card:hover,.grade-pills a:hover,.course-pills a:hover {border-color:var(--c-teal); background:#e2f3ee}
.menu-page :is(a,button,input,textarea,summary,select):focus-visible {outline:3px solid #946400; outline-offset:3px}
.menu-card strong {display:block; font-size:1.0625rem; line-height:1.25; font-weight:650; overflow-wrap:anywhere}
.menu-card-copy {min-width:0}
.menu-detail {display:block; color:#405e58; font-size:.875rem; line-height:1.4; margin-top:5px}
.menu-symbol {display:grid; place-items:center; flex:none; width:40px; height:40px; border-radius:12px; background:var(--symbol-bg); color:var(--card-ink)}
.menu-symbol svg {width:24px; height:24px}
.tone-green {--card-bg:#eff9ed; --symbol-bg:#ccebc7; --card-ink:#275c39}
.tone-apricot {--card-bg:#fff4e5; --symbol-bg:#ffe0ad; --card-ink:#77501b}
.tone-sky {--card-bg:#eef6fb; --symbol-bg:#cee8f5; --card-ink:#2b607b}
.tone-lavender {--card-bg:#f5f1fc; --symbol-bg:#e6dcf7; --card-ink:#5c497c}
.menu-groups {grid-template-columns:repeat(4,minmax(0,1fr))}
.menu-groups .menu-card {align-items:flex-start;flex-direction:column; min-height:126px}
.menu-groups strong {font:700 1.8rem/1.02 var(--f-display)}
.subject-grid .menu-card {min-height:80px}
.grade-pills,.course-pills {display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px}
.grade-pills a,.course-pills a {color:var(--c-green-800); background:#fff; border:1px solid #c0d7ce; border-radius:12px; padding:9px 14px; text-decoration:none; font-size:.9375rem; line-height:1.4}
.grade-pills a[aria-current] {background:var(--c-green-700); color:white}
.course-pills a {background:transparent}
.final-grid {grid-template-columns:minmax(0, 580px)}
.menu-extra,.parent-guide {margin-top:20px; font-size:.9375rem}
.parent-guide summary {cursor:pointer; font-weight:600}
.parent-guide p {margin:12px 0}
.menu-page .practice-panel,.menu-page .tests-workspace,.exam-panel {max-width:920px; margin:0; background:#fff; border:1px solid #bfd6cb; border-radius:20px; padding:clamp(16px,3vw,28px); color:var(--c-dark)}
.menu-page .practice-panel h2 {font-size:clamp(1.5rem,3vw,2rem)}
.menu-page .practice-panel .practice-settings {margin:14px 0}
.menu-page .practice-sample {width:100%; max-width:920px; padding:24px 0 0; margin:0}
.menu-page .practice-sample h2 {font-size:1.75rem; margin-bottom:10px}
.menu-page .practice-sample .tests-example {max-width:100%}
.preschool-panel:has(.practice-settings) {background:#fff url('/assets/prostranstvo-tests/img/practice/iva.jpg') no-repeat right 16px top 16px; background-size: min(20%, 144px) auto}
.preschool-panel:has(.practice-settings) > :is(p,h2):first-of-type {max-width:76%}
.menu-page #test-builder {max-width:860px}
.exam-panel {max-width:100%; scroll-margin-top:90px}
.menu-wrap .practice-panel[data-view="work"] ~ .practice-sample,
.menu-wrap .exam-panel[data-view="work"] ~ :is(.menu-section,.exam-plan,.menu-extra) {display:none}
.exam-plan {margin-top:14px; background:#f5faf7; border:1px solid #c4d9d2; border-radius:12px; padding:10px 14px}
.exam-plan summary {cursor:pointer; font-weight:600; color:var(--c-green-700)}
.exam-plan h3 {margin:12px 0 6px; font:700 1.25rem var(--f-display)}
.exam-plan ul {list-style:none; padding:0; margin:0; columns:2; column-gap:24px}
.exam-plan li {break-inside:avoid; padding:3px 0;font-size:.9375rem}
.exam-panel h3 {font-size:1.55rem; margin:0 0 8px}
.exam-panel p {margin:8px 0; line-height:1.5}
.exam-panel form {margin:0}
.exam-settings {border:0; margin:12px 0; padding:0; min-width:0}
.exam-settings legend {font-size:1rem; font-weight:650; margin:0 0 6px}
.exam-choices {display:flex; flex-wrap:wrap; gap:8px}
.exam-choices label,.exam-step-list button {display:inline-flex; align-items:center; gap:7px; background:#f2f7f4; border:1px solid #bbd0c7; border-radius:10px; padding:9px 12px; cursor:pointer}
.exam-choices label:has(input:checked),.exam-step-list button[aria-current] {background:#d5ede5; border-color:var(--c-teal)}
.exam-choices :is(input[type=radio],input[type=checkbox]) {accent-color:var(--c-green-700); width:16px; height:16px}
.exam-numeric {display:inline-flex; align-items:center; gap:10px; margin:0 12px 8px 0}
.exam-numeric input {width:80px; padding:7px; border:1px solid #859d94; border-radius:8px; font:inherit}
.exam-cell {width:7em; padding:7px; border:1px solid #859d94; border-radius:8px; font:inherit}
.exam-table {margin:10px 0; color:#385a50; font-size:.9375rem}
.exam-controls {display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:14px}
.exam-panel button {font:inherit; cursor:pointer}
.exam-panel .exam-primary,.exam-panel .exam-secondary {display:inline-flex;align-items:center;justify-content:center; min-height:42px; padding:8px 18px; border:1px solid #97b6aa; border-radius:12px; font-weight:650; background:white; color:#183f33}
.exam-panel .exam-primary {background:var(--c-green-700); color:#fff; border-color:var(--c-green-700)}
.exam-panel button:disabled {opacity:.55;cursor:default}
.exam-bar {display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; justify-content:space-between; margin:0 0 16px; color:var(--c-green-700);font-weight:600}
.exam-clock {font-variant-numeric:tabular-nums; border-radius:8px; padding:4px 10px; background:#e9f4ed; white-space:nowrap}
.exam-material,.exam-prompt,.exam-why,.exam-key {white-space:pre-wrap; overflow-wrap:anywhere}
.exam-material {background:#f4f7f3; padding:16px; border-radius:12px; margin:12px 0; max-height:420px; overflow:auto}
.exam-prompt {font-weight:600; max-width:920px}
.exam-panel .exam-answer {display:block; width:min(100%,800px); min-height:42px; margin:6px 0 12px; border:1px solid #96aea3; border-radius:10px; padding:10px 12px; font:inherit; color:inherit; background:white}
.exam-panel textarea.exam-answer {min-height:145px; resize:vertical}
.exam-panel audio {width:min(100%,440px); display:block; margin:8px 0}
.exam-panel figure {margin:12px 0}
.exam-panel figure img {max-height:380px; max-width:100%; width:auto; height:auto}
.exam-panel details {margin:12px 0}
.exam-panel summary {cursor:pointer;color:var(--c-green-700);font-weight:600}
.exam-step-list {display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}
.exam-step-list button {min-width:40px;justify-content:center; padding:6px 10px}
.exam-step-list button[data-answered="yes"] {box-shadow:inset 0 -3px #318775}
.exam-result-item {border-top:1px solid #d2dfd9;padding:10px 0}
.exam-result-item .exam-key {margin:6px 0}
.exam-panel .exam-warning {color:#803d17; font-weight:600}
.exam-files a {display:inline-flex;margin:4px 14px 4px 0;color:var(--c-green-700);font-weight:600}
@media(max-width:800px) {
  .menu-grid,.menu-groups {grid-template-columns:repeat(2,minmax(0,1fr))} .final-grid {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:540px) {
  .exam-plan ul {columns:1}
  .menu-wrap {padding-top:12px}
  .menu-heading {gap:3px 10px;margin-bottom:12px}
  .menu-grid {grid-template-columns:1fr;gap:7px}
  .menu-groups {grid-template-columns:repeat(2,minmax(0,1fr))}
  .menu-groups .menu-card {min-height:105px;gap:8px}
  .menu-card,.subject-grid .menu-card {min-height:52px;padding:11px 12px}
  .menu-context {gap:8px;margin-bottom:9px}
  .menu-crumbs {gap:4px;font-size:.8125rem}
  .menu-section {margin-top:20px}
  .grade-pills a,.course-pills a {padding:8px 10px}
  .exam-choices {gap:5px}
}
