/* IceRiver Control Center (Unofficial) - стили страницы загрузки.
   Цвета и шрифты - как в самой программе (theme.py): тёмная тема по умолчанию,
   светлая - по кнопке в шапке. Шрифты лежат рядом (assets/fonts), лицензия SIL OFL 1.1. */

@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/OpenSans-Regular.woff") format("woff"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/OpenSans-SemiBold.woff") format("woff"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/OpenSans-Bold.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/Montserrat-SemiBold.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/Montserrat-Bold.woff") format("woff"); }

:root {
  color-scheme: dark;
  --bg: #15181D;
  --bg-deep: #0F1114;
  --surface: #1E2228;
  --surface-hover: #252A31;
  --border: #2F353E;
  --text: #FFFFFF;
  --text-dim: #B4BAC4;
  --blue: #5094F4;
  --blue-strong: #186DEE;
  --blue-strong-hover: #0F5BD0;
  --sky: #46A4F6;
  --on-blue: #FFFFFF;
  --nav-bg: rgba(15, 17, 20, 0.88);
  --hero-glow: #1B2A44;
  --notice-bg: #1A1E24;
  --shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.75);
  --radius: 14px;
  --font-body: "Open Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
  --font-head: "Montserrat", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F7FA;
  --bg-deep: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #EEF4FE;
  --border: #DCE1E8;
  --text: #232323;
  --text-dim: #5A6270;
  --blue: #1565E2;
  --blue-strong: #1565E2;
  --blue-strong-hover: #0B4FB8;
  --sky: #186DEE;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --hero-glow: #DDE9FC;
  --notice-bg: #FFFFFF;
  --shadow: 0 30px 70px -28px rgba(21, 40, 80, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body);
  font-size: 16px; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.18; margin: 0; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--blue-strong); color: var(--on-blue);
  padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 12px; }

/* ---------- шапка ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { width: 34px; height: 34px; display: block; flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; white-space: nowrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); border: 1px solid var(--blue); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.nav-links { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a, .nav-top { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 8px;
  color: var(--text-dim); text-decoration: none; font: 600 14px/1.2 var(--font-body); background: none; border: 0;
  cursor: pointer; white-space: nowrap; }
.nav-list > li > a:hover, .nav-top:hover, .has-sub:hover > .nav-top, .has-sub.open > .nav-top { color: var(--text); background: var(--surface-hover); }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
.nav-sub { display: none; position: absolute; left: 0; top: 100%; min-width: 250px; margin: 0; padding: 8px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); z-index: 60; }
.nav-sub.cols { columns: 2; column-gap: 4px; min-width: 420px; }
.nav-sub li { break-inside: avoid; }
.nav-sub a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav-sub a:hover { background: var(--surface-hover); color: var(--blue); }
.nav-sub li:first-child a { font-weight: 700; }
.has-sub:hover > .nav-sub, .has-sub:focus-within > .nav-sub, .has-sub.open > .nav-sub { display: block; }
.has-sub.closing > .nav-sub { display: none; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.lang-switch > * { padding: 7px 10px; font: 600 14px/1.2 var(--font-body); text-decoration: none; color: var(--text-dim); white-space: nowrap; }
.lang-switch [aria-current] { background: var(--blue-strong); color: var(--on-blue); }
.lang-switch a:hover { background: var(--surface-hover); color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; font: 600 14px/1.2 var(--font-body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.nav-btn:hover { background: var(--surface-hover); }
.nav-cta { background: var(--blue-strong); border-color: var(--blue-strong); color: var(--on-blue); }
.nav-cta:hover { background: var(--blue-strong-hover); }
.nav-menu-btn { display: none; }

/* ---------- первый экран ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px;
  background: radial-gradient(ellipse at 50% 0%, var(--hero-glow) 0%, var(--bg) 62%); }
.hero-circuit { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.4; pointer-events: none; }
.hero-inner { position: relative; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: var(--blue);
  background: rgba(80, 148, 244, 0.12); border: 1px solid rgba(80, 148, 244, 0.45); padding: 6px 14px;
  border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); max-width: 860px; margin: 0 auto 18px; }
.hero h1 .accent { color: var(--blue); }
.hero .sub { max-width: 660px; margin: 0 auto 32px; color: var(--text-dim); font-size: 18px; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.btn { padding: 13px 26px; border-radius: 10px; font: 700 15px/1.3 var(--font-body); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--blue-strong); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-strong-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

.hero-shots { position: relative; max-width: 940px; margin: 0 auto; aspect-ratio: 940 / 520; }
.hero-shots img { position: absolute; width: 64%; height: auto; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: var(--shadow); display: block; }
.hero-shots .shot-back { right: 0; top: 0; }
.hero-shots .shot-front { left: 0; bottom: 0; }

/* ---------- разделы ---------- */
section { padding: 80px 0; }
section.alt { background: var(--bg-deep); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.eyebrow-line { color: var(--blue); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px; display: block; }
h2 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 14px; }
.section-head p { color: var(--text-dim); margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-grid > :last-child:nth-child(3n+1):nth-child(odd) { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
.feature-grid > :last-child:nth-child(3n+1):nth-child(odd) .ficon { margin: 0; flex: none; }
.feature-grid > :last-child:nth-child(3n+1):nth-child(odd) h3 { margin-bottom: 4px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.feature-card .ficon { width: 44px; height: 44px; margin-bottom: 14px; display: block; color: var(--blue); }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 14.5px; margin: 0; }

.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
figure.shot { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption { padding: 12px 16px; font-size: 13.5px; color: var(--text-dim); }
.shot-single { max-width: 660px; margin: 0 auto; }

.article { max-width: 780px; margin: 0 auto; }
.article h3 { font-size: 20px; margin: 34px 0 12px; color: var(--blue); }
.article p { color: var(--text-dim); margin: 0 0 16px; }
.article ul { color: var(--text-dim); padding-left: 22px; margin: 0 0 16px; }
.article li { margin-bottom: 8px; }
.article strong, .article code { color: var(--text); }

.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 40px; }
.series-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.series-card h3 { font-size: 15px; margin-bottom: 12px; color: var(--blue); }
.series-card ul { list-style: none; margin: 0; padding: 0; }
.series-card li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0;
  border-bottom: 1px dashed var(--border); }
.series-card li:last-child { border-bottom: 0; }
.series-card time { color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.series-card.wide { grid-column: 1 / -1; }
.series-card.wide ul { columns: 3 230px; column-gap: 36px; }
.series-card.wide li { break-inside: avoid; }
.series-card.wide li:last-child { border-bottom: 1px dashed var(--border); }
.list-title { text-align: center; font-size: 20px; margin: 56px 0 0; }
.list-note { text-align: center; color: var(--text-dim); font-size: 13.5px; margin: 18px 0 0; }

/* ---------- скачивание ---------- */
.download-box { text-align: center; background: linear-gradient(135deg, var(--hero-glow), var(--bg));
  border: 1px solid var(--border); border-radius: 20px; padding: 52px 28px; }
.download-box > p { color: var(--text-dim); margin: 0 0 28px; }
.version-note { font-size: 13.5px; color: var(--text-dim); margin-top: 18px; }
.dl-hash { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.dl-hash code { color: var(--text); word-break: break-all; -webkit-user-select: all; user-select: all; }
.dl-notice { max-width: 740px; margin: 30px auto 0; text-align: left; background: var(--notice-bg);
  border: 1px solid var(--border); border-left: 4px solid var(--sky); border-radius: 10px; padding: 18px 22px;
  font-size: 14.5px; color: var(--text-dim); }
.dl-notice h3 { font-size: 17px; margin: 0 0 10px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.dl-notice h3::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 22px;
  height: 22px; border-radius: 50%; background: var(--sky); color: #0F1114; font: 700 14px/1 var(--font-body); flex: none; }
.dl-notice p { margin: 0 0 10px; }
.dl-notice p:last-child { margin-bottom: 0; }
.dl-notice strong { color: var(--text); }

/* ---------- инструкции ---------- */
.model-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 26px; padding: 0; list-style: none; }
.model-tab { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 16px; font: 600 14px/1.25 var(--font-body); cursor: pointer; min-width: 132px; }
.model-tab:hover { background: var(--surface-hover); }
.model-tab[aria-selected="true"] { background: var(--blue-strong); border-color: var(--blue-strong); color: var(--on-blue); }
.model-panels { max-width: 620px; margin: 0 auto; }
.model-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 12px; }
.model-panel h3 { font-size: 17px; margin-bottom: 12px; }
.model-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.model-panel a { font-weight: 600; text-decoration: none; }
.model-panel a:hover { text-decoration: underline; }
.model-panel a::before { content: "\2193\00a0"; }
.js .model-panel[hidden] { display: none; }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-deep); padding: 52px 0 32px; color: var(--text-dim); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.25fr 1.45fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-col h3 { font-size: 15px; color: var(--text); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-dim); text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--blue); text-decoration: underline; }
.footer-col p { margin: 0 0 10px; }
.footer-col .note { font-size: 13px; margin-top: 12px; }
.site-footer .disclaimer { border-top: 1px solid var(--border); padding-top: 22px; margin: 0; font-size: 13px; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* ---------- cookie-баннер ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; max-width: 880px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--blue); border-radius: 14px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35); padding: 16px 20px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 380px; margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 10px 22px; font-size: 14px; }

/* ---------- страница Privacy ---------- */
.doc { max-width: 820px; margin: 0 auto; padding: 44px 24px 64px; }
.doc .back { display: inline-block; margin-bottom: 24px; font-weight: 600; text-decoration: none; }
.doc h1 { font-size: 32px; margin: 0 0 6px; }
.doc .updated { color: var(--text-dim); font-size: 14px; margin: 0 0 30px; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--text-dim); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong, .doc code { color: var(--text); }
.doc .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.doc .card p { margin: 0; }
.table-scroll { overflow-x: auto; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 6px 0 16px; }
.doc th, .doc td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; color: var(--text-dim); }
.doc th { color: var(--text); background: var(--surface); }

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg-deep);
    border-bottom: 1px solid var(--border); padding: 6px 16px 14px; max-height: calc(100vh - 64px); overflow-y: auto; }
  .nav-links.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li > a, .nav-top { width: 100%; justify-content: space-between; padding: 12px 8px; font-size: 15px; }
  .nav-sub, .has-sub:hover > .nav-sub, .has-sub:focus-within > .nav-sub { display: none; position: static; min-width: 0;
    box-shadow: none; border: 0; background: none; padding: 0 0 8px 12px; }
  .nav-sub.cols { min-width: 0; }
  .nav-sub a { white-space: normal; }
  .has-sub.open > .nav-sub { display: block; }
  .has-sub.open > .nav-top .caret { transform: rotate(180deg); }
  .nav-tools { margin-left: auto; }
  .nav-menu-btn { display: inline-block; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 44px 0 52px; }
  .hero .sub { font-size: 16.5px; }
  .brand { display: grid; grid-template-columns: 34px minmax(0, auto); column-gap: 8px; row-gap: 2px; align-items: center; }
  .brand img { grid-row: 1 / 3; }
  .brand-name { font-size: 13px; line-height: 1.15; white-space: normal; }
  .brand .pill { justify-self: start; font-size: 9px; padding: 0 6px; line-height: 1.5; }
  .nav-tools { gap: 6px; flex: none; }
  .nav-btn { padding: 6px 8px; font-size: 13px; }
  .lang-switch > * { padding: 6px 8px; font-size: 13px; }
  .lang-switch [aria-current] { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid > :last-child:nth-child(3n+1):nth-child(odd) { display: block; }
  .feature-grid > :last-child:nth-child(3n+1):nth-child(odd) .ficon { margin-bottom: 14px; }
  .nav-inner { padding: 10px 16px; gap: 10px; }
  .wrap { padding: 0 16px; }
  .nav-cta { display: none; }
  .hero-shots { aspect-ratio: auto; }
  .hero-shots img { position: static; width: 100%; }
  .hero-shots .shot-back { display: none; }
  .model-tab { min-width: 0; flex: 1 1 44%; }
  .download-box { padding: 36px 18px; }
}
@media (max-width: 420px) {
  .nav-sub.cols { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- 1.1.2: встраиваемый вариант без своей шапки и подвала ---- */
.page-notes { border-top: 1px solid var(--border); padding: 28px 0 32px; color: var(--text-dim); font-size: 13px; }
.doc .page-notes { margin-top: 40px; padding-bottom: 0; }
.doc .page-notes .wrap { padding: 0; }
.page-notes p { margin: 0 0 10px; }
.page-links a { color: var(--text-dim); }
.page-links a:hover { color: var(--blue); }
