/* Hub — tonight's poster, one Start bar, the seven-night programme */
[data-view="home"] { padding: 0 0 48px; overflow-x: clip; }
.h-wrap { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }

/* top strip */
.h-strip { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; border-bottom: 1px solid var(--line); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.h-brand { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.h-brand b { font: 850 22px/1 var(--font); font-stretch: 68%; text-transform: uppercase; letter-spacing: .01em; }
.h-brand span { font: 600 12px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.h-streak { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; margin: 0; color: var(--muted); }
.h-streak b { grid-row: 1 / 3; font: 850 32px/1 var(--font); font-stretch: 62%; color: var(--paper); }
.h-streak-l { font: 650 10px/1.05 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.h-week { display: flex; gap: 3px; margin-top: 3px; }
.h-week i { width: 6px; height: 6px; background: var(--ground-3); }
.h-week i.on { background: var(--paper); }
.h-week i.now { outline: 1px solid var(--line-strong); outline-offset: 1px; }

/* tonight's poster: the field fills most of the phone screen, the name is set into it */
.h-hero { margin: 0; }
.h-poster { position: relative; height: min(60svh, 560px); min-height: 380px; margin: 0 calc(var(--gutter) * -1); background: var(--field); color: var(--field-ink); overflow: hidden; }
.h-art, .h-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.h-art .j-seg { stroke-width: 9; }
.h-art .j-route { opacity: .3; }
/* on load the shapes slide and turn into their grid cells, one after another, then snap */
.h-art .j-reg.reached .j-shape { animation: arrive .7s var(--ease-out) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes arrive { 0% { transform: translate(-60px, 40px) rotate(-90deg) scale(.5); } 80% { transform: scale(1.04); } 100% { transform: none; } }
.h-no { position: absolute; right: var(--gutter); top: 10px; font: 850 clamp(64px, 20vw, 104px)/1 var(--font); font-stretch: 62%; }
.h-title { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 44px; margin: 0; font-size: clamp(76px, 25vw, 150px); line-height: .8; font-stretch: 62%; letter-spacing: -.015em; color: var(--field-ink); }
.h-sub { position: absolute; left: var(--gutter); bottom: 18px; margin: 0; font: 750 14px/1 var(--font); font-stretch: 85%; letter-spacing: .06em; text-transform: uppercase; }
.h-lead { max-width: 40ch; margin: 18px 0 16px; color: var(--muted); font-size: 17px; }
.h-go { width: 100%; }
.h-alldone { margin: 0; padding: 22px 0; border-top: 1.5px solid var(--paper); font-size: 17px; }
.h-alldone b { font: 850 26px/1 var(--font); font-stretch: 70%; text-transform: uppercase; display: block; margin-bottom: 4px; }

/* seven swatches: outlined until played, then solid */
.h-meter { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; list-style: none; margin: 14px 0 0; padding: 0; }
.h-meter li { position: relative; height: 32px; border: 2px solid var(--field); }
.h-meter li::before { content: ''; position: absolute; inset: 0; background: var(--field); opacity: .16; }
.h-meter li.on { background: var(--field); }

/* the programme */
.h-prog { margin: 56px 0 0; }
.h-prog h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1.5px solid var(--paper); font-size: clamp(30px, 8vw, 44px); }
.h-prog h2 span { font: 600 12px var(--font); font-stretch: 100%; letter-spacing: .08em; color: var(--muted); text-align: right; }
.h-list { list-style: none; margin: 0; padding: 0; }
.h-list li { border-bottom: 1px solid var(--line); }
.h-list a { display: grid; grid-template-columns: 76px 1fr 40px; gap: 16px; align-items: center; padding: 16px 0; color: var(--paper); text-decoration: none; transition: background-color .2s var(--ease-out); }
.h-sw { display: grid; place-items: center; width: 76px; height: 76px; background: var(--field); color: var(--field-ink); overflow: hidden; transition: transform .25s var(--ease-out); }
.h-mini { width: 68px; height: 68px; }
.h-txt { display: grid; gap: 3px; min-width: 0; }
.h-name { font: 850 clamp(30px, 8vw, 40px)/.9 var(--font); font-stretch: 64%; text-transform: uppercase; }
.h-tag { font-size: 15px; line-height: 1.35; color: var(--paper); }
.h-len { white-space: nowrap; font: 600 12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-state { display: grid; justify-items: end; gap: 2px; color: var(--muted); }
.h-state b { font: 850 20px/1 var(--font); font-stretch: 68%; color: var(--paper); }
.h-list a:hover .h-sw { transform: scale(1.04); }
.h-list a:hover .h-state { color: var(--field); }
.h-list a:hover .h-name { color: var(--field); }
.h-list li.is-done .h-state .ico { color: var(--field); }

/* forgiving streak */
.h-forgive { margin: 56px 0 0; padding-top: 18px; border-top: 1.5px solid var(--paper); }
.h-forgive h2 { font-size: clamp(34px, 9vw, 52px); margin-bottom: 12px; }
.h-forgive p { max-width: 46ch; color: var(--muted); }
.h-forgive dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.h-forgive dl div { padding: 12px 0; }
.h-forgive dl div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.h-forgive dt { font: 650 11px var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.h-forgive dd { margin: 0; font: 850 44px/1 var(--font); font-stretch: 62%; }
.h-forgive dd.small { font-size: 28px; line-height: 44px; }

.h-foot { margin-top: 48px; color: var(--muted); font-size: 14px; }
.h-foot b { color: var(--paper); }
.h-foot .fine { font-size: 12px; max-width: 80ch; }

/* desktop: poster and start on the left, the programme beside it */
@media (min-width: 1000px) {
  :root { --col: 1160px; }
  .h-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "strip strip" "hero prog" "meter prog" "forgive prog" "foot prog"; grid-template-rows: auto auto auto auto 1fr; column-gap: 56px; align-items: start; }
  .h-strip { grid-area: strip; }
  .h-hero { grid-area: hero; margin-top: 24px; }
  .h-poster { margin: 0; height: min(64vh, 620px); }
  .h-meter { grid-area: meter; }
  .h-prog { grid-area: prog; margin-top: 24px; }
  .h-forgive { grid-area: forgive; }
  .h-foot { grid-area: foot; }
}

/* photos: a duotone base layer under tonight's poster, and in the programme thumbnails */
.h-photo, .h-photo .duo-frame { position: absolute; inset: 0; }
.h-photo .duo-frame { background: var(--field); }
.h-photo img { opacity: .55; }
.h-sw.has-photo .duo, .h-sw.has-photo .duo-frame { width: 100%; height: 100%; }
.h-when { font: 650 13px/1.3 var(--font); color: var(--paper); }
.h-when::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--field); vertical-align: 1px; }
.h-credits { margin-top: 14px; font-size: 12px; }
.h-credits summary { cursor: pointer; font-weight: 650; color: var(--paper); }
.h-credits ul { margin: 10px 0 8px; padding-left: 18px; }
.h-credits li { margin-bottom: 4px; }
.h-credits a { color: inherit; }
