/* DGC.Architects journal, REC issue.
   Language of a drawing sheet: light concrete paper, ink lines, mono annotations,
   large light headings, the model as the main image. Colour only in small accents.
   Grid: 12 columns >= 1024px, 8 columns 768-1023px, 4 columns < 768px. */

:root {
  --dgc-blue: #44596E;
  --paper: #EFEEEA;
  --surface: #F7F6F3;
  --stage: #E3E2DD;
  --ink: #1B1B19;
  --ink-2: #44443F;
  --ink-3: #6A6963;
  --rule: #CBC9C2;
  --rule-2: #A9A7A0;
  --accent: #8C2D3E;
  --gap: 24px;
  --pad: clamp(16px, 3.2vw, 48px);
  --head-h: 56px;
  --page: #EFEEEA;   /* the page itself (body), also under themed articles */
  --f-sans: "IBM Plex Sans", "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-mark: "Dela Gothic One", "IBM Plex Sans", sans-serif;
  --t-ui: 180ms;
  --t-in: 520ms;
  --t-focus: 800ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
/* no zoom and no sideways wobble: one-finger vertical scrolling only (the 3D canvas keeps its own gestures) */
html { overflow-x: clip; overscroll-behavior-x: none; touch-action: pan-y; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 24px); }
body { touch-action: pan-y; overscroll-behavior-x: none; margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.62 var(--f-sans); overflow-x: clip; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--dgc-blue); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.mono { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; letter-spacing: .02em; }
.small { font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.wrap { width: 100%; max-width: 1520px; margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }
.ext { margin-left: 4px; font-size: .85em; }

/* ---------- Header: DGC shell ---------- */
.site-head { position: sticky; top: 0; z-index: 40; background: rgba(239, 238, 234, .96); border-bottom: 1px solid var(--ink); }
.head-row { display: flex; align-items: center; gap: 20px; height: var(--head-h); }
.logo { display: inline-flex; align-items: baseline; text-decoration: none; font: 600 16px/1 var(--f-sans); letter-spacing: .01em; white-space: nowrap; }
.logo-dgc { color: var(--dgc-blue); }
.logo-rest { color: var(--ink); font-weight: 400; }
.site-nav { margin-left: auto; display: flex; gap: 0; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font: 400 13px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--dgc-blue); box-shadow: inset 0 -2px 0 var(--dgc-blue); }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 12px; background: none; border: 0; font: 400 13px var(--f-mono); text-transform: uppercase; }
.menu-lines, .menu-lines::before { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; }
.menu-lines::before { content: ""; position: absolute; top: 6px; }
.menu-lines { transform: translateY(-3px); }
.chapter-now { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; max-width: min(46vw, 520px); padding: 0 12px; background: transparent; border: 1px solid var(--ink); font: 400 12.5px var(--f-mono); color: var(--ink); }
.chapter-now .num { color: var(--accent); font-weight: 500; }
.chapter-now-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-sans); font-size: 14px; }
.chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: none; transition: transform var(--t-ui); }
.chapter-now[aria-expanded="true"] .chev { transform: rotate(225deg); }
.toc-panel { border-top: 1px solid var(--rule); background: var(--surface); max-height: calc(100dvh - var(--head-h)); overflow: auto; }
.toc-panel .wrap { padding-block: 16px 24px; }
.toc { list-style: none; margin: 8px 0 0; padding: 0; columns: 2; column-gap: 48px; }
.toc li { break-inside: avoid; }
.toc-item { display: grid; grid-template-columns: 44px 1fr; gap: 8px; min-height: 44px; align-items: center; text-decoration: none; font-size: 16px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.toc-item .num { font-family: var(--f-mono); font-size: 13px; color: var(--ink-3); }
.toc-item.is-active { color: var(--ink); }
.toc-item.is-active .num { color: var(--accent); }
.read-progress { height: 2px; }
.read-progress span { display: block; height: 2px; width: 0; background: var(--accent); }
.tool-label { display: block; margin: 0 0 8px; font: 400 12px/1.4 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 899px) {
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--ink); padding: 8px var(--pad) 16px; display: none; }
  .site-nav.is-open { display: flex; }
  .nav-link { border-bottom: 1px solid var(--rule); font-size: 14px; }
  .nav-link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--dgc-blue); padding-left: 16px; }
  .menu-btn { display: inline-flex; }
  .chapter-now { margin-left: auto; max-width: calc(100vw - 210px); }
  .toc { columns: 1; }
}
@media (max-width: 479px) { .menu-label { display: none; } .head-row { gap: 10px; } .chapter-now { max-width: calc(100vw - 220px); } .logo { font-size: 15px; } }

/* ---------- Views ---------- */
.js .view { display: none; }
.js .view.is-active { display: block; }
.view-journal, .view-article { padding-bottom: 96px; }

/* ---------- Controls (square corners, ink lines) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: 500 15px var(--f-sans); text-decoration: none; white-space: nowrap; transition: background var(--t-ui), color var(--t-ui); }
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #33332f; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ink); background: var(--surface); }
.link-btn { min-height: 44px; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); color: var(--ink-2); }
.link-btn:hover { color: var(--ink); text-decoration-color: var(--accent); }
.i-play { width: 0; height: 0; border-left: 11px solid var(--ink); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
[aria-pressed="true"] > .i-play { width: 10px; height: 13px; border: 0; margin: 0; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }
.i-expand { width: 14px; height: 14px; border: 1.5px solid var(--ink); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ink); background: var(--surface); }
.seg > button { min-height: 42px; padding: 0 14px; border: 0; border-right: 1px solid var(--rule); background: transparent; font: 400 13px var(--f-mono); color: var(--ink-2); transition: background var(--t-ui), color var(--t-ui); }
.seg > button:last-child { border-right: 0; }
.seg > button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg > button:disabled { opacity: .45; cursor: default; }
.seg-3, .seg-4 { display: grid; width: 100%; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-4 { grid-template-columns: repeat(4, 1fr); }
.seg-3 > button, .seg-4 > button { padding: 0 4px; }
select { width: 100%; min-height: 44px; padding: 0 36px 0 12px; border: 1px solid var(--ink); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231B1B19' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-size: 14px; border-radius: 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; --p: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--rule-2) var(--p)); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--rule-2); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border: 2px solid var(--ink); background: var(--surface); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface); }
.range-label { display: flex; justify-content: space-between; font: 400 12.5px var(--f-mono); color: var(--ink-2); }

/* ---------- Article hero: the cover ---------- */
.hero { padding-top: 16px; }
.hero-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--ink); color: var(--ink-2); text-transform: uppercase; }
.hero-title { margin: 0; position: relative; }
.rec-mark { font-family: var(--f-mark); font-weight: 400; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.rec-dot { color: var(--accent); }
/* The REC dot stays in front of the building on the cover. */
/* the dot sits behind the building, like the letters, and peeks out from under the roof */
.hero-title .rec-mark { display: block; font-size: clamp(110px, 27.5vw, 430px); line-height: .78; margin: clamp(12px, 2vw, 28px) 0 0 -.04em; }
.hero-rest { display: block; margin-top: clamp(12px, 1.6vw, 24px); font: 300 clamp(34px, 5.2vw, 84px)/1 var(--f-sans); letter-spacing: -.035em; max-width: 14ch; }
.hero-fig { position: relative; z-index: 2; margin: clamp(10px, 1.6vw, 26px) calc(-1 * var(--pad)) 0; }
.hero-fig img { width: 100%; }
.hero-fig figcaption { padding: 6px var(--pad) 0; color: var(--ink-3); }
.axes { margin: 18px 0 0; }
.axes svg { width: 100%; height: 64px; overflow: visible; }
.axes line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.axes circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.axes .ax-n { font: 400 9.5px var(--f-mono); fill: var(--ink); text-anchor: middle; }
.axes .ax-d { font: 400 8px var(--f-mono); fill: var(--ink-3); text-anchor: middle; }
.axes figcaption { display: flex; justify-content: space-between; color: var(--ink-3); margin-top: 6px; }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; padding: 40px 0 8px; }
.hero-sub { grid-column: 1 / 6; margin: 0; font: 300 clamp(24px, 2.3vw, 34px)/1.2 var(--f-sans); letter-spacing: -.015em; }
.hero-actions { grid-column: 1 / 6; display: flex; flex-wrap: wrap; gap: 12px; }
.stamp { grid-column: 7 / 13; grid-row: 1 / 3; display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.stamp > div { padding: 8px 10px 10px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stamp dt { font-size: 11px; text-transform: uppercase; color: var(--ink-3); letter-spacing: .05em; }
.stamp dd { margin: 2px 0 0; font-family: var(--f-sans); font-size: 15px; letter-spacing: 0; }
.status-strip { margin: 32px 0 0; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-2); }
.status-strip strong { color: var(--accent); font-weight: 500; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 16px 0 0; font: 400 12.5px var(--f-mono); text-transform: uppercase; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
@media (max-width: 1023px) {
  .hero-title { display: flex; flex-direction: column; }
  .hero-rest { order: -1; margin: clamp(10px, 2vw, 18px) 0 0; font-size: clamp(18px, 3vw, 26px); line-height: 1.15; max-width: none; }
  .hero-grid { grid-template-columns: repeat(8, 1fr); }
  .hero-sub, .hero-actions { grid-column: 1 / 9; }
  .stamp { grid-column: 1 / 9; grid-row: auto; }
}
@media (max-width: 767px) {
  .hero-title .rec-mark { font-size: 31vw; }
  .hero-rest { font-size: 19px; }
  .hero-fig { margin-top: 14px; }
  .axes svg { height: 54px; }
  .axes .ax-d { display: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .stamp dd { font-size: 14px; }
}

/* ---------- Chapters ---------- */
.chapter { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding: 120px 0 0; }
.chapter-head { grid-column: 1 / 13; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; padding-top: 12px; border-top: 1px solid var(--ink); margin-bottom: 40px; }
.chapter-no { grid-column: 1 / 3; align-self: start; font: 400 13px var(--f-mono); color: var(--ink-3); letter-spacing: .04em; }
.chapter-no::before { content: "Глава "; }
.chapter.is-current .chapter-no { color: var(--accent); }
.chapter-title { grid-column: 3 / 12; margin: 0; font: 300 clamp(38px, 5vw, 80px)/1.0 var(--f-sans); letter-spacing: -.035em; text-wrap: balance; max-width: 18ch; }
.chapter-body { grid-column: 3 / 13; min-width: 0; }
.chapter--cont { padding-top: 64px; }
.chapter--cont .chapter-head { display: none; }
.chapter-body > p, .chapter-body > .lead, .chapter-body > blockquote, .chapter-body > .note, .chapter-body > h3, .chapter-body > .source-line { max-width: 66ch; }
.chapter-body > p { margin: 0 0 18px; }
.lead { font: 300 clamp(21px, 1.75vw, 26px)/1.42 var(--f-sans); letter-spacing: -.01em; margin: 0 0 24px; max-width: 46ch !important; }
.sub-title { margin: 72px 0 16px; font: 300 clamp(28px, 2.6vw, 40px)/1.1 var(--f-sans); letter-spacing: -.025em; }
.block-title { margin: 0 0 14px; font: 500 18px/1.3 var(--f-sans); }
.source-line { margin: 16px 0 0; font: 400 12.5px/1.6 var(--f-mono); color: var(--ink-3); }
.interactive-q { margin: 0 0 16px; font: 400 12.5px/1.5 var(--f-mono); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); }
.interactive-q::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; vertical-align: 1px; background: var(--accent); }
@media (max-width: 1023px) {
  .chapter { grid-template-columns: repeat(8, 1fr); padding-top: 88px; }
  .chapter-head { grid-template-columns: repeat(8, 1fr); grid-column: 1 / 9; }
  .chapter-no { grid-column: 1 / 9; }
  .chapter-title { grid-column: 1 / 9; }
  .chapter-body { grid-column: 1 / 9; }
}
@media (max-width: 767px) {
  .chapter { padding-top: 64px; gap: 16px; }
  .chapter-head { margin-bottom: 20px; gap: 10px; }
  .chapter-title { font-size: 38px; }
}

/* Figures */
.art-body { counter-reset: fig 1; }
.fig { margin: 32px 0; }
.fig figcaption, .node figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-3); max-width: 80ch; }
.art-body .fig > figcaption::before { counter-increment: fig; content: "Рис. " counter(fig) ". "; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink); }
.fig img { width: 100%; background: var(--stage); }
.fig-bleed { margin-top: 48px; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 36px 0 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.facts > div { padding: 12px 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts dt { font: 400 11.5px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 6px 0 0; font: 300 22px/1.2 var(--f-sans); letter-spacing: -.01em; }
.dd-note { display: block; font: 400 12px var(--f-mono); color: var(--ink-3); margin-top: 4px; }
@media (max-width: 767px) { .facts { grid-template-columns: 1fr 1fr; } .facts dd { font-size: 18px; } }

.note { margin: 32px 0 0; padding: 18px 0 0; border-top: 1px solid var(--rule); font-size: 15.5px; color: var(--ink-2); }
.note p { margin: 0; }
.ref { display: inline-block; padding: 0 4px; font: 500 11.5px/1.5 var(--f-mono); text-decoration: none; color: var(--ink-2); border: 1px solid var(--rule-2); vertical-align: 1px; }
.ref:hover { border-color: var(--ink); color: var(--ink); }

/* Timeline */
.timeline { margin: 44px 0 0; }
.timeline-scale { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0; position: relative; }
.timeline-scale::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 1px; background: var(--ink); }
.timeline-scale button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-height: 64px; padding: 16px 0 0; border: 0; background: none; font: 400 15px var(--f-mono); color: var(--ink-3); text-align: left; }
.timeline-scale button::before { content: ""; width: 12px; height: 12px; border: 1.5px solid var(--ink); background: var(--paper); }
.timeline-scale button[aria-selected="true"] { color: var(--ink); }
.timeline-scale button[aria-selected="true"]::before { background: var(--accent); border-color: var(--accent); }
.timeline-cards { margin-top: 16px; }
.tl-card { padding: 20px 0 0; border-top: 1px solid var(--rule); max-width: 64ch; }
.tl-card h3 { margin: 0 0 8px; font: 300 30px/1.1 var(--f-sans); letter-spacing: -.02em; }
.tl-card p { margin: 0 0 8px; }
.tl-src { font: 400 12.5px var(--f-mono); color: var(--ink-3); }
html:not(.js) .tl-card { margin-bottom: 16px; }
@media (max-width: 767px) {
  .timeline { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
  .timeline .interactive-q { grid-column: 1 / 3; }
  .timeline-scale { grid-template-columns: 1fr; align-content: start; }
  .timeline-scale::before { left: 5px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .timeline-scale button { flex-direction: row; align-items: center; min-height: 48px; padding: 0; gap: 12px; }
  .timeline-cards { margin-top: 0; }
  .tl-card { border-top: 0; padding-top: 8px; }
}

/* Tabs */
.tabs { margin: 36px 0 0; }
.tab-list { display: flex; border-bottom: 1px solid var(--ink); }
.tab-list button { min-height: 48px; padding: 0 24px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; font: 400 16px var(--f-mono); color: var(--ink-3); }
.tab-list button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab-panel { padding: 20px 0 0; max-width: 64ch; }
.tab-panel h3 { margin: 0 0 8px; font: 300 26px/1.15 var(--f-sans); letter-spacing: -.015em; }
.tab-panel p { margin: 0 0 8px; }

/* Strategies */
.strategies { display: grid; grid-template-columns: repeat(3, 1fr); margin: 36px 0 0; border-top: 1px solid var(--ink); }
.strategy { padding: 18px 24px 24px 0; }
.strategy + .strategy { padding-left: 24px; border-left: 1px solid var(--rule); }
.strategy h3 { margin: 0 0 14px; font: 300 26px/1.1 var(--f-sans); letter-spacing: -.02em; }
.strategy dl { margin: 0; }
.strategy dt { margin-top: 14px; font: 400 11.5px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.strategy dd { margin: 4px 0 0; font-size: 15.5px; line-height: 1.5; }
.strategy--rec { background: var(--surface); padding-right: 24px; }
.strategy--rec h3::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; background: var(--accent); vertical-align: 4px; }
.strategy-mark { margin: 16px 0 0; font: 400 12.5px var(--f-mono); color: var(--accent); text-transform: uppercase; }
@media (max-width: 899px) {
  .strategies { grid-template-columns: 1fr; }
  .strategy, .strategy + .strategy { padding: 20px 16px; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* Cases */
.cases { margin: 36px 0 0; }
.case-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.case-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 68px; padding: 14px 16px 14px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; text-align: left; font: 300 26px/1.1 var(--f-sans); letter-spacing: -.02em; color: var(--ink-3); }
.case-list button span { font: 400 12px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; }
.case-list button[aria-selected="true"] { color: var(--ink); border-bottom: 3px solid var(--accent); }
.case { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; padding: 32px 0 0; }
.case-scheme { margin: 0; }
.case-scheme svg { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--ink); }
.case-scheme figcaption { margin-top: 8px; font: 400 12.5px var(--f-mono); color: var(--ink-3); }
.case-text h3 { margin: 0; font: 300 30px/1.1 var(--f-sans); letter-spacing: -.02em; }
.case-meta { margin: 6px 0 12px; font: 400 12.5px var(--f-mono); color: var(--ink-3); }
.case-text dl { margin: 0; }
.case-text dt { margin-top: 14px; font: 400 11.5px var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.case-text dd { margin: 4px 0 0; font-size: 15.5px; }
.sc-keep, .sc-keep-g rect { fill: url(#sc-hatch); stroke: var(--ink); stroke-width: 1.5; }
.sc-add { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.sc-add-lines line { stroke: var(--ink); stroke-width: 1; }
.sc-diy rect { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 3; }
.sc-ghost { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 5 4; }
.sc-t { font: 400 10px var(--f-mono); fill: var(--ink-2); text-anchor: middle; }
.cases .case:not([hidden]) .case-scheme svg { animation: draw-in var(--t-in) var(--ease); }
@keyframes draw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) { .case-list { grid-template-columns: 1fr; } .case { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Story: the model carries the chapter ---------- */
.story { position: relative; margin: 72px calc(50% - 50vw) 0; }
.story-pin { position: sticky; top: var(--head-h); height: calc(100svh - var(--head-h)); }
.story-stage { position: relative; height: 100%; background: var(--stage); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; }
.story-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4vh 4vw; transition: opacity var(--t-in); }
.story-stage.is-live .story-img { opacity: 0 !important; }
.story-host { position: absolute; inset: 0; }
.story-host canvas { width: 100% !important; height: 100% !important; display: block; }
.story-hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 16px; padding: 12px var(--pad); color: var(--ink-2); pointer-events: none; }
.story-rail { position: absolute; left: var(--pad); right: var(--pad); bottom: 22px; height: 1px; background: var(--rule-2); --k: 0; }
.story-rail span { position: absolute; left: 0; top: -1px; height: 3px; width: calc(var(--k) * 100%); background: var(--accent); transition: width var(--t-ui); }
.story-note { position: absolute; right: var(--pad); bottom: 30px; margin: 0; color: var(--ink-3); }
.story-steps { position: relative; margin-top: calc(-1 * (100svh - var(--head-h))); pointer-events: none; }
.story-step { min-height: 95svh; display: flex; align-items: center; padding: 0 var(--pad); }
.story-step:first-child { min-height: calc(100svh - var(--head-h)); }
.story-card { pointer-events: auto; width: min(400px, 92vw); padding: 20px 22px 22px; background: rgba(247, 246, 243, .95); border: 1px solid var(--ink); opacity: .55; transition: opacity var(--t-in); }
.story-step.is-active .story-card { opacity: 1; }
.story-no { display: flex; justify-content: space-between; margin: 0 0 12px; color: var(--ink-3); text-transform: uppercase; }
.story-no span:first-child { color: var(--accent); }
.story-card h3 { margin: 0 0 10px; font: 300 32px/1.05 var(--f-sans); letter-spacing: -.025em; }
.story-card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 899px) {
  .story-step { align-items: flex-end; padding-bottom: 64px; min-height: 100svh; }
  .story-card { width: 100%; padding: 14px 16px 16px; }
  .story-card h3 { font-size: 26px; }
  .story-card p { font-size: 15px; }
  .story-note { display: none; }
  .story-hud .hud-r { max-width: 55%; text-align: right; }
}

/* Transform (AR6 sheet) */
.transform { margin: 0; }
.tr-stage-buttons { display: flex; flex-wrap: wrap; border: 1px solid var(--ink); background: var(--surface); margin-bottom: 16px; width: fit-content; max-width: 100%; }
.tr-stage-buttons button { min-height: 42px; padding: 0 14px; border: 0; border-right: 1px solid var(--rule); background: transparent; font: 400 12.5px var(--f-mono); color: var(--ink-2); }
.tr-stage-buttons button:last-child { border-right: 0; }
.tr-stage-buttons button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tr-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; align-items: start; }
.tr-figure { margin: 0; }
.tr-svg-wrap { background: var(--surface); border: 1px solid var(--ink); }
.tr-svg { width: 100%; height: auto; }
.tr-layer { transition: opacity var(--t-in) var(--ease); }
.tr-keep-tint { opacity: 0; transition: opacity var(--t-in) var(--ease); }
.tr-openings rect { fill: var(--accent); fill-opacity: .28; stroke: var(--accent); stroke-width: 5; }
.tr-add-outline { fill: none; stroke: var(--ink); stroke-width: 6; stroke-dasharray: 22 12; }
.tr-lift-path { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 10 10; }
.tr-cab { fill: var(--accent); fill-opacity: .9; transition: transform var(--t-focus) var(--ease); }
.tr-ground-line { stroke: var(--ink); stroke-width: 5; }
.tr-yard-line { stroke: var(--ink); stroke-width: 10; }
.tr-side { display: flex; flex-direction: column; gap: 20px; }
.tr-readout { border-top: 1px solid var(--ink); padding-top: 12px; min-height: 172px; }
.tr-pct { margin: 0; font: 400 13px var(--f-mono); color: var(--accent); }
.tr-readout h3 { margin: 4px 0 8px; font: 300 26px/1.15 var(--f-sans); letter-spacing: -.015em; }
.tr-readout p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.tr-range-row { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.legend li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.lg { width: 28px; height: 16px; margin-top: 2px; border: 1.5px solid var(--ink); }
.lg-keep { background: repeating-linear-gradient(45deg, rgba(27,27,25,.45) 0 1.5px, transparent 1.5px 6px), rgba(27,27,25,.05); }
.lg-open { background: rgba(140, 45, 62, .28); border-color: var(--accent); }
.lg-add { background: var(--surface); border-style: dashed; border-width: 2px; }
.lg-ground { background: repeating-linear-gradient(-45deg, rgba(27,27,25,.35) 0 1.5px, transparent 1.5px 6px); border-width: 0 0 2px 0; }
.lg-core { background: #6b6961; }
.lg-slab { background: #c7c5bd; }
.lg-cab { background: var(--accent); border-color: var(--accent); }
.tr-photo { margin: 0; }
.tr-photo img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; background: var(--stage); transition: opacity var(--t-in); }
.tr-photo figcaption { margin-top: 8px; font: 400 12px var(--f-mono); color: var(--ink-3); }
@media (max-width: 1100px) { .tr-grid { grid-template-columns: minmax(0, 1fr); } .tr-readout { min-height: 0; } .tr-photo { display: none; } }
@media (max-width: 767px) {
  .tr-stage-buttons { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .tr-stage-buttons button { border-bottom: 1px solid var(--rule); }
  .tr-stage-buttons button:last-child { grid-column: 1 / 3; }
  .tr-svg-wrap { margin-inline: calc(-1 * var(--pad)); border-inline: 0; }
}

/* ---------- Node sheet (Blender) ---------- */
.sheet { display: grid; grid-template-columns: repeat(10, 1fr); gap: 32px var(--gap); margin-top: 40px; }
.node { margin: 0; grid-column: span 5; }
.node--xl { grid-column: 1 / 7; grid-row: span 2; }
.node--tall { grid-column: 7 / 11; grid-row: span 2; }
.node--wide { grid-column: 1 / -1; }
.node-img { display: block; width: 100%; padding: 0; border: 1px solid var(--ink); background: var(--stage); cursor: zoom-in; overflow: hidden; }
.node-img img { width: 100%; transition: transform var(--t-focus) var(--ease); }
.node-img:hover img { transform: scale(1.025); }
.node figcaption { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.node figcaption strong { font-weight: 500; color: var(--ink); }
.node-tag { display: inline-block; margin-right: 10px; padding: 1px 6px; border: 1px solid var(--ink); color: var(--ink); font-size: 12px; }
.parts { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 32px; align-items: end; margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--ink); }
.parts-fig { margin: 0; }
.parts-fig video { width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--stage); border: 1px solid var(--ink); object-fit: cover; }
.parts-fig figcaption { margin-top: 8px; color: var(--ink-3); }
.parts-text p { margin: 0 0 16px; color: var(--ink-2); }
.parts-text .legend { margin-bottom: 16px; }
@media (max-width: 1023px) {
  .sheet { grid-template-columns: 1fr 1fr; }
  .node, .node--xl, .node--tall { grid-column: span 1; grid-row: auto; }
  .node--xl, .node--wide { grid-column: 1 / -1; }
  .parts { grid-template-columns: 1fr; }
}
@media (max-width: 767px) { .sheet { grid-template-columns: 1fr; } .node, .node--tall { grid-column: 1 / -1; } }

/* ---------- Explorer (tool) ---------- */
.viewer { margin-top: 88px; padding-top: 14px; border-top: 1px solid var(--ink); }
.viewer-head { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.viewer-head .block-title { margin: 0; font: 300 clamp(28px, 2.6vw, 40px)/1.1 var(--f-sans); letter-spacing: -.025em; }
.viewer-head p { margin: 0; }
.viewer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 1px solid var(--ink); background: var(--surface); }
.canvas-wrap { position: relative; min-height: 600px; background: var(--stage); overflow: hidden; }
#canvas, #canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer-cover { position: absolute; inset: 0; display: grid; }
.viewer-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-panel { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px; background: rgba(247,246,243,.96); border: 1px solid var(--ink); max-width: 560px; }
.cover-panel p { margin: 0; flex: 1 1 220px; }
.viewer-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 0 12px; pointer-events: none; }
.viewer-top > * { pointer-events: auto; }
#view-label { padding: 4px 8px; background: rgba(247,246,243,.94); font: 400 12px var(--f-mono); }
.viewer-bottom { position: absolute; left: 12px; bottom: 10px; pointer-events: none; }
.viewer-bottom span { padding: 3px 8px; background: rgba(247,246,243,.9); }
.canvas-wrap.is-expanded { position: fixed; inset: 0; z-index: 80; min-height: 0; }
.touch-lock { position: absolute; inset: 0; display: grid; place-items: end center; padding-bottom: 56px; background: transparent; border: 0; }
.touch-lock span { padding: 10px 16px; background: rgba(247,246,243,.96); border: 1px solid var(--ink); font-size: 14px; }
#room-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.room-tag { position: absolute; transform: translate(-50%, -50%); padding: 2px 6px; background: rgba(247,246,243,.94); font: 500 11px var(--f-mono); white-space: nowrap; }
.room-tag.room { font-weight: 400; color: var(--ink-2); }
.tools { border-left: 1px solid var(--ink); }
.tools-toggle { display: none; }
.tools-body { padding: 16px; display: grid; gap: 20px; max-height: 760px; overflow: auto; }
.tool-group { min-width: 0; }
.tool-group .tool-label + select { margin-bottom: 12px; }
.tool-note { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.tool-more summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; font: 400 12.5px var(--f-mono); text-transform: uppercase; cursor: pointer; border-top: 1px solid var(--rule); }
.tool-more summary::-webkit-details-marker { display: none; }
.tool-more summary::after { content: "+"; font-size: 18px; }
.tool-more[open] summary::after { content: "−"; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.slice-scale { position: relative; height: 6px; margin: 6px 0 -6px; background: repeating-linear-gradient(to right, var(--rule-2) 0 1px, transparent 1px 10%); }
.slice-tick { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--accent); left: 50%; transition: left var(--t-ui); }
#flip { margin-top: 8px; }
.legend-3d { padding-top: 12px; border-top: 1px solid var(--rule); font-size: 13px; }
@media (max-width: 1023px) {
  .viewer-layout { grid-template-columns: 1fr; }
  .canvas-wrap { min-height: 0; aspect-ratio: 4 / 3; }
  .tools { border-left: 0; border-top: 1px solid var(--ink); }
  .tools-toggle { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: space-between; padding: 0 16px; border: 0; background: var(--surface); font: 400 13px var(--f-mono); text-transform: uppercase; }
  .tools-toggle::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-135deg); transition: transform var(--t-ui); }
  .tools-toggle[aria-expanded="false"]::after { transform: rotate(45deg); }
  .tools-toggle[aria-expanded="false"] + .tools-body { display: none; }
  .tools-body { max-height: none; padding-top: 4px; }
}
@media (max-width: 767px) {
  .viewer-layout { border-inline: 0; margin-inline: calc(-1 * var(--pad)); }
  .canvas-wrap { aspect-ratio: 4 / 5; }
  .cover-panel { left: 12px; right: 12px; bottom: 12px; }
}

/* ---------- Plans ---------- */
.plans { margin: 36px 0 0; }
.plans-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 16px; }
.plan-layers { display: flex; gap: 16px; }
.plans-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: 32px; align-items: start; }
.plan-figure { margin: 0; }
.plan-stage { position: relative; background: #fff; border: 1px solid var(--ink); }
.plan-stage-inner { position: relative; }
.plan-stage img { width: 100%; background: #fff; }
.plan-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan-svg rect { fill: transparent; stroke: none; }
.apt-hit { fill: transparent; cursor: pointer; }
.plan-svg .apt.is-sel rect.r { fill: rgba(140, 45, 62, .2); stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.plan-svg .apt:hover rect.r { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plan-svg.no-apts .apt rect.r { stroke: none !important; }
.plan-tags { position: absolute; inset: 0; pointer-events: none; }
.plan-tag { position: absolute; transform: translate(-50%, -50%); padding: 1px 5px; background: rgba(255,255,255,.92); font: 400 10.5px var(--f-mono); white-space: nowrap; color: var(--ink-2); }
.plan-tag.common { color: var(--ink); border: 1px solid var(--ink); }
.plan-model .plan-svg, .plan-model .plan-tags { display: none; }
.plan-model img { background: var(--stage); }
.plan-side { display: grid; gap: 20px; }
.apt-card { border-top: 1px solid var(--ink); padding-top: 12px; min-height: 160px; }
.apt-card h3 { margin: 0 0 4px; font: 300 34px/1 var(--f-sans); letter-spacing: -.02em; }
.apt-card .apt-area { margin: 6px 0 12px; font-size: 14.5px; color: var(--ink-2); }
.apt-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.apt-card li { padding: 2px 8px; border: 1px solid var(--rule-2); font: 400 12px var(--f-mono); }
.apt-card .apt-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.ground-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ground-table caption { text-align: left; margin-bottom: 8px; }
.ground-table th { text-align: left; font: 400 11.5px var(--f-mono); text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--ink); padding: 6px 8px 6px 0; }
.ground-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ground-table .num { text-align: right; white-space: nowrap; font-family: var(--f-mono); font-size: 13px; }
.split-note { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--ink); max-width: 72ch; }
.split-note p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.audit-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 12px 0 8px; }
.interior-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.interior-grid .fig { margin: 0; }
.interior-grid .ig-wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .plans-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .plan-stage { margin-inline: calc(-1 * var(--pad)); border-inline: 0; overflow-x: auto; }
  .plan-stage-inner { width: 760px; }
  .plan-stage::after { content: "Прокрутите план вбок"; display: block; padding: 6px var(--pad); font: 400 12px var(--f-mono); color: var(--ink-3); position: sticky; left: 0; }
  .interior-grid { grid-template-columns: 1fr; }
}

/* Lift */
.lift { margin: 36px 0 0; }
.lift-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.lift-figure { margin: 0; }
.lift-svg { width: 100%; max-height: 640px; background: var(--surface); border: 1px solid var(--ink); }
.lift-shaft-hl { fill: rgba(140, 45, 62, .07); stroke: var(--accent); stroke-width: 4; }
.lift-stops { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--ink); }
.lift-stops button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 0 12px 0 0; border: 0; border-bottom: 1px solid var(--rule); background: none; font-size: 16px; text-align: left; }
.lift-stops button .num { font-family: var(--f-mono); color: var(--ink-3); font-size: 13px; }
.lift-stops button[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; font-weight: 500; }
.lift-side p { margin: 0 0 10px; }
@media (max-width: 767px) { .lift-grid { grid-template-columns: 1fr 1.2fr; gap: 16px; } .lift-stops button { font-size: 14.5px; } }

/* Roof, seasons, routes */
.roof-pair, .yard-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.yard-pair { grid-template-columns: 3fr 2fr; margin-top: 40px; align-items: start; }
.roof-pair .fig { margin: 16px 0 0; }
.yard-pair .fig { margin: 0; }
.zoomable { display: block; width: 100%; padding: 0; border: 1px solid var(--ink); background: #fff; cursor: zoom-in; }
.seasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; border-top: 1px solid var(--ink); padding-top: 16px; }
.seasons h4 { margin: 0 0 6px; font: 400 12.5px var(--f-mono); text-transform: uppercase; }
.seasons p { margin: 0; font-size: 15px; color: var(--ink-2); }
.routes { margin: 36px 0 0; }
.routes .seg { margin-bottom: 16px; }
.route-figure { margin: 0; }
.route-stage { position: relative; border: 1px solid var(--ink); }
.route-stage img { width: 100%; }
.route-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.route path { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 10; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff); }
.route[data-r="car"] path { stroke-dasharray: 14 8; stroke-linecap: butt; }
.route circle { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.route .route-poi { fill: var(--accent); stroke: var(--surface); }
.route { opacity: 0; transition: opacity var(--t-in); }
.route.is-on { opacity: 1; }
.route.is-on path { animation: dash-run 1.2s linear 1; }
@keyframes dash-run { from { stroke-dashoffset: 66; } to { stroke-dashoffset: 0; } }
.route-text { margin: 16px 0 0; max-width: 66ch; }
@media (max-width: 767px) { .roof-pair, .seasons, .yard-pair { grid-template-columns: 1fr; } }

/* Ending */
.pull { margin: 0 0 32px; padding: 28px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); max-width: none !important; }
.pull p { margin: 0; font: 300 clamp(28px, 3vw, 46px)/1.18 var(--f-sans); letter-spacing: -.025em; max-width: 30ch; }
.status-box { margin: 32px 0 0; padding: 20px; background: var(--surface); border: 1px solid var(--ink); max-width: 68ch; }
.status-box p { margin: 0; font-size: 15.5px; color: var(--ink-2); }
.film video { width: 100%; height: auto; background: var(--stage); aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--ink); }
.materials { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.material { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left; font: 400 12px var(--f-mono); text-transform: uppercase; cursor: zoom-in; }
.material img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: #fff; border: 1px solid var(--ink); }
@media (max-width: 1023px) { .materials { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .materials { grid-template-columns: 1fr 1fr; } }
.sources { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); margin-top: 120px; padding-top: 12px; border-top: 1px solid var(--ink); }
.sources-title { grid-column: 1 / 3; margin: 0; font: 400 13px var(--f-mono); text-transform: uppercase; color: var(--ink-3); }
.src-list { grid-column: 3 / 13; list-style: none; margin: 0; padding: 0; }
.src-list li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; line-height: 1.5; }
.src-list li:target, .src-list li.is-flash { background: rgba(140, 45, 62, .06); }
.src-list p { margin: 0; }
.src-id { font: 500 13px var(--f-mono); color: var(--ink); }
.src-pub { color: var(--ink-3); }
.src-note { color: var(--ink-3); font-size: 13.5px; margin-top: 4px !important; }
.art-end { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px var(--gap); margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--ink); }
.art-end-author { grid-column: 1 / 5; }
.art-end-name { margin: 0; font: 300 30px/1.1 var(--f-sans); letter-spacing: -.02em; }
.art-end-cta { grid-column: 5 / 13; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 20px; border: 1px solid var(--ink); background: var(--surface); }
.art-end-cta p { margin: 0; font: 300 22px/1.25 var(--f-sans); }
.art-end > .small, .art-end > p { grid-column: 1 / -1; margin: 0; }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 2px 8px; border: 1px solid var(--rule-2); font: 400 12px var(--f-mono); }
.back-link { font: 400 13px var(--f-mono); text-transform: uppercase; }
@media (max-width: 1023px) {
  .sources, .art-end { grid-template-columns: 1fr; }
  .sources-title, .src-list, .art-end-author, .art-end-cta, .art-end > * { grid-column: 1 / -1; }
}

/* ---------- Journal home ---------- */
.j-mast { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; padding: 28px 0 22px; border-bottom: 1px solid var(--ink); }
.j-title { grid-column: 1 / 8; margin: 0; font: 300 clamp(64px, 11vw, 176px)/.86 var(--f-sans); letter-spacing: -.05em; }
.j-desc { grid-column: 8 / 13; margin: 0; font-size: 16px; color: var(--ink-2); max-width: 44ch; }
.j-issue { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-3); text-transform: uppercase; margin: 0; }
.j-lead { position: relative; padding: 32px 0 56px; border-bottom: 1px solid var(--ink); }
.j-lead-title { margin: 0; position: relative; z-index: 1; }
.j-lead-title a { text-decoration: none; }
.j-lead-title .rec-mark { display: block; font-size: clamp(100px, 22vw, 340px); line-height: .8; margin-left: -.04em; }
.j-lead-media { display: block; position: relative; z-index: 2; margin: clamp(10px, 1.6vw, 26px) calc(-1 * var(--pad)) 0; }
.j-lead-media img { width: min(100%, 1448px); margin-inline: auto; }
.j-lead-media img { width: 100%; }
.j-lead-text { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px var(--gap); align-items: start; margin-top: 24px; }
.j-lead-rest { grid-column: 1 / 7; margin: 0; font: 300 clamp(34px, 4.2vw, 64px)/1 var(--f-sans); letter-spacing: -.035em; }
.j-lead-side { grid-column: 7 / 13; display: grid; gap: 14px; justify-items: start; }
.j-rubric { margin: 0; font: 400 12.5px var(--f-mono); text-transform: uppercase; color: var(--accent); }
.j-lead-sub { margin: 0; font: 300 22px/1.3 var(--f-sans); }
.j-lead-sum { margin: 0; font-size: 15.5px; color: var(--ink-2); max-width: 60ch; }
.art-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; font: 400 12.5px var(--f-mono); color: var(--ink-3); }
.j-contents, .j-about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding: 48px 0; border-bottom: 1px solid var(--rule); }
.j-contents .block-title, .j-about .block-title { grid-column: 1 / 4; font: 400 13px var(--f-mono); text-transform: uppercase; color: var(--ink-3); }
.j-chapters { grid-column: 4 / 13; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.j-chapters a { display: grid; grid-template-columns: 48px 1fr; gap: 8px; min-height: 54px; align-items: center; border-bottom: 1px solid var(--rule); text-decoration: none; font: 300 20px/1.2 var(--f-sans); letter-spacing: -.01em; }
.j-chapters .num { font: 400 12.5px var(--f-mono); color: var(--ink-3); }
.j-chapters a:hover .num { color: var(--accent); }
.j-about { border-bottom: 0; }
.j-about p { grid-column: 4 / 11; margin: 0 0 12px; max-width: 64ch; }
@media (max-width: 1023px) {
  .j-mast, .j-lead-text, .j-contents, .j-about { grid-template-columns: repeat(8, 1fr); }
  .j-title, .j-desc, .j-lead-rest, .j-lead-side, .j-contents .block-title, .j-chapters, .j-about .block-title, .j-about p { grid-column: 1 / 9; }
}
@media (max-width: 767px) { .j-chapters { grid-template-columns: 1fr; } .j-lead-title .rec-mark { font-size: 31vw; } }

/* Footer */
.site-foot { border-top: 1px solid var(--ink); background: var(--surface); padding: 40px 0 48px; }
.foot-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: start; }
.foot-grid > div { grid-column: 1 / 5; }
.foot-grid > div p { margin: 8px 0 0; }
.foot-links { grid-column: 5 / 9; list-style: none; margin: 0; padding: 0; }
.foot-links a { display: inline-flex; min-height: 40px; align-items: center; font: 400 13px var(--f-mono); text-transform: uppercase; }
.foot-note { grid-column: 9 / 13; margin: 0; }
@media (max-width: 1023px) { .foot-grid { grid-template-columns: 1fr; } .foot-grid > * { grid-column: 1 / -1 !important; } }

/* Lightbox */
.lightbox { width: min(96vw, 1700px); height: min(92dvh, 1200px); max-width: none; max-height: none; padding: 0; border: 1px solid var(--ink); background: var(--surface); color: var(--ink); }
.lightbox::backdrop { background: rgba(27, 27, 25, .6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--ink); font-family: var(--f-mono); }
.lb-scroll { overflow: auto; display: grid; place-items: center; padding: 16px; }
.lb-scroll img { max-width: none; width: auto; }
.lb-scroll.fit img { max-width: 100%; max-height: 100%; }

/* Reveal on entry: content is readable without JS. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-in) var(--ease), transform var(--t-in) var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .chapter-head.reveal { transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 900ms var(--ease), opacity 300ms; }
  .js .chapter-head.reveal.is-in { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .site-foot, .hero-actions, .viewer, .story, .tools, .seg, .tr-stage-buttons, .tr-controls { display: none !important; }
  .js .view-article { display: block !important; }
  .js .view-journal { display: none !important; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 1024px) {
  /* REC. is sized from the width left after the subtitle column, so the two never overlap (Dela: REC. = 2.89 em). */
  .hero-title { --sub-w: clamp(150px, 14vw, 250px); display: grid; grid-template-columns: minmax(0, 1fr) var(--sub-w); column-gap: 32px; align-items: start; }
  .hero { container-type: inline-size; }
  .hero-title .rec-mark { grid-column: 1; font-size: min(430px, 27.5vw, calc((100cqw - var(--sub-w) - 40px) / 2.95)); }
  .hero-rest { grid-column: 2; justify-self: end; margin-top: clamp(14px, 1.6vw, 30px); font-size: clamp(22px, 2.2vw, 40px); max-width: none; width: min-content; line-height: 1.05; }
}
@media (max-width: 767px) { .axes circle, .axes .ax-n { display: none; } }
@media (min-width: 1024px) {
  .sheet .node { grid-column: span 3; }
  .sheet .node:nth-of-type(3) { grid-column: 1 / 5; }
  .sheet .node--xl { grid-column: 1 / 7; }
  .sheet .node--tall { grid-column: 7 / 11; }
  .sheet .node--wide { grid-column: 1 / -1; }
}

/* ---------- Cover: visualisation, light parallax, wipe-in on load ---------- */
@media (min-width: 1024px) { .hero-fig { margin-top: clamp(12px, 1.8vw, 30px); } .hero-fig img { width: min(100%, 1448px); margin-inline: auto; } }
/* zero-size marker on the baseline right after the REC dot: used to fit the cover */
.rec-probe { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .rec-mark { animation: rec-mark-in 1.1s var(--ease) .05s backwards; }
  .js .hero-rest { animation: rec-fade-up .9s var(--ease) .5s backwards; }
  .js .hero-fig img, .js .j-lead-media img { animation: rec-wipe-in 1.5s cubic-bezier(.65, 0, .25, 1) .3s backwards; }
  .js .hero-fig figcaption, .js .hero-top { animation: rec-fade-up .8s var(--ease) .9s backwards; }
}
@keyframes rec-mark-in { from { clip-path: inset(0 0 100% 0); transform: translateY(18%); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes rec-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rec-wipe-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Figures: the picture is drawn in from the left when it enters ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .fig.reveal img, .js .node.reveal img, .js .tr-photo img { clip-path: inset(0 100% 0 0); transition: clip-path 1.25s cubic-bezier(.65, 0, .25, 1) .12s; }
  .js .fig.reveal.is-in img, .js .node.reveal.is-in img, .js .tr-photo.is-in img { clip-path: inset(0 0 0 0); }
}

/* ---------- Scroll scenes: pinned visualisations on the page background ---------- */
.scene { position: relative; height: 290vh; margin: 72px calc(50% - 50vw) 0; --p: 0; }
.chapter-body .scene { margin-block: 48px; }
.scene-pin { position: sticky; top: var(--head-h); height: calc(100svh - var(--head-h)); overflow: hidden; }
.scene-media { position: relative; }
.scene-media img { width: 100%; }
.scene-kicker { margin: 0 0 10px; color: var(--accent); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.scene-title { margin: 0; font: 300 clamp(36px, 4.6vw, 72px)/1 var(--f-sans); letter-spacing: -.035em; }
.scene-title--s { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.08; }
.scene-cap { margin: 8px 0 0; color: var(--ink-3); font-size: 12px; }
/* the sky arrives from the page: a pale gradient that fades in behind the building */
.scene-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #C9D6E3 0%, #D9E0E6 32%, rgba(239, 238, 234, 0) 72%); opacity: calc(var(--sky, 0) * .85); pointer-events: none; }

/* A. Front elevation: text on top, the visualisation below it (never under the text);
   an "application" line paints it across while the pale sky arrives from the page. */
.scene--front .scene-pin { display: flex; flex-direction: column; padding: clamp(16px, 3.4vh, 44px) var(--pad) clamp(10px, 2.2vh, 24px); }
.scene--front .scene-head { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: var(--gap); align-items: end; }
.scene--front .scene-head .scene-kicker { grid-column: 1 / -1; }
.scene--front .scene-lead { margin: 0; color: var(--ink-2); font-size: 16px; }
.scene--front .scene-fig { position: relative; flex: 1 1 auto; min-height: 0; margin: clamp(14px, 3vh, 36px) 0 0; container-type: size; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.scene--front .scene-media, .scene--front .scene-cap { width: min(100cqw, (100cqh - 30px) * 1.953); }
.scene--front .scene-media img { clip-path: inset(0 calc((1 - var(--wipe, 0)) * 100%) 0 0); transform: scale(calc(1.03 - var(--wipe, 0) * .03)); transform-origin: 50% 100%; }
.scene-line { position: absolute; top: -2%; bottom: 0; left: calc(var(--wipe, 0) * 100%); width: 2px; margin-left: -1px; background: var(--accent); opacity: clamp(0, calc(min(var(--wipe, 0), 1 - var(--wipe, 0)) * 16), 1); }

/* B. Portal: starts as a narrow slot on the lift shaft, pulls back to the whole facade */
.scene--portal { height: 240vh; }
.scene--portal .scene-fig { position: absolute; inset: 0; margin: 0; }
.scene--portal .scene-media { height: 100%; clip-path: inset(0 calc((1 - var(--open, 0)) * 34%) 0 calc((1 - var(--open, 0)) * 34%)); }
.scene--portal .scene-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transform: scale(calc(2.2 - var(--open, 0) * 1.2)); transform-origin: 50% 34%; }
.scene-card { position: absolute; z-index: 3; left: var(--pad); bottom: clamp(16px, 4vh, 40px); max-width: 430px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--ink); opacity: var(--cap, 0); transform: translateY(calc((1 - var(--cap, 0)) * 24px)); }
.scene-card .small { margin: 10px 0 0; color: var(--ink-2); }

/* C. Kondratyuka 10: the end facade drives in from the side over a moving address line */
.scene--k10 { height: 260vh; }
.k10-type { position: absolute; top: 46%; left: 0; margin: 0; white-space: nowrap; font: 400 clamp(110px, 21vw, 360px)/.9 var(--f-mark); letter-spacing: -.02em; text-transform: uppercase; color: transparent; -webkit-text-stroke: 1.5px var(--rule-2); transform: translate(calc(6vw - var(--type, 0) * 72vw), -50%); pointer-events: none; }
.scene--k10 .scene-fig { position: absolute; right: 3vw; bottom: clamp(8px, 2vh, 24px); margin: 0; width: min(72vw, calc((100svh - var(--head-h) - 40px) * 1.554)); transform: translateX(calc((1 - var(--drive, 0)) * 78vw)); }
.scene--k10 .scene-card { bottom: auto; top: clamp(18px, 4vh, 44px); }

@media (max-width: 899px) {
  .scene { height: 240vh; }
  .scene--front .scene-head { display: block; }
  .scene--front .scene-lead { margin-top: 12px; font-size: 15px; }
  .scene--front .scene-fig { justify-content: center; }
  .scene--portal .scene-media { clip-path: inset(0 calc((1 - var(--open, 0)) * 22%) 0 calc((1 - var(--open, 0)) * 22%)); }
  .scene--portal .scene-media img { object-position: 50% 30%; }
  .scene-card { right: var(--pad); max-width: none; padding: 14px 16px; }
  .scene--k10 .scene-fig { right: 2vw; width: 96vw; bottom: 16vh; }
  .k10-type { top: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .scene { height: auto; }
  .scene-pin { position: relative; top: 0; }
}
.scene--front { height: 230vh; }
@media (max-aspect-ratio: 1/1) { .scene--front .scene-fig { justify-content: center; } }
/* The model cover is the visualisation on the paper; nothing of the live canvas shows through its cut-out sky. */
.viewer-cover { background: var(--paper); z-index: 2; }
.viewer-cover img { object-fit: contain; object-position: 50% 100%; }
.viewer-cover:not([hidden]) ~ .viewer-bottom { visibility: hidden; }

/* ---------- Edges: running words (left) and project numbers (right) ----------
   A fixed layer UNDER the article: plain text leaves the margins open, while full-bleed pictures,
   scenes, chapter heads and wide blocks are painted over it, so the words and cards dive under the
   images and come back out after them. */
.view-article { position: relative; z-index: 1; }
.edges { position: fixed; inset: var(--head-h) 0 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .5s; }
.edges.on { opacity: 1; }
.edges { overflow: hidden; }
.mq { position: absolute; top: 0; left: 0; writing-mode: vertical-rl; white-space: nowrap; font: 400 110px/1 var(--f-mark); letter-spacing: -.01em; color: transparent; -webkit-text-stroke: 1.2px var(--rule-2); will-change: transform; }
.mq em { font-style: normal; color: var(--accent); -webkit-text-stroke: 0; }
.mq-c { -webkit-text-stroke-color: rgba(140, 45, 62, .42); }
/* narrow screens: pale tracks behind the text */
.edges.narrow .mq { -webkit-text-stroke-width: 1px; }
.edges.narrow .mq-a { opacity: .55; }
.edges.narrow .mq-b { opacity: .38; }
.edges.narrow .mq-c { opacity: .7; -webkit-text-stroke-color: rgba(140, 45, 62, .38); }
.edges.narrow .mq em { color: transparent; -webkit-text-stroke: 1px var(--accent); }
/* things that the edges pass under */
.hero, .story, .scene, .chapter-head, .art-end,
.chapter-body > :not(p, .lead, h3, blockquote, .note, .source-line, .sub-title, .interactive-q) { position: relative; background: var(--page); }
.story-pin, .scene-pin { background: var(--page); }

/* ---------- Renders sit in their own air: sky above, ground below, edges sharp ----------
   --sky / --ground come from the picture's own top and bottom, softened toward the paper. */
.hero { isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw;
  background: linear-gradient(180deg, var(--page) 0, var(--page) calc(var(--img-top, 300px) - 240px), #CFDDEC calc(var(--img-top, 300px) + var(--roof, 80px)), #CFDDEC calc(var(--img-bot, 900px) - 60px), #C9C4BF var(--img-bot, 900px), var(--page) calc(var(--img-bot, 900px) + 30vh)); }
.hero-fig img { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), transparent); }
.scene--front .scene-sky { background: linear-gradient(180deg, var(--page) 0, #D3DFEE 34%, #D3DFEE 62%, #CEC8C3 90%, var(--page) 100%); opacity: calc(.35 + var(--sky, 0) * .65); }
.scene--portal .scene-pin { background: linear-gradient(180deg, #D2DEEF 0, #D2DEEF 55%, #BDB6B2 100%); }
.scene--portal::before, .scene--portal::after { content: ""; position: absolute; left: 0; right: 0; height: 28vh; z-index: -1; pointer-events: none; }
.scene--portal::before { bottom: 100%; background: linear-gradient(180deg, var(--page), #D2DEEF); }
.scene--portal::after { top: 100%; background: linear-gradient(180deg, #BDB6B2, var(--page)); }

/* Front elevation runs edge to edge: the picture is always as wide as the window; on short screens
   its empty sky simply slides under the heading. The caption moves up into the heading. */
.scene--front .scene-fig { margin: clamp(10px, 2vh, 24px) calc(-1 * var(--pad)) 0; overflow: visible; }
.scene--front .scene-media { width: 100% !important; }
.scene--front .scene-cap { display: none; }
.scene-note { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
/* landscape: a compact one-line heading, the picture right under it at full width;
   if the window is very short, the bottom of the pavement is what gets trimmed, never the heading */
@media (min-aspect-ratio: 1/1) and (min-width: 900px) {
  .scene--front .scene-pin { padding-top: clamp(10px, 2vh, 20px); }
  .scene--front .scene-head { align-items: end; }
  .scene--front .scene-kicker { margin-bottom: 6px; }
  .scene--front .scene-title { font-size: clamp(30px, 3.3vw, 54px); }
  .scene--front .scene-lead { font-size: 14.5px; line-height: 1.45; }
  .scene--front .scene-fig { justify-content: flex-start; margin-top: clamp(8px, 1.4vh, 16px); }
}
