/* learning.redrive.app: same colours and fonts as the plotter (public/assets/css/app.css). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url("fonts/baloo-2-latin-800-normal.woff2") format("woff2"); }

:root {
    --bg: #f6f3ec; --card: #fff; --line: #e4dcca; --text: #1f1a14; --ink: #101010; --muted: #5c564c;
    --accent: #ffbe00; --accent-soft: #f3e4b8; --on-accent-soft: #5a4200; --selected: #fdf1cc;
    --radius: 16px; --radius-sm: 12px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Baloo 2", "Inter", system-ui, sans-serif;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #14120f; --card: #1f1c18; --line: #37312a; --text: #f6f3ec; --ink: #f6f3ec; --muted: #b5ad9f; --accent-soft: #3a3020; --on-accent-soft: #f3e4b8; --selected: #2e2717; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: .5rem; }
.wordmark { font: 800 1.7rem/1 var(--font-display); color: var(--ink); }
.wordmark span { color: var(--accent); }
.brand-sub { color: var(--muted); font-weight: 600; }
.top nav { display: flex; gap: 1.2rem; font-weight: 600; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

main { max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 48px; }
h1 { font: 800 clamp(2rem, 4vw, 2.8rem)/1.1 var(--font-display); margin: .2rem 0 .6rem; color: var(--ink); }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46rem; margin: 0 0 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.crumb { margin: 0; color: var(--muted); font-size: .95rem; }

.player { border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 10px 30px rgb(31 26 20 / 12%); }
.player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }

.below { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 800px) { .below { grid-template-columns: 1fr; } .top nav a:first-child { display: none; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card ul { padding-left: 1.1rem; margin: .2rem 0 1rem; }

.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chapters button { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; display: flex; gap: .8rem; }
.chapters button:hover { background: var(--selected); }
.chapters button.is-current { background: var(--accent-soft); color: var(--on-accent-soft); font-weight: 600; }
.chapters .t { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2em; }
.chapters .is-current .t { color: inherit; }

.series { margin-top: 2rem; }
.grid { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-weight: 600; }
.tile a { display: block; height: 100%; text-decoration: none; padding-bottom: 16px; }
.tile a:hover { box-shadow: inset 0 -4px 0 var(--accent); }
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 12px; background: var(--accent-soft); }
.tile-title { display: flex; gap: .55rem; padding: 0 16px; line-height: 1.35; }
.tile-title .id { color: var(--muted); font-variant-numeric: tabular-nums; }
.soon { margin-top: 14px; color: var(--muted); }
.soon summary { cursor: pointer; font-weight: 600; color: var(--text); }
.soon ul { columns: 2 18rem; padding-left: 0; list-style: none; margin: .6rem 0 0; }
.soon li { padding: 3px 0; break-inside: avoid; }
.soon .id { display: inline-block; min-width: 2.6em; font-variant-numeric: tabular-nums; }

.foot { border-top: 1px solid var(--line); padding: 20px clamp(16px, 4vw, 40px); color: var(--muted); font-size: .92rem; }
.foot p { margin: .2rem 0; }
