/* T12 wayfinding (scripts/lib/templates/wayfinding.mjs,
   ops/design/templates/wayfinding/contract.md). /guides: flat addon rows in one Panel per
   shelf group, flowing into two columns from 48rem and three from 72rem in reading order.
   /sitemap: a plain directory in columns. /404: the death screen, a gray world with one
   small dialog and one red button. Brand v2.1 tokens only. */

.wf { padding-bottom: var(--s-7); }
.wf-head .wfg-page-head { padding-bottom: var(--s-3); }
/* 2026-10-02: the partner CTA (components/partner-cta.css) follows the head and the filter on
   /guides, above the shelf. */
.wf-head > .wfg-cta { margin-block: var(--s-3); }

/* ---------- Search field (both modes) ---------- */

.wf-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; max-width: 36rem; }
.wf-search[hidden] { display: none; }
.wf-search label { font: 400 .8rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wf-search-box { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 0 0 .75rem; border: 1px solid var(--line-control); background: var(--bg-2); }
.wf-search-box:focus-within { border-color: var(--ink); outline: 2px solid var(--focus); outline-offset: 2px; }
.wf-search-box svg { flex: none; width: 1.1rem; height: 1.1rem; color: var(--ink-3); }
.wf-search-box input { flex: 1; width: 100%; min-width: 0; min-height: 2.6rem; border: 0; background: transparent; font: 400 1rem/1.3 var(--font-body); color: var(--ink); }
.wf-search-box input:focus { outline: none; }
.wf-search-box input::placeholder { color: var(--ink-3); }
.wf-search-submit { align-self: stretch; min-width: 5.5rem; padding: 0 .9rem; border: 0; border-left: 1px solid var(--line-control); background: var(--bg-3); font: 400 .95rem/1 var(--font-ui); color: var(--ink); cursor: pointer; }
.wf-search-submit:hover { background: var(--panel-2); color: var(--accent-text); }
.wf-search-status { min-height: 1.2em; margin: 0; font: 400 .82rem/1.4 var(--font-ui); color: var(--ink-3); }
.wf-results { margin: 0; padding: 0; list-style: none; border: 1px solid var(--edge); box-shadow: var(--shadow-inner); background: var(--panel); }
.wf-results[hidden] { display: none; }
.wf-results li { border-top: 1px solid var(--hairline); }
.wf-results li:first-child { border-top: 0; }
.wf-results a { display: flex; justify-content: space-between; gap: 1rem; min-height: 2.75rem; align-items: center; padding: 6px 14px; text-decoration: none; color: var(--ink); }
.wf-results a span { font: 400 .76rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.wf-results [aria-selected="true"] a { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- /guides shelf ---------- */

.wf--guides .wf-head { display: grid; gap: var(--s-3); padding-bottom: var(--s-4); }
/* Classes lead at full width, their rows in columns inside the panel; the other groups flow
   into two columns from 48rem and three from 72rem, in reading order. */
.wf-shelf > .wfg-panel { margin-bottom: var(--s-4); }
.wf-shelf-rest { columns: 1; column-gap: var(--s-4); }
.wf-shelf-rest > .wfg-panel { break-inside: avoid; margin-bottom: var(--s-4); }
.wf-shelf .wfg-panel[hidden] { display: none; }
@media (min-width: 48rem) {
  .wf-shelf-rest { columns: 2; }
  #shelf-classes .wf-rows { columns: 2; column-gap: 0; }
}
@media (min-width: 72rem) {
  .wf-shelf-rest { columns: 3; column-gap: var(--s-5); }
  #shelf-classes .wf-rows { columns: 3; }
}
#shelf-classes .wf-row { break-inside: avoid; }
.wf-shelf .wfg-panel-title { font-size: 1.15rem; }
.wf-rows { margin: 0; padding: 0; list-style: none; }
.wf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; align-items: baseline; padding: 7px 14px; border-top: 1px solid var(--hairline); }
.wf-row:first-child { border-top: 0; }
.wf-row[hidden] { display: none; }
.wf-row[data-depth="1"] { padding-left: 28px; }
.wf-row[data-depth="2"] { padding-left: 42px; }
.wf-row > a { display: inline-flex; align-items: center; min-height: 1.75rem; font: var(--heading-weight) 1.15rem/1.25 var(--font-heading); letter-spacing: 0; color: var(--accent-text); text-decoration: none; }
.wf-row > a:hover { text-decoration: underline; }
.wf-row[data-depth="2"] > a { font-size: 1.05rem; }
.wf-row-meta { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 8px; font: 400 .74rem/1.3 var(--font-ui); letter-spacing: .06em; color: var(--ink-3); }
.wf-kind { text-transform: uppercase; }
.wf-dek { grid-column: 1 / -1; font-size: .88rem; line-height: 1.45; color: var(--ink-2); }
.wf-counts { grid-column: 1 / -1; font: 400 .78rem/1.35 var(--font-ui); color: var(--ink-3); }
.wf-counts [data-state="new"] { color: var(--new); }
.wf-counts [data-state="reworked"] { color: var(--reworked); }
.wf-note { margin: 0; padding: 7px 14px 10px; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.45; color: var(--ink-3); }
.wf-more { margin-bottom: var(--s-5); }
.wf-more[hidden] { display: none; }
.wf-more ul { margin: .5rem 0 0; padding-left: 1.2em; }
.wf-more li span { margin-left: .5rem; font: 400 .74rem/1.3 var(--font-ui); text-transform: uppercase; color: var(--ink-3); }
/* /guides: the long-form read under the shelf, one reading column. */
.wf-guide { margin-block: var(--s-section) var(--s-6); }
.wf-after { display: grid; gap: var(--s-4); }
.wf-sitemap-link { margin: 0; color: var(--ink-2); }
.wf-sitemap-link a, .wf-more a { color: var(--accent-text); }

/* ---------- /sitemap ---------- */

.wf-map { columns: 1; column-gap: var(--s-6); }
@media (min-width: 48rem) { .wf-map { columns: 2; } }
@media (min-width: 64rem) { .wf-map { columns: 3; } }
@media (min-width: 80rem) { .wf-map { columns: 4; } }
.wf-map-group { break-inside: avoid-column; margin-bottom: var(--s-4); }
.wf-map-group li[data-depth="1"] { padding-left: 14px; }
.wf-map-group li[data-depth="2"] { padding-left: 28px; }
.wf-map-group h2 { margin: 0 0 .4rem; font: 400 .9rem/1.3 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.wf-map-group ul { margin: 0; padding: 0; list-style: none; }
.wf-map-group li { padding: 1px 0; line-height: 1.3; }
.wf-map-group a { display: inline-block; padding: 3px 0; color: var(--ink); text-decoration-color: var(--line-control); }
.wf-map-group a:hover { color: var(--accent-text); }
.wf-map-group time { font: 400 .76rem/1.3 var(--font-ui); color: var(--ink-3); white-space: nowrap; }

/* ---------- /404: the death screen ---------- */

/* The ghost world: the page's accent goes gray and so do the header and footer; only the red
   button keeps its color. */
.wf--dead { --accent: var(--ink-3); --accent-text: var(--ink-2); }
body:has(.wf--dead) .site-header, body:has(.wf--dead) .site-footer { filter: grayscale(1); }
.wf-grave { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s-5); padding-block: var(--s-7) var(--s-6); }
.wf-dialog { width: min(100%, 30rem); padding: 18px 20px 20px; text-align: center; }
.wf-died { margin: 0; font: 400 1rem/1.3 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.wf-dialog h1 { margin: .2rem 0 .4rem; font: 400 clamp(2.2rem, 6vw, 3rem)/1 var(--font-display); color: var(--ink); }
.wf-path { margin: 0 0 var(--s-4); color: var(--ink-2); overflow-wrap: anywhere; }
.wf-path code { font-size: .92em; color: var(--ink); }
.wf-release { display: grid; justify-items: center; gap: .35rem; margin: 0; }
.wf-release small { font: 400 .8rem/1.4 var(--font-ui); color: var(--ink-3); }
.wf--dead .wf-search { width: min(100%, 30rem); max-width: none; }
.wf-none { width: min(100%, 30rem); color: var(--ink-2); }
.wf-none[hidden] { display: none; }
.wf-none ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.wf-none a { display: inline-block; padding: .3rem 0; color: var(--ink); }

.wf-fallback { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.wf-fallback a { display: inline-flex; align-items: center; min-height: 1.75rem; color: var(--ink); }
.wf-more [hidden] { display: none; }
