/* Dialed · Locker page. Layout and the three components the system does not yet carry: the catalogue
   match list, the star radiogroup, and the owned-gear rows (board rows on a panel). Scoped to .lk-page.
   Every color is a token from site.css; the rows read the board's --row-* tokens so dark gets lit tiles. */

.lk-page .lk-grid { align-items: start; }
.lk-page .panel-h h2 { font-size: var(--t1); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }

/* ---------- status lines: present in the tree before anything is written, zero height while empty ---------- */
.lk-page .live:empty { min-height: 0; }
.lk-page .lk-q-status { font-weight: 500; color: var(--fg-3); margin-top: var(--s2); }
.lk-page .lk-q-status.err { font-weight: 600; color: var(--red); }
.lk-page .lk-q-status:empty { margin-top: 0; }
.lk-page .lk-form-status { margin-top: var(--s3); }
.lk-page .lk-form-status:empty { margin-top: 0; }

/* ---------- catalogue matches: a ruled list of real buttons ---------- */
.lk-results { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.lk-results li { margin: 0; }
.lk-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s4); row-gap: 2px; width: 100%; min-height: 56px; padding: 10px var(--s2); border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; color: var(--fg); text-align: left; cursor: pointer; transition: background-color var(--dur-1) ease-out; }
@media (hover: hover) and (pointer: fine) { .lk-result:hover { background: var(--bg-2); } }
.lk-result:active { background: var(--bg-2); }
.lk-result:focus-visible { outline-offset: -2px; }
.lk-result b { font-weight: 700; }
.lk-result small { color: var(--fg-3); }
.lk-result .fig { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: var(--t1); }

/* ---------- the picked product ---------- */
.lk-picked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); border-radius: var(--radius); }
.lk-picked p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.lk-picked b { color: var(--on-tint); font-weight: 800; }
.lk-picked p > span:not(.lbl) { font-size: var(--t-1); }

/* ---------- rating: five native radios drawn as the system's stars ---------- */
.lk-rate legend { margin-bottom: var(--s2); }
.lk-stars { display: inline-flex; margin-left: -8px; }
.lk-star { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--figure); cursor: pointer; }
.lk-star input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.lk-star-i { display: block; width: 28px; height: 28px; border-radius: var(--radius); }
.lk-star svg { display: block; width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }   /* the fill, its on state and their motion are in the motion block below */
@media (hover: hover) and (pointer: fine) { .lk-star:hover svg { stroke-width: 2.5; } }
.lk-star input:focus-visible + .lk-star-i { outline: 2px solid var(--focus); outline-offset: 2px; }
.lk-rate .hint { margin-top: var(--s1); }
.lk-rate .hint b { color: var(--fg); }
.lk-rate .err { font-size: var(--t-1); font-weight: 600; color: var(--red); margin-top: var(--s1); }
.lk-rate.error .lk-star:not(.on) { color: var(--red); }

/* ---------- owned gear: board rows on a panel ---------- */
.lk-board .live { margin-bottom: var(--s3); }
.lk-board .live:empty { margin-bottom: 0; }
.lk-rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.lk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) var(--row-pad); border-top: 1px solid var(--row-rule); margin: 0; }
.lk-row + .lk-row { margin-top: var(--row-gap); }
.lk-row:first-child { border-top: 0; }
.lk-row-main { min-width: 0; }
.lk-row-n { font-size: var(--t1); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.lk-row-n a { color: var(--fg); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .lk-row-n a:hover { text-decoration: underline; } }
.lk-row-m { font-size: var(--t-1); color: var(--fg-3); margin-top: 3px; }
.lk-row-note { font-size: var(--t-1); color: var(--fg-2); margin-top: 4px; }
.lk-row-s { display: inline-flex; }
.lk-row .stars { font-size: 1.25rem; }
.lk-row .skel.tab { align-self: center; }
/* a piece the catalogue no longer carries: kept on the board, muted, with its own Remove */
.lk-row.is-gone .lk-row-n { color: var(--fg-2); }
.lk-row.is-gone .lk-row-m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lk-row.is-gone .stars { color: var(--fg-3); }

/* ---------- recommendations ---------- */
.lk-recs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--fg); }
.lk-recs li { margin: 0; padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.lk-recs h3 { font-size: var(--t0); font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.lk-recs h3 a { color: var(--fg); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .lk-recs h3 a:hover { text-decoration: underline; } }
.lk-recs p { font-size: var(--t-1); color: var(--fg-2); margin-top: 4px; }
.lk-recs .lk-rec-g { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fg); }
.lk-recs .lk-rec-g .glyph { font-size: 1rem; }
.lk-recs[hidden] { display: none; }
/* no recommendations yet: one line in the list's place, under the same heavy rule */
.lk-recs-empty { margin: 0; padding-top: var(--s3); border-top: 2px solid var(--fg); font-size: var(--t-1); color: var(--fg-2); }

/* ---------- the estimate: a totals block ---------- */
.lk-worth { padding: var(--s4) var(--s5); border-radius: var(--radius); }
.lk-worth .fig { display: block; font-size: var(--t5); }
.lk-worth .lbl { display: block; margin-top: 6px; }
.lk-worth .skel { margin: 0; }
.lk-worth .skel + .skel { margin-top: 10px; }

/* ---------- breakpoints ---------- */
@media (max-width: 560px) {
  .lk-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "stars rm"; }
  .lk-row-main { grid-area: main; }
  .lk-row-s { grid-area: stars; }
  .lk-row .btn { grid-area: rm; justify-self: end; }
  .lk-row .skel.tab { grid-area: stars; }
  .lk-row .skel.sq { grid-area: rm; justify-self: end; }
  .lk-worth .fig { font-size: var(--t4); }
}

/* ===== motion (2 Nov 2026). Tokens from site.css :root; every rule has its reduced-motion path below. ===== */
/* the stars fill on press: the fill cross-fades (140 ms) and the pressed star gives under the finger */
.lk-star svg { fill: currentColor; fill-opacity: 0; transition: fill-opacity var(--dur-1) ease-out, stroke-width var(--dur-1) ease-out, transform var(--dur-1) var(--ease-out); }
.lk-star.on svg { fill-opacity: 1; }
.lk-star:active svg { transform: scale(.86); }
/* recommendation rows arrive through the system's E.arrive (the `arrive` class in site.css) when the list changes after its first paint */
/* the empty board: the locker's own drawn mark, an unfilled star at the board's 1.5 px stroke, then the next action */
.lk-empty-mark { display: block; width: 2.5rem; height: 2.5rem; margin: 0 0 var(--s3); color: var(--figure); }
.lk-empty-mark svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.lk-empty-mark svg > * { vector-effect: non-scaling-stroke; }
/* a written status line fades in; the Add button settles back after Enter as after a click */
@keyframes lk-live-in { from { opacity: 0; } to { opacity: 1; } }
.lk-page .live.is-new { animation: lk-live-in var(--dur-1) ease-out; }
#lk-add { transition: background-color var(--dur-1) ease-out, border-color var(--dur-1) ease-out, color var(--dur-1) ease-out, transform var(--dur-1) var(--ease-out); }
#lk-add.is-pressing { transform: scale(.98); transition: none; }
/* the catalogue matches open under the box the way a menu opens from its trigger: from the box's edge over 180 ms, out in 120 ms
   (display leaves last); the list re-rendering while open does not re-run it */
.lk-results { transform-origin: top left; transition-property: opacity, transform, display; transition-duration: 120ms; transition-timing-function: ease-out; transition-behavior: allow-discrete; }
.lk-results[hidden] { display: none; opacity: 0; transform: translateY(-4px) scale(.98); }
.lk-results:not([hidden]) { transition-duration: 180ms; transition-timing-function: var(--ease-out); }
@starting-style { .lk-results:not([hidden]) { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .lk-star svg, .lk-star:active svg { transform: none; transition: fill-opacity var(--dur-1) ease-out, stroke-width var(--dur-1) ease-out; }
  .lk-page .live.is-new { animation: none; }
  .lk-results, .lk-results[hidden] { transition: none; transform: none; }
  #lk-add, #lk-add.is-pressing { transform: none; transition: background-color var(--dur-1) ease-out, border-color var(--dur-1) ease-out, color var(--dur-1) ease-out; }
}
