/* =========================================================================
   МатДоска · кабинет, ДЗ ученика, оферта, админка и открытый банк задач
   в оформлении новой главной и доски (2026-11). Только внешний вид.
   ========================================================================= */
body.light{
  --bg:#F7F8FA;--bg2:#fff;--card:#fff;--card-solid:#fff;--line:rgba(15,18,30,.08);--line2:rgba(15,18,30,.13);
  --text:#2A2E38;--strong:#0C0E14;--muted:#565B66;--dim:#8A8F99;--accent:#4B55E8;--input:#fff;--glow:0 18px 40px -22px rgba(15,18,30,.22);
}
:root{--mt-ind:#4B55E8;--mt-ind-h:#3D46D6;--mt-ind-s:#EEF0FF}
body.site{letter-spacing:-.003em}
body.site .font-black{font-weight:700!important}
body.site .font-extrabold{font-weight:700!important}

/* шапка */
body.light .site-nav{background:rgba(255,255,255,.82)!important;border-bottom:1px solid var(--line)!important;box-shadow:none!important;-webkit-backdrop-filter:blur(16px) saturate(1.3);backdrop-filter:blur(16px) saturate(1.3)}
body.site [data-brand]{background:none!important;-webkit-text-fill-color:currentColor!important;color:var(--strong)!important;font-weight:700!important;letter-spacing:-.02em}
body.site .site-nav img[src*="logo"]{border-radius:9px!important}

/* акцентный текст — ровный фирменный синий, без радуги */
body.site .grad-text,body.light .grad-text{background:none!important;-webkit-text-fill-color:var(--mt-ind)!important;color:var(--mt-ind)!important}

/* подписи-«глазки» и заголовки таблиц — обычным регистром */
body.site .label,body.site .field-label,body.site .tbl th,body.site .badge,body.site .pill{text-transform:none!important;letter-spacing:0!important}
body.site .label{font-size:13px!important;font-weight:600!important;color:var(--muted)!important}
body.site .field-label{font-size:13px!important;font-weight:600!important;color:var(--muted)!important}
body.site .tbl th{font-size:12.5px!important;font-weight:600!important;color:var(--dim)!important}
body.site .uppercase{text-transform:none!important;letter-spacing:0!important}

/* карточки */
body.light .glass{background:#fff!important;border:1px solid var(--line)!important;box-shadow:0 1px 2px rgba(15,18,30,.04),0 18px 40px -24px rgba(15,18,30,.22)!important;border-radius:20px}
body.light .glass-hover:hover{border-color:rgba(75,85,232,.35)!important;box-shadow:0 1px 2px rgba(15,18,30,.04),0 18px 40px -20px rgba(75,85,232,.3)!important}
body.site .blob,body.site .bg-grid{display:none!important}

/* кнопки */
body.site .btn{text-transform:none!important;letter-spacing:-.005em!important;font-weight:600!important;border-radius:12px!important}
body.site .btn-primary{background:var(--mt-ind)!important;background-image:none!important;color:#fff!important;box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 10px 24px -10px rgba(75,85,232,.7)!important;border:0!important}
body.site .btn-primary:hover{background:var(--mt-ind-h)!important}
body.light .btn-ghost{background:#fff!important;color:var(--strong)!important;border:0!important;box-shadow:0 0 0 1px var(--line2) inset!important}
body.light .btn-ghost:hover{background:#F3F4F8!important}
body.site .btn-success{background:#12A36B!important;background-image:none!important;box-shadow:none!important}
body.site .btn-danger{box-shadow:none!important}
body.light .icon-btn{background:#fff!important;border:0!important;box-shadow:0 0 0 1px var(--line2) inset!important;color:var(--muted)!important;border-radius:10px!important}
body.light .icon-btn:hover{background:#F3F4F8!important;color:var(--strong)!important}

/* поля */
body.light .field{background:#fff!important;border:1px solid var(--line2)!important;border-radius:12px!important;font-weight:500!important;color:var(--strong)!important}
body.light .field:focus{border-color:var(--mt-ind)!important;box-shadow:0 0 0 3px rgba(75,85,232,.15)!important}

/* переключатели */
body.light .seg{background:rgba(15,18,30,.05)!important;border:0!important;border-radius:12px!important;padding:4px!important}
body.site .seg button{text-transform:none!important;letter-spacing:0!important;font-size:13.5px!important;font-weight:500!important;border-radius:9px!important}
body.light .seg button.active{background:#fff!important;background-image:none!important;color:var(--strong)!important;font-weight:600!important;box-shadow:0 1px 2px rgba(15,18,30,.1),0 0 0 1px var(--line) inset!important}

/* значки и плашки */
body.site .icon-box{border-radius:12px!important;box-shadow:none!important;border:0!important;background:var(--mt-ind-s)!important;color:var(--mt-ind)!important}
body.site .icon-box.emerald{background:#E6FAF1!important;color:#12A36B!important}
body.site .icon-box.amber{background:#FFF4E2!important;color:#D98A00!important}
body.site .icon-box.rose,body.site .icon-box.pink{background:#FDECEE!important;color:#E0374A!important}
body.site .icon-box.cyan{background:#E7F6FF!important;color:#0E86C4!important}
body.site .badge{font-weight:600!important;font-size:12px!important}
body.light .pill{background:#fff!important;border:0!important;box-shadow:0 0 0 1px var(--line2) inset!important;color:var(--muted)!important}
body.light .ref-card{background:#F2FBF7!important;border-color:rgba(18,163,107,.25)!important}
body.light .founder-box{background:#FFF8E6!important;border-color:rgba(245,165,36,.3)!important}

/* таблицы */
body.light .tbl tr:hover td{background:#F7F8FC!important}

/* модальные окна */
body.light .modal-back{background:rgba(15,18,30,.36)!important;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
body.light .modal-card{background:#fff!important;border:0!important;border-radius:22px!important;box-shadow:0 0 0 1px var(--line),0 40px 100px -30px rgba(15,18,30,.45)!important}

/* миниатюры досок в кабинете — точечная сетка, как на доске */
body.light .board-thumb{background-color:#fff!important;background-image:radial-gradient(rgba(30,40,80,.18) 1px,transparent 1.3px)!important;background-size:14px 14px!important;border-color:var(--line)!important}

/* вопросы */
body.light details.faq{border-color:var(--line)!important}

/* открытый банк задач */
body.light a.topic-chip,body.light .topic-chip{background:#fff!important;border:1px solid var(--line)!important;box-shadow:0 1px 2px rgba(15,18,30,.04)!important;border-radius:14px!important}
body.light a.topic-chip:hover{border-color:rgba(75,85,232,.35)!important;box-shadow:0 12px 24px -14px rgba(75,85,232,.4)!important}
body.site .topic-num{background:var(--mt-ind)!important;background-image:none!important;color:#fff!important;box-shadow:none!important;border:0!important;font-weight:600!important;border-radius:8px!important}

/* полоса прокрутки */
body.light ::-webkit-scrollbar-thumb{background:rgba(15,18,30,.18)!important}

/* поле в колонке на телефоне не должно сплющиваться (flex-1 в столбце давал высоту 0) */
body.site .field{min-height:46px;flex-shrink:0}
body.site .btn-lg{font-size:15px!important}
body.site [data-brand].grad-text,body.site .grad-text[data-brand]{-webkit-text-fill-color:#0C0E14!important;color:#0C0E14!important}
/* админка: «+30 дн» — спокойная кнопка, без ярко-зелёной заливки */
body.site .btn-plus30{color:#12855a!important;font-weight:600!important}
body.site .btn-plus30:hover{background:#EEF8F3!important}
/* узкий телефон: в шапке кабинета логотип без надписи, чтобы кнопки не уезжали за край */
@media (max-width:360px){ body.site .site-nav [data-brand]{display:none} body.site .site-nav .gap-4{gap:8px} }
/* кабинет на узком телефоне: последние сдачи ДЗ и шапка не вылезают за край */
body.site .ov-hwi{min-width:0;max-width:100%}
body.site .ov-hwi-main{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.site .ov-hwi-main small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:380px){ body.site .site-nav .icon-btn[onclick="toggleAppTheme()"]{display:none!important} body.site .site-nav .icon-btn,body.site .site-nav .btn-sm{padding-left:8px!important;padding-right:8px!important} }
body.site .ov-hw-list{grid-template-columns:minmax(0,1fr)!important}
@media (max-width:330px){ body.site .ov-tiles{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important} body.site .ov-tile{min-width:0;padding:12px!important} body.site .ov-tile-l{font-size:12.5px!important} body.site .ov-tile>:first-child:not(:last-child){display:none!important} body.site .site-nav .max-w-7xl{padding-left:10px!important;padding-right:10px!important;gap:6px!important} body.site .site-nav .flex.items-center.gap-2{gap:4px!important} }
/* тарифы в кабинете — в стиле главной: крупные цифры, геометрия, «популярный» — индиго-плашка */
body.site #plans-grid{gap:18px!important;margin-top:22px}
body.site .pc{position:relative;overflow:hidden;isolation:isolate;display:flex;flex-direction:column;padding:28px 28px 26px;border-radius:28px;background:#fff;box-shadow:0 0 0 1px rgba(15,18,30,.07),0 24px 50px -34px rgba(15,18,30,.35);transition:transform .2s,box-shadow .2s;font-family:'Onest',system-ui,sans-serif}
body.site .pc:hover{transform:translateY(-3px);box-shadow:0 0 0 1px rgba(75,85,232,.28),0 30px 60px -34px rgba(75,85,232,.5)}
body.site .pc-shape{position:absolute;right:-18px;top:-18px;width:120px;height:120px;z-index:-1;transition:transform .5s cubic-bezier(.2,.7,.2,1)}
body.site .pc:hover .pc-shape{transform:rotate(-10deg) scale(1.06)}
body.site .pc.feat{background:#4B55E8;color:#fff;box-shadow:0 34px 70px -30px rgba(75,85,232,.85)}
body.site .pc.feat:hover{box-shadow:0 40px 80px -30px rgba(75,85,232,.95)}
body.site .pc.feat .pc-shape{right:-14px;top:-10px;width:150px;height:150px}
body.site .pc-tag{position:static;align-self:flex-start;margin-bottom:14px;padding:5px 12px;border-radius:999px;background:#FFC83D;color:#1F1500;font-size:12.5px;font-weight:700;letter-spacing:.01em}
body.site .pc-title{font-size:15px;font-weight:600;color:#565B66}
body.site .pc.feat .pc-title{color:rgba(255,255,255,.78)}
body.site .pc-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;margin-top:12px}
body.site .pc-price b{font-size:52px;line-height:.95;font-weight:600;letter-spacing:-.05em;color:#0C0E14}
body.site .pc.feat .pc-price b{color:#fff}
body.site .pc-price s{font-size:17px;color:#A9ADB7;font-weight:500;letter-spacing:-.01em}
body.site .pc.feat .pc-price s{color:rgba(255,255,255,.55)}
body.site .pc-sub{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px;font-size:14.5px;color:#565B66}
body.site .pc.feat .pc-sub{color:rgba(255,255,255,.82)}
body.site .pc-save{padding:3px 9px;border-radius:999px;background:#E6FAF1;color:#0E8A5A;font-size:12.5px;font-weight:700}
body.site .pc.feat .pc-save{background:rgba(255,255,255,.16);color:#B9FFE0}
body.site .pc-founder{display:inline-flex;align-self:flex-start;align-items:center;gap:6px;margin-top:16px;padding:6px 12px;border-radius:999px;background:#FFF4DB;color:#A56300;font-size:12.5px;font-weight:600}
body.site .pc.feat .pc-founder{background:rgba(255,200,61,.2);color:#FFE29A}
body.site .pc-sp{flex:1;min-height:22px}
body.site .pc-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:52px;border-radius:16px;font-size:15.5px;font-weight:600;text-decoration:none;cursor:pointer;border:0;background:#4B55E8;color:#fff;box-shadow:0 12px 26px -14px rgba(75,85,232,.8);transition:background .15s,transform .15s}
body.site .pc-btn:hover{background:#3D46D6}
body.site .pc-btn:active{transform:scale(.98)}
body.site .pc-btn.pri{background:#fff;color:#0C0E14;box-shadow:0 14px 30px -14px rgba(10,12,40,.6)}
body.site .pc-btn.pri:hover{background:#EEF0FF}
body.site .pc-fnote{position:relative;overflow:hidden;display:flex;align-items:center;gap:14px;padding:16px 20px;border-radius:22px;background:#FFF6DE;box-shadow:0 0 0 1px rgba(245,165,36,.28) inset;color:#3A2A00}
body.site .pc-fnote.hidden{display:none!important}
body.site .pc-fnote-ic{flex:none;width:44px;height:44px;border-radius:14px;background:#FFC83D;color:#1F1500;display:grid;place-items:center;box-shadow:0 10px 22px -10px rgba(245,165,36,.9)}
body.site .pc-fnote b{display:block;font-size:15.5px;font-weight:700}
body.site .pc-fnote span:not(.pc-fnote-ic){display:block;font-size:14px;color:#6B5A2E}
body.site .pc-fnote-sh{position:absolute;right:10px;bottom:-6px;width:120px;height:60px;pointer-events:none}
body.site .pc-note{display:flex;align-items:center;gap:10px;padding:14px 18px;border-radius:18px;background:#fff;box-shadow:0 0 0 1px rgba(15,18,30,.07);font-size:14px;color:#565B66}
body.site .pc-note svg{flex:none;color:#4B55E8}
@media (max-width:767px){ body.site .pc-price b{font-size:46px} body.site .pc-fnote-sh{display:none} }
/* ===== Тёмная тема кабинета: тарифы и подписи (раньше оставались белыми) ===== */
body.site:not(.light) [data-brand].grad-text,body.site:not(.light) .grad-text[data-brand]{-webkit-text-fill-color:#F1F3F8!important;color:#F1F3F8!important}
body.site:not(.light) .pc{background:#151824;box-shadow:0 0 0 1px rgba(255,255,255,.08),0 24px 50px -34px rgba(0,0,0,.9)}
body.site:not(.light) .pc:hover{box-shadow:0 0 0 1px rgba(129,140,248,.4),0 30px 60px -34px rgba(75,85,232,.55)}
body.site:not(.light) .pc.feat{background:#4B55E8;box-shadow:0 34px 70px -30px rgba(75,85,232,.9)}
body.site:not(.light) .pc:not(.feat) .pc-title,body.site:not(.light) .pc:not(.feat) .pc-sub{color:#AEB4C2}
body.site:not(.light) .pc:not(.feat) .pc-price b{color:#F1F3F8}
body.site:not(.light) .pc:not(.feat) .pc-price s{color:#6F7586}
body.site:not(.light) .pc:not(.feat) .pc-save{background:rgba(52,211,153,.14);color:#4ADE80}
body.site:not(.light) .pc:not(.feat) .pc-founder{background:rgba(255,200,61,.13);color:#FFD66B}
body.site:not(.light) .pc:not(.feat) .pc-btn{background:#4B55E8;color:#fff}
body.site:not(.light) .pc:not(.feat) .pc-btn:hover{background:#5A63F0}
body.site:not(.light) .pc-k2 .pc-shape circle:first-child{stroke:#6D76FF}
body.site:not(.light) .pc-fnote{background:linear-gradient(90deg,rgba(255,200,61,.14),rgba(255,200,61,.05));box-shadow:0 0 0 1px rgba(255,200,61,.28) inset;color:#FDE68A}
body.site:not(.light) .pc-fnote span:not(.pc-fnote-ic){color:#CDBF95}
body.site:not(.light) .pc-note{background:#151824;box-shadow:0 0 0 1px rgba(255,255,255,.08);color:#AEB4C2}
body.site:not(.light) .pc-note svg{color:#A5ADFF}
body.site .pc-note.hidden{display:none!important}
/* Автопродление в кабинете */
body.site .ap-box.hidden{display:none!important}
body.site .ap-tg{position:relative;display:flex;align-items:center;gap:14px;padding:16px 20px;border-radius:22px;background:#fff;box-shadow:0 0 0 1px rgba(30,33,80,.08) inset,0 10px 30px -18px rgba(30,33,80,.35);cursor:pointer;user-select:none;transition:box-shadow .2s}
body.site .ap-tg:hover{box-shadow:0 0 0 1px rgba(75,85,232,.3) inset,0 12px 32px -18px rgba(75,85,232,.45)}
body.site .ap-tg-ic{flex:none;width:44px;height:44px;border-radius:14px;background:#EEF0FF;color:#4B55E8;display:grid;place-items:center;transition:background .2s,color .2s}
body.site .ap-tg-txt{flex:1;min-width:0}
body.site .ap-tg-txt b{display:block;font-size:15.5px;font-weight:700;color:#1E2150}
body.site .ap-tg-txt>span{display:block;font-size:14px;color:#5B5F86;line-height:1.4}
body.site .ap-sw-in{position:absolute;opacity:0;pointer-events:none}
body.site .ap-sw{flex:none;position:relative;width:48px;height:28px;border-radius:99px;background:#D7DAEA;transition:background .2s}
body.site .ap-sw::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.2);transition:transform .2s}
body.site .ap-sw-in:checked+.ap-sw{background:#4B55E8}
body.site .ap-sw-in:checked+.ap-sw::after{transform:translateX(20px)}
body.site .ap-tg:has(.ap-sw-in:checked){box-shadow:0 0 0 2px #4B55E8 inset,0 12px 32px -18px rgba(75,85,232,.55)}
body.site .ap-tg:has(.ap-sw-in:checked) .ap-tg-ic{background:#4B55E8;color:#fff}
body.site .ap-sw-in:focus-visible+.ap-sw{outline:2px solid #4B55E8;outline-offset:2px}
body.site .ap-on{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding:16px 20px;border-radius:22px;background:#ECFDF5;box-shadow:0 0 0 1px rgba(16,185,129,.28) inset;color:#064E3B}
body.site .ap-ic{flex:none;width:44px;height:44px;border-radius:14px;background:#10B981;color:#fff;display:grid;place-items:center}
body.site .ap-txt{flex:1;min-width:220px}
body.site .ap-txt b{display:block;font-size:15.5px;font-weight:700}
body.site .ap-txt>span{display:block;font-size:14px;color:#2F6B55}
body.site .ap-plan{display:inline-flex;gap:6px;align-items:center;margin-top:6px;font-size:13px;color:#2F6B55}
body.site .ap-plan select{border-radius:10px;padding:4px 8px;border:1px solid rgba(16,185,129,.35);background:#fff;color:#064E3B;font-size:13px}
body.site .ap-off{flex:none}
body.site:not(.light) .ap-tg{background:rgba(255,255,255,.04);box-shadow:0 0 0 1px rgba(255,255,255,.1) inset}
body.site:not(.light) .ap-tg-ic{background:rgba(129,140,248,.15);color:#A5B4FC}
body.site:not(.light) .ap-tg-txt b{color:#E0E3FF}
body.site:not(.light) .ap-tg-txt>span{color:#A3A8CC}
body.site:not(.light) .ap-sw{background:rgba(255,255,255,.18)}
body.site:not(.light) .ap-on{background:rgba(16,185,129,.12);box-shadow:0 0 0 1px rgba(16,185,129,.3) inset;color:#A7F3D0}
body.site:not(.light) .ap-txt>span,body.site:not(.light) .ap-plan{color:#86EFAC}
body.site:not(.light) .ap-plan select{background:#0B1F17;color:#D1FAE5}
