@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Geist:wght@400;500;600;700;800&display=swap');

:root {
  --night: #080f23;
  --surface: #101a32;
  --cream: #f8f6f0;
  --ink: #11192c;
  --pale: #f4f5fa;
  --dim: #b8c2d6;
  --muted: #535a69;
  --orange: #ff9f49;
  --blue: #6cafff;
  --hairline: #29334c;
  --paper-line: #d9d9d4;
  --max-width: 1240px;
  --gutter: clamp(20px, 5.1vw, 78px);
  --display: 'Geist', 'Arial', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  color: var(--pale);
  background: var(--night);
  font-family: var(--body);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.045em; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #d86c26; outline-offset: 5px; border-radius: 3px; }
.shell { max-width: calc(var(--max-width) + 2 * var(--gutter)); padding-inline: var(--gutter); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 3; transform: translateY(-200%); padding: 12px 16px; background: white; color: var(--ink); }
.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--hairline); }
.nav-shell { min-height: 77px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-family: var(--display); font-size: 25px; letter-spacing: -.064em; font-weight: 800; line-height: 1; }
.brand-mark { position: relative; display: inline-flex; align-items: center; width: 29px; height: 25px; isolation: isolate; }
.brand-mark::before, .brand-mark::after { content: ""; width: 15px; height: 17px; position: absolute; clip-path: polygon(50% 0, 96% 24%, 96% 75%, 50% 100%, 4% 74%, 4% 23%); }
.brand-mark::before { left: 1px; top: 3px; background: conic-gradient(from 28deg at 50% 49%, #ffba62, #fb8a2f 35%, #b6491f 61%, #f87e2e 62%, #ffd594); transform: rotate(-13deg); z-index: 1; }
.brand-mark::after { right: 0; bottom: 3px; background: conic-gradient(from 38deg at 50% 43%, #6fbfff, #3178ff 35%, #234ac0 60%, #376bdb 61%, #82cbff); transform: rotate(12deg); }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 42px); }
.nav-link { position: relative; display: flex; min-height: 44px; align-items: center; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--dim); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--pale); }
.nav-link[aria-current="page"]::after { position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; background: var(--orange); content: ""; }
.video-link { justify-self: end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 17px; border: 1px solid transparent; border-radius: 7px; font-weight: 700; font-size: 14px; line-height: 1.25; transition: background .16s, border-color .16s, color .16s; white-space: nowrap; }
.button-outline { border-color: #43506a; color: var(--pale); min-height: 42px; }
.button-outline:hover { border-color: var(--dim); background: var(--surface); }
.button-primary { color: var(--ink); background: var(--cream); }
.button-primary:hover { background: #ffd9b5; }
.link-arrow { display: inline-block; width: 14px; height: 14px; flex: none; font-size: 0; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 12.5 12 4m0 0H5m7 0v7' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.arrow-right { transform: rotate(45deg); }
.arrow-down { transform: rotate(135deg); }
.play-icon { width: 12px; height: 13px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); display: inline-block; flex: none; }
.video-icon { position: relative; display: inline-grid; place-items: center; width: 17px; height: 13px; background: currentColor; border-radius: 3px; flex: none; }
.video-icon::before { content: ""; width: 6px; height: 7px; background: var(--night); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.hero { overflow: hidden; }
.hero-layout { min-height: clamp(490px, 45vw, 640px); display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1fr); align-items: center; position: relative; }
.hero-copy { position: relative; z-index: 1; padding-block: 72px 78px; }
.eyebrow { font-weight: 800; font-size: 11px; letter-spacing: .16em; line-height: 1.5; text-transform: uppercase; }
.hero h1 { max-width: 620px; font-size: clamp(52px, 6.25vw, 92px); font-weight: 800; letter-spacing: -.077em; line-height: .98; }
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 .accent { color: var(--orange); }
.hero-description { max-width: 365px; margin-top: 22px; color: var(--dim); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.57; }
.hero .button { margin-top: 27px; }
.hero-art { width: min(61vw, 865px); justify-self: center; position: relative; left: -1.7%; }
.hero-art img { width: 100%; height: auto; }
.hero-art { isolation: isolate; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 34% 46% at var(--glow-x, 50%) var(--glow-y, 40%),
    var(--glow-tint, #528cff), transparent);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .3s ease-out;
}
.hero-art.is-lit::before { opacity: .37; }
.hero-facets, .hero-facet { position: absolute; inset: 0; pointer-events: none; }
.hero-facets {
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .2s ease-out;
  -webkit-mask-image: radial-gradient(circle clamp(95px, 12vw, 160px) at var(--glow-x, 50%) var(--glow-y, 40%), #000 8%, #0009 48%, transparent 100%);
  mask-image: radial-gradient(circle clamp(95px, 12vw, 160px) at var(--glow-x, 50%) var(--glow-y, 40%), #000 8%, #0009 48%, transparent 100%);
}
.hero-art.is-lit .hero-facets { opacity: 1; }
.hero-facet {
  opacity: 0;
  background: linear-gradient(130deg, var(--facet-colour) 5%, #fff 43%, var(--facet-colour) 70%);
}
.facet-demo {
  position: absolute;
  z-index: 1;
  bottom: 3%;
  right: max(var(--gutter), 7%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #637390;
  border-radius: 7px;
  background: #080f23e8;
  color: #e2e8f4;
  font: 600 .875rem var(--body);
  cursor: pointer;
}
.facet-demo:hover { border-color: var(--orange); color: white; }
.facet-demo:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
  .hero-facets, .hero-art::before, .facet-demo { display: none; }
}

.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night), transparent 17%, transparent 90%, var(--night)), linear-gradient(180deg, var(--night), transparent 10%, transparent 83%, var(--night)); pointer-events: none; }

.paper { background: var(--cream); color: var(--ink); }
.section { padding-block: clamp(56px, 7vw, 100px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 34px; }
.section-heading .eyebrow, .page-intro .eyebrow { margin-bottom: 10px; }
.paper .eyebrow { color: #8c3e13; }
.section-heading h2, .band h2 { font-size: clamp(34px, 4.4vw, 61px); line-height: 1; font-weight: 800; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 800; width: max-content; max-width: 100%; }
.text-link > span:first-child { text-decoration: underline; text-underline-offset: .24em; text-decoration-thickness: 1px; }
.text-link:hover { color: #a54b1a; }
#episodes, #games, #apps { scroll-margin-top: 18px; }
.episode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 4vw, 56px); }
.episode { display: flex; flex-direction: column; min-width: 0; }
.episode-art { position: relative; overflow: hidden; display: block; background: #ded9e3; border-radius: 8px; aspect-ratio: 16 / 9; }
.episode-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease-out; }
.episode-art:hover img { transform: scale(1.025); }
.episode-content { padding-block: 19px 0; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-weight: 700; font-size: 12px; line-height: 1.5; }
.meta span[aria-hidden] { color: #89512a; }
.episode h3 { margin-top: 7px; font-weight: 800; font-size: clamp(24px, 2.6vw, 35px); line-height: 1.1; max-width: 19em; }
.episode p { max-width: 41ch; margin-top: 11px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.episode .text-link { margin-top: auto; padding-top: 5px; }
.band { background: var(--surface); border-top: 1px solid var(--hairline); }
.band-layout { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding-block: clamp(42px, 6vw, 78px); }
.band .eyebrow { color: var(--orange); margin-bottom: 9px; }
.band p:not(.eyebrow) { color: var(--dim); max-width: 50ch; margin-top: 14px; line-height: 1.6; font-size: 16px; }

.page-intro { padding-block: clamp(55px, 7.4vw, 104px) clamp(48px, 6vw, 83px); }
.page-intro .eyebrow { color: var(--orange); }
.page-intro h1 { font-weight: 800; font-size: clamp(54px, 8vw, 112px); letter-spacing: -.076em; line-height: .96; max-width: 16ch; }
.page-intro p:not(.eyebrow) { font-size: clamp(17px, 2vw, 22px); line-height: 1.55; color: var(--dim); margin-top: 19px; max-width: 43ch; }
.project-jumps { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.project-section + .project-section { margin-top: clamp(52px, 7vw, 96px); padding-top: clamp(42px, 6vw, 78px); border-top: 1px solid var(--paper-line); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 32px); }
.project-grid.apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--paper-line); border-radius: 9px; background: #fffefa; }
.project-image { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; background: var(--night); }
.project-image.dive { object-position: center 45%; }
.project-body { display: flex; flex-direction: column; flex: 1; align-items: start; padding: 19px clamp(16px, 2vw, 25px) 13px; }
.project-body h3 { margin-top: 5px; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.05; overflow-wrap: anywhere; }
.project-body p { margin-top: 9px; color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 8px; }
.project-body .text-link { margin-top: auto; }
.app-card .project-body { padding-block: 27px 20px; }
.app-card { border-top: 3px solid #2f65b4; }
.app-card:last-child { border-top-color: #c95c2a; }

.about-intro {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(22px, 3vw, 45px);
  align-items: center;
  padding-block: clamp(48px, 6vw, 85px);
}
.about-copy { position: relative; z-index: 1; }
.about-copy h1 { font-size: clamp(46px, 5.5vw, 79px); line-height: .99; letter-spacing: -.065em; }
.about-copy h1 span { color: var(--orange); }
.about-copy p { margin-top: 21px; color: var(--dim); font-size: 1.0625rem; line-height: 1.65; max-width: 40ch; }
.about-copy p + p { margin-top: 14px; }
.about-art { position: relative; }
.about-art img { width: 100%; border-radius: 9px; height: auto; }
.hosts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 51px); }
.host-card { padding-top: 22px; border-top: 3px solid #c95c2a; }
.host-card:nth-child(2) { border-top-color: #2f65b4; }
.host-card h3 { font-size: clamp(27px, 3.4vw, 45px); line-height: 1; margin-top: 10px; }
.host-card p { color: var(--muted); margin-top: 16px; font-size: 1.0625rem; line-height: 1.65; max-width: 43ch; }
.host-card .host-field { font-size: .875rem; color: #92401b; font-weight: 700; margin-top: 0; }
.host-card:nth-child(2) .host-field { color: #245b9c; }
.about-show h2 { font-size: clamp(34px, 4.4vw, 61px); line-height: 1; }
.show-topics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 38px; }
.show-topics h3 { font-size: clamp(22px, 2.2vw, 29px); line-height: 1.1; letter-spacing: -.035em; }
.show-topics p { margin-top: 14px; color: var(--dim); font-size: 1rem; line-height: 1.65; }
.show-topics .text-link { margin-top: 14px; }
.subscribe-band { background: #13213b; border-block: 1px solid #394761; }
.subscribe-layout { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; padding-block: clamp(36px, 5vw, 63px); }
.subscribe-layout h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 700; line-height: 1.07; letter-spacing: -.04em; }
.subscribe-layout p { font-size: 1rem; line-height: 1.6; color: #c5cee0; margin-top: 12px; max-width: 53ch; }
.button-subscribe { color: #151d31; background: #ffaf62; font-size: .9375rem; min-height: 50px; }
.button-subscribe:hover { background: #ffc88f; }
.button-subscribe .video-icon::before { background: #ffaf62; }
.button-subscribe:hover .video-icon::before { background: #ffc88f; }

.site-footer { border-top: 1px solid var(--hairline); }
.footer-layout { padding-block: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 30px; }
.site-footer .wordmark { font-size: 22px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 22px; color: var(--dim); font-size: 14px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--orange); }

@media (max-width: 900px) {
  .hero-layout { grid-template-columns: minmax(0, .94fr) minmax(0, 1fr); }
  .hero-art { width: min(70vw, 690px); left: 0; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .nav-shell { grid-template-columns: 1fr 1fr; gap: 0 16px; padding-top: 10px; }
  .nav-links { grid-row: 2; grid-column: 1 / -1; gap: 24px; margin-top: 2px; }
  .video-link { grid-column: 2; grid-row: 1; min-height: 40px; }
  .hero-layout { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-copy { padding-block: 37px 0; }
  .hero h1 { font-size: clamp(50px, 10.4vw, 72px); }
  .hero-description { margin-top: 15px; }
  .hero .button { margin-top: 19px; }
  .hero-art { width: calc(100% + 2 * var(--gutter)); max-width: 590px; align-self: center; margin-top: 0; }
  .hero-art::after { background: linear-gradient(90deg, var(--night), transparent 10%, transparent 91%, var(--night)), linear-gradient(180deg, var(--night), transparent 15%, transparent 88%, var(--night)); }
  .section-heading { align-items: start; flex-direction: column; gap: 4px; margin-bottom: 25px; }
  .section-heading .eyebrow { margin-bottom: 5px; }
  .section-heading .text-link { min-height: 36px; }
  .about-intro { grid-template-columns: 1fr; gap: 30px; }
  .about-copy h1 { font-size: clamp(48px, 10.3vw, 72px); }
  .about-copy p { max-width: 50ch; }
  .show-topics { grid-template-columns: 1fr; gap: 28px; }
  .show-topics p { max-width: 55ch; }
  .subscribe-layout { grid-template-columns: 1fr; justify-items: start; gap: 22px; }
}
@media (max-width: 520px) {
  .episode-grid, .project-grid, .project-grid.apps, .hosts-grid, .band-layout { grid-template-columns: 1fr; }
  .episode-grid { gap: 31px; }
  .episode-content { padding-top: 14px; }
  .band-layout { justify-items: start; gap: 15px; }
  .project-grid, .hosts-grid { gap: 25px; }
}
@media (max-width: 345px) {
  .nav-links { gap: 17px; }
  .hero h1 { font-size: 45px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Episode catalogue and private audience dashboard */
.latest-section { border-top: 1px solid var(--paper-line); }
.latest-grid { gap: 42px 30px; }
.episode h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.latest-grid .episode-art img { aspect-ratio: 16 / 9; object-fit: cover; }
.catalogue-caption, .stats-note { color: var(--muted); font-size: 1rem; line-height: 1.65; }
.page-intro .text-link { margin-top: 24px; display: inline-flex; }
.prose { max-width: 950px; }
.prose h2 { font-size: clamp(26px, 3vw, 38px); margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 1.063rem; line-height: 1.8; margin-top: 18px; max-width: 740px; }
.prose a, .stats-note a { text-decoration: underline; text-underline-offset: 3px; }
.stats-period { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.stats-period [aria-current] { background: var(--cream); color: var(--ink); }
.stat-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; }
.stat-card { padding: 22px; border: 1px solid var(--paper-line); border-top: 3px solid #3687dd; border-radius: 8px; background: #fff; }
.stat-card:nth-child(even) { border-top-color: #ed923a; }
.stat-card p { font-size: .938rem; color: var(--muted); }
.stat-card strong { display: block; font-family: var(--display); font-size: clamp(32px, 4vw, 48px); margin-top: 8px; }
.stats-note { margin-top: 24px; max-width: 900px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.stats-panel { padding: clamp(18px, 3vw, 30px); border: 1px solid var(--paper-line); border-radius: 8px; background: #fff; min-width: 0; }
.stats-panel h2 { font-size: 1.375rem; letter-spacing: -.025em; margin-bottom: 16px; }
.stats-panel p { font-size: 1rem; line-height: 1.7; }
.stats-panel p + p { margin-top: 10px; }
.stats-panel table { width: 100%; border-collapse: collapse; font-size: .938rem; line-height: 1.5; }
.stats-panel th, .stats-panel td { padding: 12px 0; text-align: left; border-bottom: 1px solid #ebedf0; overflow-wrap: anywhere; }
.stats-panel th { font-weight: 500; }
.stats-panel thead th { color: var(--muted); font-size: .875rem; font-weight: 700; }
.stats-panel td:last-child, .stats-panel thead th:last-child { text-align: right; padding-left: 20px; white-space: nowrap; }
.empty-stats { color: var(--muted); padding-block: 8px; }
.feed-panel { margin-top: 24px; border-left: 3px solid #3687dd; }
.feed-panel form { margin-top: 20px; }
.button-dark { background: var(--night); color: #fff; cursor: pointer; font-family: inherit; }
.button-dark:hover { background: #263b64; }
details.stats-panel { margin-top: 24px; }
.stats-panel summary { cursor: pointer; font-weight: 700; }
@media (max-width: 1000px) { .stat-cards { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 700px) {
 .stat-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 .stat-card { padding: 18px; }
 .stats-grid { grid-template-columns: 1fr; gap: 16px; }
 .latest-grid { row-gap: 36px; }
}
.admin-login { display:grid; gap:16px; max-width:430px; margin-top:24px; }
.admin-login label { font-size:1rem; font-weight:700; }
.admin-login input { width:100%; min-height:48px; padding:12px; border:1px solid #9ba3b1; border-radius:6px; font:inherit; background:#fff; color:var(--ink); }
.admin-login input:focus { outline:3px solid #8cc4ff; outline-offset:2px; }
.admin-login .button { justify-self:start; }
