/* Training materials: the list page, the PDF pages and the video page. Colors come from styles.css. */
.mat-main .page-top{--title-size:clamp(1.4rem,calc((100vw - 6.5rem) / 8.1),3.25rem)}

/* Tabs: one per association (CBPq, USPA). A segmented switch; the open one is filled in yellow. */
.tab-list{display:flex;gap:.25rem;width:fit-content;max-width:100%;margin:0 0 1.25rem;padding:.25rem;border:1px solid var(--line);border-radius:999px;background:var(--panel)}
.tab-list[hidden]{display:none}
.tab-list [role="tab"]{
  font:inherit;font-weight:700;font-size:.95rem;color:var(--ink-soft);background:none;border:0;border-radius:999px;
  padding:.5rem 1.1rem;cursor:pointer;white-space:nowrap
}
.tab-list [role="tab"]:hover{color:var(--ink)}
.tab-list [role="tab"][aria-selected="true"]{background:var(--accent);color:var(--on-accent)}
.tab-list [role="tab"]:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
/* Without JavaScript both panels show; a little space between them. */
.tab-panel + .tab-panel{margin-top:2rem}
.tab-list:not([hidden]) ~ .tab-panel{margin-top:0}

/* List of materials */
.mat-list{list-style:none;margin:0;padding:0;display:grid;gap:.75rem}
.mat-card{
  display:flex;align-items:center;gap:1rem;padding:1rem 1.1rem;text-decoration:none;color:var(--ink);
  background:var(--panel);border:1px solid var(--line);border-radius:1.1rem;box-shadow:var(--shadow)
}
.mat-card:hover{border-color:var(--ink)}
.mat-card:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.mat-card-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.15rem}
/* Opens on another site (USPA). */
.mat-card-ext{flex:none;font-size:1.2rem;font-weight:700;color:var(--ink-soft)}
.mat-card-name{font-weight:700;font-size:1.1rem}
.mat-card-desc{font-size:.92rem;color:var(--ink-soft)}

/* PDF pages */
.mat-source{margin:0 0 1rem;font-size:.92rem;color:var(--ink-soft)}
.mat-source a{color:var(--ink);font-weight:700;text-decoration:none}
.mat-source a:hover{color:var(--accent-ink)}
.mat-source a:focus-visible,.mat-yt:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:.2rem}
.mat-latest{margin:-.4rem 0 1rem;color:var(--ink-soft)}
.mat-latest strong{color:var(--ink);text-transform:capitalize}
.mat-latest[hidden],.pdf-embed[hidden],.pdf-hint[hidden],.mat-button[hidden]{display:none}
.mat-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.25rem}
.mat-button{
  display:inline-block;font-weight:700;font-size:.95rem;color:var(--ink);text-decoration:none;
  border:2px solid var(--ink);border-radius:999px;padding:.45rem 1rem;background:var(--panel)
}
.mat-button:hover{border-color:var(--accent);color:var(--accent-ink)}
.mat-button:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.pdf-embed{background:var(--panel);border:1px solid var(--line);border-radius:.6rem;overflow:hidden}
.pdf-frame{display:block;width:100%;height:max(32rem,78vh);border:0;background:#fff}
.pdf-hint{margin:.6rem 0 0;font-size:.88rem;color:var(--ink-soft)}
.pdf-hint a{color:var(--ink);font-weight:700;text-decoration:none}
.pdf-hint a:hover{color:var(--accent-ink)}
.pdf-hint a:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:.2rem}

/* Video page */
.mat-levels{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin:-.75rem 0 .5rem}
.mat-levels-label{width:100%;font-size:.85rem;color:var(--ink-soft)}
.mat-levels a{
  display:inline-grid;place-items:center;min-width:2.75rem;height:2.75rem;padding:0 .6rem;border-radius:999px;
  font-weight:700;color:var(--ink);text-decoration:none;background:var(--panel);border:2px solid var(--line)
}
.mat-levels a:hover{border-color:var(--accent);color:var(--accent-ink)}
.mat-levels a:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
/* Land a jumped-to level just below the top, not under the browser's edge. */
.mat-video h2{scroll-margin-top:1rem}
.mat-video{margin-top:1.75rem}
.mat-video h2{font-family:var(--display);font-stretch:112%;font-weight:800;font-size:1.75rem;line-height:1.1;margin:0 0 .6rem}
.mat-video-frame{position:relative;aspect-ratio:16/9;background:#000;border-radius:.9rem;overflow:hidden}
.mat-video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.mat-yt{display:inline-block;margin-top:.45rem;font-size:.9rem;color:var(--ink-soft);font-weight:700;text-decoration:none}
.mat-yt:hover{color:var(--accent-ink)}
