/* Vocta — общий стиль. Без внешних ресурсов: системный шрифт, цвета — переменными. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f3f5f8;
  --text: #16181c;
  --muted: #555c66;
  --border: #d9dde3;
  --accent: #2563eb;
  --accent-hover: #1d4fc4;
  --on-accent: #ffffff;
  --note-bg: #fff6e0;
  --note-border: #d99a00;
  --focus: #1d4fc4;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --bg-soft: #1c1f25;
    --text: #e8eaed;
    --muted: #a8aeb7;
    --border: #353a42;
    --accent: #7eaaff;
    --accent-hover: #a3c2ff;
    --on-accent: #0b1220;
    --note-bg: #2a2413;
    --note-border: #c9a13a;
    --focus: #a3c2ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ссылка «к содержанию» — видна только при фокусе с клавиатуры */
.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
}

.skip:focus {
  top: 8px;
}

/* Шапка */
.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  min-height: 56px;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  padding: 10px 0;
}

.brand:hover {
  color: var(--text);
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: block;
  padding: 10px 10px;
  text-decoration: none;
  border-radius: 8px;
}

.site-nav a:hover {
  background: var(--bg-soft);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* Текст */
main {
  padding-top: 24px;
  padding-bottom: 48px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 2em 0 0.5em;
}

h1 {
  font-size: 2rem;
  margin-top: 0.25em;
}

h2 {
  font-size: 1.375rem;
}

h3 {
  font-size: 1.125rem;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.5em;
}

li + li {
  margin-top: 0.4em;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
}

/* Главная: первый экран */
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.25em;
}

.lead {
  font-size: 1.125rem;
}

.button {
  display: inline-block;
  min-height: 52px;
  padding: 13px 32px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
}

.button:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.button:focus-visible {
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .button {
    display: block;
    width: 100%;
  }
}

/* Главная и /install: каналы установки, равные колонки; третий канал встанет рядом сам */
.channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 1.5em 0 1em;
}

.channel .button {
  display: block;
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

/* Высота с полем, что входит в файл бейджа: сам знак равен кнопке (52 px); поле — не меньше четверти */
.play-badge {
  display: block;
  width: fit-content;
  margin: -13px 0 0 -14px;
}

.channel .play-badge {
  margin: -13px auto 0;
}

.play-badge img {
  display: block;
  height: 78px;
  width: auto;
  max-width: 100%;
}

/* RuStore: the official button, no field in the file; its height equals the Play mark (52 px), not more */
.rustore-badge {
  display: block;
  width: fit-content;
}

.channel .rustore-badge {
  margin: 0 auto;
}

.rustore-badge img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 100%;
}

/* Two columns (from 544 px of grid): Play and RuStore on the left, the APK with its warning on the right */
@media (min-width: 600px) {
  .channels {
    grid-template-rows: auto 1fr;
  }

  #channel-apk {
    grid-row: span 2;
  }
}

.channel .meta {
  text-align: center;
}

.channel .note {
  margin-top: 12px;
}

.meta {
  margin: 12px 0 4px;
  color: var(--muted);
}

.sha {
  margin: 0 0 1.5em;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.sha code {
  word-break: break-all;
  overflow-wrap: anywhere;
}

.more {
  margin-top: 2em;
}

/* Выделенный блок: пометки и предупреждения */
.note {
  margin: 0 0 1.25em;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.note.warn {
  background: var(--note-bg);
  border-left-color: var(--note-border);
}

.note > :last-child {
  margin-bottom: 0;
}

/* Установка: шаги */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps > li + li {
  margin-top: 0;
}

.shot {
  margin: 0.5em 0 1.5em;
}

.shot img {
  display: block;
  width: 100%;
  max-width: 270px;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #121418;
}

.shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Лицензии: таблицы */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.9375rem;
  line-height: 1.45;
}

th,
td {
  padding: 8px 8px 8px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  font-weight: 600;
  overflow-wrap: normal;
  color: var(--muted);
}

/* Подвал */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
  padding: 20px 0 32px;
  line-height: 2.2;
}

.site-footer a {
  padding: 6px 0;
}
