/* fonts live on this site (no Google Fonts): Geist is one variable file per script, PT Serif has one file per style.
   font-display: optional = a font that is not ready within ~100 ms (preloaded, so almost always ready) is not swapped in later, so the text never reflows after it was painted */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: optional; src: url("fonts/geist-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: optional; src: url("fonts/geist-latin.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: "PT Serif"; font-style: italic; font-weight: 400; font-display: optional; src: url("fonts/ptserif-400i-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-style: italic; font-weight: 400; font-display: optional; src: url("fonts/ptserif-400i-latin.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: "PT Serif"; font-style: italic; font-weight: 700; font-display: optional; src: url("fonts/ptserif-700i-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-style: italic; font-weight: 700; font-display: optional; src: url("fonts/ptserif-700i-latin.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: "PT Serif"; font-style: normal; font-weight: 400; font-display: optional; src: url("fonts/ptserif-400-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 400; font-display: optional; src: url("fonts/ptserif-400-latin.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: "PT Serif"; font-style: normal; font-weight: 700; font-display: optional; src: url("fonts/ptserif-700-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; font-style: normal; font-weight: 700; font-display: optional; src: url("fonts/ptserif-700-latin.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; }

/* stand-ins for the web fonts while they load: a system font scaled to the measured width and height of Geist / PT Serif for every weight and style,
   so the text wraps the same way before and after the real font arrives and nothing below it moves */
@font-face { font-family: "Geist Fallback"; font-style: normal; font-weight: 400; src: local("Arial"), local("Helvetica"); size-adjust: 103.1%; ascent-override: 98.0%; descent-override: 29.1%; line-gap-override: 0%; }
@font-face { font-family: "Geist Fallback"; font-style: normal; font-weight: 500; src: local("Arial"), local("Helvetica"); size-adjust: 105.5%; ascent-override: 95.7%; descent-override: 28.4%; line-gap-override: 0%; }
@font-face { font-family: "Geist Fallback"; font-style: normal; font-weight: 600; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 100.6%; ascent-override: 100.4%; descent-override: 29.8%; line-gap-override: 0%; }
@font-face { font-family: "Geist Fallback"; font-style: normal; font-weight: 700; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 103.0%; ascent-override: 98.1%; descent-override: 29.1%; line-gap-override: 0%; }
@font-face { font-family: "PT Serif Fallback"; font-style: normal; font-weight: 400; src: local("Georgia"); size-adjust: 100.1%; ascent-override: 103.9%; descent-override: 29.0%; line-gap-override: 0%; }
@font-face { font-family: "PT Serif Fallback"; font-style: normal; font-weight: 700; src: local("Georgia Bold"), local("Georgia-Bold"); size-adjust: 94.0%; ascent-override: 110.6%; descent-override: 30.9%; line-gap-override: 0%; }
@font-face { font-family: "PT Serif Fallback"; font-style: italic; font-weight: 400; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 93.1%; ascent-override: 111.7%; descent-override: 31.1%; line-gap-override: 0%; }
@font-face { font-family: "PT Serif Fallback"; font-style: italic; font-weight: 700; src: local("Georgia Bold Italic"), local("Georgia-BoldItalic"); size-adjust: 86.9%; ascent-override: 119.7%; descent-override: 33.4%; line-gap-override: 0%; }
:root {
  --field-line: #86868b;
  --on-dark-lead: #bcbcc1;   /* grey text on the dark book block: WCAG 9.9, APCA 66 */
  --on-dark-text: #d0d0d4;   /* body text there: WCAG 12.2, APCA 78 */
  --bg: #fbfbfd;
  --alt: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, .1);
  --accent: #8a6350;          /* bronze, from the original site (#a37a63), darkened for contrast */
  --accent-soft: #d2a98f;
  --dark: #121214;
  --sans: "Geist", "Geist Fallback", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "PT Serif", "PT Serif Fallback", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1080px;
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
picture { display: contents; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 20; transition: top .2s; }
.skip:focus { top: 10px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); font-weight: 400; }

/* type */
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); margin-bottom: 14px; }
h1 { font-size: clamp(2.5rem, 7.2vw, 5rem); line-height: 1; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1; letter-spacing: -.02em; font-weight: 700; margin-bottom: 24px; }
h3 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 600; }
.lead { font-size: clamp(1.125rem, 2vw, 1.5rem); line-height: 1.35; letter-spacing: -.02em; color: var(--muted); max-width: 34ch; margin-inline: auto; }

/* links & buttons */
.links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.link { color: var(--accent); font-size: 1.0625rem; display: inline; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; letter-spacing: inherit; }
.link::after { content: "›"; display: inline-block; margin-left: 4px; font-size: 1.25em; line-height: 1; transition: transform .25s var(--ease); }

/* nav: translucent material */
.nav { position: fixed; inset: 0 0 auto; z-index: 10; height: var(--nav-h); background: rgba(251, 251, 253, .72); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: background-color .3s ease, border-color .3s; }
.nav.is-stuck { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line); }
.nav__in { width: min(100% - 40px, 1080px); height: 100%; margin-inline: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.nav__in .swu { justify-self: end; }
.brand { font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.swu { display: block; flex: none; line-height: 0; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.swu img { height: 24px; width: auto; transform-origin: 50% 60%; }
.swu:active { transform: scale(.96); }
.nav__links { display: flex; gap: 28px; font-size: .8125rem; color: var(--muted); }
.nav__links a { transition: color .2s; }

/* sections */
.section { padding: clamp(72px, 11vw, 140px) 0; }
.section--alt { background: var(--alt); }
.section--dark { background: var(--dark); color: #f5f5f7; }
.section--dark .eyebrow { color: var(--accent-soft); }
.section--dark .lead { color: var(--on-dark-lead); }
.section--dark .link { color: var(--accent-soft); }
.head { margin-bottom: clamp(36px, 6vw, 64px); }
.head--center { text-align: center; }
.head .lead { margin-inline: 0; max-width: 46ch; }

/* hero: asymmetric split */
.hero { width: min(100% - 40px, var(--wrap)); margin-inline: auto; min-height: min(100dvh, 860px); padding: calc(var(--nav-h) + 72px) 0 48px; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); margin-bottom: 22px; }
.hero .lead { margin: 0 0 26px; max-width: 40ch; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: breathe 2.8s ease-in-out infinite; }
.hero__stage { margin: 0; aspect-ratio: 4 / 5; background: var(--alt); border-radius: 32px; display: grid; place-items: center; overflow: hidden; }
.hero__stage img { width: 62%; height: auto; border-radius: 3px 8px 8px 3px; box-shadow: 0 40px 70px -26px rgba(70, 48, 32, .34), 0 10px 24px -12px rgba(70, 48, 32, .2); animation: float 7s ease-in-out infinite alternate; }
@keyframes float { from { transform: translateY(8px); } to { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* split / photo */
.split { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.photo { margin: 0; border-radius: 24px; overflow: hidden; background: var(--alt); }
.photo img { width: 100%; }
.facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 28px; margin: 28px 0; padding: 22px 0; border-block: 1px solid var(--line); }
.facts dt { font-weight: 600; letter-spacing: -.02em; font-size: 1.125rem; }
.facts dd { margin: 2px 0 0; color: var(--muted); font-size: .875rem; }
.note { font-size: .9375rem; color: var(--muted); margin: 0; }

/* book */
.book-head { margin-bottom: clamp(40px, 7vw, 80px); }
.book-head .lead { margin-inline: 0; max-width: 32ch; }
.book-head h2 { font-size: clamp(2rem, 4.8vw, 3.5rem); margin-bottom: 18px; }
.book-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.photo--dark { background: #1c1c1f; }
.pull { font: italic 400 clamp(1.6rem, 3.2vw, 2.25rem)/1.2 var(--serif); letter-spacing: -.015em; margin: 0 0 28px; color: #fff; }
.book-grid p { color: #c7c7cc; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); margin-top: clamp(56px, 9vw, 110px); padding-top: 40px; border-top: 1px solid rgba(255, 255, 255, .12); }
.story h3 { margin-bottom: 12px; color: #fff; }
.story p { color: var(--on-dark-text); font-size: 1rem; }

/* read: accordion */
:root { interpolate-size: allow-keywords; }
.read { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.read__item { border-top: 1px solid var(--line); scroll-margin-top: var(--nav-h); }
.read__item summary { list-style: none; display: grid; grid-template-columns: 64px 1fr 28px; gap: 18px; align-items: center; padding: 16px 0; cursor: pointer; transition: opacity .2s; -webkit-tap-highlight-color: transparent; }
.read__item summary::-webkit-details-marker { display: none; }
.read__item summary:active { opacity: .7; }
.read__item summary img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--alt); filter: grayscale(1); transition: transform .4s var(--ease); }
.read__item[open] summary img { transform: scale(1.04); }
.read__meta { display: grid; gap: 2px; min-width: 0; }
.read__meta small { font-size: .8125rem; color: var(--accent); font-weight: 600; }
.read__meta strong { font-weight: 600; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; transition: color .2s; text-wrap: balance; }
.read__icon { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--alt); transition: background .2s, transform .4s var(--ease); }
.read__icon::before, .read__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--ink); border-radius: 2px; transform: translate(-50%, -50%); transition: transform .4s var(--ease); }
.read__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.read__item[open] .read__icon { background: var(--ink); transform: rotate(180deg); }
.read__item[open] .read__icon::before { background: #fff; }
.read__item[open] .read__icon::after { background: #fff; transform: translate(-50%, -50%) rotate(0deg); }
.read__item::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size .45s var(--ease), opacity .35s ease, content-visibility .45s allow-discrete; }
.read__item[open]::details-content { block-size: auto; opacity: 1; }
.read__panel { padding: 4px 0 30px 82px; max-width: 72ch; }
.read__panel p { font: 400 1.0625rem/1.65 var(--serif); color: #2c2c2e; margin-bottom: 1em; }
.read__panel .links { margin-top: 20px; }

/* quotes */
.seg { position: relative; display: inline-flex; gap: 2px; padding: 3px; background: rgba(29, 29, 31, .07); border-radius: 980px; flex: none; }
.seg__btn { position: relative; z-index: 1; border: 0; background: none; font: 500 .8125rem/1 var(--sans); letter-spacing: -.01em; color: #636366; padding: 8px 14px; border-radius: 980px; cursor: pointer; transition: background .25s var(--ease), color .2s, box-shadow .25s; }
.seg__btn.is-on { color: var(--ink); }
.seg.has-thumb .seg__btn { transition: color .25s; }
.seg:not(.has-thumb) .seg__btn.is-on { background: #fff; box-shadow: 0 1px 3px rgba(29, 29, 31, .16); }
/* the white pill slides to the chosen option */
.seg__thumb { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; width: var(--w, 0); translate: var(--x, 0) 0; background: #fff; border-radius: 980px; box-shadow: 0 1px 3px rgba(29, 29, 31, .16); transition: translate .4s var(--ease), width .4s var(--ease); pointer-events: none; }
.seg__thumb.no-anim { transition: none; }
.seg__btn:active { transform: scale(.96); }
.seg-row { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; }
.pausebtn { position: relative; display: grid; place-items: center; width: 45px; height: 45px; padding: 0; border: 0; border-radius: 50%; background: rgba(29, 29, 31, .07); color: #636366; cursor: pointer; transition: background .25s var(--ease), transform .25s var(--ease); -webkit-tap-highlight-color: transparent; }
.pausebtn::before { content: ""; position: absolute; inset: -3px; }   /* hit area a bit larger than the circle */
.pausebtn svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.pausebtn .i-play { display: none; margin-left: 2px; }
.pausebtn.is-paused .i-play { display: block; }
.pausebtn.is-paused .i-pause { display: none; }
.pausebtn:active { transform: scale(.96); }
@media (hover: hover) { .pausebtn:hover { background: rgba(29, 29, 31, .12); } }
.qa.is-paused .qa__track { animation-play-state: paused; }
/* ticker and slides sit in one grid cell: the block keeps the height of the taller one, so switching the mode never moves what is below */
.quotes { display: grid; grid-template-columns: minmax(0, 1fr); }
.quotes > .qa, .quotes > .qb { grid-area: 1 / 1; align-self: center; }
.quotes .is-idle { visibility: hidden; pointer-events: none; }
.qa.is-idle .qa__track { animation-play-state: paused; }
.q { margin: 0; }
.q blockquote { margin: 0; font: italic 400 clamp(1.5rem, 3.4vw, 2.375rem)/1.25 var(--serif); letter-spacing: -.015em; text-wrap: pretty; }
.q figcaption { margin-top: 18px; font-size: .875rem; color: var(--muted); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.q figcaption b { color: var(--accent); font-weight: 600; }

/* variant A: ticker, right to left */
.qa { position: relative; overflow: hidden; }
/* soft edges drawn as overlays: a CSS mask on a wide, animated strip made Safari on iPhone paint only part of it */
.qa::before, .qa::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7%; z-index: 2; pointer-events: none; }
.qa::before { left: 0; background: linear-gradient(90deg, var(--alt), rgba(245, 245, 247, 0)); }
.qa::after { right: 0; background: linear-gradient(270deg, var(--alt), rgba(245, 245, 247, 0)); }
.qa__track { display: flex; width: max-content; animation: ticker 60s linear infinite; }   /* no will-change / 3d hints: they made iOS WebKit keep the wide strip as one GPU layer and leave a part of it unpainted */
.qa .q { flex: none; width: min(82vw, 560px); padding: 6px clamp(28px, 5vw, 64px); border-left: 1px solid rgba(138, 99, 80, .35); }
.qa:hover .qa__track, .qa:focus-within .qa__track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* variant B: slides, entering from the right */
.qb { width: min(100% - 40px, var(--wrap)); min-width: 0; margin-inline: auto; }
.qb__stage { display: grid; overflow: hidden; }
.qb .q { grid-area: 1 / 1; align-self: center; max-width: 24ch; max-width: min(100%, 880px); opacity: 0; transform: translateX(14%); transition: transform .9s var(--ease), opacity .6s ease; pointer-events: none; padding: 12px 0; }
.qb .q blockquote { font-size: clamp(1.75rem, 4.4vw, 3.125rem); line-height: 1.18; }
.qb .q.is-active { opacity: 1; transform: none; pointer-events: auto; }
.qb .q.is-prev { opacity: 0; transform: translateX(-14%); }

/* press review: the lead voice of the reviews block */
.press { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 88px); padding: clamp(32px, 5vw, 56px) 0 clamp(40px, 6vw, 72px); border-top: 2px solid var(--ink); margin-bottom: clamp(36px, 5vw, 56px); }
.press__quote { margin: 0 0 28px; font: italic 400 clamp(1.75rem, 3.6vw, 2.75rem)/1.18 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.press__quote .hl { color: var(--accent); font-weight: 700; }
.press__by { font-size: .9375rem; color: var(--muted); margin-bottom: 16px; }
.press__by b { color: var(--ink); font-weight: 600; }
.press__side ul { margin-top: 4px; }
.press__side li { padding: 30px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.press__side li:first-child { border-top: 0; padding-top: 4px; }
.press__side q { quotes: "«" "»"; font: italic 400 1.25rem/1.3 var(--serif); letter-spacing: -.01em; }
.press__side li span { font-size: .875rem; color: var(--muted); }
.press__label { margin-bottom: 0; }

/* reader reviews: one quote at a time, the others slide in with the arrows or dots */
.revs { margin-bottom: 36px; }
.revs__stage { display: grid; }
.rev { grid-area: 1 / 1; margin: 0; display: grid; gap: 28px; align-content: start; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s .35s; }
.rev.is-on { opacity: 1; visibility: visible; transition: opacity .4s ease .12s, visibility 0s; }
.rev blockquote { margin: 0; font: italic 400 clamp(1.375rem, 2.7vw, 2rem)/1.3 var(--serif); letter-spacing: -.01em; max-width: 40ch; text-wrap: pretty; }
.rev figcaption { display: grid; gap: 2px; font-size: .9375rem; }
.rev figcaption strong { font-weight: 600; }
.rev figcaption span { color: var(--muted); font-size: .8125rem; }
.revs__ctl { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; }
/* one dot, one bar. Nothing here changes layout: every dot is a fixed 22px box placed with a transform, and a clip-path shows only its first 8px (a round dot) or all 22px (the long bar).
   Both are painted at sub-pixel precision, so the bar grows smoothly instead of in whole-pixel steps and the row never reflows. */
.revs__dots { position: relative; width: 70px; height: 8px; padding: 14px 4px; box-sizing: content-box; margin: -14px -4px; }
.revs__dot { position: absolute; left: 4px; top: 14px; width: 22px; height: 8px; padding: 0; border: 0; background: #b4b4b9; cursor: pointer;
  clip-path: inset(0 14px 0 0 round 4px); transform: translateX(calc(var(--x, 0) * 1px));
  transition: clip-path .4s cubic-bezier(.4, 0, .2, 1), transform .4s cubic-bezier(.4, 0, .2, 1), background-color .4s cubic-bezier(.4, 0, .2, 1); }
.revs__dot:focus-visible { outline: none; background: var(--accent); }   /* an outline would be cut off by the clip-path */
.revs__dot[aria-current="true"] { background: var(--ink); clip-path: inset(0 0 0 0 round 4px); }
.revs__arrows { display: flex; gap: 8px; }

/* events rail */
/* header with controls: a grid, not a wrapping row. Where the controls sit (beside the text or under it) is fixed by the breakpoint, so a fraction of a pixel in the text width can never flip it */
.head--row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 28px; }
.head--row > :last-child { justify-self: end; }
@media (max-width: 720px) { .head--row { grid-template-columns: minmax(0, 1fr); } .head--row > :last-child { justify-self: start; } }
.head--row h2 { margin-bottom: 0; }
.arrows { display: flex; gap: 10px; flex: none; }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--alt); color: var(--ink); font: 400 1.75rem/1 var(--sans); padding: 0 0 4px; cursor: pointer; transition: background .2s, transform .2s var(--ease), opacity .2s; }
.arrow:active:not(:disabled) { transform: scale(.92); }
.arrow:disabled { opacity: .35; cursor: default; }
.rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px max(20px, calc((100vw - var(--wrap)) / 2)) 28px; scroll-padding-inline: max(20px, calc((100vw - var(--wrap)) / 2)); scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.rail.is-drag { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.rail.is-drag a { pointer-events: none; }
.rail::-webkit-scrollbar { display: none; }
.card { flex: 0 0 min(80vw, 300px); scroll-snap-align: start; background: var(--alt); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: var(--pos, 50% 30%); }
.card .vid { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--ink); }
.card .vid video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.vid__tap { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vid__tap:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }   /* browsers without :has() keep this ring */
/* keyboard focus is shown around the whole card (the site ring), never as a frame inside the picture */
@supports selector(:has(*)) {
  .vid__tap:focus-visible { outline: none; }
  .card:has(.vid__tap:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
}
.vid__badge { position: absolute; left: 12px; top: 12px; height: 30px; padding: 0 12px 0 10px; border-radius: 980px; background: rgba(29,29,31,.6); color: #fff; font: 600 .8125rem var(--sans); display: flex; align-items: center; gap: 6px; pointer-events: none; transition: opacity .25s ease; }
.vid__badge svg { width: 12px; height: 12px; fill: currentColor; }
.vid__pp { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.vid__pp svg { width: 40%; height: 40%; margin-left: 4%; fill: currentColor; }
.vid__snd { position: absolute; right: 12px; bottom: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(29,29,31,.55); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility 0s .25s, background .2s ease; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .vid__snd:hover { background: rgba(29,29,31,.8); } }
.vid__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.vid__bar i { display: block; height: 100%; background: #e5383b; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .3s linear; }
.vid.is-started .vid__badge { opacity: 0; }
.vid.is-started .vid__snd { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.vid.is-started .vid__bar { opacity: 1; }
.vid.is-started.is-paused .vid__pp { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .vid__bar i { transition: none; } }
.vid__snd::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3z'/%3E%3Cpath d='M16 9l5 6M21 9l-5 6' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
.vid__snd[aria-pressed="true"]::before { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 4V5L7 9H3z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7M18.5 6a9 9 0 0 1 0 12' stroke='black' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
.card div { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card time { font-size: .8125rem; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.card .meta { display: flex; align-items: center; margin: 0 0 6px; font-size: .8125rem; font-weight: 600; color: var(--accent); }
.card .meta time { margin: 0; }
.card .meta span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 .6em; border-radius: 50%; background: currentColor; vertical-align: middle; }
.card h3 { font-size: 1.1875rem; margin-bottom: 8px; }
.card p { font-size: .9375rem; color: var(--muted); margin-bottom: 14px; }
.card .link { margin-top: auto; font-size: .9375rem; }

/* projects bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { position: relative; grid-column: span 2; border: 0; padding: 0; border-radius: 26px; overflow: hidden; cursor: pointer; text-align: left; font: inherit; color: #fff; background: transparent; isolation: isolate; transition: transform .45s var(--ease); }
.tile { aspect-ratio: 4 / 3; }
/* project direction filter: with a direction chosen the tiles flow in two even columns, an odd one out takes the full row */
.bento [hidden] { display: none !important; }
.bento { position: relative; }
.bento.is-filtered { grid-template-columns: repeat(2, 1fr); }
.bento.is-filtered .tile, .bento.is-filtered .tile--lg, .bento.is-filtered .tile--l, .bento.is-filtered .tile--r { grid-column: span 1; grid-row: auto; aspect-ratio: 4 / 3; }
.bento.is-filtered .tile.is-wide { grid-column: span 2; aspect-ratio: 16 / 7; }
.bento.is-filtered .tile strong { font-size: 1.375rem; }
.bento.is-filtered .tile.is-wide strong { font-size: 1.875rem; }
.proj-empty { grid-column: 1 / -1; background: var(--bg); border-radius: 26px; padding: clamp(36px, 7vw, 64px) clamp(24px, 5vw, 48px); text-align: center; }
.proj-empty h3 { margin-bottom: 8px; }
.proj-empty p { color: var(--muted); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tile--lg { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
.tile--r { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }   /* the bottom row: three equal tiles */
.tile--l { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
.tile--wide { grid-column: 1 / -1; aspect-ratio: 16 / 5; }   /* a logo banner across the whole bottom row */
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); border-radius: inherit; z-index: -2; transition: transform .8s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(to top, rgba(24, 18, 14, .68), rgba(24, 18, 14, .64) min(118px, 58%), rgba(24, 18, 14, 0) min(210px, 92%)); }   /* stops in pixels: the caption is a fixed height (up to 2 lines of title), so the dark part must cover it on small tiles too */
.tile:active { transform: scale(.985); }
.tile__txt { position: absolute; left: 24px; right: 24px; bottom: 22px; display: grid; gap: 2px; }
.tile small { font-size: .8125rem; }
.tile strong { font-size: 1.375rem; line-height: 1.15; letter-spacing: -.01em; font-weight: 600; }
.tile--lg strong { font-size: 1.875rem; }
.tile--lg.tile--r strong { font-size: 1.375rem; }   /* the "war" tile is as wide as its neighbours: same title size */

/* buy */
.buy { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 clamp(32px, 6vw, 88px); align-items: start; }
.buy__col { padding: 26px 0 8px; border-top: 1px solid var(--ink); }
.buy__col h3 { margin-bottom: 8px; }
.buy__side { display: grid; gap: 28px; }
.buy__side .buy__col + .buy__col { border-top-color: var(--line); }
.buy__col--ebook { display: grid; grid-template-columns: 104px 1fr; gap: 20px; align-items: start; }
.buy__col--ebook img { width: 104px; height: auto; }
.buy ul.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.buy li a { display: flex; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--line); transition: color .2s, padding .3s var(--ease); }
.buy li a::after { content: "›"; color: var(--accent); }
.buy li a:active { opacity: .6; }

/* footer: one quiet line */
.footer { padding: 0 0 36px; font-size: .875rem; border-top: 1px solid var(--line); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 28px; padding-top: 24px; }
.footer p { margin: 0; }
.footer a { color: var(--accent); }
.social { display: flex; gap: 20px; flex-wrap: wrap; }

/* sheet (project dialog) */
.sheet { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; color: var(--ink); overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .35s var(--ease), transform .45s var(--ease), overlay .35s allow-discrete, display .35s allow-discrete; }
.sheet::-webkit-scrollbar { display: none; }
.sheet[open] { opacity: 1; transform: none; display: flex; padding: max(24px, 4dvh) 16px; }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(24px) scale(.96); } }
.sheet::backdrop { background: rgba(24, 18, 14, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .4s, backdrop-filter .4s, overlay .4s allow-discrete, display .4s allow-discrete; }
.sheet[open]::backdrop { background: rgba(24, 18, 14, .4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@starting-style { .sheet[open]::backdrop { background: rgba(24, 18, 14, 0); backdrop-filter: blur(0); } }
.sheet__close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #8e8e93; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; transition: transform .2s var(--ease), background-color .2s ease, color .2s ease; }
/* on the photo: white button, black cross (a soft shadow keeps it visible on pale photos) */
.sheet__close[data-tone="photo"] { background: rgba(255, 255, 255, .94); color: #000; box-shadow: 0 1px 6px rgba(0, 0, 0, .22); }
@media (hover: hover) {
  .sheet__close:hover { background: #6e6e73; }
  .sheet__close[data-tone="photo"]:hover { background: rgba(228, 228, 232, .98); }
}
.sheet__close:active { transform: scale(.9); }
.sheet__card { position: relative; margin: auto; width: min(100%, 980px); background: transparent; isolation: isolate; border-radius: 28px; overflow: hidden; box-shadow: 0 40px 100px -20px rgba(24, 18, 14, .4); }
.sheet__body { display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch; }
/* the picture fills the whole height of the card; the focus point keeps faces and lettering in view */
.sheet__media { position: relative; align-self: stretch; min-height: 340px; overflow: hidden; }
.sheet__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.sheet__text { align-self: stretch; display: flex; flex-direction: column; justify-content: center; background: var(--bg); }
.sheet__text { padding: 40px clamp(24px, 4vw, 44px) 40px; }
.sheet__text h3 { font-size: 1.75rem; letter-spacing: -.025em; margin-bottom: 14px; padding-right: 36px; }
.sheet__text p { color: #424245; }
.sheet__text .links { margin-top: 18px; }

/* tactile feedback */
.link:active { opacity: .6; }

/* image skeleton while loading */
img.is-loading { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.8s linear infinite; }
img.img-fail { opacity: 0; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
/* headings and intro text only fade in: no rise, so nothing visibly moves up or down on load */
.head.reveal, .book-head.reveal, .eyebrow.reveal, h1.reveal, .lead.reveal, .links.reveal { transform: none; }

@media (max-width: 860px) {
  .split, .book-grid, .story { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: calc(var(--nav-h) + 72px); }
  .hero__stage { aspect-ratio: 4 / 3.6; }
  .hero__stage img { width: 36%; }
  .press { grid-template-columns: 1fr; }
  .buy, .buy ul.two { grid-template-columns: 1fr; }
  .footer__row { flex-direction: column; align-items: flex-start; }
    .read__panel { padding-left: 0; }
  .read__item summary { grid-template-columns: 56px 1fr 28px; gap: 14px; }
  .read__item summary img { width: 56px; height: 56px; border-radius: 14px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile { grid-column: span 1; }
  .tile--l { grid-column: span 1; grid-row: auto; aspect-ratio: 4 / 3; }
  .tile--wide { grid-column: span 1; aspect-ratio: 4 / 3; }
  .tile--lg { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .tile--r { grid-column: span 1; grid-row: auto; aspect-ratio: 4 / 3; }
  .tile--lg.tile--r strong { font-size: 1.375rem; }   /* the "war" tile is half width here, like "Мама": same title size */

  .facts { grid-template-columns: 1fr 1fr; }
  .photo { max-width: 460px; }
}
@media (max-width: 480px) {
  .bento, .bento.is-filtered { grid-template-columns: 1fr; }
  .tile--lg, .tile--r, .bento.is-filtered .tile.is-wide { grid-column: span 1; }
  .hero__stage img { width: 44%; }
  .buy__col--ebook { grid-template-columns: 72px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bento { transition: none; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sheet, .sheet::backdrop { transition: opacity .2s; transform: none; }
  .tile img, .tile { transition: none; }
  .dot, .hero__stage img, img.is-loading { animation: none; }
  .qa { overflow-x: auto; }
  .qa::before, .qa::after { display: none; }
  .qa__track { animation: none; }
  .qb .q { transition: opacity .3s; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* scroll motion */
/* 1. headings: words rise out of a mask */
.hsplit .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .2em .08em; margin: -.2em -.08em; }
.hsplit .wi { display: inline-block; opacity: 0; filter: blur(6px); transform: translateY(105%); transition: transform 1s var(--ease), opacity .7s ease, filter .9s ease; transition-delay: calc(var(--d0, 0ms) + var(--i) * 55ms); will-change: transform; }
.hsplit.in .wi { opacity: 1; filter: none; transform: none; }
.hsplit.in .wi { will-change: auto; }

/* 1. photos: curtain wipe + slow zoom settle (scale), parallax uses translate so both compose */
.photo img { scale: 1.05; }
/* the frame stays put (the observer must see it); the picture wipes in inside it */
.photo.reveal { opacity: 1; transform: none; }
.photo.reveal img { clip-path: inset(0 0 100% 0); scale: 1.24; transition: clip-path 1.2s var(--ease) var(--d, 0ms), scale 1.8s var(--ease) var(--d, 0ms); }
.photo.reveal.in img { clip-path: inset(0 0 0 0); scale: 1.05; }
.tile.reveal img { scale: 1.12; transition: scale 1.5s var(--ease) var(--d, 0ms), transform .8s var(--ease); }
.tile.reveal.in img { scale: 1; }

/* 2. parallax: images drift inside their frames while scrolling (CSS scroll-driven, no JS) */
/* transform composes with the individual scale/translate used by the reveal; the zoom is sized so the frame never shows an edge */
@keyframes heropar { from { translate: 0 0; } to { translate: 0 -56px; } }
@supports (animation-timeline: view()) {
  .photo img { will-change: transform; }
  .hero__stage--photo img { will-change: transform; }
  .hero__stage img { animation: float 7s ease-in-out infinite alternate, heropar linear both; animation-timeline: auto, scroll(root); animation-range: normal normal, 0px 100vh; }
}

/* 6. active section link in the menu */
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: -1px; right: -2px; bottom: -2px; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { transform: scaleX(1); }
.facts dt { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .hsplit .wi { opacity: 1; filter: none; transform: none; transition: none; }
  .photo img, .tile img, .photo.reveal img, .tile.reveal img, .hero__stage--photo img { transform: none; scale: 1; translate: none; animation: none; transition: none; clip-path: none; }
}

/* pictures where nothing may be cropped: logos, lettering, faces near the edge */
.photo--still img, .photo--still.reveal img, .photo--still.reveal.in img { scale: 1; animation: none; translate: none; }
.tile--light { color: var(--ink); }
.tile--light::after { display: none; }
.tile--light small { opacity: .7; }

/* pictures that are shown whole (the logo of "Лінії єдності") */
.tile--whole { background: #fff; }
.tile--whole img { inset: 0 0 66px 0; height: calc(100% - 66px); }
.tile--whole img, .sheet__media--whole img { object-fit: contain; background: #fff; }
.sheet__media--whole { background: #fff; }

/* burger menu (phones and small tablets) */
.burger { display: none; position: relative; width: 44px; height: 44px; margin-right: -7px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.burger span { position: absolute; left: 7px; right: 7px; top: 21px; height: 1.5px; border-radius: 2px; background: var(--ink); will-change: transform; transition: transform .4s cubic-bezier(.4, 0, .2, 1), opacity .2s ease; }
/* the lines sit at whole-pixel positions (all three identical) and only move with transform, which is painted smoothly, not in whole-pixel steps */
.burger span:nth-child(1) { transform: translateY(-10px) rotate(0deg); }
.burger span:nth-child(3) { transform: translateY(10px) rotate(0deg); }
.nav.is-open .burger span:nth-child(1) { transform: translateY(0) rotate(45deg); }
.nav.is-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.nav.is-open .burger span:nth-child(3) { transform: translateY(0) rotate(-45deg); }
@media (max-width: 860px) {
  /* the divider is visible from the first frame and never moves: it is drawn by a layer above the sliding menu panel,
     so the panel (which starts 8px higher and fades in) can no longer cover it and make it blink */
  .nav, .nav.is-stuck, .nav.is-open { border-bottom-color: transparent; }
  .nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); z-index: 2; pointer-events: none; }
  .nav__in { grid-template-columns: 1fr auto auto; gap: 14px; }
  .burger { display: block; }
  .nav.is-open { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__links { position: fixed; left: 0; right: 0; top: var(--nav-h); height: calc(100dvh - var(--nav-h)); display: flex; flex-direction: column; gap: 0; padding: 8px 20px 40px; background: var(--bg); color: var(--ink); font-size: 1.75rem; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .3s ease, transform .5s var(--ease), visibility 0s linear .3s; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .5s var(--ease); }
  .nav__links a { padding: 20px 0; border-bottom: 1px solid var(--line); font-weight: 600; letter-spacing: -.025em; opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .5s var(--ease), color .2s; }
  .nav.is-open .nav__links a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 50ms + 90ms); }
  .nav__links a:nth-child(2) { --i: 1; } .nav__links a:nth-child(3) { --i: 2; } .nav__links a:nth-child(4) { --i: 3; } .nav__links a:nth-child(5) { --i: 4; }
  .nav__links a::after { display: none; }
  .nav__links a.is-active { color: var(--accent); }
}
html.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .burger span, .nav__links, .nav__links a { transition: none !important; }
}
.head--row h2 + .lead { margin-top: 18px; }

/* hover effects only where a pointer can hover (taps on touch screens do not leave them stuck) */
@media (hover: hover) {
  .link:hover::after { transform: translateX(3px); }
  .link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .swu:hover img { animation: swu-shake .5s ease-in-out; }
  .nav__links a:hover { color: var(--ink); }
  .read__item summary:hover .read__meta strong { color: var(--accent); }
  .arrow:hover:not(:disabled) { background: #e8e8ed; }
  .tile:hover img { transform: scale(1.03); }
  .buy li a:hover { color: var(--accent); padding-left: 4px; }
  .footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* touch targets: invisible expanders grow the tappable area to ~44px without moving anything */
.brand, .swu, .link, .footer a { position: relative; }
.brand::before, .swu::before, .link::before, .footer a::before { content: ""; position: absolute; inset: -12px -6px; }
.seg__btn { padding: 13px 16px; }
@media (max-width: 360px) { .seg__btn { padding: 13px 10px; } }   /* four project filters must fit the narrowest phones */

/* project card close button: bigger, and on phones it stays on screen while the card scrolls */
.sheet__close { width: 40px; height: 40px; top: 12px; right: 12px; }
@media (max-width: 700px) {
  .sheet__body { grid-template-columns: 1fr; }
  /* the 4:3 height comes from an in-flow spacer, not aspect-ratio: Safari on iPhone collapsed the photo area to 0 */
  .sheet__media { min-height: 0; }
  .sheet__media::before { content: ""; display: block; padding-top: 75%; }
  .sheet__text { padding: 26px 24px 30px; }
  .sheet__text h3 { padding-right: 0; }   /* the close button sits on the photo here, not beside the title */
  .sheet__close { top: 12px; right: 12px; width: 44px; height: 44px; } /* inside the card, equal distance from the top and right edges */
}
@media (max-width: 860px) {
  .footer__row { gap: 20px 28px; }
}
@media (max-width: 560px) {
  .sheet__text { padding: 22px 20px 28px; }
  .sheet__text h3 { font-size: 1.5rem; }
  .sheet__text p { font-size: .9375rem; line-height: 1.5; }
}

/* phones: the caption goes under the picture so it can never cover a face */
@media (max-width: 560px) {
  .tile { display: flex; flex-direction: column; aspect-ratio: auto; background: var(--bg); border-radius: 22px; }
  .tile--lg, .tile--r { aspect-ratio: auto; }
  .tile img, .tile--whole img { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; z-index: auto; }
  .tile--whole { background: var(--bg); }
  .tile--whole img { object-fit: contain; background: #fff; }
  .tile::after { display: none; }
  .tile__txt { position: static; padding: 14px 18px 18px; color: var(--ink); }
  .tile small { opacity: .62; }
  .bento.is-filtered .tile, .bento.is-filtered .tile.is-wide { aspect-ratio: auto; }
  .tile strong, .tile--lg strong, .tile--lg.tile--r strong, .bento.is-filtered .tile strong, .bento.is-filtered .tile.is-wide strong { font-size: 1.25rem; }
}

/* hero: the author's portrait fills the panel (the book appears once, in the "Книга" block) */
.hero__stage--photo { aspect-ratio: 4 / 5; display: block; }
.hero__stage--photo img, .hero__stage--photo.reveal img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; border-radius: inherit; box-shadow: none; animation: none; translate: none; scale: 1; }
.about > div { max-width: 62ch; }
@media (max-width: 860px) { .hero__stage--photo { aspect-ratio: 4 / 4.2; } }
.read__item.no-anim::details-content { transition: none; }

/* line-by-line quote: every line rises out of its own mask, one after another */
.lsplit .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .22em .14em; margin: -.22em -.14em; }
.lsplit .wi { display: inline-block; opacity: 0; transform: translateY(110%); transition: transform 1s var(--ease), opacity .7s ease; transition-delay: calc(var(--li, 0) * 150ms + 100ms); }
.lsplit.in .wi { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lsplit .wi { opacity: 1; transform: none; transition: none; } }

/* desktop: the three facts span the full width, 30% each */
@media (min-width: 861px) { .facts { grid-template-columns: repeat(3, 30%); justify-content: space-between; column-gap: 0; } }

/* light rattle of the StandWithUkraine logo on hover */
@keyframes swu-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-1.5px) rotate(-3deg); }
  30% { transform: translateX(1.5px) rotate(3deg); }
  45% { transform: translateX(-1px) rotate(-2deg); }
  60% { transform: translateX(1px) rotate(2deg); }
  80% { transform: translateX(-.5px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) { .swu:hover img { animation: none; } }

/* listen block: the "Прослухати" button and the minimal player inside an opened chapter */
.listen { margin: 0 0 20px; min-height: 28px; }
.listen__btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--accent); font: 500 1rem/1.4 var(--sans); letter-spacing: -.011em; cursor: pointer; }
.listen__btn svg { width: 12px; height: 12px; fill: currentColor; }
.listen__btn > span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid currentColor; transition: background .2s, color .2s; }
.listen__btn small { font-weight: 400; color: var(--muted); font-size: .875rem; }
.listen .player { display: none; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; height: 28px; }
.listen.is-open .player { display: grid; }
.listen.is-open .listen__btn { display: none; }
.listen .pp { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--ink); cursor: pointer; display: grid; place-items: center; transition: transform .2s var(--ease), background .2s; }
.listen .pp:active { transform: scale(.94); }
.listen .pp svg { width: 10px; height: 10px; fill: #fff; display: block; }
.listen .pp .pause { display: none; }
.listen.is-playing .pp .play { display: none; }
.listen.is-playing .pp .pause { display: block; }
.listen .bar { position: relative; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.listen .bar::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: rgba(29, 29, 31, .14); }
.listen .fill { position: absolute; left: 0; height: 2px; border-radius: 2px; background: var(--accent); width: var(--p, 0%); }
.listen .knob { position: absolute; left: var(--p, 0%); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .2s var(--ease); }
.listen.is-playing .knob, .listen .bar:focus-visible .knob { transform: scale(1); }
/* the opened chapter clips whatever sticks out of it and has only 4px of room above the player, so the rings sit close to their controls */
.listen .bar:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-radius: 6px; }
.listen .pp:focus-visible, .listen__btn:focus-visible { outline-offset: 1px; }
.listen.by-pointer .pp:focus-visible, .listen.by-pointer .listen__btn:focus-visible, .listen.by-pointer .bar:focus-visible { outline: none; }
.listen .time { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (hover: hover) {
  .listen__btn:hover > span { background: var(--accent); color: #fff; }
  .listen .pp:hover { background: #3a3a3d; }
  .listen .bar:hover .knob { transform: scale(1); }
}

/* subscribe */
.fld { display: grid; gap: 8px; margin-bottom: 14px; }
.fld label { font-size: .875rem; font-weight: 600; }
.fld input { width: 100%; border: 1px solid var(--field-line); background: #fff; border-radius: 16px; padding: 15px 16px; font: 400 1rem var(--sans); color: var(--ink); outline: none; transition: border-color .2s; }
.fld input::placeholder { color: #aeaeb2; opacity: 1; }   /* lighter hint, iOS and Firefox otherwise tint it themselves */
.fld input:focus { border-color: var(--ink); }   /* no halo around the field: only the border gets darker */
.fld input[aria-invalid="true"] { border-color: #b3261e; }
.fld__err { display: block; height: 16px; line-height: 16px; white-space: nowrap; color: #b3261e; font-size: .8125rem; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; color: var(--muted); margin-bottom: 22px; cursor: pointer; }
.chk input { -webkit-appearance: none; appearance: none; margin: 1.5px 0 0; width: 16px; height: 16px; flex: none; border: 1px solid var(--field-line); border-radius: 5px; background: #fff center / 100% 100% no-repeat; cursor: pointer; transition: background-color .2s, border-color .2s, box-shadow .2s; }
.chk input:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.4l2.6 2.6 5-5.6' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.chk input:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(138, 99, 80, .18); }
.subbtn { border: 0; border-radius: 980px; background: var(--ink); color: #fff; padding: 14px 26px; font: 500 1rem var(--sans); cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.subbtn:active { transform: scale(.97); }
.subbtn[disabled] { opacity: .6; cursor: default; }
.sub__done a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .subbtn:hover { background: #3a3a3d; } }

/* subscribe: full container width, left aligned, two columns (text | form), like the other sections */
.sub { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 6vw, 88px); align-items: start; }
.sub h2 { margin-bottom: 18px; }
.sub__lead { color: var(--muted); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.4; margin: 0; max-width: 36ch; }
.sub__done h3 { font-size: clamp(1.4rem, 2.4vw, 1.875rem); letter-spacing: -.02em; margin-bottom: 10px; }
.sub .fld { margin-bottom: 14px; }
@media (max-width: 860px) { .sub { grid-template-columns: 1fr; gap: 24px; } }
.sub .chk { margin-bottom: 14px; }
.sub .chk + .chk { margin-bottom: 22px; }
/* the confirmation lines up with the heading on the left , no eyebrow above it */
@media (min-width: 861px) { .sub__done { padding-top: 0; } }
/* confirmation tick: the ring and the check draw themselves when the form is replaced */
.sub__done .tick { display: block; width: 48px; height: 48px; margin-bottom: 18px; }
.tick circle { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: tick-draw .7s var(--ease) .05s forwards; }
.tick path { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 34; animation: tick-draw .45s var(--ease) .55s forwards; }
@keyframes tick-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .tick circle, .tick path { animation: none; stroke-dashoffset: 0; } }
.facts dt { white-space: nowrap; }
/* subscribe confirmation: form fades out, then tick -> heading -> text rise in one by one */
#subf { transition: opacity .35s ease, transform .35s var(--ease); }
#subf.is-out { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.sub__done > .tick { opacity: 0; animation: sub-in .5s var(--ease) 0s forwards; }
.sub__done > h3 { opacity: 0; animation: sub-rise .6s var(--ease) 1s forwards; }
.sub__done > p { opacity: 0; animation: sub-rise .6s var(--ease) 1.3s forwards; }
@keyframes sub-in { to { opacity: 1; } }
@keyframes sub-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #subf { transition: none; } .sub__done > * { opacity: 1; animation: none; } }
.h2-sub { display: block; }
@media (prefers-reduced-motion: reduce) { .rev, .rev.is-on { transition: none; transform: none; } .revs__dot { transition: none; } }
/* slide 1 is the press review (main quote + side quotes); the stage grows or shrinks to the active slide */
.revs__stage { overflow: clip; }
.rev { align-self: start; }
.rev--press .press { grid-template-columns: 1fr; border-top: 0; padding: 0; margin: 0; }
.rev--press .press__quote { margin-bottom: 28px; }
/* no backdrop-filter on the close button: inside the rounded, clipped card it made the whole card disappear on some browsers */
/* the card itself takes the focus when the sheet opens, so no ring appears around the close button on touch */
.sheet__card:focus { outline: none; }
/* the cross is drawn, not typed: a text "x" sits above the middle of the circle, the drawn one is centred exactly */
.sheet__close { display: grid; place-items: center; padding: 0; }
.sheet__close svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }


/* cookie banner */
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
@media (hover: hover) { .linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; } }
.consent { position: fixed; left: 20px; bottom: 20px; z-index: 60; width: min(400px, calc(100vw - 40px)); padding: 20px 22px 18px; background: #fff; border-radius: 22px; box-shadow: 0 10px 40px rgba(29, 29, 31, .16), 0 0 0 1px rgba(29, 29, 31, .06); opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .5s var(--ease); }
.consent.is-in { opacity: 1; transform: none; }
.consent__title { margin: 0 0 6px; font: 600 1rem/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.consent__text { margin: 0 0 16px; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.consent__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.consent__btns button { border: 0; border-radius: 980px; padding: 10px 18px; font: 500 .875rem/1 var(--sans); letter-spacing: -.01em; cursor: pointer; transition: background .2s, transform .2s var(--ease); -webkit-tap-highlight-color: transparent; }
.consent__btns button:active { transform: scale(.97); }
.consent__yes { background: var(--ink); color: #fff; }
.consent__no { background: rgba(29, 29, 31, .07); color: var(--ink); }
@media (hover: hover) { .consent__yes:hover { background: #3a3a3d; } .consent__no:hover { background: rgba(29, 29, 31, .12); } }
@media (max-width: 600px) { .consent { left: 19px; right: 19px; bottom: 19px; width: auto; } }   /* 2px wider than the page content (gutter 20px), the same 19px on both sides and at the bottom */
@media (prefers-reduced-motion: reduce) { .consent { transition: opacity .2s; transform: none; } }
.consent__x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.consent__x svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (hover: hover) { .consent__x:hover { background: rgba(29, 29, 31, .07); color: var(--ink); } }
.consent__x + .consent__title { padding-right: 28px; }

/* footer: the Cookie link stands the same 20px from the copyright as the social links stand from each other, no dot between */
.footer .copy { display: flex; flex-wrap: wrap; gap: 0 20px; }
@media (prefers-reduced-motion: reduce) { .seg__thumb { transition: none; } }
