@layer tokens, reset, base, layout, components, utilities, overrides, sections;

@layer tokens {
  :root {
    color-scheme: light;
    --cream: #f5f1e5;
    --cream-deep: #eae3d1;
    --paper: #fffdf7;
    --forest: #173f35;
    --forest-light: #28594a;
    --forest-muted: #52665e;
    --lime: #d6ed9b;
    --lime-soft: #edf5d5;
    --terracotta: #c8754d;
    --terracotta-dark: #93472c;
    --terracotta-soft: #f1d9ca;
    --border: #cfc7b4;
    --border-strong: #9d9a86;
    --on-dark-muted: #d8e1d7;
    --focus: #93472c;

    --font-serif:
      "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --font-sans:
      system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
    --step-0: clamp(1rem, 0.97rem + 0.14vw, 1.1rem);
    --step-1: clamp(1.2rem, 1.12rem + 0.38vw, 1.45rem);
    --step-2: clamp(1.5rem, 1.32rem + 0.8vw, 2rem);
    --step-3: clamp(2rem, 1.62rem + 1.65vw, 3rem);
    --step-4: clamp(2.65rem, 1.75rem + 3.8vw, 5.25rem);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --gutter: clamp(1rem, 3vw, 2.5rem);
    --section-space: clamp(4rem, 8vw, 7.5rem);
    --content-max: 76rem;
    --reading-measure: 70ch;

    --radius-small: 0.4rem;
    --radius-medium: 0.85rem;
    --radius-large: 1.5rem;
    --radius-round: 999px;
    --shadow-small: 0 0.25rem 1rem rgb(23 63 53 / 0.07);
    --shadow-lifted: 0 1rem 2.5rem rgb(23 63 53 / 0.13);
  }
}

@layer reset {
  html {
    box-sizing: border-box;
    text-size-adjust: 100%;
  }

  :where(
    body,
    header,
    main,
    footer,
    section,
    article,
    aside,
    nav,
    div,
    form,
    fieldset,
    ul,
    ol,
    li,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    figure,
    figcaption,
    blockquote,
    dl,
    dt,
    dd,
    table,
    thead,
    tbody,
    tfoot,
    tr,
    th,
    td,
    button,
    input,
    select,
    textarea,
    a,
    span,
    img,
    picture,
    svg,
    hr
  ) {
    box-sizing: inherit;
  }

  :where(body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
    margin: 0;
  }

  :where(img, picture, svg, video, canvas) {
    display: block;
    max-inline-size: 100%;
  }

  :where(img, video) {
    block-size: auto;
  }

  :where(button, input, select, textarea) {
    margin: 0;
    font: inherit;
  }

  button {
    cursor: pointer;
  }

  button:disabled,
  [aria-disabled="true"] {
    cursor: not-allowed;
  }

  [hidden] {
    display: none !important;
  }
}

@layer base {
  html {
    background: var(--cream);
    scroll-padding-block-start: 7rem;
  }

  body {
    display: flex;
    flex-direction: column;
    min-block-size: 100vh;
    min-block-size: 100dvh;
    background: var(--cream);
    color: var(--forest);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
  }

  main {
    flex: 1 0 auto;
    min-inline-size: 0;
  }

  :where(h1, h2, h3, h4) {
    color: var(--forest);
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.08;
    text-wrap: balance;
  }

  h1 {
    font-size: var(--step-4);
    letter-spacing: -0.045em;
  }

  h2 {
    font-size: var(--step-3);
    letter-spacing: -0.025em;
  }

  h3 {
    font-size: var(--step-1);
    letter-spacing: -0.012em;
  }

  p,
  li {
    overflow-wrap: break-word;
    text-wrap: pretty;
  }

  a:any-link {
    color: var(--forest);
    text-decoration-color: var(--terracotta);
    text-decoration-thickness: 0.09em;
    text-underline-offset: 0.2em;
  }

  a:any-link:hover {
    text-decoration-thickness: 0.14em;
  }

  ::selection {
    background: var(--lime);
    color: var(--forest);
  }

  :where(section, article, h1, h2, h3)[id] {
    scroll-margin-block-start: 7rem;
  }

  :where(
    a:any-link,
    button,
    input,
    select,
    textarea,
    summary,
    [tabindex]
  ):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
  }
}

@layer layout {
  .header-inner,
  .hero,
  .index-hero,
  .crop-library,
  .homestead-section,
  main > .methodology,
  .complement-section,
  .crop-profile,
  .guide-section,
  .calendar-section,
  .articles-section,
  .closing-cta,
  .article-hero,
  .article-layout,
  .related-reading,
  .footer-inner {
    inline-size: min(var(--content-max), calc(100% - (2 * var(--gutter))));
    margin-inline: auto;
  }

  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-6);
    padding-block: var(--space-3);
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    margin-inline-start: auto;
  }

  .site-nav :where(ul, ol) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .hero {
    display: grid;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
    padding-block: clamp(3.5rem, 8vw, 7rem);
  }

  .hero-copy {
    max-inline-size: 42rem;
  }

  .index-hero {
    display: grid;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
    padding-block: clamp(3.5rem, 8vw, 7rem);
  }

  .crop-library,
  .homestead-section,
  .complement-section,
  .crop-profile {
    padding-block: var(--section-space);
  }

  main > .methodology {
    margin-block: var(--section-space);
  }

  .index-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-4) var(--space-6);
    margin-block-end: clamp(2rem, 4vw, 3.5rem);
  }

  .index-toolbar > * {
    min-inline-size: 0;
  }

  .crop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 23rem), 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .profile-grid {
    display: grid;
    gap: var(--space-5);
    align-items: start;
  }

  .complement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--space-5);
    margin-block-start: var(--space-6);
  }

  .apiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: var(--space-5);
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
  }

  .complement-layout {
    display: grid;
    gap: var(--space-6);
    align-items: start;
  }

  .complement-copy {
    min-inline-size: 0;
    max-inline-size: var(--reading-measure);
  }

  .hero-actions,
  .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-block-start: var(--space-6);
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
    gap: var(--space-4);
    max-inline-size: 38rem;
    margin-block-start: var(--space-7);
    padding-block: var(--space-4);
    border-block: 1px solid var(--border);
  }

  .guide-section,
  .calendar-section,
  .articles-section {
    padding-block: var(--section-space);
  }

  .section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-4) var(--space-7);
    margin-block-end: clamp(2rem, 4vw, 3.5rem);
  }

  .section-heading > * {
    flex: 1 1 18rem;
  }

  .section-heading > :where(p, .section-intro) {
    flex-grow: 0;
    max-inline-size: 38rem;
  }

  .steps-grid,
  .calendar-grid,
  .article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .region-section {
    padding: var(--section-space)
      max(var(--gutter), calc((100% - var(--content-max)) / 2));
  }

  .region-explorer {
    display: grid;
    gap: var(--space-5);
  }

  .region-controls {
    min-inline-size: 0;
  }

  .region-list {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .region-detail {
    grid-column: 1 / -1;
  }

  .technique-section {
    inline-size: min(var(--content-max), calc(100% - (2 * var(--gutter))));
    margin-inline: auto;
    padding-block: var(--section-space);
  }

  .technique-explorer {
    display: grid;
    gap: var(--space-5);
  }

  .technique-visual,
  .technique-controls {
    min-inline-size: 0;
  }

  .calendar-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  }

  .article-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    container: article-grid / inline-size;
  }

  .article-card {
    display: grid;
    grid-template-rows: auto 1fr;
  }

  .article-page {
    padding-block: clamp(2rem, 5vw, 5rem) var(--section-space);
  }

  .article-layout {
    display: grid;
    gap: clamp(2.5rem, 6vw, 5rem);
    margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
  }

  .article-body {
    min-inline-size: 0;
    max-inline-size: var(--reading-measure);
    container: article-body / inline-size;
  }

  .article-aside {
    min-inline-size: 0;
  }

  .site-footer {
    padding: clamp(2.5rem, 5vw, 4rem)
      max(var(--gutter), calc((100% - var(--content-max)) / 2));
  }

  .footer-inner {
    inline-size: 100%;
  }

  @media (min-width: 48rem) {
    .crop-grid {
      grid-auto-rows: 1fr;
    }

    .hero,
    .index-hero:has(> :where(.hero-visual, .index-hero-notes)) {
      grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.92fr);
    }

    .complement-layout {
      grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
      gap: clamp(2rem, 5vw, 5rem);
    }

    .region-explorer {
      grid-template-columns: minmax(0, 1.65fr) minmax(15rem, 0.75fr);
      align-items: start;
    }

    .region-controls {
      position: sticky;
      inset-block-start: 6rem;
    }

    .footer-inner {
      display: flex;
      flex-wrap: wrap;
      align-items: start;
      justify-content: space-between;
      gap: var(--space-6) var(--space-8);
    }
  }

  @media (min-width: 64rem) {
    .profile-grid {
      grid-template-columns: minmax(14rem, 0.65fr) minmax(0, 1.35fr);
      column-gap: clamp(2rem, 4vw, 4rem);
    }

    .profile-grid > .profile-facts {
      grid-row: 1 / span 2;
    }

    .profile-grid > :where(.nutrition-panel, .pairing-panel) {
      grid-column: 2;
    }

    .article-layout {
      grid-template-columns: minmax(0, var(--reading-measure)) minmax(
          14rem,
          18rem
        );
      justify-content: center;
    }

    .article-aside {
      position: sticky;
      inset-block-start: 6rem;
      align-self: start;
    }

    .technique-explorer {
      grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.8fr);
      align-items: start;
      gap: clamp(1.5rem, 3vw, 2.5rem);
    }
  }

  @media (max-width: 47.99rem) {
    .header-inner {
      align-items: start;
      gap: var(--space-1) var(--space-4);
    }

    .site-nav {
      flex: 1 1 100%;
      margin-inline-start: 0;
    }

    .site-nav {
      min-inline-size: 0;
      margin-inline: calc(var(--gutter) * -1);
    }

    /* One swipeable row instead of a tall stack of wrapped links. */
    .site-nav :where(ul, ol) {
      inline-size: 100%;
      min-inline-size: 0;
      flex-wrap: nowrap;
      overflow-x: auto;
      padding-inline: var(--gutter);
      scrollbar-width: none;
      overscroll-behavior-x: contain;
    }

    .site-nav li {
      flex: 0 0 auto;
    }

    .region-controls {
      position: static;
    }
  }

  @media (max-width: 30rem) {
    .hero-actions .button,
    .button-group .button {
      inline-size: 100%;
    }

    .hero-stats {
      gap: var(--space-2);
    }
  }
}

@layer components {
  .site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 20;
    flex: 0 0 auto;
    background: var(--cream);
    border-block-end: 1px solid var(--border);
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-block-size: 2.75rem;
    color: var(--forest);
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 1.5rem + 0.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
    text-decoration: none;
  }

  .brand :where(img, svg) {
    inline-size: 2rem;
    block-size: 2rem;
    flex: 0 0 auto;
  }

  .brand:hover {
    text-decoration: none;
  }

  .brand-mark {
    display: grid;
    place-items: center;
    inline-size: 2rem;
    block-size: 2rem;
    background: var(--lime);
    border: 1px solid var(--forest);
    border-radius: 50% 50% 45% 55%;
  }

  /* Section name beside the Rooted wordmark. */
  .brand-tagline {
    align-self: center;
    margin-inline-start: var(--space-1);
    padding-inline-start: var(--space-3);
    color: var(--forest-muted);
    border-inline-start: 1px solid var(--border-strong);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .site-nav a:any-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-block-size: 2.5rem;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    font-weight: 650;
    text-decoration: none;
  }

  .site-nav a:any-link:hover {
    background: var(--lime-soft);
  }

  @media (min-width: 64rem) {
    .site-nav a:any-link {
      padding-inline: var(--space-2);
    }
  }

  .site-nav a[aria-current] {
    background: var(--lime);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: var(--forest);
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.3em;
  }

  .skip-link {
    position: fixed;
    inset-block-start: var(--space-3);
    inset-inline-start: var(--space-3);
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--forest);
    color: var(--cream);
    border: 2px solid var(--lime);
    border-radius: var(--radius-small);
    font-weight: 750;
    transform: translateY(calc(-100% - 2rem));
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-block-end: var(--space-4);
    color: var(--terracotta-dark);
    font-size: var(--step--1);
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .eyebrow::before {
    content: "";
    inline-size: 1.8rem;
    block-size: 2px;
    flex: 0 0 auto;
    background: currentColor;
  }

  .hero-copy h1 {
    max-inline-size: 12ch;
  }

  .hero-copy > p:not(.eyebrow),
  .hero-copy .lede {
    max-inline-size: 36rem;
    margin-block-start: var(--space-5);
    color: var(--forest-muted);
    font-size: var(--step-1);
    line-height: 1.55;
  }

  .hero-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-inline-size: 0;
    padding: clamp(1rem, 4vw, 3rem);
    background: var(--lime-soft);
    border: 1px solid var(--forest);
    border-radius: 48% 52% 44% 56% / 42% 45% 55% 58%;
    box-shadow: var(--shadow-lifted);
    isolation: isolate;
  }

  .hero-visual::before {
    content: "";
    position: absolute;
    inset: var(--space-3);
    z-index: -1;
    border: 1px dashed var(--terracotta);
    border-radius: inherit;
  }

  .hero-visual :where(img, svg) {
    inline-size: 100%;
    max-block-size: 34rem;
    aspect-ratio: 1;
    object-fit: contain;
  }

  .hero-visual figcaption {
    position: absolute;
    inset-inline: 12%;
    inset-block-end: 5%;
    padding: var(--space-2) var(--space-3);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    font-family: var(--font-serif);
    font-size: var(--step--1);
    font-style: italic;
    text-align: center;
  }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
    padding: 0.7rem 1.15rem;
    border: 2px solid var(--forest);
    border-radius: var(--radius-round);
    font-size: var(--step--1);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
  }

  .button:any-link:hover {
    text-decoration: none;
  }

  .button-primary {
    background: var(--forest);
    color: var(--cream);
  }

  .button-primary:hover {
    background: var(--forest-light);
    border-color: var(--forest-light);
  }

  .button-secondary {
    background: transparent;
    color: var(--forest);
  }

  .button-secondary:hover {
    background: var(--lime);
  }

  .button:disabled,
  .button[aria-disabled="true"] {
    opacity: 0.55;
  }

  .hero-stats > * {
    min-inline-size: 0;
  }

  .hero-stats :where(strong, .stat-value) {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--step-2);
    line-height: 1.05;
  }

  .hero-stats :where(span, small, dt, .stat-label):not(.stat-value) {
    display: block;
    margin-block-start: var(--space-1);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.35;
  }

  .hero-stats dd {
    margin-block-start: var(--space-1);
    color: var(--forest-muted);
    font-family: var(--font-sans);
    font-size: var(--step--1);
    font-weight: 400;
    line-height: 1.35;
  }

  .hero-stats dd strong {
    margin-block-end: var(--space-1);
    color: var(--forest);
  }

  .section-heading h2 {
    max-inline-size: 17ch;
    margin-block-start: var(--space-2);
  }

  .section-heading p {
    color: var(--forest-muted);
  }

  .section-heading .eyebrow {
    margin-block-end: var(--space-2);
  }

  .steps-grid > :where(li, article, .step-card, .guide-step) {
    position: relative;
    min-inline-size: 0;
    padding: var(--space-5);
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid var(--terracotta);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
  }

  .steps-grid h3 {
    margin-block-end: var(--space-3);
  }

  .steps-grid p {
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .step-number {
    display: inline-grid;
    place-items: center;
    min-inline-size: 2.25rem;
    min-block-size: 2.25rem;
    margin-block-end: var(--space-5);
    padding-inline: var(--space-2);
    background: var(--lime);
    border: 1px solid var(--forest);
    border-radius: 50%;
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1;
  }

  .step-meta {
    display: block;
    margin-block-start: var(--space-4);
    color: var(--terracotta-dark);
    font-size: var(--step--1);
    font-weight: 750;
  }

  .region-section {
    background: var(--forest);
    color: var(--cream);
  }

  .region-section :where(h2, h3, h4) {
    color: var(--cream);
  }

  .region-section .section-heading p,
  .region-section .section-intro {
    color: var(--on-dark-muted);
  }

  .region-section .eyebrow {
    color: var(--lime);
  }

  .region-explorer {
    padding: clamp(1rem, 2.5vw, 2rem);
    background: var(--paper);
    color: var(--forest);
    border: 1px solid var(--lime);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-lifted);
  }

  .region-explorer :where(h3, h4) {
    color: var(--forest);
  }

  .map-panel {
    min-inline-size: 0;
    padding: var(--space-3);
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  .map-canvas {
    position: relative;
    min-inline-size: 0;
    aspect-ratio: 16 / 10;
    background: var(--lime-soft);
    border-radius: var(--radius-small);
    isolation: isolate;
  }

  .map-canvas > :where(img, svg) {
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
  }

  .region-markers {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .map-marker {
    position: absolute;
    inset-inline-start: var(--marker-x, 50%);
    inset-block-start: var(--marker-y, 50%);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 2rem;
    min-block-size: 2rem;
    max-inline-size: 9rem;
    padding: 0.35rem 0.6rem;
    background: var(--paper);
    color: var(--forest);
    border: 2px solid var(--forest);
    border-radius: var(--radius-round);
    box-shadow:
      0 0 0 2px var(--paper),
      var(--shadow-small);
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.15;
    text-align: center;
    pointer-events: auto;
    transform: translate(-50%, -50%);
  }

  .map-marker:hover {
    background: var(--lime);
  }

  .map-marker:is([aria-pressed="true"], .is-selected) {
    z-index: 2;
    background: var(--forest);
    color: var(--cream);
    border: 3px double var(--lime);
    font-weight: 850;
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.18em;
    box-shadow:
      0 0 0 3px var(--paper),
      0 0 0 5px var(--terracotta);
  }

  .region-controls > h3 {
    margin-block-end: var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  .region-list button {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    inline-size: 100%;
    min-block-size: 2.75rem;
    padding: var(--space-3);
    background: transparent;
    color: var(--forest);
    border: 1px solid var(--border);
    border-inline-start: 0.35rem solid transparent;
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    line-height: 1.3;
    text-align: start;
  }

  .region-list button::before {
    content: "";
    inline-size: 0.8rem;
    block-size: 0.8rem;
    flex: 0 0 auto;
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 50%;
  }

  .region-list button:hover {
    background: var(--lime-soft);
    border-color: var(--forest);
  }

  .region-list button[aria-pressed="true"] {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
    border-inline-start-color: var(--terracotta);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .region-list button[aria-pressed="true"]::before {
    background: var(--lime);
    border-color: var(--lime);
    box-shadow: inset 0 0 0 2px var(--forest);
  }

  .region-detail {
    padding-block-start: var(--space-5);
    border-block-start: 1px solid var(--border);
  }

  .region-detail h3 {
    margin-block-end: var(--space-3);
    font-size: var(--step-2);
  }

  .region-detail > p {
    max-inline-size: 65ch;
    color: var(--forest-muted);
  }

  .region-detail :where(.region-meta, .region-facts, .detail-grid) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: var(--space-4);
    margin-block-start: var(--space-5);
  }

  .region-detail :where(dl, .region-fact) {
    padding: var(--space-3) var(--space-4);
    background: var(--lime-soft);
    border-inline-start: 3px solid var(--terracotta);
    border-radius: var(--radius-small);
  }

  .region-detail dt {
    color: var(--forest-muted);
    font-size: var(--step--1);
    font-weight: 750;
  }

  .region-detail dd {
    margin-block-start: var(--space-1);
    font-weight: 700;
  }

  .region-detail :where(ul, ol):not(.region-list) {
    padding-inline-start: 1.25rem;
  }

  .calendar-section {
    border-block-end: 1px solid var(--border);
  }

  .calendar-grid
    > :where(li, article, .calendar-card, .calendar-item, .month-card) {
    min-inline-size: 0;
    padding: var(--space-4);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  .calendar-grid h3 {
    margin-block-end: var(--space-3);
  }

  .calendar-grid p {
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .calendar-month,
  .calendar-phase,
  .season-badge,
  .calendar-tag {
    display: inline-flex;
    align-items: center;
    min-block-size: 1.75rem;
    margin-block-end: var(--space-3);
    padding-inline: var(--space-3);
    background: var(--lime);
    color: var(--forest);
    border: 1px solid var(--forest);
    border-radius: var(--radius-round);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .calendar-note {
    margin-block-start: var(--space-5);
    padding: var(--space-4);
    background: var(--terracotta-soft);
    border-inline-start: 4px solid var(--terracotta-dark);
    border-radius: var(--radius-small);
  }

  .calendar-key,
  .calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin-block-start: var(--space-5);
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .articles-section {
    padding-block-start: 0;
  }

  .article-card {
    position: relative;
    min-inline-size: 0;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
    overflow: clip;
    overflow-clip-margin: 4px;
  }

  .article-card > :where(img, svg),
  .article-card :where(.article-card-media, .card-media) > :where(img, svg),
  .article-card picture img {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 16 / 10;
    background: var(--lime-soft);
    object-fit: cover;
  }

  .article-card-media,
  .card-media {
    margin: 0;
  }

  .article-card-content,
  .article-card > .card-content {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: var(--space-3);
    min-inline-size: 0;
    padding: var(--space-5);
  }

  .article-card > a:any-link {
    display: grid;
    grid-template-rows: auto 1fr;
    block-size: 100%;
    color: inherit;
    text-decoration: none;
  }

  .article-card > a:only-child {
    grid-row: 1 / -1;
  }

  .article-card > a > :where(img, svg, picture) {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 16 / 10;
    background: var(--lime-soft);
    object-fit: cover;
  }

  .article-card > a:focus-visible {
    outline: none;
  }

  .article-card:has(> a:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
  }

  .article-card > a:hover h3 {
    text-decoration: underline;
    text-decoration-color: var(--terracotta);
    text-decoration-thickness: 0.09em;
    text-underline-offset: 0.2em;
  }

  .article-card h3 {
    font-size: var(--step-1);
    line-height: 1.18;
  }

  .article-card h3 a:any-link {
    color: var(--forest);
    text-decoration: none;
  }

  .article-card h3 a:any-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
  }

  .article-card h3 a:any-link:hover {
    text-decoration: underline;
    text-decoration-color: var(--terracotta);
    text-decoration-thickness: 0.09em;
  }

  .article-card h3 a:focus-visible {
    outline-offset: 5px;
  }

  .article-card:has(h3 a:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
  }

  .article-card p {
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  .article-card :where(.article-category, .category, .article-kicker) {
    color: var(--terracotta-dark);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .article-link-label {
    margin-block-start: auto;
    color: var(--forest);
    font-size: var(--step--1);
    font-weight: 800;
  }

  .article-card :where(.read-time, .reading-time, .article-meta) {
    margin-block-start: auto;
    color: var(--forest-muted);
    font-size: 0.78rem;
    font-weight: 650;
  }

  .article-card .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .closing-cta {
    margin-block-end: var(--section-space);
    padding: clamp(1.5rem, 5vw, 4rem);
    background: var(--forest);
    color: var(--on-dark-muted);
    border: 1px solid var(--forest);
    border-radius: var(--radius-large);
  }

  .closing-cta > * + * {
    margin-block-start: var(--space-4);
  }

  .closing-cta h2 {
    max-inline-size: 20ch;
    color: var(--cream);
  }

  .closing-cta > p:not(.eyebrow) {
    max-inline-size: 62ch;
  }

  .closing-cta .eyebrow {
    color: var(--lime);
  }

  .closing-cta .button-primary {
    margin-block-start: var(--space-5);
    background: var(--lime);
    color: var(--forest);
    border-color: var(--lime);
  }

  .closing-cta .button-primary:hover {
    background: var(--paper);
    border-color: var(--paper);
  }

  .site-footer {
    flex: 0 0 auto;
    background: var(--forest);
    color: var(--on-dark-muted);
    border-block-start: 5px solid var(--terracotta);
  }

  .site-footer :where(h2, h3, strong) {
    color: var(--cream);
  }

  .site-footer a:any-link {
    display: inline-flex;
    align-items: center;
    min-block-size: 2rem;
    color: var(--cream);
    text-decoration-color: var(--lime);
  }

  .site-footer .brand {
    color: var(--cream);
  }

  .site-footer :where(nav, .footer-nav) :where(ul, ol) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .footer-note {
    max-inline-size: 38rem;
    font-size: var(--step--1);
  }

  /* Site footer: brand block across the top, link columns, then the page's note. */
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6) var(--space-5);
  }

  .footer-grid .footer-brand-block {
    grid-column: 1 / -1;
  }

  @media (min-width: 48rem) {
    .footer-grid {
      grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
      gap: var(--space-6) var(--space-8);
    }

    .footer-grid .footer-brand-block {
      grid-column: auto;
    }
  }

  .footer-grid .footer-brand-block p {
    max-inline-size: 38rem;
    margin-block-start: var(--space-2);
    font-size: var(--step--1);
  }

  .footer-grid h2 {
    margin-block-end: var(--space-3);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .footer-grid ul {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .footer-grid .footer-note {
    grid-column: 1 / -1;
    max-inline-size: 48rem;
    padding-block-start: var(--space-4);
    border-block-start: 1px solid rgb(245 241 229 / 0.22);
  }

  .article-hero {
    position: relative;
    padding-block-end: clamp(2rem, 5vw, 4rem);
    border-block-end: 1px solid var(--border);
  }

  .article-hero::after {
    content: "";
    position: absolute;
    inset-block-end: -2px;
    inset-inline-start: 0;
    inline-size: clamp(4rem, 12vw, 9rem);
    block-size: 3px;
    background: var(--terracotta);
  }

  .article-hero h1 {
    max-inline-size: 16ch;
    font-size: clamp(2.4rem, 1.65rem + 3vw, 4.5rem);
  }

  .article-hero .lede,
  .article-hero > p:not(.eyebrow) {
    max-inline-size: 60ch;
    margin-block-start: var(--space-5);
    color: var(--forest-muted);
    font-size: var(--step-1);
  }

  .article-hero :where(img, svg) {
    inline-size: 100%;
    margin-block-start: var(--space-6);
    aspect-ratio: 21 / 9;
    background: var(--lime-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    object-fit: cover;
  }

  .breadcrumbs :where(ol, ul) {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0 0 var(--space-5);
    padding: 0;
    list-style: none;
    font-size: var(--step--1);
  }

  .breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-inline-start: var(--space-2);
    color: var(--forest-muted);
  }

  .breadcrumbs [aria-current="page"] {
    font-weight: 750;
    text-decoration: none;
  }

  .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin-block-start: var(--space-5);
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .article-body {
    font-size: clamp(1.04rem, 1rem + 0.16vw, 1.16rem);
    line-height: 1.75;
  }

  .article-body > * + * {
    margin-block-start: 1.25em;
  }

  .article-body > :where(h2, h3, h4) {
    margin-block-start: 2.25em;
    margin-block-end: 0.35em;
    line-height: 1.15;
  }

  .article-body > h2 {
    font-size: var(--step-2);
  }

  .article-body > h3 {
    font-size: var(--step-1);
  }

  .article-body > h4 {
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  .article-body :where(h2, h3, h4) + * {
    margin-block-start: 0;
  }

  .article-body :where(ul, ol) {
    padding-inline-start: 1.5rem;
  }

  .article-body :where(li + li) {
    margin-block-start: 0.4rem;
  }

  .article-body li::marker {
    color: var(--terracotta-dark);
    font-weight: 800;
  }

  .article-body :where(ul, ol) :where(ul, ol) {
    margin-block-start: 0.4rem;
  }

  .article-body a:any-link {
    overflow-wrap: anywhere;
  }

  .article-body :where(strong, b) {
    font-weight: 750;
  }

  .article-body hr {
    block-size: 1px;
    margin-block: var(--space-7);
    background: var(--border);
    border: 0;
  }

  .article-body blockquote {
    padding: var(--space-4) var(--space-5);
    background: var(--lime-soft);
    border-inline-start: 4px solid var(--forest);
    border-radius: var(--radius-small);
    font-family: var(--font-serif);
    font-size: var(--step-1);
    font-style: italic;
    line-height: 1.5;
  }

  .article-body blockquote cite {
    display: block;
    margin-block-start: var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--step--1);
    font-style: normal;
  }

  .article-body :where(.callout, .field-note, .note, .tip, .warning) {
    padding: var(--space-5);
    background: var(--paper);
    border: 1px solid var(--border);
    border-inline-start: 5px solid var(--terracotta);
    border-radius: var(--radius-medium);
  }

  .article-body
    :where(.callout, .field-note, .note, .tip, .warning)
    > :first-child {
    margin-block-start: 0;
  }

  .article-body
    :where(.callout, .field-note, .note, .tip, .warning)
    > :last-child {
    margin-block-end: 0;
  }

  .article-body
    :where(.callout, .field-note, .note, .tip, .warning)
    :where(h2, h3, h4) {
    margin-block-start: 0;
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  .article-body figure {
    margin-block: var(--space-6);
  }

  .article-body figure :where(img, svg) {
    inline-size: 100%;
    background: var(--lime-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  .article-body figcaption {
    margin-block-start: var(--space-3);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.5;
  }

  .table-wrapper {
    max-inline-size: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
    container: table / inline-size;
  }

  .article-body .table-wrapper {
    margin-block: var(--space-6);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  .article-body table {
    inline-size: 100%;
    border-collapse: collapse;
    background: var(--paper);
    font-size: var(--step--1);
    line-height: 1.5;
    text-align: start;
  }

  .article-body caption {
    padding: var(--space-3) var(--space-4);
    background: var(--cream-deep);
    font-weight: 750;
    text-align: start;
  }

  .article-body :where(th, td) {
    padding: var(--space-3) var(--space-4);
    border-block-end: 1px solid var(--border);
    vertical-align: top;
  }

  .article-body thead th {
    background: var(--lime);
    color: var(--forest);
    font-weight: 800;
    text-align: start;
  }

  .article-body tbody th {
    background: var(--cream-deep);
    font-weight: 750;
    text-align: start;
  }

  .article-body tbody tr:last-child > :where(th, td) {
    border-block-end: 0;
  }

  .article-body sub,
  .article-body sup {
    font-size: 0.75em;
    line-height: 0;
  }

  .article-body code {
    padding: 0.1em 0.3em;
    background: var(--cream-deep);
    border-radius: 0.2rem;
    font-size: 0.9em;
  }

  .article-aside :where(.aside-card, .on-this-page, .table-of-contents) {
    padding: var(--space-5);
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid var(--terracotta);
    border-radius: var(--radius-medium);
  }

  .article-aside h2,
  .article-aside h3 {
    margin-block-end: var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  .article-aside :where(ul, ol) {
    display: grid;
    gap: var(--space-1);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .article-aside a:any-link {
    display: block;
    min-block-size: 2rem;
    padding: var(--space-1) var(--space-2);
    border-inline-start: 3px solid transparent;
    font-size: var(--step--1);
    text-decoration: none;
  }

  .article-aside a:any-link:hover {
    background: var(--lime-soft);
  }

  .article-aside a[aria-current="location"] {
    background: var(--lime-soft);
    border-inline-start-color: var(--terracotta-dark);
    font-weight: 800;
    text-decoration: underline;
  }

  .article-aside p {
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .sources {
    margin-block-start: var(--space-7);
    padding-block-start: var(--space-5);
    border-block-start: 2px solid var(--forest);
    font-size: var(--step--1);
  }

  .sources h2 {
    margin-block-end: var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--step-1);
    letter-spacing: 0;
  }

  .sources :where(ul, ol) {
    padding-inline-start: 1.4rem;
  }

  .sources li + li {
    margin-block-start: var(--space-3);
  }

  .sources a:any-link {
    overflow-wrap: anywhere;
  }

  .related-reading {
    margin-block-start: var(--section-space);
    padding-block-start: var(--space-6);
    border-block-start: 1px solid var(--border);
  }

  .related-reading > h2 {
    margin-block-end: var(--space-5);
    font-size: var(--step-2);
  }

  .related-reading :where(.related-list, ul, ol) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .related-reading :where(.related-list, ul, ol) > li {
    padding: var(--space-4);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  .related-reading :where(.related-list, ul, ol) > li > a:any-link {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: var(--step-1);
    font-weight: 700;
    line-height: 1.25;
  }

  .related-reading p {
    margin-block-start: var(--space-2);
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-5) 0 0;
    padding: 0;
    list-style: none;
  }

  .tag {
    display: inline-flex;
    align-items: center;
    min-block-size: 1.75rem;
    padding-inline: var(--space-3);
    background: var(--lime-soft);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-round);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .index-hero {
    position: relative;
    border-block-end: 1px solid var(--border);
  }

  .index-hero::after {
    content: "";
    position: absolute;
    inset-block-end: -2px;
    inset-inline-start: 0;
    inline-size: clamp(4rem, 12vw, 9rem);
    block-size: 3px;
    background: var(--terracotta);
  }

  .index-hero .hero-copy h1 {
    max-inline-size: 13ch;
  }

  .index-hero-notes {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
  }

  .index-hero-notes .hero-stats {
    grid-template-columns: 1fr;
    margin-block-start: 0;
  }

  .index-hero-notes .hero-stats > div + div {
    padding-block-start: var(--space-4);
    border-block-start: 1px solid var(--border);
  }

  .crop-library .section-heading h2 {
    max-inline-size: 20ch;
  }

  .index-toolbar {
    padding-block-end: var(--space-5);
    border-block-end: 1px solid var(--border);
  }

  .index-toolbar > :first-child {
    flex: 1 1 20rem;
    max-inline-size: 44rem;
  }

  .index-toolbar :where(h2, h3) {
    margin-block-end: var(--space-2);
    font-size: var(--step-2);
  }

  .index-toolbar p {
    color: var(--forest-muted);
  }

  .sort-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    margin: 0;
    padding: 0.35rem 0.55rem;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-medium);
    accent-color: var(--forest);
  }

  .sort-options legend {
    padding-inline: var(--space-2);
    color: var(--forest-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  .sort-option {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-block-size: 3rem;
    padding-inline-start: 0.75rem;
    border-radius: var(--radius-small);
  }

  .sort-option:hover,
  .sort-option:has(input:checked) {
    background: var(--lime-soft);
  }

  .sort-option:has(input:checked) {
    box-shadow: inset 0 0 0 1px var(--forest);
  }

  .sort-option > label {
    padding-inline-start: 0;
  }

  .sort-options :where(label) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-block-size: 3rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
  }

  .sort-options :where(label):hover {
    background: var(--lime-soft);
  }

  .sort-options :where(label):has(input:checked) {
    background: var(--lime-soft);
    box-shadow: inset 0 0 0 1px var(--forest);
  }

  .sort-options input[type="radio"] {
    inline-size: 1.15rem;
    block-size: 1.15rem;
    flex: 0 0 auto;
    accent-color: var(--forest);
    cursor: pointer;
  }

  #apply-sort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 7rem;
    min-block-size: 3rem;
    padding: 0.65rem 1.1rem;
    background: var(--forest);
    color: var(--cream);
    border: 2px solid var(--forest);
    border-radius: var(--radius-round);
    font-size: var(--step--1);
    font-weight: 800;
    line-height: 1.25;
  }

  #apply-sort:hover {
    background: var(--forest-light);
    border-color: var(--forest-light);
  }

  .crop-card {
    --crop-accent: var(--terracotta);
    --crop-soft: var(--terracotta-soft);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    min-inline-size: 0;
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid var(--crop-accent);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    overflow: clip;
    overflow-clip-margin: 5px;
    container: crop-card / inline-size;
    isolation: isolate;
  }

  .crop-card[data-crop-id="bean"] {
    --crop-accent: var(--forest-light);
    --crop-soft: var(--lime-soft);
  }

  .crop-card[data-crop-id="kale"] {
    --crop-accent: #3f6b5d;
    --crop-soft: #e4eee7;
  }

  .crop-card[data-crop-id="spinach"] {
    --crop-accent: #61763b;
    --crop-soft: #edf1dc;
  }

  .crop-card[data-crop-id="chard"] {
    --crop-accent: #a06b32;
    --crop-soft: #f5e8d2;
  }

  .crop-card[data-crop-id="beetroot"] {
    --crop-accent: #8b4657;
    --crop-soft: #f3e1e3;
  }

  .crop-card[data-crop-id="mushroom"] {
    --crop-accent: #7b5b45;
    --crop-soft: #eee4d7;
  }

  .crop-card[data-crop-id="carrot"] {
    --crop-accent: #b85c24;
    --crop-soft: #f8e7d5;
  }

  .crop-card[data-crop-id="cabbage"] {
    --crop-accent: #536c3f;
    --crop-soft: #e6ecd9;
  }

  .crop-card[data-crop-id="broccoli"] {
    --crop-accent: #2f6550;
    --crop-soft: #dfece2;
  }

  .crop-card[data-crop-id="sweet-potato"] {
    --crop-accent: #9a563b;
    --crop-soft: #f3e2d7;
  }

  .crop-card[data-crop-id="winter-squash"] {
    --crop-accent: #a66b18;
    --crop-soft: #f6ead0;
  }

  .crop-card[data-crop-id="pea"] {
    --crop-accent: #4d773b;
    --crop-soft: #e5efd9;
  }

  .crop-card[data-crop-id="lentil"] {
    --crop-accent: #7b6144;
    --crop-soft: #ece4d8;
  }

  .crop-card[data-crop-id="chickpea"] {
    --crop-accent: #92702d;
    --crop-soft: #f3ead2;
  }

  .crop-card[data-crop-id="tomato"] {
    --crop-accent: #a44235;
    --crop-soft: #f6dfd8;
  }

  .crop-card[data-crop-id="pepper"] {
    --crop-accent: #7a4c73;
    --crop-soft: #eee2ec;
  }

  .crop-card[data-crop-id="grape"] {
    --crop-accent: #625579;
    --crop-soft: #ece7f0;
  }

  .crop-card[data-crop-id="corn"] {
    --crop-accent: #a47b20;
    --crop-soft: #f6efd7;
  }

  .crop-card[data-crop-id="wheat"] {
    --crop-accent: #8f6b3f;
    --crop-soft: #f4ead8;
  }

  .crop-card[data-crop-id="buckwheat"] {
    --crop-accent: #9a6268;
    --crop-soft: #f4e6e5;
  }

  .crop-card[data-crop-id="plantme"] {
    --crop-accent: var(--forest);
    --crop-soft: var(--lime-soft);
  }

  .crop-card[data-crop-id="plantme"] .crop-card-media img {
    mix-blend-mode: multiply;
  }

  .crop-card-media {
    display: grid;
    place-items: center;
    min-inline-size: 0;
    min-block-size: 0;
    margin: 0;
    aspect-ratio: 16 / 10;
    padding: var(--space-5);
    background: var(--crop-soft);
    border-block-end: 1px solid var(--border);
  }

  .crop-card-media :where(img, svg, picture) {
    inline-size: 100%;
    block-size: 100%;
    min-block-size: 0;
  }

  .crop-card-media :where(img, svg) {
    object-fit: contain;
  }

  .crop-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    min-inline-size: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
  }

  .crop-card-content :where(h2, h3) {
    font-size: var(--step-2);
    line-height: 1.12;
  }

  .crop-card-content > p {
    color: var(--forest-muted);
  }

  .crop-card-content [lang="la"] {
    font-family: var(--font-serif);
  }

  .crop-card-content > .crop-card-kicker {
    color: var(--terracotta-dark);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  .crop-card-qualifier {
    display: block;
    margin-block-start: var(--space-1);
    color: var(--forest-muted);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0;
  }

  .crop-card-nutrition {
    inline-size: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--cream);
    border-inline-start: 3px solid var(--crop-accent);
    border-radius: var(--radius-small);
  }

  .crop-nutrient-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin: 0 0 var(--space-2);
    padding: 0;
    list-style: none;
  }

  .crop-nutrient-highlights li {
    font-size: var(--step--1);
  }

  .crop-nutrient-highlights strong {
    font-family: var(--font-serif);
    font-size: var(--step-0);
    font-variant-numeric: tabular-nums;
  }

  .crop-nutrition-basis {
    color: var(--forest-muted);
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .crop-card-link:any-link {
    color: var(--forest);
    text-decoration: none;
  }

  .crop-card-link:any-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--radius-large);
  }

  .crop-card-link:any-link:hover {
    text-decoration: underline;
    text-decoration-color: var(--crop-accent);
    text-decoration-thickness: 0.1em;
  }

  .crop-card-link:focus-visible {
    outline: none;
  }

  .crop-card:has(.crop-card-link:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 5px;
  }

  .crop-card
    :where(a, button, input, select, textarea):not(.crop-card-link) {
    position: relative;
    z-index: 3;
  }

  :where(.crop-facts, .crop-card-facts) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    inline-size: 100%;
    margin: var(--space-2) 0 0;
    padding: 0;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    overflow: clip;
    list-style: none;
  }

  :where(.crop-facts, .crop-card-facts) > * {
    min-inline-size: 0;
    padding: var(--space-3);
    background: var(--cream);
  }

  :where(.crop-facts, .crop-card-facts) :where(dt, .fact-label),
  :where(.crop-facts, .crop-card-facts) li > :first-child:not(strong) {
    color: var(--forest-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  :where(.crop-facts, .crop-card-facts) dd {
    margin-block-start: var(--space-1);
    color: var(--forest);
    font-family: var(--font-serif);
    font-size: var(--step-1);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.35;
  }

  :where(.crop-facts, .crop-card-facts) :where(dd strong, .fact-value),
  :where(.crop-facts, .crop-card-facts) li > strong {
    display: block;
    color: var(--forest);
    font-family: var(--font-serif);
    font-size: var(--step-1);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
  }

  .crop-nutrient-highlights.crop-facts {
    display: flex;
    gap: var(--space-2) var(--space-5);
    margin: 0 0 var(--space-2);
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .crop-nutrient-highlights.crop-facts > li {
    padding: 0;
    background: transparent;
  }

  .crop-nutrient-highlights.crop-facts > li > strong {
    display: inline;
    font-size: var(--step-0);
  }

  .nutrient-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-block-size: 1.75rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-round);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
  }

  .nutrient-badge::before {
    content: "";
    inline-size: 0.45rem;
    block-size: 0.45rem;
    flex: 0 0 auto;
    background: currentColor;
    border-radius: 50%;
  }

  .density-very-high {
    background: var(--forest);
    color: var(--lime);
    border-color: var(--forest);
  }

  .density-very-high::before {
    border-radius: 0;
    transform: rotate(45deg);
  }

  .density-high {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
  }

  .density-moderate {
    background: var(--terracotta-soft);
    color: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
  }

  .crop-pairing {
    inline-size: 100%;
    margin-block-start: auto;
    padding-block-start: var(--space-4);
    color: var(--forest-muted);
    border-block-start: 1px solid var(--border);
    font-size: var(--step--1);
  }

  .crop-pairing :where(strong, h3, h4) {
    color: var(--forest);
  }

  .homestead-section {
    border-block-start: 1px solid var(--border);
  }

  .homestead-card {
    --crop-accent: #8a651f;
    --crop-soft: #f4ead1;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-inline-size: 0;
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid var(--crop-accent);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    overflow: clip;
    overflow-clip-margin: 5px;
  }

  .homestead-card > :where(.homestead-card-media, .crop-card-media) {
    margin: 0;
    background: var(--crop-soft);
  }

  .homestead-card > :where(img, picture, svg) {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 16 / 10;
    padding: var(--space-5);
    background: var(--crop-soft);
    object-fit: contain;
  }

  .homestead-card :where(.homestead-card-content, .crop-card-content) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    min-inline-size: 0;
    padding: clamp(1.5rem, 4vw, 3rem);
  }

  .homestead-card > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    min-inline-size: 0;
  }

  .homestead-card :where(h2, h3) {
    font-size: var(--step-2);
  }

  .homestead-card :where(p, li) {
    max-inline-size: 62ch;
  }

  .homestead-card :where(p, li):not(.eyebrow) {
    color: var(--forest-muted);
  }

  .homestead-card :where(ul, ol):not(.crop-facts) {
    margin: 0;
    padding-inline-start: 1.25rem;
  }

  .homestead-card :where(.button, .text-link) {
    margin-block-start: var(--space-2);
  }

  .homestead-card:has(.crop-card-link:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 5px;
  }

  .apiary-grid > :where(li, article) {
    min-inline-size: 0;
  }

  .hive-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-inline-size: 0;
    block-size: 100%;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid #8a651f;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
  }

  .hive-card > * + * {
    margin-block-start: var(--space-4);
  }

  .hive-card :where(h2, h3) {
    font-size: var(--step-1);
    line-height: 1.2;
  }

  .hive-card :where(p, li) {
    color: var(--forest-muted);
  }

  .hive-card :where(ul, ol) {
    margin-block: 0;
    padding-inline-start: 1.25rem;
  }

  .hive-card :where(img, svg) {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 16 / 10;
    background: #f4ead1;
    object-fit: contain;
  }

  .hive-card :where(.button, .text-link) {
    margin-block-start: auto;
  }

  .bee-safety {
    max-inline-size: var(--reading-measure);
    margin-block-start: var(--space-6);
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--terracotta-soft);
    border: 1px solid var(--terracotta);
    border-inline-start: 4px solid var(--terracotta-dark);
    border-radius: var(--radius-medium);
  }

  .bee-safety > * + * {
    margin-block-start: var(--space-3);
  }

  .bee-safety :where(h2, h3) {
    font-size: var(--step-1);
  }

  .bee-safety :where(ul, ol) {
    margin-block: 0;
    padding-inline-start: 1.25rem;
  }

  @media (min-width: 48rem) {
    .homestead-card:has(
      > :where(.homestead-card-media, .crop-card-media, img, picture, svg)
    ) {
      grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr);
    }

    .homestead-card > :where(.homestead-card-media, .crop-card-media, img, picture, svg) {
      block-size: 100%;
      aspect-ratio: auto;
      border-block-end: 0;
      border-inline-end: 1px solid var(--border);
    }
  }

  .methodology {
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
  }

  .methodology > * + * {
    margin-block-start: var(--space-4);
  }

  .methodology :where(h2, h3) {
    max-inline-size: 24ch;
    font-size: var(--step-2);
  }

  .methodology :where(p, ul, ol) {
    max-inline-size: var(--reading-measure);
  }

  .methodology :where(ul, ol) {
    padding-inline-start: 1.4rem;
  }

  .methodology li + li {
    margin-block-start: var(--space-2);
  }

  .complement-section {
    border-block-start: 1px solid var(--border);
  }

  .complement-grid {
    margin-block-end: 0;
    padding: 0;
    list-style: none;
  }

  .complement-grid > * {
    min-inline-size: 0;
    padding: var(--space-5);
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid var(--terracotta);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-small);
  }

  .complement-grid :where(h2, h3) {
    margin-block-end: var(--space-3);
    font-size: var(--step-1);
  }

  .complement-grid p {
    color: var(--forest-muted);
  }

  .complement-copy > p {
    font-size: var(--step-1);
    line-height: 1.6;
  }

  .complement-intro {
    max-inline-size: var(--reading-measure);
    font-size: var(--step-1);
    line-height: 1.6;
  }

  .combination-list {
    display: grid;
    gap: var(--space-4);
    margin: var(--space-5) 0 0;
    padding-inline-start: 1.5rem;
  }

  .combination-list > li {
    padding-inline-start: var(--space-2);
  }

  .combination-list > li::marker {
    color: var(--terracotta-dark);
    font-family: var(--font-serif);
    font-size: var(--step-1);
    font-weight: 700;
  }

  .combination-list strong {
    font-family: var(--font-serif);
    font-size: var(--step-1);
    line-height: 1.3;
  }

  .combination-list p {
    margin-block-start: var(--space-1);
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .complement-grid.combination-list > li {
    padding-inline-start: var(--space-5);
  }

  .complement-section > .methodology {
    margin-block-start: var(--space-6);
  }

  .crop-profile {
    border-block-start: 1px solid var(--border);
  }

  .profile-grid > * {
    min-inline-size: 0;
  }

  .profile-facts {
    margin: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--forest);
    color: var(--cream);
    border: 1px solid var(--forest);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
  }

  .profile-facts :where(h2, h3) {
    margin-block-end: var(--space-4);
    color: var(--cream);
    font-size: var(--step-1);
  }

  .profile-facts > div,
  .profile-facts :where(dl) > div {
    padding-block: var(--space-3);
  }

  .profile-facts > div + div,
  .profile-facts :where(dl) > div + div {
    border-block-start: 1px solid rgb(245 241 229 / 0.25);
  }

  .profile-facts dt {
    color: var(--on-dark-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .profile-facts dd {
    margin-block-start: var(--space-1);
    color: var(--cream);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
    line-height: 1.55;
  }

  .profile-facts dd strong {
    display: block;
    margin-block-end: var(--space-1);
    font-family: var(--font-serif);
    font-size: var(--step-1);
    line-height: 1.3;
  }

  .profile-facts :where(p, small) {
    color: var(--on-dark-muted);
    font-size: var(--step--1);
  }

  .profile-facts > p {
    margin-block-start: var(--space-4);
  }

  .nutrition-panel {
    min-inline-size: 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    container: nutrition-panel / inline-size;
  }

  .nutrition-panel > * + * {
    margin-block-start: var(--space-4);
  }

  .nutrition-panel > :where(h2, h3) {
    font-size: var(--step-2);
  }

  .nutrition-panel > p {
    max-inline-size: var(--reading-measure);
    color: var(--forest-muted);
  }

  .nutrition-panel :where(small, .note, .nutrition-note) {
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.5;
  }

  .nutrition-table {
    inline-size: 100%;
    font-size: var(--step--1);
    line-height: 1.5;
    text-align: start;
  }

  table.nutrition-table {
    border-collapse: collapse;
    background: var(--paper);
  }

  .nutrition-table:not(table) {
    max-inline-size: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
  }

  .nutrition-table caption {
    padding: 0 0 var(--space-3);
    color: var(--forest);
    font-weight: 750;
    text-align: start;
  }

  .nutrition-table :where(th, td) {
    padding: var(--space-3);
    border-block-end: 1px solid var(--border);
    vertical-align: baseline;
  }

  .nutrition-table thead th {
    background: var(--lime-soft);
    color: var(--forest);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: start;
    text-transform: uppercase;
  }

  .nutrition-table tbody th {
    font-weight: 650;
    text-align: start;
  }

  .nutrition-table td {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: end;
    white-space: nowrap;
  }

  .nutrition-table tbody tr:last-child > :where(th, td) {
    border-block-end: 0;
  }

  .pairing-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--terracotta-soft);
    border: 1px solid var(--terracotta);
    border-inline-start: 5px solid var(--terracotta-dark);
    border-radius: var(--radius-medium);
  }

  .pairing-panel > * + * {
    margin-block-start: var(--space-4);
  }

  .pairing-panel > :where(h2, h3) {
    font-size: var(--step-1);
  }

  .pairing-panel > p {
    max-inline-size: 65ch;
  }

  .pairing-list {
    display: grid;
    margin: var(--space-4) 0 0;
    padding: 0;
    list-style: none;
  }

  .pairing-list > li {
    position: relative;
    padding: var(--space-3) 0 var(--space-3) var(--space-5);
    border-block-start: 1px solid rgb(147 71 44 / 0.28);
  }

  .pairing-list > li::before {
    content: "";
    position: absolute;
    inset-block-start: 1.35rem;
    inset-inline-start: 0.2rem;
    inline-size: 0.5rem;
    block-size: 0.5rem;
    background: var(--terracotta-dark);
    border-radius: 50% 50% 45% 55%;
  }

  .pairing-list :where(h3, h4) {
    margin-block-end: var(--space-1);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  .pairing-list li > strong {
    display: block;
    margin-block-end: var(--space-1);
  }

  .pairing-list p {
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .methodology a:any-link,
  .complement-grid a:any-link,
  .pairing-panel a:any-link {
    display: inline-flex;
    align-items: center;
    min-block-size: 1.5rem;
    overflow-wrap: anywhere;
  }

  .technique-section {
    border-block-start: 1px solid var(--border);
  }

  .technique-explorer {
    padding: clamp(1rem, 2.5vw, 2rem);
    background: var(--paper);
    border: 1px solid var(--border);
    border-block-start: 4px solid var(--terracotta);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
  }

  .technique-visual {
    padding: var(--space-3);
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  .technique-visual :where(img, svg) {
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 1200 / 650;
    background: var(--lime-soft);
    border-radius: var(--radius-small);
    object-fit: contain;
  }

  .technique-visual figcaption {
    margin-block-start: var(--space-3);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.5;
  }

  .technique-controls > :where(h2, h3) {
    margin-block-end: var(--space-3);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  .technique-list {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .technique-list button {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    inline-size: 100%;
    min-inline-size: 2.75rem;
    min-block-size: 2.75rem;
    padding: var(--space-3);
    background: var(--cream);
    color: var(--forest);
    border: 1px solid var(--border);
    border-inline-start: 0.35rem solid transparent;
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    font-weight: 650;
    line-height: 1.35;
    text-align: start;
  }

  .technique-list button::before {
    content: "";
    inline-size: 0.8rem;
    block-size: 0.8rem;
    flex: 0 0 auto;
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 50%;
  }

  .technique-list button:hover {
    background: var(--lime-soft);
    border-color: var(--forest);
  }

  .technique-list button[aria-pressed="true"] {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
    border-inline-start-color: var(--terracotta);
    border-radius: var(--radius-small) var(--radius-medium) var(--radius-medium)
      var(--radius-small);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.22em;
  }

  .technique-list button[aria-pressed="true"]::before {
    background: var(--lime);
    border-color: var(--lime);
    box-shadow: inset 0 0 0 2px var(--forest);
  }

  .technique-list button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }

  .technique-detail {
    min-inline-size: 0;
    margin-block-start: var(--space-5);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
  }

  #technique-species {
    color: var(--terracotta-dark);
    font-size: var(--step--1);
    font-weight: 650;
    line-height: 1.55;
  }

  #technique-name {
    margin-block-start: var(--space-2);
    margin-block-end: var(--space-3);
    font-size: var(--step-2);
  }

  #technique-summary {
    max-inline-size: 65ch;
    color: var(--forest-muted);
    line-height: 1.65;
  }

  .technique-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: var(--space-3);
    margin-block-start: var(--space-5);
  }

  .technique-facts > div {
    min-inline-size: 0;
    padding: var(--space-3) var(--space-4);
    background: var(--lime-soft);
    border-inline-start: 3px solid var(--terracotta);
    border-radius: var(--radius-small);
  }

  .technique-facts dt {
    color: var(--forest-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .technique-facts dd {
    margin-block-start: var(--space-1);
    font-size: var(--step--1);
    line-height: 1.6;
  }

  .technique-steps {
    max-inline-size: 65ch;
    margin: var(--space-5) 0 0;
    padding-inline-start: 1.5rem;
    line-height: 1.65;
  }

  .technique-steps > li {
    padding-inline-start: var(--space-1);
  }

  .technique-steps > li + li {
    margin-block-start: var(--space-3);
  }

  .technique-steps li::marker {
    color: var(--terracotta-dark);
    font-family: var(--font-serif);
    font-weight: 800;
  }

  .technique-caution {
    max-inline-size: 65ch;
    margin-block-start: var(--space-5);
    padding: var(--space-4);
    background: var(--terracotta-soft);
    color: var(--forest);
    border: 1px solid var(--terracotta);
    border-inline-start: 4px solid var(--terracotta-dark);
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    line-height: 1.6;
  }

  .technique-note {
    max-inline-size: var(--reading-measure);
    margin-block-start: var(--space-5);
    color: var(--forest-muted);
    font-size: var(--step--1);
  }

  .technique-note strong {
    color: var(--forest);
  }

  @container crop-card (inline-size < 25rem) {
    .crop-card-content {
      padding: var(--space-4);
    }

    :where(.crop-facts, .crop-card-facts) {
      grid-template-columns: 1fr;
    }
  }

  @container nutrition-panel (inline-size < 28rem) {
    .nutrition-table :where(th, td) {
      padding: var(--space-2);
    }
  }

  @container article-grid (inline-size < 28rem) {
    .article-card-content,
    .article-card > .card-content {
      padding: var(--space-4);
    }
  }

  @container table (inline-size < 34rem) {
    table {
      min-inline-size: 32rem;
    }
  }

  @media (min-width: 64rem) {
    .profile-grid > .profile-facts {
      position: sticky;
      inset-block-start: 6rem;
    }
  }

  @media (max-width: 35rem) {
    .sort-options {
      inline-size: 100%;
    }

    .sort-options :where(label) {
      flex: 1 1 8rem;
    }

    .sort-option {
      flex: 1 1 100%;
    }

    .sort-option > label {
      justify-content: flex-start;
    }

    #apply-sort {
      inline-size: 100%;
    }

    .map-canvas {
      aspect-ratio: 2 / 1;
    }

    .map-marker {
      inline-size: 2rem;
      min-inline-size: 2rem;
      max-inline-size: 2rem;
      block-size: 2rem;
      min-block-size: 2rem;
      padding: 0;
      border-radius: 50%;
      font-size: 0;
    }

    .article-body :where(.callout, .field-note, .note, .tip, .warning),
    .article-body blockquote {
      padding: var(--space-4);
    }
  }

  @media (pointer: coarse) {
    .site-nav a:any-link,
    .region-list button,
    .technique-list button,
    .article-aside a:any-link,
    .pairing-panel a:any-link {
      min-block-size: 2.75rem;
    }
  }
}

@layer utilities {
  .visually-hidden:where(:not(:focus-within, :active)),
  .sr-only:where(:not(:focus-within, :active)),
  #sort-status:where(:not(:focus-within, :active)) {
    position: absolute !important;
    inline-size: 1px !important;
    block-size: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
  }

  .lede {
    font-size: var(--step-1);
    line-height: 1.55;
  }

  .muted {
    color: var(--forest-muted);
  }
}

@layer overrides {
  @media (prefers-reduced-motion: no-preference) {
    html:focus-within {
      scroll-behavior: smooth;
    }

    .button,
    .site-nav a:any-link,
    .map-marker,
    .region-list button,
    .technique-list button,
    .article-card,
    .crop-card,
    .sort-options :where(label),
    .sort-option,
    #apply-sort,
    .skip-link {
      transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
    }

    .article-card:hover,
    .crop-card:has(.crop-card-link:hover) {
      box-shadow: var(--shadow-lifted);
      transform: translateY(-0.2rem);
    }

    .map-marker:is([aria-pressed="true"], .is-selected) {
      transform: translate(-50%, -50%) scale(1.04);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    html:focus-within {
      scroll-behavior: auto;
    }

    .button,
    .site-nav a:any-link,
    .map-marker,
    .region-list button,
    .technique-list button,
    .article-card,
    .crop-card,
    .sort-options :where(label),
    .sort-option,
    #apply-sort,
    .skip-link {
      transition: none;
    }

    .article-card:hover,
    .crop-card:has(.crop-card-link:hover) {
      transform: none;
    }
  }

  .region-section :where(a:any-link, button, [tabindex]):focus-visible,
  .site-footer :where(a:any-link, button, [tabindex]):focus-visible,
  .profile-facts :where(a:any-link, button, [tabindex]):focus-visible,
  .button-primary:focus-visible,
  #apply-sort:focus-visible,
  .skip-link:focus-visible {
    outline-color: var(--lime);
  }

  @media (forced-colors: active) {
    :root {
      --focus: Highlight;
    }

    .site-header,
    .article-card,
    .crop-card,
    .homestead-card,
    .hive-card,
    .bee-safety,
    .closing-cta,
    .sort-options,
    .methodology,
    .complement-grid > *,
    .profile-facts,
    .nutrition-panel,
    .pairing-panel,
    .map-panel,
    .region-explorer,
    .steps-grid > :where(li, article, .step-card, .guide-step),
    .calendar-grid
      > :where(li, article, .calendar-card, .calendar-item, .month-card),
    .article-aside :where(.aside-card, .on-this-page, .table-of-contents) {
      border-color: CanvasText;
      box-shadow: none;
    }

    .site-nav a[aria-current],
    .article-aside a[aria-current="location"] {
      border: 2px solid Highlight;
      text-decoration: underline;
    }

    .button,
    #apply-sort,
    .map-marker,
    .region-list button {
      background: ButtonFace;
      color: ButtonText;
      border-color: ButtonText;
      box-shadow: none;
    }

    .map-marker:is([aria-pressed="true"], .is-selected),
    .region-list button[aria-pressed="true"] {
      background: Highlight;
      color: HighlightText;
      border: 3px double Highlight;
      outline: 2px solid CanvasText;
      outline-offset: 2px;
      text-decoration: underline;
    }

    .region-list button[aria-pressed="true"] {
      border-inline-start-color: Highlight;
    }

    .article-card:has(h3 a:focus-visible),
    .article-card:has(> a:focus-visible),
    .crop-card:has(.crop-card-link:focus-visible),
    .homestead-card:has(.crop-card-link:focus-visible) {
      outline-color: Highlight;
    }

    .sort-options :where(label):has(input:checked),
    .sort-option:has(input:checked) {
      outline: 1px solid Highlight;
      outline-offset: -2px;
      box-shadow: none;
    }

    .nutrient-badge,
    .density-very-high,
    .density-high,
    .density-moderate {
      background: Canvas;
      color: CanvasText;
      border-color: CanvasText;
    }

    .density-high {
      outline: 1px solid CanvasText;
      outline-offset: -4px;
    }

    :where(.crop-facts, .crop-card-facts) {
      background: CanvasText;
      border-color: CanvasText;
    }

    :where(.crop-facts, .crop-card-facts) > * {
      background: Canvas;
    }

    .crop-nutrient-highlights.crop-facts {
      background: transparent;
    }

    .pairing-list > li::before {
      background: CanvasText;
    }

    .index-hero::after {
      background: CanvasText;
    }

    .hero-visual::before {
      background: transparent;
      border-color: CanvasText;
    }

    .article-hero::after {
      background: CanvasText;
    }

    .technique-explorer,
    .technique-visual,
    .technique-detail,
    .technique-facts > div,
    .technique-caution {
      background: Canvas;
      color: CanvasText;
      border-color: CanvasText;
      box-shadow: none;
    }

    .technique-list button {
      background: ButtonFace;
      color: ButtonText;
      border-color: ButtonText;
      box-shadow: none;
    }

    .technique-list button[aria-pressed="true"] {
      background: Highlight;
      color: HighlightText;
      border: 3px double Highlight;
      outline: 2px solid CanvasText;
      outline-offset: 2px;
      text-decoration: underline;
    }

    .technique-list button[aria-pressed="true"]::before {
      background: HighlightText;
      border-color: HighlightText;
      box-shadow: inset 0 0 0 2px Highlight;
    }

    .technique-list button:focus-visible {
      outline: 3px solid Highlight;
      outline-offset: 3px;
    }
  }
}

/* ---------------------------------------------------------------------------
   Sections: the field-manual look shared by Hearth & Earth and PlantMe.
   Moved here from the old build/recipes.css. Every rule is scoped to
   pages whose <body> has class="manual", so the crop library and articles
   are untouched. This layer comes last, matching the old unlayered sheet.
   --------------------------------------------------------------------------- */

@layer sections {
  /* Section colour tokens (material families in Hearth & Earth) */
  :root {
    --earth: #95612f;
    --earth-soft: #f0e2d0;
    --earth-deep: #7a4e27;
    --clay: #b4552f;
    --clay-soft: #f2dacb;
    --fire: #93472c;
    --fire-soft: #f3d8c9;
    --fibre: #66763a;
    --fibre-soft: #e9edd4;
    --metal: #4d5c61;
    --metal-soft: #e3e8e6;
    --water: #2f6b6b;
    --water-soft: #dcebe7;
    --warmth: #9c672c;
    --warmth-soft: #f2e4ce;
    --manual-line: 1px solid var(--border);
  }

  /* ---------- Shared shell ---------- */

  :where(.manual) .brand-mark--manual {
    background: var(--terracotta-soft);
  }

  :where(.manual) .manual-hero,
  :where(.manual) .manual-section,
  :where(.manual) .manual-band-inner,
  :where(.manual) .recipe-trail,
  :where(.manual) .manual-cta {
    inline-size: min(var(--content-max), calc(100% - (2 * var(--gutter))));
    margin-inline: auto;
  }

  :where(.manual) .manual-hero {
    display: grid;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding-block: clamp(3rem, 7vw, 6.5rem) clamp(3rem, 6vw, 5rem);
    border-block-end: var(--manual-line);
    position: relative;
  }

  :where(.manual) .manual-hero::after {
    content: "";
    position: absolute;
    inset-block-end: -2px;
    inset-inline-start: 0;
    inline-size: clamp(4rem, 12vw, 9rem);
    block-size: 3px;
    background: var(--terracotta);
  }

  :where(.manual) .manual-hero h1 {
    max-inline-size: 13ch;
  }

  :where(.manual) .manual-hero-copy > p:not(.eyebrow) {
    max-inline-size: 40rem;
    margin-block-start: var(--space-5);
    color: var(--forest-muted);
    font-size: var(--step-1);
    line-height: 1.55;
  }

  :where(.manual) .manual-hero-copy > p + p {
    margin-block-start: var(--space-4);
    font-size: var(--step-0);
  }

  :where(.manual) .manual-hero-art {
    position: relative;
    min-inline-size: 0;
    margin: 0;
  }

  :where(.manual) .manual-hero-art img {
    inline-size: 100%;
    block-size: auto;
    background: var(--lime-soft);
    border: 1px solid var(--forest);
    border-radius: 46% 54% 43% 57% / 44% 47% 53% 56%;
    box-shadow: var(--shadow-lifted);
  }

  :where(.manual) .manual-hero-art figcaption {
    max-inline-size: 34rem;
    margin: var(--space-4) auto 0;
    padding-inline: var(--space-2);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.45;
    text-align: center;
  }

  :where(.manual) .manual-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-5) 0 0;
    padding: 0;
    list-style: none;
  }

  :where(.manual) .manual-badges li {
    padding: 0.32rem 0.7rem;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-round);
    color: var(--forest-muted);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.02em;
  }

  :where(.manual) .manual-section {
    padding-block: clamp(3rem, 6vw, 5.5rem);
    border-block-end: var(--manual-line);
  }

  :where(.manual) .manual-section:last-of-type {
    border-block-end: 0;
  }

  :where(.manual) .manual-section > .section-heading {
    margin-block-end: clamp(1.75rem, 4vw, 3rem);
  }

  :where(.manual) .manual-section > .section-heading h2 {
    max-inline-size: 22ch;
  }

  /* ---------- Opening sequence ---------- */
  :where(.manual) .trail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    margin: 0;
    padding: 0;
    background: var(--border);
    border: var(--manual-line);
    border-radius: var(--radius-medium);
    overflow: clip;
    list-style: none;
    counter-reset: trail;
  }

  :where(.manual) .trail > li {
    position: relative;
    min-inline-size: 0;
    padding: var(--space-5);
    background: var(--paper);
    counter-increment: trail;
  }

  :where(.manual) .trail > li::before {
    content: counter(trail, decimal-leading-zero);
    display: block;
    margin-block-end: var(--space-3);
    color: var(--terracotta-dark);
    font-family: var(--font-serif);
    font-size: var(--step-2);
    font-weight: 700;
    line-height: 1;
  }

  :where(.manual) .trail h3 {
    font-size: var(--step-1);
  }

  :where(.manual) .trail p {
    margin-block-start: var(--space-2);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .trail a:any-link {
    font-weight: 750;
  }

  @media (min-width: 40rem) {
    :where(.manual) .trail {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  }

  @media (min-width: 68rem) {
    :where(.manual) .trail {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

  }

  /* ---------- Filter and recipe grid ---------- */
  :where(.manual) .filter-panel {
    margin-block-end: clamp(1.5rem, 3vw, 2.5rem);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: var(--cream-deep);
    border: var(--manual-line);
    border-radius: var(--radius-medium);
  }

  :where(.manual) .filter-panel[hidden] {
    display: none;
  }

  :where(.manual) .filter-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin-block-end: var(--space-4);
  }

  :where(.manual) .filter-search label {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  :where(.manual) .filter-search input {
    flex: 1 1 18rem;
    min-block-size: 2.75rem;
    padding: var(--space-2) var(--space-3);
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    color: var(--forest);
  }

  :where(.manual) .filter-search input:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }

  :where(.manual) .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
  }

  :where(.manual) .filter-chip {
    min-block-size: 2.5rem;
    padding: 0.45rem 0.9rem;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-round);
    color: var(--forest);
    font-size: var(--step--1);
    font-weight: 750;
    line-height: 1.2;
  }

  :where(.manual) .filter-chip:hover {
    background: var(--lime-soft);
  }

  :where(.manual) .filter-chip[aria-pressed="true"] {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--cream);
  }

  :where(.manual) .filter-count {
    margin-inline-start: auto;
    color: var(--forest-muted);
    font-size: var(--step--1);
    font-variant-numeric: tabular-nums;
  }

  :where(.manual) .recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  :where(.manual) .recipe-card {
    --accent: var(--earth);
    --accent-soft: var(--earth-soft);
    position: relative;
    min-inline-size: 0;
    background: var(--paper);
    border: var(--manual-line);
    border-block-start: 4px solid var(--accent);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    overflow: clip;
    overflow-clip-margin: 5px;
    transition:
    box-shadow 160ms ease,
    transform 160ms ease;
  }

  :where(.manual) .recipe-card[data-family="clay"] {
    --accent: var(--clay);
    --accent-soft: var(--clay-soft);
  }

  :where(.manual) .recipe-card[data-family="fire"] {
    --accent: var(--fire);
    --accent-soft: var(--fire-soft);
  }

  :where(.manual) .recipe-card[data-family="metal"] {
    --accent: var(--metal);
    --accent-soft: var(--metal-soft);
  }

  :where(.manual) .recipe-card[data-family="fibre"] {
    --accent: var(--fibre);
    --accent-soft: var(--fibre-soft);
  }

  :where(.manual) .recipe-card[data-family="water"] {
    --accent: var(--water);
    --accent-soft: var(--water-soft);
  }

  :where(.manual) .recipe-card[data-family="warmth"] {
    --accent: var(--warmth);
    --accent-soft: var(--warmth-soft);
  }

  :where(.manual) .recipe-card:hover {
    box-shadow: var(--shadow-lifted);
    transform: translateY(-0.2rem);
  }

  :where(.manual) .recipe-card-link:any-link {
    display: grid;
    grid-template-rows: auto 1fr;
    block-size: 100%;
    color: inherit;
    text-decoration: none;
  }

  :where(.manual) .recipe-card-link:focus-visible {
    outline: none;
  }

  :where(.manual) .recipe-card:has(.recipe-card-link:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 4px;
  }

  :where(.manual) .recipe-card-media {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    padding: var(--space-4);
    background: var(--accent-soft);
    border-block-end: var(--manual-line);
  }

  :where(.manual) .recipe-card-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: contain;
  }

  :where(.manual) .recipe-number {
    position: absolute;
    inset-block-start: var(--space-3);
    inset-inline-start: var(--space-3);
    display: inline-grid;
    place-items: center;
    min-inline-size: 2.3rem;
    min-block-size: 2.3rem;
    padding-inline: var(--space-2);
    background: var(--paper);
    border: 1px solid var(--accent);
    border-radius: var(--radius-round);
    color: var(--accent);
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
  }

  :where(.manual) .recipe-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-inline-size: 0;
    padding: clamp(1.15rem, 3vw, 1.6rem);
  }

  :where(.manual) .recipe-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  :where(.manual) .recipe-card h3 {
    font-size: var(--step-1);
    line-height: 1.15;
  }

  :where(.manual) .recipe-summary {
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .recipe-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: auto 0 0;
    padding: 0;
    background: var(--border);
    border: var(--manual-line);
    border-radius: var(--radius-small);
    overflow: clip;
  }

  :where(.manual) .recipe-facts > div {
    min-inline-size: 0;
    padding: var(--space-2) var(--space-3);
    background: var(--cream);
  }

  :where(.manual) .recipe-facts dt {
    color: var(--forest-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  :where(.manual) .recipe-facts dd {
    margin-block-start: 0.1rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
  }

  :where(.manual) .material-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  :where(.manual) .material-chips li {
    padding: 0.15rem 0.5rem;
    background: var(--accent-soft);
    border-radius: var(--radius-round);
    color: var(--forest);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
  }

  :where(.manual) .difficulty {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  :where(.manual) .difficulty::before {
    content: "";
    flex: 0 0 auto;
    inline-size: 0.45rem;
    block-size: 0.45rem;
    background: var(--accent, var(--terracotta));
    border-radius: 50%;
    box-shadow:
    0.65rem 0 0 transparent,
    1.3rem 0 0 transparent;
    margin-inline-end: 1.75rem;
  }

  :where(.manual) .recipe-card[data-difficulty="2"] .difficulty::before {
    box-shadow: 0.65rem 0 0 var(--accent);
  }

  :where(.manual) .recipe-card[data-difficulty="3"] .difficulty::before {
    box-shadow:
    0.65rem 0 0 var(--accent),
    1.3rem 0 0 var(--accent);
  }

  :where(.manual) .recipe-empty {
    padding: var(--space-6);
    background: var(--paper);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-medium);
    color: var(--forest-muted);
    text-align: center;
  }

  /* ---------- Proof tests and safety ---------- */
  :where(.manual) .proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: var(--space-4);
    margin-block-start: var(--space-6);
  }

  :where(.manual) .proof-card {
    padding: var(--space-5);
    background: var(--paper);
    border: var(--manual-line);
    border-block-start: 3px solid var(--earth);
    border-radius: var(--radius-medium);
  }

  :where(.manual) .proof-card:nth-child(2) {
    border-block-start-color: var(--water);
  }

  :where(.manual) .proof-card:nth-child(3) {
    border-block-start-color: var(--fire);
  }

  :where(.manual) .proof-card:nth-child(4) {
    border-block-start-color: var(--fibre);
  }

  :where(.manual) .proof-card h3 {
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  :where(.manual) .proof-card p {
    margin-block-start: var(--space-2);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .safety-band {
    display: grid;
    gap: var(--space-5);
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--forest);
    color: var(--cream);
    border-radius: var(--radius-large);
  }

  :where(.manual) .safety-band h2,
  :where(.manual) .safety-band h3 {
    color: var(--cream);
  }

  :where(.manual) .safety-band .eyebrow {
    color: var(--lime);
    margin-block-end: var(--space-2);
  }

  :where(.manual) .safety-band p,
  :where(.manual) .safety-band li {
    color: var(--on-dark-muted);
  }

  :where(.manual) .safety-band ul {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding-inline-start: 1.25rem;
  }

  :where(.manual) .safety-band strong {
    color: var(--cream);
  }

  :where(.manual) .safety-band a:any-link {
    color: var(--cream);
    text-decoration-color: var(--lime);
  }

  /* ---------- Article page refinements ---------- */
  :where(.manual) .article-hero .breadcrumbs {
    margin-block-end: var(--space-5);
  }

  :where(.manual) .article-hero .article-category {
    margin-block-end: var(--space-3);
  }

  :where(.manual) .article-hero .article-meta {
    margin-block-start: var(--space-4);
  }

  :where(.manual) .article-body .lead {
    color: var(--forest-muted);
    font-size: var(--step-1);
    line-height: 1.6;
  }

  :where(.manual) .article-body .manual-kicker {
    color: var(--terracotta-dark);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
  }

  :where(.manual) .article-body .formula {
    margin-block: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: var(--forest);
    color: var(--cream);
    border-radius: var(--radius-medium);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.8;
    overflow-x: auto;
  }

  :where(.manual) .article-body .formula strong {
    color: var(--lime);
  }

  :where(.manual) .article-body .ratio {
    display: inline-block;
    padding: 0.08em 0.42em;
    background: var(--lime-soft);
    border: 1px solid var(--border-strong);
    border-radius: 0.3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
  }

  :where(.manual) .article-body .callout h3,
  :where(.manual) .article-body .callout h4,
  :where(.manual) .article-body .warning h3,
  :where(.manual) .article-body .warning h4 {
    margin-block-end: var(--space-2);
  }

  :where(.manual) .article-body .warning {
    background: var(--fire-soft);
    border-inline-start-color: var(--fire);
  }

  :where(.manual) .article-body .field-note {
    background: var(--lime-soft);
    border-inline-start-color: var(--forest);
  }

  :where(.manual) .materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: var(--space-4);
    margin-block: var(--space-5);
  }

  :where(.manual) .materials-grid > section {
    padding: var(--space-4);
    background: var(--paper);
    border: var(--manual-line);
    border-radius: var(--radius-medium);
  }

  :where(.manual) .materials-grid h3 {
    margin-block: 0 var(--space-2);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    letter-spacing: 0;
  }

  :where(.manual) .materials-grid :where(ul, ol) {
    margin: 0;
    padding-inline-start: 1.25rem;
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .materials-grid li + li {
    margin-block-start: 0.3rem;
  }

  :where(.manual) .article-body .step-detail {
    margin-block-start: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--cream-deep);
    border-inline-start: 3px solid var(--terracotta);
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .article-body .step-detail > :first-child {
    margin-block-start: 0;
  }

  :where(.manual) .article-body .step-detail > :last-child {
    margin-block-end: 0;
  }

  :where(.manual) .article-body ol.article-steps > li {
    padding-block-end: var(--space-4);
    border-block-end: 1px dashed var(--border);
  }

  :where(.manual) .article-body ol.article-steps > li:last-child {
    border-block-end: 0;
    padding-block-end: 0;
  }

  :where(.manual) .article-body ol.article-steps > li::marker {
    color: var(--terracotta-dark);
    font-family: var(--font-serif);
    font-size: 1.2em;
    font-weight: 700;
  }

  :where(.manual) .article-body table .num {
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
  }

  :where(.manual) .article-aside .key-facts {
    display: grid;
    gap: 0;
    margin: 0;
  }

  :where(.manual) .article-aside .key-facts > div {
    padding-block: var(--space-3);
  }

  :where(.manual) .article-aside .key-facts > div + div {
    border-block-start: 1px solid var(--border);
  }

  :where(.manual) .article-aside .key-facts dt {
    color: var(--forest-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  :where(.manual) .article-aside .key-facts dd {
    margin-block-start: 0.15rem;
    font-size: var(--step--1);
    font-weight: 700;
    line-height: 1.45;
  }

  :where(.manual) .article-aside .aside-note {
    margin-block-start: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--cream-deep);
    border-radius: var(--radius-small);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.5;
  }

  :where(.manual) .article-aside .aside-stack {
    display: grid;
    gap: var(--space-4);
  }

  :where(.manual) .recipe-pager {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: var(--space-3);
    margin-block-start: var(--space-6);
    padding-block-start: var(--space-5);
    border-block-start: 1px solid var(--border);
  }

  :where(.manual) .recipe-pager a:any-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    background: var(--paper);
    border: var(--manual-line);
    border-radius: var(--radius-small);
    font-size: var(--step--1);
    font-weight: 700;
    text-decoration: none;
  }

  :where(.manual) .recipe-pager a:any-link:hover {
    background: var(--lime-soft);
  }

  :where(.manual) .recipe-pager span {
    display: block;
    margin-block-end: 0.15rem;
    color: var(--forest-muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  /* ---------- Footer and CTA ---------- */
  :where(.manual) .manual-cta {
    margin-block: clamp(2.5rem, 6vw, 5rem);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background: var(--terracotta-soft);
    border: 1px solid var(--terracotta);
    border-inline-start: 6px solid var(--terracotta-dark);
    border-radius: var(--radius-large);
  }

  :where(.manual) .manual-cta h2 {
    max-inline-size: 24ch;
    font-size: var(--step-2);
  }

  :where(.manual) .manual-cta p {
    max-inline-size: 60ch;
    margin-block-start: var(--space-3);
    color: var(--forest-muted);
  }


  /* ---------- Responsive and motion ---------- */
  @media (min-width: 56rem) {
    :where(.manual) .manual-hero {
      grid-template-columns: minmax(0, 1.05fr) minmax(19rem, 0.95fr);
    }

    :where(.manual) .safety-band {
      grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
      align-items: start;
    }

  }

  @media (max-width: 46rem) {
    :where(.manual) .filter-count {
      flex: 1 1 100%;
      margin-inline-start: 0;
      margin-block-start: var(--space-2);
    }

    :where(.manual) .manual-hero-art {
      max-inline-size: 34rem;
    }

  }

  @media (max-width: 35rem) {
    :where(.manual) .filter-chip {
      flex: 1 1 auto;
    }

    :where(.manual) .recipe-facts {
      grid-template-columns: 1fr;
    }

    :where(.manual) .trail > li {
      padding: var(--space-4);
    }

  }

  @media (prefers-reduced-motion: reduce) {
    :where(.manual) .recipe-card,
    :where(.manual) .filter-chip {
      transition: none;
    }

    :where(.manual) .recipe-card:hover {
      transform: none;
    }

  }

  @media (forced-colors: active) {
    :where(.manual) .recipe-card,
    :where(.manual) .filter-panel,
    :where(.manual) .proof-card,
    :where(.manual) .materials-grid > section,
    :where(.manual) .manual-hero-art,
    :where(.manual) .manual-cta {
      border-color: CanvasText;
      box-shadow: none;
    }

    :where(.manual) .filter-chip[aria-pressed="true"] {
      background: Highlight;
      color: HighlightText;
      border-color: Highlight;
    }

    :where(.manual) .recipe-number,
    :where(.manual) .material-chips li {
      border: 1px solid CanvasText;
    }

  }

  @media print {
    :where(.manual) .site-header,
    :where(.manual) .site-footer,
    :where(.manual) .filter-panel,
    :where(.manual) .article-aside,
    :where(.manual) .related-reading,
    :where(.manual) .recipe-pager,
    :where(.manual) .manual-cta,
    :where(.manual) .skip-link {
      display: none !important;
    }

    :where(.manual) .article-layout {
      display: block;
      margin-block-start: 1rem;
    }

    :where(.manual) .article-body {
      max-inline-size: none;
    }

    :where(.manual) .article-body a:any-link {
      color: inherit;
      text-decoration: none;
    }

    :where(.manual) .article-body a:any-link[href^="http"]::after {
      content: " (" attr(href) ")";
      font-size: 0.8em;
      overflow-wrap: anywhere;
    }

    :where(.manual) .recipe-card,
    :where(.manual) .manual-hero-art {
      box-shadow: none;
    }

  }

  /* ---------- Small shared notes ---------- */
  :where(.manual) .inline-note {
    margin-block: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--lime-soft);
    border: var(--manual-line);
    border-inline-start: 4px solid var(--forest);
    border-radius: var(--radius-small);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .inline-note strong {
    color: var(--forest);
  }

  :where(.manual) .scope-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-4);
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
  }

  :where(.manual) .scope-list > li {
    padding: var(--space-5);
    background: var(--paper);
    border: var(--manual-line);
    border-radius: var(--radius-medium);
  }

  :where(.manual) .scope-list h3 {
    font-size: var(--step-1);
  }

  :where(.manual) .scope-list p {
    margin-block-start: var(--space-2);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  /* Keep the manual's diagram-style art whole rather than cropping it. */
  :where(.manual) .article-hero .article-hero-art {
    max-inline-size: 52rem;
    margin-inline: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    padding: 0;
    background: var(--paper);
  }

  :where(.manual) .text-link:any-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: var(--space-1) 0;
    font-weight: 750;
    text-decoration-thickness: 0.09em;
  }

  :where(.manual) .text-link:any-link::after {
    content: "→";
    color: var(--terracotta-dark);
  }


  /* On narrow screens, let tables wrap inside the page rather than forcing a
   horizontal scroll with no visible cue. */
  @media (max-width: 47.99rem) {
    :where(.manual) .article-body table {
      min-inline-size: 0;
      font-size: 0.78rem;
    }

    :where(.manual) .article-body :where(th, td) {
      padding: 0.55rem 0.5rem;
    }

  }

  @media (max-width: 47.99rem) {
    :where(.manual) .article-body .formula {
      font-size: 0.78rem;
      line-height: 1.7;
    }

  }

  /* ---------- Companion design notes ---------- */
  :where(.manual) .design-note {
    display: grid;
    gap: clamp(1.25rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.25rem, 3.5vw, 2.5rem);
    background: var(--paper);
    border: var(--manual-line);
    border-inline-start: 6px solid var(--terracotta);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-small);
    overflow: clip;
  }

  :where(.manual) .design-note-copy > .eyebrow {
    margin-block-end: var(--space-2);
  }

  :where(.manual) .design-note h2 {
    font-size: var(--step-2);
  }

  :where(.manual) .design-note-copy > p {
    max-inline-size: 52ch;
    margin-block-start: var(--space-3);
    color: var(--forest-muted);
    font-size: var(--step--1);
    line-height: 1.55;
  }

  :where(.manual) .design-note-copy .button {
    margin-block-start: var(--space-4);
  }

  :where(.manual) .design-note-art {
    margin: 0;
  }

  :where(.manual) .design-note-art img {
    inline-size: 100%;
    block-size: auto;
    background: var(--cream-deep);
    border: var(--manual-line);
    border-radius: var(--radius-medium);
  }

  @media (min-width: 56rem) {
    :where(.manual) .design-note {
      grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

  }

  :where(.manual) .design-note + .design-note {
    margin-block-start: var(--space-6);
  }
}
