/* vlak-site.css
   The construction of vlak.dev as plain CSS, for a sister site.

   Link it after Vlak's own stylesheet (vlak.css). Every colour is one of
   Vlak's custom properties; every length is one of Vlak's (--pad, --gutter,
   --hit, --grid-*, --radius-sm) or one of the --pl- lengths declared first,
   which are the literals vlak.dev writes itself.

   Sources, quoted per block:
     www/      /Users/renn/vlak-native/apps/www (app/site.css, app/specimen.css,
               app/specimen.stylex.ts, app/site.stylex.ts, app/about/about.css,
               components/site-footer.stylex.ts, components/docs-nav/docs-nav.css)
     core/     /Users/renn/vlak-native/packages/core/css (tokens.css, base.css,
               components/crumb-bar.css)
     elyx/     /Users/renn/vlak/Vlak (tokens/lengths.elyx, blocks/*.elyx)
   Checked against screenshots of https://vlak.dev/ taken on 2026-11-11. */


/* ── 0. Lengths ────────────────────────────────────────────────────────── */

:root {
  /* The module: 184 column + 20 gutter. Vlak's --grid-size is the same 204px
     above 480px but becomes 100vw on phones, so rows cannot read it.
     www/app/specimen.css: grid-auto-rows: minmax(204px, auto); elyx: field */
  --pl-field: 204px;
  /* The gap that lets the divider ground show between cells.
     www/app/specimen.css: gap: 1px; elyx: hairline */
  --pl-hairline: 1px;
  /* Cell inset: 20px at every width. Vlak's --pad grows to 25px on phones,
     the cell does not. www/app/specimen.css: padding: 20px; elyx: cell-pad */
  --pl-cell-pad: var(--gutter);
  /* Fixed chrome. www/app/site.css .logo-wrap, .corner-nav, .site-crumb-bar;
     elyx: chrome-top 14, nav-top 24, nav-left 224 */
  --pl-chrome-top: 14px;
  --pl-nav-top: 24px;
  --pl-nav-left: calc(var(--pad) + var(--pl-field)); /* 224px, the first content column */
  --pl-bar: 72px;
  --pl-bar-phone: 60px;
  --pl-mark: 20px;
  /* Reading pages. www/app/site.css body --rail-inset, .site-content; elyx: toc */
  --pl-rail-inset: 0px;
  --pl-column: 184px;
  --pl-measure: calc(3 * var(--pl-field) - var(--gutter)); /* 592px */
}
/* www/app/site.css: @media (min-width: 641px) and (max-width: 899px) { body { --nav-left: 76px; } } */
@media (min-width: 641px) and (max-width: 899px) { :root { --pl-nav-left: 76px; } }
/* www/app/site.css: @media (min-width: 1440px) { body { --rail-inset: 204px; } } */
@media (min-width: 1440px) { :root { --pl-rail-inset: var(--pl-field); } }

/* www/app/site.css lines 16-17. The grid is flush to the viewport. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }


/* ── 1. Field page: the frame ──────────────────────────────────────────────
   www/app/specimen.css .specimen-page, .specimen; www/app/about/about.css.
   Vlak paints a 204px column overlay on html::before (core/base.css). Field
   pages switch it off so no vertical runs through the type; the cells are
   the only grid. Reading pages (section 7) keep it. */

html:has(.pl-page)::before { display: none; }
body:has(.pl-page) { background: transparent; }

.pl-page {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  border: none;
  background: transparent;
}

/* The ground is --divider; the 1px gaps show it between paper cells. One
   column to 480px, two from 481px, four from 816px (4 x 204), six from
   1224px (6 x 204). The frame is fluid: a field is exactly 204px when the
   viewport is 1229px (6 x 204 + 5 x 1). clip-path keeps the ground from
   reading as a page frame; the inset --grid-line edges sit under the cells. */
.pl-grid {
  display: grid;
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  border: none;
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(var(--pl-field), auto);
  gap: var(--pl-hairline);
  background: var(--divider);
  box-shadow: inset 1px 0 0 var(--grid-line), inset -1px 0 0 var(--grid-line);
  clip-path: inset(0);
}
@media (min-width: 481px) { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 816px) { .pl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1224px) { .pl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }


/* ── 2. Cells ──────────────────────────────────────────────────────────────
   www/app/specimen.stylex.ts cell, cellEnd, cellTall; elyx: blocks/specimen-cell.elyx
   ("paper fill, 20px inset, contents settled to the bottom edge").
   No border, no radius, no shadow: the hairline is the gap. */

.pl-cell {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: var(--pl-field);
  padding: var(--pl-cell-pad);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: visible;
  border-radius: 0;
}

/* Spans. vlak.dev names grid areas per page (specimen.css, about.css); these
   classes give the same recuts by counting fields. A cell takes the whole row
   unless told otherwise.
                  six columns   four columns   two columns   one column
     .pl-cell          6             4              2            1
     .pl-cell-4        4             2              2            1   (about: spec)
     .pl-cell-3        3             4              2            1   (face, law, note)
     .pl-cell-2        2             2              1            1   (principle, kit)
     .pl-cell-1        1             1              1            1
     .pl-cell-2.pl-cell-3   3        2              1            1   (principle 10)
   One width can be set alone: style="--pl-six: 3". */
.pl-cell-1 { --pl-six: 1; --pl-four: 1; --pl-two: 1; }
.pl-cell-2 { --pl-six: 2; --pl-four: 2; --pl-two: 1; }
.pl-cell-3 { --pl-six: 3; }
.pl-cell-4 { --pl-six: 4; --pl-four: 2; }
@media (min-width: 481px) { .pl-cell { grid-column: span var(--pl-two, 2); } }
@media (min-width: 816px) { .pl-cell { grid-column: span var(--pl-four, 4); } }
@media (min-width: 1224px) { .pl-cell { grid-column: span var(--pl-six, 6); } }

/* Two modules tall: 408px, the face and law row.
   www/app/specimen.stylex.ts cellTall: minHeight: 408 */
.pl-cell-tall { min-height: calc(2 * var(--pl-field)); }

/* Content from the top. www/app/about/about.css .field-cell-use: justify-content: flex-start */
.pl-cell-top { justify-content: flex-start; }

/* Kit cell: the name at the top of the field, the object at the bottom.
   www/app/specimen.css .specimen-cell-demo, .specimen-kit-name, .specimen-kit-live;
   elyx: blocks/kit-cell.elyx. About's cells use the same arrangement. */
.pl-cell-kit {
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
}
.pl-kit-name {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.pl-kit-name a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: border-color var(--duration-snap) var(--ease);
}
.pl-kit-name a:hover { border-color: var(--text); }
.pl-kit-live {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* Principle cell: a tabular ordinal and a name on one baseline, 10px apart.
   www/app/specimen.css .specimen-index, .specimen-n, .specimen-n-text;
   elyx: blocks/principle-cell.elyx */
.pl-index {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pl-n {
  margin: 0;
  flex: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
.pl-n-text {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.3;
  text-wrap: balance;
  max-width: 12em;
}


/* ── 3. Type set in cells ──────────────────────────────────────────────────
   www/app/specimen.css .specimen-face, .specimen-law, .specimen-command,
   .specimen-poster, .specimen-command-meta, .specimen-more; www/app/about/about.css
   .field-kicker. Face, law and command are sized against their own cell
   (cqw) and each hangs left by its own fraction so the first stems share
   the cell's 20px edge. */

.pl-cell:has(.pl-face, .pl-law, .pl-command) { container-type: inline-size; }

.pl-face {
  margin: 0 0 0 -0.08em;
  font-size: clamp(4.5rem, 30cqw, 24rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .82;
  color: var(--text);
}
.pl-law {
  margin: 0 0 0 calc(1px - 0.03em);
  font-size: clamp(1.5rem, 12cqw, 3.75rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1;
  text-wrap: balance;
  max-width: 9em;
}
.pl-command {
  margin: 0 0 0 calc(1px - 0.07em);
  font-family: inherit;
  font-size: clamp(2rem, 5.9cqw, 4.5rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .92;
  color: var(--text);
  overflow-wrap: anywhere;
}
/* The command and its meta line, 20px apart; the command and its control, 16px.
   www/app/specimen.css .specimen-command-copy, .specimen-command-row */
.pl-command-block { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 88px; }
.pl-command-row { display: flex; align-items: center; gap: 16px; }

/* Meta: the note, the line under the command, the closing link. */
.pl-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text-secondary);
}
.pl-meta a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: color var(--duration-snap) var(--ease), border-color var(--duration-snap) var(--ease);
}
.pl-meta a:hover { border-color: var(--text); }
/* www/app/specimen.css .specimen-more a: gray until hovered */
.pl-meta-quiet a { color: var(--text-secondary); }
.pl-meta-quiet a:hover { color: var(--text); }

/* Kicker: a gray label above the content of a cell.
   www/app/about/about.css .field-kicker */
.pl-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text-secondary);
}

/* www/app/specimen.css @media (max-width: 640px); www/app/about/about.stylex.ts kicker */
@media (max-width: 640px) {
  .pl-kit-name, .pl-meta { font-size: 15px; }
  .pl-n-text { font-size: 18px; line-height: 1.4; }
  .pl-kicker { font-size: 0.8125rem; }
  .pl-kit-name a, .pl-meta a {
    display: inline-flex;
    align-items: center;
    min-width: var(--hit);
    min-height: var(--hit);
  }
}


/* ── 4. Start tiles ────────────────────────────────────────────────────────
   www/app/specimen.stylex.ts start, startTile; www/app/specimen.css .specimen-start;
   elyx: blocks/start-tile.elyx. A row of three links inside the grid. The row
   is transparent so the grid's ground is the only hairline. Three across
   until 640px, then stacked at 136px. */

.pl-start {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pl-hairline);
  background: transparent;
}
.pl-start-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  min-width: 0;
  min-height: var(--pl-field);
  padding: var(--pl-cell-pad);
  gap: 8px;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.45;
}
.pl-start-tile:hover { background: var(--control-fill); }
.pl-start-tile:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; }
.pl-start-tile strong { font-size: 17px; font-weight: 500; }
.pl-start-tile > span { color: var(--text-secondary); }
@media (max-width: 640px) {
  .pl-start { grid-template-columns: minmax(0, 1fr); }
  .pl-start-tile { min-height: 136px; font-size: 15px; }
}


/* ── 5. Fixed chrome ───────────────────────────────────────────────────────
   www/app/site.css "Fixed corner chrome"; www/app/site.stylex.ts chrome;
   core/components/crumb-bar.css; elyx: blocks/site-chrome.elyx.
   No header bar at rest. The bar is transparent until the page has scrolled
   110px, then it is paper with one hairline (add .pl-chrome-scrolled). The
   mark, the links and the tools are fixed on their own and carry a halo in
   the paper colour, so no grid line runs through them. */

.pl-skip {
  position: fixed;
  top: 12px;
  left: var(--gutter);
  z-index: 400;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.pl-skip:focus-visible { transform: none; outline: 2px solid var(--text); outline-offset: 2px; }

.pl-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 160;
  height: var(--pl-bar);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.pl-chrome-scrolled {
  background: var(--bg);
  border-bottom-color: var(--divider);
}

/* The 20px mark starts on the page inset; its 44px target reaches 12px into it. */
.pl-logo {
  position: fixed;
  top: var(--pl-chrome-top);
  left: calc(var(--pad) - 12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: var(--hit);
  filter: drop-shadow(0 0 12px var(--bg)) drop-shadow(0 0 20px var(--bg));
}
.pl-logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hit);
  height: var(--hit);
  color: var(--text);
  transition: var(--transition), opacity var(--duration-snap) var(--ease);
}
.pl-logo a:hover { opacity: .6; }
.pl-logo a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pl-logo-mark { display: block; width: var(--pl-mark); height: var(--pl-mark); flex-shrink: 0; }
/* The site's name beside the mark, phones only, at the top of the home page. */
.pl-site-name { display: none; }

/* Links start on the first content column: --pad + one field = 224px. */
.pl-nav {
  position: fixed;
  top: var(--pl-nav-top);
  left: var(--pl-nav-left);
  right: auto;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--gutter);
  height: 24px;
  filter: drop-shadow(0 0 12px var(--bg)) drop-shadow(0 0 20px var(--bg));
}
.pl-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-snap) var(--ease);
}
.pl-nav a:hover, .pl-nav a[aria-current="page"] { color: var(--text); }

/* Tools, top right: 44px targets, 12px apart. The last one's 16px glyph ends
   on the page inset (www/app/site.css .settings: right: calc(var(--pad) - 16px);
   .global-search: right: calc(var(--pad) + 40px)). */
.pl-tools {
  position: fixed;
  top: var(--pl-chrome-top);
  right: calc(var(--pad) - 16px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  filter: drop-shadow(0 0 12px var(--bg)) drop-shadow(0 0 20px var(--bg));
}
.pl-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--hit);
  min-width: var(--hit);
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color var(--duration-snap) var(--ease);
}
.pl-tool:hover { color: var(--text); }
.pl-tool:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pl-tool svg { display: block; width: 16px; height: 16px; flex-shrink: 0; }
/* A square tool: glyph only. www/app/site.css .theme-toggle */
.pl-tool-icon { width: var(--hit); padding: 0; border-radius: 0; }
/* The key hint in a tool. www/app/site.css .global-search-shortcut */
.pl-tool kbd {
  font: inherit;
  font-size: 0.6875rem;
  line-height: 1.4;
  padding: 2px 5px;
  border: 1px solid var(--divider-subtle);
  border-radius: var(--radius-sm);
}

/* Phone menu: a burger and a panel replace the links at 640px.
   www/app/site.css .nav-toggle, .nav-panel, .nav-panel-link */
.pl-menu-toggle {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 210;
  width: var(--hit);
  height: var(--hit);
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-secondary);
  cursor: pointer;
  filter: drop-shadow(0 0 12px var(--bg)) drop-shadow(0 0 20px var(--bg));
}
.pl-menu-toggle:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pl-menu-toggle svg { display: block; width: 20px; height: 20px; overflow: visible; }
.pl-menu-toggle path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5px;
  transform-origin: 10px 10px;
  transition: transform var(--duration) var(--ease);
}
.pl-menu-toggle[aria-expanded="true"] path:first-child { transform: rotate(45deg) translateY(3px); }
.pl-menu-toggle[aria-expanded="true"] path:last-child { transform: rotate(-45deg) translateY(-3px); }
.pl-menu {
  position: fixed;
  top: calc(var(--pl-bar-phone) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  z-index: 205;
  padding: 6px 0 env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  border-bottom: 1px solid var(--divider-subtle);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease), visibility 0s linear var(--duration);
}
.pl-menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--duration) var(--ease), visibility 0s;
}
/* 15px, not the 17px site.css asks for on phones: the StyleX rule
   (www/app/site.stylex.ts navPanelLink) outranks it on the live site. */
.pl-menu a {
  display: block;
  min-height: var(--hit);
  padding: 12px calc(var(--pad) + env(safe-area-inset-right, 0px)) 12px calc(var(--pad) + env(safe-area-inset-left, 0px));
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--divider-subtle);
}

/* Between 641px and 1099px a tool keeps its glyph and drops its words.
   www/app/site.css .global-search-trigger-label, .global-search-shortcut */
@media (min-width: 641px) and (max-width: 1099px) {
  .pl-tool span, .pl-tool kbd { display: none; }
}

/* Phone (to 640px): one 44px row, 8px from the top, safe areas respected.
   From 480px down Vlak's --pad is 25px, so the mark sits on the 25px gutter.
   www/app/site.css "Phone (≤640)" and "Mobile grid (≤480)" */
@media (max-width: 640px) {
  .pl-chrome { height: calc(var(--pl-bar-phone) + env(safe-area-inset-top, 0px)); }
  .pl-logo {
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: calc(var(--pad) - 12px + env(safe-area-inset-left, 0px));
  }
  /* Shown with data-visible="true": on vlak.dev only at the top of the home
     page (scrollY <= 4). www/app/site.css .mobile-site-name */
  .pl-site-name {
    display: block;
    flex: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
    pointer-events: none;
  }
  .pl-site-name[data-visible="true"] { opacity: 1; transform: translateX(0); }
  .pl-nav { display: none; }
  .pl-tools {
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: calc(56px + env(safe-area-inset-right, 0px));
  }
  .pl-tool { width: var(--hit); padding: 0; }
  .pl-tool span, .pl-tool kbd { display: none; }
  /* A tool that moves into the menu on phones (vlak.dev: appearance). */
  .pl-tool-menu { display: none; }
  .pl-menu-toggle { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-menu, .pl-menu-toggle path { transition: none; }
}


/* ── 6. Footer ─────────────────────────────────────────────────────────────
   www/app/site.css .site-footer; www/components/site-footer.stylex.ts;
   elyx: blocks/site-footer.elyx, blocks/footer-link.elyx.
   One field tall at least, a --grid-line rule on top, and Vlak's column
   lines behind it: the only place a field page shows the 184 + 20 columns.
   Five columns: the mark, three link lists on 184px, the colophon on 388px. */

.pl-footer {
  position: relative;
  z-index: 1;
  margin-top: 0;
  min-height: var(--pl-field);
  padding: 20px var(--pad) 48px;
  border-top: 1px solid var(--grid-line);
  background-color: var(--bg);
  background-image: var(--grid-image);
  background-size: var(--grid-size) 100%;
  background-repeat: repeat-x;
  background-position: var(--grid-pos);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text-secondary);
}
.pl-footer a { color: inherit; text-decoration: none; }
.pl-footer a:hover { color: var(--text); }
.pl-footer-inner {
  display: grid;
  grid-template-columns: repeat(4, var(--pl-column)) minmax(0, calc(2 * var(--pl-column) + var(--gutter)));
  column-gap: var(--gutter);
  row-gap: 32px;
  align-items: start;
  max-width: 100%;
}
.pl-footer-mark { display: flex; width: var(--pl-mark); height: var(--pl-mark); color: var(--text); }
.pl-footer-group { min-width: 0; }
.pl-footer-heading {
  margin: 0 0 8px;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  overflow-wrap: anywhere;
}
.pl-footer-links { display: grid; margin: 0; padding: 0; list-style: none; }
.pl-footer-links li { min-width: 0; }
.pl-footer-links a {
  display: flex;
  align-items: center;
  min-width: var(--hit);
  min-height: 28px;
  padding-block: 4px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.pl-footer-links a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.pl-footer-about {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-width: calc(2 * var(--pl-column) + var(--gutter));
}
.pl-footer-about p { margin: 0; line-height: 1.45; }

/* compact: four columns, the colophon under the lists */
@media (min-width: 900px) and (max-width: 1279px) {
  .pl-footer-inner { grid-template-columns: repeat(4, minmax(0, var(--pl-column))); }
  .pl-footer-about { grid-column: 2 / -1; }
}
/* tablet: three columns, the mark and the colophon on rows of their own */
@media (min-width: 641px) and (max-width: 899px) {
  .pl-footer-inner { grid-template-columns: repeat(3, minmax(0, var(--pl-column))); }
  .pl-footer-mark, .pl-footer-about { grid-column: 1 / -1; }
}
@media (min-width: 641px) and (any-pointer: coarse) {
  .pl-footer-links a { min-height: var(--hit); }
}
/* phone: two columns while the labels fit, one when text is enlarged.
   .pl-footer-wide is a long list that takes the row and splits in two. */
@media (max-width: 640px) {
  .pl-footer { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
  .pl-footer-inner,
  .pl-footer-wide .pl-footer-links {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(9em, calc((100% - var(--gutter)) / 2))), 1fr));
    column-gap: var(--gutter);
  }
  .pl-footer-inner { row-gap: 20px; }
  .pl-footer-mark, .pl-footer-wide, .pl-footer-about { grid-column: 1 / -1; }
  .pl-footer-heading { margin-bottom: 6px; line-height: 1.2; }
  .pl-footer-links a { padding-block: 2px; line-height: 1.2; }
  .pl-footer-about { gap: 8px; }
  .pl-footer-about p { line-height: 1.25; }
}


/* ── 7. Reading page ───────────────────────────────────────────────────────
   www/app/site.css .site-layout, .site-content, .cover;
   www/components/docs-nav/docs-nav.css .toc-rail, .toc, .toc-label, .toc-item.
   Vlak's 204 overlay stays on. The layout starts on the page inset (one
   module further in from 1440px), its width snaps to whole modules, the rail
   is one 184px column and the text is the 592px measure. The title's top is
   120px, level with the rail's first row. Use Vlak's own type classes inside
   (.rs-t-display, .rs-t-sub, .rs-t-body, .rs-t-label). */

.pl-layout {
  --ml: var(--pl-rail-inset);
  margin-left: var(--pl-rail-inset);
  display: flex;
  gap: var(--gutter);
  padding: 0 var(--pad);
}
@media (min-width: 481px) {
  .pl-layout {
    width: calc(max(round(down, 100vw - var(--ml) - 2 * var(--pad) + var(--gutter), var(--pl-field)), var(--pl-field)) + var(--gutter));
  }
}
@media (min-width: 1700px) { .pl-layout { max-width: calc(6 * var(--pl-field) + var(--gutter)); } }

/* One element here; vlak.dev nests a scrolling .toc (184px, 20px right inset)
   in a sticky .toc-rail (120px top, 72px bottom). Same box, same origin. */
.pl-rail {
  display: none;
  flex-shrink: 0;
  align-self: flex-start;
  position: sticky;
  top: 0;
  width: var(--pl-column);
  height: 100vh;
  padding: 120px var(--gutter) 72px 0;
  overflow-y: auto;
  scrollbar-width: none;
}
.pl-rail::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .pl-rail { display: block; } }
.pl-rail-group + .pl-rail-group { margin-top: 18px; }
.pl-rail-label {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-secondary);
}
.pl-rail a {
  display: block;
  padding: 5px 0;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-snap) var(--ease);
}
.pl-rail a:hover, .pl-rail a:focus-visible, .pl-rail a[aria-current="page"] { color: var(--text); }
.pl-rail a[aria-current="page"] { font-weight: 500; }
.pl-rail a:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }

.pl-content {
  flex-shrink: 1;
  width: var(--pl-measure);
  min-width: 0;
  max-width: min(var(--pl-measure), 100%);
  padding-bottom: 72px;
}
@media (max-width: 800px) { .pl-content { width: 100%; max-width: 100%; } }

.pl-cover {
  min-height: var(--pl-field);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.pl-cover .rs-t-sub { margin-top: 16px; }
@media (min-width: 900px) {
  .pl-cover { padding-top: 120px; justify-content: flex-start; }
}
/* Below 900px the rail leaves and the page stacks under the bar. The cover
   keeps its 20px top inset there: site.css asks for 32px (and 40px below on
   phones) but the StyleX cover (www/app/site.stylex.ts) outranks it live. */
@media (max-width: 899px) {
  .pl-layout { flex-direction: column; padding-top: calc(var(--pl-bar) + env(safe-area-inset-top, 0px)); }
  .pl-cover { min-height: 0; justify-content: flex-start; }
}
@media (max-width: 640px) {
  .pl-layout { padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
}

/* Prose in the measure is 14px at 400; Vlak's 15px / 500 body is for cells.
   A section starts with a 13px / 600 label, 36px below what came before.
   www/app/site.css "Docs prose", .section-label */
.pl-content .rs-t-body { font-size: 0.875rem; font-weight: 400; line-height: 1.6; }
.pl-content .rs-t-body + .rs-t-body { margin-top: 12px; }
.pl-section { margin: 36px 0 0; font-size: 0.8125rem; font-weight: 600; letter-spacing: -.01em; }
@media (max-width: 640px) {
  .pl-content .rs-t-display { font-size: 2rem; }
  .pl-content .rs-t-sub { font-size: 1.125rem; }
  .pl-content .rs-t-body { font-size: 0.9375rem; }
  .pl-section { margin-top: 48px; font-size: 0.9375rem; }
  .pl-section + .rs-t-body { margin-top: 8px; }
}
