/*
  Blog pages: the index, the category page and the shared card (static HTML from build/site.mjs; blog.js wires the
  category menu and the carousel arrows). Our type (type.css),
  colors and buttons (the style guide), Clay's layout (docs/research/2026-10-20-clay-blog-index.md).
  Load after type.css and nav.css. Breakpoints are Clay's: 768, 1250, 1550 and 1900 px.
  Motion uses the guide's curve and stays under 300 ms. Reduced motion keeps color and opacity only.
  Two neutrals the guide lacks (to add to it): Slate #5b6270, muted text on white (6.1:1), and Hairline #d2d2d7, the
  rule between sections (the guide's pending light neutral).
  The post page (post.html, post.css) depends on these names; rename none without changing it too: .blog-page,
  .blog-container, .blog-section--light, .blog-cover (with --cover), .blog-button, .blog-tabs, .blog-card, and the
  variables --night, --slate, --hairline, --anchor, --anchor-deep, --ease-out and --gutter.
  The case study pages (src/components/work/work.css) depend on the same names, plus .blog-section--dark,
  .blog-button--white, .blog-sr, the :where reset under .blog-page main, and the [data-site-nav] current-page rule.
  A post and a case study share the copy link button and its toast (.post-share__btn, .post-toast: copy.js), so they are here.
  The print rules at the end cover a post, a case study and the legal pages, which all load this file.
*/

.blog-page {
  --night: #0c0e12;
  --slate: #5b6270;
  --hairline: #d2d2d7;
  --anchor: #2563eb;
  --anchor-deep: #1d4ed8;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: 24px;
  margin: 0;
  background-color: #fff;
  color: var(--night);
}
@media (min-width: 768px) { .blog-page { --gutter: 40px; } }
@media (min-width: 1250px) { .blog-page { --gutter: 75px; } }

/* The page works without Tailwind's reset, so it keeps its own. Zero specificity, so every rule below wins over it. */
:where(.blog-page main) *,
:where(.blog-page main) ::before,
:where(.blog-page main) ::after { box-sizing: border-box; }
:where(.blog-page main) :where(h1, h2, h3, h4, p, ul, ol, figure) { margin: 0; padding: 0; }
:where(.blog-page main) :where(ul, ol) { list-style: none; }
:where(.blog-page main) :where(img) { display: block; max-width: 100%; }
:where(.blog-page main) :where(a) { color: inherit; text-decoration: none; }
:where(.blog-page main) :where(button) { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

.blog-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The nav bar is the home page's glass (Night at 45%, blurred), over white too: Rahul's call, 2026-10-20, after
   trying a glassier version the same evening. The current page is white on a white 8% pill. */
.blog-page [data-site-nav] a[aria-current] { color: #fff; background-color: rgba(255, 255, 255, 0.08); }

/* ── Page width ── */
.blog-container { margin-inline: var(--gutter); }
@media (min-width: 1550px) { .blog-container { width: 100%; max-width: 1400px; margin-inline: auto; } }
@media (min-width: 1900px) { .blog-container { max-width: 1536px; } }
@media (min-width: 2048px) { .blog-container { width: auto; max-width: none; margin-inline: 192px; } }

/* Rows that run to the edge of the screen but start where the page content starts (the carousel, the band) */
.blog-bleed { --edge: var(--gutter); padding-inline: var(--edge); scroll-padding-inline: var(--edge); }
@media (min-width: 1550px) { .blog-bleed { --edge: max(var(--gutter), calc((100% - 1400px) / 2)); } }
@media (min-width: 1900px) { .blog-bleed { --edge: calc((100% - 1536px) / 2); } }
@media (min-width: 2048px) { .blog-bleed { --edge: 192px; } }

.blog-section { overflow-x: clip; }
.blog-section--dark { --fg: #fff; --muted: rgba(255, 255, 255, 0.7); background-color: var(--night); color: #fff; }
.blog-section--light { --fg: var(--night); --muted: var(--slate); background-color: #fff; color: var(--night); }

/* ── Focus: Anchor Blue on white, white on Night, 2 px away ── */
.blog-page main :is(a, button):focus-visible { outline: 2px solid var(--ring, var(--anchor)); outline-offset: 2px; }
.blog-section--dark { --ring: #fff; }

/* ── A link inside a line of text (a category's service line, the author's bio): underlined, Anchor Blue on white, white on Night ── */
.blog-page main .blog-link { color: var(--link, var(--anchor)); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 150ms var(--ease-out); }
.blog-page main .blog-link:hover { color: var(--link-hover, var(--anchor-deep)); }
.blog-section--dark { --link: #fff; --link-hover: rgba(255, 255, 255, 0.75); }

/* ── Page header ── */
.blog-hero { padding-bottom: 56px; padding-top: 96px; }
@media (min-width: 768px) { .blog-hero { padding-top: 116px; padding-bottom: 64px; } }
@media (min-width: 1250px) { .blog-hero { padding-top: 128px; padding-bottom: 72px; } }

.blog-hero__title { margin-top: 40px; margin-bottom: 24px; color: var(--fg); }
@media (min-width: 768px) { .blog-hero__title { margin-top: 88px; margin-bottom: 28px; } }
@media (min-width: 1250px) { .blog-hero__title { margin-top: 94px; } }
@media (min-width: 1900px) { .blog-hero__title { margin-top: 156px; margin-bottom: 24px; } }

.blog-hero__row { display: flex; flex-direction: column; margin-bottom: 28px; }
@media (min-width: 768px) { .blog-hero__row { flex-direction: row; align-items: flex-end; margin-bottom: 24px; } }
@media (min-width: 1250px) { .blog-hero__row { align-items: flex-start; margin-bottom: 64px; } }
.blog-hero__row--bare { margin-bottom: 0; }
/* A list page with no carousel (the archive, a category under seven posts): the cards follow the intro, one gap apart */
.blog-hero--plain { padding-bottom: 0; }
.blog-hero--plain .blog-hero__row { margin-bottom: 0; }
.blog-hero--plain + .blog-all { padding-top: 48px; }
.blog-hero--plain + .blog-all .blog-all__list { margin-top: 0; }
@media (min-width: 768px) { .blog-hero--plain + .blog-all { padding-top: 64px; } }
@media (min-width: 1250px) { .blog-hero--plain + .blog-all { padding-top: 72px; } }
.blog-hero__intro { width: 84%; margin-bottom: 16px; color: var(--fg); }
@media (min-width: 768px) { .blog-hero__intro { width: 66%; margin-bottom: 0; } }
@media (min-width: 1250px) { .blog-hero__intro { width: 80%; } .blog-hero__intro--narrow { width: 60%; } }
.blog-hero__controls { display: flex; margin-left: auto; color: var(--fg); }
@media (max-width: 767px) { .blog-hero__controls { margin-right: -8px; } }
@media (min-width: 1250px) { .blog-hero__controls { margin-top: 2px; } }
.blog-hero__controls[hidden] { display: none; }

/* ── Category tabs: a row from 768 px; below that a menu, as a full-width panel under the toggle like Clay's ── */
.blog-tabs { position: relative; min-height: 44px; color: var(--fg, var(--night)); }
@media (min-width: 768px) { .blog-tabs { min-height: 32px; } }
.blog-tabs__toggle { display: flex; align-items: center; gap: 12px; height: 44px; padding-right: 8px; }
.blog-tabs__toggle svg { width: 14px; height: 14px; transition: transform 200ms var(--ease-out); }
.blog-tabs__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.blog-tabs__list { display: none; }
.blog-tabs[data-open] .blog-tabs__list {
  display: block;
  position: absolute;
  top: 100%;
  left: calc(-1 * var(--gutter));
  z-index: 5;
  width: calc(100% + 2 * var(--gutter));
  padding: 12px var(--gutter) 24px;
  opacity: 1;
  transform: none;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
@starting-style { .blog-tabs[data-open] .blog-tabs__list { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 767px) {
  .blog-tabs__list { background-color: #fff; border-bottom: 1px solid var(--hairline); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); }
  .blog-section--dark .blog-tabs__list { background-color: var(--night); border-bottom-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
}
.blog-tabs__link { display: flex; align-items: center; min-height: 44px; font-size: 1.125rem; color: var(--muted, var(--slate)); transition: color 150ms var(--ease-out); }
.blog-tabs__link:hover,
.blog-tabs__link[aria-current="page"] { color: var(--fg, var(--night)); }
.blog-tabs__link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }
@media (min-width: 768px) {
  .blog-tabs__toggle { display: none; }
  .blog-tabs__list,
  .blog-tabs[data-open] .blog-tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    position: static;
    width: auto;
    margin-left: -10px;
    padding: 0;
    transition: none;
  }
  .blog-tabs__link { min-height: 0; padding: 3px 10px; border-radius: 6px; font-size: 1rem; }
}
/* Without a script the toggle cannot open the menu, so a phone shows the categories as a plain list of links (each page's
   head sets the js class before anything paints) */
@media (max-width: 767px) {
  html:not(.js) .blog-tabs__toggle { display: none; }
  html:not(.js) .blog-tabs__list { display: flex; flex-wrap: wrap; column-gap: 20px; background: none; border: 0; box-shadow: none; }
}

/* ── Carousel arrows ── */
.blog-arrow { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; transition: opacity 150ms var(--ease-out), scale 160ms var(--ease-out); }
.blog-arrow::after { content: ""; position: absolute; inset: -6px; }   /* a 44 px place to tap around the 32 px arrow */
.blog-arrow:first-child { margin-right: 18px; }
.blog-arrow svg { width: 24px; height: 24px; }
.blog-arrow svg * { vector-effect: non-scaling-stroke; }
.blog-arrow[aria-disabled="true"] { opacity: 0.2; cursor: default; }
@media (min-width: 768px) { .blog-arrow:first-child { margin-right: 38px; } .blog-arrow svg { width: 32px; height: 32px; } }
@media (min-width: 1250px) { .blog-arrow { width: 40px; height: 40px; } .blog-arrow:first-child { margin-right: 30px; } .blog-arrow svg { width: 40px; height: 40px; } }
@media (hover: hover) and (pointer: fine) { .blog-arrow:not([aria-disabled="true"]):hover { opacity: 0.4; } }
.blog-arrow:not([aria-disabled="true"]):active { scale: 0.97; }

/* ── Carousel: slides step one at a time and run to the screen edge ── */
.blog-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.blog-carousel::-webkit-scrollbar { display: none; }
.blog-slide { flex: 0 0 auto; width: 312px; scroll-snap-align: start; }
@media (min-width: 768px) { .blog-carousel { gap: 16px; } .blog-slide { width: 628px; } }
@media (min-width: 1250px) { .blog-carousel { gap: 12px; } .blog-slide { width: 870px; } }
@media (min-width: 1900px) { .blog-slide { width: 1170px; } }
/* One slide only: it does not fill the row, and nothing scrolls */
@media (min-width: 768px) { .blog-slide--single { width: 91%; } }
@media (min-width: 1250px) { .blog-slide--single { width: 83%; } }
/* The index when the blog has one post in all: a card across the whole row, and a wider, shorter one than a slide so
   its title stays in view on a laptop screen (4:5 on a phone, 2:1 from 768, 3:1 from 1250) */
.blog-slide--feature { width: 100%; }
.blog-slide--feature .blog-card--slide .blog-cover { aspect-ratio: 4 / 5; }
@media (min-width: 768px) { .blog-slide--feature .blog-card--slide .blog-cover { aspect-ratio: 2 / 1; } }
@media (min-width: 1250px) { .blog-slide--feature .blog-card--slide .blog-cover { aspect-ratio: 3 / 1; } }

/* ── Cover: the picture, or a flat block in the category color ── */
.blog-cover { position: relative; overflow: hidden; border-radius: 16px; background-color: var(--cover, #3b82f6); }
.blog-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms var(--ease-out); }

/* ── Card ── */
/* The whole card is one link, so under a finger it presses in a little as the buttons do. Not under a mouse: the card would shrink away from
   the pointer and a click ending within a few px of its edge would land outside it; a mouse has the hover underline and zoom instead. */
.blog-card { position: relative; min-width: 0; transition: scale 160ms var(--ease-out); }
@media (hover: none), (pointer: coarse) { .blog-card:active { scale: 0.97; } }
/* The title is the link; this stretches it over the whole card, and the focus ring goes around the card */
.blog-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.blog-page main .blog-card__link:focus-visible { outline: none; }
.blog-page main .blog-card__link:focus-visible::after { outline: 2px solid var(--ring, var(--anchor)); outline-offset: 4px; }
.blog-page main :is(.blog-card--slide, .blog-card--tall) .blog-card__link:focus-visible::after { outline: 3px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 0 6px rgba(12, 14, 18, 0.55); }
@media (hover: hover) and (pointer: fine) {
  .blog-card:hover .blog-cover img { transform: scale(1.04); }
  .blog-card:hover .blog-card__link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
}

.blog-card__title { margin-top: 8px; color: var(--fg); }
.blog-card--grid .blog-card__title { margin-top: 12px; }
.blog-card--category .blog-card__title { margin-top: 16px; }
.blog-card__excerpt {
  margin-top: 8px;
  color: var(--night);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
@media (min-width: 768px) { .blog-card__excerpt { -webkit-line-clamp: 4; } }
/* A post without a cover: no block of flat color. A grid or category card opens on a thin rule in its category's color; a slide
   or tall card is a lifted Night, ringed so it shows on a Night page, with that rule along its top and no fade */
.blog-card__rule { height: 4px; border-radius: 9999px; background-color: var(--cover, #3b82f6); }
.blog-card--bare .blog-card__title { margin-top: 16px; }
.blog-card--bare:is(.blog-card--slide, .blog-card--tall) .blog-cover { background-color: #171a21; box-shadow: inset 0 4px 0 var(--cover, #3b82f6), inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.blog-card--bare:is(.blog-card--slide, .blog-card--tall) .blog-scrim { display: none; }
.blog-card__excerpt + .blog-meta { margin-top: 16px; }
@media (min-width: 1250px) { .blog-card--grid .blog-card__title { margin-top: 16px; } .blog-card__excerpt { margin-top: 12px; } }

/* Covers by card: Clay's ratios (the grids are 2:1 on desktop, the category page is square) */
.blog-card--category .blog-cover { aspect-ratio: 1 / 1; }
.blog-card--grid .blog-cover { aspect-ratio: 327 / 182; }
@media (min-width: 768px) { .blog-card--grid .blog-cover { aspect-ratio: 336 / 182; } .blog-card--grid.blog-card--big .blog-cover { aspect-ratio: 344 / 189; } }
@media (min-width: 1250px) { .blog-card--grid .blog-cover, .blog-card--grid.blog-card--big .blog-cover { aspect-ratio: 2 / 1; } }

/* Dates and reading time. Every item has a slot on its left with a dot in it. The row is shifted left by one slot and
   clipped, so the slot of an item that starts a line is out of sight: a wrapped line never starts or ends with a dot. */
.blog-meta { --slot: 16px; margin-top: 12px; overflow: hidden; color: var(--muted); }
.blog-meta__row { display: flex; flex-wrap: wrap; margin-left: calc(-1 * var(--slot)); }
.blog-meta__item { position: relative; padding-left: var(--slot); white-space: nowrap; }
.blog-meta__item::before { content: ""; position: absolute; top: 50%; left: calc(var(--slot) / 2 - 1px); width: 2px; height: 2px; background-color: currentcolor; }
@media (min-width: 1250px) { .blog-meta { --slot: 22px; } }

/* Overlay cards: the slide and the guide. The cover and the text share one grid cell; the text sits on the picture
   over a dark fade, at the bottom for a slide and at the top for a guide. */
.blog-card--slide,
.blog-card--tall { display: grid; overflow: hidden; border-radius: 16px; color: #fff; }
.blog-card--slide > *,
.blog-card--tall > * { grid-area: 1 / 1; }
.blog-card--slide .blog-cover,
.blog-card--tall .blog-cover { border-radius: 0; }
.blog-card--slide .blog-cover { aspect-ratio: 311 / 456; }
.blog-card--tall .blog-cover { aspect-ratio: 311 / 425; }
@media (min-width: 768px) { .blog-card--slide .blog-cover { aspect-ratio: 628 / 346; } .blog-card--tall .blog-cover { aspect-ratio: 336 / 450; } }
@media (min-width: 1250px) { .blog-card--tall .blog-cover { aspect-ratio: 500 / 673; } }
@media (min-width: 1900px) { .blog-card--slide .blog-cover { aspect-ratio: 1170 / 620; } }
.blog-scrim { z-index: 1; pointer-events: none; }
.blog-card--slide .blog-scrim { background: linear-gradient(to top, rgba(12, 14, 18, 0.86) 0%, rgba(12, 14, 18, 0.6) 38%, rgba(12, 14, 18, 0) 72%); }
.blog-card--tall .blog-scrim { background: linear-gradient(to bottom, rgba(12, 14, 18, 0.86) 0%, rgba(12, 14, 18, 0.6) 30%, rgba(12, 14, 18, 0) 62%); }
.blog-card__text { z-index: 2; color: #fff; }
.blog-card--slide .blog-card__text { align-self: end; padding: 0 16px 16px; }
/* Phones: a slide's title sits at the top of the card, as the tall cards' do, so the first post's title is on the first screen */
@media (max-width: 767.98px) {
  .blog-card--slide .blog-card__text { align-self: start; padding: 20px 16px 0; }
  .blog-card--slide .blog-scrim { background: linear-gradient(to bottom, rgba(12, 14, 18, 0.86) 0%, rgba(12, 14, 18, 0.6) 38%, rgba(12, 14, 18, 0) 72%); }
}
.blog-card--tall .blog-card__text { align-self: start; padding: 20px 16px 0; }
/* The title is all the text on an overlay card (no label above it: Rahul bans them), so it starts at the card's padding */
.blog-card--slide .blog-card__title,
.blog-card--tall .blog-card__title { margin-top: 0; color: #fff; }
.blog-card--tall .blog-card__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
@media (min-width: 768px) { .blog-card--slide .blog-card__text { padding: 0 102px 20px 20px; } }
@media (min-width: 1250px) { .blog-card--slide .blog-card__text { padding: 0 22% 22px 28px; } }
@media (min-width: 1900px) { .blog-card--slide .blog-card__text { padding: 0 41% 28px 32px; } }

/* ── Section heading ── */
.blog-head__title { margin-left: 0; color: var(--fg); }
.blog-head__text { margin-top: 20px; color: var(--fg); max-width: 100%; }
@media (min-width: 768px) { .blog-grid .blog-head__title, .blog-band .blog-head__title, .blog-head__text { max-width: 58%; } }
@media (min-width: 1250px) { .blog-head__title { margin-left: -3px; } .blog-head__text { max-width: 66%; } }

/* ── The "View all" button under a list ── */
.blog-more { display: flex; justify-content: center; margin-top: 48px; }
/* "View all ..." under a list: a text link with the arrow, 44 px tall, underlined; the filled blue is for booking only */
.blog-more__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--night); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: rgb(12 14 18 / 0.3); text-underline-offset: 6px; transition: text-decoration-color 150ms var(--ease-out); }
.blog-more__link svg { width: 20px; height: 20px; transition: translate 150ms var(--ease-out); }
.blog-more__link--white { color: #fff; text-decoration-color: rgb(255 255 255 / 0.4); }
.blog-page main .blog-more__link:focus-visible { outline: 2px solid var(--ring, var(--anchor)); outline-offset: 4px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) { .blog-more__link:hover { text-decoration-color: currentColor; } .blog-more__link:hover svg { translate: 4px 0; } }
.blog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 9999px;
  background-color: var(--anchor);
  color: #fff;
  transition: scale 160ms var(--ease-out), background-color 150ms var(--ease-out);
}
.blog-button:active { scale: 0.97; }
.blog-button svg { width: 20px; height: 20px; transition: translate 150ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .blog-button:hover { background-color: var(--anchor-deep); } .blog-button:hover svg { translate: 4px 0; } }
/* On Night: the guide's white pill */
.blog-button--white { height: 52px; padding: 0 20px 0 24px; background-color: #fff; color: #171717; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.08); }
@media (hover: hover) and (pointer: fine) { .blog-button--white:hover { background-color: #fafafa; } }
.blog-button--white svg { color: #404040; }

/* ── The band: one category as a dark section with three tall cards (Clay's design guides) ── */
.blog-band { padding-top: 56px; padding-bottom: 32px; }
@media (min-width: 768px) { .blog-band { padding-top: 80px; padding-bottom: 64px; } }
@media (min-width: 1440px) { .blog-band { padding-top: 120px; padding-bottom: 100px; } }
.blog-band__list { display: flex; gap: 16px; margin-top: 44px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.blog-band__list::-webkit-scrollbar { display: none; }
.blog-band__list > li { flex: 1 0 311px; scroll-snap-align: start; }
@media (min-width: 768px) { .blog-band__list { margin-top: 40px; } .blog-band__list > li { flex-basis: 336px; } }
/* From 1250 px the band's four cards share the row (it scrolls below that, a card at a time), with the titles at .t-h3's
   smallest size and four lines, so a long title still reads whole in a quarter of the row */
@media (min-width: 1250px) {
  .blog-band__list { margin-top: 48px; gap: 18px; }
  .blog-band__list > li { flex: 1 1 0; min-width: 0; }
  .blog-band .blog-card--tall .blog-card__title { font-size: 1.5rem; -webkit-line-clamp: 4; }
}
.blog-band .blog-more { margin-top: 32px; }
@media (min-width: 768px) { .blog-band .blog-more { margin-top: 40px; } }
@media (min-width: 1250px) { .blog-band .blog-more { margin-top: 58px; } }
@media (min-width: 1440px) { .blog-band .blog-more { margin-top: 75px; } }

/* ── Latest and a category section on the index: the first card is the big one ── */
.blog-grid { padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 768px) { .blog-grid { padding-top: 64px; padding-bottom: 64px; } }
@media (min-width: 1250px) { .blog-grid { padding-top: 80px; } }
@media (min-width: 1440px) { .blog-grid { padding-bottom: 80px; } }
.blog-grid__list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 12px; margin-top: 40px; }
.blog-grid__list > li { grid-column: span 6; }
@media (min-width: 575px) { .blog-grid__list > li { grid-column: span 3; } }
@media (min-width: 768px) { .blog-grid__list { grid-template-columns: repeat(12, 1fr); } .blog-grid__list > li { grid-column: span 6; } .blog-grid__list > li:first-child { grid-column: span 12; } }
@media (min-width: 1250px) { .blog-grid__list { gap: 48px 24px; margin-top: 56px; } .blog-grid__list > li { grid-column: span 4; } .blog-grid__list > li:first-child { grid-column: span 8; } }
@media (min-width: 1440px) { .blog-grid__list { row-gap: 56px; } }
@media (max-width: 574px) { .blog-grid__list > li:first-child { grid-column: span 6; } }
@media (min-width: 575px) and (max-width: 767px) { .blog-grid__list > li:first-child { grid-column: span 6; } }
/* On phones a category section shows its newest post and the button, nothing between (Rahul, 2026-10-22). Latest and the band keep every card. */
@media (max-width: 767px) { .blog-grid--category .blog-grid__list > li:nth-child(n + 2) { display: none; } }
.blog-grid__list > li:first-child .blog-card__title { margin-top: 16px; }
@media (min-width: 768px) { .blog-grid__list > li:first-child .blog-card__title { margin-top: 20px; } }
@media (min-width: 1250px) { .blog-grid__list > li:first-child .blog-card__title { margin-top: 16px; } }
/* The big card (the first in a section) from 1250 px: the same as .t-h3 in type.css */
@media (min-width: 1250px) {
  .blog-grid__list > li:first-child .blog-card__title { font-family: var(--font-display); font-size: clamp(1.5rem, 1.293rem + 0.884vw, 2rem); font-weight: 600; line-height: 1.15; letter-spacing: 0; }
}
.blog-rule { margin-inline: var(--gutter); border: 0; border-top: 1px solid var(--hairline); }
@media (min-width: 1550px) { .blog-rule { width: 100%; max-width: 1400px; margin-inline: auto; } }
@media (min-width: 1900px) { .blog-rule { max-width: 1536px; } }
@media (min-width: 2048px) { .blog-rule { width: auto; max-width: none; margin-inline: 192px; } }
.blog-grid .blog-more { margin-top: 56px; }
@media (min-width: 1250px) { .blog-grid .blog-more { margin-top: 58px; } }

/* ── Category page: every post, three, two or one across, nine or ten a page ── */
.blog-all { padding-top: 40px; padding-bottom: 80px; }
@media (min-width: 768px) { .blog-all { padding-bottom: 124px; } }
@media (min-width: 1250px) { .blog-all { padding-top: 80px; padding-bottom: 100px; } }
.blog-all__list { display: grid; gap: 56px; margin-top: 32px; }
@media (min-width: 768px) { .blog-all__list { grid-template-columns: 1fr 1fr; gap: 80px 32px; margin-top: 40px; } }
@media (min-width: 1250px) { .blog-all__list { grid-template-columns: repeat(3, 1fr); } }
.blog-empty { margin-top: 40px; color: var(--muted); }
.blog-empty a { color: var(--anchor); text-decoration: underline; text-underline-offset: 3px; }

/* ── Author page: the photo beside the name and role, the short bio, the links, then the category page's list ── */
.blog-author__head { display: flex; align-items: center; gap: 20px; margin-top: 40px; }
.blog-author__photo { width: 96px; height: 96px; flex: none; border-radius: 9999px; object-fit: cover; }
.blog-author__name { margin: 0; color: var(--fg); }
.blog-author__role { margin: 4px 0 0; color: var(--muted); }
.blog-author__bio { max-width: 747px; margin: 28px 0 0; color: var(--fg); }
.blog-author__links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 20px 0 0; padding: 0; list-style: none; }
.blog-author__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--anchor); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ── Pagination ── */
.blog-pagination { display: flex; justify-content: center; padding-top: 64px; }
@media (min-width: 1250px) { .blog-pagination { padding-top: 80px; } }
.blog-pagination ul { display: flex; align-items: center; }
.blog-pagination li + li { margin-left: 4px; }
@media (min-width: 768px) { .blog-pagination li + li { margin-left: 12px; } }
.blog-pagination__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), scale 160ms var(--ease-out);
}
.blog-pagination__item svg { width: 24px; height: 24px; }
@media (hover: hover) and (pointer: fine) { .blog-pagination a.blog-pagination__item:hover { background-color: #f5f5f7; } }
.blog-pagination a.blog-pagination__item:active { scale: 0.97; }
.blog-pagination__item[aria-current="page"] { background-color: var(--night); color: #fff; }
.blog-pagination__item[aria-disabled="true"] { opacity: 0.3; }
.blog-pagination__dots { width: 16px; opacity: 0.5; }
@media (min-width: 768px) { .blog-pagination__dots { width: 40px; } }

/* ── Share buttons: a post's share rows (laid out in post.css) and a case study's copy link (work.css). White circles with a hairline
   ring (they sit on white and on the contents panel's grey alike), 44 px, that turn Night under a mouse; the copy link (copy.js)
   shows a tick while "Link copied" is up. The brand marks are solid (html.mjs, brand()) and drawn a little smaller than the outline
   link and tick, so the four weigh the same to the eye. Only the press moves. ── */
.post-share__title { font-weight: 600; }
.post-share__list { display: flex; gap: 8px; margin-top: 12px; }
.post-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--fg);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), scale 160ms var(--ease-out);
}
.post-share__btn svg { width: 18px; height: 18px; }
.post-share__btn .post-share__brand { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .post-share__btn:hover { background-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); color: #fff; } }
.post-share__btn:active { scale: 0.97; }
.post-share__done-icon { display: none; }
.post-share__btn[data-copied] { background-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); color: #fff; }
.post-share__btn[data-copied] .post-share__copy-icon { display: none; }
.post-share__btn[data-copied] .post-share__done-icon { display: block; }

/* ── "Link copied" (copy.js): bottom center, up 12 px while it fades in; faster out than in ── */
.post-toast { position: fixed; inset-inline: 0; bottom: 24px; z-index: 60; display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; }
.post-toast__box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 9999px;
  background-color: #0c0e12;
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
  pointer-events: auto;
}
.post-toast__box[data-state="open"] { opacity: 1; transform: none; transition-duration: 200ms; }
.post-toast__field { min-width: 0; width: min(320px, 60vw); padding: 4px 10px; border: 0; border-radius: 8px; background-color: rgba(255, 255, 255, 0.12); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .blog-cover img,
  .blog-card:hover .blog-cover img { transform: none; transition: none; }
  .blog-button:active,
  .blog-card:active,
  .blog-arrow:not([aria-disabled="true"]):active,
  .blog-pagination a.blog-pagination__item:active { scale: 1; }
  .blog-button:hover svg { translate: 0 0; }
  .blog-tabs__toggle svg { transition: none; }
  .blog-tabs[data-open] .blog-tabs__list { transition: opacity 120ms ease; }
  @starting-style { .blog-tabs[data-open] .blog-tabs__list { transform: none; } }
  .post-share__btn:active { scale: 1; }
  .post-toast__box,
  .post-toast__box[data-state="open"] { transform: none; transition: opacity 120ms ease; }
}

/* ── Print (2026-11-11): a post, a case study or a legal page on paper, and any other page that loads this file. Only what is read:
   no nav, footer, calls to action, marquees, video players, share or copy buttons, contents list or reading bar. Black on white,
   the site's own fonts with the text at 11 pt (12 for a lead), the address after each link in the text (a path on this site as its
   rsla.io address), and no figure, table, code block or number tile split across two pages. Browsers leave backgrounds out unless
   asked, so nothing here needs one: the bullets are drawn with a border. Selectors start at .blog-page to outrank post.css,
   work.css and page.css, which load after this file. ── */
@media print {
  @page { margin: 18mm 20mm; }

  [data-site-nav], .nav-menu, .site-footer, .post-toast, .post-lightbox, #cookiescript_injected, #cookiescript_badge,
  [data-marquee-shelf], .post-progress, .post-tabs, .post-rail, .post-share, .post-service, .post-cta, .post-more,
  .post-code__copy, .work-crumbs, .work-share, .work-cta, .work-more, .work-video__frame, .testimonials__transcript,
  .blog-button { display: none !important; }

  html, body.blog-page { background: #fff !important; }
  .blog-page main,
  .blog-page main * { color: #000 !important; background: transparent !important; box-shadow: none !important; text-shadow: none !important; transition: none !important; }
  .blog-page [data-footer-cover] { position: static; }
  .blog-page .blog-container { width: auto; max-width: none; margin-inline: 0; }
  .blog-page main img { max-width: 100%; }

  /* Type: the roles' screen sizes in points; text 11, leads 12, small print 9 to 10 */
  .blog-page main :is(.t-body, p, li, dt, dd, th, td, blockquote) { font-size: 11pt; line-height: 1.5; letter-spacing: 0; }
  .blog-page main .t-lead { font-size: 12pt; line-height: 1.45; }
  .blog-page main .t-small { font-size: 10pt; line-height: 1.45; }
  .blog-page main :is(.t-label, .t-caption, figcaption) { font-size: 9pt; line-height: 1.4; }
  .blog-page main .t-h1 { font-size: 22pt; line-height: 1.15; }
  .blog-page main .t-h2 { font-size: 16pt; line-height: 1.2; }
  .blog-page main .t-h3 { font-size: 13.5pt; line-height: 1.25; }
  .blog-page main .t-h4 { font-size: 12pt; line-height: 1.35; }
  .blog-page main .t-stat { font-size: 20pt; line-height: 1.1; }
  .blog-page main :is(h1, h2, h3, h4) { break-after: avoid; page-break-after: avoid; }
  .blog-page main :is(p, li) { orphans: 3; widows: 3; }
  .blog-page main :is(figure, table, tr, pre, blockquote, img, .post-callout, .post-stats, .work-tile, .work-proof, .legal__notice) { break-inside: avoid; page-break-inside: avoid; }

  /* Links: underlined, and in the text each one followed by its address (not a jump on the page, an email or a phone number) */
  .blog-page main a { text-decoration: underline; }
  .blog-page :is(.post-prose, .work-body, .work-quote, .legal) a[href^="http"]:not(.post-figure__open, .work-proof__open)::after { content: " (" attr(href) ")"; }
  .blog-page :is(.post-prose, .work-body, .work-quote, .legal) a[href^="/"]:not([href^="//"], .post-figure__open, .work-proof__open)::after { content: " (https://rsla.io" attr(href) ")"; }
  .blog-page :is(.post-prose, .work-body, .work-quote, .legal) a::after { font-size: 0.85em; font-weight: 400; overflow-wrap: anywhere; }
  .blog-page .legal a[href="https://policies.google.com/technologies/partner-sites"]::after { content: none !important; }   /* the policy prints this address itself */

  /* A post: the title block, the cover at the desktop's 12 to 5, then the article with tighter gaps */
  .blog-page .post-head { padding-top: 0; }
  .blog-page main .post-cover { margin-top: 14pt; padding-bottom: 0; }
  .blog-page main .post-cover .blog-cover { aspect-ratio: 12 / 5; border-radius: 0; }
  .blog-page main .post-layout { margin-top: 16pt; }
  .blog-page main .post-prose p { margin-block: 8pt; }
  .blog-page main .post-prose h2 { margin: 20pt 0 8pt; }
  .blog-page main .post-prose h3 { margin: 14pt 0 6pt; }
  .blog-page main .post-prose :is(ul, ol) { gap: 4pt; margin: 8pt 0; }
  .blog-page main .post-prose ul > li::before,
  .blog-page main .work-points li::before { border: 3px solid #000; }
  .blog-page main :is(.post-figure, .post-quote, .post-divider, .post-callout, .post-code) { margin-block: 12pt; }
  .blog-page main .post-figure img { max-height: 5.5in; object-fit: contain; outline: 0; }
  .blog-page main :is(.post-callout, .post-code) { border: 1px solid var(--hairline); }
  .blog-page main .post-code pre { font-size: 9.5pt; }

  /* A case study: the header on white, its tiles outlined, the story, the client's words */
  .blog-page main :is(.work-head, .page-hero) { padding-top: 0; padding-bottom: 14pt; }
  .blog-page main :is(.work-facts, .work-tiles) { margin-top: 12pt; }
  .blog-page main :is(.work-tile, .work-tile:first-child) { border-color: var(--hairline); }
  .blog-page main .work-chips--dark .work-chip { border-color: var(--hairline); }
  .blog-page main :is(.work-body, .page-body) { padding-block: 0; }
  .blog-page main .work-row { padding-block: 14pt; }
  .blog-page main .work-quote { padding-block: 14pt; border-top: 1px solid var(--hairline); }
  .blog-page main .work-quote__mark { font-size: 32pt; margin-bottom: 4pt; }

  /* A legal page: the whole width, tables out of their scroll boxes */
  .blog-page main .legal { max-width: none; }
  .blog-page main .legal__h2 { margin-top: 18pt; }
  .blog-page main :is(.legal__table-wrap, .legal__cookies) { overflow: visible; }
  .blog-page main :is(.legal__table--wide, .legal__cookies table) { min-width: 0; }
}
