:root {
        color-scheme: light;
        --paper: #fffaf1;
        --ink: #161616;
        --muted: #4e5d62;
        --line: #d8d0c2;
        --green: #6d28d9;
        --green-soft: #d9eadf;
      }

      body.guide-page main.guide-text {
        width: 100%;
        max-width: none;
        margin: 0 auto;
      }

      .guide-text .hero {
        grid-template-columns: 1fr;
      }

      .guide-text h1 {
        font-family: "Jersey 20", sans-serif;
        font-weight: 400;
        max-width: 22ch;
        font-size: clamp(2.5rem, 5.5vw, 4.8rem);
        line-height: 1.05;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        background: var(--paper);
        color: var(--ink);
        font-family:
          Inter,
          ui-sans-serif,
          system-ui,
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          sans-serif;
        line-height: 1.58;
      }

      a {
        color: var(--green);
        font-weight: 800;
      }

      .wrap {
        width: min(calc(100% - 32px), 1080px);
        margin: 0 auto;
      }

      .site-nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 22px 0 12px;
      }

      .brand {
        color: var(--ink);
        font-size: 1.35rem;
        font-weight: 950;
        text-decoration: none;
      }

      .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        font-size: 0.95rem;
      }

      .nav-links a {
        color: var(--ink);
        text-decoration: none;
      }

      .hero {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.7fr);
        gap: clamp(22px, 5vw, 54px);
        align-items: center;
        padding: clamp(28px, 6vw, 72px) 0 clamp(24px, 4vw, 46px);
      }

      .kicker {
        display: inline-block;
        margin-bottom: 10px;
        color: var(--green);
        font-size: 0.78rem;
        font-weight: 950;
        text-transform: uppercase;
      }

      h1,
      h2 {
        margin: 0;
        letter-spacing: 0;
        line-height: 1;
      }

      h1 {
        max-width: 11ch;
        font-size: clamp(3rem, 8vw, 6.2rem);
      }

      h2 {
        font-size: clamp(1.8rem, 4vw, 3.1rem);
      }

      .lede {
        max-width: 680px;
        margin: 18px 0 0;
        color: var(--muted);
        font-size: clamp(1.05rem, 2vw, 1.25rem);
      }

      .button-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 22px;
      }

      .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        border: 2px solid var(--ink);
        border-radius: 8px;
        padding: 10px 15px;
        background: var(--paper);
        color: var(--ink);
        font-weight: 950;
        text-decoration: none;
      }

      .button-primary {
        background: var(--green);
        color: var(--paper);
      }

      figure {
        margin: 0;
        border: 1px solid var(--line);
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 16px 44px rgb(0 0 0 / 10%);
      }

      img {
        display: block;
        width: 100%;
        height: auto;
      }

      figcaption {
        padding: 10px 12px;
        color: var(--muted);
        font-size: 0.9rem;
      }

      .section {
        padding: clamp(26px, 5vw, 54px) 0;
        border-top: 1px solid var(--line);
      }

      .section-head {
        max-width: 780px;
        margin-bottom: 18px;
      }

      .section-head p {
        color: var(--muted);
        font-size: 1.05rem;
      }

      .grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 20px 0 0;
        padding: 0;
        list-style: none;
      }

      .grid li,
      .notice {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fffdf8;
        padding: 16px;
      }

      .grid strong {
        display: block;
        margin-bottom: 6px;
      }

      .notice {
        margin-top: 18px;
        background: var(--green-soft);
      }

      .footer {
        padding: 30px 0 42px;
        border-top: 1px solid var(--line);
        color: var(--muted);
      }

      @media (max-width: 800px) {
        .hero,
        .grid {
          grid-template-columns: 1fr;
        }
      }

      /* Responsive audit guard: keeps static guide pages fluid on phones and ultrawide screens. */
      @media (min-width: 1440px) {
        .wrap,
        .site-nav,
        .hero,
        .section,
        .footer {
          width: min(calc(100% - 64px), 1640px);
        }

        .hero {
          gap: clamp(40px, 4vw, 84px);
        }

        .lede,
        .section-head {
          max-width: 860px;
        }
      }

      @media (max-width: 720px) {
        .wrap,
        .site-nav,
        .hero,
        .section,
        .footer {
          width: min(calc(100% - 24px), 1120px);
        }

        .site-nav {
          align-items: flex-start;
          flex-direction: column;
          gap: 12px;
        }

        .nav-links,
        .footer nav {
          gap: 8px 12px;
        }

        .hero,
        .grid,
        .steps,
        .facts,
        .answers,
        .troubleshooting,
        .media-grid,
        .settings {
          grid-template-columns: minmax(0, 1fr);
        }

        .hero > *,
        .hero figure,
        .hero img,
        .section,
        .section > *,
        .footer > * {
          min-width: 0;
          max-width: 100%;
        }

        h1 {
          max-width: 100%;
          font-size: clamp(2.35rem, 11vw, 3.85rem);
          overflow-wrap: anywhere;
        }

        h2 {
          font-size: clamp(1.75rem, 10vw, 2.65rem);
          overflow-wrap: anywhere;
        }

        .lede,
        .section-head,
        .section-head p {
          max-width: 100%;
        }

        .hero-actions,
        .button-row {
          width: 100%;
          flex-direction: column;
          align-items: stretch;
        }

        .button {
          width: 100%;
        }

        .source-list {
          min-width: 0;
        }

        .protocol-table {
          display: block;
          max-width: 100%;
          min-width: 0;
          overflow-x: auto;
        }

        .settings-list {
          columns: 1;
        }
      }

.guide-text .section :is(p, li) { max-width: 75ch; }

/* The readable line length is measured with the actual body font, not the
   much wider digit used by the ch unit in the system fallback. */
body.text-guides main.guide-text :is(p, li) { max-width: 55ch; }
body.text-guides .guide-nav :is(.guide-theme-toggle, .guide-menu-toggle) { flex-basis: 44px; width: 44px; min-width: 44px; height: 44px; }
body.text-guides .guide-nav .guide-get-started { min-height: 44px; padding-block: 11px; }
body.text-guides .guide-actions { flex: 0 0 auto; }
.guide-directory ul, .guide-extra ul { padding-left: 1.25rem; }
.guide-directory li { margin-block: 1rem; }
.guide-directory li > p { margin-top: 0; }
.guide-directory li > a, .guide-extra li > a { display: inline-block; min-height: 44px; padding-block: 9px; }
.guide-extra summary { min-height: 44px; padding-block: 12px; cursor: pointer; font-weight: 600; }
@media (max-width: 540px) {
  body.text-guides nav.guide-nav { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  body.text-guides nav.guide-nav { gap: 6px; }
  body.text-guides .guide-nav .guide-brand { font-size: 22px; }
  body.text-guides .guide-actions { gap: 4px; margin-left: auto; }
}
