/* Космошоп — документы бонусной программы. Чёрно-белый бренд, фирменный розовый #ff2470 (как в роликах) */
:root {
  --ink: #0b0b0b;
  --paper: #ffffff;
  --sand: #f3f1ed;
  --line: #e2ded7;
  --muted: #5f5a52;
  --accent: #ff2470;
  --accent-ink: #d4145e;
  --head: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --text: 'Manrope', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 400 16px/1.6 var(--text); }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* шапка */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { filter: invert(1); width: 44px; height: auto; }
.brand span { font: 600 13px/1.05 var(--head); text-transform: uppercase; letter-spacing: .06em; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: #d9d6d0; text-decoration: none; white-space: nowrap; font: 600 14px/1 var(--text); padding: 10px 12px; border-radius: 999px; }
.nav a:hover { color: #fff; background: #222; }
.nav a[aria-current="page"] { color: #fff; background: var(--accent); }

/* главная */
.hero { background: var(--ink); color: #fff; padding: 40px 0 56px; overflow: hidden; }
.hero-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kicker { margin: 0 0 8px; font: 600 14px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0; font: 700 clamp(44px, 9vw, 96px)/.95 var(--head); text-transform: uppercase; letter-spacing: .01em; }
.lead { margin: 18px 0 0; max-width: 34ch; font-size: 18px; color: #e8e5df; }
.hero-rocket { filter: invert(1); width: clamp(96px, 18vw, 180px); height: auto; transform: rotate(18deg); opacity: .95; flex: none; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: -28px; position: relative; }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; }
.fact b { display: block; font: 700 44px/1 var(--head); color: var(--accent); }
.fact span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.docs { padding: 40px 16px 56px; }
.docs-h { margin: 0 0 16px; font: 700 28px/1.1 var(--head); text-transform: uppercase; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card-link { display: flex; flex-direction: column; gap: 8px; padding: 20px 20px 22px; color: var(--ink); text-decoration: none; height: 100%; }
.card-t { font: 700 22px/1.1 var(--head); text-transform: uppercase; padding-right: 56px; }
.card-d { color: var(--muted); font-size: 15px; line-height: 1.45; }
.card-m { margin-top: auto; font-size: 13px; color: var(--muted); }
.card-pdf { position: absolute; top: 16px; right: 16px; font: 700 12px/1 var(--text); letter-spacing: .05em; color: #fff; background: var(--ink); padding: 8px 10px; border-radius: 999px; text-decoration: none; }
.card-pdf:hover { background: var(--accent); color: #fff; }
.note { margin: 20px 0 0; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--paper); border-radius: 0 12px 12px 0; font-size: 15px; }

/* страница документа */
.doc-hero { background: var(--ink); color: #fff; padding: 28px 0 32px; }
.back { display: inline-block; margin-bottom: 18px; color: #bdb8b0; text-decoration: none; font-size: 14px; }
.back:hover { color: #fff; }
.doc-hero h1 { margin: 0; font: 700 clamp(30px, 6vw, 56px)/1.02 var(--head); text-transform: uppercase; max-width: 22ch; }
.meta { margin: 10px 0 0; color: #bdb8b0; font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 15px/1 var(--text); text-decoration: none; }
.btn:hover { background: #ff4d8a; color: #fff; }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #5c5852; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.doc-grid { padding-top: 24px; padding-bottom: 56px; }
.doc-grid.has-toc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.toc { position: sticky; top: 84px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 12px 12px; max-height: calc(100vh - 104px); overflow: auto; }
.toc-h { margin: 0 8px 8px; font: 600 13px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 8px; padding: 7px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.3; }
.toc a::before { content: counter(t); font: 700 14px/1.3 var(--head); color: var(--accent); min-width: 1.2em; }
.toc a:hover { background: var(--sand); }
.doc { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 28px clamp(18px, 4vw, 44px) 36px; min-width: 0; }
.doc h2 { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 12px; font: 700 24px/1.15 var(--head); text-transform: uppercase; scroll-margin-top: 84px; }
.doc h2:first-child { margin-top: 0; }
.doc h2 .num { flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 18px; transform: translateY(-2px); }
.doc p { margin: 0 0 12px; }
.doc .pn { font-weight: 700; color: var(--muted); margin-right: 2px; }
.doc ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.doc li { position: relative; padding-left: 22px; margin: 0 0 6px; }
.doc li::before { content: ""; position: absolute; left: 4px; top: .68em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.doc strong { font-weight: 700; }
.table { margin: 4px 0 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.45; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th { background: var(--ink); color: #fff; font: 600 13px/1.3 var(--text); letter-spacing: .02em; }
.doc tr:last-child td { border-bottom: 0; }
.doc tbody tr:nth-child(even) td { background: #faf9f7; }

/* подвал */
.foot { background: var(--ink); color: #bdb8b0; padding: 28px 0 32px; font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot strong { color: #fff; font-weight: 600; }
.foot a { color: #fff; }
.age { margin-top: 12px !important; display: inline-block; border: 1.5px solid #5c5852; border-radius: 999px; padding: 4px 12px; font-weight: 700; color: #fff; }

/* планшет и телефон */
@media (max-width: 960px) {
  .doc-grid.has-toc { display: block; }
  .toc { position: static; max-height: none; margin-bottom: 16px; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .top-in { flex-direction: column; align-items: stretch; gap: 0; padding-top: 8px; }
  .brand { padding: 4px 0 6px; }
  .brand img { width: 36px; }
  .nav { margin: 0 -16px; padding: 0 12px 10px; }
  .nav a { padding: 8px 12px; font-size: 13px; background: #1c1c1c; }
  .hero { padding: 28px 0 48px; }
  .hero-rocket { width: 84px; align-self: flex-start; }
  .facts { grid-template-columns: 1fr; gap: 8px; }
  .fact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
  .fact b { font-size: 36px; min-width: 2.4em; }
  .fact span { margin-top: 0; }
  .doc { border-radius: 14px; }
  .doc h2 { font-size: 21px; }
  .toc { position: static; }
  .top { position: static; }
  .doc h2, .toc { scroll-margin-top: 12px; }
  /* таблица целей — карточками */
  .table { border: 0; overflow: visible; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { display: none; }
  .doc tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
  .doc tbody tr:nth-child(even) td { background: transparent; }
  .doc td { border-bottom: 1px solid var(--line); }
  .doc td::before { content: attr(data-label); display: block; font: 600 12px/1.2 var(--text); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
  .doc td:first-child { background: var(--ink) !important; color: #fff; font-weight: 600; }
  .doc td:first-child::before { color: #bdb8b0; }
}

/* печать и PDF */
@page { size: A4; margin: 16mm 16mm 16mm 18mm; }
@media print {
  body { background: #fff; font-size: 10.5pt; line-height: 1.5; }
  .top { position: static; background: #fff; color: var(--ink); border-bottom: 2px solid var(--ink); }
  .brand { color: var(--ink); } .brand img { filter: none; width: 34px; }
  .nav, .toc, .actions, .back, .card-pdf { display: none !important; }
  .doc-hero { background: #fff; color: var(--ink); padding: 14px 0 4px; }
  .doc-hero h1 { font-size: 24pt; max-width: none; }
  .meta { color: var(--muted); }
  .doc-grid, .doc-grid.has-toc { display: block; padding: 0; }
  .doc { border: 0; padding: 8px 0 0; border-radius: 0; }
  .doc h2 { font-size: 14pt; margin: 18px 0 8px; break-after: avoid; }
  .doc h2 .num { min-width: 24px; height: 24px; font-size: 12pt; border-radius: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc li::before, .doc th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc table { font-size: 9.5pt; } .table { overflow: visible; } tr { break-inside: avoid; }
  .doc a { color: var(--ink); }
  .foot { background: #fff; color: var(--muted); border-top: 1px solid var(--line); padding: 10px 0 0; font-size: 9pt; }
  .foot strong, .foot a { color: var(--ink); } .age { color: var(--ink); border-color: var(--ink); }
}
.meta + .meta { margin-top: 2px; }
.meta a { color: #fff; word-break: break-all; }
@media print { .meta a { color: var(--muted); } }
