/* The public website (asiaharvest.org). Plain CSS, published as-is by PublicSite::Build.
   Follows Chrome's Modern Web Guidance with a Baseline Widely available target; newer features
   (light-dark(), text-wrap, view transitions, container queries, popover) degrade to
   sensible defaults. */

@layer reset, tokens, base, layout, components;

/* Lora, the article text's font, served from the site (SIL Open Font License: OFL-Lora.txt). */
@font-face {
  font-family: Lora; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/lora-latin-wght-normal.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: Lora; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("/assets/lora-latin-wght-italic.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: Lora; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/lora-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Lora; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("/assets/lora-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }
  img { display: block; max-inline-size: 100%; block-size: auto; }
}

@layer tokens {
  :root {
    color-scheme: light dark;

    --red-700: #750001;
    --red-300: #f0a49a;
    --gold-400: #facc3f;
    --gold-200: #fde9a8;
    --stone-50: #fbfaf7;
    --stone-100: #f3efe8;
    --stone-300: #d9d2c5;
    --stone-600: #6b6459;
    --stone-900: #1f1c19;
    --night-950: #141210;
    --night-900: #1d1a17;
    --night-700: #3a342e;
    --night-300: #b3aa9d;
    --night-100: #ede7de;

    --bg: light-dark(var(--stone-50), var(--night-950));
    --surface: light-dark(#fff, var(--night-900));
    --surface-sunk: light-dark(var(--stone-100), #191714);
    --ink: light-dark(var(--stone-900), var(--night-100));
    --muted: light-dark(var(--stone-600), var(--night-300));
    --line: light-dark(var(--stone-300), var(--night-700));
    --brand: light-dark(var(--red-700), var(--red-300));
    --link: light-dark(#8a1a12, #f2b8a8);
    --accent: var(--gold-400);
    --accent-ink: #2a1a00;
    /* Headings a softer dark grey than the text, which staff found too stark in black. */
    --heading: light-dark(#4a443d, #d6cfc4);

    --serif: Lora, Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
    --cjk: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;

    --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
    --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
    --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
    --radius: 0.5rem;
    --page: 74rem;
    --gutter: clamp(1rem, 4vw, 2rem);
  }

  /* Browsers without light-dark() switch the same tokens by media query. */
  @supports not (color: light-dark(white, black)) {
    :root {
      --bg: var(--stone-50); --surface: #fff; --surface-sunk: var(--stone-100); --ink: var(--stone-900);
      --muted: var(--stone-600); --line: var(--stone-300); --brand: var(--red-700); --link: #8a1a12;
    }
    @media (prefers-color-scheme: dark) {
      :root {
        --bg: var(--night-950); --surface: var(--night-900); --surface-sunk: #191714; --ink: var(--night-100);
        --muted: var(--night-300); --line: var(--night-700); --brand: var(--red-300); --link: #f2b8a8;
      }
    }
  }
}

@layer base {
  html { accent-color: var(--brand); -webkit-text-size-adjust: 100%; }
  body {
    background: var(--bg);
    color: var(--ink);
    font: 400 var(--step-0) / 1.55 var(--sans);
    overflow-wrap: break-word;
  }
  :lang(zh) { font-family: var(--cjk), var(--sans); }
  h1, h2, h3 { font-family: var(--sans); color: var(--heading); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
  h1 { font-size: var(--step-3); font-weight: 750; }
  h2 { font-size: var(--step-2); font-weight: 700; }
  h3 { font-size: var(--step-1); font-weight: 650; }
  p, li, blockquote, figcaption, dd { text-wrap: pretty; }
  a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

  @media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
  }
}

@layer layout {
  .wrap { inline-size: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
  main { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 8vw, 5rem); }
  .prose-column { max-inline-size: 68ch; margin-inline: auto; }
}

@layer components {
  /* Header and navigation: inline on wide screens, a popover menu on narrow ones, with no script. */
  /* Always light: the logo's lettering is dark navy. */
  .site-header { color-scheme: light; background: var(--surface); border-block-end: 1px solid var(--line); position: sticky; inset-block-start: 0; z-index: 5; }
  .site-header::before { content: ""; display: block; block-size: 4px; background: linear-gradient(90deg, var(--red-700), #a3171a 60%, var(--gold-400)); }
  .site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 4.5rem; }
  .brand img { inline-size: clamp(150px, 18vw, 200px); }
  .menu-button {
    display: grid; place-items: center; color: var(--ink); background: none; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 0.45rem; cursor: pointer;
  }

  /* Narrow screens: the whole menu opens as one popover panel, every group's links listed. */
  .site-nav {
    font: 600 0.95rem / 1.2 var(--sans); color: var(--ink);
    inset: auto; inset-block-start: 4.75rem; inset-inline-end: var(--gutter);
    margin: 0; inline-size: min(22rem, 100dvw - 2 * var(--gutter)); max-block-size: calc(100dvh - 6rem); overflow-y: auto;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    padding: 0.75rem; box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
  }
  .site-nav ul { list-style: none; padding: 0; }
  .menu { display: grid; gap: 0.75rem; }
  .menu-group__label {
    font: 700 0.75rem / 1 var(--sans); letter-spacing: 0.08em; color: var(--muted);
    background: none; border: 0; padding: 0.5rem 0.75rem 0.25rem; cursor: default;
  }
  .submenu a { display: block; padding: 0.5rem 0.75rem; border-radius: 0.35rem; color: var(--ink); text-decoration: none; font-weight: 500; }
  .submenu a:hover { background: var(--surface-sunk); }
  .submenu a[aria-current="page"] { color: var(--brand); font-weight: 700; }
  .menu-actions { display: flex; gap: 0.5rem; padding: 0.25rem 0.75rem; }
  .menu-actions a { flex: 1; text-align: center; text-decoration: none; padding: 0.6rem 1rem; border-radius: 999px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; }
  .menu-actions .subscribe { color: var(--ink); border: 1px solid var(--line); }
  .menu-actions .donate { background: var(--accent); color: var(--accent-ink); }
  .menu-actions .donate:hover { background: var(--gold-200); }

  /* Wide screens: Duda's four groups in a row, each opening its links on hover or keyboard focus. */
  @media (width >= 62rem) {
    .menu-button { display: none; }
    .site-nav, .site-nav:not(:popover-open) {
      display: block; position: static; inline-size: auto; max-block-size: none; overflow: visible;
      padding: 0; border: 0; box-shadow: none; background: none;
    }
    .menu { display: flex; align-items: center; gap: 0.25rem; }
    .menu-group { position: relative; }
    .menu-group__label {
      font: 700 0.85rem / 1 var(--sans); color: var(--ink); padding: 0.75rem 0.85rem; cursor: pointer; border-radius: 0.35rem;
    }
    .menu-group__label::after { content: ""; display: inline-block; margin-inline-start: 0.4rem; border: 4px solid transparent; border-block-start-color: currentColor; transform: translateY(2px); }
    .menu-group:hover .menu-group__label, .menu-group:focus-within .menu-group__label { color: var(--brand); }
    .menu-group:has([aria-current="page"]) .menu-group__label { box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
    .submenu {
      display: none; position: absolute; inset-block-start: 100%; inset-inline-start: 0; min-inline-size: 16rem;
      background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.4rem;
      box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
    }
    .menu-group:hover .submenu, .menu-group:focus-within .submenu { display: block; }
    .menu-actions { padding: 0 0 0 0.5rem; }
    .menu-actions a { flex: none; }
  }
  /* Where there is room, the menu's capitals are as tall as the logo's lettering and sit on its baseline:
     the logo hangs below the line by the part of it under its lettering (17px of its 55), so the header
     lines both up as text. */
  @media (width >= 82rem) {
    .site-header .wrap { align-items: baseline; padding-block: 0.6rem 1.1rem; }
    .brand { display: block; flex: none; line-height: 0; }
    .brand img { inline-size: 200px; margin-block-end: -17px; }
    .menu-group__label { font-size: 1.3rem; white-space: nowrap; }
  }

  /* Page furniture */
  .eyebrow { font: 600 0.85rem / 1.4 var(--sans); color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
  .eyebrow a { color: inherit; }
  .page-title { margin-block: 0.5rem 0.75rem; }
  .page-title .chinese { color: var(--muted); font-weight: 400; margin-inline-start: 0.35em; }
  .lede { font-size: var(--step-1); color: var(--muted); max-inline-size: 60ch; line-height: 1.5; }
  .meta { font: 500 0.95rem / 1.4 var(--sans); color: var(--muted); }
  .chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 1rem; }
  .chip { font: 600 0.85rem / 1 var(--sans); padding: 0.45rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); }
  .chip:hover { border-color: var(--brand); }
  .button { display: inline-block; font: 650 1rem / 1 var(--sans); padding: 0.85rem 1.4rem; border-radius: 999px; text-decoration: none; background: var(--accent); color: var(--accent-ink); }
  .button:hover { background: var(--gold-200); }
  .button--quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
  .button--quiet:hover { background: var(--surface-sunk); }

  /* A page's banner: its cover picture behind the title, under Duda's blue tint */
  main:has(> .hero:first-child) { padding-block-start: 0; }
  .hero {
    position: relative; isolation: isolate; display: grid; place-items: center; overflow: clip;
    min-block-size: clamp(9rem, 18vw, 15rem); margin-block-end: clamp(1.5rem, 4vw, 3rem); padding: 2rem var(--gutter);
    background: #2856aa; color: #fff; text-align: center;
  }
  .hero img { position: absolute; inset: 0; z-index: -2; inline-size: 100%; block-size: 100%; object-fit: cover; }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(40 86 170 / 0.7); }
  .hero .page-title { margin: 0; color: inherit; font-weight: 400; text-shadow: 0 0 15px #1a1a1a; }
  .article-header:empty { display: none; }

  /* Article body: a serif reading column */
  .article-header { margin-block-end: 2rem; }
  .prose { font-family: var(--serif); font-size: calc(var(--step-0) * 1.06); line-height: 1.6; }
  .prose > * + * { margin-block-start: 1.15em; }
  .prose h1, .prose h2 { font-size: var(--step-2); margin-block-start: 2.2em; }
  .prose blockquote { border-inline-start: 3px solid var(--accent); padding-inline-start: 1.1rem; color: var(--muted); font-style: italic; }
  .prose ul, .prose ol { padding-inline-start: 1.4em; }
  .prose figure { margin-block: 2em; }
  .prose img, .cover img { border-radius: var(--radius); margin-inline: auto; }
  .prose figcaption { font: 0.9rem / 1.45 var(--sans); color: var(--muted); margin-block-start: 0.6rem; text-align: center; }
  .prose .table-scroll { overflow-x: auto; margin-block: 1.5em; border: 1px solid var(--line); border-radius: var(--radius); }
  .prose table { border-collapse: collapse; inline-size: 100%; font: 0.85rem / 1.4 var(--sans); font-variant-numeric: tabular-nums; }
  .prose td { border-block-end: 1px solid var(--line); padding: 0.3rem 0.45rem; vertical-align: top; }
  .prose td:not(:first-child) { text-align: end; }
  .prose tr:hover td { background: var(--surface-sunk); }
  .prose tfoot td { font-weight: 700; border-block-start: 2px solid var(--line); border-block-end: 0; }
  /* A book's people groups (PublicSite::ProfileTable): names and words read from the start, numbers from the end; a
     column sorts when its heading is clicked. */
  .prose .profile-table td { text-align: start; vertical-align: middle; }
  .prose .profile-table .number { text-align: end; }
  .prose .profile-table th { background: var(--surface-sunk); border-block-end: 1px solid var(--line); padding: 0; vertical-align: bottom; }
  .prose .profile-table th button { all: unset; box-sizing: border-box; display: block; inline-size: 100%; padding: 0.45rem; font-weight: 600; text-align: start; cursor: pointer; }
  .prose .profile-table th.number button { text-align: end; }
  .prose .profile-table th button:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
  .prose .profile-table th[aria-sort="ascending"] button::after { content: " ▲"; font-size: 0.7em; }
  .prose .profile-table th[aria-sort="descending"] button::after { content: " ▼"; font-size: 0.7em; }
  .prose .profile-table img { inline-size: 40px; block-size: 40px; object-fit: cover; border-radius: 4px; margin: 0; }
  /* A page holding a wide table (the Christians in China Stats) uses the window's width. */
  .prose-column:has(.prose .table-scroll--wide) { max-inline-size: none; inline-size: min(100% - 2 * var(--gutter), 110rem); }
  .prose-column:has(.prose .table-scroll--wide) .prose { font-size: var(--step-0); }

  /* Players: a YouTube thumbnail that becomes the player when clicked, or an embedded flip book */
  .prose .embed iframe, .video-facade { display: block; inline-size: 100%; border: 0; border-radius: var(--radius); background: var(--surface-sunk); }
  .prose .embed--video iframe, .video-facade { aspect-ratio: 16 / 9; }
  .prose .embed--flip-book iframe { aspect-ratio: 4 / 3; }
  .video-facade { position: relative; overflow: clip; }
  .video-facade img { inline-size: 100%; block-size: 100%; object-fit: cover; margin: 0; border-radius: 0; }
  .video-facade::after {
    content: ""; position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; inline-size: 68px; block-size: 48px;
    border-radius: 12px; background: rgb(204 0 0 / 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='white'/%3E%3C/svg%3E") center / 28px no-repeat;
  }
  .video-facade:hover::after { background-color: #c00; }
  .player-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin-block: 1.5rem 2.5rem; }
  .player-card { display: flex; flex-direction: column; gap: 0.5rem; font: 0.92rem / 1.5 var(--serif); }
  .player-card > * { margin: 0; }
  .player-card h1 { font-size: 1.05rem; line-height: 1.3; margin-block-start: 0.35rem; }
  .player-card .embed { margin: 0; }
  /* A flip book's text comes before it on the page; showing the book first lines the tiles up. */
  .player-card .embed--flip-book { order: -1; }
  /* Free eBooks: one book per row, its text and Download PDF button in a narrow column beside it */
  .player-grid--books { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .player-grid--books .player-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 1rem 2rem; align-items: start; padding-block: 2rem; }
  .player-grid--books .player-card + .player-card { border-block-start: 1px solid var(--line); }
  .player-grid--books .embed--flip-book { order: 0; }
  .player-grid--books .embed--flip-book iframe { aspect-ratio: auto; block-size: 25rem; }
  .player-card__text { display: flex; flex-direction: column; gap: 0.5rem; }
  .player-card__text > * { margin: 0; }
  .player-card__text .button-line { margin-block-end: 0.5rem; }
  .player-card__text .button-line a { min-inline-size: 0; inline-size: 100%; }
  @media (width < 48rem) { .player-grid--books .player-card { grid-template-columns: minmax(0, 1fr); } }
  /* A page that is mostly players uses the full width; its running text keeps a readable line length. */
  .prose-column:has(.player-grid) { max-inline-size: var(--page); }
  .prose-column:has(.player-grid) .prose > :not(.player-grid, h1) { max-inline-size: 68ch; }
  .cover { margin-block-end: 2rem; }

  .prose .button-line a {
    display: inline-block; min-inline-size: 12rem; text-align: center; padding: 0.6rem 1.5rem;
    border: 1.5px solid var(--brand); border-radius: 0.25rem; color: var(--brand);
    font: 700 0.9rem / 1.2 var(--sans); letter-spacing: 0.04em; text-decoration: none;
  }
  .prose .button-line a:hover { background: var(--brand); color: var(--surface); }
  /* A blog post's buttons sit centered on their line, as Duda set them. */
  .prose--post > .button-line { text-align: center; }

  /* Images that each link somewhere, one after another (Operation Profiles' book covers): a row */
  .prose .image-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-block: 2em; }
  .prose .image-row figure { margin: 0; flex: 0 1 11rem; }
  .prose .image-row img { inline-size: 100%; border-radius: 0.25rem; transition: transform 0.2s ease; }
  .prose .image-row a:hover img { transform: translateY(-3px); }

  /* A closing heading section beside its image (Operation Profiles' ENDNOTES): Duda's band of dark stone,
     fixed behind the page as it scrolls */
  .prose .band {
    display: grid; gap: 2rem; align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    margin-block-start: 3em; padding: clamp(1.5rem, 5vw, 2.5rem); border-radius: var(--radius);
    color: #fff; background: linear-gradient(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.14)), url("/assets/stone.jpg") center / cover fixed #3d3c3c;
  }
  .prose .band__text { text-align: center; }
  .prose .band__text > * + * { margin-block-start: 0.6em; }
  .prose .band h1 { margin: 0 0 0.6em; color: #fff; }
  .prose .band .button-line { margin-block-start: 1.5em; }
  .prose .band .button-line a { border: 2px solid #fff; border-radius: 999px; background: var(--red-700); color: #fff; padding: 0.9rem 1.5rem; }
  .prose .band .button-line a:hover { background: #fff; color: var(--red-700); }
  .prose .band figure { margin: 0; }

  /* Photos one after another: a row of thumbnails */
  .prose .gallery { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); margin-block: 1.5em; }
  .prose .gallery figure { margin: 0; }
  .prose .gallery img { inline-size: 100%; block-size: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0.25rem; }
  .prose .gallery a:hover img { opacity: 0.9; }

  /* Captioned gallery photos (the Asian Workers' Fund's people groups): a grid of cards */
  .prose .photo-cards { display: grid; gap: 2rem 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); margin-block: 2em; text-align: center; }
  .photo-card { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; font: 0.85rem / 1.4 var(--sans); color: var(--muted); }
  .prose .photo-card > * { margin: 0; }
  .photo-card figure { inline-size: 100%; }
  .photo-card img { inline-size: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 0.25rem; }
  .prose .photo-card h1 { font: 700 1.1rem / 1.25 var(--sans); color: var(--brand); margin-block-start: 0.35rem; }
  .prose .photo-card .button-line { margin-block-start: auto; padding-block-start: 0.35rem; }
  .prose .photo-card .button-line a { min-inline-size: 0; padding: 0.45rem 1.25rem; }

  /* Short lists one after another: columns */
  .prose .list-columns { display: grid; gap: 0 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
  .prose .list-columns > ul { margin: 0; }

  /* The fund pages' band of figures */
  .prose .numbers {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 2rem;
    margin-block: 0 2.5em; padding: 1.75rem 2rem; border-radius: var(--radius); text-align: center;
    background: linear-gradient(110deg, #0f4c81, #0a2540); color: #fff; color-scheme: dark;
  }
  .prose .numbers > h1 { flex: 0 0 100%; margin: 0; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
  .numbers__item { flex: 1 1 11rem; max-inline-size: 18rem; display: grid; gap: 0.35rem; align-content: start; }
  .prose .numbers__figure { margin: 0; font: 700 clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem) / 1.1 var(--sans); }
  .prose .numbers__caption { margin: 0; font: 600 0.9rem / 1.35 var(--sans); }
  .prose .numbers h1, .prose .numbers a { color: inherit; }

  /* Small images in a column beside their text, as Duda lays out the fund summaries */
  .prose .split { display: grid; gap: 1rem 2rem; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); align-items: start; margin-block: 2.5em; }
  .prose .split + .split { padding-block-start: 2.5em; border-block-start: 1px solid var(--line); }
  .split__media { display: grid; gap: 0.75rem; justify-items: center; }
  .split__media figure { margin: 0; }
  .split__text > * + * { margin-block-start: 1em; }
  .split__text > h1:first-child { margin-block-start: 0; }
  @media (width < 36rem) {
    .prose .split { grid-template-columns: 1fr; }
    .split__media { grid-auto-flow: column; justify-content: start; }
  }
  .cover img { inline-size: 100%; }

  /* Province: maps and a facts card, side by side once the area is wide enough */
  .province-body { container: province / inline-size; margin-block-start: 2rem; }
  .province-columns { display: grid; gap: 1.5rem; }
  @container province (inline-size > 52rem) {
    .province-columns { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; }
    .facts { position: sticky; inset-block-start: 6rem; }
  }
  .maps { display: grid; gap: 1rem; }
  .maps figure { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem; }
  .maps > div { font: 600 0.95rem var(--sans); }
  .facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; font: 0.92rem / 1.45 var(--sans); }
  .facts h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-block-end: 0.85rem; }
  .facts dt { font-weight: 650; margin-block-start: 0.85rem; }
  .facts dt:first-of-type { margin-block-start: 0; }
  .facts dd { color: var(--muted); font-variant-numeric: tabular-nums; }

  .listings { display: grid; gap: 2.5rem; margin-block-start: 3rem; }
  .listing h2 { font-size: var(--step-1); padding-block-end: 0.5rem; border-block-end: 2px solid var(--line); margin-block-end: 0.75rem; }
  .listing ul { list-style: none; padding: 0; columns: 2 20rem; column-gap: 2.5rem; font-size: 1rem; }
  .listing li { break-inside: avoid; padding-block: 0.4rem; border-block-end: 1px dashed var(--line); display: flex; gap: 0.5rem; align-items: baseline; justify-content: space-between; }
  .listing li a:first-child { text-decoration: none; }
  .listing li a:first-child:hover { text-decoration: underline; }
  .listing .chinese { font-size: 0.85rem; flex-shrink: 0; }

  /* China index */
  .provinces { list-style: none; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); margin-block-start: 2rem; }
  .provinces a {
    display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 1rem 1.1rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 650;
  }
  .provinces a:hover { border-color: var(--brand); }
  .provinces .chinese { color: var(--muted); font-weight: 400; }

  /* The China index's map (PublicSite::ChinaMap): Duda's colours, a province lit while pointed at here or
     in the list below */
  .prose .china-map { margin-block: 2em; font-family: var(--sans); }
  .china-map svg {
    display: block; inline-size: 100%; block-size: auto; padding: 4%;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .china-map path {
    fill: light-dark(#edecd7, #3b3a2e); stroke: light-dark(#737d70, #9a9f92); stroke-width: 0.7;
    vector-effect: non-scaling-stroke; transition: fill 0.25s ease;
  }
  .china-map svg > path { pointer-events: none; }
  .china-map a:hover path, .china-map path.is-active { fill: light-dark(#b04306, #e0753a); }
  .prose .china-map__list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); gap: 0.15rem;
    margin-block-start: 1rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  }
  .china-map__list a { padding: 0.3rem 0.5rem; font-size: 0.95rem; line-height: 1.4; overflow-wrap: normal; border-radius: 0.25rem; color: var(--ink); text-decoration: none; }
  .china-map__list a:hover { background: var(--surface-sunk); text-decoration: underline; }
  .china-map__tooltip {
    position: fixed; z-index: 10; padding: 0.25rem 0.5rem; pointer-events: none;
    font: 0.8rem / 1.3 var(--sans); color: var(--ink); background: var(--surface);
    border: 1px solid var(--line); border-radius: 0.25rem; box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
  }

  /* Blog cards */
  .post-list { list-style: none; padding: 0; display: grid; gap: 2.5rem 1.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); margin-block-start: 1.5rem; }
  .post-card { display: flex; flex-direction: column; gap: 0.4rem; }
  .post-card__link { display: flex; flex-direction: column; gap: 0.75rem; color: var(--ink); text-decoration: none; }
  .post-card img, .post-card .placeholder { inline-size: 100%; block-size: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); background: var(--surface-sunk); }
  .post-card h2 { font-size: 1.15rem; line-height: 1.3; }
  .post-card__link:hover h2 { color: var(--brand); }
  .post-card p { font-size: 0.95rem; color: var(--muted); }
  .post-card .meta { font-size: 0.85rem; }
  .more { margin-block-start: 3rem; text-align: center; }

  /* Home: banner slideshow (one set for wide screens, one for phones, as on Duda) */
  .slideshow { position: relative; background: var(--surface-sunk); }
  .slideshow--narrow { display: none; }
  @media (width < 48rem) {
    .slideshow--wide { display: none; }
    .slideshow--narrow { display: block; }
  }
  .slideshow__track {
    list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .slideshow__track::-webkit-scrollbar { display: none; }
  .slideshow__slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
  .slideshow__caption {
    position: absolute; inset-inline: 0; inset-block-end: 0; padding: 0.85rem clamp(1rem, 3vw, 2rem);
    background: rgb(0 0 0 / 0.55); color: #fff; font: 400 clamp(0.9rem, 0.8rem + 0.4vw, 1.15rem) / 1.4 var(--sans);
    pointer-events: none;
  }
  .slideshow__caption strong { font-weight: 700; }
  .slideshow__slide img { inline-size: 100%; block-size: clamp(180px, 28.5vw, 371px); object-fit: cover; }
  /* On phones Duda shows the banners tall and cropped at the sides, with the caption bar across the foot. */
  .slideshow--narrow .slideshow__slide img { block-size: clamp(240px, 65vw, 371px); }
  main:has(> .slideshow:first-child) { padding-block-start: 0; }
  .slideshow__arrow {
    position: absolute; inset-block-start: 50%; translate: 0 -50%; inline-size: 2.75rem; block-size: 2.75rem;
    display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
    font: 400 2rem / 1 var(--sans); color: #fff; background: rgb(0 0 0 / 0.35);
  }
  .slideshow__arrow:hover { background: rgb(0 0 0 / 0.55); }
  .slideshow__arrow--prev { inset-inline-start: 0.75rem; }
  .slideshow__arrow--next { inset-inline-end: 0.75rem; }

  /* Home: the page's own sections, WHAT WE DO's three columns side by side on wide screens */
  .home-body { padding-block: clamp(2rem, 5vw, 3.5rem); font-family: var(--serif); }
  .home-body > div + h1, .home-body > h1 + div { margin-block-start: 0.75rem; }
  .home-body > h1:first-child { font-size: var(--step-2); color: var(--brand); padding-block-end: 0.75rem; border-block-end: 2px solid var(--line); margin-block-end: 1.5rem; }
  .home-body > h1:not(:first-child) { font-size: var(--step-1); margin-block-start: 1.5rem; }
  @media (width >= 60rem) {
    .home-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; grid-auto-flow: column; column-gap: 2.5rem; align-items: start; }
    .home-body > h1:first-child { grid-column: 1 / -1; grid-row: 1; }
    .home-body > h1:not(:first-child) { margin-block-start: 0; }
  }
  .home-posts { padding-block-start: 1rem; }

  /* Home */
  .section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-block-end: 1.5rem; }
  .section-head a { font: 600 0.95rem var(--sans); }

  /* Contact Us and print-newsletter forms (public_site/_form) */
  .site-form, .site-form__message { margin-block-start: 2rem; font-family: var(--sans); }
  .site-form { display: flex; flex-wrap: wrap; gap: 1rem; }
  .site-form[hidden], .site-form__message[hidden] { display: none; }
  .site-form > * { flex: 1 1 100%; }
  .site-form > .site-form__field--half { flex: 1 1 calc(50% - 0.5rem); min-inline-size: min(100%, 14rem); }
  .site-form__field label, .site-form__choice legend { display: block; font-weight: 600; margin-block-end: 0.35rem; }
  .site-form__choice { border: 0; padding: 0; margin: 0; }
  .site-form__options { display: flex; gap: 1.5rem; }
  .site-form__options label { display: inline-flex; gap: 0.4rem; align-items: center; font-weight: 400; }
  .site-form input:not([type=radio]), .site-form textarea {
    inline-size: 100%; font: inherit; color: var(--ink); background: var(--surface); padding: 0.65rem 0.8rem;
    border: 1px solid var(--line); border-radius: var(--radius);
  }
  .site-form input:focus-visible, .site-form textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
  .site-form ::placeholder { color: var(--muted); }
  .site-form .button { border: 0; cursor: pointer; }
  .site-form .button:disabled { opacity: 0.6; cursor: progress; }
  .site-form__message { font-weight: 600; }
  .site-form__message--error { color: var(--brand); margin-block-start: 0; }

  /* Bookstore (public_site/bookstore, bookstore.js) */
  .visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bookstore__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem; }
  .bag-link { display: inline-flex; align-items: center; gap: 0.5rem; font: 600 0.95rem var(--sans); color: var(--ink); text-decoration: none; }
  .bag-link:hover { color: var(--brand); }
  .bag-link__count {
    min-inline-size: 1.6rem; padding: 0.15rem 0.45rem; border-radius: 999px; text-align: center;
    background: var(--accent); color: var(--accent-ink); font-variant-numeric: tabular-nums;
  }
  .product-grid { list-style: none; padding: 0; display: grid; gap: 2.25rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); margin-block-start: 1.5rem; }
  .product-card { display: flex; flex-direction: column; gap: 0.3rem; }
  .product-card__link { display: flex; flex-direction: column; gap: 0.75rem; color: var(--ink); text-decoration: none; }
  .product-card img { inline-size: 100%; aspect-ratio: 2 / 3; object-fit: contain; background: var(--surface-sunk); border-radius: 0.25rem; }
  .product-card h2 { font-size: 1rem; line-height: 1.35; }
  .product-card__link:hover h2 { color: var(--brand); }
  .product-card__price { font-weight: 650; }
  .product-card__status, .product__status { font: 600 0.9rem var(--sans); color: var(--muted); }
  .product__columns { display: grid; gap: 2rem; margin-block-start: 1.5rem; }
  @media (width >= 48rem) { .product__columns { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); align-items: start; } }
  .product__cover { margin: 0; }
  .product__cover img { inline-size: 100%; border-radius: 0.25rem; box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.15); }
  .product__buy { display: grid; gap: 0.75rem; justify-items: start; }
  .product__buy .page-title { margin: 0; }
  .product__price { font: 700 var(--step-1) var(--sans); }
  .product__note { color: var(--muted); font-size: 0.95rem; }
  .product__add { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
  .product__add input, .bag__quantity {
    inline-size: 5.5rem; font: inherit; color: var(--ink); background: var(--surface); padding: 0.6rem 0.7rem;
    border: 1px solid var(--line); border-radius: var(--radius);
  }
  .product__add .button, .bag .button { border: 0; cursor: pointer; }
  .bag .button:disabled { opacity: 0.6; cursor: progress; }
  .product__added[hidden], .bag__contents[hidden], .bag__error[hidden] { display: none; }
  .bulk-prices { inline-size: min(100%, 26rem); margin-block-start: 0.5rem; }
  .bulk-prices h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-block-end: 0.5rem; }
  .bulk-prices table { inline-size: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
  .bulk-prices th, .bulk-prices td { text-align: start; padding: 0.45rem 0.5rem; border-block-end: 1px solid var(--line); }
  .bulk-prices th { font-weight: 650; }
  .product__details { max-inline-size: 68ch; margin-block-start: 3rem; }
  .product__details > h2 { font-size: var(--step-1); padding-block-end: 0.5rem; border-block-end: 2px solid var(--line); margin-block-end: 1rem; }
  .bag { max-inline-size: 48rem; }
  .bag__note { color: var(--muted); }
  .bag__contents { margin-block-start: 2rem; }
  .bag__contents h2 { font-size: var(--step-1); margin-block-end: 0.75rem; }
  .bag__items { list-style: none; padding: 0; }
  .bag__item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem 1rem; align-items: center; padding-block: 0.85rem; border-block-end: 1px solid var(--line); }
  .bag__name { font-weight: 600; text-decoration: none; }
  .bag__line { font-variant-numeric: tabular-nums; white-space: nowrap; }
  @media (width < 36rem) { .bag__item { grid-template-columns: 1fr auto; } .bag__name { grid-column: 1 / -1; } }
  .bag__totals { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; margin-block: 1.25rem; font-variant-numeric: tabular-nums; }
  .bag__totals dd { margin: 0; text-align: end; }
  .bag__totals dt:last-of-type, .bag__totals dd:last-of-type { font-weight: 700; font-size: var(--step-1); }
  .bag__error { color: var(--brand); font-weight: 600; margin-block-start: 1rem; }

  /* Footer */
  .site-footer { background: #23201c; color: #e6dfd4; font-size: 0.95rem; padding-block: 3rem 2rem; color-scheme: dark; }
  .site-footer a { color: #f5d77a; }
  .site-footer .columns { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
  .site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; margin-block-end: 0.75rem; }
  .site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
  .site-footer address { font-style: normal; margin-block-end: 0.75rem; }
  .site-footer p { margin-block-start: 1rem; }
  .site-footer .button { color: var(--accent-ink); }
  .copyright { margin-block-start: 2.5rem; padding-block-start: 1.5rem; border-block-start: 1px solid #3a352f; color: #b5ada0; font-size: 0.85rem; }

  @media (forced-colors: active) {
    .submenu a[aria-current="page"] { outline: 2px solid CanvasText; }
    .post-card img { border: 1px solid CanvasText; }
  }
}
