/* ============================================================================
   Pinstripe docs theme (2026-11-05).

   The docs pages are the same tailor's shop as the front page
   (site/assets/pinstripe.css): cream pattern paper, green cloth, gold chalk,
   mauve pattern lines, Bodoni Moda for the labels in a good jacket and Lato
   for the reading. Every value below comes from the front page's tokens and
   pieces: the header and its size label, the hero's gold chalk line, the
   eyebrows, the pattern pieces and their code, the woven labels, the gold
   Copy pill, the green footer and its joke. Nothing is invented here.

   How it gets onto the pages: docs/docs.json "theme" names this file and
   docs/_header.html. The docs builder copies this file to
   site/docs/theme/pinstripe.css and links it after the kit's docs.css, so the
   --dk-* tokens and the rules below win without !important. The kit's docs.css
   stays byte for byte Squire's. Fonts load from ../../assets/fonts/.

   The front page has no dark mode, so the dark set is derived from the board's
   "on dark" tile and the cloth the shop is named for: a charcoal suiting with a
   faint cream chalk stripe, cream text, gold chalk where the paper uses green,
   a pale mauve for the tailor's marks. Green stays where the front page puts
   it on any ground: the woven labels, the size tag and the footer.

   File map: 1. fonts and tokens  2. frame  3. header and tape  4. sidebar,
             menu  5. article  6. code  7. callouts, tables, quotes
             8. toc, pager, footer  9. dark  10. responsive
             11. motion (no-preference only)  12. print
   ========================================================================== */

/* ---------------------------------------------------- 1. fonts and tokens */

@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../assets/fonts/bodoni-moda-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../assets/fonts/bodoni-moda-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 800; font-display: swap; src: url("../../assets/fonts/bodoni-moda-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400; font-display: swap; src: url("../../assets/fonts/bodoni-moda-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 600; font-display: swap; src: url("../../assets/fonts/bodoni-moda-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Reenie Beanie"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../assets/fonts/reenie-beanie-latin-400-normal.woff2") format("woff2"); }

:root {
  /* The front page's palette, under the same names. */
  --ps-green: #0c5449;
  --ps-green-deep: #073a32;
  --ps-gold: #ffcc33;
  --ps-gold-soft: #ffe08a;
  --ps-cream: #f4f1ea;
  --ps-tissue: #fbf9f4;
  --ps-mauve: #8b6372;          /* lines and pins, never body text */
  --ps-mauve-deep: #6e4a58;     /* mauve that passes 4.5:1 on cream, for text */
  --ps-ink: #1b2623;
  --ps-ink-soft: #3f4b47;
  --ps-line: rgba(12, 84, 73, 0.1);
  --ps-line-strong: rgba(12, 84, 73, 0.2);
  --ps-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --ps-chalk: "Reenie Beanie", "Bradley Hand", cursive;   /* the front page's tailor's notes */
  --ps-body: var(--wsu-font-family-body, Lato, Calibri, "Helvetica Neue", Arial, sans-serif);
  --ps-mono: var(--wsu-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  --ps-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ps-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Roles, so the dark set only swaps values. */
  --ps-header-bg: rgba(244, 241, 234, 0.94);
  --ps-title: var(--ps-green-deep);     /* Bodoni headings */
  --ps-label: var(--ps-mauve-deep);     /* eyebrows, pattern marks */
  --ps-piece: var(--ps-tissue);         /* pattern pieces: pager, tables, notes */
  --ps-piece-line: var(--ps-mauve);
  --ps-seam: rgba(139, 99, 114, 0.55);  /* the dashed seam allowance */
  --ps-code: rgba(12, 84, 73, 0.07);
  --ps-code-ink: var(--ps-ink);
  --ps-code-rule: var(--ps-green);
  --ps-inline-ink: var(--ps-green-deep);
  --ps-woven: var(--ps-green);
  --ps-woven-ink: var(--ps-cream);
  --ps-grid-strong: rgba(12, 84, 73, 0.085);
  --ps-grid: rgba(12, 84, 73, 0.045);
  /* Pattern paper: the front page's printed grid, a heavier line every fifth. */
  --ps-paper:
    linear-gradient(var(--ps-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--ps-grid-strong) 1px, transparent 1px),
    linear-gradient(var(--ps-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--ps-grid) 1px, transparent 1px);
  --ps-paper-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  --ps-footer: var(--ps-green-deep);
  --ps-scroll: var(--ps-mauve);
  --ps-shade: rgba(7, 58, 50, 0.22);   /* the edge a wide table scrolls toward */
  --ps-warn-line: var(--ps-mauve-deep);
  --ps-warn-label: var(--ps-mauve-deep);
  --ps-warn-label-ink: var(--ps-cream);
  --ps-warn-label-seam: rgba(244, 241, 234, 0.6);
  --ps-danger-line: var(--ps-ink);
  --ps-danger-label: var(--ps-ink);
  --ps-danger-label-ink: var(--ps-cream);
  --ps-danger-label-seam: rgba(255, 204, 51, 0.6);
  --ps-header-h: 72px;

  /* The kit's tokens, set from the palette above. */
  --dk-bg: var(--ps-cream);
  --dk-ink: var(--ps-ink);
  --dk-muted: var(--ps-ink-soft);
  --dk-rule: #c6d2ca;           /* --ps-line-strong laid on the cream, as a solid */
  --dk-accent: var(--ps-green);
  --dk-on-accent: var(--ps-cream);
  --dk-note: var(--ps-green);
  --dk-tip: var(--ps-green);
  --dk-warning: var(--ps-mauve-deep);
  --dk-danger: var(--ps-ink);
  --dk-code-bg: var(--ps-code);
  --dk-display: var(--ps-display);
  --dk-mono: var(--ps-mono);
  --dk-radius: 4px;
  --dk-focus: var(--ps-green);
  --dk-focus-w: 3px;
  --dk-focus-o: 3px;
  --dk-sidebar: 15.5rem;
  --dk-prose-max: 46rem;
  --dk-gap: 1.75rem;

  color-scheme: light;
}

/* ------------------------------------------------------------- 2. frame */

html {
  background: var(--dk-bg);
  scroll-padding-top: calc(var(--ps-header-h) + 1rem);
}

/* Pattern paper in light (printed lighter than the front page so it sits
   behind long reading), chalk-striped charcoal in dark: tokens above and in 9. */
body {
  margin: 0;
  color: var(--dk-ink);
  background-color: var(--dk-bg);
  background-image: var(--ps-paper);
  background-size: var(--ps-paper-size);
  background-position: -1px -1px;
  font-family: var(--ps-body);
  overflow-x: clip;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: var(--dk-focus-w) solid var(--dk-focus);
  outline-offset: var(--dk-focus-o);
  border-radius: 2px;
}

/* ---------------------------------------------------- 3. header and tape */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 20;
  background: var(--ps-header-bg);
  backdrop-filter: saturate(1.2) blur(6px);
  border-block-end: 1px solid var(--ps-line-strong);
}

.site-header__row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-sizing: border-box;
  max-inline-size: 100rem;
  min-block-size: var(--ps-header-h);
  margin-inline: auto;
  padding-inline: var(--dk-gap);
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--ps-title);
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
}

.brand__name {
  font-family: var(--ps-display);
  font-size: 1.375rem;
  font-weight: 600;
}

/* The front page's nav: a running stitch appears under a link on hover. */
.site-nav {
  display: none;
  margin-inline-start: auto;
  gap: 1.75rem;
}

.site-nav a {
  padding-bottom: 3px;
  color: var(--dk-ink);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--dk-accent) 50%, transparent 0) 0 100% / 0 1.5px repeat-x;
}

.site-nav a:hover {
  background-size: 6px 1.5px;
}

/* You are here: the Docs link keeps its stitch, a little heavier. */
.site-nav a[aria-current="page"] {
  color: var(--ps-title);
  font-weight: 700;
  background-image: linear-gradient(90deg, var(--dk-accent) 55%, transparent 0);
  background-size: 6px 2px;
}

/* The size label, as on the front page: a woven tag with the version. */
.size-label {
  flex-shrink: 0;
  margin-inline-start: auto;
  padding: 0.25rem 0.65rem;
  background: var(--ps-green);
  color: var(--ps-cream);
  font-family: var(--ps-mono);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 2px;
  outline: 1px dashed rgba(244, 241, 234, 0.6);
  outline-offset: -4px;
}

.size-label__k {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ps-gold);
}

/* --------------------------------------------------- 4. sidebar and menu */

.docs-layout {
  gap: 1.5rem clamp(1.75rem, 1rem + 2.5vw, 3.5rem);
  padding-block: 2.5rem 3.5rem;
  padding-inline: var(--dk-gap);
}

/* Group labels are the front page's eyebrows. */
.docs-nav__label {
  display: block;
  margin: 1.5rem 0 0.4rem;
  font-family: var(--ps-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ps-label);
}

/* Group lists are plain <ul> inside the kit's list: no bullets, no indent. */
.docs-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A group's pages hang off a dashed seam, so the top-level pages after it read as their own. */
.docs-nav__group > ul {
  margin-inline-start: 0.3rem;
  padding-inline-start: 0.45rem;
  border-inline-start: 1.5px dashed var(--ps-line-strong);
}

.docs-nav__group + li {
  margin-top: 1rem;
}

.docs-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.97rem;
  line-height: 1.35;
  color: var(--dk-ink);
  border-radius: 2px;
}

.docs-nav a:hover {
  color: var(--ps-title);
  background: var(--ps-code);
}

/* The page you are on wears a gold pin, like the front page's notes. */
.docs-nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--ps-title);
  background: var(--ps-code);
}

.docs-nav a[aria-current="page"]::before {
  content: "";
  flex: none;
  inline-size: 9px;
  block-size: 9px;
  margin-inline-start: -0.15rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2c4, var(--ps-gold) 55%, #c99a12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.docs-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-block-size: 44px;
  box-sizing: border-box;
  padding: 0.4rem 1rem;
  font-family: var(--ps-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ps-title);
  background: var(--ps-piece);
  border: 1.5px solid var(--ps-piece-line);
  border-radius: var(--dk-radius);
  outline: 1.5px dashed var(--ps-seam);
  outline-offset: -7px;
  list-style: none;
}

.docs-menu summary:focus-visible {
  outline: var(--dk-focus-w) solid var(--dk-focus);
  outline-offset: var(--dk-focus-o);
}

.docs-menu summary::-webkit-details-marker {
  display: none;
}

.docs-menu summary::after {
  content: "";
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -2px;
}

.docs-menu[open] summary::after {
  rotate: 225deg;
  translate: 0 2px;
}

.docs-menu[open] > .docs-nav {
  padding: 0.5rem 0.25rem 0.75rem;
}

/* ------------------------------------------------------------- 5. article */

.docs-article {
  font-family: var(--ps-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--dk-ink);
}

.docs-article h1,
.docs-article h2,
.docs-article h3 {
  font-family: var(--ps-display);
  color: var(--ps-title);
  scroll-margin-top: calc(var(--ps-header-h) + 1rem);
  text-wrap: balance;
}

/* The hero's title: Bodoni at full weight with the gold chalk line under it,
   the first mark of the fitting (the same path as the front page's SVG). */
.docs-article h1 {
  inline-size: fit-content;
  max-inline-size: 100%;
  margin: 0 0 1.6rem;
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.docs-article h1::after {
  content: "";
  display: block;
  block-size: 14px;
  margin-block-start: 0.35rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cfilter id='c' x='-10%25' y='-30%25' width='120%25' height='160%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='2.2'/%3E%3C/filter%3E%3Cpath d='M4 16 C 90 8, 220 6, 396 12' fill='none' stroke='%23ffcc33' stroke-width='7' stroke-linecap='round' filter='url(%23c)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* The page's first line reads like the hero's blurb. */
.docs-article h1 + p {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--dk-muted);
}

/* Section titles are the front page's section heads, with the receipt's dashed rule. */
.docs-article h2 {
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  font-size: clamp(1.75rem, 1.45rem + 1vw, 2.35rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  border-bottom: 1.5px dashed var(--ps-line-strong);
}

.docs-article h3 {
  margin: 2.1rem 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}

.docs-article :is(h1, h2, h3) code {
  font-size: 0.72em;
  letter-spacing: 0;
}

.docs-heading-link {
  color: var(--ps-label);
  font-family: var(--ps-body);
  font-weight: 400;
}

.docs-article a {
  color: var(--dk-accent);
  text-decoration-color: var(--ps-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.docs-article a:hover {
  color: var(--ps-title);
  text-decoration-thickness: 3px;
}

.docs-article strong {
  color: var(--ps-title);
}

.docs-article :is(ul, ol) {
  padding-inline-start: 1.4rem;
}

.docs-article li {
  margin-block: 0.3rem;
}

.docs-article li::marker {
  color: var(--ps-piece-line);
}

.docs-article ol > li::marker {
  font-family: var(--ps-display);
  font-weight: 600;
  color: var(--ps-title);
}

.docs-article img {
  max-inline-size: 100%;
  block-size: auto;
}

.docs-article hr {
  margin-block: 2.5rem;
  border: 0;
  border-block-start: 1.5px dashed var(--ps-line-strong);
}

/* ---------------------------------------------------------------- 6. code */

.docs-article code {
  padding: 0.1em 0.35em;
  font-family: var(--ps-mono);
  font-size: 0.88em;
  color: var(--ps-inline-ink);
  background: var(--ps-code);
  border-radius: 2px;
  overflow-wrap: anywhere;
}

/* A block is the front page's pattern code: a green rule down the left edge
   on a green-tinted tissue. Lines keep their shape and scroll. */
.docs-article pre {
  margin: 1.1rem 0 1.5rem;
  padding: 0.9rem 1rem 1rem;
  font-family: var(--ps-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--ps-code-ink);
  background: var(--ps-code);
  border: 0;
  border-inline-start: 3px solid var(--ps-code-rule);
  border-radius: 2px;
  tab-size: 4;
  scrollbar-width: thin;
  scrollbar-color: var(--ps-scroll) transparent;
}

.docs-article pre code {
  padding: 0;
  font-size: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
  overflow-wrap: normal;
}

/* With docs.js the block sits in .docs-copy: the tint and the rule move to the
   wrapper and the pre stops short of a gutter, so the pill never covers a command. */
.docs-copy {
  margin: 1.1rem 0 1.5rem;
  background: var(--ps-code);
  border-inline-start: 3px solid var(--ps-code-rule);
  border-radius: 2px;
}

.docs-copy > pre {
  margin: 0;
  margin-inline-end: 5.5rem;
  padding-inline-end: 0.75rem;
  background: transparent;
  border: 0;
  border-radius: 0;
}

/* The front page's Copy pill: gold, ink, round. */
.docs-copy__button {
  inset-block-start: 0.65rem;
  inset-inline-end: 0.65rem;
  min-block-size: 32px;
  padding: 0.25rem 0.95rem;
  font-family: var(--ps-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ps-ink);
  background: var(--ps-gold);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.docs-copy__button:hover {
  color: var(--ps-ink);
  background: var(--ps-gold-soft);
}

.docs-copy__button:focus-visible {
  outline-color: var(--dk-focus);
}

/* A block that scrolls sideways takes focus (docs.js): the ring sits inside. */
.docs-article pre:focus-visible {
  outline: 3px solid var(--dk-focus);
  outline-offset: -3px;
}

/* ------------------------------------------- 7. callouts, tables, quotes */

/* A callout is a pattern piece: tissue, a mauve outline, the seam allowance
   dashed inside it, and a woven label for its kind. */
.docs-callout {
  position: relative;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem 1.1rem;
  color: var(--dk-ink);
  background: var(--ps-piece);
  border: 1.5px solid var(--ps-piece-line);
  border-inline-start-width: 1.5px;
  border-radius: 4px 20px 4px 4px;
  outline: 1.5px dashed var(--ps-seam);
  outline-offset: -9px;
}

.docs-callout__label {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.3rem 0.7rem;
  font-family: var(--ps-body);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ps-woven-ink);
  background: var(--ps-woven);
  border-radius: 2px;
  outline: 1px dashed rgba(244, 241, 234, 0.6);
  outline-offset: -4px;
}

.docs-callout > :last-child {
  margin-bottom: 0;
}

.docs-callout--note,
.docs-callout--tip,
.docs-callout--warning,
.docs-callout--danger {
  border-inline-start-color: var(--ps-piece-line);
}

.docs-callout--note .docs-callout__label {
  color: var(--ps-cream);
  background: var(--ps-green);
}

/* A tip is the front page's "Yours" label: gold, ink. */
.docs-callout--tip .docs-callout__label {
  color: var(--ps-ink);
  background: var(--ps-gold);
  outline-color: rgba(27, 38, 35, 0.45);
}

/* A warning is chalked: the mauve label and a mauve edge. */
.docs-callout--warning {
  border-color: var(--ps-warn-line);
}

.docs-callout--warning .docs-callout__label {
  color: var(--ps-warn-label-ink);
  background: var(--ps-warn-label);
  outline-color: var(--ps-warn-label-seam);
}

.docs-callout--danger {
  border-color: var(--ps-danger-line);
}

.docs-callout--danger .docs-callout__label {
  color: var(--ps-danger-label-ink);
  background: var(--ps-danger-label);
  outline-color: var(--ps-danger-label-seam);
}

/* Every pattern piece is pinned, as the hero's cloth is: a gold pin head over
   the top corner, its shaft running in under the tissue. */
.docs-callout::before {
  content: "";
  position: absolute;
  inset-block-start: -8px;
  inset-inline-end: 2.4rem;
  inline-size: 14px;
  block-size: 28px;
  background:
    radial-gradient(circle at 5px 5px, #fff3c9 0, rgba(255, 243, 201, 0) 3px),
    radial-gradient(circle at 7px 7px, var(--ps-gold) 0 5px, #b98c0c 6.5px, transparent 7px),
    linear-gradient(90deg, transparent 6.25px, #9aa4a1 6.25px 7.75px, transparent 7.75px) 0 10px / 100% 18px no-repeat;
  rotate: 24deg;
  transform-origin: 7px 7px;
  filter: drop-shadow(0 1.5px 1.5px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

/* Tables are the order of pieces: tissue, eyebrow headings, dashed rows. When
   one is wider than the page, the edge it scrolls toward carries a soft shade
   (the covers ride with the content and hide the shade at either end). */
.docs-table {
  margin: 1.25rem 0 1.6rem;
  background:
    linear-gradient(90deg, var(--ps-piece) 35%, transparent) 0 0 / 2.5rem 100% no-repeat local,
    linear-gradient(270deg, var(--ps-piece) 35%, transparent) 100% 0 / 2.5rem 100% no-repeat local,
    linear-gradient(90deg, var(--ps-shade), transparent) 0 0 / 0.9rem 100% no-repeat scroll,
    linear-gradient(270deg, var(--ps-shade), transparent) 100% 0 / 0.9rem 100% no-repeat scroll,
    var(--ps-piece);
  border: 1px solid var(--ps-line-strong);
  border-radius: var(--dk-radius);
  scrollbar-width: thin;
  scrollbar-color: var(--ps-scroll) transparent;
}

.docs-table:focus-visible {
  outline: var(--dk-focus-w) solid var(--dk-focus);
  outline-offset: var(--dk-focus-o);
}

.docs-article table {
  font-size: 0.95rem;
  line-height: 1.5;
}

.docs-article th {
  font-family: var(--ps-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ps-label);
  background: transparent;
  border-bottom: 1.5px solid var(--ps-line-strong);
}

.docs-article th,
.docs-article td {
  padding: 0.65rem 0.9rem;
  vertical-align: top;
}

.docs-article td {
  border-bottom: 1px dashed var(--ps-line-strong);
}

/* An id or command keeps its shape in a cell: it only breaks if it would spill. */
.docs-article td code {
  overflow-wrap: break-word;
}

.docs-article tbody tr:last-child td {
  border-bottom: 0;
}

/* A quote is a note pinned to the paper: a mauve rule, Bodoni italic. */
.docs-article blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  font-family: var(--ps-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ps-title);
  border-inline-start: 3px solid var(--ps-mauve);
}

.docs-article blockquote > :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------ 8. toc, pager, footer */

/* "On this page" is a tailor's note in chalk, the hand the front page writes
   its swing tag and cushion caption in. */
.docs-toc__title {
  margin-block-end: 0.3rem;
  font-family: var(--ps-chalk);
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ps-label);
  rotate: -1.5deg;
  transform-origin: 0 100%;
}

.docs-toc__list {
  border-left: 1.5px dashed var(--ps-line-strong);
}

.docs-toc__item a {
  margin-inline-start: -1.5px;
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--dk-muted);
  border-inline-start: 2px solid transparent;
}

.docs-toc__item a:hover {
  color: var(--ps-title);
  border-inline-start-color: var(--ps-gold);
}

.docs-pager {
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 0;
  border-top: 0;
}

/* Previous and next are pattern pieces, notch and all. */
.docs-pager__link {
  position: relative;
  box-sizing: border-box;
  flex: 1 1 0;
  max-width: 22rem;
  padding: 1rem 1.3rem 1.1rem;
  text-decoration: none;
  background: var(--ps-piece);
  border: 1.5px solid var(--ps-piece-line);
  border-radius: 4px 20px 4px 4px;
  outline: 1.5px dashed var(--ps-seam);
  outline-offset: -9px;
  box-shadow: 0 16px 28px -24px rgba(7, 58, 50, 0.7);
}

.docs-pager__link:focus-visible {
  outline: var(--dk-focus-w) solid var(--dk-focus);
  outline-offset: var(--dk-focus-o);
}

.docs-pager__link::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.5px;
  top: 38%;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid var(--ps-piece-line);
}

.docs-pager__link--next {
  margin-inline-start: auto;
  text-align: end;
}

.docs-pager__dir {
  display: block;
  font-family: var(--ps-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ps-label);
}

.docs-pager__title {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--ps-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ps-title);
  text-decoration: none;
}

/* The front page's footer: deep green, the joke in gold Bodoni italic. */
.docs-footer {
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  padding: 2.25rem var(--dk-gap);
  color: var(--ps-cream);
  background: var(--ps-footer);
  border-top: 0;
  text-align: center;
  /* Full-bleed green under a centered row. */
  box-shadow: 0 0 0 100vmax var(--ps-footer);
  clip-path: inset(0 -100vmax);
}

.docs-footer::before {
  content: "Measure twice, lint once.";
  flex-basis: 100%;
  font-family: var(--ps-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--ps-gold);
}

.docs-footer a {
  color: var(--ps-cream);
  text-decoration-color: var(--ps-gold);
  text-underline-offset: 3px;
}

.docs-footer :focus-visible {
  outline-color: var(--ps-gold);
}

/* ---------------------------------------------------------------- 9. dark */

/* Derived: the front page has no dark mode, and green is WSU's color, not a
   wallpaper. So dark is the cloth the shop is named for: charcoal suiting (the
   board's "on dark" tile, a hair warmer) with a faint cream chalk stripe every
   32px, the same stripe the front page lays on its green sections. Cream type,
   gold where the paper uses green, a pale mauve for the tailor's marks. The
   green stays where the front page keeps it on any ground: the woven labels,
   the size tag and the footer band. Only tokens change here, and both blocks
   restate the kit's --dk-* set, so its WayneUI dark surface never shows. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ps-header-bg: rgba(27, 31, 30, 0.94);
    --ps-title: var(--ps-cream);
    --ps-label: #dcbfca;
    --ps-piece: #232826;
    --ps-piece-line: #b48f9d;
    --ps-seam: rgba(201, 163, 178, 0.45);
    --ps-code: rgba(244, 241, 234, 0.06);
    --ps-code-ink: var(--ps-cream);
    --ps-code-rule: var(--ps-gold);
    --ps-inline-ink: var(--ps-gold-soft);
    --ps-line-strong: rgba(244, 241, 234, 0.2);
    --ps-paper: repeating-linear-gradient(90deg, transparent 0 31px, rgba(244, 241, 234, 0.05) 31px 32px);
    --ps-paper-size: auto;
    --ps-footer: var(--ps-green-deep);
    --ps-scroll: #b48f9d;
    --ps-shade: rgba(0, 0, 0, 0.5);
    --ps-warn-line: #b48f9d;
    --ps-warn-label: #e3c9d3;
    --ps-warn-label-ink: #3b2530;
    --ps-warn-label-seam: rgba(59, 37, 48, 0.45);
    --ps-danger-line: var(--ps-gold);
    --ps-danger-label: var(--ps-gold);
    --ps-danger-label-ink: var(--ps-ink);
    --ps-danger-label-seam: rgba(27, 38, 35, 0.45);

    --dk-bg: #1b1f1e;
    --dk-ink: var(--ps-cream);
    --dk-muted: #c3c9c6;
    --dk-rule: #3a403e;
    --dk-accent: var(--ps-gold);
    --dk-on-accent: var(--ps-ink);
    --dk-note: #9fd3c7;
    --dk-tip: var(--ps-gold);
    --dk-warning: #e3c9d3;
    --dk-danger: #f4b4a8;
    --dk-code-bg: rgba(244, 241, 234, 0.06);
    --dk-focus: var(--ps-gold);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ps-header-bg: rgba(27, 31, 30, 0.94);
  --ps-title: var(--ps-cream);
  --ps-label: #dcbfca;
  --ps-piece: #232826;
  --ps-piece-line: #b48f9d;
  --ps-seam: rgba(201, 163, 178, 0.45);
  --ps-code: rgba(244, 241, 234, 0.06);
  --ps-code-ink: var(--ps-cream);
  --ps-code-rule: var(--ps-gold);
  --ps-inline-ink: var(--ps-gold-soft);
  --ps-line-strong: rgba(244, 241, 234, 0.2);
  --ps-paper: repeating-linear-gradient(90deg, transparent 0 31px, rgba(244, 241, 234, 0.05) 31px 32px);
  --ps-paper-size: auto;
  --ps-footer: var(--ps-green-deep);
  --ps-scroll: #b48f9d;
  --ps-shade: rgba(0, 0, 0, 0.5);
  --ps-warn-line: #b48f9d;
  --ps-warn-label: #e3c9d3;
  --ps-warn-label-ink: #3b2530;
  --ps-warn-label-seam: rgba(59, 37, 48, 0.45);
  --ps-danger-line: var(--ps-gold);
  --ps-danger-label: var(--ps-gold);
  --ps-danger-label-ink: var(--ps-ink);
  --ps-danger-label-seam: rgba(27, 38, 35, 0.45);

  --dk-bg: #1b1f1e;
  --dk-ink: var(--ps-cream);
  --dk-muted: #c3c9c6;
  --dk-rule: #3a403e;
  --dk-accent: var(--ps-gold);
  --dk-on-accent: var(--ps-ink);
  --dk-note: #9fd3c7;
  --dk-tip: var(--ps-gold);
  --dk-warning: #e3c9d3;
  --dk-danger: #f4b4a8;
  --dk-code-bg: rgba(244, 241, 234, 0.06);
  --dk-focus: var(--ps-gold);

  color-scheme: dark;
}

/* --------------------------------------------------------- 10. responsive */

/* The front page shows its nav from 960px; under that, the brand and the size
   label. The docs menu below the header carries the rest. */
@media (min-width: 960px) {
  .site-nav {
    display: flex;
  }

  .size-label {
    margin-inline-start: 0;
  }
}

@media (min-width: 760px) {
  /* The sidebar rides under the header while the page scrolls. */
  .docs-nav--sidebar {
    position: sticky;
    top: calc(var(--ps-header-h) + 1.25rem);
    max-block-size: calc(100vh - var(--ps-header-h) - 2.5rem);
    overflow-y: auto;
    padding-inline-end: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--ps-piece-line) transparent;
  }

  .docs-nav--sidebar > .docs-nav__list > li:first-child > .docs-nav__label {
    margin-top: 0;
  }
}

@media (min-width: 1200px) {
  .docs-layout--toc .docs-toc {
    top: calc(var(--ps-header-h) + 1.25rem);
  }
}

@media (max-width: 640px) {
  :root {
    --dk-gap: 1rem;
    --ps-header-h: 60px;
  }

  .brand__name {
    font-size: 1.25rem;
  }

  .docs-layout {
    padding-block-start: 1rem;
  }

  .docs-article pre {
    font-size: 0.8rem;
  }

  /* No room for a gutter: the pill takes a band above the code instead. */
  .docs-copy > pre {
    margin-inline-end: 0;
    padding-block-start: 3rem;
    padding-inline-end: 1rem;
  }

  .docs-pager {
    flex-direction: column;
    gap: 0.75rem;
  }

  .docs-pager__link {
    max-width: none;
  }

  /* A table of three columns or more keeps its shape and scrolls in its frame
     (with the edge shade) instead of breaking every cell into one word a line. */
  .docs-table table:has(th:nth-child(3)) {
    min-inline-size: 34rem;
  }
}

/* ------------------------------------------- 11. motion (no-preference) */

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

  /* The chalk line draws in once, left to right, as the page lands. */
  .docs-article h1::after {
    animation: ps-chalk 0.8s var(--ps-ease-out) 0.2s both;
  }

  .site-nav a {
    transition: background-size 0.3s var(--ps-ease-out);
  }

  .brand img {
    transition: rotate 0.5s var(--ps-ease-spring);
  }

  .brand:hover img {
    rotate: -6deg;
  }

  .docs-nav a,
  .docs-toc__item a,
  .docs-copy__button {
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.2s var(--ps-ease-spring);
  }

  .docs-copy__button:hover {
    transform: translateY(-1px);
  }

  .docs-copy__button:active {
    transform: scale(0.96);
  }

  /* A callout's pin goes in once as the page lands, as the hero pins its cloth. */
  .docs-callout::before {
    animation: ps-pin-in 0.45s var(--ps-ease-spring) 0.5s both;
  }

  /* Pick a pattern piece up: it lifts, tilts a hair, and a pin pops in. */
  .docs-pager__link {
    transition: transform 0.35s var(--ps-ease-spring), box-shadow 0.35s;
  }

  .docs-pager__link:hover {
    transform: translateY(-4px) rotate(-0.4deg);
    box-shadow: 0 26px 36px -24px rgba(7, 58, 50, 0.75);
  }

  .docs-pager__link::after {
    content: "";
    position: absolute;
    top: -8px;
    left: 2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff3c9, var(--ps-gold) 50%, #b98c0c);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), 6px 16px 0 -5.5px #9aa4a1;
    opacity: 0;
    transform: translateY(-10px) scale(0.6);
    transition: opacity 0.2s, transform 0.35s var(--ps-ease-spring);
  }

  .docs-pager__link--next::after {
    left: auto;
    right: 2rem;
  }

  .docs-pager__link:hover::after {
    opacity: 1;
    transform: none;
  }

  /* The tailor's tape: it unrolls along the bottom of the header as you read,
     like the front page's. Only where the browser can drive it from scroll. */
  @supports (animation-timeline: scroll()) {
    .site-header::after {
      content: "";
      position: absolute;
      inset-inline: 0;
      inset-block-end: -1px;
      block-size: 4px;
      background:
        repeating-linear-gradient(90deg, rgba(27, 38, 35, 0.55) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(90deg, rgba(27, 38, 35, 0.3) 0 1px, transparent 1px 8px),
        var(--ps-gold);
      transform-origin: 0 50%;
      animation: ps-tape linear both;
      animation-timeline: scroll(root);
      pointer-events: none;
    }
  }
}

@keyframes ps-chalk {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes ps-pin-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.6); }
  to { opacity: 1; transform: none; }
}

@keyframes ps-tape {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* -------------------------------------------------------------- 12. print */

@media print {
  body {
    background: #ffffff;
  }

  .site-header {
    position: static;
    backdrop-filter: none;
  }

  .site-nav,
  .size-label {
    display: none;
  }

  .docs-copy > pre {
    margin-inline-end: 0;
    white-space: pre-wrap;
  }

  .docs-copy__button {
    display: none;
  }

  .docs-footer {
    color: #1b2623;
    background: #ffffff;
    box-shadow: none;
    clip-path: none;
  }

  .docs-footer::before {
    color: #0c5449;
  }
}
