/* The page hero, one design for every hub landing and sub-page (2026-11-21).

   Modelled on Infinimaker's heroes: a solid ink band, a serif headline that is a sentence, one lede, the real figures
   the page already holds, and one action. No gradient, no glow, no blur, no decorative art: the band carries words and
   facts only. The wordmark is never recoloured, so on the dark band it sits on its own paper ground.

   Built by src/hub-base.js: buildStoryCard() (sub-pages and story landings) and buildHeroHeader() (hub landings) add
   `.hero-band`. Older per-hub hero rules stay in their module sheets; the #main-content prefix and this sheet being
   linked last let the band win without touching them. The ground is --guide-color-sky-navy, which is the same in both
   themes, so text here uses the on-dark tokens and never --guide-color-ink (ink flips to light in the dark theme). */

/* A band is a story card, or the header of a hub landing panel. The header a sub-page carries (hidden behind the hub's
   tab bar, or shown with its Back button where a hub has no tabs) is not one, and shows no kicker. */
#main-content .hero-kicker { display: none; }

#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) {
  position: relative;
  margin: 0 0 var(--guide-sp-5);
  padding: var(--guide-sp-6);
  border: 1px solid var(--guide-color-border-default);
  border-radius: var(--guide-radius-xl);
  background: var(--guide-color-sky-navy);
  box-shadow: none;
  color: var(--guide-color-on-dark);
  container-type: inline-size;
}
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band)::before { content: none; }

/* kicker: the wordmark on its own paper ground, then where you are */
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--guide-sp-2) var(--guide-sp-3); margin: 0 0 var(--guide-sp-4); grid-column: 1 / -1; }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hero-wordmark {
  display: inline-block; padding: 5px 10px 4px; border-radius: var(--guide-radius-xs);
  background: var(--guide-color-white);
  font-family: var(--guide-font-wordmark); font-synthesis: none; font-weight: 400; font-size: var(--guide-fs-xs); letter-spacing: 0.06em; line-height: 1;
  color: var(--guide-color-mt-red); white-space: nowrap;
}
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hero-crumb { font-size: var(--guide-fs-sm); font-weight: 600; color: var(--guide-color-on-dark-2); }

/* headline, lede */
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-title,
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hub-hero-title {
  margin: 0 0 var(--guide-sp-3);
  max-width: 22ch;
  font-family: var(--guide-font-display);
  font-size: clamp(28px, 5.2cqi, 46px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--guide-color-white);
  text-wrap: balance;
}
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-body,
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hub-hero-sub {
  margin: 0;
  max-width: 62ch;
  font-size: var(--guide-fs-lg);
  line-height: 1.5;
  color: var(--guide-color-on-dark-2);
}

/* layout: copy on the left, the one action on the right where there is room */
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--guide-sp-6); align-items: end; padding: 0; }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__inner > * { grid-column: 1; }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__icon { display: none; }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__inner > .tu-btn { grid-column: 2; grid-row: 2 / span 2; align-self: end; margin: 0; white-space: nowrap; }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__inner > .pg-vitals-host { grid-column: 1 / -1; }
@container (max-width: 640px) {
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__inner { grid-template-columns: minmax(0, 1fr); }
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-card__inner > .tu-btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--guide-sp-4); }
}

/* the one action: the signal colour, used once */
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-btn-primary {
  display: inline-flex; align-items: center; gap: var(--guide-sp-2);
  padding: 12px 18px; border-radius: var(--guide-radius-md);
  border: 1px solid var(--guide-color-signal); background: var(--guide-color-signal); color: var(--guide-color-on-signal);
  font-weight: 700; box-shadow: none;
}
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-btn-primary:hover { background: var(--guide-color-signal-hover); border-color: var(--guide-color-signal-hover); }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-btn-primary:focus-visible { outline: 2px solid var(--guide-color-white); outline-offset: 2px; }

/* figures the page already holds, on the dark ground */
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .pg-vitals { margin-top: var(--guide-sp-5); }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .pg-vital { border-color: color-mix(in srgb, var(--guide-color-white) 18%, transparent); background: color-mix(in srgb, var(--guide-color-white) 6%, transparent); }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .pg-vital-v { color: var(--guide-color-white); }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .pg-vital-l { color: var(--guide-color-on-dark-2); }
#main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .pg-vital-n { color: var(--guide-color-on-dark-3); }

/* hub landings: the header is the band; the back row and the states button sit on it */
#main-content .hub-hero-panel > .hub-hero-header.hero-band { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--guide-sp-4) var(--guide-sp-5); }
#main-content .hub-hero-panel > .hub-hero-header.hero-band .hub-hero-header-left { display: block; flex: 1 1 auto; width: auto; min-width: min(280px, 100%); }
#main-content .hub-hero-panel > .hub-hero-header.hero-band .hub-hero-header-icon { display: none; }
#main-content .hub-hero-panel > .hub-hero-header.hero-band .hub-hero-header-back .hydro-back,
#main-content .hub-hero-panel > .hub-hero-header.hero-band .guide-states-btn { color: var(--guide-color-white); border-color: color-mix(in srgb, var(--guide-color-white) 35%, transparent); background: transparent; }
#main-content .hub-hero-panel > .hub-hero-header.hero-band .guide-states-btn:hover { background: color-mix(in srgb, var(--guide-color-white) 10%, transparent); }
/* inside the landing card the band runs edge to edge across the top */
/* the panel's padding is set here, as --hero-pad, so the band can cancel exactly that much at every width */
#main-content .hub-hero-panel:has(> .hub-hero-header.hero-band) { --hero-pad: var(--guide-sp-6); padding: var(--hero-pad); overflow: hidden; }
@media (max-width: 640px) { #main-content .hub-hero-panel:has(> .hub-hero-header.hero-band) { --hero-pad: var(--guide-sp-4); } }
#main-content .hub-hero-panel > .hub-hero-header.hero-band { margin: calc(-1 * var(--hero-pad)) calc(-1 * var(--hero-pad)) var(--guide-sp-5); border-width: 0 0 1px; border-radius: 0; }

@media print {
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) { background: none; color: inherit; border-color: currentColor; }
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-title, #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hub-hero-title, #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-body, #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hub-hero-sub { color: inherit; }
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-btn { display: none; }
}

/* a landing whose panel holds only its header (Planning): the band is the whole card */
#main-content .hub-hero-panel > .hub-hero-header.hero-band:last-child { margin-bottom: calc(-1 * var(--hero-pad)); border-width: 0; }

/* phone width: a shorter lede, tighter band */
@container (max-width: 480px) {
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .tu-story-body,
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hub-hero-sub { font-size: var(--guide-fs-md); }
}
/* On a phone the band must leave the page's first control (its search) on the first screen: a compact band, the lede
   cut to two lines (the full text is one tap away in "Ask GUIDE AI about this page"), and the action as a text link. */
@media (max-width: 520px) {
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) { padding: var(--guide-sp-4); margin-bottom: var(--guide-sp-3); }
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) .hero-kicker { margin-bottom: var(--guide-sp-2); }
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) :is(.tu-story-title, .hub-hero-title) { font-size: var(--guide-fs-2xl); margin-bottom: var(--guide-sp-2); }
  #main-content :is(.tu-story-card.hero-band, .hub-hero-panel > .hub-hero-header.hero-band) :is(.tu-story-body, .hub-hero-sub) { font-size: var(--guide-fs-sm); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  #main-content .tu-story-card.hero-band .tu-story-card__inner > .tu-btn { margin-top: var(--guide-sp-3); padding: 8px 12px; font-size: var(--guide-fs-sm); }
}
