:root {
  color-scheme: dark;
  --bg: #071521;
  --panel: rgba(15, 35, 49, .88);
  --line: rgba(169, 205, 218, .14);
  --text: #eff8f6;
  --muted: #a4bac1;
  --mint: #87f0ce;
  --blue: #89baff;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 12% -10%, rgba(31, 117, 125, .35), transparent 42rem),
    radial-gradient(ellipse at 100% 20%, rgba(39, 83, 147, .2), transparent 38rem),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.shell { width: min(1120px, calc(100% - 40px)); margin: auto; }
header { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-weight: 750; letter-spacing: .04em; }
.mark { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid rgba(135, 240, 206, .55); border-radius: 12px; color: var(--mint); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.studio-login { min-height: 38px; white-space: nowrap; }
header { gap: 14px; }
.secure { color: var(--muted); font-size: .84rem; }
.secure::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 0; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
main { padding: 70px 0 90px; }
.eyebrow { color: var(--mint); font-size: .77rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
h1 { max-width: 750px; margin: 12px 0 18px; font-size: clamp(2.7rem, 7vw, 5.5rem); line-height: .99; letter-spacing: -.065em; }
h1 span { color: var(--mint); }
.lead { max-width: 650px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 52px; }
.card { position: relative; overflow: hidden; min-height: 258px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(24, 49, 65, .92), var(--panel)); box-shadow: 0 20px 70px rgba(0, 0, 0, .18); }
.channel-card { min-height: 220px; }
.card::after { position: absolute; top: -65px; right: -45px; width: 170px; height: 170px; border: 1px solid rgba(135, 240, 206, .12); border-radius: 50%; box-shadow: 0 0 0 24px rgba(135, 240, 206, .025), 0 0 0 48px rgba(135, 240, 206, .02); content: ""; pointer-events: none; }
.icon { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 25px; border: 1px solid var(--line); border-radius: 13px; color: var(--mint); font-size: 1.2rem; }
h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -.025em; }
.section-heading { margin-top: 8px; }
.card p { max-width: 440px; min-height: 48px; margin: 0 0 21px; color: var(--muted); }
.button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 15px; border: 1px solid rgba(135, 240, 206, .38); border-radius: 10px; background: rgba(135, 240, 206, .1); color: var(--mint); text-decoration: none; font-size: .9rem; font-weight: 700; transition: background .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); background: rgba(135, 240, 206, .17); }
.button.secondary { border-color: rgba(137, 186, 255, .38); background: rgba(137, 186, 255, .1); color: var(--blue); }
.wide { grid-column: 1 / -1; min-height: 185px; }
.wide .row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wide p { max-width: 660px; margin-bottom: 0; }
.ingest { margin-top: 31px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 16px; background: rgba(4, 16, 26, .58); }
.ingest-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; color: var(--muted); font-size: .85rem; }
.ingest-channel { margin-top: 18px; }
code { overflow-wrap: anywhere; color: var(--mint); font: .95rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.note { margin-top: 11px; color: var(--muted); font-size: .82rem; }
.player { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 16px; }
input { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #081721; color: var(--text); font: inherit; }
input:focus { border-color: var(--mint); }
button { cursor: pointer; font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#player-status { min-height: 1.5em; margin: 12px 0 0; color: var(--muted); font-size: .85rem; }
#video { display: none; width: 100%; margin-top: 16px; border-radius: 12px; background: #000; }
#video.is-visible { display: block; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 52px; }
.muted-small { margin: 0; color: var(--muted); font-size: .85rem; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.channel-grid .card { min-height: 0; padding: 22px; display: flex; flex-direction: column; }
.channel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.channel-number { display: grid; min-width: 44px; height: 44px; padding: 0 10px; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--mint); font-size: 1.2rem; font-weight: 750; }
.badge { padding: 3px 9px; border-radius: 999px; font-size: .72rem; font-weight: 750; letter-spacing: .08em; }
.badge.live { background: rgba(255, 92, 92, .16); color: #ff8f8f; }
.badge.offline { background: rgba(164, 186, 193, .12); color: var(--muted); }
.channel-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 14px; border-radius: 10px; background: #000; }
.channel-grid .card p.channel-description { min-height: 0; margin: 0 0 12px; }
.channel-grid .card p.channel-ids { min-height: 0; margin: 0 0 18px; font-size: .85rem; }
.channel-ids code { font-size: .85rem; }
.channel-sources { position: relative; z-index: 1; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4, 16, 26, .5); }
.channel-sources h3 { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.channel-sources ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.channel-sources li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; font-size: .8rem; }
.channel-sources .source-label { color: var(--muted); }
.channel-sources code { grid-column: 1 / -1; grid-row: 2; overflow: hidden; font-size: .76rem; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.source-action { padding: 2px 9px; border: 1px solid rgba(137, 186, 255, .3); border-radius: 7px; background: rgba(137, 186, 255, .08); color: var(--blue); font-size: .74rem; font-weight: 700; text-decoration: none; }
.source-action:hover { background: rgba(137, 186, 255, .16); }
.tvknob-link { grid-column: 1 / -1; overflow: hidden; color: var(--mint); font-weight: 700; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
.tvknob-link:hover { text-decoration: underline; }
.channel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.channel-actions .button { min-height: 38px; }
button.button { font: inherit; font-size: .9rem; font-weight: 700; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

/* Watch on Roku promo (links to tvknob.com/roku) */
.roku-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.roku p { max-width: 600px; }
.roku-qr { position: relative; z-index: 1; display: grid; flex: none; justify-items: center; gap: 8px; padding: 10px; border-radius: 16px; background: #fff; color: #071521; text-decoration: none; font-size: .78rem; font-weight: 700; }
.roku-qr svg { display: block; width: 148px; height: 148px; }
@media (max-width: 720px) { .roku-row { flex-direction: column; align-items: flex-start; } }

@media (max-width: 720px) {
  main { padding: 45px 0 60px; }
  .grid { grid-template-columns: 1fr; margin-top: 36px; }
  .wide { grid-column: auto; }
  .wide .row { align-items: flex-start; flex-direction: column; gap: 14px; }
  header { padding: 18px 0; }
  .secure { display: none; }
  header { flex-wrap: wrap; }
  .header-actions { gap: 8px; }
  .studio-login { min-height: 34px; padding: 0 11px; font-size: .82rem; }
  .ingest { padding: 18px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

header { flex-wrap: wrap; align-items: center; }
.header-actions { flex: 1 1 100%; justify-content: flex-start; padding-top: 2px; }
.network-nav { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 0; max-width: none; }
.network-nav a { margin-right: 0.95rem; color: var(--muted); font-size: .84rem; font-weight: 650; text-decoration: none; }
.network-nav a:hover { color: var(--mint); }
footer { flex-wrap: wrap; align-items: center; }
footer .network-nav { margin-top: 8px; }
