/* Главная «О школе» (/) — поверх olimp-v2.css: свои блоки с префиксом hm- */
/* выделенная часть h2 — в строку, если помещается */
.hm-sec{padding:44px 0}
.hm-lead{margin:10px 0 0;font-size:15.5px;line-height:1.45;font-weight:600;color:var(--muted);text-wrap:balance}
.hm-more{margin:22px 0 0;text-align:center}
.hm-more .ov-btn{width:100%}
.hm-k{margin:0;font-size:13px;font-weight:800;color:var(--accent-small)}

/* ---------- первый экран ---------- */
.hm-hero{padding:22px 0 18px;background:linear-gradient(180deg,var(--paper) 0%,var(--bg) 100%);overflow:hidden}
.hm-hero-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.hm-hero-text{display:flex;flex-direction:column;min-width:0}
.hm .ov-h1 b{display:block}
.hm .ov-phrase{margin-top:22px}
.hm-stats{list-style:none;margin:18px 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hm-stats li{padding:12px 14px;border-radius:16px;background:var(--card);border:1px solid var(--card-line)}
.hm-stats b{display:block;font-size:26px;line-height:1.05;color:var(--accent)}
.hm-stats span{display:block;margin-top:4px;font-size:12.5px;line-height:1.3;font-weight:600;color:var(--muted)}
.hm-btns{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:22px}
.hm-btns .ov-btn{width:100%;justify-content:center}

/* коллаж: фото учеников с дипломами в полароидах; по клику — история */
.hm-hero-visual{position:relative;width:100%;max-width:520px;margin:14px auto 0;aspect-ratio:1/1}
.hm-glow{position:absolute;left:50%;top:50%;width:120%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(closest-side,var(--primary-soft),transparent);pointer-events:none}
.hm-pol{position:absolute;width:31%;padding:5px 5px 18px;margin:0;border:0;border-radius:3px;background:#fff;box-shadow:0 14px 26px -12px rgba(10,40,60,.45),0 1px 2px rgba(0,0,0,.12);cursor:pointer;transform:rotate(var(--r,0deg));transition:transform .2s}
.hm-pol img{display:block;width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:1px}
@media (hover:hover){.hm-pol:hover{transform:rotate(0deg) scale(1.05);z-index:9}}
.hm-png{position:absolute;height:auto;filter:drop-shadow(0 12px 18px rgba(10,40,60,.28));pointer-events:none}
.hm-p1{left:35%;top:0;--r:2deg;z-index:3}
.hm-p2{left:2%;top:4%;--r:-7deg;z-index:2}
.hm-p3{left:68%;top:6%;--r:6deg;z-index:2}
.hm-p4{left:1%;top:48%;--r:5deg;z-index:3}
.hm-p5{left:34%;top:51%;--r:-4deg;z-index:4}
.hm-p6{left:67%;top:47%;--r:-6deg;z-index:3}
.hm-p7{left:-2%;top:76%;width:24%;z-index:5}
.hm-p8{right:-1%;top:75%;width:21%;z-index:5}
.hm-p9{left:30%;top:84%;width:14%;transform:rotate(-10deg);z-index:6}
@media (max-width:699px){.hm-pol{padding:4px 4px 13px}}
html.dark .hm-pol{box-shadow:0 14px 26px -12px rgba(0,0,0,.8)}
html.dark .hm-pol img,html.dark .hm-png{filter:brightness(.94)}

/* ---------- предметы ---------- */
.hm-subjs{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:18px}
.hm-subj{position:relative;display:flex;gap:14px;align-items:center;padding:14px 50px 14px 14px;border-radius:20px;background:var(--card);border:1px solid var(--card-line);color:var(--fg);text-decoration:none;transition:border-color .2s,transform .2s}
.hm-subj img,.hm-plus{flex:none;width:64px;height:64px;border-radius:50%;object-fit:cover;background:#cfe9f7}
.hm-plus{display:grid;place-items:center;background:var(--primary-soft);color:var(--accent)}
.hm-plus svg{width:26px;height:26px}
.hm-subj h3{margin:0;font-size:18px;line-height:1.2;font-weight:800}
.hm-subj p{margin:4px 0 0;font-size:14px;line-height:1.4;color:var(--muted);font-weight:600}
.hm-arr{position:absolute;right:14px;top:50%;width:30px;height:30px;margin-top:-15px;display:grid;place-items:center;border-radius:50%;background:var(--primary-soft);color:var(--accent-small)}
.hm-arr svg{width:16px;height:16px}
@media (hover:hover){.hm-subj:hover{border-color:var(--primary);transform:translateY(-2px)}}

/* ---------- куда поступили: плашка открывает интервью или историю ---------- */
.hm-grads{display:flex;gap:10px;margin:18px -16px 0;padding:2px 16px 4px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.hm-grads::-webkit-scrollbar{display:none}
.hm-grad{flex:none;width:72%;display:flex;flex-direction:column;margin:0;padding:0;scroll-snap-align:start;scroll-margin-left:16px;border-radius:20px;overflow:hidden;background:var(--card);border:1px solid var(--card-line);color:var(--fg);font:inherit;text-align:left;cursor:pointer;transition:border-color .2s,transform .2s}
.hm-grad img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;object-position:50% 30%}
.hm-grad-b{flex:1;padding:12px 14px 14px;display:flex;flex-direction:column;gap:2px}
.hm-grad b{font-size:16px;line-height:1.2}
.hm-grad-b>span:not(.hm-grad-act){font-size:13px;font-weight:600;color:var(--muted)}
.hm-grad em{margin-top:4px;font-style:normal;font-size:14px;line-height:1.35;font-weight:700;color:var(--accent-small)}
.hm-grad-act{display:inline-flex;align-items:center;gap:6px;margin-top:auto;padding-top:10px;font-size:13.5px;font-weight:800;color:var(--accent-small)}
.hm-grad-act svg{width:14px;height:14px}
@media (hover:hover){.hm-grad:hover{border-color:var(--primary);transform:translateY(-2px)}.hm-grad:hover .hm-grad-act{text-decoration:underline}}
.hm-more2{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}

/* ---------- как устроено обучение ---------- */
.hm-fmts{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:18px}
.hm-fmt{display:flex;flex-direction:column;padding:20px;border-radius:24px;background:var(--card);border:1px solid var(--card-line)}
.hm-fmt h3{margin:6px 0 0;font-size:24px;line-height:1.15;font-weight:800;text-wrap:balance}
.hm-fmt p:not(.hm-k){margin:10px 0 0;font-size:15px;line-height:1.45;color:var(--muted);font-weight:600}
.hm-fmt .ov-btn{margin-top:auto;width:100%;justify-content:center}
.hm-fmt>p:nth-last-child(2){margin-bottom:20px}
.hm-pts{list-style:none;margin:10px 0 0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.hm-pts li{display:flex;gap:14px;align-items:flex-start;padding:16px;border-radius:20px;border:1px solid var(--card-line)}
.hm-pts i{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--primary-soft);color:var(--accent)}
.hm-pts i svg{width:22px;height:22px}
.hm-pts h3{margin:0;font-size:16px;line-height:1.25;font-weight:800}
.hm-pts p{margin:4px 0 0;font-size:14.5px;line-height:1.4;color:var(--muted);font-weight:600}

/* ---------- истории и команда ---------- */
.hm .ov-sts{margin-top:18px}

.hm-sub{margin:26px 0 0;font-size:18px;line-height:1.2;font-weight:800}
.hm .ov-sts,.hm .ov-ivs{margin-top:12px}

/* ---------- консультация ---------- */
.hm-cs-box{padding:22px 18px;border-radius:28px;background:var(--primary-soft)}
.hm-cs .ov-h2{margin-top:0}
.hm-cs-sub{margin:12px 0 0;font-size:16px;line-height:1.45;font-weight:600;text-wrap:pretty}
.hm-cs-tags{margin-top:16px}
.hm-cs-for{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:6px}
.hm-cs-for li{position:relative;padding-left:18px;font-size:14.5px;line-height:1.4;font-weight:600;color:var(--muted)}
.hm-cs-for li::before{content:"";position:absolute;left:2px;top:.5em;width:7px;height:7px;border-radius:50%;background:var(--primary)}
.hm-cs-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:20px}
.hm-cs-card{position:relative;overflow:hidden;padding:18px 92px 18px 18px;border-radius:20px;background:var(--bg);border:1px solid var(--card-line)}
.hm-cs-card h3{margin:0;font-size:17px;line-height:1.2;font-weight:800;text-wrap:balance}
.hm-cs-card p{margin:8px 0 0;font-size:14.5px;line-height:1.45;color:var(--muted)}
.hm-cs-card img{position:absolute;right:-14px;bottom:-14px;width:96px;height:96px;object-fit:contain;opacity:.8;pointer-events:none}
.hm-cs-foot{display:flex;flex-direction:column;gap:16px;margin-top:20px}
.hm-cs-who{display:flex;flex-direction:column;align-items:flex-start;gap:10px;font-size:14.5px;line-height:1.35;font-weight:700}
.hm-faces{display:flex;flex:none}
.hm-faces img{width:38px;height:38px;border-radius:50%;object-fit:cover;background:#cfe9f7;box-shadow:0 0 0 2px var(--bg)}
.hm-faces img+img{margin-left:-10px}
.hm-cs-foot .ov-btn{width:100%;justify-content:center}

/* ---------- соцсети: общий канал школы — главной карточкой, ниже каналы по английскому ---------- */
.hm-socs-main{margin-top:18px}
.hm-soc.hm-soc-main{background:var(--primary-soft);border-color:transparent}
.hm-soc-main .hm-soc-h>span{display:flex;flex-direction:column;min-width:0}
.hm-soc-main .hm-soc-h small{font-size:13px;font-weight:700;color:var(--accent-small)}
.hm-soc-main .hm-soc-h b{font-size:20px;line-height:1.2}
.hm-soc.hm-soc-main i,.hm-soc.hm-soc-main i svg{width:48px;height:48px}
.hm-soc-main p{font-size:15.5px;color:var(--fg)}
.hm-socs-main+.hm-sub{margin-top:24px}
.hm-socs{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-top:18px}
.hm-soc{display:flex;flex-direction:column;gap:10px;padding:18px;border-radius:20px;background:var(--card);border:1px solid var(--card-line);color:var(--fg);text-decoration:none;min-width:0;transition:border-color .2s,transform .2s}
.hm-soc-h{display:flex;align-items:center;gap:10px}
.hm-soc-h b{font-size:18px}
.hm-soc i{flex:none;display:grid;place-items:center;width:34px;height:34px}
.hm-soc i svg,.hm-soc i img{width:34px;height:34px;border-radius:9px;display:block}
.hm-soc .ov-vk{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#0077FF;margin:0}
.hm-soc .ov-vk svg{width:24px;height:24px}
.hm-soc p{margin:0;font-size:14.5px;line-height:1.45;color:var(--muted);font-weight:600}
.hm-soc-go{margin-top:auto;display:inline-flex;align-items:center;justify-content:center;padding:12px 16px;border-radius:14px;background:var(--primary);color:#fff;font-weight:800;font-size:14.5px}
@media (hover:hover){.hm-soc:hover{border-color:var(--primary);transform:translateY(-2px)}.hm-soc:hover .hm-soc-go{background:var(--primary-hover)}}

/* ---------- ноутбук ---------- */
@media (min-width:700px){
  .hm-subjs,.hm-fmts,.hm-cs-cards,.hm-socs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hm-more2{display:flex;justify-content:center;gap:12px}
  .hm-grad{width:44%}
  .hm-btns{grid-template-columns:repeat(2,max-content)}
  .hm-btns .ov-btn{width:auto}
}
@media (min-width:1000px){
  .hm-sec{padding:64px 0}
  .hm .ov-h2{font-size:40px}
  .hm-lead{font-size:18px;margin-top:14px}
  .hm-hero{padding:40px 0 30px}
  .hm-hero-grid{grid-template-columns:minmax(0,1fr) minmax(0,520px);gap:40px;align-items:center}
  .hm .ov-h1{font-size:50px;margin-top:14px}
  .hm .ov-sub{font-size:19px;margin-top:14px}
  .hm .ov-phrase{margin-top:28px}
  .hm-stats{max-width:560px;gap:12px;margin-top:24px}
  .hm-stats li{padding:16px 18px;border-radius:20px}
  .hm-stats b{font-size:34px}
  .hm-stats span{font-size:14px}
  .hm-btns{margin-top:30px;gap:12px}
  .hm-btns .ov-btn{font-size:17px;padding:18px 30px}
  .hm-hero-visual{margin:0}
  .hm-subjs{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:30px}
  .hm-subj{padding:20px 56px 20px 20px;border-radius:24px;align-items:flex-start}
  .hm-subj img,.hm-plus{width:76px;height:76px}
  .hm-subj h3{font-size:21px;margin-top:4px}
  .hm-subj p{font-size:14.5px}
  .hm-arr{top:24px;margin-top:0}
  .hm-more{margin-top:30px}
  .hm-more .ov-btn{width:auto;min-width:280px}
  .hm-grads{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:30px 0 0;padding:0;overflow:visible}
  .hm-grad{width:auto}
  .hm-fmts{gap:16px;margin-top:30px}
  .hm-fmt{padding:30px 32px;border-radius:30px}
  .hm-fmt h3{font-size:32px}
  .hm-fmt p:not(.hm-k){font-size:16.5px}
  .hm-fmt .ov-btn{width:auto;align-self:flex-start}
  .hm-pts{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:16px}
  .hm-pts li{padding:20px}
  .hm-sub{margin-top:36px;font-size:22px}
  .hm .ov-sts,.hm .ov-ivs{margin-top:16px}
  .hm-cs-box{padding:44px 48px;border-radius:36px}
  .hm-cs-sub{font-size:19px}
  .hm-cs-for{grid-auto-flow:column;justify-content:start;gap:28px}
  .hm-cs-for li{font-size:15.5px}
  .hm-cs-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:30px}
  .hm-cs-card{padding:22px 22px 110px;min-height:270px}
  .hm-cs-card h3{font-size:19px}
  .hm-cs-card p{font-size:15.5px}
  .hm-cs-card img{width:120px;height:120px;right:-16px;bottom:-18px}
  .hm-cs-foot{flex-direction:row;align-items:center;justify-content:space-between;margin-top:30px}
  .hm-cs-who{flex-direction:row;align-items:center;gap:12px;font-size:16px}
  .hm-faces img{width:46px;height:46px}
  .hm-cs-foot .ov-btn{width:auto;min-width:320px}
  .hm-socs{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:30px}
  .hm-soc{padding:24px}
  .hm-soc p{font-size:15.5px}
  .hm-socs-main{margin-top:30px}
  .hm-soc.hm-soc-main{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr) auto;align-items:center;gap:28px;padding:28px 32px}
  .hm-soc-main p{font-size:17px}
  .hm-soc-main .hm-soc-go{margin:0;padding:16px 28px;font-size:16px}
  .hm-socs-main+.hm-sub{margin-top:32px}
  .hm-socs-main~.hm-socs{margin-top:16px}
}
.hm-sub+.hm-socs{margin-top:12px}
/* длинный h1 первого экрана: строки сбалансированы, кегль чуть меньше */
.hm .hm-h1{text-wrap:balance}
.hm .hm-h1 b{text-wrap:balance}
@media (max-width:999px){.hm .hm-h1{font-size:clamp(24px,6.6vw,36px)}}
@media (min-width:1000px){.hm .hm-h1{font-size:42px;line-height:1.08}}
/* первый экран: классы и предметы чипами вместо строки с логотипами */
.hm .hm-tags{margin-top:20px;flex-wrap:wrap;overflow:visible;max-width:100%}
.hm-tags li{padding:0}
.hm-tags li.hm-tag-k{padding:6px 10px;background:var(--primary);border-color:var(--primary);color:#fff}
.hm-tags a{display:block;padding:6px 10px;color:inherit;text-decoration:none;border-radius:8px}
@media (hover:hover){.hm-tags a:hover{background:var(--primary-soft)}}
@media (min-width:1000px){.hm .hm-tags{margin-top:28px;gap:8px}.hm-tags li{font-size:14px}.hm-tags a,.hm-tags li.hm-tag-k{padding:8px 12px}}

/* ---------- олимпиады и вузы: выбор предмета, плитки вузов, окна с льготами (классы ov-vu — с «Олимпологии») ---------- */
.hm-vs{display:flex;gap:6px;margin:0 -16px 14px;padding:2px 16px;overflow-x:auto;scrollbar-width:none}
.hm-vs::-webkit-scrollbar{display:none}
.hm-vs button{flex:none;padding:8px 13px;border-radius:99px;border:1.5px solid var(--card-line);background:var(--bg);color:var(--fg);font:inherit;font-weight:800;font-size:13.5px;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.hm-vs button[aria-pressed="true"]{background:var(--primary);border-color:var(--primary);color:#fff}
@media (hover:hover){.hm-vs button:not([aria-pressed="true"]):hover{border-color:var(--primary)}}
.hm .ov-vu-picks{grid-template-columns:repeat(4,minmax(0,1fr))}
.hm .ov-vu-picks[hidden],.hm .ov-vu-k[hidden]{display:none}
.hm .ov-vu-r{padding:14px}
.hm-vu-k{text-transform:none;letter-spacing:0;font-size:14px;color:var(--fg)}
.hm-vu-gt{position:relative;margin:8px 0 0;padding:10px 12px 10px 26px;border-radius:12px;font-size:14px;line-height:1.4;font-weight:700;background:var(--primary-soft);color:var(--fg)}
.hm-vu-gt::before{content:"";position:absolute;left:11px;top:16px;width:8px;height:8px;border-radius:50%;background:var(--primary)}
.hm-vu-gt.g{background:rgba(217,154,43,.14)}
.hm-vu-gt.g::before{background:#d99a2b}
.hm-vu-src a{display:inline-flex;align-items:center;gap:6px;color:var(--link);font-weight:700;text-decoration:none}
.hm-vu-src a:hover{text-decoration:underline}
.hm-vu-src svg{width:14px;height:14px}
@media (max-width:999px){.hm .ov-vu-pick span{font-size:11px}.hm .ov-vu-more{padding:8px 10px}}
@media (min-width:1000px){
  .hm-vu .ov-h2{max-width:none}
  .hm .ov-vu-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:40px;margin-top:26px}
  .hm .ov-vu-r{padding:18px 20px}
  .hm-vs{flex-wrap:wrap;margin:0 0 14px;padding:0;overflow:visible}
  .hm-vs button{padding:9px 15px;font-size:14px}
  .hm .ov-vu-picks{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
  .hm .ov-vu-pick img{height:40px}
}
