/* STEM Lores — one stylesheet, four themes. The hub is neutral near-black; each channel page (and each channel's card on
   the hub) wears that channel's identity from docs/CHANNEL_IDENTITY.md: Math Lore black/white, Physics Lore night navy
   with cyan + amber, Chemistry Lore archive paper with ink + copper. */

.hub, .t-hub {
  --bg: #0B0B0E; --bg2: #13131A; --card: #15151C; --ink: #F4F1EA; --muted: #A3A3AD; --line: rgba(255, 255, 255, .09);
  --accent: #F4F1EA; --on-accent: #0B0B0E; --head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --radius: 14px;
  --brand-grad: linear-gradient(90deg, #F2F2F2, #62E3F0 55%, #D98A55);
}
.t-math {
  --bg: #0B0B0B; --bg2: #151515; --card: #121212; --ink: #F2F2F2; --muted: #9A9A9A; --line: rgba(255, 255, 255, .13);
  --accent: #FFFFFF; --on-accent: #0B0B0B; --head: "Inter", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
  --radius: 6px; --brand-grad: linear-gradient(90deg, #F2F2F2, #62E3F0 55%, #D98A55);
}
.t-physics {
  --bg: #0A1324; --bg2: #0F1D36; --card: #0D1930; --ink: #EAF4FA; --muted: #8FA7BF; --line: rgba(98, 227, 240, .17);
  --accent: #62E3F0; --accent2: #FFB347; --on-accent: #06111F; --head: "Barlow", "Bahnschrift", sans-serif;
  --body: "Barlow", "Bahnschrift", system-ui, sans-serif; --radius: 12px;
  --brand-grad: linear-gradient(90deg, #F2F2F2, #62E3F0 55%, #FFB347);
}
.t-chemistry {
  --bg: #F3EADA; --bg2: #FBF5EA; --card: #FBF5EA; --ink: #2A211A; --muted: #6E5F4E; --line: rgba(42, 33, 26, .2);
  --accent: #B4622D; --accent2: #2E7D74; --on-accent: #FBF5EA; --head: "Gelasio", Georgia, serif;
  --body: "Barlow", "Bahnschrift", system-ui, sans-serif; --radius: 14px;
  --brand-grad: linear-gradient(90deg, #2A211A, #2E7D74 55%, #B4622D);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.section { padding: 76px 0 8px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-head h2 { font: 700 clamp(26px, 3vw, 36px)/1.1 var(--head); margin: 0; letter-spacing: -.015em; }
.sec-head p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ── top bar ── */
.top {
  position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.4) blur(14px);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 19px/1 "Space Grotesk", sans-serif; color: var(--ink); white-space: nowrap; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand b { font-weight: 700; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.family { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.family a {
  display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 999px; white-space: nowrap;
  font: 500 14px/1 "Inter", sans-serif; color: var(--muted); transition: color .2s, background .2s;
}
.family a i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font: italic 500 15px/1 "STIX Two Text", serif;
}
.family a.f-math i { background: #0B0B0B; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.family a.f-physics i { background: #0F1D36; color: #62E3F0; box-shadow: inset 0 0 0 1px rgba(98, 227, 240, .4); }
.family a.f-chemistry i { background: #F3EADA; color: #2A211A; box-shadow: inset 0 0 0 1.5px #2A211A; font: 700 14px/1 "Gelasio", Georgia, serif; }
.family a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.family a.on { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }

/* ── buttons ── */
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 "Inter", sans-serif; transition: transform .15s, background .2s, box-shadow .2s, border-color .2s; cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }

/* ── hub hero ── */
.hero { position: relative; overflow: hidden; }
.hub-hero { padding: 96px 0 80px; }
.hub-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(38% 48% at 12% 28%, rgba(255, 255, 255, .07), transparent 70%),
    radial-gradient(34% 44% at 68% 18%, rgba(98, 227, 240, .14), transparent 70%),
    radial-gradient(34% 44% at 86% 62%, rgba(217, 138, 85, .14), transparent 70%);
  mask-image: linear-gradient(#000 65%, transparent);
}
.hub-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(70% 70% at 60% 40%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 20px; font: 600 13px/1 "Inter", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.hub-hero h1 { margin: 0; font: 700 clamp(42px, 6.2vw, 80px)/1.02 "Space Grotesk", sans-serif; letter-spacing: -.035em; }
.hub-hero .w { white-space: nowrap; }
.hub-hero .w.t-math { font: italic 500 1.08em/1 "STIX Two Text", serif; color: #fff; letter-spacing: 0; }
.hub-hero .w.t-physics { color: #62E3F0; font-family: "Barlow", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.hub-hero .w.t-chemistry { color: #E0915E; font-family: "Gelasio", Georgia, serif; letter-spacing: -.01em; }
.lede { margin: 24px 0 0; max-width: 56ch; font-size: clamp(17px, 1.35vw, 19px); color: var(--muted); }

.hero-tiles { position: relative; height: 460px; }
.tile {
  position: absolute; width: 214px; height: 276px; border-radius: 26px; background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center; box-shadow: 0 40px 70px -24px rgba(0, 0, 0, .75); animation: float 9s ease-in-out infinite;
}
.tile .cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font: 600 11px/1 "Inter", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.tile.t-math { left: 0; top: 112px; --rot: -9deg; }
.tile.t-physics { left: calc(50% - 107px); top: 14px; --rot: 3deg; animation-delay: -3s; z-index: 2; background: radial-gradient(120% 90% at 50% 20%, #13264A, #0A1324); }
.tile.t-chemistry { right: 0; top: 156px; --rot: 10deg; animation-delay: -6s; z-index: 3; border: 2px solid #2A211A; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--rot)); } 50% { transform: translateY(-14px) rotate(var(--rot)); } }

.art { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.art-math .glyph { font: italic 500 150px/1 "STIX Two Text", serif; color: #fff; margin-top: -30px; }
.art-math .digits { position: absolute; bottom: 52px; width: 150px; text-align: center; font: 500 11px/1.5 "Inter", sans-serif; letter-spacing: .14em; color: #8A8A8A; }
.art-physics svg { position: absolute; width: 200px; height: 200px; fill: none; stroke: #62E3F0; stroke-width: 1.4; opacity: .7; }
.art-physics .glyph { font: italic 500 110px/1 "STIX Two Text", serif; color: #EAF4FA; }
.orbiter { position: absolute; inset: 0; margin: auto; width: 176px; height: 176px; border-radius: 50%; animation: spin 7s linear infinite; }
.orbiter i { position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: #FFB347; box-shadow: 0 0 14px 2px rgba(255, 179, 71, .8); }
@keyframes spin { to { transform: rotate(360deg); } }

.etile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 150px; height: 172px; border: 6px solid #2A211A; border-radius: 18px; background: #FBF5EA; color: #2A211A; overflow: hidden;
}
.etile::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 14px; background: var(--band, #2E7D74); }
.etile .z { position: absolute; top: 20px; left: 12px; font: 600 18px/1 "Barlow", sans-serif; }
.etile .sym { font: 700 80px/1 "Gelasio", Georgia, serif; margin-top: 10px; }
.etile .nm { font: 500 15px/1.2 "Barlow", sans-serif; margin-top: 4px; }
.etile .wt { font: 500 12px/1.2 "Barlow", sans-serif; color: #6E5F4E; margin-top: 2px; }
.art-chemistry .etile { margin-top: -26px; }
.g-slate { --band: #3E5C7A; } .g-teal { --band: #2E7D74; } .g-copper { --band: #B4622D; } .g-gold { --band: #B8901F; } .g-plum { --band: #7A3E5C; }

/* ── hub: channel cards ── */
.chan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.chan {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 24px;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-family: var(--body);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}
.chan:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -34px color-mix(in srgb, var(--accent) 55%, transparent); }
.chan.t-physics { background: radial-gradient(130% 80% at 50% 0%, #11224A, #0A1324 70%); }
.chan.t-chemistry { border: 2px solid #2A211A; }
.chan-top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.chan h3 { margin: 0; font: 700 24px/1.1 var(--head); }
.chan h3 { text-transform: uppercase; letter-spacing: .02em; }
.handle { margin: 5px 0 0; font-size: 14px; color: var(--muted); }
.handle b { color: var(--ink); }
.chan .tagline { margin: 4px 0 0; font: 600 19px/1.3 var(--head); color: var(--accent); }
.chan.t-math .tagline { font-weight: 500; }
.chan .blurb { margin: 0; font-size: 15px; color: var(--muted); }
.chan-latest {
  position: relative; display: block; margin-top: auto; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: calc(var(--radius) + 2px); border: 1px solid var(--line); background: var(--bg2);
}
.chan-latest img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.chan-latest:hover img { transform: scale(1.04); }
.chan-latest .lbl {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px; color: #fff;
  font: 600 13px/1.35 "Inter", sans-serif; background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.chan-latest.empty { display: grid; place-items: center; color: var(--muted); font-weight: 600; font-size: 15px; border-style: dashed; }
.chan.t-chemistry .chan-latest { border: 2px solid #2A211A; }
.chan-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.chan .btn { padding: 11px 17px; font-size: 14px; }

/* ── video cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 32px 24px; }
.card, .short, .series { display: flex; flex-direction: column; gap: 12px; }
.thumb { position: relative; display: block; overflow: hidden; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--line); }
.card .thumb, .series .thumb { aspect-ratio: 16 / 9; }
.short .thumb { aspect-ratio: 9 / 16; border-radius: calc(var(--radius) + 4px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.card:hover .thumb img, .short:hover .thumb img, .series:hover .thumb img, .featured:hover .thumb img { transform: scale(1.05); }
.dur { position: absolute; right: 10px; bottom: 10px; padding: 5px 7px; border-radius: 6px; background: rgba(0, 0, 0, .8); color: #fff; font: 600 12px/1 "Inter", sans-serif; }
.play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; opacity: 0; transform: scale(.85);
  background: color-mix(in srgb, var(--accent) 94%, transparent); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: opacity .25s, transform .25s;
}
.play::after { content: ""; position: absolute; left: 23px; top: 18px; border-left: 17px solid var(--on-accent); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
a:hover .play, a:focus-visible .play { opacity: 1; transform: scale(1); }
.meta { display: flex; flex-direction: column; gap: 6px; }
.card .title { font: 600 18px/1.32 var(--head); }
.short .title { font: 600 14.5px/1.35 var(--head); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.date { font-size: 13px; color: var(--muted); }
.badge {
  align-self: flex-start; padding: 5px 9px; border-radius: 999px; background: var(--bg2); color: var(--accent);
  border: 1px solid var(--line); font: 600 10.5px/1 "Inter", sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
.badge.t-chemistry { border-color: #2A211A; }
.shorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 16px; }
.fresh { animation: pop .7s cubic-bezier(.2, .7, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.empty-note { margin: 0 0 8px; padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ── hub: how ── */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-grid > div { padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.how .num { font: 600 13px/1 "Space Grotesk", sans-serif; letter-spacing: .12em; color: var(--muted); }
.how h3 { margin: 16px 0 8px; font: 600 21px/1.2 var(--head); }
.how p { margin: 0; font-size: 15px; color: var(--muted); }

/* ── channel page hero ── */
.ch-hero { padding: 84px 0 72px; border-bottom: 1px solid var(--line); }
.ch-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.avatar.big { width: 84px; height: 84px; border-radius: 22px; }
.ch-hero h1 { margin: 22px 0 0; font: 800 clamp(50px, 7vw, 98px)/.95 var(--head); letter-spacing: -.02em; text-transform: uppercase; }
.ch-hero h1 .accent { color: var(--accent); }
.ch-hero .tagline { margin: 18px 0 0; font: 600 clamp(20px, 2vw, 25px)/1.3 var(--head); }
.cadence { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.cadence li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; background: color-mix(in srgb, var(--bg2) 75%, transparent); }
.stats { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 700; }
.stats i { margin: 0 9px; font-style: normal; opacity: .5; }
.featured {
  position: relative; display: block; overflow: hidden; border-radius: calc(var(--radius) + 8px); border: 1px solid var(--line);
  background: var(--card); box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .85);
}
.featured .thumb { border: 0; border-radius: 0; aspect-ratio: 16 / 9; }
.featured .meta { padding: 18px 22px 22px; }
.featured .kicker { font: 600 12px/1 "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.featured .title { font: 700 clamp(20px, 2vw, 27px)/1.25 var(--head); }
.featured .play { opacity: 1; transform: none; inset: auto auto 20px 20px; width: 64px; height: 64px; }
.featured .play::after { left: 25px; top: 20px; border-left-width: 19px; border-top-width: 12px; border-bottom-width: 12px; }
.featured:hover .play { transform: scale(1.08); }
.featured.empty { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 320px; padding: 40px 34px; border-style: dashed; }

/* series (playlists) */
.series-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 320px); gap: 22px; overflow-x: auto; padding: 14px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.series { scroll-snap-align: start; }
.series .thumb { overflow: hidden; box-shadow: 0 -7px 0 -3px color-mix(in srgb, var(--ink) 28%, transparent), 0 -13px 0 -7px color-mix(in srgb, var(--ink) 14%, transparent); }
.series .count {
  position: absolute; top: 0; right: 0; bottom: 0; width: 38%; display: grid; place-items: center; text-align: center;
  background: rgba(0, 0, 0, .74); color: #fff; font: 600 14px/1.3 "Inter", sans-serif; backdrop-filter: blur(3px);
}
.series .title { font: 600 16.5px/1.3 var(--head); }

/* more from the Lores */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.more-card {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 20px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); font-family: var(--body); transition: transform .25s, box-shadow .25s;
}
.more-card.t-physics { background: radial-gradient(130% 120% at 0% 0%, #11224A, #0A1324 70%); }
.more-card.t-chemistry { border: 2px solid #2A211A; }
.more-card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -30px color-mix(in srgb, var(--accent) 60%, transparent); }
.more-card .avatar { width: 56px; height: 56px; border-radius: 14px; }
.more-card b { display: block; font: 700 20px/1.2 var(--head); }
.more-card > span > span { font-size: 14px; color: var(--muted); }
.more-card .arrow { margin-left: auto; font-size: 22px; color: var(--accent); transition: transform .25s; }
.more-card:hover .arrow { transform: translateX(5px); }

/* ── channel signatures ── */
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-art .strip { position: absolute; top: 26px; right: max(20px, calc((100% - 1200px) / 2)); }

/* Math Lore: graph paper, the banner's line icons drawn on, π's digits drifting */
.t-math .ch-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .9; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 80% at 70% 40%, #000 25%, transparent 80%);
}
.math-art .icons { display: flex; align-items: center; gap: 26px; opacity: .85; }
.math-art svg { width: 42px; height: 42px; fill: none; stroke: #F2F2F2; stroke-width: 2.8; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw 2.4s ease forwards; }
.math-art svg:nth-child(2) { animation-delay: .3s; } .math-art svg:nth-child(3) { animation-delay: .6s; } .math-art svg:nth-child(4) { animation-delay: .9s; }
.math-art .aleph { font: italic 500 40px/1 "STIX Two Text", serif; color: #F2F2F2; }
.math-art .aleph sub { font-size: .45em; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pi-digits {
  position: absolute; left: 0; bottom: -.12em; white-space: nowrap; font: italic 500 190px/1 "STIX Two Text", serif;
  color: rgba(255, 255, 255, .035); animation: drift 90s linear infinite;
}
@keyframes drift { to { transform: translateX(-50%); } }

/* Physics Lore: starfield, a live wave, the atom with an amber particle, the constant card */
body.t-physics { background: radial-gradient(90% 60% at 50% 0%, #0F1D36, #0A1324 70%) fixed, #0A1324; }
.physics-art .stars {
  position: absolute; inset: 0; animation: twinkle 6s ease-in-out infinite alternate;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 22%, rgba(234, 244, 250, .7), transparent 70%), radial-gradient(1px 1px at 18% 64%, rgba(234, 244, 250, .5), transparent 70%),
    radial-gradient(1.2px 1.2px at 31% 12%, rgba(234, 244, 250, .6), transparent 70%), radial-gradient(1px 1px at 44% 82%, rgba(234, 244, 250, .45), transparent 70%),
    radial-gradient(1.6px 1.6px at 57% 30%, rgba(98, 227, 240, .7), transparent 70%), radial-gradient(1px 1px at 66% 72%, rgba(234, 244, 250, .5), transparent 70%),
    radial-gradient(1.3px 1.3px at 79% 16%, rgba(234, 244, 250, .6), transparent 70%), radial-gradient(1px 1px at 88% 58%, rgba(255, 179, 71, .7), transparent 70%),
    radial-gradient(1.2px 1.2px at 95% 88%, rgba(234, 244, 250, .5), transparent 70%), radial-gradient(1px 1px at 3% 90%, rgba(234, 244, 250, .5), transparent 70%);
}
@keyframes twinkle { to { opacity: .55; } }
.physics-art .wave { position: absolute; left: 0; bottom: 14px; width: 100%; height: 70px; fill: none; stroke: #62E3F0; stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: .26; stroke-dasharray: 14 10; animation: flow 3s linear infinite; }
.physics-art .wave path { vector-effect: non-scaling-stroke; }
@keyframes flow { to { stroke-dashoffset: -48; } }
.physics-art .atom { position: absolute; right: -150px; top: 40px; width: 460px; height: 460px; opacity: .22; }
.physics-art .atom svg { width: 100%; height: 100%; fill: none; stroke: #62E3F0; stroke-width: .8; }
.physics-art .atom .orbiter { width: 380px; height: 380px; animation-duration: 12s; }
.physics-art .atom .orbiter i { width: 12px; height: 12px; }
.physics-art .nucleus { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; background: #FFB347; box-shadow: 0 0 22px #FFB347; }
.constant { display: flex; flex-direction: column; align-items: flex-end; }
.constant .val { font: italic 500 40px/1 "STIX Two Text", serif; color: #FFB347; }
.constant .nm { margin-top: 4px; font: 600 11px/1 "Barlow", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #8FA7BF; }
.t-physics .ch-hero h1, .t-physics .chan h3 { font-weight: 700; letter-spacing: .01em; }
.t-physics .card:hover .thumb, .t-physics .short:hover .thumb { box-shadow: 0 0 0 1px #62E3F0, 0 18px 44px -18px rgba(98, 227, 240, .55); }

/* Chemistry Lore: archive paper with grain, ink borders, element tiles, a faint benzene ring */
body.t-chemistry {
  background-color: #F3EADA;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16 0 0 0 0 .13 0 0 0 0 .1 0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.t-chemistry .top { background: color-mix(in srgb, #F3EADA 86%, transparent); }
.chemistry-art .hex { position: absolute; right: -60px; bottom: -90px; width: 420px; height: 420px; fill: none; stroke: #2A211A; stroke-width: 3; opacity: .07; animation: spin 140s linear infinite; }
.chemistry-art .etiles { display: flex; gap: 10px; }
.chemistry-art .etiles .etile { width: 60px; height: 68px; border-width: 3px; border-radius: 9px; }
.chemistry-art .etiles .etile::before { height: 6px; }
.chemistry-art .etiles .z { top: 9px; left: 6px; font-size: 9px; }
.chemistry-art .etiles .sym { font-size: 26px; margin-top: 6px; }
.chemistry-art .etiles .nm { font-size: 8px; margin-top: 2px; }
.t-chemistry .ch-hero h1 { font-weight: 700; letter-spacing: 0; }
.t-chemistry .thumb, .t-chemistry .featured { border: 2px solid #2A211A; }
.t-chemistry .featured { box-shadow: 8px 8px 0 #2A211A; }
.t-chemistry .featured .thumb { border: 0; border-bottom: 2px solid #2A211A; }
.t-chemistry .card:hover .thumb, .t-chemistry .short:hover .thumb { box-shadow: 5px 5px 0 #2A211A; }
.t-chemistry .thumb { transition: box-shadow .2s; }
.t-chemistry .btn.ghost { border: 2px solid #2A211A; }
.t-chemistry .cadence li { border-color: #2A211A; }
.t-chemistry .series .count { background: rgba(42, 33, 26, .82); }

/* ── card links (thumbnail plays, title opens the story) ── */
.meta a.title { transition: color .2s; }
.meta a.title:hover { color: var(--accent); }
.story-link { align-self: flex-start; margin-top: 2px; font: 600 13px/1.2 "Inter", sans-serif; color: var(--accent); }
.story-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.more-link { font: 600 14px/1 "Inter", sans-serif; color: var(--accent); }
.more-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.featured .story-link { margin-top: 4px; font-size: 14px; }

/* ── story cards ── */
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.story-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: calc(var(--radius) + 6px); background: var(--bg);
  color: var(--ink); border: 1px solid var(--line); font-family: var(--body); transition: transform .25s, box-shadow .25s;
}
.story-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -34px color-mix(in srgb, var(--accent) 55%, transparent); }
.story-card .thumb, .t-chemistry .story-card .thumb { aspect-ratio: 16 / 9; border: 0; border-radius: 0; }
.story-card .meta { padding: 16px 18px 20px; gap: 8px; }
.story-card .kicker { font: 600 11.5px/1 "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.story-card .title { font: 700 19px/1.3 var(--head); }
.story-card .dek { font-size: 14.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-card.t-physics { background: radial-gradient(130% 80% at 50% 0%, #11224A, #0A1324 70%); }
.story-card.t-chemistry { border: 2px solid #2A211A; }
.story-card.t-chemistry .thumb { border-bottom: 2px solid #2A211A; }
.story-index h1 { margin: 10px 0 0; font: 700 clamp(40px, 5.4vw, 66px)/1.04 var(--head); letter-spacing: -.02em; }
.story-index .lede { margin-bottom: 40px; }

/* ── story page ── */
.wrap-narrow { width: min(720px, 100% - 40px); margin-inline: auto; }
.story-head { width: min(880px, 100% - 40px); padding: 54px 0 30px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 600 12.5px/1 "Inter", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.story-head .kicker { margin: 28px 0 0; font: 600 13px/1 "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.story-head h1 { margin: 14px 0 0; font: 700 clamp(34px, 5vw, 60px)/1.07 var(--head); letter-spacing: -.02em; }
.t-chemistry .story-head h1 { letter-spacing: -.005em; }
.story-head .dek { margin: 18px 0 0; max-width: 46ch; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45; color: var(--muted); }
.byline { margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.byline a { color: var(--accent); }
.story-video { width: min(980px, 100% - 40px); margin: 8px auto 0; }
.story-video .frame {
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: calc(var(--radius) + 6px); background: #000; border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.t-chemistry .story-video .frame { border: 2px solid #2A211A; box-shadow: 8px 8px 0 #2A211A; }
.story-video.vertical { width: min(360px, 100% - 40px); }
.story-video.vertical .frame { aspect-ratio: 9 / 16; }
.story-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.story-video figcaption { margin-top: 14px; text-align: center; font-size: 13.5px; color: var(--muted); }
.story-video figcaption a { color: var(--accent); }

.prose { padding: 44px 0 8px; font-size: 19px; line-height: 1.72; }
.t-chemistry .prose, .t-physics .prose { font-size: 19.5px; }
.prose p { margin: 0 0 1.15em; }
.prose > p:first-child::first-letter { float: left; margin: .07em .12em 0 0; font: 700 3.5em/.86 var(--head); color: var(--accent); }
.prose h2 { margin: 1.9em 0 .6em; font: 700 clamp(25px, 2.6vw, 31px)/1.2 var(--head); letter-spacing: -.01em; }
.prose h3 { margin: 1.6em 0 .5em; font: 700 21px/1.3 var(--head); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--line); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--accent); font: italic 500 1.16em/1.5 var(--head); }
.t-math .prose blockquote, .t-physics .prose blockquote { font-family: "STIX Two Text", Georgia, serif; }
.prose blockquote p:last-child { margin: 0; }
.prose blockquote cite { display: block; margin-top: 10px; font: normal 600 13px/1.3 "Inter", sans-serif; letter-spacing: .06em; color: var(--muted); }
.prose .fact { margin: 1.8em 0; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg2); font-size: 17px; line-height: 1.6; }
.t-chemistry .prose .fact { border: 2px solid #2A211A; }
.prose .fact .label { display: block; margin-bottom: 8px; font: 600 12px/1 "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.prose .number { margin: 1.8em 0; text-align: center; }
.prose .number .val { display: block; font: italic 500 clamp(46px, 7vw, 76px)/1.05 "STIX Two Text", serif; color: var(--accent2, var(--accent)); }
.t-chemistry .prose .number .val { font: 700 clamp(46px, 7vw, 76px)/1.05 "Gelasio", Georgia, serif; color: var(--accent); }
.prose .number .cap { display: block; margin-top: 10px; font: 600 12px/1.4 "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.prose .math { font-family: "STIX Two Text", "Cambria Math", serif; font-style: italic; }
.prose sup, .prose sub { line-height: 0; }

.story-end { padding: 26px 0 0; }
.watch-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 22px 24px; border-radius: calc(var(--radius) + 6px); border: 1px solid var(--line); background: var(--bg2); }
.t-chemistry .watch-cta { border: 2px solid #2A211A; }
.watch-cta > div { display: flex; flex: 1 1 240px; flex-direction: column; gap: 4px; }
.watch-cta b { font: 700 20px/1.2 var(--head); }
.watch-cta span { font-size: 14px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; }
.share span { margin-right: 6px; font: 600 12px/1 "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.share a, .share button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 600 13px/1 "Inter", sans-serif; cursor: pointer; transition: background .2s;
}
.share a:hover, .share button:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.sources { margin-top: 38px; }
.sources h2 { margin: 0 0 12px; font: 700 20px/1.2 var(--head); }
.sources ol { margin: 0; padding-left: 1.3em; font-size: 15px; line-height: 1.55; color: var(--muted); }
.sources li { margin: .45em 0; }
.sources a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
@media (max-width: 680px) {
  .prose { font-size: 18px; }
  .story-head { padding-top: 36px; }
}

/* ── player ── */
#player { width: min(1100px, 92vw); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible; }
#player::backdrop { background: rgba(5, 6, 10, .84); backdrop-filter: blur(6px); }
#player .frame { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #000; box-shadow: 0 40px 90px rgba(0, 0, 0, .6); }
#player.vertical { width: min(420px, 92vw, calc(82vh * 9 / 16)); }
#player.vertical .frame { aspect-ratio: 9 / 16; }
#player iframe { display: block; width: 100%; height: 100%; border: 0; }
#player .bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
#player .open { color: #fff; font: 600 14px/1 "Inter", sans-serif; opacity: .85; }
#player .open:hover { opacity: 1; }
#player .close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px; cursor: pointer; }
#player .close:hover { background: rgba(255, 255, 255, .24); }

/* ── footer ── */
.foot { margin-top: 110px; padding: 52px 0 30px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 55%, var(--bg)); }
.t-chemistry .foot { background: #EDE2CE; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; }
.foot p { margin: 16px 0 0; font-size: 14.5px; max-width: 44ch; }
.foot h3 { margin: 6px 0 16px; font: 600 12px/1 "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.foot nav a, .foot-grid > div > a[href^="mailto"] { display: block; margin: 0 0 9px; font-size: 15px; }
.foot nav a:hover, .foot a[href^="mailto"]:hover { color: var(--accent); }
.fine { margin-top: 40px; font-size: 13px; color: var(--muted); }
.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.notfound h1 { margin: 0; font: 700 clamp(44px, 6vw, 72px)/1 "Space Grotesk", sans-serif; letter-spacing: -.03em; }

/* ── responsive ── */
@media (max-width: 1080px) {
  .hero-grid, .ch-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-tiles { width: min(520px, 100%); height: 400px; margin-inline: auto; }
  .chan-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .how-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .hero-art .strip { display: none; }
  .physics-art .atom { opacity: .14; }
}
@media (max-width: 680px) {
  .family a { padding: 6px; }
  .family a span { display: none; }
  .brand { font-size: 17px; }
  .hub-hero { padding: 64px 0 56px; }
  .ch-hero { padding: 56px 0 52px; }
  .hero-tiles { width: calc(100% - 24px); height: 290px; }
  .tile { width: 146px; height: 190px; border-radius: 18px; }
  .tile.t-math { top: 74px; } .tile.t-physics { top: 4px; left: calc(50% - 73px); } .tile.t-chemistry { top: 96px; }
  .art-math .glyph { font-size: 88px; margin-top: -24px; } .art-math .digits { bottom: 36px; width: 104px; font-size: 8px; }
  .art-physics svg { width: 130px; height: 130px; } .art-physics .glyph { font-size: 70px; } .orbiter { width: 114px; height: 114px; }
  .etile { width: 96px; height: 112px; border-width: 4px; border-radius: 13px; } .etile::before { height: 10px; }
  .etile .sym { font-size: 50px; } .etile .z { top: 13px; left: 8px; font-size: 12px; } .etile .nm { font-size: 12px; } .etile .wt { font-size: 10px; }
  .featured .play { inset: auto auto 12px 12px; width: 46px; height: 46px; }
  .featured .play::after { left: 18px; top: 14px; border-left-width: 14px; border-top-width: 9px; border-bottom-width: 9px; }
  .tile .cap { display: none; }
  .physics-art .wave { width: 300%; }
  .grid { grid-template-columns: 1fr; }
  .shorts { grid-template-columns: repeat(2, 1fr); }
  .more-grid, .foot-grid { grid-template-columns: 1fr; }
  .section { padding-top: 58px; }
  .pi-digits { font-size: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .math-art svg { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}
