/* /wiki/levels: the icons beside what a level opens, and the "Your level" picker. Tokens only (BRAND.md). */

/* ---- what a level opens: a line a kind, each thing with its icon ---- */
/* what a level opens: the kind on the left in a column of its own, its things beside it, so every row of the table lines up the same way
   (28 Nov 2026: a long list used to drop under its label while a short one sat beside it) */
.b-lv .op { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: start; gap: var(--sp-1) var(--sp-3); padding: 2px 0; line-height: 1.4; }
.b-lv .op .k { color: var(--text-3); margin: 0; line-height: 28px; }
.b-lv .op-l { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); min-width: 0; }
.op-i { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.op-i .ic, .op-i img { flex: none; width: 28px; height: 28px; --s: 28px; image-rendering: pixelated; }
.op-i img.face { border-radius: 6px; }
.op-t { min-width: 0; }
.op-none { color: var(--text-3); }
.lv-ini { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
  font: 600 14px/1 var(--display); color: var(--text-2); }

/* ---- the picker: sticky under the header, one row ---- */
.lv-pick { position: sticky; top: var(--header); z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); margin: 0 0 var(--sp-2);
  padding: var(--sp-2) 0; background: var(--bg); border-bottom: 1px solid var(--border); }
.lv-pick label { font: 600 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.lv-pick input { width: 112px; min-height: 44px; padding: 0 var(--sp-3); font: 16px var(--sans); font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface);
  border: 1px solid var(--control-border); border-radius: var(--radius-sm); }
.lv-pick input:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.lv-live { flex: 1 1 240px; min-width: 0; margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-live strong { color: var(--text); font-weight: 600; }

/* ---- the chosen row and the next level that opens something: a bar and a word, never colour alone ---- */
.b-lv tr[data-level] { scroll-margin-top: calc(var(--header) + 96px); }
.b-lv .c-table .c-t tbody tr.is-here :is(th, td) { background: var(--surface-2); }
.b-lv .c-table .c-t tbody tr.is-here th { box-shadow: inset 3px 0 0 var(--ember); }
.b-lv .c-table .c-t tbody tr.is-next th { box-shadow: inset 3px 0 0 var(--ember-soft); }
.b-lv tr.is-here th::after, .b-lv tr.is-next th::after { display: inline-block; margin-left: var(--sp-2); padding: 1px 8px; border-radius: var(--pill); font: 600 11px/1.5 var(--sans); letter-spacing: .02em; white-space: nowrap; vertical-align: 2px; }
.b-lv tr.is-here th::after { content: "You are here"; background: var(--ember); color: #1A0D05; }
.b-lv tr.is-next th::after { content: "Next to open"; background: var(--surface-2); color: var(--ember-soft); box-shadow: inset 0 0 0 1px var(--ember-soft); }

.lv-pick { transition: transform var(--t-mid) var(--ease), visibility var(--t-mid); }
@media (prefers-reduced-motion: reduce) { .lv-pick { transition: none; } }
@media (max-width: 560px) {
  .lv-pick { flex-wrap: nowrap; gap: 0 var(--sp-3); padding: 0; min-height: 44px; }
  .lv-pick input { width: 96px; flex: none; }
  .lv-pick label { flex: none; }
  /* the one-row bar: the live line stays for screen readers, the marked row says the rest on screen */
  .lv-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; flex: none; }
  .lv-pick.is-away { transform: translateY(-120%); visibility: hidden; }
  .b-lv.b-lv .op { display: block; }
  .b-lv.b-lv .op .k { display: block; min-width: 0; margin-bottom: 2px; }
  .b-lv.b-lv .op-i { padding: 2px 0; }
  .b-lv.b-lv .op-i a { display: inline-block; padding: 10px 0; margin: -10px 0; }
  .b-lv.b-lv tr[data-level] { scroll-margin-top: calc(var(--header) + 120px); }
}
/* what a level opens is the long column: it takes over half the table, so the three short ones stop sharing out the room it needs */
@media (min-width: 761px) { .b-lv .c-table .c-t :is(th, td):last-child { width: 58%; } }
