:root {
  color-scheme: dark;
  --bg: #0a1020;
  --surface: #0f172a;
  --ink: #f1f5fc;
  --muted: #a5b1c6;
  --line: #25334c;
  --teal: #5fe0cc;
  --shell: 1220px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }

.shell { width: min(var(--shell), calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 12px; left: 12px; padding: 12px; background: var(--surface); transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); background: #0a1020; }
.header-content, .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-content { min-height: 76px; }
.brand { display: inline-flex; flex: 0 0 auto; }
.brand img { width: 174px; height: auto; }
nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 35px); }
nav a { font-size: .875rem; font-weight: 600; color: var(--muted); }
nav a:hover { color: var(--ink); }
.github-link { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 8px 13px; border-radius: 8px; color: var(--ink); }
.github-link:hover { border-color: var(--teal); }
.github-link svg { width: 16px; height: 16px; }

.hero {
  background: radial-gradient(ellipse at 76% 32%, #142846b0 0%, transparent 58%),
    radial-gradient(ellipse at 86% 3%, #14473d88 0%, transparent 42%);
  border-bottom: 1px solid var(--line);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  align-items: center;
  gap: clamp(36px, 5vw, 78px);
  padding-block: clamp(70px, 8vw, 114px) clamp(55px, 7vw, 90px);
}
.hero-copy { padding-bottom: 22px; }
.eyebrow { color: var(--teal); font-size: .875rem; line-height: 1.5; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
h1, .section h2 { font-weight: 750; line-height: 1.01; letter-spacing: -.065em; text-wrap: balance; }
h1 { margin-top: 16px; font-size: clamp(3.75rem, 6.45vw, 6rem); }
h1 span { color: var(--teal); }
.lede { margin-top: 24px; max-width: 34ch; color: var(--muted); font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .9375rem;
  font-weight: 700;
  transition: background-color .18s, border-color .18s;
}
.primary { color: #04201c; background: var(--teal); }
.primary:hover { background: #a0f5e6; }
.secondary { background: #101a2d; border-color: #324360; }
.secondary:hover { background: #1a2a42; border-color: var(--teal); }

.guide-figure { min-width: 0; scroll-margin-top: 24px; }
.guide-frame { overflow: hidden; background: #0c1425; border: 1px solid #354761; border-radius: 16px; box-shadow: 0 24px 68px #020610a6; }
.guide-top, .guide-brand { display: flex; align-items: center; }
.guide-top { min-height: 52px; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #121d30; }
.guide-brand { gap: 9px; font-size: .875rem; font-weight: 700; }
.sample-label, figcaption { font-size: .8125rem; color: var(--muted); }
.sample-label { flex: 0 0 auto; }
.showcase {
  min-height: 185px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 19px clamp(15px, 3vw, 28px);
  background: radial-gradient(ellipse at 90% 20%, var(--show-glow), transparent 73%), #102033;
}
.showcase[data-theme="nature"] { --show-glow: #255c57; --show-accent: #a5f9e1; }
.showcase[data-theme="cinema"] { --show-glow: #553c2f; --show-accent: #ffd3a2; }
.showcase[data-theme="scifi"] { --show-glow: #45396e; --show-accent: #dfceff; }
.showcase[data-art="coastlines"] {
  background: linear-gradient(90deg, #0a1929 12%, #0a1929e8 34%, #0a192957 74%, #0a19293d),
    #112e36 url("assets/coastlines.jpg") center 53% / cover no-repeat;
}
.show-status { color: var(--show-accent); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#show-title { margin-top: 4px; font-size: clamp(1.65rem, 3.3vw, 2.65rem); line-height: 1.1; letter-spacing: -.045em; }
#show-time { margin-top: 5px; font-size: .8125rem; font-weight: 600; color: #d2e0f3; }
#show-description { margin-top: 6px; max-width: 43ch; font-size: .875rem; line-height: 1.35; color: #e0e8f6; }

.schedule { --channel-width: 102px; position: relative; padding: 9px 12px 12px; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: var(--channel-width) repeat(2, minmax(0, 1fr)); gap: 5px; }
.schedule-head { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; padding-bottom: 7px; }
.schedule-head span { padding-left: 8px; }
.schedule-row + .schedule-row { margin-top: 5px; }
.nature { --channel-accent: #62dcc4; --program: #143a3a; --later: #132a30; }
.cinema { --channel-accent: #eeb074; --program: #3b2b28; --later: #29252b; }
.scifi { --channel-accent: #b5a2f7; --program: #302b4b; --later: #23263c; }
.channel, .program {
  display: flex;
  align-items: center;
  min-height: 45px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: left;
  line-height: 1.2;
}
.channel { gap: 8px; background: #172337; font-size: .8125rem; font-weight: 650; }
.channel span { color: var(--channel-accent); font-size: .75rem; font-variant-numeric: tabular-nums; }
.program { padding-left: 10px; color: var(--ink); background: var(--later); font-size: .8125rem; font-weight: 640; cursor: pointer; }
.program.current { background: var(--program); box-shadow: inset 2px 0 var(--channel-accent); }
.program:hover { border-color: var(--channel-accent); }
.program[aria-pressed="true"] { border-color: var(--channel-accent); }
.program:focus-visible { position: relative; z-index: 1; outline-offset: 0; }
.now-line { position: absolute; left: calc(var(--channel-width) + 16%); top: 32px; bottom: 12px; width: 1px; background: #f07a8a; opacity: .78; pointer-events: none; }
.now-line::before { content: ""; position: absolute; width: 5px; height: 5px; left: -2px; top: -2px; border-radius: 50%; background: #f07a8a; }
figcaption { margin-top: 12px; text-align: center; }

.section { padding-block: clamp(56px, 7vw, 90px); scroll-margin-top: 12px; }
.section h2 { margin-top: 9px; font-size: clamp(2.3rem, 4.4vw, 4rem); }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 32px; border-block: 1px solid var(--line); }
.features-grid article { padding: 27px clamp(16px, 3vw, 34px); }
.features-grid article:first-child { padding-left: 0; }
.features-grid article + article { border-left: 1px solid var(--line); }
.feature-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 16px; color: var(--teal); background: #123031; border-radius: 9px; }
.feature-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.features-grid h3 { font-size: 1.125rem; letter-spacing: -.02em; }
.features-grid p, .setup-panel p:not(.eyebrow) { margin-top: 8px; color: var(--muted); line-height: 1.65; }
#setup { padding-top: 0; }
.setup-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(22px, 7vw, 110px);
  padding: clamp(24px, 5vw, 62px);
  border: 1px solid #304359;
  border-radius: 16px;
  background: radial-gradient(ellipse at 88% 30%, #153d3a 0%, transparent 55%), #111d31;
}
.setup-panel p:not(.eyebrow) { max-width: 53ch; }
.setup-panel .button { margin-top: 21px; }
.setup-panel img { border-radius: 24%; box-shadow: 0 14px 42px #060c1b87; }
.site-footer { min-height: 82px; padding-block: 16px; border-top: 1px solid var(--line); }
.site-footer .brand img { width: 151px; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
  .hero-layout { gap: 25px; }
  .schedule { --channel-width: 79px; }
}

@media (max-width: 800px) {
  .hero-layout { grid-template-columns: 1fr; gap: 32px; max-width: 630px; }
  .hero-copy { padding-bottom: 0; }
  h1 { font-size: clamp(3.45rem, 10vw, 5.5rem); }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid article, .features-grid article:first-child { padding: 20px 0; }
  .features-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 510px) {
  .shell { width: calc(100% - 32px); }
  .header-content { min-height: 68px; gap: 6px; }
  .brand img { width: clamp(86px, 27vw, 115px); }
  nav { gap: clamp(8px, 2.5vw, 12px); }
  nav a { font-size: .8125rem; }
  .github-link { padding: 7px; gap: 0; }
  .github-link svg { display: none; }
  .hero-layout { padding-block: 53px 40px; }
  .schedule { --channel-width: 67px; padding-inline: 8px; }
  .channel { gap: 4px; padding-inline: 4px; }
  .program { padding-inline: 7px; }
  .now-line { left: calc(var(--channel-width) + 15%); }
  .setup-panel img { display: none; }
  .setup-panel { grid-template-columns: 1fr; }
  .site-footer { flex-wrap: wrap; }
  .site-footer .brand img { width: 129px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
