/* pynchon.ru — stylesheet rebuilt from the project's Figma file («Пинчон», pages Design + UI kit).
   The original static/css/blocks/*.css were never archived; this follows the Figma tokens:
   Inter (Black / Bold Italic / Italic / Regular), primary + "rainbow" palettes, 1440 and 360 layouts. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/inter-cyrillic-400-italic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 700; font-display: swap; src: url(../fonts/inter-cyrillic-700-italic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 700; font-display: swap; src: url(../fonts/inter-latin-700-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 900; font-display: swap; src: url(../fonts/inter-cyrillic-900-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 900; font-display: swap; src: url(../fonts/inter-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 900; font-display: swap; src: url(../fonts/inter-cyrillic-900-italic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 900; font-display: swap; src: url(../fonts/inter-latin-900-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  /* Figma UI kit → Colors */
  --black: #151515; --gray-dark: #414141; --gray-light: #c3c3c3; --beige: #f3f0ea; --white: #f8f6f3;
  --red: #842234; --orange: #9e501f; --yellow: #91741f;                     /* rainbow, dark backgrounds */
  --green: #82a592; --blue: #829da5; --blue-dark: #828aa5; --purple: #9e82a5;  /* rainbow, light backgrounds */
  --red-dark: #4a131d; --red-light: #d9909d;                                  /* disabled */
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(16px, 5.5vw, 80px);
  --max: 1280px;
  --header-h: 88px;
  --section: var(--red);
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body.page { margin: 0; background: var(--beige); color: var(--black); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--black); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--black); color: var(--white); padding: 8px 14px; }
.skip-link:focus { left: 8px; }
.content { display: block; min-height: 60vh; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font); line-height: 1.2; }
p { margin: 0 0 8px; }                                              /* Body 16: paragraph spacing 8 */
[hidden] { display: none !important; }

/* Figma text styles */
.body-text { font: 400 16px/1.6 var(--font); }                      /* Body 16 */
.body-text-bold { font: 700 16px/1.6 var(--font); }                 /* Body bold 16 */
.body-text-l { font: italic 400 20px/1.2 var(--font); text-transform: uppercase; }
.title { font: italic 400 24px/1.2 var(--font); text-transform: uppercase; }        /* TITLE */
.title-bold { font: italic 700 24px/1.2 var(--font); text-transform: uppercase; }   /* TITLE BOLD */
.chapter-title { font: 900 64px/1.2 var(--font); text-transform: uppercase; overflow-wrap: anywhere; hyphens: auto; }       /* H2 */
.link { color: inherit; text-decoration: none; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2)); background: var(--beige); }
.header__logo-link { display: flex; align-items: center; }
.header__logo { width: 64px; height: auto; }
.header__links { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 40px); margin: 0; padding: 0; list-style: none; }
.header__item { position: relative; }
.header__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--black); text-decoration: none; }
.header__link:hover, .header__link:focus-visible { color: var(--red); }
.header__link_button { background: none; border: 0; padding: 0; cursor: pointer; }
.header__drop { position: absolute; right: 0; top: 100%; padding-top: 8px; display: none; }
.header__item_books:hover .header__drop, .header__drop_open { display: block; }
.header__drop-links { display: flex; flex-direction: column; min-width: 240px; background: var(--black); padding: 8px 0; }
.header__drop-link { color: var(--white); text-decoration: none; padding: 12px 24px; font: italic 700 18px/1.2 var(--font); text-transform: uppercase; }
.header__drop-link:hover { background: var(--red); color: var(--white); }
.header__button { display: none; width: 44px; height: 44px; border: 0; padding: 0; cursor: pointer; background: linear-gradient(var(--black), var(--black)) center 15px / 26px 2px no-repeat, linear-gradient(var(--black), var(--black)) center 21px / 26px 2px no-repeat, linear-gradient(var(--black), var(--black)) center 27px / 26px 2px no-repeat; }

/* ---------- mobile menu (Figma «Menu / 360»: black sheet) ---------- */
.menu { position: fixed; inset: 0; z-index: 60; background: rgba(21,21,21,.6); visibility: hidden; opacity: 0; transition: opacity .2s, visibility .2s; }
.menu_opened { visibility: visible; opacity: 1; }
.menu__container { position: absolute; inset: 0 0 0 auto; width: min(420px, 100vw); background: var(--black); color: var(--white); padding: 20px var(--gutter) 40px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; box-sizing: border-box; }
.menu_opened .menu__container { transform: none; }
.menu__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.menu__logo { width: 64px; }
.menu__close { width: 44px; height: 44px; border: 0; background: none; position: relative; cursor: pointer; }
.menu__close::before, .menu__close::after { content: ''; position: absolute; left: 10px; top: 21px; width: 24px; height: 2px; background: var(--white); transform: rotate(45deg); }
.menu__close::after { transform: rotate(-45deg); }
.menu__links { display: flex; flex-direction: column; gap: 4px; }
.menu__link { color: var(--white); text-decoration: none; font: italic 700 24px/1.2 var(--font); text-transform: uppercase; padding: 10px 0; }
.menu__link_books { color: var(--gray-light); margin: 24px 0 4px; font: italic 400 16px/1.2 var(--font); text-transform: uppercase; }
.menu__sublinks { display: flex; flex-direction: column; }
.menu__sublink { color: var(--white); text-decoration: none; padding: 10px 0 10px 16px; border-left: 4px solid var(--red); font: 900 24px/1.2 var(--font); text-transform: uppercase; }
.menu__link:hover, .menu__sublink:hover { color: var(--red-light); }

/* ---------- footer ---------- */
.footer { background: var(--beige); color: var(--black); padding: 0 var(--gutter) 40px; margin-top: 80px; position: relative; }
.footer__container { max-width: var(--max); margin: 0 auto; padding-top: 40px; border-top: 1px solid var(--black); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; }
.footer__text { font: italic 400 12px/1.5 var(--font); color: var(--gray-dark); max-width: 560px; }
.footer__copyright { font-size: 16px; margin-top: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 2px; }
.footer__link { color: var(--black); text-decoration: none; font: 400 16px/1.6 var(--font); padding: 6px 0; align-self: flex-start; }
.footer__link:hover { color: var(--red); }
.footer__age { max-width: var(--max); margin: 16px auto 0; font: 900 24px/1 var(--font); color: var(--gray-dark); }

.to-top { position: fixed; right: max(20px, calc(var(--gutter) - 8px)); bottom: 24px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top_visible { opacity: 1; pointer-events: auto; }
.to-top__button { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--red); cursor: pointer; position: relative; }
.to-top__button::before, .to-top__button::after { content: ''; position: absolute; left: 22px; width: 11px; height: 11px; border-left: 2px solid var(--white); border-top: 2px solid var(--white); transform: rotate(45deg); }
.to-top__button::before { top: 20px; } .to-top__button::after { top: 27px; }
.to-top__button:hover { background: var(--black); }

/* ---------- age popups (Figma «pop-up») ---------- */
.age-popup { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(21,21,21,.85); padding: 20px; }
.age-popup_open { display: flex; }
.age-popup__container { max-width: 520px; background: var(--black); color: var(--white); padding: 40px 36px; text-align: center; }
.age-popup__button { margin-top: 16px; min-height: 48px; padding: 0 32px; border: 1px solid var(--white); border-radius: 999px; background: transparent; color: var(--white); font: 400 16px/1 var(--font); cursor: pointer; }
.age-popup__button:hover { background: var(--red); border-color: var(--red); }

/* ---------- home: hero (Figma «Main page / 1440») ---------- */
.promo { position: relative; padding: 16px var(--gutter) clamp(72px, 10vw, 150px);  /* room for the rocket's tail */ overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; box-sizing: border-box;
  container-type: inline-size; --p: 0;
  /* proportions measured on Figma «Main page / 1440» */
  --title: clamp(48px, 8.4cqw, 120px);                 /* H1 120 px */
  --cw: min(27cqw, 345px);                             /* circle diameter (cqw = content width, 1280 at 1440) */
  --ct: calc(16px + var(--title) * 1.37);              /* circle top: level with the end of the title */
  --cr: 12cqw;                                         /* circle right edge offset */ }
.promo__title-box { font: 900 var(--title)/.8 var(--font); letter-spacing: -.06em; text-transform: uppercase; position: relative; z-index: 2;
  /* second line steps right by ~2 em, as in the design */ padding-left: 2.05em; text-indent: -2.05em; max-width: 8.6em; padding-top: .06em; }
.promo__text { max-width: min(628px, 46cqw); margin-top: calc(var(--title) * 1.55); position: relative; z-index: 2; font: italic 400 clamp(17px, 1.55cqw, 22px)/1.2 var(--font); text-transform: uppercase; }
.promo__text a { color: var(--black); }
.promo__circle { position: absolute; right: var(--cr); top: var(--ct); width: var(--cw); aspect-ratio: 1; border-radius: 50%; background: var(--black); z-index: 1;
  transform: scale(calc(1 + var(--p) * .45)); transform-origin: 50% 60%; }
/* the text-rocket is larger than the circle: it pokes out at the top right and trails out at the bottom left */
.promo__rocket { position: absolute; right: calc(var(--cr) - var(--cw) * .045); top: calc(var(--ct) - var(--cw) * .03); width: calc(var(--cw) * 1.29); aspect-ratio: 445 / 458; background: url(../img/rocket.svg) center / contain no-repeat; z-index: 1;
  transform: translate(calc(var(--p) * 30%), calc(var(--p) * -120%)); }

/* ---------- home: section previews ---------- */
.chapters__dark { background: var(--black); color: var(--white); }
.chapters__light { background: var(--beige); color: var(--black); }
.chapters__dark .chapter-preview:nth-of-type(1) { --section: var(--red); }
.chapters__dark .chapter-preview:nth-of-type(2) { --section: var(--orange); }
.chapters__dark .chapter-preview:nth-of-type(3) { --section: var(--yellow); }
.chapters__light .chapter-preview:nth-of-type(1) { --section: var(--green); }
.chapters__light .chapter-preview:nth-of-type(2) { --section: var(--blue); }
.chapters__light .chapter-preview:nth-of-type(3) { --section: var(--blue-dark); }
.chapters__light .chapter-preview:nth-of-type(4) { --section: var(--purple); }
.chapter-preview { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(56px, 7vw, 112px) var(--gutter); min-height: 420px; display: flex; align-items: center; overflow: hidden; }
.chapter-preview__content { position: relative; z-index: 2; max-width: 520px; }
.chapter-preview__content_right { margin-left: auto; margin-right: 8%; }
.chapter-preview__overlay { display: none; }
.chapter-preview__header { border-left: 8px solid var(--section); padding-left: 16px; margin-bottom: 40px; }
.chapter-preview__title { display: block; color: var(--gray-dark); text-decoration: none; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; }
.chapter-preview__title:hover { color: var(--section); }
.chapter-preview__subtitle { margin: 12px 0 0; }
.chapter-preview__text { color: #8d8d8d; max-width: 420px; }
.chapters__light .chapter-preview__text { color: var(--gray-dark); }
.chapter-preview__link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 24px 0 10px; margin-top: 32px; border: 1px solid currentColor; border-radius: 999px; color: inherit; text-decoration: none; font: 400 16px/1 var(--font); }
.chapter-preview__link::before { content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--section); }
.chapter-preview__link:hover { background: var(--section); border-color: var(--section); color: var(--white); }
.chapter-preview__link:hover::before { background: var(--white); }
.chapter-preview__counter { position: absolute; left: var(--gutter); top: clamp(56px, 7vw, 112px); font: 900 clamp(40px, 4.4vw, 64px)/1 var(--font); color: var(--gray-dark); font-variant-numeric: tabular-nums; z-index: 1; }
.chapter-preview__image { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(32%, 380px); z-index: 1; }
.tentacle { position: absolute; z-index: 1; width: min(42vw, 560px); pointer-events: none; }
.chapters__dark .tentacle { filter: brightness(.18) contrast(1.4); opacity: .9; }
.chapters__light .tentacle { opacity: .5; }
.tentacle1, .tentacle3 { right: 0; top: 50%; transform: translateY(-50%); }
.tentacle2 { left: -6vw; top: 50%; transform: translateY(-50%) scaleX(-1); }
.tentacle4 { left: -4vw; top: 8%; }
.tentacle5, .tentacle6 { right: -4vw; top: 8%; }

/* ---------- V. landing (Figma «V / Main page / 1440») ---------- */
.promo.v { max-width: none; min-height: min(88vh, 860px); background: var(--black); color: var(--white); justify-content: center;
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2)); --vw: min(46cqw, 640px); --venus: min(30cqw, 420px);  /* stay in the centred column on wide screens */
  padding-left: var(--edge); padding-right: var(--edge); }
.promo.v .promo__text { font: 900 clamp(32px, 4.4vw, 64px)/1.1 var(--font); letter-spacing: -.02em; text-transform: uppercase; max-width: min(52vw, 720px); z-index: 3; margin: 0; }
.promo.v .promo__text .body-text-bold { display: block; font: italic 400 clamp(16px, 1.5vw, 20px)/1.4 var(--font); text-transform: uppercase; letter-spacing: 0; margin-top: 24px; color: var(--gray-light); }
.promo.v .promo__text a { color: var(--red-light); }
.promo__v-v { position: absolute; right: var(--edge); bottom: 0; width: var(--vw); aspect-ratio: 2038 / 950; z-index: 2; pointer-events: none; }
.promo__v-venera { position: absolute; bottom: 0; right: calc(var(--edge) + (var(--vw) - var(--venus)) / 2); width: var(--venus); z-index: 1; }
.promo__v-silhouette { position: absolute; bottom: 0; width: 50%; will-change: transform; }
#silhouette-left { left: 0; transform-origin: 0 100%; } #silhouette-right { right: 0; transform-origin: 100% 100%; }
.promo__v-dot { position: absolute; left: var(--edge); bottom: 48px; width: 24px; height: 24px; border-radius: 50%; background: var(--red); z-index: 3; }
.promo__subtitle-block { display: none; }
.bg-sewer, .bg-crocodile { position: absolute; z-index: 1; pointer-events: none; }
.bg-sewer { right: -4vw; bottom: 0; width: min(42vw, 520px); opacity: .45; }
.bg-crocodile { left: -6vw; bottom: 0; width: min(40vw, 480px); opacity: .2; }
.bg-crocodile_light { filter: invert(1); opacity: .1; right: -6vw; left: auto; }

/* ---------- section navigation + search (Figma «Chapter N / 1440») ---------- */
.chapters-nav { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 8px; display: flex; flex-direction: column; }
.chapters-nav__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; overflow-x: auto; margin: 0 0 56px; padding: 0 0 8px; list-style: none; scrollbar-width: thin; cursor: grab; order: 2; }
.chapters-nav__item { min-width: 0; }
.chapters-nav__link { display: block; height: 100%; min-height: 128px; box-sizing: border-box; padding: 12px; border: 1px solid var(--black); color: var(--black); text-decoration: none; background: transparent; transition: background .15s, color .15s; }
.chapters-nav__link:hover { background: var(--white); }
.chapters-nav__item_active .chapters-nav__link { background: var(--red); border-color: var(--red); color: var(--white); }
.chapters-nav__chapter { font: 900 20px/1.2 var(--font); text-transform: uppercase; color: var(--gray-dark); margin: 0 0 8px; }
.chapters-nav__item_active .chapters-nav__chapter { color: var(--white); }
.chapters-nav__name { font: italic 700 12px/1.25 var(--font); text-transform: uppercase; margin: 0; }
.chapters-nav__title { order: 3; text-align: center; margin: 0 auto; max-width: 18em; }
.search { order: 1; align-self: flex-end; display: flex; align-items: center; gap: 12px; width: min(360px, 100%); margin: 0 0 24px; }
.search__input { flex: 1; min-width: 0; min-height: 40px; border: 0; border-bottom: 1px solid var(--black); padding: 0 4px; font: italic 400 16px/1 var(--font); background: transparent; }
.search__input::placeholder { color: var(--gray-dark); }
.search__input:focus { outline: none; border-bottom-color: var(--red); }
.search__button { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--red); cursor: pointer; position: relative; }
.search__button::before { content: ''; position: absolute; left: 11px; top: 10px; width: 14px; height: 14px; border: 2px solid var(--white); border-radius: 50%; }
.search__button::after { content: ''; position: absolute; left: 24px; top: 26px; width: 7px; height: 2px; background: var(--white); transform: rotate(45deg); }
.search__status { order: 1; align-self: flex-end; font-size: 13px; color: var(--gray-dark); margin: -16px 0 16px; min-height: 1em; }
.search-hit { background: var(--red-light); box-shadow: 0 0 0 6px var(--red-light); transition: background 1s; }

/* ---------- generic chapter content ---------- */
.chapter { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 40px; }
.chapter__cover-img_wide { width: 100%; max-height: 520px; object-fit: cover; margin-bottom: 40px; }
.chapter-1-how { max-width: 880px; }
.chapter-1-how__article { margin-bottom: 40px; }
.chapter-1-how__subtitle { font: italic 700 24px/1.2 var(--font); text-transform: uppercase; color: var(--red); margin: 48px 0 16px; }
.chapter-1-how__text { margin-bottom: 1em; }
.chapter-1-how__image-container { margin: 24px 0; text-align: center; }
.chapter-1-how__image-container img { max-height: 620px; width: auto; }
.chapter-1-how__sign { text-align: right; font-style: italic; color: var(--gray-dark); }
.chapter-4-kezvh__article { display: grid; grid-template-columns: minmax(0, 1fr); }
.chapter-4-kezvh__text-content { max-width: 880px; width: 100%; min-width: 0; margin: 0 auto; }
.chapter-4-kezvh__title { display: block; margin: 0 0 16px; color: var(--black); text-decoration: none; }
.chapter-4-kezvh__title:hover { color: var(--red); }
.chapter-4-kezvh__text { color: var(--gray-dark); }
.chapter-4-kezvh .chapter-1-how__text { display: inline-flex; align-items: center; gap: 10px; margin: 48px 0 12px; padding: 6px 16px 6px 8px; border: 1px solid var(--black); border-radius: 999px; font: 400 14px/1 var(--font); }
.chapter-4-kezvh .chapter-1-how__text::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--red); }
.help_text { display: inline-block; margin-bottom: 16px; font: italic 700 14px/1.2 var(--font); text-transform: uppercase; color: var(--red); }

/* articles list */
.articles { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 16px; max-width: 1040px; }
.articles__link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; padding: 28px; border: 1px solid var(--black); transition: background .15s; }
.articles__link:hover { background: var(--white); }
.articles__title { margin-bottom: 12px; }
.articles__author { display: inline-flex; align-items: center; gap: 8px; color: var(--gray-dark); font-size: 14px; }
.articles__author::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.articles__preview { margin: 0; color: var(--gray-dark); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* single article / news */
.article { max-width: 880px; }
.article__nav { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--gray-dark); text-decoration: none; margin-bottom: 24px; }
.article__nav:hover { color: var(--red); }
.article__nav-arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; font: 900 16px/1 var(--font); }
.article__nav-link { margin: 0; font: italic 400 16px/1.2 var(--font); text-transform: uppercase; }
.article__header { margin-bottom: 40px; text-align: center; }
.article__title { font-size: clamp(32px, 4.4vw, 64px); }
.article__author { color: var(--gray-dark); font-style: italic; }
.article__text-block img, .news-page__text img { display: block; margin: 24px auto; max-height: 640px; width: auto; }
.article__text-block table { display: block; overflow-x: auto; max-width: 100%; }
.news-page__header { margin-bottom: 32px; text-align: center; }
.news-page__title { font-size: clamp(28px, 4vw, 56px); }
.news-page__date { color: var(--red); font: italic 700 16px/1.2 var(--font); text-transform: uppercase; }
.news-page__image { display: block; width: 100%; max-height: 560px; object-fit: contain; margin: 0 auto 32px; }

/* organisations article */
.org { display: grid; gap: 16px; padding: 0; list-style: none; }
.org__item { border: 1px solid var(--black); padding: 20px 24px; }
.org__header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.org__flag { width: 32px; height: 22px; background: var(--gray-light); flex: none; }
.org__name { font: italic 700 20px/1.2 var(--font); text-transform: uppercase; margin: 0; }
.org__status { font: italic 400 13px/1.2 var(--font); text-transform: uppercase; color: var(--red); margin: 0; }

/* ---------- notes and commentary (Figma «Chapter 2 / 1440») ---------- */
.chapter-2-3-notes__description { max-width: 760px; margin: 0 auto; }
.chapter-2-3-notes__content { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 48px; align-items: start; margin-top: 56px; }
.sidebar { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; background: var(--black); color: var(--white); padding: 12px 0; scrollbar-color: var(--gray-dark) var(--black); }
.sidebar .accordion-item { background: transparent; border: 0; color: inherit; }
.sidebar .accordion-button { display: block; background: transparent; padding: 14px 20px; box-shadow: none; color: var(--white); text-align: left; }
.sidebar .accordion-button::after { display: none; }
.sidebar .accordion-button:focus { box-shadow: none; }
.chapter-button_current { background: transparent !important; }
.sidebar .accordion-header { display: flex; align-items: center; gap: 12px; }
.sidebar__icon { width: 10px; height: 10px; border-right: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(-45deg); flex: none; transition: transform .15s; }
.accordion-button:not(.collapsed) .sidebar__icon, .chapter-button_current .sidebar__icon { transform: rotate(45deg); }
.sidebar__title { margin: 0; font: italic 700 20px/1.2 var(--font); text-transform: uppercase; }
.sidebar-subtitle { margin: 4px 0 0 22px; font: 400 13px/1.4 var(--font); color: var(--gray-light); }
.accordion-body { list-style: none; margin: 0; padding: 4px 0 12px; }
.sidebar__link { display: block; padding: 6px 20px 6px 42px; color: var(--gray-light); text-decoration: none; font-size: 14px; line-height: 1.4; }
.sidebar__link:hover { color: var(--white); }
.sidebar__link_active { background: var(--white); color: var(--black) !important; font-weight: 700; }
#comments-content { max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; position: relative; padding-right: 12px; }
.chapter-2-3-notes__item { padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--gray-light); }
.chapter-2-3-notes__header { margin-bottom: 16px; }
.chapter-2-3-notes__header + br, .chapter-2-3-notes__item > br { display: none; }
.chapter-2-3-notes__title { margin: 0 0 4px; color: var(--red); }
.chapter-2-3-notes__pages { margin: 0; font: 400 14px/1.4 var(--font); color: var(--red); }
.chapter-2-3-notes__img { display: block; max-width: min(100%, 420px); max-height: 320px; width: auto; margin-top: 16px; cursor: zoom-in; }
.chapter-navigation { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.custom-button { min-height: 44px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--black); background: transparent; color: var(--black); font: 400 16px/1 var(--font); }
.custom-button:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: var(--white); }
.custom-button:disabled { opacity: .35; }
.notes-missing { padding: 32px; border: 1px dashed var(--gray-dark); }
.notes-missing__title { margin-bottom: 8px; color: var(--red); }
.modal-content { background: transparent; border: 0; }
.modal-content .btn-close { position: absolute; right: 0; top: -44px; filter: invert(1); opacity: 1; width: 32px; height: 32px; }
.modal-image { max-width: 100%; max-height: 86vh; width: auto; }

/* ---------- chronology (Figma «Chapter 5 / 1440») ---------- */
.chronology { margin: 40px auto 0; display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 0 56px; align-items: center; max-width: 1040px; width: 100%; }
.chronology__slider-container { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chronology__prev-btn, .chronology__next-btn { position: static !important; margin: 0 !important; width: 48px !important; height: 32px !important; color: var(--gray-dark) !important; }
.chronology__prev-btn::after, .chronology__next-btn::after { content: '' !important; font-family: inherit !important; width: 20px; height: 20px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; transform: translateY(5px) rotate(45deg); }
.chronology__next-btn::after { transform: translateY(-5px) rotate(225deg); }  /* Swiper's icon font is a data: URI, blocked by the host CSP */
.chronology__slider { height: 300px; width: 100%; }
.chronology__slide { display: flex !important; align-items: center; justify-content: center; height: auto; min-height: 80px; color: var(--gray-light); transition: color .2s; }
.chronology__slide_active { color: var(--red); }
.chronology__slide-text { margin: 0; font: 900 32px/1.1 var(--font); text-align: center; padding: 4px; }
.chronology__slide_active .chronology__slide-text { font-size: 48px; }
.chronology__slide-text.chronology__slide_s { font-size: 18px; }
.chronology__slide_active .chronology__slide-text.chronology__slide_s { font-size: 24px; }
.chronology__fact { grid-column: 2; grid-row: 1; align-self: center; margin: 0; font: 400 clamp(18px, 1.7vw, 24px)/1.5 var(--font); text-transform: none; }
.chronology-description { margin-top: 64px; }
.chronology-description__subtitle { font: italic 700 24px/1.2 var(--font); text-transform: uppercase; }
.chronology-description__facts { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.chronology-description__fact-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.chronology-description__fact-number { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; font: 700 14px/1 var(--font); }
.chronology-description__fact-title { font: italic 700 16px/1.25 var(--font); text-transform: uppercase; margin: 0; }
.chronology-description__fact-text { color: var(--gray-dark); }
.chronology-description__fact-text.is-clamped { max-height: 130px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.chronology-description__fact-btn { border: 0; background: none; padding: 8px 0; color: var(--red); font: italic 700 14px/1.2 var(--font); text-transform: uppercase; cursor: pointer; }

/* ---------- characters ---------- */
.characters { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 40px; }
.characters__text { max-width: 880px; margin: 0 auto 16px; text-align: center; }
.characters__to-map-link, .embed-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 24px 0 10px; margin: 8px 0 32px; border: 1px solid var(--black); border-radius: 999px; color: var(--black); text-decoration: none; font: 400 16px/1 var(--font); }
.characters__to-map-link::before, .embed-link::before { content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--red); }
.characters__to-map-link:hover, .embed-link:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.characters__to-map-link:hover::before, .embed-link:hover::before { background: var(--white); }
.characters__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; }
.characters__item { padding: 6px 16px; border: 1px solid var(--black); border-radius: 999px; font-size: 14px; }
.characters .container { max-width: none; padding: 0; }
#image-container { position: relative; overflow: hidden; background: var(--black); height: min(70vh, 680px); display: flex; align-items: center; justify-content: center; touch-action: none; }
#image-container.is-zoomed { cursor: grab; }
#image { max-height: 100%; width: auto; transition: transform .15s; user-select: none; -webkit-user-drag: none; }
.characters__zoom { display: flex; gap: 8px; justify-content: flex-end; margin: 12px 0 24px; }
.characters__zoom button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--red); color: var(--white); font: 900 22px/1 var(--font); cursor: pointer; }
.characters__zoom button:hover { background: var(--black); }
.characters__description { max-width: 880px; }
.characters__table { overflow-x: auto; border-top: 1px solid var(--black); margin-top: 24px; }
.table_characters_chronology { border-collapse: collapse; min-width: 1100px; width: 100%; font-size: 14px; }
.table_characters_chronology__row:first-child { position: sticky; top: 0; background: var(--black); color: var(--white); }
.table_characters_chronology__row:first-child .table_characters_chronology__text { font: italic 700 13px/1.2 var(--font); text-transform: uppercase; }
.table_characters_chronology__cell { vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--gray-light); }
.table_characters_chronology__text { margin: 0; line-height: 1.5; }
h6.table_characters_chronology__text { font: 700 14px/1.4 var(--font); }
.circle-name { font: italic 700 20px/1.2 var(--font); padding: 12px 0; color: var(--red); text-transform: uppercase; }
.table_characters_chronology__cell img { max-width: 140px; }

/* ---------- about pages ---------- */
.about-nav { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 8px; }
.about-nav__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 48px; padding: 0; list-style: none; }
.about-nav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--black); border-radius: 999px; color: var(--black); text-decoration: none; font-size: 16px; }
.about-nav__link-item_active .about-nav__link { background: var(--red); color: var(--white); border-color: var(--red); }
.about-nav__title { margin: 0 auto; text-align: center; max-width: 18em; }
.about-project { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter); }
.about-project__cover-img { width: 100%; max-height: 520px; object-fit: cover; margin-bottom: 48px; }
.about-project__description { max-width: 880px; margin: 0 auto; }
.about-project__description span[style] { font-size: inherit !important; color: inherit !important; }
.about-project__description a span { color: var(--red) !important; }
.about-project .sidebar { position: static; max-height: none; margin: 48px 0 24px; }
.meeting { margin-top: 24px; }
.meeting__box { padding: 24px 0; border-bottom: 1px solid var(--gray-light); }
.meeting__topic { margin: 0 0 12px; color: var(--red); }
.about-creators { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter); }
.about-creators__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.about-creators__creator { border: 1px solid var(--black); padding: 24px; }
.about-creators__name { margin: 0 0 8px; }
.about-creators__role { margin: 0; color: var(--gray-dark); }
.contact { max-width: 880px; margin: 0 auto; padding: 40px var(--gutter); text-align: center; }
.contact__links { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.contact__link { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 24px 0 10px; border: 1px solid var(--black); border-radius: 999px; color: var(--black); text-decoration: none; text-transform: none; font: 400 16px/1 var(--font); }
.contact__link::before { content: ''; width: 24px; height: 24px; border-radius: 50%; background: var(--red); }
.contact__link:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* news */
.news { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter); }
.news__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.news__item-link { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--black); color: var(--black); text-decoration: none; transition: background .15s; }
.news__item-link:hover { background: var(--white); color: var(--black); }
.news__image-placeholder { aspect-ratio: 16 / 10; background: var(--gray-light); overflow: hidden; }
.news__image { width: 100%; height: 100%; object-fit: cover; }
.news__date { display: flex; gap: 6px; align-items: baseline; padding: 16px 20px 0; color: var(--red); }
.news__date p { margin: 0; font: italic 700 14px/1.2 var(--font); text-transform: uppercase; }
.news__date-day { font: 900 24px/1 var(--font) !important; }
.news__content { padding: 8px 20px 24px; }
.news__title { margin: 0 0 8px; font-size: 20px; }
.news__preview { margin: 0; color: var(--gray-dark); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* author biography (Figma «Pynchon page / 1440») */
.pynchon-promo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 385px); align-items: start; gap: 48px; max-width: calc(var(--max) + 2 * var(--gutter)); box-sizing: border-box; margin: 0 auto; padding: 16px var(--gutter) 64px; --t: clamp(48px, 8.4vw, 120px); }   /* Figma «Pynchon page / 1440» */
.pynchon-promo__title-box { font: 900 var(--t)/.8 var(--font); letter-spacing: -.06em; text-transform: uppercase; padding: .06em 0 0 1.33em; text-indent: -1.33em; }
.pynchon-promo__text { margin-top: calc(var(--t) * 1.8); max-width: 586px; font: italic 400 clamp(18px, 1.7vw, 24px)/1.2 var(--font); }
.pynchon-promo__img { width: 100%; max-width: 385px; justify-self: end; margin-top: calc(var(--t) * .5); }
.bio { max-width: calc(var(--max) + 2 * var(--gutter)); box-sizing: border-box; margin: 0 auto; padding: 0 var(--gutter) 40px; }
.bio__article:not(.bio__article_columns):not(.bio__article_gallery) { max-width: 960px; margin-left: auto; margin-right: auto; }   /* keep long paragraphs readable */
.bio__article { margin: 56px 0; }
.bio__article_columns { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 40px; align-items: start; }
.bio__article_columns > img + img { grid-column: 1; }
.bio__article_columns .bio__text { grid-column: 2; grid-row: 1 / span 3; }
/* two photos side by side, text to the right (Figma «Pynchon page / 1440») */
.bio__article_columns:has(> img + img) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.55fr); gap: 12px 24px; }
.bio__article_columns:has(> img + img) > img { grid-row: 1; width: 100%; max-height: none; aspect-ratio: 185 / 255; object-fit: cover; }
.bio__article_columns:has(> img + img) > img + img { grid-column: 2; }
.bio__article_columns:has(> img + img) .bio__text { grid-column: 3; grid-row: 1; padding-left: 8px; }
.bio__text > p:first-child > span:only-child { display: block; font: italic 700 15px/1.3 var(--font); text-transform: uppercase; margin-bottom: 4px; }
.bio__article_gallery { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: flex-end; }
.bio__article_gallery img { max-height: 340px; width: auto; }
.bio__article_right { margin-left: auto; max-width: 720px; }
.bio__text > span:first-child, .bio__article > .bio__text > span { display: block; font: italic 700 24px/1.2 var(--font); text-transform: uppercase; margin-bottom: 16px; }
.bio__text_center { text-align: center; max-width: 900px; margin: 0 auto; font: italic 400 clamp(18px, 1.8vw, 24px)/1.3 var(--font) !important; text-transform: uppercase; }
.bio__image_wide { width: 100%; margin-bottom: 16px; }
.bio__image_center { display: block; margin: 0 auto; }
.bio__image_high { max-height: 420px; width: auto; filter: grayscale(1); }
.bio__fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.bio__fact-item img { width: 100%; }

/* 404 */
.not-found { max-width: 760px; margin: 0 auto; padding: 80px var(--gutter); text-align: center; }
.not-found__code { font: 900 clamp(96px, 18vw, 200px)/1 var(--font); letter-spacing: -.06em; color: var(--red); margin: 0; }
.not-found__link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; border-radius: 999px; background: var(--red); color: var(--white); text-decoration: none; margin-top: 16px; font: 400 16px/1 var(--font); text-transform: none; }

/* Long URLs and wide tables must not widen the page on phones. */
.content p, .content li, .content span, .content a { overflow-wrap: anywhere; }
.content table:not(.table_characters_chronology) { display: block; max-width: 100%; overflow-x: auto; }
.characters__table, .chronology-description { max-width: 100%; }
.content .container:has(> table.table_characters_chronology) { overflow-x: auto; max-width: 100%; padding: 0; border-top: 1px solid var(--black); margin-top: 24px; }

/* ---------- responsive (Figma «… / 360» frames) ---------- */
@media (max-width: 1023px) {
  .chapter-2-3-notes__content { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sidebar { position: static; max-height: 380px; }
  #comments-content { max-height: none; overflow: visible; padding: 0; }
  .chronology { grid-template-columns: minmax(0, 1fr); gap: 16px; text-align: center; }
  .chronology__slider-container { grid-row: 1; }
  .chronology__fact { grid-column: 1; grid-row: 2; }
  .articles__link { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .chapter-preview:has(.chapter-preview__image) { flex-direction: column; align-items: flex-start; }
  .chapter-preview__image { position: static; transform: none; width: min(70%, 360px); margin-bottom: 24px; }
  .chapter-preview:has(.chapter-preview__image) .chapter-preview__content_right { margin-left: 0; }
  .chapter-preview__content_right { margin-right: 0; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .chapter-title { font-size: 32px; }
  .title-bold, .title { font-size: 18px; }
  .header__links { display: none; }
  .header__button { display: block; }
  .header__logo { width: 52px; }
  .footer__container { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer { padding-bottom: 96px; }
  .promo { padding-bottom: 96cqw; --title: clamp(40px, 12cqw, 64px); --cw: 56cqw; --cr: 14cqw; --ct: calc(100% - 26cqw - var(--cw)); }
  .promo__title-box { padding-left: 1.15em; text-indent: -1.15em; }
  .promo__text { margin-top: 28px; max-width: none; }
  .chapter-preview { min-height: 0; }
  .chapter-preview__header { margin-bottom: 24px; }
  .chapter-preview__counter { display: none; }
  .tentacle { width: 70vw; opacity: .3; }
  .promo.v { padding-bottom: 80vw; }
  .promo.v .promo__text { max-width: none; }
  .promo.v { --vw: 92cqw; --venus: 56cqw; --edge: 4cqw; padding-left: var(--gutter); padding-right: var(--gutter); }
  .bg-sewer, .bg-crocodile { opacity: .12; width: 80vw; }
  .chapters-nav__list { grid-auto-columns: 132px; margin-bottom: 32px; }
  .chapters-nav__link { min-height: 104px; }
  .search { width: 100%; }
  .pynchon-promo { grid-template-columns: minmax(0, 1fr); }
  .pynchon-promo__img { justify-self: center; }
  .bio__article_columns { grid-template-columns: minmax(0, 1fr); }
  .bio__article_columns .bio__text { grid-column: 1; grid-row: auto; }
  .bio__article_columns:has(> img + img) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bio__article_columns:has(> img + img) .bio__text { grid-column: 1 / -1; grid-row: 2; padding-left: 0; }
  .pynchon-promo__img { margin-top: 0; }
  .pynchon-promo__text { margin-top: 32px; }
  .pynchon-promo__title-box { padding-left: 1.1em; text-indent: -1.1em; }
  .bio__image_high { max-height: 360px; }
  .news__list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* News posts use .article without .chapter: give them the same centred column. */
section.article:not(.chapter) { margin: 0 auto; padding: 32px var(--gutter) 40px; }

/* ---------- interactive character scheme (Figma «Chapter 6.2» / «person» card) ---------- */
.characters__list { gap: 12px; justify-content: center; margin: 8px 0 24px; }
.characters__item_tab { padding: 0; border: 0; }
.cmap-tab { min-height: 36px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; color: var(--white); font: 400 14px/1 var(--font); cursor: pointer; transition: box-shadow .15s, opacity .15s; }
.cmap-tab_family { background: var(--orange); } .cmap-tab_sex { background: var(--red); } .cmap-tab_friends { background: var(--green); }
.cmap-tab_work { background: var(--blue); } .cmap-tab_otherworld { background: transparent; border-color: var(--yellow); color: var(--black); }
.cmap-tab_doubles { background: var(--red-light); } .cmap-tab_unique { background: var(--purple); }
.cmap-tab:hover { box-shadow: 0 0 0 3px rgba(21,21,21,.12); }
.characters__list:has([aria-pressed="true"]) .cmap-tab:not([aria-pressed="true"]) { opacity: .45; }
.cmap-tab[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--black); }
.cmap__status { color: var(--gray-dark); font-size: 14px; text-align: center; margin: 0 0 12px; }
#image-container.cmap { display: block; height: min(78vh, 760px); cursor: grab; background: var(--black); }
#image-container.cmap:active { cursor: grabbing; }
.cmap__stage { position: absolute; left: 0; top: 0; width: 4573px; height: 3202px; transform-origin: 0 0; will-change: transform; }
.cmap__svg { display: block; width: 4573px; height: 3202px; }
.cmap__svg .cmap-edge { transition: opacity .2s, stroke-width .2s; }
.cmap__svg.is-filtered .cmap-edge { opacity: .1; }
.cmap__svg.is-filtered .cmap-edge.is-on { opacity: 1; stroke-width: 5px; }
.cmap__svg.is-filtered .cmap-edge_base.is-on { stroke: #f8f6f3; }
.cmap__svg.is-filtered .cmap-node { opacity: .35; }
.cmap__svg.is-filtered .cmap-node.is-on { opacity: 1; }
.cmap-hit { fill: transparent; cursor: pointer; }
.cmap-hit:hover { fill: rgba(248,246,243,.18); }
.cmap-hit.is-selected { fill: rgba(248,246,243,.25); stroke: var(--white); stroke-width: 4px; }
.cmap__panel { position: absolute; left: 24px; top: 24px; width: min(330px, calc(100% - 48px)); z-index: 2; cursor: auto; display: flex; flex-direction: column; gap: 12px; max-height: calc(100% - 48px); }
.cmap__search { position: relative; }
.cmap__search-input { width: 100%; box-sizing: border-box; min-height: 44px; border: 0; padding: 0 44px 0 16px; background: var(--beige) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23842234' stroke-width='2'%3E%3Ccircle cx='7.5' cy='7.5' r='6'/%3E%3Cpath d='M12 12l5 5'/%3E%3C/svg%3E") no-repeat right 14px center; font: 400 14px/1 var(--font); }
.cmap__results { position: absolute; left: 0; right: 0; top: 100%; margin: 0; padding: 4px 0; list-style: none; background: var(--white); box-shadow: 0 12px 24px rgba(0,0,0,.25); z-index: 3; }
.cmap__results li { padding: 8px 16px; font-size: 14px; cursor: pointer; }
.cmap__results li:hover, .cmap__results li.is-active { background: var(--beige); color: var(--red); }
.cmap__empty { color: var(--gray-dark); cursor: default !important; }
.cmap__card { position: relative; overflow-y: auto; background: var(--beige); padding: 16px 16px 12px; font-size: 13px; line-height: 1.5; }
.cmap-card__close { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--red); cursor: pointer; }
.cmap-card__close::before, .cmap-card__close::after { content: ''; position: absolute; left: 8px; top: 13px; width: 12px; height: 2px; background: var(--white); transform: rotate(45deg); }
.cmap-card__close::after { transform: rotate(-45deg); }
.cmap-card { display: grid; grid-template-columns: minmax(90px, 34%) 1fr; gap: 10px 12px; margin: 0; }
.cmap-card dt { font-weight: 700; }
.cmap-card dd { margin: 0; overflow-wrap: anywhere; }
.cmap-card__name { color: var(--red); font-weight: 700; padding-right: 28px; }
.cmap-card__note { margin: 12px 0 0; color: var(--gray-dark); }
.cmap-card__row { margin-top: 14px; min-height: 36px; padding: 0 16px; border: 1px solid var(--black); border-radius: 999px; background: transparent; font: 400 13px/1 var(--font); cursor: pointer; }
.cmap-card__row:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.characters__zoom button[aria-label] { font-size: 18px; }
.cmap__below { max-width: 620px; margin: 24px 0 8px; padding: 20px; background: var(--white); border: 1px solid var(--gray-light); font-size: 14px; line-height: 1.55; }
.cmap__below-title { color: var(--gray-dark); font: italic 400 14px/1 var(--font); margin: 0 0 16px; }
.cmap__below .cmap-card { grid-template-columns: minmax(110px, 30%) 1fr; }
@media (min-width: 1024px) { .cmap__below { display: none; } }   /* desktop: the card sits on the map */
@media (max-width: 1023px) {
  .cmap__card { display: none; }                                   /* tablet/phone: the card goes under the map */
  .cmap__panel { left: 12px; top: 12px; width: calc(100% - 24px); }
  #image-container.cmap { height: min(70vh, 560px); }
}

/* Figma frames put content on the same 80 px column as the header (x = 80…1360 at 1440):
   wide blocks take the column width including their side padding. Long-read columns (.article, .chapter-1-how) stay narrow. */
.chapters-nav, .characters, .about-nav, .about-project, .about-creators, .news, .chapter-preview,
.chapter:not(.chapter-1-how):not(.article) { box-sizing: border-box; max-width: calc(var(--max) + 2 * var(--gutter)); }
