/* VLPremier Pro · tutorials page layout + page components. DESIGN PROTOTYPE ONLY.
   Page components: .crop (screenshot crop, same rule as features.css), .tier, .topic filter buttons, .path, .tut lesson card. */
.tier { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; border: 1px solid rgb(79 163 245 / .45); background: rgb(79 163 245 / .1); font: 500 var(--fs-meta)/1 var(--font-mono); font-style: normal; color: var(--accent-bright); }

/* hero with live search */
.t-hero { padding-top: calc(var(--nav-h) + 64px); padding-bottom: 56px; overflow: clip; }
.t-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.t-hero h1 { margin-bottom: 22px; }
.t-hero h1 .hi { color: var(--accent-bright); }
.t-search .search { position: relative; }
.t-search .input { padding-right: 48px; }
.t-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); pointer-events: none; }
.t-search .search-meta { margin-top: 0; }

/* featured path */
.t-path-sec { padding-top: 8px; padding-bottom: 72px; }
.path { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 5fr); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-panel); background: var(--surface); overflow: hidden; }
.path-copy { padding: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.path-copy h2 { font-size: var(--fs-h3); }
.path-copy p { color: var(--muted); font-size: var(--fs-sm); max-width: 40ch; }
.path-copy .btn { margin-top: auto; }
.path-shot { height: 100%; aspect-ratio: auto; min-height: 240px; border-inline: 1px solid var(--line); }
.path-list { list-style: none; margin: 0; padding: 20px 28px; display: grid; align-content: center; }
.path-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.path-list .n { font: 500 var(--fs-label)/1 var(--font-mono); color: var(--accent-bright); }
.path-list b { font-weight: 600; }
.path-list .d { font: 400 var(--fs-meta)/1 var(--font-mono); color: var(--muted); }
.path-list .total { display: block; border: 0; padding-top: 14px; font: 400 var(--fs-meta)/1.5 var(--font-mono); color: var(--muted); }

/* filters */
.t-tools { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-end; justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { position: relative; min-height: 40px; padding: 0 14px; 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::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; }
.t-level { width: 200px; }
.lib-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; margin: 32px 0 24px; }
.lib-head h2 { font-size: clamp(24px, 2.4vw, 30px); }

/* lesson cards */
.lib { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.lib > .empty { grid-column: 1 / -1; }
.empty-act { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; margin-top: 16px; }
.tut { position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; border-radius: var(--r-panel); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color var(--t-tap), transform var(--t-tap) var(--ease); }
.tut[hidden] { display: none; }
.tut:hover, .tut:focus-within { border-color: var(--line-strong); transform: translateY(-1px); }
.thumb { position: relative; border-bottom: 1px solid var(--line); background: var(--panel); }
.thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: repeating-linear-gradient(90deg, var(--accent-bright) 0 1px, transparent 1px 12px); opacity: 0; transition: opacity var(--t-tap); }
.tut:hover .thumb::after { opacity: 1; }
.dur { position: absolute; top: 10px; right: 10px; padding: 4px 7px; border-radius: 4px; background: rgb(9 13 23 / .88); font: 500 var(--fs-meta)/1 var(--font-mono); }
.tut .body { display: flex; flex-direction: column; padding: 16px 18px 18px; }
.tut .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tut h3 { margin-top: 12px; font-size: 18px; line-height: 1.2; }
.tut .body > p:not([class]) { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.tfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 14px; font: 400 var(--fs-meta)/1 var(--font-mono); color: var(--muted); }
.tut .body > p.meta + h3 + p { margin-bottom: 4px; }
.watch { min-height: 32px; padding: 0 2px; border: 0; background: none; color: var(--text); font: 600 14px/1 var(--font-display); cursor: pointer; transition: color var(--t-tap); }
.watch::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-panel); }   /* whole card opens the lesson */
.tut:hover .watch { color: var(--accent-bright); }
.watch:focus-visible { outline: none; }
.watch:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
/* licence thumb (no screenshot exists for the account flow) */
.lic { display: grid; align-content: center; gap: 6px; aspect-ratio: 16 / 9; padding: 14px 16px; font: 400 var(--fs-micro)/1.3 var(--font-mono); color: var(--panel-text); }
.lic span { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: var(--r-clip); background: var(--panel-2); }
.lic b { font-weight: 500; color: var(--clip-a); }
.lic .off b { color: var(--panel-dim); }

@media (max-width: 1180px) {
  .lib { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 16 lessons on 3 columns: the first one runs as a wide card so the grid has no orphan */
  .lib > .tut:first-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; }
  .lib > .tut:first-child .thumb { border-bottom: 0; border-right: 1px solid var(--line); }
  .lib > .tut:first-child .body { padding: 28px; }
  .lib > .tut:first-child h3 { font-size: var(--fs-h3); }
  .path { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .path-shot { display: none; }
}
@media (max-width: 860px) {
  .t-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib > .tut:first-child { grid-column: auto; grid-template-columns: none; grid-template-rows: auto 1fr; }
  .lib > .tut:first-child .thumb { border-right: 0; border-bottom: 1px solid var(--line); }
  .lib > .tut:first-child .body { padding: 16px 18px 18px; }
  .lib > .tut:first-child h3 { font-size: 18px; }
  .path { grid-template-columns: minmax(0, 1fr); }
  .path-list { border-top: 1px solid var(--line); }
}
@media (max-width: 719px) {
  /* phones: lessons become compact rows so 17 cards are not 17 screens */
  .lib { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tut { grid-template-columns: 128px minmax(0, 1fr); grid-template-rows: auto; }
  .thumb { border-bottom: 0; border-right: 1px solid var(--line); align-self: stretch; display: grid; align-content: center; }
  .thumb .dur { top: auto; bottom: 6px; right: 6px; padding: 3px 5px; }
  .tut .body { padding: 12px 14px; }
  .tut .meta .badge:nth-child(2) { display: none; }
  .tut h3 { margin-top: 8px; font-size: 16px; }
  .tut .body > p:not([class]) { display: none; }
  .tfoot { padding-top: 8px; }
  .topics { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; }
  .topics::-webkit-scrollbar { display: none; }
  .topic { flex: none; }
  .t-level { width: 100%; }
  .t-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .topics { min-width: 0; }
  .lic { padding: 8px; gap: 3px; }
  .lic span { padding: 2px 4px; }
  .lic span:nth-child(3) { display: none; }
}
@media (max-width: 640px) {
  .t-hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 40px; }
  .path-copy { padding: 24px 20px; }
  .path-list { padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) { .topic::before { transform: none; } }
