/* Публичные страницы «Твоего Дня».
   Один файл на все семь макетов: газетная бумага, три гарнитуры, никакого React.
   Мобильные правила — в конце: половина поискового трафика приходит с телефона,
   а макет нарисован под 1080. */

:root {
  --paper: #e6e1d3;
  --card: #efe9da;
  --ink: #1c1914;
  --ink-soft: #4c4437;
  --muted: #6d6455;
  --faint: #a49a83;
  --rule: #c5bda9;
  --hover: #dcd5c2;
  --dash: #8a7f6a;
  --red: #b3382c;
  --serif: 'Old Standard TT', 'Times New Roman', serif;
  --display: Oranienbaum, 'Old Standard TT', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
  --display-weight: 400;
  --mast: var(--ink);
  --portrait: grayscale(.15);
  --wrap: 1080px;
}

/* Эпоха по году — как у полосы в «Твоём Дне» (theme.ts): страница года и
   даты получает data-era с сервера, купоны переключают её на лету по году.
   --paper — фон страницы (pageBg), --card — «лист» (paper). */
:root[data-era="imperia"] {
  --paper: #e4dabf; --card: #eee1c2; --ink: #33241a; --ink-soft: #54402a; --muted: #93764f;
  --faint: #b39d76; --rule: #d3bd92; --hover: #d9cca8; --dash: #93764f; --red: #8f2a1e;
  --display: Oranienbaum, 'Old Standard TT', serif; --display-weight: 400; --serif: 'Old Standard TT', serif; --mast: #33241a;
  --portrait: sepia(.75) contrast(1.08);
}
:root[data-era="soviet"] {
  --paper: #e6e1d3; --card: #efe2c6; --ink: #2b2117; --ink-soft: #4d3f2e; --muted: #8a7452;
  --faint: #a9997a; --rule: #c9b48d; --hover: #dcd2b8; --dash: #8a7452; --red: #a5301f;
  --display: Oranienbaum, 'Old Standard TT', serif; --display-weight: 400; --serif: 'Old Standard TT', serif; --mast: #a5301f;
  --portrait: sepia(.5) contrast(1.05);
}
:root[data-era="nineties"] {
  --paper: #dbd9d2; --card: #e9e7e1; --ink: #131110; --ink-soft: #3c3934; --muted: #6f6b64;
  --faint: #9a968f; --rule: #b9b5ac; --hover: #cfccc4; --dash: #6f6b64; --red: #c0231d;
  --display: Oswald, 'Arial Narrow', sans-serif; --display-weight: 600; --serif: 'Old Standard TT', serif; --mast: #131110;
  --portrait: grayscale(1) contrast(1.15);
}
:root[data-era="glossy"] {
  --paper: #eceaee; --card: #ffffff; --ink: #1c1a1e; --ink-soft: #4a4550; --muted: #9a93a1;
  --faint: #b9b3c0; --rule: #e8e4ec; --hover: #dfdbe3; --dash: #9a93a1; --red: #c92a6d;
  --display: 'Playfair Display', Georgia, serif; --display-weight: 700; --serif: Manrope, system-ui, sans-serif; --mast: #1c1a1e;
  --portrait: saturate(1.05) contrast(1.02);
}
:root[data-era="digital"] {
  --paper: #eaedf0; --card: #fbfbf9; --ink: #17191c; --ink-soft: #3f444a; --muted: #8b9096;
  --faint: #aeb3b8; --rule: #e2e4e6; --hover: #dde1e5; --dash: #8b9096; --red: #2456d6;
  --display: Manrope, system-ui, sans-serif; --display-weight: 800; --serif: Manrope, system-ui, sans-serif; --mast: #2456d6;
  --portrait: grayscale(.15);
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--paper); transition: background-color .35s ease, color .35s ease; }

body {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
p { margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); margin: 0; line-height: 1.1; }
img { max-width: 100%; }
input::placeholder { color: var(--faint); font-style: italic; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-bottom: 100px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.it { font-style: italic; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--ink); color: var(--card); padding: 8px 12px; z-index: 60; }

/* ------------------------------------------------------------- шапка */

.masthead {
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--ink);
  display: flex; align-items: baseline; gap: 22px;
  padding: 9px 2px; flex-wrap: wrap; margin-top: 18px;
}
.masthead__logo { font-family: var(--display); font-size: 22px; letter-spacing: .06em; text-decoration: none; color: var(--mast); }
.masthead__tagline { font-size: 12px; color: var(--muted); font-style: italic; }
.masthead__nav { margin-left: auto; display: flex; gap: 18px; font-size: 13.5px; flex-wrap: wrap; }
.masthead__nav a { color: var(--ink); text-decoration: none; }
.masthead__nav a:hover { text-decoration: underline; }

.btn {
  display: inline-block; background: var(--ink); color: var(--card);
  border: none; text-decoration: none; font-family: var(--serif);
  font-size: 16px; padding: 11px 22px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--rule);
}
.btn:hover { background: var(--red); color: var(--card); }
.btn--sm { font-size: 13px; padding: 7px 14px; box-shadow: 3px 3px 0 var(--rule); }
.btn--ghost { background: none; border: 1.5px solid var(--ink); color: var(--ink); box-shadow: none; padding: 11px 18px; font-size: 15px; }
.btn--ghost:hover { background: var(--hover); color: var(--ink); }

.crumbs { display: flex; gap: 8px; padding: 9px 2px 0; font-family: var(--mono); font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.crumbs li { display: flex; gap: 8px; list-style: none; }
.crumbs ol, .crumbs { margin: 0; padding-left: 0; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); text-decoration: none; }
.crumbs__sep { color: var(--faint); }

.body { width: 100%; max-width: var(--wrap); padding: 34px 20px 0; }

/* ------------------------------------------------------------- сетки */

.cols { display: grid; grid-template-columns: 1fr 300px; gap: 44px; margin-top: 30px; }
.rail { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.prose { columns: 2; column-gap: 32px; font-size: 15.5px; line-height: 1.55; text-align: justify; hyphens: auto; }
.prose.prose--one { columns: 1; font-size: 17px; text-align: left; }
.h-sec { font-size: 34px; margin: 0 0 14px; }
.h-sub { font-size: 32px; margin: 30px 0 12px; }
.lead { font-size: 16px; color: var(--ink-soft); margin-top: 10px; font-style: italic; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.sec { margin-top: 40px; border-top: 2px solid var(--ink); padding-top: 18px; }
.sec__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.sec__note { font-size: 13px; color: var(--muted); font-style: italic; }

/* карточка с «биркой» на рамке */
.card { border: 1.5px dashed var(--dash); padding: 16px 18px 14px; background: var(--card); position: relative; }
.card__tag { position: absolute; top: -9px; left: 14px; background: var(--card); padding: 0 8px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.card__title { font-family: var(--display); font-size: 22px; line-height: 1.1; }

.block { border-top: 1px solid var(--ink); padding-top: 10px; }
.block__big { font-family: var(--display); font-size: 44px; line-height: 1; margin-top: 4px; }
.block__text { font-size: 14px; color: var(--ink-soft); margin-top: 4px; line-height: 1.45; }

/* ------------------------------------------------------------ ценник */

.price-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.price-rows div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--faint); padding-bottom: 4px; }
.price-rows span + span { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.note { margin-top: 10px; font-size: 12px; color: var(--muted); font-style: italic; line-height: 1.45; }
.source { margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ------------------------------------------------------------ события */

.events { border-top: 1px solid var(--ink); }
.events__label { padding: 10px 0 4px; }
.event {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 8px 0; border-bottom: 1px dotted var(--rule);
  font-size: 15px; line-height: 1.45; color: var(--ink); text-decoration: none;
}
a.event:hover { color: var(--red); }
.event--year { grid-template-columns: 64px 1fr; }
.event__k { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.event--year .event__k { color: var(--red); font-size: 12.5px; padding-top: 2px; }
.more {
  margin-top: 12px; background: none; border: 1.5px solid var(--ink);
  padding: 8px 16px; font-family: var(--serif); font-size: 14px; cursor: pointer; color: var(--ink);
}
.more:hover { background: var(--hover); }
/* «и ещё 49 человек» стоит внутри фразы — кнопка должна читаться как ссылка */
.more--inline {
  margin-top: 0; border: none; padding: 0; background: none; font-size: inherit;
  color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.more--inline:hover { background: none; color: var(--ink); }

/* ------------------------------------------------------------ портреты */

.people { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px 18px; margin-top: 20px; }
.people--row { grid-template-columns: repeat(4, 1fr); gap: 20px 16px; margin-top: 0; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; text-decoration: none; color: var(--ink); }
.person:hover { color: var(--red); }
.person__face {
  width: 86px; height: 86px; border-radius: 50%; overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--hover) 0 3px, var(--paper) 3px 7px);
  border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; color: var(--muted); flex: none;
}
.person__face img { width: 100%; height: 100%; object-fit: cover; display: block; filter: var(--portrait); transition: filter .35s ease; }
.person__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person__name { font-size: 15px; line-height: 1.25; font-weight: 700; }
.person__k { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.person--row { flex-direction: row; align-items: center; text-align: left; gap: 12px; }
.person--row .person__face { width: 54px; height: 54px; font-size: 11px; }

.credits { margin-top: 14px; font-size: 12px; color: var(--muted); }
.credits summary { cursor: pointer; }
.credits ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.5; }
.credits a { color: var(--muted); }

/* ------------------------------------------------------- календарь года */

.months { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 32px; margin-top: 22px; }
.month__name { font-family: var(--display); font-size: 19px; border-bottom: 1px solid var(--ink); padding-bottom: 4px; margin-bottom: 6px; }
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; font-family: var(--mono); font-size: 11.5px; }
.month__wd { color: var(--faint); text-align: center; font-size: 9.5px; }
.month__grid a, .month__grid span { text-align: center; padding: 3px 0; text-decoration: none; color: var(--ink); }
.month__grid a:hover { background: var(--ink); color: var(--card); }
.month__grid .is-weekend { color: var(--red); }
/* полосы за этот день ещё нет — ссылка ведёт на страницу числа */
.month__grid .is-dim { opacity: .45; }

/* ------------------------------------------------------- дни недели по годам */

.wd-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; margin-top: 18px; }
.wd-cell {
  text-decoration: none; color: var(--ink); border: 1px solid var(--rule);
  padding: 6px 4px; text-align: center; display: flex; flex-direction: column; gap: 1px;
}
a.wd-cell:hover { background: var(--ink); color: var(--card); }
a.wd-cell:hover span { color: inherit; }
.wd-cell.is-weekend { background: var(--hover); }
.wd-cell__y { font-family: var(--mono); font-size: 12px; }
.wd-cell__d { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------- купон */

.cta {
  margin-top: 48px; border: 1.5px dashed var(--dash); padding: 26px 28px;
  background: var(--card); display: grid; grid-template-columns: 1fr auto;
  gap: 30px; align-items: center; position: relative;
}
.cta__title { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.cta__text { font-size: 15px; color: var(--ink-soft); margin-top: 8px; font-style: italic; max-width: 56ch; }
.cta__form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  background: transparent; border: none; border-bottom: 1.5px solid var(--ink);
  font-family: var(--mono); font-size: 17px; padding: 6px 2px; outline: none; color: var(--ink);
}
.field select { font-family: var(--serif); }
.field input:focus, .field select:focus { border-bottom-color: var(--red); }
.field input[disabled] { border-bottom-color: var(--faint); color: var(--muted); }
.field--wide input { font-size: 34px; border-bottom-width: 2px; width: 250px; max-width: 100%; }
.err { color: var(--red); font-size: 13px; margin-top: 6px; }

.nearby { margin-top: 34px; border-top: 1px solid var(--ink); padding-top: 12px; display: flex; gap: 26px; flex-wrap: wrap; font-size: 14px; align-items: baseline; }

/* ------------------------------------------------------------- страница года */

.year-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 22px; }
.year-head h1 { font-size: 168px; line-height: .86; letter-spacing: -.02em; }
.year-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; font-size: 15px; line-height: 1.45; padding-bottom: 6px; }
.year-facts__big { font-family: var(--display); font-size: 24px; line-height: 1.1; margin-top: 3px; }
.year-facts__sub { color: var(--ink-soft); }
.year-facts__wide { grid-column: 1/-1; border-top: 1px dotted var(--rule); padding-top: 8px; color: var(--ink-soft); font-style: italic; }

.media { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.media__item { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: start; }
.media__ph {
  width: 84px; height: 118px; border: 1px solid var(--ink); padding: 6px;
  background: repeating-linear-gradient(-45deg, var(--hover) 0 3px, var(--paper) 3px 7px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: 9.5px; color: var(--muted); line-height: 1.35;
}
.media__title { font-family: var(--display); font-size: 24px; line-height: 1.1; margin-top: 4px; }
.media__sub { font-size: 14px; color: var(--ink-soft); margin-top: 5px; line-height: 1.45; }

/* ------------------------------------------------------------ страница дня */

.day-head { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 22px; }
.day-head h1 { font-size: 110px; line-height: .9; letter-spacing: -.01em; }
.zbox { border: 1px solid var(--ink); padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--card); }
.zbox__glyph { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 36px; }
.zbox__name { font-family: var(--display); font-size: 28px; line-height: 1.05; margin-top: 2px; }
.zbox__name a { color: var(--ink); text-decoration: none; }
.zbox__sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }

.holidays { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; }
.holidays b { display: block; font-weight: 700; }
.holidays i { font-style: normal; font-size: 12.5px; color: var(--muted); }
.inline-people { margin-top: 16px; font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); border-top: 1px dotted var(--rule); padding-top: 10px; }

/* ----------------------------------------------------------- страница даты */

.date-head h1 { font-size: 64px; line-height: 1; margin: 8px 0 0; text-wrap: balance; }
.kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.facts-row { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 14.5px; }
.facts-row > div { display: flex; align-items: center; gap: 8px; }
.facts-row span.eyebrow { letter-spacing: .14em; font-size: 11px; }
.mw-title { font-family: var(--display); font-size: 23px; line-height: 1.2; margin-bottom: 10px; }
.tip { margin-top: 14px; font-size: 13.5px; color: var(--muted); border-top: 1px dotted var(--rule); padding-top: 8px; }

.hero-person { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; border: 1px solid var(--ink); padding: 16px 20px; background: var(--card); }
.hero-person__face { width: 96px; height: 96px; }
.hero-person__name { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.hero-person__name a { color: var(--ink); text-decoration: none; }
.hero-person__sub { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.hero-person__also { font-size: 14px; margin-top: 10px; line-height: 1.6; color: var(--ink-soft); }

.counters { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.counters > div { padding: 14px 14px 14px 0; border-right: 1px solid var(--rule); margin-right: 14px; }
.counters > div:last-child { border-right: none; margin-right: 0; }
.counters__big { font-family: var(--display); font-size: 30px; line-height: 1; letter-spacing: -.01em; }
.counters__t { font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }
.counters__stamp { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 6px; }

/* превью полосы в правой колонке */
.peek { display: block; text-decoration: none; color: var(--ink); }
.peek__sheet { position: relative; background: var(--card); padding: 14px 14px 0; height: 330px; overflow: hidden; box-shadow: 6px 6px 0 rgba(28,25,20,.14), 0 0 0 1px rgba(28,25,20,.18); }
.peek__meta { display: flex; justify-content: space-between; font-size: 7px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); padding-bottom: 3px; }
.peek__name { text-align: center; font-family: var(--display); font-size: 19px; color: var(--red); padding: 8px 0 5px; letter-spacing: .04em; }
.peek__line { display: flex; justify-content: space-between; font-size: 7.5px; font-weight: 700; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 3px 0; }
.peek__label { font-size: 7px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-top: 10px; }
.peek__hero { font-family: var(--display); font-size: 20px; line-height: 1.05; margin-top: 4px; text-wrap: balance; }
.peek__no { color: var(--red); }
.peek__sub { font-size: 9px; font-style: italic; color: var(--ink-soft); margin-top: 6px; line-height: 1.4; }
.peek__blur { margin-top: 10px; filter: blur(3px); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 7px; line-height: 1.5; color: var(--ink-soft); text-align: justify; }
.peek__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; background: linear-gradient(to bottom, rgba(239,226,198,0), rgba(239,226,198,.92) 55%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 16px; }
.peek__price { background: var(--ink); color: var(--card); font-size: 13px; padding: 8px 14px; box-shadow: 3px 3px 0 rgba(28,25,20,.2); }

/* --------------------------------------------------------- калькуляторы */

.tabs { display: flex; border: 1.5px solid var(--ink); width: max-content; max-width: 100%; font-size: 14px; }
.tabs a { padding: 8px 18px; text-decoration: none; color: var(--ink); font-family: var(--serif); }
.tabs a + a { border-left: 1.5px solid var(--ink); }
.tabs a.is-on { background: var(--ink); color: var(--card); }
.calc { margin-top: 26px; border: 1.5px dashed var(--dash); background: var(--card); padding: 26px 28px; display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.calc--two { grid-template-columns: auto auto 1fr; gap: 34px; }
.calc__answer { font-family: var(--display); font-size: 46px; line-height: 1.05; margin-top: 4px; text-wrap: balance; }
.calc__sub { font-size: 14.5px; color: var(--ink-soft); margin-top: 8px; }
.calc h1 { font-size: 64px; margin: 26px 0 0; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick button { text-align: left; background: none; border: 1px solid var(--ink); padding: 12px 14px; cursor: pointer; font-family: var(--serif); color: var(--ink); }
.quick button:hover { background: var(--hover); }
.quick__k { display: block; font-size: 12.5px; color: var(--muted); }
.quick__v { display: block; font-family: var(--display); font-size: 21px; line-height: 1.1; margin-top: 3px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 36px; }
.rounds { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.rounds > div { padding: 14px 14px 14px 0; border-right: 1px solid var(--rule); margin-right: 14px; }
.rounds > div:last-child { border-right: none; margin-right: 0; }
.rounds__n { font-family: var(--mono); font-size: 12px; color: var(--red); }
.rounds__d { font-family: var(--display); font-size: 24px; line-height: 1.1; margin-top: 4px; }
.rounds__s { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ------------------------------------------------------------- все годы */

.years-head { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 22px; }
.years-head h1 { font-size: 64px; }
.chips { display: flex; gap: 4px; margin-top: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; }
.chips a { border: 1px solid var(--ink); padding: 5px 10px; text-decoration: none; color: var(--ink); }
.chips a:hover, .chips a.is-on { background: var(--ink); color: var(--card); }
.decade { margin-top: 34px; display: grid; grid-template-columns: 150px 1fr; gap: 30px; align-items: start; scroll-margin-top: 20px; }
.decade__name { font-family: var(--display); font-size: 56px; line-height: 1; }
.decade__note { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 6px; line-height: 1.45; }
.decade__sticky { position: sticky; top: 12px; }
.yrow { display: grid; grid-template-columns: 64px 150px 1fr 1fr 110px; gap: 16px; align-items: baseline; padding: 9px 0; border-bottom: 1px dotted var(--rule); text-decoration: none; color: var(--ink); font-size: 14.5px; }
.yrow:hover { background: var(--hover); color: var(--ink); }
.yrow__y { font-family: var(--display); font-size: 22px; }
.yrow__animal { color: var(--ink-soft); }
.yrow__leader { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; }

/* --------------------------------------------------------------- месяц */

.mtabs { display: flex; border: 1px solid var(--ink); width: max-content; max-width: 100%; flex-wrap: wrap; }
.mtabs a { padding: 7px 13px; font-size: 14px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--ink); }
.mtabs a:first-child { border-left: none; }
.mtabs a:hover { background: var(--hover); }
.mtabs a.is-on { background: var(--ink); color: var(--card); }
.month-page h1 { font-size: 110px; line-height: .9; margin: 26px 0 0; }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--ink); border: 1px solid var(--ink); margin-top: 26px; }
.mcell { background: var(--paper); min-height: 118px; padding: 10px 12px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.mcell:hover { background: var(--hover); color: var(--ink); }
/* хвост последней недели: без заглушек сквозь сетку светится её фон-линейка */
.mcell--empty { background: var(--paper); opacity: .55; }
.mcell__top { display: flex; justify-content: space-between; align-items: baseline; }
.mcell__n { font-family: var(--display); font-size: 26px; line-height: 1; }
.mcell__z { font-size: 15px; color: var(--muted); }
.mcell__who { display: flex; gap: 8px; align-items: center; margin-top: auto; font-size: 12.5px; line-height: 1.3; }
.mcell__face { width: 28px; height: 28px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid var(--ink); background: repeating-linear-gradient(45deg, var(--hover) 0 2px, var(--paper) 2px 5px); }
.mcell__face img { width: 100%; height: 100%; object-fit: cover; display: block; filter: var(--portrait); }
.mcell__ev { font-family: var(--mono); font-size: 10px; color: var(--muted); }

/* ---------------------------------------------------------------- знак */

.z-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 22px; }
.z-head__glyph { width: 150px; height: 150px; border-radius: 50%; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 96px; line-height: 1; }
.z-head h1 { font-size: 110px; line-height: .9; margin: 6px 0 0; }
.z-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 14px; font-size: 15px; }
.z-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.z-days a { text-decoration: none; color: var(--ink); border: 1px solid var(--rule); padding: 6px 4px; text-align: center; font-size: 12.5px; line-height: 1.2; }
.z-days a:hover { background: var(--ink); color: var(--card); }
.disclaimer { margin-top: 24px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); font-style: italic; border-top: 1px dotted var(--rule); padding-top: 12px; max-width: 64ch; }

/* ------------------------------------------------------------- главная */

.today { display: grid; grid-template-columns: 1fr 330px; gap: 44px; align-items: start; }
.today__date { font-family: var(--display); font-size: 84px; line-height: .95; margin: 6px 0 0; letter-spacing: -.01em; }
.today__year { display: block; font-size: 84px; line-height: .95; }
.today__wd { font-family: var(--display); font-size: 30px; font-style: italic; color: var(--ink-soft); margin-top: 4px; }
.today__coupon { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 2px solid var(--ink); }
.today__note { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 10px; max-width: 54ch; }

.daycard { border: 1px solid var(--ink); background: var(--card); padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.daycard__row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.daycard__row > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.daycard__glyph { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 30px; }
.daycard__moon { width: 54px; height: 54px; }
.daycard__big { font-family: var(--display); font-size: 26px; line-height: 1.05; }
.daycard__big a { color: var(--ink); text-decoration: none; }
.daycard__big a:hover { color: var(--red); }
.daycard__sub { font-size: 13.5px; color: var(--ink-soft); }
.daycard__hol { border-top: 1px dotted var(--rule); padding-top: 12px; }
.daycard__hol ul { margin: 6px 0 0; padding-left: 16px; font-size: 14.5px; line-height: 1.4; }
.daycard__hol li { margin-bottom: 6px; }
.daycard__hol i { font-style: normal; font-size: 12.5px; color: var(--muted); display: block; }

/* сводка редакции: четыре настоящих числа, а не столбиковая диаграмма из одного столбика */
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 40px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.kpi > div { padding: 16px 16px 16px 0; border-right: 1px solid var(--rule); margin-right: 16px; display: flex; flex-direction: column; gap: 6px; }
.kpi > div:last-child { border-right: none; margin-right: 0; }
.kpi__v { font-family: var(--display); font-size: 38px; line-height: 1; letter-spacing: -.01em; }
.kpi__k { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

/* ------------------------------------------------------------- графики */

.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 36px; margin-top: 22px; }
.chart-card { margin: 0; }
/* ряд по времени читается тем лучше, чем он шире */
.chart-card--wide { grid-column: 1 / -1; }
.chart-card__title { font-family: var(--display); font-size: 20px; line-height: 1.2; margin-bottom: 8px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-bar { fill: var(--ink); }
.ch-bar:hover { fill: var(--red); }
.ch-bar--hot { fill: var(--red); }
.ch-tick, .ch-label { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.ch-value { font-family: var(--display); font-size: 17px; fill: var(--ink); }
.ch-value--hot { fill: var(--red); }
.chart-card__table { margin-top: 8px; font-size: 13px; color: var(--muted); }
.chart-card__table summary { cursor: pointer; }
.chart-card__table table { border-collapse: collapse; margin-top: 6px; width: 100%; }
.chart-card__table th, .chart-card__table td { text-align: left; font-weight: 400; padding: 3px 0; border-bottom: 1px dotted var(--rule); }
.chart-card__table td { text-align: right; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- угадай год */

.quiz { margin-top: 22px; border: 1.5px dashed var(--dash); background: var(--card); padding: 24px 28px; }
.quiz__lead { font-size: 14.5px; color: var(--ink-soft); font-style: italic; max-width: 64ch; }
.quiz__hints { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.quiz__hint { border-top: 1px dotted var(--rule); padding-top: 8px; font-size: 16px; line-height: 1.45; }
.quiz__hint[hidden] { display: none; }
.quiz__hint .eyebrow { display: block; margin-bottom: 2px; }
.quiz__play { margin-top: 20px; border-top: 1px solid var(--ink); padding-top: 16px; display: grid; grid-template-columns: auto 1fr; gap: 12px 32px; align-items: center; }
.quiz__play[hidden] { display: none; }
.quiz__guess { display: flex; flex-direction: column; }
.quiz__out { font-family: var(--display); font-size: 64px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.quiz__slider input { width: 100%; margin: 0; accent-color: var(--red); cursor: pointer; }
.quiz__scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 4px; }
.quiz__row { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.quiz__tries { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.quiz__fb { grid-column: 1 / -1; font-size: 16px; min-height: 1.5em; }
.quiz__fb b { color: var(--red); font-weight: 400; }
.quiz__answer { margin-top: 18px; border-top: 1px solid var(--ink); padding-top: 12px; }
.quiz__answer summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.quiz__answer[data-solved] summary { display: none; }
.quiz__answer[hidden] { display: none; }
.quiz__verdict { font-size: 16px; margin-top: 8px; }
.quiz__verdict:empty { display: none; }
.quiz__year { font-family: var(--display); font-size: 46px; line-height: 1.05; margin-top: 8px; }
.quiz__after { font-size: 14.5px; color: var(--ink-soft); margin-top: 6px; }

/* -------------------------------------------------------------- подвал */

.foot { border-top: 3px double var(--ink); padding-top: 12px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 60px; }
.foot a { color: var(--muted); }
.foot__links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------------------ мобильные */

@media (max-width: 900px) {
  .cols, .pair { grid-template-columns: 1fr; gap: 30px; }
  .today { grid-template-columns: 1fr; gap: 26px; }
  .today__date, .today__year { font-size: 60px; }
  .today__wd { font-size: 24px; }
  .charts { grid-template-columns: 1fr; }
  .kpi { grid-template-columns: 1fr 1fr; }
  .kpi > div:nth-child(2) { border-right: none; margin-right: 0; }
  .year-head, .day-head, .years-head, .z-head { grid-template-columns: 1fr; gap: 20px; align-items: start; }
  .year-head h1 { font-size: 96px; }
  .day-head h1, .month-page h1, .z-head h1 { font-size: 64px; }
  .date-head h1, .calc h1, .years-head h1 { font-size: 40px; }
  .h-sec, .h-sub { font-size: 26px; }
  .prose { columns: 1; }
  .media { grid-template-columns: 1fr; gap: 16px; }
  .months { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: repeat(3, 1fr); }
  .people--row { grid-template-columns: repeat(2, 1fr); }
  .wd-grid { grid-template-columns: repeat(6, 1fr); }
  .cta { grid-template-columns: 1fr; gap: 18px; }
  .cta__title { font-size: 24px; }
  .counters, .rounds { grid-template-columns: 1fr 1fr; }
  .counters > div:nth-child(2), .rounds > div:nth-child(2) { border-right: none; margin-right: 0; }
  .calc, .calc--two { grid-template-columns: 1fr; gap: 22px; padding: 20px; }
  .quiz { padding: 18px; }
  .quiz__play { grid-template-columns: 1fr; gap: 12px; }
  .quiz__out { font-size: 48px; }
  .field--wide input { font-size: 26px; width: 100%; }
  .decade { grid-template-columns: 1fr; gap: 10px; }
  .decade__sticky { position: static; }
  .decade__name { font-size: 38px; }
  .yrow { grid-template-columns: 54px 1fr; gap: 6px 12px; }
  .yrow__animal { grid-column: 2; }
  .yrow__leader { grid-column: 2; text-align: left; }
  .mgrid { grid-template-columns: repeat(2, 1fr); }
  .z-head__glyph { width: 96px; height: 96px; font-size: 60px; }
  .z-days { grid-template-columns: repeat(6, 1fr); }
  .masthead { gap: 10px; }
  .masthead__nav { margin-left: 0; width: 100%; order: 3; }
  .event { grid-template-columns: 76px 1fr; gap: 10px; }
}

@media (max-width: 560px) {
  .today__date, .today__year { font-size: 46px; }
  .kpi { grid-template-columns: 1fr; }
  .kpi > div { border-right: none; margin-right: 0; border-bottom: 1px solid var(--rule); }
  .kpi > div:last-child { border-bottom: none; }
  .year-head h1 { font-size: 72px; }
  .day-head h1, .month-page h1, .z-head h1 { font-size: 48px; }
  .months { grid-template-columns: 1fr; }
  .people { grid-template-columns: repeat(2, 1fr); }
  .people--row { grid-template-columns: 1fr; }
  .wd-grid { grid-template-columns: repeat(4, 1fr); }
  .counters, .rounds { grid-template-columns: 1fr; }
  .counters > div, .rounds > div { border-right: none; margin-right: 0; border-bottom: 1px solid var(--rule); }
  .counters > div:last-child, .rounds > div:last-child { border-bottom: none; }
  .mgrid { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr; }
}

@media print {
  .masthead__cta, .cta, .more { display: none; }
}

/* ---------------------------------------------- правовые сноски (compliance) */
.lg { font-size: .68em; line-height: 0; color: var(--red); cursor: help; padding: 0 .12em; }
.legal {
  margin: 18px 0 10px; padding-top: 10px; border-top: 1px dotted var(--rule);
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
}
.legal__note { margin: 0 0 3px; }
.legal__note sup { font-size: .8em; }
.legal__note:target { background: rgba(179, 56, 44, .1); }
.legal__disc { margin: 7px 0 0; font-style: italic; }

/* ------------------------------------- ссылки на сущности внутри текста (entities) */
/* Имя человека, дата или год в тексте события ведут на свою страницу. Красным
   их красить нельзя: в ленте из тридцати событий это выглядит как дорвей —
   поэтому цвет текста и тонкое подчёркивание, а красный только под курсором. */
.ent {
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--faint); text-underline-offset: 2px;
}
.ent:hover, .ent:focus-visible { color: var(--red); text-decoration-color: currentColor; }

/* год события — ссылка на полосу за эту дату; раньше кликалась вся строка,
   но внутри неё теперь свои ссылки, а <a> внутри <a> не бывает */
a.event__k { text-decoration: none; }
a.event__k:hover { text-decoration: underline; text-underline-offset: 2px; }

/* -------------------------------------------------- всплывающая подсказка (tip) */
/* Одна на страницу: открывается по клику на сноску, потому что на телефоне
   наведения не бывает, а title там не показывается вовсе. */
.tipbox {
  position: absolute; z-index: 50; max-width: 320px;
  background: var(--ink); color: var(--card);
  font-family: var(--serif); font-size: 13px; line-height: 1.45;
  padding: 9px 12px; box-shadow: 3px 3px 0 rgba(28, 25, 20, .25);
}
.tipbox__close {
  display: block; margin-top: 6px; background: none; border: none; padding: 0;
  color: var(--rule); font-family: var(--serif); font-size: 12px; cursor: pointer;
}
.lg[aria-expanded="true"] { background: var(--red); color: var(--card); }

/* имя без ссылки — на своей же странице ссылаться некуда */
.person--flat, .person--flat:hover { color: var(--ink); cursor: default; }

/* портреты — в обработке эпохи (portraitFilter из theme.ts): сепия в Империи,
   ч/б в 90-х, чуть приглушённые в digital */
/* гарнитура эпохи: у 90-х, глянца и digital заголовки жирные, как на полосе */
.block__big, .calc__answer, .card__title, .ch-value, .chart-card__title, .counters__big, .cta__title, .daycard__big, .daycard__glyph, .decade__name, .hero-person__name, .kpi__v, .masthead__logo, .mcell__n, .media__title, .month__name, .mw-title, .peek__hero, .peek__name, .quick__v, .quiz__out, .quiz__year, .rounds__d, .today__date, .today__wd, .year-facts__big, .yrow__y, .z-head__glyph, .zbox__glyph, .zbox__name { font-weight: var(--display-weight); }

/* Киоск: карточки номеров, которые читатели выставили на витрину (seo.js).
   Карточка перекрашивается в эпоху своего номера — те же палитры, что выше. */
.kiosk__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.kiosk__card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 12px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--paper); transition: transform .15s ease; }
.kiosk__card:hover { transform: translate(-2px, -2px); text-decoration: none; }
.kiosk__kind { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.kiosk__date { font-family: var(--display); font-weight: var(--display-weight); font-size: 21px; line-height: 1.1; color: var(--mast); }
.kiosk__name { font-size: 14px; color: var(--ink-soft); }
.kiosk__slug { margin-top: 6px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--muted); }
.kiosk__card[data-era="imperia"] { --card: #eee1c2; --ink: #33241a; --ink-soft: #54402a; --muted: #93764f; --paper: #d3bd92; --mast: #33241a; --display: Oranienbaum, 'Old Standard TT', serif; --display-weight: 400; }
.kiosk__card[data-era="soviet"] { --card: #efe2c6; --ink: #2b2117; --ink-soft: #4d3f2e; --muted: #8a7452; --paper: #c9b48d; --mast: #a5301f; --display: Oranienbaum, 'Old Standard TT', serif; --display-weight: 400; }
.kiosk__card[data-era="nineties"] { --card: #e9e7e1; --ink: #131110; --ink-soft: #3c3934; --muted: #6f6b64; --paper: #b9b5ac; --mast: #131110; --display: Oswald, 'Arial Narrow', sans-serif; --display-weight: 600; }
.kiosk__card[data-era="glossy"] { --card: #ffffff; --ink: #1c1a1e; --ink-soft: #4a4550; --muted: #9a93a1; --paper: #dfdbe3; --mast: #c92a6d; --display: 'Playfair Display', Georgia, serif; --display-weight: 700; }
.kiosk__card[data-era="digital"] { --card: #fbfbf9; --ink: #17191c; --ink-soft: #3f444a; --muted: #8b9096; --paper: #dde1e5; --mast: #2456d6; --display: Manrope, system-ui, sans-serif; --display-weight: 800; }
