/* Виды: главная, зал стиля, хронология, каталог, о проекте. */

.page-x { padding-left: var(--gutter); padding-right: var(--gutter); }

/* =================== Главная =================== */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(24px, 5vw, 80px);
  align-items: end; padding-bottom: clamp(28px, 4vw, 48px);
}
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5.4rem); line-height: 1.02; letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-side { display: grid; gap: 22px; padding-bottom: 8px; }
.hero-lead { font-family: var(--serif); font-size: var(--t-xl); line-height: 1.5; color: var(--ink-2); max-width: 36ch; }
.hero-search {
  display: flex; align-items: center; gap: 12px; height: 54px; padding: 0 16px;
  border: 1px solid var(--ink); border-radius: var(--radius-ui); background: var(--paper-2);
  font-size: var(--t-lg); color: var(--ink-3); text-align: left;
}
.hero-search:hover { color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.hero-search svg { width: 20px; height: 20px; color: var(--ink); }
.hero-search span { flex: 1; }

.frieze { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 28px 0 0; background: color-mix(in oklab, var(--paper-3) 45%, var(--paper)); }
.frieze-track {
  --fh: clamp(150px, 22vw, 250px);
  display: flex; gap: clamp(18px, 2.4vw, 34px); align-items: flex-start;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  padding: 0 var(--gutter) 22px; scrollbar-width: thin;
}
.frieze-item { flex: none; display: grid; grid-template-rows: auto auto auto; align-content: start; gap: 6px; text-decoration: none; scroll-snap-align: start; }
.frieze-item .art-frame { height: var(--fh); width: auto; max-width: calc(var(--fh) * 1.9); box-shadow: var(--shadow-art); transition: transform 0.35s var(--ease); }
.frieze-item:hover .art-frame { transform: translateY(-4px); }
.frieze-year { margin-top: 8px; padding-top: 8px; border-top: 3px solid var(--c); font-size: var(--t-xs); color: var(--ink-3); }
.frieze-name { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.2; max-width: 22ch; }
.frieze-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 14px; font-size: var(--t-sm); }
.frieze-btns { display: flex; gap: 4px; }

.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding-top: clamp(40px, 6vw, 80px); padding-bottom: 24px; }
.way {
  display: grid; grid-template-rows: auto auto 1fr; gap: 10px; padding: 0 clamp(16px, 2.4vw, 36px) 12px;
  text-decoration: none; border-left: 1px solid var(--rule);
}
.way:first-child { border-left: 0; padding-left: 0; }
.way:last-child { padding-right: 0; }
.way-visual { display: block; height: 150px; margin-bottom: 10px; overflow: hidden; }
.way-title { font-family: var(--serif); font-size: var(--t-3xl); line-height: 1.1; letter-spacing: -0.01em; }
.way:hover .way-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.way-text { color: var(--ink-2); max-width: 40ch; }
.way-map .mini-map { width: 100%; height: 100%; color: var(--ink); }
.way-pigments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; align-content: start; }
.pig { display: flex; align-items: center; gap: 7px; font-size: var(--t-xs); color: var(--ink-2); }
.pig i { display: block; width: 18px; height: 26px; background: var(--c); border-radius: 2px; flex: none; }
.way-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 4px; }
.way-mosaic .thumb { display: block; width: 100%; height: 100%; background: var(--ph); overflow: hidden; }
.way-mosaic .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.way-mosaic .thumb img.is-loaded { opacity: 1; }

.day { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.day-work { display: block; box-shadow: var(--shadow-art); }
.day-work .art-frame { max-height: 70vh; }
.day-kicker { font-family: var(--sans); font-size: var(--t-sm); font-weight: 500; color: var(--ink-3); margin-bottom: 10px; }
.day-name { font-family: var(--serif); font-size: clamp(2rem, 1rem + 3vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.day-name a { text-decoration: none; }
.day-dates { margin-top: 8px; color: var(--ink-3); }
.day-summary { margin-top: 18px; font-family: var(--serif); font-size: var(--t-xl); line-height: 1.5; max-width: 40ch; color: var(--ink-2); }
.day-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

@media (max-width: 900px) {
  .hero, .day { grid-template-columns: 1fr; }
  .ways { grid-template-columns: 1fr; gap: 36px; }
  .way, .way:first-child { border-left: 0; padding: 0; }
}

/* =================== Зал стиля =================== */
body[data-view="style"] {
  --wall: color-mix(in oklab, var(--paper) 88%, var(--tint, var(--paper)));
  --accent: var(--style-accent-l, #2f43b8);
}
/* Вторичный текст выводится из основного и цвета стены — контраст держится на любом тоне зала. */
body[data-view="style"] .room, body[data-view="style"] .site-footer {
  --ink-2: color-mix(in oklab, var(--ink) 82%, var(--wall));
  --ink-3: color-mix(in oklab, var(--ink) 71%, var(--wall));
}
:root[data-theme="dark"] body[data-view="style"] { --wall: color-mix(in oklab, var(--paper) 82%, var(--tint, var(--paper))); --accent: var(--style-accent-d, #8c9bff); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-view="style"] { --wall: color-mix(in oklab, var(--paper) 82%, var(--tint, var(--paper))); --accent: var(--style-accent-d, #8c9bff); }
}

.room { max-width: 1440px; margin: 0 auto; padding: clamp(24px, 4vw, 56px) var(--gutter) 40px; }
.room-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; color: var(--ink-2); font-size: var(--t-sm); }
.room-title {
  margin-top: 14px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 1rem + 5.4vw, 6rem); line-height: 1; letter-spacing: -0.03em; text-wrap: balance;
}
.room-orig { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: var(--t-2xl); color: var(--ink-3); }
.room-kind { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 18px; font-size: var(--t-sm); color: var(--ink-2); }
.kind-badge { padding: 2px 9px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink); }
.kind-note { flex-basis: 100%; max-width: var(--measure); color: var(--ink-3); }
.room-scope { margin-top: 14px; max-width: var(--measure); color: var(--ink-2); line-height: 1.5; }
.room-scope strong { font-weight: 600; color: var(--ink); }
.review { margin-top: 14px; max-width: var(--measure); padding-left: 12px; border-left: 3px solid var(--rule-strong); font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; }
.review.st-partial { border-left-color: var(--accent); }
.review.st-reviewed { border-left-color: var(--accent); color: var(--ink); }
.review a { color: inherit; }

.room-hang {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: clamp(28px, 4.5vw, 72px);
  align-items: start; margin-top: clamp(28px, 4vw, 56px);
}
.room-work { margin: 0; }
.reference-work {
  min-height: 240px; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--rule); background: var(--paper-2);
  display: grid; align-content: center; justify-items: start; gap: 16px;
}
.reference-title { font-family: var(--serif); font-size: var(--t-2xl); line-height: 1.2; }
.reference-note { color: var(--ink-3); font-size: var(--t-sm); }
.work-zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.work-zoom:disabled { cursor: default; }
.room-work .art-frame { box-shadow: var(--shadow-art); max-height: 78vh; }
.room-work .art-frame img { object-fit: contain; background: var(--paper-2); }
.room-work .art-frame:has(img) { aspect-ratio: var(--ar); max-height: none; width: min(100%, calc(78vh * var(--arn))); margin-inline: auto; }

.wall-label {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--paper-2); padding: 22px 22px 20px; border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule);
}
.wl-title { font-family: var(--serif); font-size: var(--t-2xl); line-height: 1.2; }
.wl-author { margin-top: 6px; font-weight: 500; }
.wl-facts { margin-top: 2px; color: var(--ink-2); font-size: var(--t-sm); }
.wl-note { margin-top: 10px; color: var(--ink-3); font-size: var(--t-sm); }
.wl-role { display: inline-block; margin-bottom: 10px; padding: 2px 9px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: var(--t-xs); }
.gallery-grid .wl-role { margin-bottom: 4px; justify-self: start; }
.wl-why { margin-top: 10px; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; }
.wl-why strong { font-weight: 600; color: var(--ink); }
.pal-label { margin-top: 18px; font-size: var(--t-sm); font-weight: 600; }
.pal-label + .palette-strip { margin-top: 8px; }
.wl-summary { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); font-family: var(--serif); font-size: var(--t-lg); line-height: 1.5; }
.palette-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 18px; height: 40px; border-radius: 3px; overflow: hidden; }
.pal { border: 0; padding: 0; background: var(--c); }
.pal:hover { transform: scaleY(1.12); }
.pal:focus-visible { outline-offset: -3px; outline-color: #fff; }
.pal-hint { margin-top: 8px; font-size: var(--t-xs); color: var(--ink-3); }

.room-body {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: clamp(28px, 4.5vw, 72px);
  margin-top: clamp(40px, 6vw, 88px);
}
.room-text { max-width: var(--measure); }
.room-text p { font-family: var(--serif); font-size: var(--t-xl); line-height: 1.62; }
.room-text p + p { margin-top: 1em; }
.room-text p:first-child::first-letter {
  float: left; font-size: 3.6em; line-height: 0.82; padding: 0.06em 0.08em 0 0; color: var(--accent); font-weight: 500;
}
.side-title { font-family: var(--sans); font-size: var(--t-sm); font-weight: 600; margin-bottom: 10px; }
.side-title:not(:first-child) { margin-top: 28px; }
.traits { list-style: none; border-top: 1px solid var(--rule); }
.traits li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--rule); position: relative; line-height: 1.4; }
.traits li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.names { color: var(--ink-2); line-height: 1.6; }
.dates-main { line-height: 1.4; }
.dates-kind { display: block; color: var(--ink-3); font-size: var(--t-sm); }
.dates-note { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.5; }
.dates-note a { color: inherit; }

.room-gallery, .lineage, .study, .compare, .evidence { margin-top: clamp(48px, 7vw, 104px); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; align-items: start; }
.gallery-grid .art-frame { box-shadow: var(--shadow-art); width: min(100%, calc(60vh * var(--arn))); }
.gallery-grid figcaption { margin-top: 12px; display: grid; gap: 2px; }
.g-title { font-family: var(--serif); font-size: var(--t-lg); }
.g-meta { color: var(--ink-2); font-size: var(--t-sm); }

.lineage-lead { color: var(--ink-2); margin: -6px 0 18px; }
.line-strip {
  list-style: none; display: flex; gap: 0; overflow-x: auto; padding-bottom: 14px; margin-bottom: 36px;
  scrollbar-width: thin;
}
.line-strip li { flex: none; position: relative; padding-right: 34px; width: 184px; }
.ls-connection { display: block; min-height: 42px; width: 150px; color: var(--ink-2); font-size: var(--t-xs); line-height: 1.35; }
.line-strip li:not(:last-child)::after {
  content: ""; position: absolute; top: 74px; right: 6px; width: 22px; height: 1px; background: var(--ink-3);
}
.line-strip li:not(:last-child)::before {
  content: ""; position: absolute; top: 71px; right: 6px; width: 6px; height: 6px;
  border-top: 1px solid var(--ink-3); border-right: 1px solid var(--ink-3); transform: rotate(45deg);
}
.line-strip a { display: grid; gap: 6px; width: 112px; text-decoration: none; }
.line-strip .thumb { display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--ph); box-shadow: 0 0 0 3px var(--wall, var(--paper)), 0 0 0 4px var(--c); }
.line-strip .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.line-strip .thumb img.is-loaded { opacity: 1; }
.ls-name { font-family: var(--serif); font-size: var(--t-md); line-height: 1.2; margin-top: 6px; }
.ls-dates { font-size: var(--t-xs); color: var(--ink-3); }
.line-strip .is-current .ls-name { font-weight: 600; }
.line-strip .is-current .thumb { box-shadow: 0 0 0 3px var(--wall, var(--paper)), 0 0 0 5px var(--accent); }

.ego { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(16px, 3vw, 40px); align-items: center; margin-bottom: 28px; }
.ego-col ul { list-style: none; display: grid; gap: 10px; }
.ego-title { font-family: var(--sans); font-size: var(--t-sm); font-weight: 600; margin-bottom: 12px; color: var(--ink-2); }
.ego-item { display: grid; gap: 4px; }
.ego-rel { font-size: var(--t-xs); color: var(--ink-3); }
.ego-link { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--rule); background: var(--paper-2); text-decoration: none; }
.ego-link:hover { border-color: var(--ink-3); }
.ego-link .thumb { width: 44px; height: 44px; display: block; overflow: hidden; background: var(--ph); }
.ego-link .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.ego-link .thumb img.is-loaded { opacity: 1; }
.ego-name { display: block; font-family: var(--serif); font-size: var(--t-lg); line-height: 1.2; }
.ego-dates { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.ego-note { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.45; }
.ego-src { font-size: var(--t-xs); color: var(--ink-3); }
.ego-src a { color: inherit; }
.ego-item.st-unverified .ego-link { background: transparent; }
.cmp-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px 24px; max-width: 1000px; }
.evidence details { max-width: 880px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.evidence summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 16px 0; cursor: pointer; list-style: none; }
.evidence summary::-webkit-details-marker { display: none; }
.evidence summary::after { content: "+"; margin-left: auto; font-size: var(--t-xl); color: var(--ink-3); line-height: 1; }
.evidence details[open] summary::after { content: "−"; }
.evidence .section-title { margin: 0; }
.ev-count { color: var(--ink-3); font-size: var(--t-sm); }
.ev-list { list-style: none; padding-bottom: 8px; }
.ev-list li { padding: 12px 0; border-top: 1px solid var(--rule); display: grid; gap: 4px; }
.ev-claim { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.4; }
.ev-src { font-size: var(--t-sm); color: var(--ink-2); }
.ev-src a { color: inherit; }
.ev-note { font-size: var(--t-xs); color: var(--ink-3); line-height: 1.45; }
.study .lineage-lead { max-width: 880px; }
.ego-item.rel-reaction .ego-link { border-style: dashed; }
.ego-item.rel-revival .ego-link { border-style: dotted; border-width: 2px; }
.ego-center span {
  display: grid; place-items: center; width: clamp(120px, 14vw, 180px); aspect-ratio: 1; padding: 16px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-family: var(--serif); font-size: var(--t-xl); text-align: center; line-height: 1.15;
  overflow-wrap: break-word; hyphens: auto;
}

.links { list-style: none; border-top: 1px solid var(--rule); max-width: 880px; }
.links a {
  display: grid; grid-template-columns: 1fr auto 18px; gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.links a:hover .l-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.l-title { font-family: var(--serif); font-size: var(--t-xl); }
.l-src { color: var(--ink-3); font-size: var(--t-sm); white-space: nowrap; }
.links svg { width: 16px; height: 16px; color: var(--ink-3); align-self: center; }

.room-pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: clamp(56px, 8vw, 112px); padding-top: 22px; border-top: 1px solid var(--rule-strong); }
.room-pager a { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.room-pager a, .room-pager a > span { min-width: 0; }
.pager-next { justify-content: flex-end; text-align: right; }
.room-pager svg { width: 26px; height: 26px; flex: none; color: var(--ink-3); transition: transform 0.25s var(--ease); }
.pager-prev:hover svg { transform: translateX(-4px); }
.pager-next:hover svg { transform: translateX(4px); }
.pg-label { display: block; font-size: var(--t-xs); color: var(--ink-3); }
.pg-name { display: block; font-family: var(--serif); font-size: var(--t-2xl); line-height: 1.15; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .room-hang, .room-body { grid-template-columns: 1fr; }
  .wall-label { position: static; }
}
@media (max-width: 680px) {
  .ego { grid-template-columns: 1fr; }
  .ego-center { display: none; }
  .links a { grid-template-columns: 1fr 18px; }
  .l-src { grid-column: 1; white-space: normal; margin-top: -8px; }
  .links svg { grid-row: 1; grid-column: 2; }
  .room-text p { font-size: var(--t-lg); }
  .pg-name { font-size: var(--t-lg); }
}

/* =================== Хронология =================== */
.tl { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.tl > * { min-width: 0; }
.tl-spine { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; padding-top: clamp(28px, 5vw, 64px); }
.tl-spine ol { list-style: none; border-left: 1px solid var(--rule-strong); }
.tl-spine a {
  display: flex; align-items: center; gap: 10px; padding: 6px 0 6px 14px; margin-left: -1px;
  border-left: 3px solid transparent; text-decoration: none; color: var(--ink-3); font-size: var(--t-sm);
}
.tl-spine a:hover { color: var(--ink); }
.tl-spine a.is-active { border-left-color: var(--c); color: var(--ink); font-weight: 500; }
.sp-mark { width: 9px; height: 9px; border-radius: 2px; background: var(--c); flex: none; }

.tl-main { padding-top: clamp(28px, 5vw, 64px); padding-bottom: 60px; min-width: 0; }
.tl-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 1rem + 4vw, 5rem); letter-spacing: -0.03em; line-height: 1; }
.tl-lead { margin-top: 16px; font-family: var(--serif); font-size: var(--t-xl); color: var(--ink-2); max-width: 52ch; line-height: 1.5; }

.chapter { padding-top: clamp(56px, 8vw, 104px); scroll-margin-top: calc(var(--header-h) + 8px); }
.chapter-head { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: start; margin-bottom: 34px; }
.paint-chip { background: var(--paper-2); padding: 6px 6px 8px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 6px 16px -10px rgb(0 0 0 / 0.35); }
.paint { display: block; aspect-ratio: 1 / 1.05; background: var(--c); }
.paint-name { display: block; margin-top: 7px; font-size: 11px; line-height: 1.25; color: var(--ink-2); }
.chapter-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 1rem + 2.6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; }
.chapter-range { margin-top: 6px; color: var(--ink-3); }
.chapter-intro { margin-top: 14px; font-family: var(--serif); font-size: var(--t-lg); line-height: 1.6; max-width: 62ch; color: var(--ink-2); }
.chapter-empty { color: var(--ink-3); font-style: italic; font-family: var(--serif); }

.entries { list-style: none; border-top: 1px solid var(--rule); }
.entry { border-bottom: 1px solid var(--rule); padding: 20px 0; display: grid; gap: 8px; }
.entry-link { display: grid; grid-template-columns: clamp(130px, 18vw, 220px) minmax(0, 1fr); gap: clamp(16px, 2.6vw, 32px); text-decoration: none; align-items: start; }
.e-art .art-frame { transition: transform 0.35s var(--ease); }
.entry-link:hover .e-art .art-frame { transform: scale(1.015); }
.e-text { display: grid; gap: 2px; }
.e-dates { font-size: var(--t-sm); color: var(--ink-3); }
.e-name { font-family: var(--serif); font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem); line-height: 1.15; letter-spacing: -0.01em; margin-top: 2px; }
.entry-link:hover .e-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.e-orig { font-family: var(--serif); font-style: italic; color: var(--ink-3); }
.e-sum { margin-top: 8px; color: var(--ink-2); max-width: 60ch; line-height: 1.5; }
.e-from { padding-left: calc(clamp(130px, 18vw, 220px) + clamp(16px, 2.6vw, 32px)); font-size: var(--t-sm); color: var(--ink-3); }
.e-from a { color: var(--ink-2); }

@media (max-width: 860px) {
  .tl { grid-template-columns: 1fr; }
  .tl-spine {
    position: sticky; top: var(--header-h); z-index: 5; padding: 8px 0; margin: 0 calc(-1 * var(--gutter));
    background: color-mix(in oklab, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
  }
  .tl-spine ol { display: flex; overflow-x: auto; border-left: 0; padding: 0 var(--gutter); gap: 4px; scrollbar-width: none; }
  .tl-spine a { border-left: 0; border-bottom: 3px solid transparent; padding: 6px 10px; white-space: nowrap; }
  .tl-spine a.is-active { border-bottom-color: var(--c); }
  .chapter-head { grid-template-columns: 72px minmax(0, 1fr); }
  .entry-link { grid-template-columns: 110px minmax(0, 1fr); }
  .e-from { padding-left: 0; }
  .chapter { scroll-margin-top: calc(var(--header-h) + 56px); }
}

/* =================== Каталог =================== */
.cat-head { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.cat-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 1rem + 4vw, 5rem); letter-spacing: -0.03em; line-height: 1; }
.cat-count { color: var(--ink-3); }
.cat-filters {
  position: sticky; top: var(--header-h); z-index: 5; display: grid; gap: 12px;
  margin: 24px calc(-1 * var(--gutter)) 28px; padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.era-bar { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.era-seg { display: grid; gap: 5px; padding: 0; border: 0; background: none; text-align: left; color: var(--ink-3); font-size: 11px; min-width: 0; }
.seg-bar { height: 8px; background: color-mix(in oklab, var(--c) 34%, var(--paper)); border-radius: 2px; transition: background 0.2s; }
.era-seg:hover .seg-bar { background: color-mix(in oklab, var(--c) 65%, var(--paper)); }
.era-seg[aria-pressed="true"] .seg-bar { background: var(--c); }
.era-seg[aria-pressed="true"] { color: var(--ink); font-weight: 500; }
.seg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-row .reset { margin-left: auto; border-style: dashed; }

.cat-grid { display: flex; flex-wrap: wrap; gap: 26px 18px; }
.cat-grid::after { content: ""; flex-grow: 999999; }
.tile { flex: var(--ar) 1 calc(var(--ar) * 230px); display: grid; gap: 10px; text-decoration: none; min-width: 0; }
.tile .art-frame { width: 100%; transition: transform 0.35s var(--ease); }
.tile:hover .art-frame { transform: translateY(-3px); box-shadow: var(--shadow-art); }
.tile-cap { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.tile-cap .swatch { width: 8px; height: 8px; }
.tile-name { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-dates { grid-column: 2; font-size: var(--t-xs); color: var(--ink-3); }
.cat-empty { padding: 60px 0; text-align: center; color: var(--ink-2); display: grid; justify-items: center; gap: 16px; }

@media (max-width: 760px) {
  .tile { flex-basis: calc(var(--ar) * 150px); }
  .era-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 8px; }
  .cat-grid { gap: 18px 12px; }
}

/* =================== О проекте =================== */
.about { max-width: 900px; }
.about-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 1rem + 4vw, 5rem); letter-spacing: -0.03em; line-height: 1; }
.about-lead { margin-top: 18px; font-family: var(--serif); font-size: var(--t-2xl); line-height: 1.45; color: var(--ink-2); }
.about-sec { margin-top: 56px; }
.about-sec > p { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.65; max-width: var(--measure); }
.about-sec > p + p { margin-top: 0.9em; }
.legend { list-style: none; display: grid; gap: 14px; margin: 22px 0; }
.kind-list { list-style: none; display: grid; gap: 8px; margin: 16px 0; max-width: var(--measure); }
.kind-list strong { font-weight: 600; }
.e-from .st.st-verified::before { content: "✓"; }
.legend li { display: grid; grid-template-columns: 80px 1fr; gap: 18px; align-items: start; }
.legend svg { width: 80px; height: 14px; margin-top: 5px; color: var(--ink); }
.pigment-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 22px; }
.pigment-list li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; }
.pl-chip { grid-row: span 2; width: 34px; height: 44px; background: var(--c); border-radius: 2px; }
.pl-name { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.2; }
.pl-era { font-size: var(--t-sm); color: var(--ink-3); }
.res-group { margin: 26px 0 8px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.res-list { list-style: none; border-top: 1px solid var(--rule); }
.res-list li { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.res-list a { font-family: var(--serif); font-size: var(--t-lg); }
.res-list span { color: var(--ink-3); font-size: var(--t-sm); }
@media (max-width: 640px) { .res-list li { grid-template-columns: 1fr; gap: 2px; } }

.empty-page p { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Authored practices and their documented comparison corpus. */
.authorship, .room-corpus, .contexts { margin-block: clamp(36px, 5vw, 70px); }
.creator-list { list-style: none; padding: 0; }
.creator-list > li { margin-block: 16px; }
.admission { border-block: 1px solid var(--line, #d8d2c6); padding-block: 16px; }
.admission > summary { cursor: pointer; font-weight: 600; }
.admission dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.admission dt { font-weight: 600; margin-bottom: 6px; }
.admission dd { margin: 0; line-height: 1.65; }
.corpus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.corpus-work { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.corpus-work h3 { font-size: 1.1rem; line-height: 1.4; margin-block: 14px 8px; }
.corpus-work p { font-size: .92rem; line-height: 1.6; }
.context-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; }
@media (max-width: 760px) {
  .corpus-grid, .context-list, .admission dl { grid-template-columns: 1fr; }
}
.edge.context { stroke: var(--ink-3, #687b71); stroke-width: 1.4; stroke-dasharray: 9 3 1 3; fill: none; }
.map-svg .context-hit { stroke-width: 12; }
.mp-reference { padding: 22px 56px 20px 20px; background: var(--paper-3); }
.mp-reference p { margin: 0 0 8px; }
.mp-reference a { font-size: var(--t-sm); }
@media (max-width: 760px) {
  .map-toolbar .map-authors-switch { display: none; }
}
