:root {
  --red: #e30613;
  --red-d: #b8040f;
  --ink: #141414;
  --txt: #262626;
  --mut: #767676;
  --line: #ebebeb;
  --bg: #f6f6f5;
  --card: #fff;
  --soft: #fdecee;
  --chip: #f1f1f0;
  --r: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--txt); font: 16px/1.6 "Golos Text", system-ui, sans-serif; }
a { color: var(--red); }
button { font: inherit; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -.015em; }
svg { display: block; }

/* ---------- каркас */
.side { position: fixed; inset: 0 auto 0 0; width: 260px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 26px 18px 18px; z-index: 30; transition: transform .25s; }
.main { margin-left: 260px; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 0 6px; }
.mark { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--red); display: grid; place-items: center; }
.mark svg { width: 19px; height: 19px; }
.word { font: italic 800 21px/1 "Roboto Condensed", sans-serif; letter-spacing: -.01em; }
.brand .sub { font-size: 10.5px; line-height: 1.15; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; border-left: 1px solid var(--line); padding-left: 9px; }
.nav { margin-top: 38px; display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; color: var(--txt); text-decoration: none; font-weight: 500; }
.nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.nav a:hover { background: var(--chip); }
.nav a.on { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(227,6,19,.25); }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.mecard { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 6px; border-radius: 12px; cursor: pointer; text-align: left; color: inherit; }
.mecard:hover { background: var(--chip); }
.mecard b { display: block; font-weight: 600; color: var(--ink); font-size: 15px; line-height: 1.3; }
.mecard small { color: var(--mut); font-size: 13px; }
.ava { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.topbar { display: none; }
main { padding: 34px 40px 90px; max-width: 1240px; }
.shade { display: none; }

/* ---------- каталог */
.hello { font-size: 32px; margin: 4px 0 6px; }
.lead-in { color: var(--mut); margin: 0 0 26px; max-width: 640px; }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs span { padding: 0 0 10px; color: var(--mut); font-weight: 500; }
.tabs span.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.tile { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 14px 34px rgba(0,0,0,.09); }
.tile .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.tile .row1 { display: flex; justify-content: space-between; color: var(--mut); font-size: 14px; }
.tile .row1 span { display: inline-flex; align-items: center; gap: 6px; }
.tile .row1 svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tile h3 { margin: 16px 0 6px; font-size: 17px; text-transform: uppercase; letter-spacing: .01em; }
.tile p { margin: 0; color: var(--mut); font-size: 14.5px; line-height: 1.5; }
.tile .foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; color: var(--mut); font-size: 14px; }
.go { width: 40px; height: 40px; border-radius: 50%; background: var(--red); display: grid; place-items: center; flex: none; }
.go svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; fill: none; }
.tile.soon { cursor: default; }
.tile.soon .cover { filter: saturate(.55); }
.tile.soon .go { background: var(--chip); }
.tile.soon .go svg { stroke: var(--mut); }

.cover { position: relative; aspect-ratio: 16 / 9; padding: 18px 20px; color: #fff; overflow: hidden; display: flex; align-items: flex-start; }
.cover .t { font-size: 40px; font-weight: 500; line-height: 1.02; letter-spacing: -.035em; max-width: 80%; position: relative; z-index: 1; }
.cover .cat { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 99px; z-index: 1; }
.cover .badge { position: absolute; left: 14px; bottom: 14px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; z-index: 1; }
.cover .plane { position: absolute; right: -24px; bottom: -34px; width: 190px; height: 190px; opacity: .16; }
.cover .plane path { fill: #fff; }
.c-editor { background: radial-gradient(120% 140% at 0% 0%, #ff3b45 0%, #e30613 42%, #6d020a 100%); }
.c-promo { background: radial-gradient(120% 140% at 0% 0%, #4a4a4a 0%, #1b1b1b 50%, #000 100%); }
.c-paid { background: radial-gradient(120% 140% at 100% 100%, #e30613 0%, #7a0309 45%, #120203 100%); }
.c-money { background: radial-gradient(120% 140% at 100% 0%, #ff7a45 0%, #c0141c 48%, #2a0306 100%); }

/* ---------- сторінка курсу */
.crumbs { font-size: 14px; color: var(--mut); margin-bottom: 14px; }
.crumbs a { color: var(--mut); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.hero { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: minmax(260px, 1.15fr) 1fr minmax(240px, .85fr); gap: 22px; align-items: stretch; margin-bottom: 26px; }
.hero .cover { border-radius: 14px; aspect-ratio: auto; min-height: 210px; align-items: flex-end; }
.hero .cover .t { font-size: 38px; }
.hero .info { display: flex; flex-direction: column; padding: 8px 0; }
.hero .info h1 { font-size: 24px; margin: 0 0 8px; line-height: 1.2; }
.hero .info p { margin: 0 0 14px; color: var(--mut); font-size: 15px; }
.dotbar { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 13px; }
.dotbar .d { flex: 1; height: 8px; border-radius: 99px; background: repeating-linear-gradient(90deg, #e7e7e7 0 6px, transparent 6px 9px); position: relative; overflow: hidden; }
.dotbar .d i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--red) 0 6px, transparent 6px 9px); }
.hero .gauge { border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; text-align: center; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .v { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ring .v small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.ring .v b { font-size: 30px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.gauge .stats { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--mut); }
.gauge .stats span { display: inline-flex; align-items: center; gap: 5px; }
.btn-cont { grid-column: 2 / 4; }

.week { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); margin: 34px 0 14px; }
.week::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.block { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.block-h { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; user-select: none; }
.dayic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--red); display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.block.done .dayic { background: var(--ink); color: #fff; }
.block.locked .dayic { background: var(--chip); color: var(--mut); }
.block-h .meta { flex: 1; min-width: 0; }
.block-h b { display: block; font-weight: 600; color: var(--ink); font-size: 17px; line-height: 1.3; }
.block-h small { color: var(--mut); font-size: 13.5px; }
.block-h .pr { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 13px; width: 190px; }
.block-h .pr .dotbar { flex: 1; }
.chev { width: 20px; height: 20px; stroke: var(--mut); fill: none; stroke-width: 2; transition: transform .2s; flex: none; }
.block.open .chev { transform: rotate(180deg); }
.block-b { display: none; padding: 0 18px 10px; }
.block.open .block-b { display: block; }
.block.locked .block-h { cursor: default; opacity: .6; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.item:hover .ti { color: var(--red); }
.item .num { flex: none; width: 22px; color: var(--mut); font-size: 13px; text-align: center; }
.item .ti { font-weight: 500; color: var(--ink); }
.item .tags { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 8px; vertical-align: 2px; }
.item .mid { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--chip); color: #555; font-size: 12.5px; font-weight: 500; padding: 3px 9px; border-radius: 8px; white-space: nowrap; line-height: 1.5; }
.chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chip.cur { background: var(--soft); color: var(--red); }
.chip.cur::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.chip.ok { background: var(--ink); color: #fff; }
.chip.warn { background: var(--red); color: #fff; }
.st { flex: none; display: flex; align-items: center; gap: 10px; }
.check { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.check svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; }
.arr { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #d6d6d6; display: grid; place-items: center; }
.arr svg { width: 12px; height: 12px; stroke: var(--mut); stroke-width: 2.4; fill: none; }
.lock { width: 16px; height: 16px; stroke: var(--mut); fill: none; stroke-width: 1.8; }

/* ---------- кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 600; font-size: 15px; cursor: pointer; background: var(--red); color: #fff; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--red-d); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #000; }
.btn.line { background: #fff; color: var(--ink); border: 1px solid #dcdcdc; }
.btn.line:hover { background: var(--chip); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- урок */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.paper { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 30px 36px 30px; }
.l-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.l-head h1 { font-size: 27px; line-height: 1.22; margin: 0 0 6px; }
.l-head .subt { color: var(--mut); font-size: 15px; margin: 0; }
.l-head .chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 45%; }
.about { background: var(--chip); border-radius: 16px; padding: 16px 18px; margin: 0 0 26px; display: flex; gap: 14px; }
.about .mark { width: 36px; height: 36px; }
.about small { display: block; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mut); margin-bottom: 4px; }
.about p { margin: 0; color: var(--ink); font-size: 15.5px; }
.art { max-width: 680px; font-size: 17px; line-height: 1.7; color: #1e1e1e; }
.art .post + .post { margin-top: 34px; }
.art h3 { font-size: 21px; line-height: 1.3; margin: 30px 0 10px; }
.art .post > .tx > h3:first-child { margin-top: 0; }
.art p { margin: 0 0 12px; }
.art ul { margin: 4px 0 16px; padding-left: 22px; }
.art li { margin: 0 0 7px; }
.art li::marker { color: var(--red); }
.art b { font-weight: 600; color: var(--ink); }
.art a { word-break: break-word; }
.art blockquote { margin: 14px 0 18px; padding: 14px 18px; background: var(--soft); border-radius: 14px; font-size: 16px; border: 0; }
.art pre, .art code { font-family: ui-monospace, Menlo, monospace; font-size: 14.5px; background: var(--chip); border-radius: 6px; padding: 1px 5px; }
.art pre { padding: 14px; white-space: pre-wrap; }
.art img, .art video { display: block; width: 100%; max-height: 78vh; object-fit: contain; border-radius: 14px; margin: 6px 0 16px; background: #0d0d0d; }
.art img { background: transparent; width: auto; max-width: 100%; }
.art audio { width: 100%; margin: 6px 0 4px; }
.art details { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 10px 0; }
.art details[open] { background: #fbfbfb; }
.art summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.art .tr summary { font-weight: 500; color: var(--mut); font-size: 14px; }
.art .tr div { white-space: pre-wrap; font-size: 15px; color: #444; margin-top: 8px; }
.art .file { display: inline-flex; margin: 6px 0 14px; }
.spoiler { background: #ddd; color: transparent; border-radius: 4px; cursor: pointer; }
.spoiler:hover { color: inherit; background: transparent; }
.l-foot { margin-top: 34px; }
.l-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.l-nav .btn { padding: 14px; }
.btn.mark-done.on { background: var(--chip); color: var(--ink); border-color: transparent; }

.aside { position: sticky; top: 24px; }
.aside .box { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 12px 10px; }
.aside .bh { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; }
.aside .bh .dayic { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.aside .bh b { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.25; display: block; }
.aside .bh small { color: var(--mut); font-size: 12.5px; }
.aside a { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; color: var(--txt); text-decoration: none; font-size: 14px; line-height: 1.35; }
.aside a:hover { background: var(--chip); }
.aside a.cur { background: var(--soft); color: var(--ink); font-weight: 500; }
.aside a .o { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #cfcfcf; display: grid; place-items: center; }
.aside a.done .o { background: var(--ink); border-color: var(--ink); }
.aside a.done .o svg { width: 9px; height: 9px; stroke: #fff; stroke-width: 3.4; fill: none; }
.aside a.cur .o { border-color: var(--red); box-shadow: inset 0 0 0 3px #fff; background: var(--red); }
.aside-m { display: none; }

/* ---------- квіз / домашка */
.q { padding: 20px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; padding-top: 0; }
.q > b { display: block; font-weight: 600; color: var(--ink); margin-bottom: 10px; font-size: 17px; line-height: 1.45; }
.q img { max-width: 280px; border-radius: 12px; display: block; margin: 6px 0 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin: 8px 0; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: #cfcfcf; }
.opt:has(input:checked) { border-color: var(--ink); }
.opt input { margin-top: 5px; accent-color: var(--red); }
.opt.right { border-color: var(--ink); background: var(--chip); font-weight: 600; }
.opt.wrong { border-color: var(--red); background: var(--soft); }
.why { font-size: 14.5px; color: var(--mut); margin-top: 6px; }
.why:empty { display: none; }
.result { display: flex; align-items: center; gap: 20px; background: var(--chip); border-radius: 16px; padding: 18px 20px; margin-top: 20px; }
.result .score { font-size: 40px; font-weight: 700; color: var(--red); letter-spacing: -.03em; }
.result p { margin: 0 0 8px; }
.note { background: var(--soft); border-radius: 14px; padding: 14px 16px; font-size: 15.5px; margin: 0 0 18px; color: var(--ink); }
.task { font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.45; margin: 0 0 12px; }
input[type=text], textarea, select { width: 100%; font: 16px "Golos Text", sans-serif; padding: 13px 14px; border: 1.5px solid #dedede; border-radius: 12px; background: #fff; color: var(--ink); outline: none; }
input[type=text]:focus, textarea:focus, select:focus { border-color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
label.lbl { display: block; font-weight: 600; margin: 16px 0 7px; font-size: 14.5px; color: var(--ink); }
.drop { display: block; border: 1.5px dashed #cfcfcf; border-radius: 14px; padding: 22px; text-align: center; color: var(--mut); cursor: pointer; }
.drop:hover { border-color: var(--ink); color: var(--ink); }
.drop input { display: none; }
.hwitem { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.hwitem:first-of-type { border-top: 0; }
.hwitem img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.hwitem .tx { white-space: pre-wrap; margin-top: 6px; font-size: 15px; }
.sect { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); margin: 28px 0 10px; font-weight: 600; }

/* ---------- модалки */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20,20,20,.38); display: none; align-items: flex-start; justify-content: center; padding: 70px 16px 16px; overflow-y: auto; }
.modal.on { display: flex; }
.sheet { background: #fff; border-radius: 24px; width: 100%; max-width: 520px; padding: 30px 30px 26px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.2); animation: pop .2s ease-out; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--chip); cursor: pointer; display: grid; place-items: center; }
.x svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2.2; }
.me-top { display: flex; gap: 16px; align-items: center; padding-right: 40px; }
.me-ring { position: relative; width: 70px; height: 70px; flex: none; text-align: center; }
.me-ring svg { width: 70px; height: 70px; transform: rotate(-90deg); }
.me-ring .ava { position: absolute; top: 9px; left: 9px; width: 52px; height: 52px; font-size: 18px; }
.me-ring small { display: block; font-size: 12.5px; color: var(--mut); margin-top: 2px; }
.me-top h2 { margin: 0 0 3px; font-size: 22px; }
.me-top p { margin: 0; color: var(--mut); font-size: 14px; }
.me-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 32px 0 6px; }
.me-stats div { background: var(--chip); border-radius: 16px; padding: 14px 16px; }
.me-stats small { display: block; color: var(--mut); font-size: 13px; }
.me-stats b { font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; line-height: 1.3; }
.me-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--mut); font-size: 14px; }
.linkbtn { background: none; border: 0; color: var(--mut); cursor: pointer; padding: 6px 0; text-decoration: underline; }
.sheet h2.t { margin: 0 0 6px; font-size: 24px; padding-right: 40px; }
.sheet p.m { margin: 0 0 4px; color: var(--mut); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; transition: transform .25s, opacity .25s; z-index: 60; opacity: 0; pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }
.muted { color: var(--mut); }

/* ---------- адаптив */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero .cover { grid-column: 1 / 3; min-height: 170px; }
  .btn-cont { grid-column: 1 / 3; }
  .lesson-wrap { grid-template-columns: minmax(0, 1fr); }
  .aside { display: none; }
  .aside-m { display: block; margin-bottom: 16px; }
  .aside-m details { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 4px 10px; }
  .aside-m summary { padding: 12px 6px; font-weight: 600; color: var(--ink); cursor: pointer; font-size: 15px; }
  .aside-m .box { box-shadow: none; padding: 0 0 8px; }
  .aside-m .bh { display: none; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.menu .side { transform: none; }
  body.menu .shade { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 25; }
  .main { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: rgba(246,246,245,.92); backdrop-filter: blur(10px); padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .topbar .grow { flex: 1; }
  .burger { width: 40px; height: 40px; border: 0; background: #fff; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 11px; cursor: pointer; box-shadow: var(--shadow); }
  .burger i { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  .brand.mini .mark { width: 30px; height: 30px; }
  .brand.mini .word { font-size: 19px; }
  .avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; }
  main { padding: 22px 16px 80px; }
}
@media (max-width: 640px) {
  .hello { font-size: 26px; }
  .hero { grid-template-columns: 1fr; padding: 12px; gap: 14px; border-radius: 20px; }
  .hero .cover, .btn-cont { grid-column: auto; }
  .hero .cover .t { font-size: 32px; }
  .hero .gauge { flex-direction: row; gap: 16px; text-align: left; }
  .ring { width: 96px; height: 96px; }
  .ring .v b { font-size: 22px; }
  .ring .v small { font-size: 9px; }
  .gauge .stats { flex-direction: column; gap: 4px; justify-content: flex-start; margin: 0; }
  .block-h { padding: 14px; gap: 12px; }
  .block-h .pr { display: none; }
  .block-b { padding: 0 12px 6px; }
  .item { flex-wrap: wrap; padding: 12px 2px; }
  .item .tags { display: flex; margin: 6px 0 0; }
  .item .st .btn { display: none; }
  .paper { padding: 22px 18px; border-radius: 18px; }
  .l-head { flex-direction: column; gap: 10px; }
  .l-head .chips { justify-content: flex-start; max-width: none; }
  .l-head h1 { font-size: 23px; }
  .art { font-size: 16.5px; }
  .art h3 { font-size: 19px; }
  .l-nav .btn { font-size: 14px; padding: 13px 8px; }
  .me-stats b { font-size: 22px; }
  .sheet { padding: 24px 20px 20px; }
  .cover .t { font-size: 34px; }
}
.dayic svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 3; fill: none; }
.gauge .stats svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.chip.ok svg { stroke: #fff; }
.block-b .intro { margin: 0 0 12px; font-size: 15px; color: var(--mut); }
.about .mark svg path, .cover .plane path { fill: #fff; }
.about .mark svg { width: 19px; height: 19px; }
.cover .plane { stroke: none; }
@media (min-width: 1181px) { .hero .cover { grid-row: 1 / 3; } }
.art details.concept { padding: 0; border-radius: 16px; overflow: hidden; margin: 0 0 10px; background: #fff; }
.art details.concept[open] { background: #fff; box-shadow: var(--shadow); }
.art details.concept summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.art details.concept summary::-webkit-details-marker { display: none; }
.art details.concept summary::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11.5 20.5 4l-3 16-5.2-4.3-2.8 2.8-.6-4.6L17 7.5 7.4 12.9z' fill='%23fff'/%3E%3C/svg%3E") center / 17px no-repeat; }
.art details.concept summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut); transform: rotate(45deg); transition: transform .2s; flex: none; }
.art details.concept[open] summary::after { transform: rotate(-135deg); }
.art details.concept .cn { font-weight: 600; color: var(--ink); }
.art details.concept .cm { font-size: 13px; color: var(--mut); font-weight: 400; }
.art details.concept .cm:empty { display: none; }
.art details.concept .cb { padding: 4px 22px 18px 60px; border-top: 1px solid var(--line); font-size: 16px; }
.art details.concept .cb h4 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 22px 0 6px; }
.art details.concept .cb p { margin: 0 0 10px; }
.art details.concept .cb img { margin-top: 14px; }
@media (max-width: 640px) { .art details.concept .cb { padding: 4px 16px 16px; } .art details.concept summary { flex-wrap: wrap; } .art details.concept .cm { width: 100%; padding-left: 42px; margin-top: -8px; } }
.art img.ce { display: inline-block; width: 1.45em; height: 1.45em; margin: 0 .08em; vertical-align: -.25em; border-radius: 0; background: none; object-fit: contain; }
.art h3 img.ce { display: none; }
.tgpost { max-width: 520px; margin: 8px 0 18px; }
.tgpost iframe { border-radius: 14px; }
.tgopen { display: inline-block; font-size: 13px; color: var(--mut); text-decoration: none; margin-top: 6px; }
.tgopen:hover { color: var(--red); }
.art .post:has(> .tx > details.concept) + .post:has(> .tx > details.concept) { margin-top: 0; }
.tgbtn { margin-top: 4px; background: #2aabee; }
.tgbtn:hover { background: #1d96d4; }
.tgbtn svg { width: 20px; height: 20px; }
details.hist { border: 1px solid var(--line); border-radius: 14px; margin: 0 0 8px; padding: 0; }
details.hist summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-size: 15px; }
details.hist summary::-webkit-details-marker { display: none; }
details.hist .hn { font-weight: 500; color: var(--ink); }
details.hist .hw { margin-left: auto; font-size: 13px; }
details.hist summary a { font-size: 13px; text-decoration: none; }
details.hist .hb { padding: 0 16px 14px; font-size: 15px; }
details.hist .hb p { margin: 6px 0; }
.tg-ans { background: var(--chip); border-radius: 12px; padding: 12px 14px; margin: 4px 0 10px; font-size: 15px; }
.me-stats small + b + small, .me-stats b + small { display: block; margin-top: 2px; }

/* екран входу через Telegram */
body.gated .side, body.gated .shade, body.gated .main, body.gated .modal { display: none !important; }
#gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg, #f4f4f2); }
.gate-card { background: #fff; border-radius: 24px; padding: 36px 28px; width: min(420px, 100%); text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.06); }
.gate-card .mark.big { width: 56px; height: 56px; margin: 0 auto 14px; }
.gate-card .mark.big svg { width: 30px; height: 30px; fill: #fff; }
.gate-card h1 { font-size: 24px; margin: 0 0 8px; }
.gate-card p { margin: 0 0 18px; }
.gate-err { background: var(--soft); color: var(--red-d); border-radius: 12px; padding: 12px 14px; font-weight: 500; }
