/* /download/ — VulPiNe client downloads. Same tokens and header as /support/ (support.css, wave 5). 05.11.2026. */
@font-face {
  font-family: "Fredoka Expanded";
  src: url("/assets/fonts/fredoka-expanded-semibold.ttf?v=20260829logo3") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #08090B;
  --bg-elevated: #0E1014;
  --bg-card: #12151A;
  --bg-card-hover: #161A21;
  --red: #F12632;
  --red-deep: #A30F1B;
  --red-soft: rgba(241, 38, 50, 0.14);
  --red-line: rgba(241, 38, 50, 0.45);
  --text: #F5F6F7;
  --muted: #969BA5;
  --muted-2: #6B7280;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Arial Rounded MT Bold", "Arial Rounded MT", ui-rounded, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(241, 38, 50, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(163, 15, 27, 0.12), transparent 50%),
    linear-gradient(180deg, #08090B 0%, #0A0C10 50%, #08090B 100%) fixed;
  font-family: var(--font);
  font-size: 16.64px;
  line-height: 27.46px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; font-family: var(--font); font-weight: 600; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:is(a, button, summary):focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--red); color: #fff; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header: same wordmark as the site header. */
.article-header {
  position: sticky; top: 0; z-index: 20; height: 88px;
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.article-nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.article-brand b {
  font-family: "Fredoka Expanded", var(--font);
  font-size: 42px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; color: var(--text);
}
.article-brand b span { color: var(--red); }
.article-actions { display: flex; align-items: center; gap: 18px; }
.article-back { color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.article-back:hover { color: var(--text); }

/* Language switcher (markup from i18n-core.js; styles mirror styles.css). */
.lang-switch-host { display: flex; align-items: center; flex: none; }
.lang-flags { display: inline-flex; gap: 6px; flex: none; }
.lang-flag-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent;
}
.lang-flag-btn.is-active { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.06); }
.lang-flag-img { width: 22px; height: 15px; min-width: 22px; flex: none; border-radius: 3px; object-fit: cover; }
.lang-flag-code { font-size: 12px; color: var(--muted); }
.lang-dropdown { position: relative; }
.lang-dropdown-trigger {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: transparent;
}
.lang-dropdown-chevron { width: 12px; height: 8px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); display: none; flex-direction: column; gap: 2px;
  padding: 6px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-elevated);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); z-index: 30;
}
.lang-dropdown.is-open .lang-dropdown-menu { display: flex; }

/* Hero */
.download-main { padding-block: 56px 96px; }
.download-hero { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.download-eyebrow { margin: 0 0 12px; color: var(--red); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.download-hero h1 {
  margin: 0 0 16px; font-size: clamp(32px, 4.6vw, 54px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance;
}
.download-lead { margin: 0 auto; max-width: 680px; color: var(--muted); }
.download-detected {
  margin: 22px auto 0; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px;
  padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); font-size: 14px; line-height: 1.4;
}
.download-detected b { color: var(--text); }
.download-detected > span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.14); }

/* Cards */
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.download-card {
  position: relative; min-width: 0; padding: 26px 22px 22px; display: flex; flex-direction: column; gap: 12px;
  background: rgba(18, 21, 26, 0.86); border: 1px solid var(--border); border-radius: 18px;
  transition: border-color 0.2s, background 0.2s;
}
.download-card:hover { border-color: rgba(241, 38, 50, 0.35); background: rgba(22, 26, 33, 0.96); }
.download-card.is-recommended {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(241, 38, 50, 0.105), rgba(18, 21, 26, 0.94));
}
.download-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.download-card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: #ff7d84;
}
.download-card-icon svg { width: 24px; height: 24px; }
.download-card-badge {
  padding: 6px 9px; border-radius: 7px; color: #fff; background: var(--red-deep);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.download-card h2 { margin: 2px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.download-card-sub { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.download-card-meta { margin: 0; color: var(--muted); font-size: 14px; }
.download-card-meta b { color: var(--text); font-weight: 600; }
.download-card-meta .dot { margin: 0 6px; color: var(--muted-2); }

.download-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; align-self: flex-start;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  color: #fff; background: var(--red); border: 1px solid var(--red);
  font-size: 15px; font-weight: 600; line-height: 1.3;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.download-button:hover { background: #ff3340; border-color: #ff3340; }
.download-button svg { flex: none; width: 20px; height: 20px; }
.download-card-meta[data-meta-static] { display: block; }
.download-button:active { transform: scale(0.98); }
.download-button[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.download-store-badge { display: inline-block; line-height: 0; align-self: flex-start; }
.download-store-badge img { height: 44px; width: auto; }

.download-sha { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted-2); font-size: 12.5px; line-height: 1.5; }
.download-sha code { color: var(--muted); word-break: break-all; font-size: 12px; }
.download-copy {
  padding: 2px 9px; border-radius: 7px; border: 1px solid var(--border-strong); background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.download-copy:hover { color: var(--text); border-color: rgba(241, 38, 50, 0.55); background: var(--red-soft); }
.download-copy.is-done { color: #3ddc84; border-color: rgba(61, 220, 132, 0.45); }

.download-steps { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.download-steps summary, .download-faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 600; font-size: 15px;
}
.download-steps summary::-webkit-details-marker, .download-faq summary::-webkit-details-marker { display: none; }
.download-steps summary::before, .download-faq summary::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: rotate(-45deg); transition: transform 0.2s; flex: none; margin-left: 2px;
}
.download-steps[open] summary::before, .download-faq details[open] summary::before { transform: rotate(45deg); }
.download-steps ol { margin: 10px 0 0; padding-left: 22px; color: var(--muted); font-size: 14.5px; line-height: 1.55; display: grid; gap: 8px; }
.download-steps ol b { color: var(--text); font-weight: 600; }
.download-card-note { margin: 0; color: var(--muted-2); font-size: 13.5px; line-height: 1.5; }
.download-card-alt { color: var(--text); padding-top: 6px; border-top: 1px dashed var(--border); }
.download-card-alt a { color: var(--red); font-weight: 600; }

/* After install, FAQ, support */
.download-after, .download-faq { max-width: 760px; margin: 56px auto 0; }
.download-after h2, .download-faq h2 { margin: 0 0 16px; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.download-after-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; }
.download-after-steps li { position: relative; padding-left: 46px; color: var(--muted); }
.download-after-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--red-soft); border: 1px solid var(--red-line); color: #ff7d84; font-size: 14px; font-weight: 700;
}
.download-after-note { margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.download-after-note a, .download-support a, .download-faq a { color: #ff7d84; }
.download-after-note a:hover, .download-support a:hover, .download-faq a:hover { color: #fff; }
.download-faq details { border-top: 1px solid var(--border); padding: 12px 0; }
.download-faq details:last-child { border-bottom: 1px solid var(--border); }
.download-faq p { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.download-support { max-width: 760px; margin: 40px auto 0; text-align: center; color: var(--muted); font-size: 15px; }

.download-footer { border-top: 1px solid var(--border); padding: 22px 0 36px; color: var(--muted-2); font-size: 13.5px; }
.download-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.download-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.download-footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .download-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .article-header { height: 72px; }
  .article-brand b { font-size: 34px; }
  .article-actions { gap: 10px; }
  .article-back { font-size: 14px; }
  .download-main { padding-block: 36px 72px; }
  .download-hero { margin-bottom: 28px; }
  .download-card { padding: 22px 18px 18px; }
  .download-button { width: 100%; }
  .download-after, .download-faq { margin-top: 44px; }
}
@media (max-width: 480px) {
  .article-back { display: none; }   /* the wordmark is the home link; keeps the 4 flags inside 375px */
  .lang-flags { gap: 2px; }
  .lang-flag-btn { padding: 6px 5px; }
}

/* 05.11: unsigned / unnotarized builds (shown while latest.json says signed:false / notarized:false) */
.download-unsigned { color: var(--text); background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 10px; padding: 8px 10px; }
.download-shots-item { list-style: none; }
.download-shots { margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .download-shots { grid-template-columns: minmax(0, 1fr); } }
.download-shots img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elevated); }
.download-shots figcaption { grid-column: 1 / -1; color: var(--muted-2); font-size: 12.5px; }
.download-sha-howto { margin: 18px 0 0; color: var(--muted-2); font-size: 13.5px; line-height: 1.55; }
.download-sha-howto code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--bg-elevated); padding: 1px 5px; border-radius: 5px; }

/* 05.11 beta mark (latest.json beta:true) */
.download-card-badge-beta { background: rgba(255, 196, 0, 0.16); color: #ffd666; border-color: rgba(255, 196, 0, 0.45); }
.download-beta { color: var(--text); background: rgba(255, 196, 0, 0.10); border: 1px solid rgba(255, 196, 0, 0.35); border-radius: 10px; padding: 8px 10px; }

/* 05.11 /download/iphone/: subscription link form + secondary button */
.download-linkform { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 6px; }
.download-linkform-label { font-size: 13px; color: var(--muted-2); }
.download-linkform-input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text); font: inherit; font-size: 15px; }
.download-linkform-input:focus { outline: none; border-color: var(--red); }
.download-button.is-disabled { opacity: .55; cursor: not-allowed; }
.download-card-note.is-ok { color: #8fe3a5; }
.download-button-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.download-button-secondary:hover { background: var(--bg-card-hover); border-color: var(--text); }

/* 06.11 «скоро» state (latest.json coming_soon:true): only the soon block is shown */
.download-card:not(.is-soon) [data-soon] { display: none !important; }
.download-card.is-soon [data-ready] { display: none !important; }
.download-soon { display: flex; flex-direction: column; gap: 8px; }

/* 06.11: SmartScreen screenshots exist only in Russian — other languages keep the text steps */
html:not([data-lang="ru"]) .download-shots-item { display: none !important; }
