/* Jeeks OS — публичные страницы (jos.jeeksshire24.com).
   Токены — BRANDBOOK.md §3 (палитра) и §5 (радиусы 13/18/24, сетка 2pt).
   Стиль страницы держится ТОЛЬКО тут: CSP отдаёт `style-src 'self'`, инлайновых `style="..."`
   в разметке нет ВООБЩЕ (браузер их заблокировал бы) — это не косметика, а несущее ограничение.
   Шрифт — системный стек. brand-override: §4 просит в вебе Space Grotesk/Inter, но публичная
   страница обязана делать НОЛЬ внешних запросов (ни CDN, ни шрифтов), поэтому веб-шрифта нет. */

:root {
  --bg: #08080A;
  --ink: #E7E9EA;
  --muted: rgba(231, 233, 234, .56);
  --surface: rgba(255, 255, 255, .075);
  --surface2: rgba(255, 255, 255, .115);
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .22);
  --sapphire: #2E60E0;
  --gold: #C9A24E;
  --r-sm: 13px;
  --r: 18px;
  --r-lg: 24px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F4F5F7;
    --ink: #14161B;
    --muted: rgba(20, 22, 27, .58);
    --surface: rgba(0, 0, 0, .04);
    --surface2: rgba(0, 0, 0, .06);
    --line: rgba(0, 0, 0, .10);
    --line-strong: rgba(0, 0, 0, .16);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
/* height:auto обязателен: у картинок стоят width/height из колонок вложения (это резерв места
   против «прыжка» вёрстки), и без него max-width сжимал бы ширину, оставляя высоту оригинала. */
img { display: block; max-width: 100%; height: auto; }

/* Колонка контента — 640 (BRANDBOOK: одна читаемая колонка, один брейкпоинт 700px) */
.page { max-width: 640px; margin: 0 auto; padding: 16px 16px 40px; }

/* ── Шапка: знак JOS + eyebrow графства ───────────────────────────────── */
.top { display: flex; align-items: center; gap: 10px; padding: 6px 2px 16px; }
.brand { display: flex; align-items: center; }
.brand svg { height: 20px; width: auto; fill: var(--ink); }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted);
}

/* ── Карточка ─────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
}
.card + .card { margin-top: 10px; }

/* ── Автор ────────────────────────────────────────────────────────────── */
.who { display: flex; align-items: center; gap: 10px; }
.ava {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 50%; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--line);
}
.ava img { width: 100%; height: 100%; object-fit: cover; }
.who-t { min-width: 0; }
.name {
  display: flex; align-items: center; gap: 4px;
  font-size: 15px; font-weight: 700; line-height: 1.25;
}
.name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver { width: 15px; height: 15px; flex: 0 0 15px; }
.handle { font-size: 13px; color: var(--muted); }

/* ── Текст поста / статьи ─────────────────────────────────────────────── */
.text { margin-top: 12px; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.text:empty { display: none; }

/* ── Фото ─────────────────────────────────────────────────────────────── */
.shots { margin-top: 12px; display: grid; gap: 6px; }
.shots.n2, .shots.n4 { grid-template-columns: 1fr 1fr; }
.shots.n3, .shots.nx { grid-template-columns: 1fr 1fr 1fr; }
.shot { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface2); }
.shot img { width: 100%; height: auto; }
.shots.n2 .shot img, .shots.n3 .shot img, .shots.n4 .shot img, .shots.nx .shot img {
  aspect-ratio: 1 / 1; object-fit: cover; height: 100%;
}

/* ── Мета и счётчики ──────────────────────────────────────────────────── */
.meta { margin-top: 12px; font-size: 13px; color: var(--muted); }
.stats { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.stat { display: inline-flex; align-items: center; gap: 5px; }
.stat svg { width: 15px; height: 15px; fill: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Кнопка «Открыть в Jeeks OS» ──────────────────────────────────────── */
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 10px 18px;
  background: var(--sapphire); color: #FFFFFF;
  border-radius: 999px; font-size: 15px; font-weight: 600;
}
.cta svg { width: 16px; height: 16px; fill: #FFFFFF; }

/* ── Секции ───────────────────────────────────────────────────────────── */
.sec { margin-top: 24px; }
.sec > .eyebrow { display: block; margin: 0 0 10px 2px; }
.reply { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 2px; }
.reply + .reply { margin-top: 0; }

/* ── Профиль ──────────────────────────────────────────────────────────── */
.banner {
  height: 148px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface2); border: 1px solid var(--line);
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.prof { margin-top: -38px; padding-top: 0; }
.pava {
  width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--bg); background: var(--surface2);
}
.pava img { width: 100%; height: 100%; object-fit: cover; }
.pname { margin: 10px 0 0; font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pname .ver { width: 19px; height: 19px; flex: 0 0 19px; }
.bio { margin-top: 8px; font-size: 15px; overflow-wrap: anywhere; }
.nums { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 18px; }
.num { font-size: 13px; color: var(--muted); }
.num b { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }

/* ── Статья ───────────────────────────────────────────────────────────── */
.art { border-color: var(--gold); }
.h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.art-img { margin-top: 14px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }

/* ── Пустое состояние / ошибка ────────────────────────────────────────── */
.empty { text-align: center; padding: 40px 16px; }
.empty .seal { width: 56px; height: 56px; margin: 0 auto 14px; }
.empty .seal svg { width: 100%; height: 100%; fill: var(--gold); }
.empty h1 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.empty p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── Подвал ───────────────────────────────────────────────────────────── */
.foot {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted);
}
.foot .seal { width: 18px; height: 18px; flex: 0 0 18px; }
.foot .seal svg { width: 100%; height: 100%; fill: var(--gold); }
.foot a { text-decoration: underline; text-underline-offset: 2px; }

/* ── Витрина / index ──────────────────────────────────────────────────── */
.lead { margin-top: 24px; font-size: 17px; color: var(--muted); }
.hero { margin-top: 24px; text-align: center; }
.hero svg { height: 44px; width: auto; fill: var(--ink); }
.hero h1 { margin: 18px 0 0; font-size: 26px; font-weight: 700; }

/* ── Единственный брейкпоинт ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .page { padding: 12px 12px 32px; }
  .card { padding: 14px; border-radius: var(--r-sm); }
  .banner { height: 112px; border-radius: var(--r); }
  .prof { margin-top: -30px; }
  .pava { width: 72px; height: 72px; }
  .pname { font-size: 21px; }
  .h1 { font-size: 22px; }
  .nums { gap: 14px; }
}
