:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #183147;
  background: #edf3f7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, .program:focus-visible { outline: 4px solid #f3ad37; outline-offset: 2px; }
.skip-link { position: absolute; z-index: 100; top: -70px; left: 14px; background: white; padding: 12px 20px; color: #053e65; }
.skip-link:focus { top: 8px; }
.site-shell { max-width: 1140px; margin: 0 auto; }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 22px 26px; color: #fff;
  background: linear-gradient(118deg, #102b43 0%, #154b70 70%, #146584 100%);
  box-shadow: 0 4px 18px rgba(23, 43, 60, .12);
}
.brand { display: flex; align-items: center; gap: 17px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; font-size: 33px; border-radius: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.eyebrow { color: #9edaf0; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1 { font-size: clamp(25px, 4vw, 36px); letter-spacing: -.025em; margin: 1px 0 3px; line-height: 1.13; }
.site-header p { margin: 0; font-size: 15px; color: #d5ebf4; }
.header-status { display: flex; align-items: flex-end; gap: 5px; flex-direction: column; white-space: nowrap; }
#clock { font-weight: 800; font-size: 27px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.data-status { font-size: 13px; color: #bce8e0; }
main { padding: 20px 26px 16px; }
.intro-bar { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.tab-group { display: flex; gap: 8px; flex: 1; }
.tab, .refresh {
  border: 2px solid #cedee9; border-radius: 14px; min-height: 53px;
  background: #fff; color: #1e4a63; font-weight: 800; font-size: 18px;
  padding: 12px 20px; transition: border-color .14s, background .14s;
}
.tab { flex: 0 1 164px; }
.tab.is-active { background: #146a89; border-color: #146a89; color: #fff; box-shadow: 0 2px 6px #146a892b; }
.tab span { margin-right: 4px; }
.refresh { flex: 0 0 auto; }
.refresh span { font-size: 23px; vertical-align: middle; line-height: .6; margin-right: 5px; }
.content-heading { margin: 24px 0 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.content-heading h2 { margin: 0; font-size: 25px; font-weight: 800; color: #18374c; letter-spacing: -.025em; }
.content-heading p { margin: 4px 0 0; font-size: 16px; color: #536e7f; }
.update-time { color: #69808d; font-weight: 700; font-size: 13px; white-space: nowrap; padding-bottom: 4px; }
.guide-head { display: grid; grid-template-columns: 142px minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 0 18px 9px; font-size: 13px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #57738a; }
.channel-row {
  display: grid; grid-template-columns: 142px minmax(0,1fr) minmax(0,1fr);
  align-items: stretch; gap: 12px; padding: 12px 18px; background: #fff;
  border-radius: 16px; margin-bottom: 10px; border: 1px solid #dae5eb;
  box-shadow: 0 2px 5px rgba(19,57,79,.04);
}
.channel-name { align-self: center; display: flex; flex-direction: column; gap: 4px; }
.channel-name strong { font-size: 22px; color: #174968; letter-spacing: -.025em; }
.channel-name small { color: #506e7f; font-size: 14px; font-weight: 600; line-height: 1.35; }
.program { width: 100%; background: #f0f7fb; border: 2px solid transparent;
  border-radius: 12px; padding: 13px 16px; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 5px; min-height: 86px;
  color: #183448; text-align: left;
}
.program:hover { background: #e5f4fb; border-color: #8ec8e0; }
.program:active { transform: translateY(1px); }
.program strong { font-size: 18px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.program .show-time { font-size: 14px; color: #42687c; font-weight: 700; }
.program.on-now { background: #eaf8f5; border-color: #bddfd5; }
.program.on-now strong { color: #124f44; }
.program.football { background: #fff5e3; border-color: #efd5a6; }
.program.empty { background: #f8fafb; border-color: transparent; cursor: default; color: #83929b; }
.program.empty strong { font-weight: 500; font-size: 15px; color: #7f8e9b; }
.program.empty:hover { background: #f8fafb; }
.tag { display: inline-block; border-radius: 20px; color: #126149;
  background: #d4f2e7; padding: 3px 9px; font-size: 12px; font-weight: 900; letter-spacing: .03em; }
.tag.gold { background: #ffdf9b; color: #7f4e06; }
.loading, .error-state, .empty-panel { background: white; border: 1px solid #dce7ef;
  border-radius: 16px; text-align: center; padding: 40px 24px; font-size: 18px; color: #4d6476; }
.loading strong, .empty-panel strong { font-size: 20px; color: #1c4765; display: block; }
.loading p, .empty-panel p { margin-bottom: 0; }
.spinner { width: 28px; height: 28px; border: 4px solid #cde5ee; border-top-color: #146a89; border-radius: 100%; margin: 0 auto 13px; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nfl-notice { border-radius: 14px; background: #e6eff9; border: 1px solid #cadbea; padding: 15px 18px; margin: 0 0 14px; color: #285372; font-size: 15px; line-height: 1.5; }
.nfl-game { width: 100%; border: 1px solid #d6e5eb; border-radius: 15px; background: #fff; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 11px; padding: 19px 20px; }
.nfl-game:hover { border-color: #76bbd5; background: #f5fcff; }
.nfl-game .matchup { font-size: 20px; font-weight: 800; color: #153d59; }
.nfl-game .date { color: #47677a; font-size: 16px; margin-top: 6px; }
.nfl-game .broadcast { font-size: 17px; font-weight: 800; color: #106485; white-space: nowrap; }
.nfl-game.featured { border: 2px solid #e1ad51; background: #fff9ed; }
.group-label { font-size: 18px; font-weight: 800; margin: 26px 0 10px; color: #264458; }
.footer { color: #5b7180; padding: 24px 26px 36px; font-size: 13px; line-height: 1.5; }
.footer p { margin: 5px 0; }
dialog { border: none; border-radius: 18px; padding: 0; color: #1a374b;
  width: min(94vw,620px); max-height: 88vh; box-shadow: 0 30px 70px #09283b80; }
dialog::backdrop { background: rgba(7,27,42,.7); }
.dialog-shell { padding: 24px; max-height: 88vh; overflow-y: auto; }
.dialog-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.dialog-eyebrow { color: #15718e; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.close-details { width: 44px; height: 44px; border: none; border-radius: 12px; background: #e9f1f6; color: #224860; font-size: 24px; }
#details-title { margin: 14px 0 10px; font-size: 27px; line-height: 1.18; }
.detail-highlight { background: #e9f6fc; border-radius: 12px; padding: 16px; font-size: 17px; }
.detail-label { font-size: 12px; color: #5a7887; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 17px 0 5px; }
.detail-content { font-size: 18px; line-height: 1.5; white-space: pre-line; }
.dialog-actions { display: flex; gap: 10px; margin-top: 24px; }
.action-button { border: 2px solid #14728f; border-radius: 12px; padding: 13px 20px; min-height: 52px; font-size: 17px; font-weight: 800; flex: 1; }
.action-primary { background: #14728f; color: #fff; }
.action-secondary { background: #fff; color: #14728f; }
@media(max-width:700px) {
  .site-header { padding: 17px 15px; gap: 10px; }
  .brand { gap: 10px; }
  .brand-mark { width: 46px; height: 46px; flex-basis: 46px; font-size: 25px; border-radius: 12px; }
  h1 { font-size: 26px; }
  .site-header p { font-size: 13px; }
  .eyebrow { font-size: 10px; }
  #clock { font-size: 19px; }
  .data-status { max-width: 98px; text-align: right; white-space: normal; font-size: 11px; }
  main { padding: 15px 11px; }
  .intro-bar { display: block; }
  .tab-group { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .tab { padding: 10px 4px; font-size: 16px; min-height: 54px; }
  .tab span { margin-right: 0; }
  .refresh { width: 100%; margin-top: 8px; min-height: 44px; padding: 6px; font-size: 15px; }
  .content-heading { margin-top: 18px; align-items: flex-start; }
  .content-heading h2 { font-size: 22px; }
  .content-heading p { font-size: 15px; }
  .update-time { display: none; }
  .guide-head { display: none; }
  .channel-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 7px; padding: 12px; margin-bottom: 9px; }
  .channel-name { grid-column: 1/-1; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 2px 4px; }
  .channel-name strong { font-size: 21px; }
  .channel-name small { text-align: right; font-size: 13px; }
  .program { min-height: 106px; padding: 12px; }
  .program strong { font-size: 17px; }
  .program .show-time { font-size: 13px; }
  .nfl-game { display: block; padding: 15px; }
  .nfl-game .matchup { font-size: 19px; }
  .nfl-game .broadcast { margin-top: 9px; font-size: 16px; }
  .footer { padding: 18px 16px 32px; }
}
@media(max-width:360px) {
  .brand-mark { display: none; }
  .tab { font-size: 15px; }
  .program { min-height: 98px; padding: 10px; }
  .program strong { font-size: 16px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Compact TV Guide: content-sized station names and synchronized horizontal time scroll. */
.timeline-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 2px 13px;
}
.swipe-hint {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  color: #285b72;
}
.timeline-arrows { display: flex; gap: 8px; flex: 0 0 auto; }
.timeline-arrows button {
  border: 2px solid #b5d1e0;
  background: #fff;
  color: #195574;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 800;
  min-height: 44px;
  padding: 8px 12px;
}
.timeline-arrows button:active { background: #dfeff6; }
.timeline-guide {
  touch-action: pan-y;
  display: flex;
  width: 100%;
  overflow: hidden;
  border: 1px solid #bed5e3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15,53,79,.09);
}
.timeline-stations {
  /* Size to the longest visible channel label; no wasted fixed-width sidebar. */
  flex: 0 0 max-content;
  width: max-content;
  min-width: 72px;
  max-width: 104px;
  z-index: 3;
  box-shadow: 3px 0 8px rgba(24,67,89,.12);
  background: #edf5f9;
}
.timeline-channel-head {
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  color: #234f67;
  border-bottom: 2px solid #b8d1de;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .09em;
}
.timeline-station {
  height: 91px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid #cfdee8;
  overflow: hidden;
  white-space: nowrap;
}
.timeline-station strong {
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #174e6b;
}
.timeline-station small {
  font-size: 12px;
  color: #587385;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: normal;
}
.timeline-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: #81adc6 #e8f1f6;
}
.timeline-scroll::-webkit-scrollbar { height: 10px; }
.timeline-scroll::-webkit-scrollbar-thumb {
  background: #86b4ca;
  border-radius: 10px;
}
.timeline-content { position: relative; }
.timeline-axis { display: flex; height: 54px; }
.timeline-tick {
  box-sizing: border-box;
  flex: 0 0 116px;
  width: 116px;
  height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  background: #1a5371;
  border-right: 1px solid #487b96;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.timeline-tick:nth-child(even) { background: #214f6a; }
.timeline-tick strong { font-size: 15px; white-space: nowrap; }
.timeline-tick small { font-size: 12px; color: #ffdda4; }
.timeline-track {
  position: relative;
  height: 91px;
  border-bottom: 1px solid #d0e1e9;
  background: repeating-linear-gradient(
    to right, #f3f8fa 0, #f3f8fa 115px,
    #d1e1e9 115px, #d1e1e9 116px);
}
.timeline-track:nth-child(2n+1) {
  background: repeating-linear-gradient(
    to right, #eaf2f7 0, #eaf2f7 115px,
    #cfdee7 115px, #cfdee7 116px);
}
.timeline-program {
  position: absolute;
  top: 8px;
  height: 74px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid #b5d6e6;
  background: #dceef7;
  color: #193e56;
  text-align: left;
}
.timeline-program.currently-airing {
  background: #ddf7ed;
  border-color: #8bcdb6;
  color: #155340;
}
.timeline-program.currently-airing .timeline-program-time {
  color: #16674c;
  font-weight: 850;
}
.timeline-gap {
  position: absolute;
  top: 8px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px;
  border: 1px dashed #bad0dc;
  border-radius: 8px;
  background: rgba(238, 246, 249, .86);
  color: #577789;
  font-size: 14px;
  font-weight: 680;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-program:hover { border-color: #1e7295; background: #c7e4f2; }
.timeline-program:active { background: #b4daec; }
.timeline-program.football {
  border-color: #e0ba73;
  background: #fff0cc;
}
.timeline-program-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  font-weight: 820;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.timeline-program-time {
  color: #456c7e;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.timeline-empty {
  position: absolute;
  left: 11px;
  top: 33px;
  color: #6c8796;
  font-size: 14px;
}
.timeline-warning {
  margin: 13px 0;
  padding: 12px 14px;
  background: #fff6e9;
  color: #795520;
  font-size: 16px;
  border-radius: 10px;
}
@media (max-width:700px) {
  .timeline-navigation {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .swipe-hint { flex: 1; font-size: 14px; }
  .timeline-arrows button { min-height: 45px; padding: 8px 9px; }
  /* Keep the labels readable while freeing the rest for programme cards. */
  .timeline-stations { min-width: 72px; max-width: 92px; }
  .timeline-channel-head { padding: 0 6px; }
  .timeline-station { padding: 6px 6px; }
  .timeline-station strong { font-size: 17px; }
  .timeline-station small { font-size: 11px; }
  .timeline-program-title { font-size: 16px; }
}
@media (max-width:380px) {
  .timeline-navigation { display: block; }
  .timeline-arrows { margin-top: 9px; }
  .timeline-arrows button { flex: 1; }
}

/* Packers services: compact, senior-friendly, game-specific viewing help. */
.packers-platform-panel {
  border: 1px solid #c8dce9; background: #fff; border-radius: 14px;
  padding: 15px 18px; margin: 0 0 16px;
}
.packers-platform-panel h3 { font-size: 20px; color: #183d56; margin: 0 0 6px; }
.packers-platform-panel p { color: #425f73; font-size: 15px; line-height: 1.4; margin: 0 0 12px; }
.packers-platform-list { display: flex; flex-wrap: wrap; gap: 8px; }
.packers-platform { display: flex; flex-direction: column; gap: 3px; border: 1px solid #c7dce7;
  border-radius: 10px; background: #f3f9fc; padding: 9px 12px; min-width: 132px; }
.packers-platform strong { font-size: 16px; font-weight: 800; color: #154f6b; }
.packers-platform small { font-size: 12px; line-height: 1.2; color: #4b687b; }
.packers-platform-panel .platform-note { font-size: 13px; margin: 12px 0 0; }
.nfl-game .game-options { margin-top: 8px; font-size: 15px; font-weight: 750; color: #285c72; line-height: 1.35; }
@media(max-width:700px) {
  .packers-platform-panel { padding: 13px 12px; }
  .packers-platform { min-width: 0; width: calc(50% - 4px); }
  .nfl-game .game-options { font-size: 15px; }
}
