/* Masthead (redesigned 29 Nov 2026). Loaded after style.css, and the only file with masthead layout rules.
   Story on the left, the three photos on the right (2026 first and largest), the weight card under both, then the summary,
   share links and data notes. Spacing is on a 4px grid. Three text roles on the dark band: white, 78% and 62%.
   The lilac square from the logo marks "now" and nothing else: the 2026 photo and the latest weight reading. */

/* ---------- Logo ---------- */
.hd-mark { display: inline-block; width: 28px; height: 28px; background: none; font-size: 0; }
.hd-mark svg { display: block; width: 100%; height: 100%; }
.hd-brandline { gap: 12px; margin-bottom: 40px; }
.hd-brandline .hd-mark { width: 40px; height: 40px; }
.hd-brand__txt { display: grid; gap: 4px; }
.hd-brand__name { font: 600 16px/1.1 var(--hd-display); color: var(--color-fg); }
.hd-brand__tag { font-size: 12px; line-height: 1.1; color: var(--color-fg-muted); }

/* ---------- The band ---------- */
.hd-mast { --hd-mast-2: rgba(255, 255, 255, .78); padding: 48px 0 56px; }
.hd-mast::before { display: none; }
.hd-mast .hd-brandline { display: none; } /* the name lives in the menu */

/* ---------- Top row: story and photos, centred against each other ---------- */
.hd-mast__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hd-mast__period { margin: 0 0 16px; font-size: 14px; color: var(--color-fg-muted); }
.hd-mast__period span { color: var(--color-fg); }
.hd-mast__text .hd-title { max-width: none; font: inherit; letter-spacing: 0; }
.hd-title__line { display: block; }
.hd-title__setup {
  max-width: 30em; font: 400 clamp(18px, 1.9cqi, 22px)/1.45 var(--hd-text); color: var(--hd-mast-2); text-wrap: pretty;
}
.hd-title__main {
  max-width: 12em; margin-top: 16px; text-wrap: balance;
  font: 500 clamp(32px, 4.4cqi, 56px)/1.08 var(--hd-display); letter-spacing: -.02em; color: var(--color-fg);
}
.hd-title .hd-hl { color: var(--hd-mast-accent); }
.hd-title .hd-nowrap { white-space: nowrap; }

/* Photos: now first and largest, with midway and then stacked beside it. The two small ones are square
   and set the height; the large one fills it. */
.hd-mast__photos { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 12px; }
.hd-photo { position: relative; display: flex; flex-direction: column; min-width: 0; }
.hd-photo--now { grid-column: 1; grid-row: 1 / span 2; }
.hd-photo--mid { grid-column: 2; grid-row: 1; }
.hd-photo--then { grid-column: 2; grid-row: 2; }
.hd-photo__img {
  flex: 1 1 auto; aspect-ratio: 1 / 1; min-height: 0;
  background: #2a282e center top / cover no-repeat; border: 1px solid rgba(255, 255, 255, .12);
  opacity: .35; transition: opacity .4s ease-out;
}
.hd-photo--now .hd-photo__img { aspect-ratio: auto; }
.hd-photo__img.is-loaded { opacity: 1; }
.hd-photo--now::after { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; background: var(--hd-mast-accent); }
.hd-photo__tag { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.hd-photo__tag b { font: 600 20px/1 var(--hd-display); letter-spacing: 0; color: var(--color-fg); font-variant-numeric: tabular-nums; }
.hd-photo__tag span { font-size: 12px; color: var(--color-fg-muted); }

/* ---------- Weight card: number left, chart right ---------- */
.hd-mast__fig {
  display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr;
  column-gap: 40px; margin-top: 48px; padding: 24px 24px 12px;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .03);
}
.hd-mast__fig::after { display: none; }
.hd-mast__fig > .hd-hero__cap { grid-column: 1; grid-row: 1; font-size: 14px; color: var(--color-fg-muted); }
.hd-mast__fig > .hd-hero__big { grid-column: 1; grid-row: 2; margin-top: 8px; font-size: clamp(56px, 6cqi, 80px); letter-spacing: -.03em; }
.hd-mast__fig > .hd-hero__from { grid-column: 1; grid-row: 3; margin-top: 8px; font-size: 13px; text-wrap: pretty; }
.hd-mast__fig > .hd-hero__from span { white-space: nowrap; } /* keep each date on one line */
.hd-mast__fig > .hd-hero__chart { grid-column: 2; grid-row: 1 / span 4; min-height: 200px; margin: 0 -4px 0 0; }

/* ---------- Under the card: the summary, then share links and data notes ---------- */
.hd-mast__foot { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; margin-top: 40px; }
.hd-mast__foot .hd-lede { max-width: 36em; margin: 0; font-size: clamp(16px, 1.5cqi, 18px); line-height: 1.6; color: var(--hd-mast-2); }
.hd-mast__foot .hd-lede b { color: var(--color-fg); }
.hd-mast__notes { display: grid; gap: 16px; }
.hd-mast__notes .hd-asof, .hd-mast__notes .hd-fresh { max-width: none; margin: 0; font-size: 13px; line-height: 1.5; color: var(--color-fg-muted); }
.hd-mast__notes .hd-fresh b { color: var(--color-fg); font-weight: 500; }
.hd-mast__notes .hd-jump { color: var(--hd-mast-accent); }

/* Share: one quiet row of text links, none filled */
.hd-mast .hd-share-wrap--mast { margin: 0; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.hd-mast .hd-share__label { margin: 0 0 4px; font-size: 13px; color: var(--color-fg-muted); }
.hd-mast .hd-share--mast { gap: 0 16px; }
.hd-mast .hd-share--mast .hd-share__btn,
.hd-mast .hd-share--mast .hd-share__btn--linkedin {
  padding: 4px 0; border: 0; border-radius: 0; background: none;
  font-size: 14px; color: var(--hd-mast-2); transition: color .15s ease-out;
}
.hd-mast .hd-share--mast .hd-share__btn:hover { background: none; color: var(--color-fg); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Narrower: one column, photos straight after the headline ---------- */
@container hd (max-width: 880px) {
  .hd-mast { padding: 40px 0 48px; }
  .hd-mast__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
  .hd-mast__photos { max-width: 560px; }
  .hd-mast__fig { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; margin-top: 40px; }
  .hd-mast__fig > .hd-hero__chart { grid-column: 1; grid-row: auto; margin: 16px -4px 0; min-height: 192px; }
  .hd-mast__foot { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@container hd (max-width: 600px) {
  .hd-mast { padding: 24px 0 32px; }
  .hd-mast__grid { gap: 24px; }
  .hd-mast__period { margin-bottom: 12px; font-size: 13px; }
  .hd-title__setup { font-size: 17px; }
  .hd-title__main { margin-top: 12px; }
  .hd-mast__photos { gap: 8px; }
  .hd-photo--now::after { width: 8px; height: 8px; }
  .hd-photo__tag { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hd-photo__tag b { font-size: 16px; }
  .hd-mast__fig { margin-top: 32px; padding: 16px 16px 8px; }
  .hd-mast__foot { margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .hd-photo__img, .hd-mast .hd-share--mast .hd-share__btn { transition: none; }
}
