/* /blog/ · the list (Site · Blog & changelog). Tong, 15 Oct (review 2.2): "highlight one blog and the rest feel the
   same … a touch of the editorial feeling". The newest post leads, set large; the other five follow, all alike. Every
   card shows its post's own lead figure (/marketing/shared/blog-figures/<slug>-1, review 1.17) on the article figures' grid
   paper, a still that plays on hover (/marketing/studies/blog/cards.js). Editorial = type and rhythm: mono kickers, one big
   title, hairlines, no boxes. Three layouts, from round 1's Blog C (featured post + list) and Blog E (editorial
   title list); the section's data-layout picks one, /blog/?layout= the others, /studies/blog/list/ shows all three:
     feature   the lead post across the page (figure 8 columns, words 4), the five three to a row below (/blog/'s
               own, Tong's pick on 15 Oct)
     bento     the lead post 2 × 2 of a three-column grid, two posts beside it, three under it
     index     one post a row on the page's 12 columns: kicker in 1–4, words from 5, figure in 9–12; the lead
               post's figure and title run 5–12
   The page frame (.site-wrap, .site-hero, .site-sec, .site-head) is the shell's (/marketing/shared/site/site.css); every rule
   here sits under .bx, with tokens from /shared/adam-v1.css. */

.bx {
  --bx-gap: 24px;
  --g1: color-mix(in srgb, var(--ink) 5%, transparent);
  --g2: color-mix(in srgb, var(--ink) 8.5%, transparent);
}
.bx :where(.bx-cards, .bx-cards *, .bx-cards *::before, .bx-cards *::after) { box-sizing: border-box; }
.bx :where(.bx-cards, .bx-card, h2, p, figure) { margin: 0; padding: 0; }
.bx .bx-cards { list-style: none; }
.bx-card a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- one card, any layout */
.bx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px var(--bx-gap); padding-top: 56px; }
.bx-card a { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.bx-thumb {
  position: relative; margin-bottom: 8px; aspect-ratio: 16 / 10; overflow: hidden;
  background-color: var(--surface);
  background-image:
    linear-gradient(to right, var(--g2) 1px, transparent 1px),
    linear-gradient(to bottom, var(--g2) 1px, transparent 1px),
    linear-gradient(to right, var(--g1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--g1) 1px, transparent 1px);
  background-size: calc(100% / 8) calc(100% / 5), calc(100% / 8) calc(100% / 5), calc(100% / 40) calc(100% / 25), calc(100% / 40) calc(100% / 25);
  background-position: -0.5px -0.5px;
}
.bx-k { display: flex; justify-content: space-between; gap: 12px; font: 400 12px/18px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.bx-k .post-date { color: var(--muted); white-space: nowrap; }
.bx-h2 { font: var(--k-weight, 400) 28px/1.15 var(--font-display); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.bx-card a:hover .bx-h2, .bx-card a:focus-visible .bx-h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.bx-card a:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 6px; }
.bx-ex { font: 400 14px/21px var(--font-body); color: var(--muted); text-wrap: pretty; }
.bx-by { display: none; font: 400 14px/21px var(--font-body); color: var(--muted); }
.bx-read { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; margin-top: auto; font: 400 12px/18px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.bx-read svg { width: 16px; height: 16px; flex: none; }
/* the lead post: its title at H2 size, its excerpt at lead size, its byline (author · date) in place of the kicker's date */
.bx-card.is-feature .bx-h2 { font-size: var(--k-h2, clamp(40px, 4.45vw, 64px)); line-height: var(--leading-display, 1); letter-spacing: var(--k-track-h2, -.025em); }
.bx-card.is-feature .bx-ex { font: 400 var(--k-lead, clamp(18px, 1.53vw, 22px))/1.4 var(--font-body); letter-spacing: -.01em; color: var(--ink-2); }
.bx-card.is-feature .bx-k .post-date { display: none; }
.bx-card.is-feature .bx-by { display: block; }

/* ---------------------------------------------------------------- feature: the lead across the page, the five three to a row */
.bx[data-layout="feature"] .bx-cards { gap: 64px var(--bx-gap); }
.bx[data-layout="feature"] .is-feature { grid-column: 1 / -1; padding-bottom: 64px; border-bottom: 1px solid var(--line); }
.bx[data-layout="feature"] .is-feature a { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr auto; column-gap: 0; row-gap: 20px; }
.bx[data-layout="feature"] .is-feature .bx-thumb { grid-column: 1 / span 8; grid-row: 1 / -1; margin: 0 var(--bx-gap) 0 0; }
.bx[data-layout="feature"] .is-feature :is(.bx-k, .bx-h2, .bx-ex, .bx-by, .bx-read) { grid-column: 9 / -1; }
.bx[data-layout="feature"] .is-feature .bx-read { grid-row: 5; }

/* ---------------------------------------------------------------- bento: the lead 2 × 2, two beside, three under */
.bx[data-layout="bento"] .is-feature { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.bx[data-layout="bento"] .is-feature .bx-thumb { margin-bottom: 16px; }

/* ---------------------------------------------------------------- index: rows on the 12 columns, hairlines */
.bx[data-layout="index"] .bx-cards { display: block; padding-top: 0; }
.bx[data-layout="index"] .bx-card { border-top: 1px solid var(--line); transition: border-color .2s ease; }
.bx[data-layout="index"] .bx-card:first-child { border-top: 0; }
.bx[data-layout="index"] .bx-card:not(.is-feature):hover { border-top-color: var(--accent); }
.bx[data-layout="index"] .bx-card:hover + .bx-card:not(.is-feature) { border-top-color: var(--accent); }
.bx[data-layout="index"] .bx-card a { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr; column-gap: 0; row-gap: 12px; padding: 32px 0; }
.bx[data-layout="index"] .bx-k { grid-column: 1 / span 4; grid-row: 1; flex-direction: column; justify-content: flex-start; gap: 4px; padding-right: var(--bx-gap); }
.bx[data-layout="index"] :is(.bx-h2, .bx-ex, .bx-read) { grid-column: 5 / span 4; padding-right: var(--bx-gap); }
.bx[data-layout="index"] .bx-h2 { grid-row: 1; }
.bx[data-layout="index"] .bx-ex { grid-row: 2; }
.bx[data-layout="index"] .bx-read { grid-row: 3; margin-top: 8px; }
.bx[data-layout="index"] .bx-thumb { grid-column: 9 / -1; grid-row: 1 / -1; margin: 0; }
.bx[data-layout="index"] .is-feature a { padding: 56px 0 64px; grid-template-rows: auto auto auto auto auto; row-gap: 20px; }
.bx[data-layout="index"] .is-feature .bx-thumb { grid-column: 5 / -1; grid-row: 1; margin-bottom: 12px; }
.bx[data-layout="index"] .is-feature .bx-k { grid-row: 1; }
.bx[data-layout="index"] .is-feature :is(.bx-h2, .bx-ex, .bx-by) { grid-column: 5 / span 7; padding-right: var(--bx-gap); }
.bx[data-layout="index"] .is-feature .bx-h2 { grid-row: 2; }
.bx[data-layout="index"] .is-feature .bx-ex { grid-row: 3; }
.bx[data-layout="index"] .is-feature .bx-by { grid-row: 4; }
.bx[data-layout="index"] .is-feature .bx-read { grid-column: 5 / -1; grid-row: 5; }

/* ---------------------------------------------------------------- the hero's figure beside "Blog" (review 2.4) */
/* "Blog" and its lead sit together on the figure's bottom edge */
.bx-hero { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: 1fr auto auto; column-gap: var(--bx-gap, 24px); }
.bx-hero > :not(.bx-hero-fig) { grid-column: 1; }
.bx-hero > .site-h1 { grid-row: 2; }
.bx-hero > .site-lead { grid-row: 3; }
.bx-hero .bx-hero-fig { grid-column: 2; grid-row: 1 / -1; margin: 0; }
.bx-hero .bf-art {
  --g1: color-mix(in srgb, var(--ink) 5%, transparent); --g2: color-mix(in srgb, var(--ink) 8.5%, transparent);
  position: relative; aspect-ratio: var(--ar, 4 / 3); overflow: hidden; background-color: var(--surface);
  background-image: linear-gradient(to right, var(--g2) 1px, transparent 1px), linear-gradient(to bottom, var(--g2) 1px, transparent 1px), linear-gradient(to right, var(--g1) 1px, transparent 1px), linear-gradient(to bottom, var(--g1) 1px, transparent 1px);
  background-size: calc(100% / 8) calc(100% / 6), calc(100% / 8) calc(100% / 6), calc(100% / 40) calc(100% / 30), calc(100% / 40) calc(100% / 30);
  background-position: -0.5px -0.5px;
}
@media (max-width: 1023px) { .bx-hero { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 767px) {
  .bx-hero { display: block; }
  .bx-hero .bx-hero-fig { max-width: 400px; margin-top: 32px; }
}

/* ---------------------------------------------------------------- narrower */
/* below 1280 the cards go two to a row: a figure under about 360 px wide crowds its labels */
@media (max-width: 1279px) {
  .bx-cards, .bx[data-layout="feature"] .bx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bx[data-layout="bento"] .is-feature { grid-column: 1 / -1; grid-row: auto; }
  /* a lone last card runs across the row: figure left, words right (as the home band on tablets) */
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) { grid-column: 1 / -1; }
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) a { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--bx-gap); row-gap: 12px; align-content: start; }
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) .bx-thumb { grid-column: 1; grid-row: 1 / span 5; margin: 0; }
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) a > :not(.bx-thumb) { grid-column: 2; }
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) .bx-read { margin-top: 0; }
  /* index: kicker in 1–3, words 4–7, the figure 8–12 */
  .bx[data-layout="index"] .bx-k { grid-column: 1 / span 3; }
  .bx[data-layout="index"] :is(.bx-h2, .bx-ex, .bx-read) { grid-column: 4 / span 4; }
  .bx[data-layout="index"] .bx-thumb { grid-column: 8 / -1; }
  .bx[data-layout="index"] .is-feature .bx-thumb { grid-column: 4 / -1; }
  .bx[data-layout="index"] .is-feature :is(.bx-h2, .bx-ex, .bx-by, .bx-read) { grid-column: 4 / -1; }
}
@media (max-width: 1023px) {
  .bx-h2 { font-size: 24px; line-height: 1.2; }
  .bx[data-layout="feature"] .is-feature a { display: flex; }
  .bx[data-layout="feature"] .is-feature .bx-thumb { margin: 0 0 8px; }
  /* index: kicker over the words in 1–6, the figure in 7–12; the lead post one column */
  .bx[data-layout="index"] .bx-k { grid-column: 1 / span 6; flex-direction: row; justify-content: space-between; }
  .bx[data-layout="index"] :is(.bx-h2, .bx-ex, .bx-read) { grid-column: 1 / span 6; }
  .bx[data-layout="index"] .bx-h2 { grid-row: 2; }
  .bx[data-layout="index"] .bx-ex { grid-row: 3; }
  .bx[data-layout="index"] .bx-read { grid-row: 4; margin-top: 0; }
  .bx[data-layout="index"] .bx-card a { grid-template-rows: auto auto auto auto 1fr; }
  .bx[data-layout="index"] .bx-thumb { grid-column: 7 / -1; }
  .bx[data-layout="index"] .is-feature a { grid-template-rows: auto auto auto auto auto auto; }
  .bx[data-layout="index"] .is-feature .bx-k { grid-row: 1; }
  .bx[data-layout="index"] .is-feature .bx-thumb { grid-column: 1 / -1; grid-row: 2; }
  .bx[data-layout="index"] .is-feature :is(.bx-h2, .bx-ex, .bx-by, .bx-read) { grid-column: 1 / -1; padding-right: 0; }
  .bx[data-layout="index"] .is-feature .bx-h2 { grid-row: 3; }
  .bx[data-layout="index"] .is-feature .bx-ex { grid-row: 4; }
  .bx[data-layout="index"] .is-feature .bx-by { grid-row: 5; }
  .bx[data-layout="index"] .is-feature .bx-read { grid-row: 6; }
}
@media (max-width: 767px) {
  .bx { --bx-gap: 16px; }
  .bx-cards, .bx[data-layout="feature"] .bx-cards { grid-template-columns: 1fr; gap: 48px; padding-top: 40px; }
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) a { display: flex; }
  .bx:is([data-layout="feature"], [data-layout="bento"]) .bx-card:last-child:nth-child(even) .bx-thumb { margin: 0 0 8px; }
  .bx[data-layout="feature"] .is-feature { padding-bottom: 48px; }
  /* index on a phone: kicker, figure, words, one under the other */
  .bx[data-layout="index"] .bx-card a, .bx[data-layout="index"] .is-feature a { display: flex; padding: 28px 0 32px; }
  .bx[data-layout="index"] .bx-k { flex-direction: row; justify-content: space-between; padding: 0; }
  .bx[data-layout="index"] .bx-thumb { order: -1; margin: 0 0 8px; }
  .bx[data-layout="index"] :is(.bx-h2, .bx-ex, .bx-read), .bx[data-layout="index"] .is-feature :is(.bx-h2, .bx-ex, .bx-by) { padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .bx[data-layout="index"] .bx-card { transition: none; } }
