/* Shared page-hero (from design-system) — panel + DS sample both load this. */
.ds-page-hero-stack { display: flex; flex-direction: column; gap: 22px; }
.ds-page-hero {
  --ds-hero-tc: #6ba8e5;
  --ds-hero-tc50: color-mix(in srgb, var(--ds-hero-tc) 16%, var(--surface));
  display: grid;
  /* minmax(0,…): the copy column may shrink below a long one-line title
     (e.g. the guide title row), so the text wraps instead of overflowing. */
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--ds-hero-tc) 22%, transparent) 0%, transparent 42%),
    linear-gradient(135deg, var(--surface) 0%, var(--ds-hero-tc50) 130%);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.ds-page-hero--recipe {
  padding: 28px 30px;
}
.ds-page-hero--recipe .ds-page-hero__title { font-size: 26px; }
.ds-page-hero--sky { --ds-hero-tc: #6ba8e5; }
.ds-page-hero--green { --ds-hero-tc: #5bb89a; }
.ds-page-hero--amber { --ds-hero-tc: #e0a35b; }
.ds-page-hero--lilac { --ds-hero-tc: #9b8fd8; }
.ds-page-hero--mint { --ds-hero-tc: #6dbf8f; }
.ds-page-hero__copy { min-width: 0; display: flex; flex-direction: column; gap: 0; }
.ds-page-hero__eyebrow {
  font-size: 12px; font-weight: 700; color: var(--ds-hero-tc); letter-spacing: .04em;
}
.ds-page-hero__title {
  margin: 8px 0 0; font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.25;
  letter-spacing: -.015em;
}
.ds-page-hero__sub {
  margin: 8px 0 0; font-size: 13.5px; color: var(--text-muted); max-width: 48ch; line-height: 1.65;
}
.ds-page-hero__movers {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.ds-page-hero__mover {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
}
.ds-page-hero__mover span { color: var(--text-muted); }
.ds-page-hero__mover strong { color: var(--text); font-weight: 700; }
.ds-page-hero__mover em {
  font-style: normal; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  color: #2f8a5e; background: var(--green-50, rgba(109, 191, 143, .2));
}
.ds-page-hero__chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.ds-page-hero__chip {
  font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-muted);
}
.ds-page-hero__chip b { color: var(--ds-hero-tc); font-weight: 800; }
.ds-page-hero__visual { flex: 0 0 auto; }

/* Copy-side M–S */
.ds-page-hero-stack__label {
  margin: 18px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px; font-weight: 800; color: var(--text-muted);
  letter-spacing: .06em; text-transform: none;
}
.ds-page-hero-stack__label:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.ds-page-hero-stack__hint {
  margin: -6px 0 4px; font-size: 12.5px; color: var(--text-muted); line-height: 1.6; max-width: 62ch;
}
.ds-page-hero__live-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.ds-page-hero__live-row .ds-page-hero__live { margin-top: 0; }
.ds-page-hero__actions {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center;
}
.ds-page-hero__actions .btn { min-height: 38px; padding-inline: 16px; font-size: 13px; font-weight: 700; }

.ds-page-hero__live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 10px; border-radius: 999px; font-size: 12.5px; color: var(--text);
  background: color-mix(in srgb, var(--ds-hero-tc) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ds-hero-tc) 16%, var(--border));
}
.ds-page-hero__live b { font-weight: 800; color: var(--ds-hero-tc); }
.ds-page-hero__live-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.ds-page-hero__live-dot.is-ok { color: #2f8a5e; background: #2f8a5e; animation: ds-ph-pulse 1.8s ease-in-out infinite; }
.ds-page-hero__live-dot.is-warn { color: #c4892a; background: #e0a35b; animation: ds-ph-pulse 1.8s ease-in-out infinite; }
.ds-page-hero__live--warn {
  color: var(--text-muted);
  background: color-mix(in srgb, #e0a35b 8%, var(--surface));
  border-color: color-mix(in srgb, #e0a35b 22%, var(--border));
}
@keyframes ds-ph-pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 8%, transparent); }
}

.ds-page-hero__crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 2px; font-size: 12px; color: var(--text-muted);
}
.ds-page-hero__crumb a {
  color: var(--text-muted); text-decoration: none; font-weight: 600;
}
.ds-page-hero__crumb a:hover { color: var(--ds-hero-tc); }
.ds-page-hero__crumb strong { color: var(--text); font-weight: 800; }

.ds-page-hero__alert {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 14px; padding: 10px 12px; border-radius: 14px;
  font-size: 12.5px; color: var(--text); line-height: 1.5;
  background: color-mix(in srgb, #e8788c 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #e8788c 28%, var(--border));
}
.ds-page-hero__alert b { font-weight: 800; color: #c45a6e; }
.ds-page-hero__alert-ic {
  width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, #e8788c 18%, #fff); color: #c45a6e; flex-shrink: 0;
}
.ds-page-hero__alert-ic .material-symbols-rounded { font-size: 18px; }
.ds-page-hero__alert > span:nth-child(2) { flex: 1 1 160px; }
.ds-page-hero__alert-go {
  margin-inline-start: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit; font-size: 12px; font-weight: 700;
  color: var(--text); cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.ds-page-hero__alert-go:hover {
  border-color: color-mix(in srgb, #e8788c 40%, var(--border));
  color: #c45a6e;
}

.ds-page-hero__owner {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  padding: 0; max-width: 380px;
  background: transparent; border: 0; box-shadow: none;
}
.ds-page-hero__owner .avatar {
  width: 42px; height: 42px; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.ds-page-hero__owner-meta {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.ds-page-hero__owner-meta strong {
  font-size: 13.5px; font-weight: 800; color: var(--text); line-height: 1.3;
}
.ds-page-hero__owner-meta span {
  font-size: 11.5px; color: var(--text-muted);
}
.ds-page-hero__owner-badge {
  margin-inline-start: auto; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; color: #2f8a5e;
  background: color-mix(in srgb, #6dbf8f 22%, transparent);
}

.ds-page-hero__head-row {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px 16px;
}
/* Period sits with the metric box it controls — above the visual, not beside the title */
.ds-page-hero__visual-stack {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
}
.ds-page-hero__visual-stack .ds-page-hero__period {
  align-self: center;
}
.ds-page-hero__period {
  position: relative;
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  isolation: isolate;
}
.ds-page-hero__period-thumb {
  position: absolute;
  top: 3px; bottom: 3px; left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--ds-hero-tc);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ds-hero-tc) 35%, transparent);
  transform: translateX(0);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), width .22s cubic-bezier(.2, .8, .2, 1);
  pointer-events: none;
  z-index: 0;
}
.ds-page-hero__period button {
  position: relative; z-index: 1;
  border: 0; background: transparent; color: var(--text-muted);
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 7px 13px; border-radius: 999px; cursor: pointer; line-height: 1;
  transition: color .18s ease;
}
.ds-page-hero__period button:hover { color: var(--text); }
.ds-page-hero__period button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ds-hero-tc) 55%, transparent);
  outline-offset: 2px;
}
.ds-page-hero__period button.is-active {
  color: #fff; background: transparent; box-shadow: none;
}
.ds-page-hero__period button:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.ds-page-hero__goal {
  margin-top: 16px; max-width: 400px;
  padding: 0; border: 0; background: transparent; box-shadow: none;
}
.ds-page-hero__goal-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px;
}
.ds-page-hero__goal-meta b {
  font-size: 20px; font-weight: 800; color: var(--text); line-height: 1;
}
.ds-page-hero__goal-track {
  height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ds-hero-tc) 12%, var(--surface-2, #eef1f5)); overflow: hidden;
}
.ds-page-hero__goal-fill {
  height: 100%; border-radius: inherit;
  background: var(--ds-hero-tc);
}
.ds-page-hero__goal-foot {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 8px;
  font-size: 11.5px; color: var(--text-muted);
}
.ds-page-hero__goal-foot em { font-style: normal; font-weight: 700; color: var(--text); }

/* Visual A — orb */
.ds-ph-orb {
  position: relative; width: 150px; height: 150px; display: grid; place-items: center;
}
.ds-ph-orb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ds-ph-orb__center { text-align: center; z-index: 1; }
.ds-ph-orb__center b { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; }
.ds-ph-orb__center b em { font-size: 15px; font-style: normal; color: var(--text-muted); }
.ds-ph-orb__center small {
  display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); max-width: 110px;
}

/* Visual B — gauge */
.ds-ph-gauge { width: 190px; text-align: center; }
.ds-ph-gauge svg { width: 100%; height: auto; overflow: visible; }
.ds-ph-gauge__cap { margin-top: -14px; }
.ds-ph-gauge__cap b { font-size: 30px; font-weight: 800; color: var(--text); }
.ds-ph-gauge__cap b em { font-size: 15px; font-style: normal; color: var(--text-muted); }
.ds-ph-gauge__cap small {
  display: block; font-size: 11px; color: var(--text-muted); max-width: 170px; margin: 3px auto 0;
}

/* Visual C — bigstat */
.ds-ph-bigstat {
  width: 244px; padding: 18px 18px 16px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--ds-hero-tc); display: flex; flex-direction: column; gap: 2px;
}
.ds-ph-bigstat__lbl {
  font-size: 12.5px; color: var(--text-muted); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.ds-ph-bigstat__ic {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--ds-hero-tc50); color: var(--ds-hero-tc); flex-shrink: 0;
}
.ds-ph-bigstat__ic .ds-ico { width: 16px; height: 16px; display: block; color: inherit; }
.ds-ph-bigstat__num {
  font-size: 36px; font-weight: 800; color: var(--text); line-height: 1.1; margin: 8px 0 4px;
}
.ds-ph-bigstat__foot { font-size: 11.5px; color: var(--text-faint); min-height: 18px; }
.ds-ph-bigstat__spark { margin: 10px 0 4px; height: 40px; }
.ds-ph-bigstat__spark svg { width: 100%; height: 100%; display: block; }
.ds-ph-bigstat__pill {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px; padding: 7px 12px; border-radius: 12px; background: var(--ds-hero-tc50); font-size: 12px;
}
.ds-ph-bigstat__pill span { color: var(--text-muted); }
.ds-ph-bigstat__pill b { color: var(--ds-hero-tc); font-weight: 800; font-size: 15px; }

/* Visual D — spark trio */
.ds-ph-trio { width: 262px; display: flex; flex-direction: column; gap: 8px; }
.ds-ph-trio__head {
  padding: 10px 14px; border-radius: 14px; background: var(--ds-hero-tc50);
  display: flex; align-items: baseline; gap: 8px;
}
.ds-ph-trio__head b { font-size: 22px; font-weight: 800; color: var(--ds-hero-tc); }
.ds-ph-trio__head small { font-size: 11px; color: var(--text-muted); }
.ds-ph-trio__row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px;
  padding: 9px 12px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-xs); border-inline-start: 3px solid var(--ds-hero-tc);
}
.ds-ph-trio__row span { font-size: 11.5px; color: var(--text-muted); }
.ds-ph-trio__row strong { font-size: 14px; font-weight: 800; color: var(--text); }
.ds-ph-trio__spark { grid-column: 1 / -1; height: 26px; margin-top: 4px; }
.ds-ph-trio__spark svg { width: 100%; height: 100%; display: block; }

/* Visual E — bars card */
.ds-ph-bars {
  width: 244px; padding: 16px 18px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.ds-ph-bars__title {
  font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.ds-ph-bars__title .ds-ph-bigstat__ic { width: 26px; height: 26px; }
.ds-ph-bars__row { display: grid; grid-template-columns: 72px 1fr 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.ds-ph-bars__row span { font-size: 11px; color: var(--text-muted); }
.ds-ph-bars__row b { font-size: 11px; font-weight: 800; color: var(--text); text-align: end; }
.ds-ph-bars__track {
  height: 8px; border-radius: 999px; background: var(--surface-2, #eef2f6); overflow: hidden;
}
.ds-ph-bars__fill { height: 100%; border-radius: inherit; background: var(--ds-hero-tc); }

/* Visual F — donut + legend */
.ds-ph-donut {
  width: 248px; padding: 16px 18px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
}
.ds-ph-donut__chart { position: relative; width: 96px; height: 96px; }
.ds-ph-donut__chart svg { width: 100%; height: 100%; }
.ds-ph-donut__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; pointer-events: none;
  /* Keep label stack inside the hole — do not stretch to ring edges */
}
.ds-ph-donut__center b {
  font-size: 16px; font-weight: 800; color: var(--text); line-height: 1; display: block;
}
.ds-ph-donut__center small {
  font-size: 10px; color: var(--text-muted); line-height: 1; display: block;
}
.ds-ph-donut__legend { display: flex; flex-direction: column; gap: 7px; }
.ds-ph-donut__item {
  display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-muted);
}
.ds-ph-donut__item i {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; font-style: normal;
}
.ds-ph-donut__item b { margin-inline-start: auto; color: var(--text); font-weight: 800; }

/* Visual G — 2×2 mosaic */
.ds-ph-mosaic {
  width: 248px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.ds-ph-mosaic__cell {
  padding: 12px 12px 10px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column; gap: 4px; min-height: 78px;
}
.ds-ph-mosaic__cell span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.ds-ph-mosaic__cell strong { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.ds-ph-mosaic__cell em {
  font-style: normal; font-size: 10.5px; font-weight: 700; color: #2f8a5e;
}
.ds-ph-mosaic__cell em.is-down { color: #b14458; }
.ds-ph-mosaic__cell:nth-child(1) { border-top: 3px solid var(--ds-hero-tc); }
.ds-ph-mosaic__cell:nth-child(2) { border-top: 3px solid #5bb89a; }
.ds-ph-mosaic__cell:nth-child(3) { border-top: 3px solid #e0a35b; }
.ds-ph-mosaic__cell:nth-child(4) { border-top: 3px solid #9b8fd8; }

/* Visual H — week heat */
.ds-ph-heat {
  width: 248px; padding: 16px 18px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.ds-ph-heat__title {
  font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.ds-ph-heat__title small { font-weight: 600; color: var(--text-muted); font-size: 11px; }
.ds-ph-heat__grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
}
.ds-ph-heat__cell {
  aspect-ratio: 1; border-radius: 7px;
  background: color-mix(in srgb, var(--ds-hero-tc) calc(var(--lvl, 1) * 18%), var(--surface-2, #eef2f6));
}
.ds-ph-heat__days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 6px;
}
.ds-ph-heat__days span {
  font-size: 9.5px; color: var(--text-faint); text-align: center; font-weight: 600;
}

/* Visual I — compare A/B */
.ds-ph-compare {
  width: 248px; padding: 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch;
}
.ds-ph-compare__side {
  padding: 12px 10px; border-radius: 14px; text-align: center;
  background: var(--ds-hero-tc50);
}
.ds-ph-compare__side.is-b {
  background: color-mix(in srgb, #5bb89a 16%, var(--surface));
}
.ds-ph-compare__side small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 600; }
.ds-ph-compare__side strong {
  display: block; margin-top: 6px; font-size: 22px; font-weight: 800; color: var(--text);
}
.ds-ph-compare__side em {
  display: inline-block; margin-top: 6px; font-style: normal; font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; color: #2f8a5e; background: rgba(109, 191, 143, .22);
}
.ds-ph-compare__vs {
  align-self: center; font-size: 11px; font-weight: 800; color: var(--text-faint);
}

/* Visual J — timeline */
.ds-ph-timeline {
  width: 260px; padding: 14px 16px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.ds-ph-timeline__title {
  font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0 0 12px;
}
.ds-ph-timeline__list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.ds-ph-timeline__item {
  display: grid; grid-template-columns: 14px 1fr; gap: 10px; position: relative;
  padding-bottom: 12px;
}
.ds-ph-timeline__item:last-child { padding-bottom: 0; }
.ds-ph-timeline__item::before {
  content: ''; position: absolute; top: 10px; bottom: 0; inset-inline-start: 5px;
  width: 2px; background: var(--border);
}
.ds-ph-timeline__item:last-child::before { display: none; }
.ds-ph-timeline__dot {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 3px;
  background: var(--ds-hero-tc); box-shadow: 0 0 0 3px var(--ds-hero-tc50); position: relative; z-index: 1;
}
.ds-ph-timeline__item strong { display: block; font-size: 12px; font-weight: 700; color: var(--text); }
.ds-ph-timeline__item span { font-size: 11px; color: var(--text-muted); }

/* Visual K — ring cluster */
.ds-ph-rings {
  width: 248px; padding: 16px 14px 14px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; justify-content: space-between; gap: 6px;
}
.ds-ph-rings__item { flex: 1; text-align: center; }
.ds-ph-rings__chart {
  position: relative; width: 68px; height: 68px; margin: 0 auto 6px;
}
.ds-ph-rings__chart svg { width: 100%; height: 100%; }
.ds-ph-rings__chart b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--text);
}
.ds-ph-rings__item small { font-size: 10.5px; color: var(--text-muted); font-weight: 600; }

/* Visual L — colored badge cluster */
.ds-ph-badges {
  width: 260px; padding: 16px 18px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.ds-ph-badges__title {
  font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0 0 12px;
}
.ds-ph-badges__cloud {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.ds-ph-badges__cloud .chip {
  margin: 0; font-size: 12px; font-weight: 700; padding: 6px 12px;
}
.ds-ph-badges__foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11px; color: var(--text-muted);
}
.ds-ph-badges__foot b { color: var(--ds-hero-tc); font-weight: 800; }

.ds-page-hero--rose { --ds-hero-tc: #e8788c; }
.ds-page-hero--peach { --ds-hero-tc: #f4a261; }
.ds-page-hero--slate { --ds-hero-tc: #7a8799; }

.ds-page-hero__variant-tag {
  position: absolute; top: 12px; inset-inline-end: 14px;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  color: var(--text-muted); z-index: 2; backdrop-filter: blur(6px);
}
.ds-page-hero--recipe .ds-page-hero__variant-tag {
  color: var(--ds-hero-tc);
  border-color: color-mix(in srgb, var(--ds-hero-tc) 28%, var(--border));
}

@media (max-width: 900px) {
  .ds-hero--split,
  .ds-page-hero { grid-template-columns: minmax(0, 1fr); }
  .ds-hero__aside,
  .ds-page-hero__visual { justify-self: start; }
}

/* Compact hero (smart layout rule): a hero that carries only eyebrow, title
   and description has nothing to show on its far side, so the description
   moves there, facing the title, and the hero takes about half the height.
   Tablets keep this layout; only a phone stacks the description under the title. */
@media (min-width: 601px) {
  .ds-page-hero:not(:has(> :not(.ds-page-hero__copy))):not(:has(> .ds-page-hero__copy > :not(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row, .ds-page-hero__sub))) {
    padding-block: 14px;
  }
  .ds-page-hero:not(:has(> :not(.ds-page-hero__copy))):not(:has(> .ds-page-hero__copy > :not(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row, .ds-page-hero__sub))) > .ds-page-hero__copy {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 32px;
    align-items: center;
  }
  .ds-page-hero:not(:has(> :not(.ds-page-hero__copy))):not(:has(> .ds-page-hero__copy > :not(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row, .ds-page-hero__sub))) > .ds-page-hero__copy > :is(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row) {
    grid-column: 1;
  }
  .ds-page-hero:not(:has(> :not(.ds-page-hero__copy))):not(:has(> .ds-page-hero__copy > :not(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row, .ds-page-hero__sub))) > .ds-page-hero__copy > :is(.ds-page-hero__title, .gex-title-row) {
    margin-block-start: 2px;
  }
  .ds-page-hero:not(:has(> :not(.ds-page-hero__copy))):not(:has(> .ds-page-hero__copy > :not(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row, .ds-page-hero__sub))) > .ds-page-hero__copy > .ds-page-hero__sub {
    /* Same row as the title, one line while it fits, otherwise two even lines. */
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    margin: 0;
    max-width: none;
    text-align: left;
    text-wrap: balance;
  }
  .ds-page-hero:not(:has(> :not(.ds-page-hero__copy))):not(:has(> .ds-page-hero__copy > :not(.ds-page-hero__eyebrow, .ds-page-hero__title, .gex-title-row, .ds-page-hero__sub))) > .ds-page-hero__copy:not(:has(> .ds-page-hero__eyebrow)) > .ds-page-hero__sub {
    grid-row: 1;
  }
}

/* Compact hero for every header family (ds-hero-compact.js marks a header that
   has only eyebrow, title and description). Same result as the rule above. */
@media (min-width: 601px) {
  [data-ds-hero-compact] { padding-block: 14px !important; min-height: 0 !important; }
  [data-ds-hero-compact] [data-ds-hero-copy],
  [data-ds-hero-compact][data-ds-hero-copy] {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 32px;
    row-gap: 2px;
    align-items: center;
  }
  [data-ds-hero-compact] [data-ds-hero-copy] {
    flex: 1 1 auto;
    grid-column: 1 / -1;
    inline-size: 100%;
    max-inline-size: none;
    min-inline-size: 0;
  }
  [data-ds-hero-compact] [data-ds-hero-copy] > *,
  [data-ds-hero-compact][data-ds-hero-copy] > * { grid-column: 1; }
  [data-ds-hero-compact] [data-ds-hero-copy] > [data-ds-hero-sub],
  [data-ds-hero-compact][data-ds-hero-copy] > [data-ds-hero-sub] {
    grid-column: 2;
    align-self: center;
    justify-self: end;
    margin: 0 !important;
    max-width: none !important;
    text-align: left;
    text-wrap: balance;
  }
}
