/* VLPremiere Pro · Effects & Features library (/library/). Page components: .l-bar (sticky tabs + plan), .topic group
   buttons (same rule as tutorials.css), .l-group, .l-item card (picture card in Highlights, compact row elsewhere), the
   pop-up (dialog#l-modal, filled from the item's hidden .l-pop). Dark only, like the rest of the site. */

/* tier tags: the same text tag as features.css */
.tier { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; border: 1px solid var(--line-strong); font: 500 var(--fs-meta)/1 var(--font-mono); font-style: normal; color: var(--muted); white-space: nowrap; }
.tier.pro { border-color: rgb(79 163 245 / .45); background: rgb(79 163 245 / .1); color: var(--accent-bright); }

/* ---------- hero with the search ---------- */
.l-hero { padding-top: calc(var(--nav-h) + 64px); padding-bottom: 48px; overflow: clip; }
.l-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.l-hero h1 { margin-bottom: 22px; }
.l-hero h1 .hi { color: var(--accent-bright); }
.legend { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.l-search .search { position: relative; }
.l-search .input { padding-right: 48px; }
.l-search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--line-strong); font: 500 var(--fs-meta)/1 var(--font-mono); color: var(--muted); }
.l-search .search-meta { margin-top: 0; }

/* ---------- sticky bar: tabs + plan ---------- */
.l-body { padding-bottom: 72px; }
.l-bar { position: sticky; top: var(--nav-h); z-index: var(--z-sticky); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-block: 10px; background: rgb(9 13 23 / .94); border-bottom: 1px solid var(--line); }
.l-tabs { border-bottom: 0; flex: 1 1 auto; min-width: 0; }
.l-plan button { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- a tab ---------- */
.l-panel { padding-top: 24px; display: flex; flex-direction: column; }
.l-panel[hidden] { display: none; }
.l-panel > .l-intro, .l-panel > .l-groups { order: -1; }   /* while searching, groups are ordered by their best match (library.js) */
.l-panel > [data-empty] { order: 2000; margin-top: 32px; }
.l-intro { max-width: 72ch; color: var(--muted); font-size: var(--fs-sm); }
.l-intro:empty { display: none; }
.l-groups { display: flex; gap: 8px; margin-top: 16px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
@media (min-width: 900px) { .l-groups { flex-wrap: wrap; overflow: visible; } }
.topic { position: relative; flex: none; min-height: 38px; padding: 0 13px; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: none; color: var(--muted); font: 600 14px/1 var(--font-display); cursor: pointer; isolation: isolate; transition: color var(--t-tap), border-color var(--t-tap); }
.topic small { margin-left: 4px; font: 500 var(--fs-meta)/1 var(--font-mono); color: var(--muted); }
.topic::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--surface-2); opacity: 0; transform: scale(.82); transition: opacity var(--t-tap) var(--ease), transform var(--t-tap) var(--ease); }
.topic:hover { color: var(--text); }
.topic[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }
.topic[aria-pressed="true"]::before { opacity: 1; transform: none; }
.topic[aria-pressed="true"] small { color: var(--accent-bright); }
.topic[data-none] { display: none; }

/* ---------- a group ---------- */
.l-group { margin-top: 32px; }
.l-group[hidden] { display: none; }
.l-group-h { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.l-group-h h2 { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; }
.l-n { font: 500 var(--fs-label)/1 var(--font-mono); color: var(--muted); }
.l-about { margin-top: 10px; max-width: 72ch; color: var(--muted); font-size: 14px; line-height: 1.5; }
.l-more { margin-top: 14px; }

/* compact rows: three across */
.l-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.l-item[hidden], .l-item.is-extra { display: none; }
.l-open { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: border-color var(--t-tap), transform var(--t-tap) var(--ease); }
.l-open:hover, .l-open:focus-visible { border-color: var(--line-strong); transform: translateY(-1px); }
.l-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.l-mono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--line); font: 600 13px/1 var(--font-mono); color: var(--accent-bright); letter-spacing: .02em; }
.l-thumb { display: block; width: 72px; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.l-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.l-txt { display: grid; gap: 3px; min-width: 0; }
.l-name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.l-short { font-size: 13px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Highlights: picture cards, four across */
[data-view="hl"] .l-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
[data-view="hl"] .l-open { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 10px 10px; align-items: start; padding: 0 0 14px; overflow: hidden; }
[data-view="hl"] .l-thumb { grid-column: 1 / -1; width: 100%; border-radius: 0; border-bottom: 1px solid var(--line); }
[data-view="hl"] .l-txt { padding-left: 14px; }
[data-view="hl"] .l-open > .tier { margin-right: 14px; }
[data-view="hl"] .l-item:not([data-rare]) { display: none; }

/* ---------- the pop-up ---------- */
.l-modal { width: min(920px, calc(100% - 32px)); }
.l-modal .modal-b { max-height: min(72vh, 760px); overflow: auto; }
.l-big { margin: 0; }
.l-big img { display: block; width: 100%; height: auto; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; }
.l-big.is-zoomed img { cursor: zoom-out; }
.l-big figcaption { margin-top: 6px; font: 400 var(--fs-meta)/1.4 var(--font-mono); color: var(--muted); }
.l-where { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; font: 400 var(--fs-label)/1.4 var(--font-mono); color: var(--muted); }
.l-long { font-size: 16px; line-height: 1.6; max-width: 70ch; }
.l-keys { font-size: 13px; color: var(--muted); }

/* the picture opened to the full window (a click on the pop-up's picture) */
.l-zoom { position: fixed; inset: 0; z-index: calc(var(--z-sticky) + 100); display: grid; place-items: center; padding: 24px; background: rgb(5 8 14 / .94); cursor: zoom-out; }
.l-zoom img { max-width: 100%; max-height: 100%; border-radius: var(--r-ctl); }

/* ---------- closing band ---------- */
.l-cta { padding-top: 24px; }
.l-cta-in { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; padding: 32px; border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--surface); }
.l-cta h2 { font-size: var(--fs-h3); }
.l-cta .lede { margin-top: 8px; font-size: var(--fs-sm); }

/* ---------- narrower screens ---------- */
@media (max-width: 1100px) {
  .l-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-view="hl"] .l-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .l-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .l-grid { grid-template-columns: minmax(0, 1fr); }
  [data-view="hl"] .l-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .l-bar { position: static; gap: 8px; }          /* on a phone the bar scrolls away: the screen is for the cards */
  .l-plan { width: 100%; }
  .l-plan button { flex: 1; min-height: 34px; }
  [data-view="hl"] .l-open > .tier { grid-column: 1 / -1; justify-self: start; margin: 0 0 0 14px; }
  [data-view="hl"] .l-open { grid-template-columns: minmax(0, 1fr); }
  .l-cta-in { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .l-open, .topic::before { transition: none; }
  .l-open:hover { transform: none; }
}
