/* Hallmark · sibling of the plugins site: site/assets/site.css loads first and brings Terrazzo (deal 2/3, shared), Bricolage Grotesque, the slab, the buttons and the TV; this file adds only the portal's own parts · shape: Docs (a home with the map of the docs, then a page a doc with every page listed beside it) · genre: modern-minimal · job: learn · imagery: the kit's own plugin on the TV, the examples' menu icons · v2.0.0
 * hero: Settled, the site's · nav: slab, then the list of pages beside each doc (a fold on a phone) · footer: index columns, the docs by group · signature: the starter kit's plugin on the TV, two screen pixels a TV pixel */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V3 · weakest: V, a docs portal is mostly text; the TV and the examples' icons are its pictures, and the pages stay plain so the code reads */
/* Hallmark · dismissed 58 · a doc page is reference text a developer reads at a desk; the 80-word screen holds on the home page, not in the docs */
/* Hallmark · answered F4 · the hero's second button is .btn--secondary, outlined in ink, as on the plugins site; the linter reads both as .btn */

/* ---- the docs: the list of pages beside the text ---- */
.docs { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--space-3xl); align-items: start; padding-block: var(--space-2xl) 0; }
.side { position: sticky; top: var(--space-lg); max-height: calc(100dvh - 2 * var(--space-lg)); overflow-y: auto; scrollbar-width: thin; font-size: var(--text-sm); }
.side__fold > summary { display: none; }
.side__group + .side__group { margin-top: var(--space-lg); }
.side__head { margin-bottom: var(--space-2xs); color: var(--color-muted); }
.side ul { margin: 0; padding: 0; list-style: none; }
.side a { display: block; padding: var(--space-2xs) 0 var(--space-2xs) var(--space-sm); border-left: var(--rule-bar) solid var(--color-rule); color: var(--color-ink-2); text-decoration: none; transition: border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.side a:hover { color: var(--color-ink); border-left-color: var(--color-ink); }
.side a[aria-current="page"] { color: var(--color-ink); font-weight: 500; border-left-color: var(--color-accent); }
.side a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.side__toc a { padding-left: var(--space-lg); }

.doc { min-width: 0; }
.doc h1 { max-width: 22ch; margin-bottom: var(--space-xl); font-size: var(--text-display-s); text-wrap: balance; }
.doc__lead { margin-bottom: var(--space-xl); color: var(--color-ink-2); }
.doc__note { margin-bottom: var(--space-xl); }
.doc__body h2 { max-width: none; margin-top: var(--space-2xl); font-size: var(--text-2xl); line-height: 1.15; text-wrap: balance; }
.doc__body h3 { margin-top: var(--space-xl); }
.doc__body h2, .doc__body h3, .ex { scroll-margin-top: var(--space-lg); }
.doc__body a code { text-decoration: inherit; }
/* a table whose heads are all empty (the hardware page's At a glance) shows no head row */
.doc__body thead:not(:has(th:not(:empty))) { display: none; }
.doc__source { max-width: 70ch; margin-top: var(--space-2xl); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }

/* Previous and Next */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); max-width: 70ch; margin-top: var(--space-xl); }
.container > .pager { max-width: none; margin-top: var(--section-gap-s); }
.pager a { display: grid; gap: var(--space-2xs); padding: var(--space-md) var(--space-lg); background: var(--color-plate); border: var(--rule-bar) solid var(--color-ink); color: var(--color-ink); text-decoration: none; transition: box-shadow var(--dur-micro) var(--ease-out); }
.pager a:hover { box-shadow: var(--space-xs) var(--space-xs) 0 var(--color-ink); }
.pager a:active { transform: translateY(1px); }
.pager a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.pager span { color: var(--color-muted); font-size: var(--text-sm); }
.pager b { font: var(--display-weight) var(--text-title)/1.2 var(--font-display); letter-spacing: var(--tracking-display); }
.pager__next { text-align: right; }

/* ---- the home page ---- */
.shot--home { --k: 1; justify-self: center; }
@media (min-width: 64rem) { .shot--home { --k: 2; } }
.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); align-items: start; }
.group h3 { max-width: none; padding-bottom: var(--space-sm); border-bottom: var(--rule-bar) solid var(--color-ink); }
.group__pages { display: grid; gap: var(--space-sm); margin: var(--space-md) 0 0; padding: 0; list-style: none; }
.group__pages a { display: grid; gap: var(--space-2xs); padding: var(--space-md); background: var(--color-plate); border: var(--rule-hair) solid var(--color-ink); color: var(--color-ink); text-decoration: none; transition: box-shadow var(--dur-micro) var(--ease-out); }
.group__pages a:hover { box-shadow: var(--space-xs) var(--space-xs) 0 var(--color-ink); }
.group__pages a:active { transform: translateY(1px); }
.group__pages a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.group__name { font-weight: 500; }
.group__text { color: var(--color-ink-2); font-size: var(--text-sm); }
.close .actions { flex: none; }

/* ---- the examples ---- */
.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-columns); margin: 0; padding: 0; list-style: none; }
.ex { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-md); align-items: start; padding: var(--space-lg); background: var(--color-plate); border: var(--rule-hair) solid var(--color-ink); }
.ex:target { box-shadow: inset 0 0 0 var(--rule-bar) var(--color-accent); }
.ex .tv-icon { width: 48px; height: 48px; }
.ex__text { display: grid; gap: var(--space-xs); min-width: 0; }
.ex__title { max-width: none; font-size: var(--text-title); }
.ex__dir { color: var(--color-ink-2); font-size: var(--text-sm); }
.ex__about { color: var(--color-ink-2); }
.ex__about p { max-width: none; }
.ex__about code { font: 500 0.9em/1.4 var(--font-outlier); }
.ex__text > p:last-child { font-weight: 500; }
.ex__notes { margin-top: var(--space-2xl); }

/* ---- the footer: the docs by group ---- */
.foot .dev-cols { grid-template-columns: minmax(0, 4fr) repeat(5, minmax(0, 2fr)); }

@media (max-width: 75rem) {
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot .dev-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot .dev-cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 60rem) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); padding-top: var(--space-lg); }
  .side { position: static; max-height: none; overflow: visible; font-size: var(--text-md); }
  .side__fold > summary { display: flex; align-items: center; list-style: none; min-height: 48px; padding: 0 var(--space-md); border: var(--rule-bar) solid var(--color-ink); background: var(--color-plate); font-weight: 500; cursor: pointer; }
  .side__fold > summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
  .side__fold > summary::-webkit-details-marker { display: none; }
  .side__fold > summary::after { content: ""; width: 8px; height: 8px; margin: 0 var(--space-2xs) var(--space-2xs) auto; border-right: var(--rule-bar) solid currentColor; border-bottom: var(--rule-bar) solid currentColor; transform: rotate(45deg); }
  .side__fold[open] > summary::after { margin-bottom: 0; margin-top: var(--space-2xs); transform: rotate(-135deg); }
  .side__fold[open] > summary { margin-bottom: var(--space-md); }
  .side a { padding-block: var(--space-xs); }
  .examples { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  /* on a phone the header keeps to the name and the menu: the shop is in the footer */
  .slab__shop { display: none; }
  .groups, .pager { grid-template-columns: minmax(0, 1fr); }
  .foot .dev-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex { padding: var(--space-md); }
}
@media (prefers-reduced-motion: reduce) {
  .side a, .pager a, .group__pages a { transition: none; }
  .pager a:active, .group__pages a:active { transform: none; }
}
