/* «Кого унесла река» — стиль главной и страниц версий (собирает build.py).
   Шрифты игры: Ruslan Display — заголовки, Old Standard — текст (SIL OFL, fonts/OFL-*.txt). */
@font-face { font-family: "Ruslan Display"; src: url(fonts/RuslanDisplay-Regular.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Old Standard"; src: url(fonts/OldStandard-Regular.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Old Standard"; font-style: italic; src: url(fonts/OldStandard-Italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Old Standard"; font-weight: 700; src: url(fonts/OldStandard-Bold.woff2) format("woff2"); font-display: swap; }

:root {
  --bg: #0b1110; --bg2: #111b18; --bg3: #172421;
  --ink: #e3e6d2; --ink2: #c6c9b6; --muted: #939e96; --head: #f2ebda;
  --red: #d65a45; --gold: #d4b46a; --gold2: #ecd49a; --teal: #a9c7bb;
  --line: rgba(227, 230, 210, .12); --line2: rgba(227, 230, 210, .22);
  --display: "Ruslan Display", "Old Standard", Georgia, serif;
  --text: "Old Standard", Georgia, "Times New Roman", serif;
  --wrap: 760px; --wide: 1100px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 19px/1.7 var(--text); overflow-x: hidden; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% 6%, rgba(78, 118, 88, .16), transparent 62%),
    radial-gradient(900px 620px at 88% 42%, rgba(60, 140, 125, .09), transparent 62%),
    radial-gradient(1000px 760px at 28% 96%, rgba(214, 90, 69, .05), transparent 60%);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold2); text-underline-offset: .18em; }
p { margin: 0 0 1.05em; }

/* — обложка — */
.cover { position: relative; min-height: min(100vh, 920px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.cover picture { position: absolute; inset: 0; z-index: -2; }
.cover picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.cover::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 17, 16, .10) 0%, rgba(11, 17, 16, .30) 40%, rgba(11, 17, 16, .9) 78%, var(--bg) 100%); }
.cover-in { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 24px 72px; }
.kicker { margin: 0; font: 700 12.5px/1.4 var(--text); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
h1 { margin: .16em 0 .3em; font: 400 clamp(44px, 8vw, 100px)/1.02 var(--display); color: var(--red); letter-spacing: .01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .65), 0 0 2px rgba(0, 0, 0, .6); }
.lead { max-width: 690px; margin: 0; font: italic 400 clamp(19px, 2.2vw, 22.5px)/1.55 var(--text); color: var(--ink); text-shadow: 0 1px 16px rgba(0, 0, 0, .75); }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 26px 0 0; font-size: 15px; color: var(--ink2); text-shadow: 0 1px 12px rgba(0, 0, 0, .7); }
.get .dl { background: rgba(11, 17, 16, .6); text-shadow: none; }
.get a:not(.dl) { color: var(--ink2); }
.shot { position: absolute; right: 22px; bottom: 18px; margin: 0; font-size: 12.5px; font-style: italic; color: var(--muted); }

/* — кнопки — */
.dl { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid rgba(212, 180, 106, .55); color: var(--gold2); font: 700 13px/1 var(--text); letter-spacing: .08em; text-decoration: none; }
.dl svg { width: 16px; height: 16px; flex: none; }
.dl:hover, .dl:focus-visible { background: rgba(212, 180, 106, .16); }
.btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 22px 0 0; }

/* — коротко и содержание — */
.intro { max-width: var(--wide); margin: 0 auto; padding: 8px 20px 0; display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.box { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.box > .kicker { margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.facts dt { font: 700 11.5px/2 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.facts dd { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink2); }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: flex; gap: 12px; padding: 4px 0; color: var(--ink2); text-decoration: none; font-size: 17.5px; }
.toc a:hover { color: var(--gold2); }
.toc a span { flex: none; width: 24px; color: var(--red); font-variant-numeric: lining-nums tabular-nums; }

/* — разделы — */
main { padding: 0 20px; }
.sec { max-width: var(--wrap); margin: 0 auto; padding: 80px 0 4px; }
h2 { margin: 0 0 .55em; font: 400 clamp(32px, 4.4vw, 46px)/1.12 var(--display); color: var(--red); }
h2::before { content: ""; display: block; width: 132px; height: 12px; margin: 0 0 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 12'%3E%3Cg fill='none' stroke='%23d4b46a' stroke-width='1.2'%3E%3Cpath d='M0 6h48M84 6h48M55 2.5l3.5 3.5-3.5 3.5-3.5-3.5zM77 2.5l3.5 3.5-3.5 3.5-3.5-3.5z'/%3E%3C/g%3E%3Cpath d='M66 .8l5.2 5.2-5.2 5.2-5.2-5.2z' fill='%23d65a45'/%3E%3C/svg%3E") no-repeat; }
h3 { margin: 0 0 .35em; font: 700 22px/1.3 var(--text); color: var(--head); }
h4 { margin: 28px 0 4px; font: 700 12.5px/1.4 var(--text); letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }
.lede { font-size: 21px; line-height: 1.66; }
.dropcap::first-letter { float: left; margin: .1em .12em 0 0; font: 400 4.1em/.8 var(--display); color: var(--red); }
.note { color: var(--muted); font-size: 15.5px; font-style: italic; }

.key { margin: 30px 0; padding: 24px 28px; border-left: 3px solid var(--red); border-radius: 0 14px 14px 0;
  background: linear-gradient(90deg, rgba(214, 90, 69, .13), rgba(214, 90, 69, 0) 80%); }
.key p { margin: 0 0 .5em; font-size: 21px; line-height: 1.6; }
.key p:last-child { margin: 0; }
.key cite { display: block; margin-top: 10px; font-size: 15.5px; color: var(--muted); }

figure { margin: 34px 0; }
figure img { width: 100%; border-radius: 12px; box-shadow: 0 22px 60px rgba(0, 0, 0, .45); }
figcaption { margin-top: 10px; font-size: 15px; line-height: 1.5; font-style: italic; color: var(--muted); }
figcaption .tag { margin-right: 8px; }
.wide { width: min(var(--wide), calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 34px 0; }
.pair figure { margin: 0; }
.pair.wide { margin-left: 50%; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 8px; }
.stats div { padding: 22px 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); text-align: center; }
.stats b { display: block; font: 400 44px/1 var(--display); color: var(--red); }
.stats span { display: block; margin-top: 10px; font-size: 16.5px; line-height: 1.45; color: var(--ink2); }

/* — список версий — */
.tag { display: inline-block; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(212, 180, 106, .55);
  font: 700 10.5px/1 var(--text); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); vertical-align: 2px; }
.vlist { list-style: none; margin: 26px 0 20px; padding: 0; border-top: 1px solid var(--line); }
.vlist li { border-bottom: 1px solid var(--line); }
.vlist a { display: grid; grid-template-columns: 4.8em 1fr auto; align-items: baseline; gap: 2px 16px; padding: 13px 8px;
  color: var(--ink); text-decoration: none; transition: background .15s; }
.vlist a:hover, .vlist a:focus-visible { background: rgba(212, 180, 106, .07); }
.vlist b { font: 700 17px/1.3 var(--text); color: var(--gold2); font-variant-numeric: lining-nums tabular-nums; }
.vlist .vt { font-size: 18px; line-height: 1.4; }
.vt .tag { margin-left: 8px; }
.vlist time { font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.vlist p { grid-column: 2 / -1; margin: 4px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink2); }

/* — страница версии — */
.vhead { max-width: var(--wrap); margin: 0 auto; padding: 40px 20px 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 40px; font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--ink2); text-decoration: none; }
.crumbs a:hover { color: var(--gold2); }
.vhead .kicker .tag { margin-left: 10px; }
.vhead h1 { font-size: clamp(36px, 6vw, 62px); text-shadow: none; }
.vhead .lead { text-shadow: none; color: var(--ink2); }
.vmain { max-width: var(--wrap); margin: 0 auto; padding: 34px 20px 0; }
.ver > :first-child { margin-top: 0; }
.ver .note { margin-top: 28px; }
.ver ul { margin: .45em 0 0; padding-left: 1.1em; }
.ver ul li { margin: .3em 0; }
.ver ul li::marker { color: var(--red); }
.ver figure, .ver .pair { margin: 24px 0 0; }
.ver .pair figure { margin: 0; }
.ver-dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 30px 0 0; }
.ver-dl span { font-size: 15px; color: var(--muted); }
.chain { list-style: none; margin: 22px 0 8px; padding: 0; counter-reset: c; }
.chain li { position: relative; padding: 0 0 18px 54px; counter-increment: c; }
.chain li::before { content: counter(c); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg3); border: 1px solid rgba(212, 180, 106, .55); color: var(--gold); font: 700 15px/1 var(--text); }
.chain li::after { content: ""; position: absolute; left: 18px; top: 38px; bottom: 2px; width: 1px; background: var(--line2); }
.chain li:last-child::after { display: none; }
.chain li span { display: block; padding-top: 4px; font-size: 17.5px; line-height: 1.6; }
.old { margin: 0 0 30px; padding: 14px 18px; border: 1px solid var(--line2); border-radius: 12px; font-size: 16.5px; color: var(--ink2); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 46px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: 16.5px; }
.pager a { color: var(--ink2); text-decoration: none; }
.pager a:hover { color: var(--gold2); }
.pager .all { text-align: center; }
.pager .next { text-align: right; }
.aboutgame { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: center; margin: 54px 0 0; padding: 22px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg2); }
.aboutgame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.aboutgame h2 { margin: .15em 0 .3em; font-size: 30px; }
.aboutgame h2::before { display: none; }
.aboutgame p:not(.kicker) { font-size: 16.5px; line-height: 1.6; color: var(--ink2); }
.aboutgame .btns { margin: 14px 0 0; }

footer { max-width: var(--wrap); margin: 70px auto 0; padding: 26px 20px 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; line-height: 1.6; }
footer p { margin: 0 0 .5em; }
footer a { color: var(--ink2); }

@media screen and (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
}
@media screen and (max-width: 760px) {
  body { font-size: 18px; }
  .pair, .stats, .aboutgame { grid-template-columns: 1fr; }
  .sec { padding-top: 60px; }
  .lede { font-size: 19.5px; }
  .key { padding: 18px 20px; }
  .key p { font-size: 19px; }
  .cover-in { padding: 0 18px 56px; }
  .shot { right: 16px; bottom: 12px; }
  .vlist a { grid-template-columns: 4.4em 1fr; }
  .vlist time { grid-column: 2; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .all { grid-column: 1 / -1; grid-row: 2; }
}
@media screen and (max-width: 520px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 12px; }
  .box { padding: 20px; }
}
