/* ==========================================================================
   Redesign layer: Home v2 (structure pass). Loads after r-home.css on index.html.
   Order: hero · front page (the picks) · posts (filter + list) · stories · who (text only) · newsletter.
   Front page, posts and stories are filled by scripts/build_home.py from data/site.json.
   Colours are tokens only, so both themes come for free.
   ========================================================================== */

/* shared image box: a photo fills it, an ink drawing sits whole inside it, a cutout stands on its bottom edge */

/* 0. First screen, wide layouts: the hero fills the window so that the Front page line is the last thing on it,
   whatever the display setting (macOS More Space / Default / Larger Text change the window's height, not the design).
   The two figures take their height from what is left; any spare room is split above and below them.
   --nav-h is the sticky bar's height; --peek = the front page's top padding (48) + its head (30) + 18 of air under the line.
   ponytail: both are fixed numbers. If the bar or the head changes height, change them here. */
@media (min-width: 901px) {
  .rh { --nav-h: 53px; --peek: 96px; --rh-top: calc(var(--fork-stem) + var(--fork-drop) + 80px);   /* the note and its arrow, with air between the note and the bar */
    --fig-h: clamp(300px, min(30vw, 100svh - var(--nav-h) - var(--peek) - var(--rh-top)), 620px);
    min-height: min(calc(100svh - var(--nav-h) - var(--peek)), 78vw);   /* 78vw: a tall narrow window does not get a mostly empty first screen */ align-content: center; padding-top: var(--rh-top); }
  .rh__mid { align-self: start; padding-bottom: 0; }   /* the words already sat at head height; now they no longer set the row's height */
}
/* a short window (Larger Text): a shorter note arrow and smaller figures, so the line still fits */
@media (min-width: 901px) and (max-height: 700px) {
  .rh { --fork-stem: 28px; --fork-drop: 60px; --rh-top: calc(var(--fork-stem) + var(--fork-drop) + 72px);
    --fig-h: clamp(240px, min(30vw, 100svh - var(--nav-h) - var(--peek) - var(--rh-top)), 620px); }
  .rh__mid { gap: var(--s-4); }
}

/* 1. Front page: the picks (data/site.json → front.picks), one on screen at a time, stepped through with the arrows (r-home2.js).
   Words: title first, nothing above it; the small print is .tz-meta. */
main > .fp.fp.fp.fp { padding-top: var(--s-7) !important; }   /* 48: part of --peek above */
.fp__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--ink); }
.fp__head h2 { color: var(--ink); }
.fp__date { color: var(--ink-2); }
/* words and picture sit next to each other, centred in the page: the words are centred on the picture, the numbers that step through the picks at the bottom.
   Every slide shares the same grid cells; only .is-on is visible. The incoming one fades in, the outgoing one just goes. */
.fz { --fz-pic: min(46%, 704px); --fz-peek: 16px; display: grid; grid-template-columns: minmax(0, 580px) var(--fz-pic); justify-content: center; grid-template-rows: 1fr auto; column-gap: var(--s-9); padding-top: var(--s-6); }
.fz-slide { display: contents; }
.fz-slide__text { grid-column: 1; grid-row: 1; align-self: center; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); color: inherit; }
.fz-slide__pic { grid-column: 2; grid-row: 1 / span 2; }
.fz-slide__img { width: 100%; aspect-ratio: 16 / 10; }
.fz-slide:not(.is-on) > * { visibility: hidden; opacity: 0; }
.fz-slide.is-on > * { position: relative; z-index: 3; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
/* the stack: the next two pictures sit behind the one on screen, each a step smaller and a step further left, so a sliver of each shows */
.fz-slide__pic { transform-origin: left center; }
.fz-slide:is(.is-next, .is-next2) > .fz-slide__pic { position: relative; visibility: visible; opacity: 1; pointer-events: none; }
.fz-slide.is-next > .fz-slide__pic { z-index: 2; transform: translateX(calc(-1 * var(--fz-peek))) scale(0.93); }
.fz-slide.is-next2 > .fz-slide__pic { z-index: 1; transform: translateX(calc(-2 * var(--fz-peek))) scale(0.86); }
.fz-slide__t, .px-row__t { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.fz-slide__t { font-size: clamp(28px, 2.7vw, 46px); line-height: 1.05; letter-spacing: -0.03em; }
.fz-slide__dek { max-width: 46ch; font-size: 19px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
/* the small table: label over value, a hairline above, as under a post's title */
.fz-meta { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-7); width: 100%; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.fz-meta > span { display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.fz-meta .label { color: var(--ink-2); }
.fz__nav { grid-column: 1; grid-row: 2; display: flex; align-items: baseline; gap: var(--s-5); padding-top: var(--s-5); }
.fz-n, .fz-next { padding: 6px 0 3px; border: 0; border-bottom: 1px solid transparent; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); cursor: pointer; transition: color var(--t-fast) var(--ease-out); }
.fz-n { font-variant-numeric: tabular-nums; }
.fz-n[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }   /* the one on screen: underlined like the page you are on in the nav */
.fz-next { margin-left: auto; color: var(--ink); }
:is(.fz-n, .fz-next):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tz-t { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.14em; transition: text-decoration-color var(--t-fast) var(--ease-out); }
.tz-name { display: block; color: var(--ink-2); }   /* a story: the guest's name is the title's first line */
/* the small print: the leading bit in ink */
.tz-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }   /* spaced, no dots: a dot would open the line when it wraps */
.tz-meta b { font-weight: inherit; color: var(--ink); }
.tz-listen { display: inline-flex; align-items: center; color: var(--ink); }
.tz-ico { width: 13px; height: 13px; margin-right: 5px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) {
  :is(.fz-slide__text, .px-row):hover .tz-t { text-decoration-color: currentColor; }
  .px-row:hover .px-row__go { opacity: 1; transform: none; }
  /* the Posts and Stories pages' hover: the other rows dim, the words step right, the arrow slides in */
  :is(.px__list, .sx__list):hover .px-row:not(:hover) { opacity: 0.35; }
  .px-row:hover .px-row__text { transform: translateX(6px); }
  :is(.fz-n, .fz-next):hover { color: var(--ink); }
}
:is(.fz-slide__text, .px-row):focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
@media (max-width: 1100px) { .fz { --fz-pic: 43%; --fz-peek: 10px; column-gap: var(--s-7); grid-template-columns: minmax(0, 1fr) var(--fz-pic); } }
@media (max-width: 760px) {
  /* phone: picture, then words, then the numbers */
  .fz { --fz-peek: 7px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: var(--s-4); padding-top: var(--s-5); }   /* the slivers sit in the page margin */
  .fz-slide__pic { grid-column: 1; grid-row: 1; }
  .fz-slide__text { grid-row: 2; gap: var(--s-3); }
  .fz-slide__dek { font-size: 16px; }
  .fz__nav { grid-row: 3; padding-top: var(--s-2); }
  .fz-slide .fz-meta { flex-wrap: nowrap; column-gap: var(--s-5); }   /* phones: the first three facts, on one line */
  .fz-slide .fz-meta > span:nth-child(n + 4) { display: none; }
}

/* 2. Posts: filter words on the left (they stay in view), every post on the right with its own small picture.
   The picture's box follows the drawing: a small square, a rectangle or a long strip, so the column is a mix of shapes. */
.px { --px-top: 80px; display: grid; grid-template-columns: minmax(180px, 0.55fr) minmax(0, 2.45fr); column-gap: var(--s-7); align-items: start; margin-top: var(--s-7); }
.px__filters { position: sticky; top: var(--px-top); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.px-f { display: inline-flex; align-items: baseline; gap: 8px; padding: 2px 0; border: 0; background: none; font-family: var(--display); font-weight: 500; font-size: clamp(22px, 1.9vw, 27px); line-height: 1.26; letter-spacing: -0.025em; color: var(--ink-2); cursor: pointer; transition: color var(--t-fast) var(--ease-out); }
.px-f span { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.px-f[aria-pressed="true"] { color: var(--ink); }
.px-f:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .px-f:hover { color: var(--ink); } }
.px__list { list-style: none; }
/* the labels once on top, Anthropic-news-table style (labels, line, rows); the rows below carry values only. Right edge = the rows' meta: 16px arrow + 24px gap */
.px-head { display: flex; justify-content: flex-end; padding: 0 calc(16px + var(--s-6)) var(--s-3) 0; border-bottom: 1px solid var(--rule); }   /* labels, then the same dim line as between the rows */
.px-head .fz-meta { width: auto; padding-top: 0; border-top: 0; }
.px-head .label { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.px__list > li[hidden] { display: none; }
.px-row { display: grid; grid-template-columns: 184px minmax(0, 1fr) auto 16px; column-gap: var(--s-6); align-items: start; padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); color: inherit; }
.px-row__img { width: 184px; aspect-ratio: 8 / 5; }
.px-row__img--sq { width: 124px; aspect-ratio: 1 / 1; }
.px-row__img--strip { aspect-ratio: 8 / 3; }
.px-row__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding-top: 2px; }
.px-row__t { font-size: 22px; line-height: 1.18; }
.px-row__dek { max-width: 58ch; font-size: 16px; line-height: 1.42; color: var(--ink-2); text-wrap: pretty; }
/* the small print: the front page's table (label over value) beside the words, without its line on top */
.px-row__meta { padding-top: 4px; }
:is(.px-row__meta, .px-head) .fz-meta { display: grid; grid-template-columns: 128px 96px 104px 64px; gap: var(--s-4); width: auto; padding-top: 0; border-top: 0; }   /* fixed columns, so the facts line up row under row */
:is(.sx-row .px-row__meta, .sx .px-head) .fz-meta { grid-template-columns: 140px 96px 104px; }
.px-row__meta .fz-meta > span { font-size: 15px; white-space: nowrap; }
.px-row__go { padding-top: 6px; font-size: 16px; line-height: 1; opacity: 0; transform: translateX(-8px); transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.px-row { transition: opacity var(--t-fast) var(--ease-out); }
.px-row__text { transition: transform var(--t-fast) var(--ease-out); }
:is(.px__list, .sx__list):has(.px-row:focus-visible) .px-row:not(:focus-visible) { opacity: 0.35; }
@media (prefers-reduced-motion: reduce) { .px-row, .px-row__text, .px-row__go { transition: none; } .px-row:hover .px-row__text { transform: none; } .px-row__go { transform: none; } }
/* under 1440 the four fact columns leave the post titles no room: the facts drop under the words (values only, as on phones) and the labels row goes */
@media (min-width: 761px) and (max-width: 1439px) {
  .px .px-row { grid-template-columns: 184px minmax(0, 1fr) 16px; row-gap: var(--s-2); }
  .px .px-row__meta { grid-column: 2; grid-row: 2; padding-top: 0; }
  .px .px-row__meta .fz-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
  .px .px-row__img { grid-row: 1 / 3; }
  .px .px-row__go { grid-column: 3; grid-row: 1; }
  .px .px-head { display: none; }
  .px .px-row__dek { display: none; }   /* two things under each other at most: title + facts */
  .px .px__list { border-top: 1px solid var(--rule); }
}
@media (max-width: 1100px) {
  .px { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-5); }
  .px__filters { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px var(--s-5); }
  .px-f { font-size: 22px; }
}
@media (max-width: 760px) {
  .px { margin-top: var(--s-5); }
  .px-f { font-size: 20px; }
  .px-row { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--s-4); row-gap: var(--s-2); }
  .px-row__meta { grid-column: 2; padding-top: 0; }
  .px-row__meta .fz-meta, .sx-row .px-row__meta .fz-meta { display: flex; flex-wrap: nowrap; gap: var(--s-4); }   /* one line, never two */
  .px-row__meta { min-width: 0; }
  .px-row__meta .fz-meta > span { display: block; font-size: 14px; flex-shrink: 0; }
  .px-row__meta .fz-meta > span:first-child { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .px-row__meta .fz-meta > span:nth-child(n + 4), .px-row__meta .fz-meta > span:empty { display: none; }
  .px-row__img { width: 96px; grid-row: 1 / 3; }   /* the title and its facts sit together beside the picture */
  .px-row__img--sq { width: 72px; }
  .px-row__go { display: none; }
  .px-row__t, .sx-row .px-row__t { font-size: 16px; }
  .px-head, .px-row__dek { display: none; }
  .px__list { border-top: 1px solid var(--rule); }
}

/* 3. Stories: the same rows as the posts on the left; on the right one guest stands at a time, the one whose row is under
   the pointer (r-home2.js), the first until then, with a hand note pointing at them. No fade: they just swap. */
.sx { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); column-gap: var(--s-7); align-items: start; margin-top: var(--s-7); }
.sx__list { list-style: none; }   /* no line of its own: the section head's line is right above it */
.sx-row { grid-template-columns: 184px minmax(0, 1fr) auto 16px; padding: var(--s-5) 0; }   /* each story with its own picture, like the Posts rows (Vojta, 14 Nov) */
.sx__list > li:first-child .sx-row { padding-top: var(--s-4); }
.sx-row .px-row__t { font-size: clamp(22px, 1.9vw, 28px); }
.sx__stage { display: flex; justify-content: center; align-items: flex-end; padding-top: 76px; }   /* 76: room for the note above the heads */
.sx-fig { position: relative; display: none; }
.sx-fig.is-on { display: block; }
.sx-fig img { display: block; height: clamp(300px, 24vw, 400px); width: auto; }
.sx-note { position: absolute; left: 62%; bottom: calc(100% - 26px); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.sx-note .note__text { font-size: 30px; padding-left: 22px; }
.sx-pen { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }   /* the row → guest arrow; none once the guest stands above the list (≤1100) */
/* under 1700 the facts drop under the title (values only), as in the Posts rows, so the title keeps its room */
@media (min-width: 1101px) and (max-width: 1699px) {
  .sx-row { grid-template-columns: 184px minmax(0, 1fr) 16px; row-gap: var(--s-2); }
  .sx-row .px-row__img { grid-row: 1 / 3; }
  .sx-row .px-row__meta { grid-column: 2; grid-row: 2; padding-top: 0; }
  .sx-row .px-row__meta .fz-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
  .sx-row .px-row__go { grid-column: 3; grid-row: 1; }
  .sx .px-head { display: none; }
  .sx .px-row__dek { display: none; }
}
/* ≤1100 (touch screens, no hover to swap guests): no standing guests */
@media (max-width: 1100px) {
  .sx { grid-template-columns: minmax(0, 1fr); }
  .sx__stage, .sx-pen { display: none; }
  .sx-row .px-row__img { grid-row: 1 / 3; }
  .sx .px-head { display: none; }
  .sx .px-row__dek { display: none; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .sx-row { grid-template-columns: 184px minmax(0, 1fr) 16px; row-gap: var(--s-2); }
  .sx-row .px-row__meta { grid-column: 2; grid-row: 2; padding-top: 0; }
  .sx-row .px-row__meta .fz-meta { display: flex; gap: var(--s-2) var(--s-5); }
  .sx-row .px-row__go { grid-column: 3; grid-row: 1; }
}
@media (max-width: 760px) {
  .sx { margin-top: var(--s-5); }
  .sx-row { grid-template-columns: 96px minmax(0, 1fr); padding: var(--s-4) 0; }
  .sx-row .px-row__t { font-size: 16px; }
}
.px-more { display: inline-block; margin-top: var(--s-5); padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.px-more[hidden] { display: none; }

/* 4. Who are we: the same head and line as Posts and Stories; the opening words on the left, the text on the right,
   set like a post (22px, one sentence a paragraph) */
.rw2__grid { display: grid; grid-template-columns: minmax(0, 640px); justify-content: center; row-gap: var(--s-6); margin-top: var(--s-7); }   /* the lead line above the text, the whole column centred on the page (Vojta, 2026-11-12) */
.rw2__lead { max-width: 640px; font-family: var(--display); font-weight: 500; font-size: clamp(22px, 1.9vw, 27px); line-height: 1.26; letter-spacing: -0.025em; text-wrap: balance; }
.rw2__text { max-width: 640px; font-size: 22px; line-height: 1.6; text-wrap: pretty; }
.rw2__text > p + p { margin-top: 48px; }
.rw2__text > p.s { margin-top: 24px; }
.rw2__text > p.rw2__sub { color: var(--ink-2); }
.rw2__text .stars { margin-top: 48px; font-size: 20px; line-height: 1.5; }
.rw2__sign { margin-top: 48px; }
.rw2__photo { width: 280px; height: auto; margin-top: var(--s-5); border-radius: 2px; }   /* the two of us, a small detail at the end of the text (Vojta, 2026-11-13) */
.rw2__sign .voice { font-size: 28px; line-height: 1.2; }
@media (max-width: 1100px) { .rw2__grid { row-gap: var(--s-5); } .rw2__lead { position: static; max-width: none; } }
@media (max-width: 760px) {
  .rw2__grid { margin-top: var(--s-5); }
  .rw2__text { font-size: 19px; }
  .rw2__text > p + p, .rw2__text .stars, .rw2__sign { margin-top: 36px; }
  .rw2__text > p.s { margin-top: 18px; }
  .rw2__text .stars { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) { .tz-t, .px-f, .fz-n, .fz-next, .fz-slide.is-on > * { transition: none; } }
