/* Эссе: оглавление с рубрикатором и страницы чтения. Палитра и шрифты общие с порталом. */
:root {
  --ink: #18212B; --ink-2: #3B4652; --muted: #4A5664; --line: #CBD3DB; --bg: #F3F5F7; --paper: #FFFFFF;
  --c-start: #3B4652; --c-a: #B8742F; --c-b: #0E5E5E; --c-c: #2E6C9B;
  --tint-start: #E6EAEE; --tint-a: #FBF3EA; --tint-b: #E3F1F0; --tint-c: #E4EEF6;
  --f-display: 'Forum', Georgia, 'Times New Roman', serif;
  --f-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --accent: var(--c-start); --tint: var(--tint-start);
}
body.blk-a { --accent: var(--c-a); --tint: var(--tint-a); }
body.blk-b { --accent: var(--c-b); --tint: var(--tint-b); }
body.blk-c { --accent: var(--c-c); --tint: var(--tint-c); }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-family: var(--f-body); color: var(--ink); line-height: 1.6; -webkit-text-size-adjust: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--c-b); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Верхняя панель */
.bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 24px; min-height: 52px; background: rgba(243,245,247,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); font-size: 14px; }
.bar .all { font-weight: 700; text-decoration: none; padding: 12px 0; justify-self: start; }
.bar .all::before { content: "←"; margin-right: 8px; }
.bar .all:hover { text-decoration: underline; text-underline-offset: 4px; }
.bar .where { color: var(--muted); text-align: center; }
.pn-mini { justify-self: end; display: flex; gap: 4px; }
.pn-mini a, .pn-mini .off { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; text-decoration: none; }
.pn-mini a:hover { background: var(--paper); }
.pn-mini .off { color: var(--line); }

.page { max-width: 720px; margin: 0 auto; padding: 48px 24px 72px; }
.page.wide { max-width: 1200px; }

/* Страница эссе */
.kicker { margin: 0 0 20px; font-size: 14px; font-weight: 700; }
.kicker a { color: var(--accent); text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
article h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 6.4vw, 60px); line-height: 1.04; margin: 0 0 36px; text-wrap: balance; }
article h1 .num { display: block; font-size: .62em; color: var(--accent); margin-bottom: 8px; }
.prose { font-size: 18px; line-height: 1.75; }
.prose p { margin: 0 0 1.1em; max-width: 64ch; }
.prose h2 { font-size: 22px; line-height: 1.3; font-weight: 800; margin: 2em 0 .6em; }
.prose h3 { font-size: 18px; font-weight: 800; margin: 1.6em 0 .4em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; max-width: 64ch; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose strong { font-weight: 800; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; margin: 1.4em 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.practice { margin: 2.4em 0 0; padding: 8px 28px 16px; background: var(--paper); border-radius: 16px; border-left: 6px solid var(--accent); }
.practice > h2:first-child { margin-top: 20px; color: var(--accent); }

/* Поделиться */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.share-l { font-weight: 700; margin-right: 8px; }
.sbtn { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; border: 1px solid #B7C1CB; background: var(--paper); border-radius: 22px; font-size: 15px; font-weight: 600; text-decoration: none; }
.sbtn:hover { border-color: var(--ink); }
.share-ok { font-size: 14px; color: var(--c-b); font-weight: 700; }

/* Предыдущее и следующее */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.pn { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "l l" "n t"; column-gap: 14px; row-gap: 4px; padding: 18px 20px; background: var(--paper); border-radius: 14px; text-decoration: none; border: 1px solid transparent; }
.pn:hover { border-color: var(--accent); }
.pn.none { background: transparent; }
.pn-l { grid-area: l; font-size: 13px; color: var(--muted); font-weight: 600; }
.pn-n { grid-area: n; font-family: var(--f-display); font-size: 34px; line-height: 1; color: var(--accent); }
.pn-t { grid-area: t; font-weight: 700; line-height: 1.3; align-self: center; }
.pn.next { text-align: right; grid-template-columns: 1fr auto; grid-template-areas: "l l" "t n"; }
.back { margin-top: 32px; }
.back a { font-weight: 700; color: var(--c-b); text-underline-offset: 4px; }

/* Полоса 41 эссе: рубрикатор в миниатюре */
.ticks { display: grid; grid-template-columns: repeat(41, minmax(0, 1fr)); gap: 3px; align-items: end; margin-top: 40px; }
.tick { display: block; height: 14px; border-radius: 3px; background: var(--c-start); opacity: .38; position: relative; }
.tick.b-a { background: var(--c-a); } .tick.b-b { background: var(--c-b); } .tick.b-c { background: var(--c-c); }
a.tick:hover { opacity: .8; }
.tick[aria-current="page"] { opacity: 1; height: 24px; }
.tick.off { opacity: .12; }

/* Оглавление */
body.idx .bar { background: rgba(243,245,247,.92); }
.hero { padding: 24px 0 40px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, 11vw, 132px); line-height: .9; margin: 0 0 24px; letter-spacing: -.01em; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 52ch; margin: 0 0 24px; }
.cta { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 24px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; }
.cta:hover { background: var(--c-b); }
.extras { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0 0; font-size: 15px; }
.extras a { font-weight: 700; color: var(--c-b); text-underline-offset: 4px; }
.blk { padding: 40px 0 8px; scroll-margin-top: 56px; }
.blk-h { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 8px 40px; align-items: baseline; margin-bottom: 20px; }
.blk-h h2 { margin: 0; font-size: 24px; font-weight: 800; color: var(--accent2); }
.blk-h p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.b-start { --accent2: var(--c-start); --t: var(--c-start); } .b-a { --accent2: var(--c-a); --t: var(--c-a); }
.b-b { --accent2: var(--c-b); --t: var(--c-b); } .b-c { --accent2: var(--c-c); --t: var(--c-c); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 118px; padding: 14px 16px 16px; background: var(--paper); border-top: 4px solid var(--t); text-decoration: none; position: relative; }
.tile:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--t); }
.tn { font-family: var(--f-display); font-size: 40px; line-height: 1; color: var(--t); }
.tt { font-weight: 700; line-height: 1.3; }
.tile.off { background: transparent; border-top-style: dashed; color: var(--muted); }
.soon { font-size: 13px; color: var(--muted); }
.foot { margin-top: 48px; font-size: 14px; color: var(--muted); }

@media (max-width: 760px) {
  .blk-h { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .bar { grid-template-columns: auto 1fr auto; padding: 0 12px; }
  .bar .where { font-size: 13px; }
}
@media (max-width: 560px) {
  .page { padding: 32px 16px 56px; }
  .practice { padding: 4px 18px 12px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bar .where { display: none; }
  .bar { grid-template-columns: 1fr auto; }
}
@media print { .bar, .share, .pager, .ticks, .back { display: none; } body { background: #fff; } }

.byline { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line, #E7E5E0); font-size: 15px; color: #52525B; }
.byline a { color: inherit; text-underline-offset: 3px; }
