/* Kazeev: бумажная газета + веб 2015–2017. Одна «бумажная» тема, тёмной нет намеренно. */
:root {
  color-scheme: light;
  --paper: #f3eee2;
  --paper-deep: #e8e0cc;
  --ink: #1e1c19;
  --ink-soft: #5a5348;
  --rule: #1e1c19;
  --rule-soft: #b9ae97;
  --accent: #a3321f;
  --valencia-ink: #8a3c1c;
  --valencia-bg: #f5d9ae;
  --bs-border: #ddd;
  --bs-text: #333;
  --white: #fff;
  --tg: #2ca5e0;

  --f-display: "Playfair Display", "Times New Roman", Georgia, serif;
  --f-body: "PT Serif", Georgia, "Times New Roman", serif;
  --f-label: "PT Sans Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .22  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
}
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-block: 18px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- верхняя строка ---------- */
.strip {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px;
  font-family: var(--f-label); font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}
.strip b { color: var(--ink); font-weight: 700; }

/* ---------- шапка ---------- */
.masthead { text-align: center; padding-block: 14px 10px; }
.masthead .name {
  display: inline-block; text-decoration: none;
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(56px, 13vw, 140px); line-height: .95; letter-spacing: -.02em;
  margin: 0;
}
.masthead.compact .name { font-size: clamp(44px, 8vw, 84px); }
.masthead .motto {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: var(--f-display); font-style: italic; font-size: clamp(15px, 2.2vw, 20px);
  margin-top: 8px; color: var(--ink-soft); white-space: nowrap;
}
.masthead .motto::before, .masthead .motto::after {
  content: ""; height: 1px; flex: 0 1 90px; background: var(--rule-soft);
}
.double-rule { border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); height: 7px; }

/* ---------- рубрики ---------- */
nav.rubrics {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px;
  font-family: var(--f-label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 15px;
  padding-block: 9px; border-bottom: 1px solid var(--rule);
}
nav.rubrics a { text-decoration: none; }
nav.rubrics a:hover, nav.rubrics a.on { color: var(--accent); }

/* ---------- бегущая строка ---------- */
.ticker {
  display: flex; align-items: stretch; overflow: hidden;
  border-bottom: 1px solid var(--rule); font-family: var(--f-label); font-size: 16px;
}
.ticker .flag {
  flex: none; background: var(--ink); color: var(--paper);
  text-transform: uppercase; font-weight: 700; letter-spacing: .08em; padding: 6px 12px;
}
.ticker .track { overflow: hidden; flex: 1; min-width: 0; display: flex; align-items: center; }
.ticker .run { display: inline-flex; gap: 36px; white-space: nowrap; padding-left: 24px; animation: run 48s linear infinite; }
.ticker .run span::before { content: "★"; color: var(--accent); margin-right: 10px; font-size: 12px; }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- первая полоса ---------- */
.front {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 32px;
  padding-top: 22px;
}
.front > .lead { padding-right: 32px; border-right: 1px solid var(--rule-soft); margin-right: -32px; min-width: 0; }
.front.solo { grid-template-columns: minmax(0, 1fr); }
.front.solo > .lead { padding-right: 0; margin-right: 0; border-right: 0; }
.front.solo > .empty { text-align: center; margin-bottom: 18px; }
.front.solo > .side { width: 100%; max-width: 360px; justify-self: center; }
.side { display: grid; align-content: start; gap: 22px; min-width: 0; }

.kicker {
  font-family: var(--f-label); font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  font-size: 14px; color: var(--accent); text-decoration: none;
}
a.kicker:hover { text-decoration: underline; }
.headline {
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; letter-spacing: -.015em;
  margin: 6px 0 12px; text-wrap: balance;
}
.headline a { text-decoration: none; }
.headline a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.deck {
  font-family: var(--f-display); font-style: italic; font-size: clamp(18px, 2.2vw, 23px); line-height: 1.35;
  color: var(--ink-soft); margin: 0 0 16px; max-width: 62ch; text-wrap: balance;
}

/* иллюстрации в растре; при наведении — фильтр «Валенсия» */
.photo { margin: 0 0 14px; }
.photo .plate {
  --ph-ink: var(--ink); --ph-bg: var(--paper-deep);
  color: var(--ph-ink); background: var(--ph-bg);
  border: 1px solid var(--rule); transition: color .5s, background-color .5s;
  line-height: 0;
}
.photo .plate svg { width: 100%; height: auto; display: block; }
.photo .plate .bg, .photo .plate .cut { fill: var(--ph-bg); transition: fill .5s; }
.photo .plate .cutline { fill: none; stroke: var(--ph-bg); transition: stroke .5s; }
.photo:hover .plate, body.y2016 .photo .plate { --ph-ink: var(--valencia-ink); --ph-bg: var(--valencia-bg); }
.photo figcaption {
  font-family: var(--f-label); font-size: 14px; color: var(--ink-soft); margin-top: 6px;
}

.byline {
  font-family: var(--f-label); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
  border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); padding-block: 5px; margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 4px 16px;
}
.cols { columns: 2; column-gap: 30px; column-rule: 1px solid var(--rule-soft); text-align: justify; hyphens: auto; }
.cols p { margin: 0 0 .8em; }
.dropcap > p:first-child::first-letter {
  font-family: var(--f-display); font-weight: 900; float: left;
  font-size: 4.6em; line-height: .82; padding: 6px 8px 0 0; color: var(--ink);
}
.source { font-family: var(--f-label); font-size: 15px; color: var(--ink-soft); margin: 10px 0 0; }

/* «Поделиться» как в 2015-м, со счётчиком */
.share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.share .lbl { font-family: var(--f-label); font-size: 14px; color: var(--ink-soft); margin-right: 4px; }
.sb {
  display: inline-flex; align-items: stretch; font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: 700;
  border-radius: 3px; overflow: hidden; text-decoration: none;
}
.sb .n { padding: 5px 9px; color: var(--white); background: var(--tg); }
.sb .c { padding: 5px 8px; background: var(--white); color: var(--bs-text); font-weight: 400; border: 1px solid var(--bs-border); border-left: 0; border-radius: 0 3px 3px 0; font-variant-numeric: tabular-nums; }
.sb:hover .n { filter: brightness(1.1); }

/* ---------- боковая колонка ---------- */
.zero { border: 3px double var(--rule); padding: 14px; text-align: center; }
.zero .t { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .1em; font-size: 14px; font-weight: 700; }
.zero .num { font-family: var(--f-display); font-weight: 900; font-size: 92px; line-height: 1; margin: 4px 0; }
.zero .s { font-style: italic; color: var(--ink-soft); font-size: 15px; }

.howto { border-top: 3px solid var(--rule); padding-top: 8px; }
.howto h3 { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .1em; font-size: 15px; margin: 0 0 6px; }
.howto p { margin: 0 0 .6em; font-size: 15px; color: var(--ink-soft); }
.strip a.fresh { color: var(--ink); font-weight: 700; text-decoration: none; }
.strip a.fresh:hover { color: var(--accent); }
.section-head h2 a { text-decoration: none; }
.section-head h2 a:hover { color: var(--accent); }
.tg-card {
  display: grid; gap: 6px; padding: 12px 14px; text-decoration: none;
  border: 1px solid var(--rule-soft); background: var(--paper-deep);
  transition: border-color .2s;
}
.tg-card:hover { border-color: var(--rule); }
.tg-card-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 15px;
}
.tg-card-head svg { fill: var(--ink); flex: none; transition: fill .2s; }
.tg-card-head .plane { fill: var(--paper-deep); }
.tg-card:hover .tg-card-head svg { fill: var(--tg); }
.tg-card-text { font-size: 15px; color: var(--ink-soft); line-height: 1.45; }
.tg-card-link { font-family: var(--f-label); font-weight: 700; font-size: 15px; color: var(--accent); }
.tg-card:hover .tg-card-link { text-decoration: underline; }
.strip-right { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tg-icon { display: inline-flex; color: var(--ink); line-height: 0; transition: color .2s; }
.tg-icon:hover { color: var(--tg); }
.tg-icon svg { fill: currentColor; }
.tg-icon .plane { fill: var(--paper); }

/* ---------- ряд «Также в номере» ---------- */
.section-head {
  display: flex; align-items: baseline; gap: 14px; margin-top: 30px;
  border-top: 3px solid var(--rule); padding-top: 6px;
}
.section-head h2, .section-head h3 { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .1em; font-size: 16px; margin: 0; }
.section-head span { font-style: italic; color: var(--ink-soft); font-size: 15px; }

.row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.row > article { padding: 0 20px; border-left: 1px solid var(--rule-soft); min-width: 0; }
.row > article:first-child { padding-left: 0; border-left: 0; }
.row > article:last-child { padding-right: 0; }
.row h4, .grid h3 {
  font-family: var(--f-display); font-weight: 700; font-size: 23px; line-height: 1.12; margin: 6px 0 8px; text-wrap: balance;
}
.row h4 a, .grid h3 a { text-decoration: none; }
.row h4 a:hover, .grid h3 a:hover { text-decoration: underline; }
.row p, .grid p { margin: 0 0 .7em; font-size: 16px; hyphens: auto; }
.src { font-family: var(--f-label); font-size: 13px; color: var(--ink-soft); }
.more { font-family: var(--f-label); font-weight: 700; font-size: 14px; color: var(--accent); text-decoration: none; }
.more:hover { text-decoration: underline; }

/* ---------- списки: рубрика и архив ---------- */
.list-title {
  font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 5vw, 52px); line-height: 1.05;
  margin: 22px 0 0; text-wrap: balance;
}
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; margin-top: 14px; }
.grid > article { min-width: 0; border-top: 1px solid var(--rule-soft); padding-top: 10px; }
.empty { font-style: italic; color: var(--ink-soft); margin: 18px 0 0; }

/* ---------- страницы «О сайте», «Конфиденциальность» ---------- */
.prose { max-width: 68ch; margin: 22px auto 0; }
.prose h1 { font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin: 0 0 18px; }
.prose h2 { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .08em; font-size: 17px; margin: 26px 0 6px; border-top: 1px solid var(--rule); padding-top: 6px; }
.prose p, .prose li { margin: 0 0 .7em; }
.prose .updated { font-family: var(--f-label); font-size: 14px; color: var(--ink-soft); margin-top: 24px; }

.quote {
  margin: 30px 0 0; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  text-align: center;
}
.quote blockquote {
  margin: 0 auto; max-width: 30ch; font-family: var(--f-display); font-style: italic;
  font-size: clamp(24px, 3.6vw, 36px); line-height: 1.2; text-wrap: balance;
}
.quote cite { display: block; margin-top: 10px; font-family: var(--f-label); font-style: normal; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--ink-soft); }

/* ---------- подвал ---------- */
footer {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px 24px; align-items: center;
  font-family: var(--f-label); font-size: 14px; color: var(--ink-soft);
}
footer p { margin: 0; }
footer .age { border: 1px solid var(--ink-soft); padding: 0 4px; font-weight: 700; }
.counter {
  width: 88px; height: 31px; border: 1px solid #6b7f52; cursor: pointer; padding: 0;
  background: linear-gradient(#e9f2d8, #b9cf93); display: grid; grid-template-columns: 22px 1fr;
  font: 9px/1.1 Tahoma, Verdana, Arial, sans-serif; color: #2d3a1c; text-align: left;
}
.counter .lg { background: #4f6b2b; color: var(--white); font-weight: 700; font-size: 11px; display: grid; place-items: center; }
.counter .nums { padding: 2px 3px; font-variant-numeric: tabular-nums; }
.konami { font-family: Consolas, Menlo, monospace; letter-spacing: .1em; }

/* ---------- режим 2016 ---------- */
.y16-banner {
  display: none; background: #fcf8e3; border: 1px solid #faebcc; color: #8a6d3b; border-radius: 4px;
  font: 14px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 10px 14px; margin-bottom: 12px;
}
body.y2016 .y16-banner { display: block; }
.spinner {
  display: none; position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 74px; height: 74px; animation: spin 1.1s linear infinite; z-index: 5;
}
body.y2016 .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .row > article:nth-child(3) { padding-left: 0; border-left: 0; }
  .row > article:nth-child(2) { padding-right: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .front { grid-template-columns: minmax(0, 1fr); }
  .front > .lead { padding-right: 0; margin-right: 0; border-right: 0; }
  .side { margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .cols { columns: 1; }
  footer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 520px) {
  .row, .grid { grid-template-columns: minmax(0, 1fr); }
  .row > article { padding: 0 0 18px; border-left: 0; border-bottom: 1px solid var(--rule-soft); }
  .row > article:last-child { border-bottom: 0; }
  .strip { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker .run, .spinner { animation: none; }
  .photo .plate, .photo .plate .bg, .photo .plate .cut, .photo .plate .cutline { transition: none; }
}
