/* Кабинеты родителя и ученика: общая основа (тетрадный лист, вкладки, сводка) */
body { background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px; }
.pp { max-width: 820px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 96px max(16px, env(safe-area-inset-left)); position: relative; }
html { -webkit-text-size-adjust: 100%; } body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.kh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.who { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.who .av { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: var(--t50, #fff1ea); color: var(--accent); border: 1px solid var(--line); }
.who h1 { font-size: clamp(26px, 6vw, 38px); margin: 0; line-height: 1.1; letter-spacing: -.03em; overflow-wrap: anywhere; }
.who p { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.ktabs { position: sticky; top: 0; z-index: 8; display: flex; gap: 4px; padding: 8px 0; margin: 0 0 6px; background: linear-gradient(var(--paper) 78%, transparent); }
.ktabs button, .kbar button { position: relative; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 12px; padding: 9px 16px; font-weight: 600; font-size: 15px; transform: none; display: inline-flex; align-items: center; gap: 7px; }
.ktabs button:hover { background: var(--soft); transform: none; }
.ktabs button.on { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; }
.kn { font-size: 12px; font-weight: 700; background: var(--accent); color: #fff; border-radius: 9px; padding: 1px 7px; line-height: 1.5; }
.kbar { display: none; }
@media (max-width: 640px) {
  .ktabs { display: none; }
  /* rrV550: кнопка поддержки не закрывает последний пункт нижнего меню */
  body .rrs-fab { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
  .kbar { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: var(--card); transform: translateZ(0); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(20,25,50,.08); }
  .kbar button { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 11.5px; border-radius: 10px; justify-content: center; }
  .kbar button svg { width: 22px; height: 22px; }
  .kbar button.on { color: var(--accent); background: var(--t50, #fff1ea); }
  .kbar .kdot, .kbar .kn { position: absolute; top: 3px; right: calc(50% - 20px); }
  .pp { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
.kcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 640px) { .kcards { grid-template-columns: 1fr 1fr; } .kc.next { grid-column: 1 / -1; } .kc .kv { font-size: 20px; } }
.kc { display: block; text-align: left; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); color: inherit; font: inherit; height: auto; min-height: 0; transform: none; }
button.kc { cursor: pointer; } button.kc:hover { border-color: var(--line2); transform: none; }
.kc .kl { color: var(--muted); font-size: 13px; }
.kc .kv { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin: 3px 0 2px; }
.kc .ks { color: var(--muted); font-size: 13px; }
.kc.bad { border-color: var(--danger); background: var(--badbg); } .kc.bad .kv { color: var(--danger); }
.kc.ok .kv { color: var(--ok); }
.kc.next { background: #171923; color: #fff; border-color: #171923; } :root[data-theme="dark"] .kc.next { background: #22232c; border-color: #3a3d4b; } .kc.next .kl, .kc.next .ks { color: rgba(255,255,255,.7); }
.kjoin { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-top: 14px; }
.sec > h2 { font-size: 19px; margin: 0 0 12px; }
.sec > h2 small { font: 500 13px/1 "Geologica", sans-serif; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
mark { background: linear-gradient(transparent 52%, var(--mark) 52%); color: inherit; padding: 0 2px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 10px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 28px; letter-spacing: -.03em; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 13px; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); }
.row:first-of-type { border-top: 0; padding-top: 0; }
.row .grow { min-width: 0; overflow-wrap: anywhere; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 8px; background: var(--soft); margin-left: 6px; white-space: nowrap; }
.tag.ok { background: var(--okbg); color: var(--ok); } .tag.late { background: var(--badbg); color: var(--danger); }
.note { font: 600 22px/1.25 var(--hand); color: var(--accent); margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.err { color: var(--danger); margin-top: 8px; } .okm { color: var(--ok); margin-top: 8px; }
.hint { color: var(--muted); margin: 4px 0 0; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.pane[hidden] { display: none; }
.pane { animation: kin .22s ease-out; }
@keyframes kin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pane { animation: none; } }
.kc.next .big { display: flex; width: 100%; box-sizing: border-box; margin-top: 14px; }
@media (min-width: 641px) { .kc.next .big { width: fit-content; } }

/* юридические ссылки внизу кабинетов */
.kab-legal{max-width:760px;margin:0 auto;padding:6px 16px calc(96px + env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;gap:4px 16px;justify-content:center;font-size:12.5px}
.kab-legal a{color:var(--muted,#8a93a8);text-decoration:underline;text-underline-offset:2px}

/* уведомления на устройстве */
.push .pushttl { margin: 0 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.push .pnote { margin: 4px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.push .pnote.ok { color: #15803d; font-weight: 600; }
.push .pmsg { margin: 8px 0 0; font-size: 13.5px; color: var(--ink); }
.push .prow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.push .pbtn { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 12px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.push .pbtn.ghost { background: transparent; color: var(--accent); }
.push .pbtn:disabled { opacity: .55; cursor: default; }

.push .pchk { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 4px; font-size: 14.5px; line-height: 1.35; cursor: pointer; }
.push .pchk input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.push[hidden]{display:none !important}

/* Дашборд ученика */
.dsh { display:grid; gap:12px; margin-top:12px; }
.dsh-top { display:grid; grid-template-columns:auto 1fr; gap:12px; align-items:stretch; }
@media (max-width:560px) { .dsh-top { grid-template-columns:1fr; } }
.dsh-hw { display:flex; align-items:center; gap:14px; background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:14px 18px; box-shadow:var(--shadow); }
.dsh-hw b { display:block; font-size:15px; } .dsh-hw span { color:var(--muted); font-size:13px; }
.dsh-ring { position:relative; width:84px; height:84px; flex:none; }
.dsh-ring svg { width:100%; height:100%; transform:rotate(-90deg); } .dsh-ring .bg { stroke:var(--rule); } .dsh-ring .fg { stroke:var(--ok); transition:stroke-dasharray 1s cubic-bezier(.2,.7,.2,1); }
.dsh-ring b { position:absolute; inset:0; display:grid; place-items:center; font-size:20px; letter-spacing:-.03em; }
.dsh-tiles { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.dsh-t { background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:14px 14px 12px; box-shadow:var(--shadow); display:grid; align-content:center; gap:2px; }
.dsh-t b { font-size:30px; letter-spacing:-.035em; line-height:1.1; font-variant-numeric:tabular-nums; } .dsh-t span { color:var(--muted); font-size:12.5px; line-height:1.3; }
.dsh-t.hot { background:linear-gradient(160deg,#fff4e6,#ffe3d3); border-color:#f3c6a8; } .dsh-t.hot b { color:#c2410c; }
:root[data-theme="dark"] .dsh-t.hot { background:#3a2a22; border-color:#6b4330; }
.dsh-wk { background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:14px 18px 10px; box-shadow:var(--shadow); }
.dsh-wt { font-weight:700; font-size:15px; margin-bottom:8px; }
.dsh-bars { display:grid; grid-template-columns:repeat(8,1fr); gap:6px; align-items:end; height:104px; }
.dsh-bars div { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:3px; height:100%; font-size:11px; color:var(--muted); }
.dsh-bars em { font-style:normal; font-weight:700; color:var(--ink); font-size:12px; min-height:14px; }
.dsh-bars i { display:block; width:100%; max-width:30px; border-radius:7px 7px 3px 3px; background:linear-gradient(var(--accent),color-mix(in srgb,var(--accent) 45%,transparent)); }
.dsh-bars .cur span { color:var(--ink); font-weight:700; }

/* Родитель: графики и карточки */
.kc { position:relative; overflow:hidden; }
.kc::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--accent); }
.kc.bad::before { background:var(--danger); } .kc.ok::before { background:#1f9d57; } .kc.next::before { background:var(--red); }
.tile b { background:none; }
.wk i { background:linear-gradient(var(--accent),color-mix(in srgb,var(--accent) 45%,transparent)); opacity:1; }
.mast { width:100%; height:auto; display:block; overflow:visible; }
.mast text { font:500 12px "Geologica",sans-serif; fill:var(--muted); }
.mast .ln { fill:none; stroke:var(--ok); stroke-width:2.6; stroke-linecap:round; stroke-linejoin:round; }
.mast .ar { fill:url(#mastg); }
.mast .pt { fill:var(--card); stroke:var(--ok); stroke-width:2.4; }
.mast .gl { stroke:var(--rule); stroke-dasharray:3 4; }

.kcards > .kc:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ===== Премиальные дашборды кабинетов ===== */
.sec { border-radius: 22px; }
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 22px 22px 20px; color: #fff; margin-top: 14px; isolation: isolate;
  background: radial-gradient(120% 100% at 100% -10%, rgba(255,90,31,.62), transparent 55%), radial-gradient(90% 90% at -10% 110%, rgba(99,102,241,.5), transparent 60%), #15172b;
  box-shadow: 0 18px 40px -18px rgba(20,22,50,.6); }
.hero-row { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
@media (max-width: 440px) { .hero-row { grid-template-columns: 1fr; justify-items: start; gap: 14px; } }
.hero-ring { position: relative; width: 128px; height: 128px; flex: none; }
.hero-ring .rd-ring .bg { stroke: rgba(255,255,255,.15); }
.hero-ring b { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 34px; letter-spacing: -.04em; line-height: 1; }
.hero-ring b small { display: block; font: 500 11px/1.2 "Geologica", sans-serif; opacity: .7; letter-spacing: 0; margin-top: 5px; }
.hero-k { font-size: 12.5px; opacity: .72; }
.hero h2 { margin: 3px 0 10px; font-size: clamp(21px, 5.4vw, 29px); letter-spacing: -.03em; line-height: 1.12; color: #fff; overflow-wrap: anywhere; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hchip { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.17); border-radius: 999px; padding: 5px 11px; font-size: 13px; line-height: 1.2; }
.hchip.up { background: rgba(52,211,153,.2); border-color: rgba(52,211,153,.42); color: #a7f3d0; }
.hchip.hot { background: rgba(255,122,69,.24); border-color: rgba(255,122,69,.5); color: #ffd6c4; }
.hero-foot { margin-top: 18px; }
.hero-lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; opacity: .85; margin-bottom: 8px; }
.hero-meter { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.15); }
.hero-meter i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ff7a45, #ffc2a3); transform-origin: left; animation: hgrow 1.2s cubic-bezier(.22,1,.36,1) .3s both; }
.hero-meter em { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
@keyframes hgrow { from { transform: scaleX(0); } }
.hero > .rd-spark { position: absolute; right: 18px; top: 16px; width: 92px; height: 30px; opacity: .55; }
.hero > .rd-spark .ln { stroke: #fff; } .hero > .rd-spark circle { fill: #fff; }
@media (max-width: 440px) { .hero > .rd-spark { display: none; } }
.hero-next { display: grid; gap: 2px; }
.hero-next .when { font-size: 13px; opacity: .75; }
.hero-next .dt { font-size: clamp(26px, 7vw, 36px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; }
.hero-next .tm { font-size: 15px; opacity: .8; }
.hero .btn.big { margin-top: 14px; background: #fff; color: #15172b; border-color: #fff; }
.hero-hi { font-size: 13px; opacity: .72; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; margin-top: 12px; }
.kpi { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 13px; box-shadow: var(--shadow); display: grid; gap: 3px; align-content: start; }
.kpi b { font-size: 31px; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; line-height: 1.3; max-width: 78%; }
.kpi .rd-spark { position: absolute; right: 10px; bottom: 10px; width: 62px; height: 22px; opacity: .45; }
.kpi.hot { background: linear-gradient(160deg, #fff4e6, #ffe0cf); border-color: #f3c6a8; } .kpi.hot b { color: #c2410c; }
:root[data-theme="dark"] .kpi.hot { background: #3a2a22; border-color: #6b4330; }

.badges { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; margin: 10px -2px 0; scroll-snap-type: x proximity; scrollbar-width: none; }
.badges::-webkit-scrollbar { display: none; }
.rd-badge { flex: none; scroll-snap-align: start; display: flex; gap: 10px; align-items: center; padding: 9px 15px 9px 9px; border-radius: 18px; border: 1px dashed var(--line2); color: var(--muted); }
.rd-badge .rd-bic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--rule); }
.rd-badge .rd-bic svg { width: 18px; height: 18px; }
.rd-badge.on { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.rd-badge.on .rd-bic { background: linear-gradient(135deg, #ff7a45, #ff5a1f); color: #fff; box-shadow: 0 6px 14px -6px #ff5a1f; }
.rd-bt { font-weight: 700; font-size: 14px; line-height: 1.15; white-space: nowrap; } .rd-bs { font-size: 12px; color: var(--muted); white-space: nowrap; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 560px) { .duo { grid-template-columns: 1fr; } }
.duo .sec { margin-top: 0; }
.gbox { position: relative; width: 168px; max-width: 100%; margin: 4px auto 0; }
.gbox b { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: 30px; letter-spacing: -.04em; line-height: 1; }
.gbox b small { font: 500 13px "Geologica", sans-serif; color: var(--muted); letter-spacing: 0; }
.rd-gauge { width: 100%; display: block; } .rd-gauge .bg { stroke: var(--rule); } .rd-gauge .fg { transition: stroke-dasharray 1.3s cubic-bezier(.22,1,.36,1) .2s; }
.gcap { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
.dbox { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; }
.dbox .rd-donut { width: 112px; height: 112px; } .dbox .rd-donut .bg { stroke: var(--rule); }
.dbox .rd-donut .seg { transition: stroke-dasharray 1.1s cubic-bezier(.22,1,.36,1) .3s; }
.lgd { display: grid; gap: 6px; font-size: 13.5px; } .lgd div { display: flex; align-items: center; gap: 8px; } .lgd i { width: 10px; height: 10px; border-radius: 4px; flex: none; } .lgd b { margin-left: auto; font-variant-numeric: tabular-nums; }
.lgd.row2 { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; } .lgd.row2 div { gap: 6px; }
.rd-stack { display: flex; gap: 3px; height: 14px; }
.rd-stk { border-radius: 6px; transform-origin: left; animation: hgrow .9s cubic-bezier(.22,1,.36,1) both; }
@media (prefers-reduced-motion: reduce) { .hero-meter i, .rd-stk { animation: none; } .rd-gauge .fg { transition: none; } }
.kc.next { border: 0; border-radius: 26px; padding: 20px 22px !important; position: relative; isolation: isolate; box-shadow: 0 18px 40px -18px rgba(20,22,50,.6);
  background: radial-gradient(120% 100% at 100% -10%, rgba(255,90,31,.55), transparent 55%), radial-gradient(90% 90% at -10% 110%, rgba(99,102,241,.45), transparent 60%), #15172b; }
.kc.next::before { display: none; }
.kc.next .kv { font-size: clamp(26px, 7vw, 36px); letter-spacing: -.04em; }
.kc.next .btn.big, .kc.next .big { background: #fff; color: #15172b; border-color: #fff; }
.kc.next + .kc:last-child { grid-column: 1 / -1; }
@media (max-width: 440px) {
  .hero-row { grid-template-columns: auto 1fr; gap: 14px; justify-items: stretch; }
  .hero-ring { width: 104px; height: 104px; } .hero-ring b { font-size: 27px; } .hero-ring b small { font-size: 10px; }
  .hero { padding: 18px 16px 16px; }
}
.kc.next { grid-column: 1 / -1; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k3 .kpi span { max-width: 100%; }
@media (max-width: 560px) { .kpis.k3 .rd-spark { display: none; } .kpis.k3 .kpi b { font-size: 28px; } }

/* ===== Статусные карточки и плитки: единый вид ===== */
.kcards { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
@media (max-width: 340px) { .kcards { grid-template-columns: 1fr; } }
.kcards > .kc:not(.next):last-child:nth-child(even) { grid-column: 1 / -1; }
.kc.next + .kc:last-child { grid-column: auto; }
.kc:not(.next) { position: relative; border-radius: 20px; padding: 16px 16px 14px; display: grid; gap: 2px; align-content: start; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.kc:not(.next)::before { display: none; }
.kc:not(.next) .kl { font-size: 13px; padding-right: 46px; }
.kc:not(.next) .kv { font-size: clamp(22px, 5.4vw, 28px); letter-spacing: -.04em; margin: 4px 0 2px; }
.kc .kic, .kpi .kic { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--t50, #fff1ea); color: var(--accent); }
.kc .kic svg, .kpi .kic svg { width: 20px; height: 20px; }
.kc.ok .kic { background: var(--okbg); color: var(--ok); } .kc.bad .kic { background: #fde1e2; color: var(--danger); }
:root[data-theme="dark"] .kc.bad .kic { background: rgba(229,72,77,.18); }
.kc.ok { background: linear-gradient(160deg, var(--card), var(--okbg)); border-color: color-mix(in srgb, var(--ok) 28%, var(--line)); }
.kc.bad { background: linear-gradient(160deg, var(--card), var(--badbg)); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
button.kc { transition: transform .15s ease, box-shadow .15s ease; } button.kc:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(20,22,50,.35); } button.kc:active { transform: scale(.98); }
.kpg { height: 6px; border-radius: 4px; background: var(--rule); margin-top: 12px; overflow: hidden; }
.kpg i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; animation: hgrow 1s cubic-bezier(.22,1,.36,1) .25s both; }
.kc.ok .kpg i { background: var(--ok); } .kc.bad .kpg i { background: var(--danger); }

.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { padding: 16px 16px 14px; gap: 4px; }
.kpi span { order: 1; max-width: 100%; padding-right: 46px; font-size: 13px; min-height: 2.6em; }
.kpi b { order: 2; font-size: 34px; margin-top: 2px; }
.kpi .rd-spark { order: 3; position: static; width: 100%; height: 26px; margin-top: 8px; opacity: .6; }
.kpi .kic { background: var(--soft); color: var(--muted); }
.kpi.hot .kic { background: rgba(194,65,12,.14); color: #c2410c; }
.kpis.k3 .kpi span { padding-right: 0; min-height: 0; }
.kpis.k3 .kpi .kic { display: none; }
@media (max-width: 560px) { .kpis:not(.k3) { grid-template-columns: 1fr 1fr; } .kpi b { font-size: 30px; } }
.kc:not(.next) { grid-template-columns: minmax(0, 1fr); justify-items: stretch; text-align: left; }
@media (max-width: 560px) { .kpis:not(.k3) > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* rrV416: кнопка темы уезжает вместе со страницей */
.theme-fab { position:absolute; }
/* rrV417 */
#err:empty { display:none; }
.rd-badge:not(.on) { opacity:.6; }
details.exf > summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:10px; font-size:18px; font-weight:700; }
details.exf > summary::-webkit-details-marker { display:none; }
details.exf > summary small { font-size:13px; font-weight:600; color:var(--muted); background:var(--soft); border-radius:999px; padding:1px 9px; }
details.exf > summary::after { content:''; width:8px; height:8px; margin-left:auto; border-right:2px solid var(--faint); border-bottom:2px solid var(--faint); transform:rotate(-45deg); transition:transform .2s; flex:none; }
details.exf[open] > summary::after { transform:rotate(45deg); }
details.exf[open] > summary { margin-bottom:8px; }

/* rrV430: результаты тестов у родителя */
.qzpill { flex: none; font-weight: 800; font-size: 14px; padding: 4px 11px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.qzpill.hi { background: var(--okbg); color: var(--ok); } .qzpill.lo { background: var(--badbg); color: var(--danger); } .qzpill.mid { background: #fff3d6; color: #8a5a00; }
.qzbar { height: 6px; border-radius: 4px; background: var(--rule); margin-top: 8px; overflow: hidden; }
.qzbar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; animation: hgrow .9s cubic-bezier(.22,1,.36,1) both; }
.qzbar.hi i { background: var(--ok); } .qzbar.lo i { background: var(--danger); } .qzbar.mid i { background: #e0a100; }

/* rrV551: карточка «Следующий урок: пока не назначен» на телефоне во всю ширину, без пустоты справа */
@media (max-width: 640px) { .kcards > .kc.kc-none { grid-column: 1 / -1; } }
/* v617: ширину последней карточки решает скрипт (класс .wide): «Следующий урок» на всю строку, остальные парами */
.kcards > .kc:last-child:nth-child(odd), .kcards > .kc:not(.next):last-child:nth-child(even) { grid-column: auto; }
.kcards > .kc.next, .kcards > .kc.wide { grid-column: 1 / -1; }
