/* Кнопка переключения темы + светлая тема.
   Тёмная тема — это основные стили страниц; здесь только то, что отличается в светлой.
   Общий файл: подключён на главной, в новостях и на страницах «История» / «Раскрытие». */

/* ---------- кнопка ---------- */
.theme-toggle{order:3;flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--text);cursor:pointer;transition:border-color .25s,background .25s,transform .25s}
.theme-toggle:hover{border-color:var(--text);background:rgba(128,128,128,.12)}
.theme-toggle:active{transform:scale(.94)}
.theme-toggle svg{width:20px;height:20px}
@media (max-width:960px){.theme-toggle{order:1;margin-left:auto}.hdr .burger{order:2}}

/* ---------- светлая тема ---------- */
html[data-theme="light"]{
  --bg:#f7f7f8; --bg-2:#eeeeef; --surface:#ffffff; --line:rgba(15,18,24,.12);
  --text:#0f1217; --muted:#5a606b;
  /* акцент — красный овал логотипа (#a62821); тёмно-синий «13» оставлен только в самом логотипе */
  --brand:#a62821; --brand-dark:#801d18;
  --accent:#a62821; --accent-dim:#b4443d;
  --tone-a:#f7f7f8; --tone-b:#eeeeef;
}

/* кнопки */
html[data-theme="light"] .btn-primary{background:var(--brand);color:#fff}
html[data-theme="light"] .btn-primary:hover{background:var(--brand-dark)}
html[data-theme="light"] .btn-ghost{border-color:rgba(166,40,33,.38)}
html[data-theme="light"] .btn-ghost:hover{border-color:var(--brand);background:rgba(166,40,33,.07)}

/* шапка и меню */
html[data-theme="light"] .hdr.scrolled,
html[data-theme="light"] .hdr:not(#top){background:rgba(247,247,248,.86)}
html[data-theme="light"] .nav a{color:#3a404a}
html[data-theme="light"] .nav a.btn,
html[data-theme="light"] .nav a:not(.btn):hover,
html[data-theme="light"] .nav a[aria-current],
html[data-theme="light"] .nav a[aria-current="true"]{color:var(--text)}
html[data-theme="light"] .burger{background:rgba(15,18,24,.04)}
html[data-theme="light"] .burger span{background:var(--text)}
@media (max-width:960px){
  html[data-theme="light"] .nav{background:rgba(247,247,248,.98)}
  html[data-theme="light"] .menu-open .hdr{background:rgba(247,247,248,.98)}
}

/* первый экран */
html[data-theme="light"] .hero::before{background:radial-gradient(45% 55% at 76% 48%,rgba(255,255,255,.9),transparent 70%),linear-gradient(180deg,#f2f2f3,#e9e9eb)}
html[data-theme="light"] .hero::after{background:linear-gradient(90deg,rgba(247,247,248,.94),rgba(247,247,248,.72) 38%,transparent 64%),linear-gradient(0deg,rgba(247,247,248,.7),transparent 30%)}
@media (max-width:960px){html[data-theme="light"] .hero::after{background:linear-gradient(180deg,transparent 28%,rgba(247,247,248,.92) 58%)}}
html[data-theme="light"] .hero .hero-title em{color:var(--brand)}
html[data-theme="light"] .hero .lead{color:#3a404a;text-shadow:0 1px 14px rgba(255,255,255,.85)}

/* карточки */
html[data-theme="light"] .card,
html[data-theme="light"] .fcard,
html[data-theme="light"] .feat li,
html[data-theme="light"] .disc,
html[data-theme="light"] .rowc,
html[data-theme="light"] .need div{box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 18px 36px -24px rgba(25,32,45,.35);background:linear-gradient(var(--surface),var(--surface)) padding-box,linear-gradient(180deg,rgba(166,40,33,.2),rgba(166,40,33,.06)) border-box}
html[data-theme="light"] .card:hover,
html[data-theme="light"] .feat li:hover{background:linear-gradient(var(--surface),var(--surface)) padding-box,linear-gradient(180deg,rgba(166,40,33,.45),rgba(166,40,33,.14)) border-box}
html[data-theme="light"] .card::before{background:radial-gradient(360px circle at var(--mx,50%) var(--my,0%),rgba(166,40,33,.05),transparent 60%)}
html[data-theme="light"] .ofs-side{box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 18px 36px -24px rgba(25,32,45,.3)}

/* текст */
html[data-theme="light"] .callout p,
html[data-theme="light"] .rowc p{color:#3d434d}
html[data-theme="light"] .rent .lead,
html[data-theme="light"] .rent .metro span{color:var(--muted)}
html[data-theme="light"] .metro strong{color:var(--brand)}
html[data-theme="light"] .fbrands .bm,
html[data-theme="light"] .fbrands span{border-color:rgba(15,18,24,.22)}
html[data-theme="light"] .fbrands .bm img{filter:brightness(0);opacity:.85}
html[data-theme="light"] .tl::before{background:linear-gradient(var(--accent),rgba(15,18,24,.25) 70%,transparent)}
html[data-theme="light"] .news a,
html[data-theme="light"] .news-ext,
html[data-theme="light"] .ext a{text-decoration-color:rgba(166,40,33,.45)}
html[data-theme="light"] .news a:hover,
html[data-theme="light"] .news-ext:hover,
html[data-theme="light"] .ext a:hover{text-decoration-color:var(--text)}
html[data-theme="light"] .ftr a:hover,
html[data-theme="light"] .ofs-list button:hover,
html[data-theme="light"] .ofs-list button.on{color:var(--text)}

/* мелочи */
html[data-theme="light"] :focus-visible{outline-color:var(--brand)}
html[data-theme="light"] .skip,
html[data-theme="light"] .toast{background:var(--brand-dark);color:#fff}
html[data-theme="light"] .totop{color:var(--text)}
html[data-theme="light"] .copy:hover{color:var(--text);border-color:rgba(15,18,24,.4)}
/* 3D-макет здания остаётся тёмным «окном» и в светлой теме: подпись на нём — светлая */
html[data-theme="light"] .wh-hint{color:#c4c4cc}

/* страницы новостей / истории / раскрытия */
html[data-theme="light"] .back{border-color:rgba(15,18,24,.35);background:rgba(15,18,24,.05);color:var(--text)}
html[data-theme="light"] .back:hover{background:#0f1217;color:#fff;border-color:#0f1217}
html[data-theme="light"] .nl a:hover{background:linear-gradient(90deg,rgba(15,18,24,.05),transparent)}
html[data-theme="light"] .nl a:hover .go{color:var(--text)}
html[data-theme="light"] .doc{color:#2a2f38}
html[data-theme="light"] .doc b,
html[data-theme="light"] .doc strong{color:var(--text)}
html[data-theme="light"] .doc tr:first-child td{background:rgba(15,18,24,.04)}
html[data-theme="light"] .pn a:hover{border-color:rgba(15,18,24,.4)}

/* 3D-макет здания: днём — светлое небо, ночью (тёмная тема) — тёмное */
html[data-theme="light"] .wh3d{background:linear-gradient(180deg,#b9d1ea,#dbe7f3 55%,#e6ecf3)}
html[data-theme="light"]{--ping:rgba(166,40,33,.4)}

/* ссылки и подчёркивания — акцентные */
html[data-theme="light"] .news a,
html[data-theme="light"] .news-ext{text-decoration-color:rgba(166,40,33,.45)}
html[data-theme="light"] .news a:hover,
html[data-theme="light"] .news-ext:hover,
html[data-theme="light"] .ext a:hover{text-decoration-color:var(--brand)}
html[data-theme="light"] .ofs-list button.on{color:var(--brand)}
html[data-theme="light"] .rowc a.big:hover{color:var(--brand)}
html[data-theme="light"] .back{border-color:rgba(166,40,33,.4);background:rgba(166,40,33,.06)}
html[data-theme="light"] .back:hover{background:var(--brand);border-color:var(--brand)}
html[data-theme="light"] .nl a:hover .go{color:var(--brand)}

/* рамки фотографий в светлой теме светлые, а не чёрные */
html[data-theme="light"] .thumb,
html[data-theme="light"] .axle,
html[data-theme="light"] .ofs-view{background:#e8e8ea}
html[data-theme="light"] .ofs-bg{filter:blur(34px) brightness(1.12) saturate(.85);opacity:.75}
html[data-theme="light"] .ofs-dot{background:rgba(255,255,255,.7);box-shadow:0 0 0 1px rgba(15,18,24,.2)}
html[data-theme="light"] .ofs-dot.on{background:#fff}

/* нижняя панель звонка на телефоне */
html[data-theme="light"] .callbar{background:rgba(247,247,248,.94);border-top:1px solid var(--line)}

/* ---------- тёмная тема: красный акцент логотипа (светлее, чтобы читался на чёрном) ---------- */
html[data-theme="dark"]{
  --brand:#c8322a; --brand-dark:#a62821; --brand-text:#ee4a40;
  --accent:#ee4a40; --accent-dim:#d9433b;
  --ping:rgba(238,74,64,.5);
}
html[data-theme="dark"] .hero .hero-title em{color:var(--brand-text)}
html[data-theme="dark"] .btn-primary{background:var(--brand);color:#fff}
html[data-theme="dark"] .btn-primary:hover{background:var(--brand-dark)}
html[data-theme="dark"] .btn-ghost:hover{border-color:var(--brand-text);background:rgba(238,74,64,.08)}
html[data-theme="dark"] .metro strong{color:var(--brand-text)}
html[data-theme="dark"] .ofs-list button.on{color:var(--brand-text)}
html[data-theme="dark"] .news a:hover,
html[data-theme="dark"] .news-ext:hover,
html[data-theme="dark"] .ext a:hover{text-decoration-color:var(--brand-text)}
html[data-theme="dark"] .rowc a.big:hover,
html[data-theme="dark"] .nl a:hover .go{color:var(--brand-text)}
html[data-theme="dark"] :focus-visible{outline-color:var(--brand-text)}
html[data-theme="dark"] .back:hover{background:var(--brand);border-color:var(--brand);color:#fff}
