/* uwee-u-shelf.css: the Uwee U shelves' own sheet (/uwee-u/learn, /guides, /research, /release-notes,
   /case-studies; design audit pass, plan 2026-11-09-2150 U28, signed spec specs/uwee-u-shelf-template.md;
   round two U23, docs/site-relaunch/round-two/specs/uwee-u.md part 2). Linked last in the css list
   lib/site/templates/shelf-index.ts gives every shelf, so it reaches those pages and no other. It styles the
   markup the template prints for section 2: the keeper standing, the reading list with its foot link
   and waiting block, the empty room, and the sibling line that ends the shelf. The hero is the shared scene (the open
   hero on the four open shelves, the short band on Case Studies) and keeps the shared part's own styling;
   nothing here names its classes. */

/* ---------- 2. the shelf ---------- */
/* Build six G3-U3 (Sarah's comment 5duXn42r2nlI: "tighter spacing and smaller text blocks"): the shelf band takes
   site.css's .band--tight padding instead of the full .band clamp, and the rows, notes and blocks below step down
   one size with less air between them. The hero is the shared scene and is not touched; the h2 keeps the site's
   headline size. */
.band.shelf { padding-block: clamp(36px, 5vw, 64px); }
.shelf h2 { margin: 0 0 .3em; max-width: 22ch; }
.shelf .lede { margin: 0; max-width: 46ch; font-size: 1rem; color: var(--muted); }

/* The keeper standing: the bubble, the pose on its shadow, then the name and title from the roster */
.shelf-keeper { margin: 0; display: grid; justify-items: center; gap: 10px; text-align: center; }
.shelf-keeper__uwee { width: 220px; }
.shelf-keeper__uwee img { aspect-ratio: 1; object-fit: contain; object-position: 50% 100%; }
[data-site] .shelf-keeper .shelf-keeper__says { justify-self: center; margin: 0 0 4px; max-width: 15ch; } /* build five SW6: Pip's Home size (relaunch.css 2), no smaller size of its own */
.shelf-keeper__role { display: grid; justify-items: center; gap: 2px; }
.shelf-keeper__role b { font-family: var(--head); font-size: 1.15rem; line-height: 1.2; color: var(--fg); }
.shelf-keeper__role > span { font-family: var(--ui); font-size: .85rem; font-weight: 700; line-height: 1.3; color: var(--muted); }
.shelf-keeper__note { max-width: 30ch; margin: 10px 0 0; font-size: .95rem; line-height: 1.45; color: var(--fg); }

/* 2a. with entries: the keeper on the left (4 of 12), the heading, lede and reading list on the right (8 of 12) */
.shelf__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "keeper head" "keeper list"; column-gap: clamp(32px, 4.5vw, 72px); align-items: start; }
.shelf__head { grid-area: head; margin-bottom: clamp(14px, 1.8vw, 22px); }
.shelf--list .shelf-keeper { grid-area: keeper; align-self: start; }
.shelf__list { grid-area: list; }
/* build nine: a shelf whose keeper stands in the exhibit above (Research) gives the list the full row */
.shelf--no-keeper .shelf__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "list"; }
.shelf-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.shelf-row { position: relative; display: grid; gap: 4px; padding: clamp(12px, 1.4vw, 16px) 0; border-bottom: 1px solid var(--rule); }
.shelf-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.shelf-row h3 { margin: 0; font-size: clamp(1.1rem, 1rem + .35vw, 1.25rem); }
.shelf-row__link { color: inherit; text-decoration: none; }
.shelf-row__link::after { content: ""; position: absolute; inset: 0; } /* the whole row is the link's target */
.shelf-row:hover .shelf-row__link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.shelf-row__link:focus-visible { outline: none; }
.shelf-row:has(.shelf-row__link:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: var(--radius-sm); }
.shelf-row__chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.shelf-row__sum { margin: 0; max-width: 58ch; font-size: .95rem; line-height: 1.45; color: var(--muted); }
.shelf-row__date { font-family: var(--ui); font-size: .85rem; font-weight: 600; color: var(--muted); }
/* Round two: a name-and-chip row (Release Notes) has no summary; the foot link and the waiting block follow the rows */
.shelf__foot { margin: 14px 0 0; }
.shelf__foot a.tcta { font-weight: 700; }
.shelf__waiting { margin-top: clamp(20px, 2.6vw, 32px); padding: clamp(16px, 1.8vw, 22px); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--cream, var(--paper)); }
.shelf__waiting h3 { margin: 0; font-size: clamp(1.1rem, 1rem + .35vw, 1.25rem); }
.shelf__waiting .shelf__soon { margin: 10px 0 0; }
.shelf__waiting-line { margin: 8px 0 0; max-width: 52ch; font-size: .95rem; color: var(--muted); }
/* Build three U27: a grouped shelf (Guides) prints a small label over each group's rows; a quiet line and one cross
   link to the sister shelf may follow the rows. */
.shelf-rows:has(> .shelf-group) { border-top: 0; }
.shelf-group + .shelf-group { margin-top: clamp(20px, 2.4vw, 28px); }
.shelf-group__label { margin: 0 0 6px; font-family: var(--ui); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.shelf__soon-line { margin: 14px 0 0; max-width: 52ch; font-size: .95rem; color: var(--muted); }
.shelf__cross { margin: 10px 0 0; font-size: .95rem; }
.shelf__cross a.tcta { font-weight: 700; }

/* Build six part two UU1 (Dan's Q26): Release Notes is a dated log. Each week is one band: the week in a narrow column
   beside its notes (above them on a phone); each note's two tags (New or Improved, then the area) sit over its title,
   its plan line under the body. Keyed on .shelf--log, which only Release Notes prints, so Guides' groups stay as they are. */
.shelf--log .shelf-group { display: grid; grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); column-gap: clamp(20px, 2.4vw, 36px); padding-block: clamp(18px, 2vw, 26px); border-top: 1px solid var(--rule); }
.shelf--log .shelf-group + .shelf-group { margin-top: 0; }
.shelf--log .shelf-group__label { margin: 0; padding-top: 3px; font-family: var(--ui); font-size: .9rem; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.35; color: var(--fg); }
.shelf--log .shelf-rows--group { border-top: 0; display: grid; gap: clamp(18px, 2vw, 24px); }
.shelf--log .shelf-rows--group .shelf-row { gap: 6px; padding: 0; border-bottom: 0; }
.shelf--log .shelf-rows--group .shelf-row + .shelf-row { padding-top: clamp(18px, 2vw, 24px); border-top: 1px dashed var(--rule); }
.shelf--log .shelf-row__head { flex-direction: column; align-items: flex-start; gap: 8px; }
.shelf--log .shelf-row__chips { order: -1; }
.shelf--log .shelf-row h3 { line-height: 1.3; }
.shelf--log .shelf-row__label { border-color: transparent; background: color-mix(in srgb, var(--amber) 24%, var(--paper)); color: var(--fg); font-weight: 700; }
.shelf--log .shelf-row__label[data-label="improved"] { background: var(--cream); }
.shelf--log .shelf-row__sum { max-width: 60ch; font-size: 1rem; line-height: 1.5; color: var(--fg); }
.shelf--log .shelf-row__plan { margin: 2px 0 0; font-family: var(--ui); font-size: .85rem; font-weight: 700; color: var(--muted); }
.shelf--log .shelf-row:has(.shelf-row__link:focus-visible) { outline-offset: 6px; }

/* Build six part two UU2 (Sarah AaYFKq5l1gz-, 7Ba-IQKOAilz): Research's study exhibit sits in the site's wrap, so its card
   starts on the gutter like every other section. The band takes the shelf's tight top padding and none below, since the
   shelf band under it (same paper ground) brings its own. */
.band.shelf-study { padding-block: clamp(36px, 5vw, 64px) 0; }
/* Build six part two FIX-2 (study card balance): Wire stood alone under the total line with an empty strip to his left.
   From 861 wide, the chart's note rises into that strip beside him (Wire keeps his place at the total line's end; his
   lower part no longer pushes the note down), and the note keeps a lane clear of him. */
@media (min-width: 861px) {
  .shelf-study .dp-ex__build .kit-build__carry { margin-bottom: -94px; }
  .shelf-study .dp-ex__figcap { max-width: min(64ch, calc(100% - 140px)); }
}

/* 2b. empty: the room at content width, then the keeper waiting beside the heading, the chip and one link */
.shelf__room { position: relative; aspect-ratio: 2 / 1; overflow: clip; border-radius: var(--radius); background: var(--navy); }
.shelf__room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.shelf__wait { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(32px, 4.5vw, 72px); align-items: center; margin-top: clamp(20px, 2.6vw, 32px); }
.shelf--empty .shelf-keeper__uwee { width: 200px; }
.shelf__soon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 14px 0 0; }
.shelf__soon .chip { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.shelf__soon a.tcta { font-weight: 700; }

/* ---------- the shelf's end: the sibling line, "More shelves:" and the other open shelves in one row (R11). The navy
   ending that carried it went in plan 2026-11-11-2305 U9; on the paper ground it reads --fg and --rule. ---------- */
.shelf__more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: clamp(20px, 2.6vw, 32px) 0 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.shelf__more h3 { margin: 0; font-family: var(--ui); font-size: .95rem; font-weight: 700; color: var(--fg); }
.shelf__more ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.shelf__more a { color: var(--fg); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.shelf__more a:hover { text-decoration-thickness: 2px; }
.shelf__more-soon { color: var(--muted); } /* a greyed shelf: its name as text, never a link (build three U27) */

@media (max-width: 899px) {
  .shelf__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "keeper" "list"; }
  .shelf--no-keeper .shelf__grid { grid-template-areas: "head" "list"; }
  .shelf--list .shelf-keeper { margin-bottom: clamp(16px, 4vw, 24px); }
  .shelf-keeper__uwee, .shelf--empty .shelf-keeper__uwee { width: 160px; } /* never under 150px on a phone (spec rule 5) */
  .shelf__room { aspect-ratio: 3 / 2; }
  .shelf__wait { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
}
@media (max-width: 640px) {
  .shelf--log .shelf-group { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
}

/* The hero's quiet link at phone width (tidy one, lead 2026-11-11): site.css makes a.tcta inline-flex up to 860px for
   its 44px touch row, so once the words wrap the arrow (::after) stands alone as its own flex item at the far edge.
   Inline-block keeps the 44px floor and lets the arrow follow the last word. Names no shared-part class. */
@media (max-width: 860px) { #hero .doors a.tcta { display: inline-block; } }

/* Build six part two FIX-11 (walk: Release Notes at 1024 and 1440): Ping sat at the top of the left column with about
   900px of empty cream beside the log under him. From 900 wide (where the shelf has two columns) he stays in view while
   the log scrolls (below the header and the section bar while it shows: js/pages/subnav.js measures both onto the root as
   --subnav-top and --subnav-h; plus 20px) and stops at the end of the shelf's grid.
   Keyed on .shelf--log, which only Release Notes prints. */
@media (min-width: 900px) {
  .shelf--log .shelf-keeper { position: sticky; top: calc(var(--subnav-top, 69px) + var(--subnav-h, 49px) + 20px); }
}

/* Build six part two FIX-11 (walk: "More shelves" at 1024): from 900 to 1099 wide the four names overrun the list column
   by a few pixels, so the last one ("Case Studies (coming soon)") dropped to a line of its own on every shelf. Here they
   sit two and two; from 1100 up all four fit on one line, as before. */
@media (min-width: 900px) and (max-width: 1099.98px) {
  .shelf__more ul { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 28px; }
}

/* Build six part two FIX-12 (walk: "More shelves" at 390): under about 680 wide the four names wrap unevenly (2, 1, 1 or
   3, 1) on every shelf. Here they sit two and two, the grid FIX-11 uses from 900 to 1099; from 700 to 899 all four fit
   on one line, as before. The columns may shrink (minmax 0): at 390 the longest name, "Case Studies (coming soon)",
   does not fit beside the first, so it takes two lines inside its cell rather than pushing past the page edge. */
@media (max-width: 699.98px) {
  .shelf__more ul { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px 28px; }
}
