/* ──────────────────────────────────────────────────────────────────────
   page-hero.css — the page title card, one shape for every page.

   Rendered by components/layout/page_hero.html and nothing else. Moved here
   from device-detail.css on 2026-10-30 when the gateways hero became the
   title for every page: that file's --device-gray-* tokens are scoped to a
   list of page wrappers, so `border: 1px solid var(--device-gray-200)`
   resolved on gateways and devices and was INVALID everywhere else — the
   alerts hero measured a 0px border, and product models would have had
   none. These rules use the root tokens the scale mapped to.

   Measured reference (gateways, 2026-10-30): 1px border, 18px/20px padding,
   30px title, 16px margin below, 28px from the breadcrumb row above.
   ────────────────────────────────────────────────────────────────────── */
.dd-hero {
    background: var(--bg-card);
    border: 1px solid var(--border-base);
    border-radius: 0.75rem;
    padding: 1.125rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dd-hero-title-block {
    min-width: 0;
}

.dd-hero-title {
    /* Canonical page-title typography — Ubuntu Sans Medium 30px, matching
       ``.patitur-main-page-title`` (design-tokens.css §h1) in font/size/weight.
       COLOUR intentionally diverges: detail-hero titles use near-black
       ``--fg-1`` rather than brand-green, because the big green wordmark read
       as a link (link green ``var(--link-internal-fg)`` is a near-identical shade). Keeping the
       type but dropping the green removes that "is this heading clickable?"
       ambiguity while list-page titles keep the brand-green macro. Scoped,
       deliberate deviation from the one-colour title convention — not drift.
       Layout properties (inline-flex + gap + flex-wrap) stay so the title sits
       beside the EUI badge / pill cluster inside the hero card. */
    font-family: var(--font-display);
    font-weight: var(--fw-medium);
    font-size: var(--fs-2xl);
    line-height: var(--lh-snug); /* 39px. Was a bare 28px — a line box SMALLER
       than the 30px text, so a wrapping title overlapped its own next line.
       Matches the h2 rule's --lh-snug and what the four `leading-tight` call
       sites were reaching for; those never applied, because this stylesheet
       loads after Tailwind's CDN and won on source order. */
    color: var(--fg-1);
    letter-spacing: normal;
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dd-hero-eui {
    font-family:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--fg-4);
}

.dd-hero-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.dd-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* The hero as the head of a card (page_hero(flush=true)): the card already
   draws the border and the corners, and its body scrolls under this. */
.dd-hero--flush {
    border: 0;
    border-bottom: 1px solid var(--border-base);
    border-radius: 0;
    margin-bottom: 0;
    padding: 1.25rem 1.5rem;
}

/* A glyph or an image before the title block ("lead" slot). */
.dd-hero-lead {
    flex: 0 0 auto;
}

.dd-hero:has(> .dd-hero-lead) {
    justify-content: flex-start;
}

.dd-hero:has(> .dd-hero-lead) > .dd-hero-title-block {
    flex: 1 1 0;
}
