/* ==========================================================================
   blocks.css — Gutenberg core block styling in helloagain CI
   ========================================================================== */

/* ---------- Global Content Wrapper ---------- */
.ha-blog-content {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    color: var(--ha-gray-800, rgb(38, 45, 53));
    line-height: 1.6;
}

/* ---------- Containers ---------- */
.ha-container {
    width: 100%;
    max-width: 1536px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .ha-container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1024px) {
    .ha-container {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

.ha-container--narrow {
    max-width: 1000px;
}

/* ---------- Single Post Hero Section ---------- */
.ha-article__hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    padding: 6rem 0 2.5rem;
    margin-top: -5rem; /* compensate for .ha-blog-content margin-top */
    overflow: hidden;
}

@media (min-width: 1280px) {
    .ha-article__hero {
        margin-top: -8rem;
    }
}

.ha-article__hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.ha-article__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(38, 45, 53, 0.85) 0%, rgba(38, 45, 53, 0.4) 60%, rgba(38, 45, 53, 0.2) 100%);
    z-index: 1;
}

.ha-article__hero-content {
    position: relative;
    z-index: 2;
}

.ha-article__hero .ha-article__title {
    color: #fff;
    margin-bottom: 0.75rem;
}

.ha-article__meta--light {
    color: rgba(255, 255, 255, 0.85);
}

.ha-article__meta--light .ha-article__meta-sep {
    color: rgba(255, 255, 255, 0.5);
}

.ha-card__badge--light {
    background-color: rgba(0, 167, 225, 0.9);
    color: #fff;
}

@media (min-width: 768px) {
    .ha-article__hero {
        min-height: 420px;
        padding: 4rem 0 3rem;
    }
}

/* ---------- Blog Hero (Archive) — branded ----------
   Pull the hero up to cancel the .ha-blog-content top offset so its swoosh
   background starts at y=0 and flows seamlessly behind the floating header.
   Internal padding-top then pushes the text below the header. */
.ha-blog-hero {
    position: relative;
    /* Clip the decorative swoosh horizontally, but let the search typeahead
       dropdown escape downward over the dark band below (overflow:hidden would
       clip it). clip on one axis keeps the other truly visible. */
    overflow-x: clip;
    overflow-y: visible;
    margin-top: -6.5rem;                      /* cancels .ha-blog-content margin-top (mobile) */
    /* Top padding only clears the fixed header; the breathing room above the
       content comes from the flexible height (min-height + centering), so the
       hero grows with its content instead of being a fixed-tall box. */
    padding: 6.5rem 0 2rem;
    min-height: 32rem;                        /* floor — hero grows taller if content needs it */
    display: flex;
    flex-direction: column;
    justify-content: center;                  /* center content vertically within the flexible height */
    align-items: center;
    text-align: center;
    margin-bottom: -2px;                      /* seamless join into the filter band */
}

@media (min-width: 1280px) {
    .ha-blog-hero {
        margin-top: -9.5rem;                  /* matches .ha-blog-content xl offset */
        padding-top: 7.5rem;
    }
}

/* Original helloagain full-bleed hero swoosh (minihero-bg-default.svg) —
   cover, anchored to the bottom so the curves fill the hero band, both sides. */
.ha-blog-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: url("../img/minihero-bg.svg?v=8") no-repeat center bottom;
    background-size: cover;
    pointer-events: none;
}

.ha-blog-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.ha-blog-hero__eyebrow {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));  /* matches original */
    margin: 0 0 0.75rem;
}

.ha-blog-hero__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 300;   /* original hero H1 is light, not bold */
    font-size: clamp(2.25rem, 3vw + 1rem, 3rem);
    line-height: 1.2;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin: 0 0 1rem;
    /* Long German compounds (e.g. search terms like "Kundenbindungsmaßnahmen")
       must wrap instead of overflowing the viewport. */
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Hero H1 a touch bigger than body h1s for visual hierarchy. Higher specificity
   than `.ha-blog-content h1` (0,1,1) so the hero title isn't capped to its size. */
.ha-blog-content .ha-blog-hero__title {
    font-size: clamp(2.5rem, 4vw, 3.25rem);
    font-weight: 700; /* keep current bold look (a stale rule used to set this) */
}

.ha-blog-hero__title-grad {
    background: linear-gradient(100deg, rgb(0, 167, 225) 0%, rgb(139, 199, 83) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ha-blog-hero__subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin: 0 auto;
    max-width: 620px;
}

/* Continuous light-gray page background behind the filter band and the cards,
   so the dark band's clip-path curve and the gap below it reveal gray (not the
   white body). The hero stays white. */
.ha-blog-content {
    background-color: rgb(245, 246, 247);
}

.ha-blog-hero {
    background-color: #fff;
}

/* ---------- Category filter (draft-style pill chips on light bg) ----------
   Small rounded pills — icon + label + post-count badge — wrapping in a row on
   the light-gray content background. Active pill = helloagain gradient. */
.ha-blog-filter {
    position: relative;
    padding: 2.25rem 0 0.5rem;   /* sits on the gray .ha-blog-content */
}

.ha-blog-filter__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
    padding: 0.25rem 1rem;
}

.ha-blog-filter__tile {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;       /* full pill */
    background: #fff;
    border: 1px solid rgb(229, 231, 234);
    color: var(--ha-gray-800, rgb(38, 45, 53));
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

/* Lift via shadow + border, never transform (keeps it compositor-safe). */
.ha-blog-filter__tile:hover {
    border-color: rgb(0, 167, 225);
    box-shadow: 0 4px 12px rgba(20, 56, 82, 0.1);
}

.ha-blog-filter__tile.is-active {
    background: linear-gradient(100deg, rgb(0, 167, 225) 0%, rgb(139, 199, 83) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 167, 225, 0.25);
}

.ha-blog-filter__icon {
    display: inline-flex;
}

.ha-blog-filter__icon svg {
    width: 1.375rem;           /* 22px inline icon */
    height: 1.375rem;
}

.ha-blog-filter__label {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.ha-blog-filter__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.4rem;
    border-radius: 9999px;
    background: rgb(237, 239, 241);
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-size: 0.75rem;
    font-weight: 600;
}

.ha-blog-filter__tile.is-active .ha-blog-filter__count {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

@media (max-width: 640px) {
    .ha-blog-filter__inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;            /* horizontal scroll on small screens */
    }
}

/* ---------- Buttons & tags: regular weight, never bold (briefing #9) ----------
   Deliberate global override of the design's button/tag font-weights to 400.
   !important so it wins regardless of per-component rules and CSS load order. */
.ha-blog-filter__tile,
.ha-blog-filter__label,
.ha-blog-filter__count,
.ha-card__badge,
.ha-card__cta,
.ha-blog-content .wp-block-button .wp-element-button,
.ha-blog-content .wp-block-button .wp-block-button__link,
.hab-cta-box__button,
.hab-link-grid__btn,
.hab-related-links__cta,
.ha-prefooter-cta__btn,
.ha-single__cat,
.ha-single__tags a,
.ha-share__btn,
.ha-search-suggest__chip,
.ha-search-suggest__cat,
.ha-search-empty__cat {
    font-weight: 400 !important;
}

/* ---------- Headings (h1-h4) ---------- */
.ha-blog-content h1,
.ha-blog-content .wp-block-heading:where(h1) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1rem;
}

.ha-blog-content h2,
.ha-blog-content .wp-block-heading:where(h2) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.ha-blog-content h3,
.ha-blog-content .wp-block-heading:where(h3) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.25;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.ha-blog-content h4,
.ha-blog-content .wp-block-heading:where(h4) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.3;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ---------- Paragraphs ---------- */
.ha-blog-content p,
.ha-blog-content .wp-block-paragraph {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1.25rem;
    margin-top: 0.25rem;
}

/* ---------- Links ---------- */
.ha-blog-content .ha-article__content a,
.ha-blog-content .ha-page__content a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.ha-blog-content .ha-article__content a:hover,
.ha-blog-content .ha-page__content a:hover {
    color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* ---------- Lists (ul, ol) ---------- */
.ha-blog-content ul:not([class]),
.ha-blog-content .wp-block-list:where(ul) {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.ha-blog-content ol:not([class]),
.ha-blog-content .wp-block-list:where(ol) {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.ha-blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 1rem; /* match body paragraphs (was inheriting 1.125rem) */
}

.ha-blog-content li::marker {
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

/* ---------- Blockquote ---------- */
.ha-blog-content blockquote,
.ha-blog-content .wp-block-quote {
    border-left: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    background-color: #f7fcfe;
    border-radius: 0 0.5rem 0.5rem 0;
}

.ha-blog-content .wp-block-quote p {
    margin-bottom: 0.5rem;
}

.ha-blog-content .wp-block-quote p:last-child {
    margin-bottom: 0;
}

.ha-blog-content .wp-block-quote cite,
.ha-blog-content .wp-block-quote .wp-block-quote__citation {
    display: block;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-top: 0.75rem;
}

/* ---------- Pullquote ---------- */
.ha-blog-content .wp-block-pullquote {
    border-top: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    border-bottom: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    border-left: none;
    border-right: none;
    padding: 2rem 0;
    margin: 2rem 0;
    text-align: center;
}

.ha-blog-content .wp-block-pullquote blockquote {
    border-left: none;
    background: none;
    padding: 0;
    margin: 0;
}

.ha-blog-content .wp-block-pullquote p {
    font-size: 1.5rem;
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 300;
    font-style: italic;
    line-height: 1.4;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.ha-blog-content .wp-block-pullquote cite {
    font-size: 0.875rem;
    font-style: normal;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ---------- Separator / HR ---------- */
.ha-blog-content hr,
.ha-blog-content .wp-block-separator {
    border: none;
    border-top: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    margin: 2rem 0;
}

.ha-blog-content .wp-block-separator.is-style-wide {
    border-top-width: 2px;
}

.ha-blog-content .wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
    line-height: 1;
}

.ha-blog-content .wp-block-separator.is-style-dots::before {
    content: "\00b7 \00b7 \00b7";
    font-size: 1.5rem;
    letter-spacing: 1rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ha-wide custom style */
.ha-blog-content .wp-block-separator.is-style-ha-wide {
    border-top-width: 2px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Image ---------- */
.ha-blog-content .wp-block-image {
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-image img {
    border-radius: 0.75rem;
    height: auto;
    max-width: 100%;
}

.ha-blog-content .wp-block-image.is-style-ha-rounded img {
    border-radius: 1rem;
}

.ha-blog-content .wp-block-image figcaption {
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ---------- Gallery ---------- */
.ha-blog-content .wp-block-gallery {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-gallery.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ha-blog-content .wp-block-gallery.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ha-blog-content .wp-block-gallery.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 640px) {
    .ha-blog-content .wp-block-gallery.columns-3,
    .ha-blog-content .wp-block-gallery.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ha-blog-content .wp-block-gallery .wp-block-image {
    margin: 0;
}

.ha-blog-content .wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Table ---------- */
.ha-blog-content .wp-block-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.ha-blog-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.ha-blog-content .wp-block-table th {
    background-color: var(--ha-gray-200, rgb(230, 232, 235));
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
}

.ha-blog-content .wp-block-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
}

.ha-blog-content .wp-block-table tbody tr:nth-child(even) {
    background-color: #f9f9fa;
}

/* ---------- Columns ---------- */
.ha-blog-content .wp-block-columns {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .ha-blog-content .wp-block-columns {
        flex-direction: column;
        gap: 1rem;
    }
}

.ha-blog-content .wp-block-column {
    flex: 1;
}

/* ---------- Video ---------- */
.ha-blog-content .wp-block-video,
.ha-blog-content .wp-block-embed {
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-video video {
    max-width: 100%;
    border-radius: 0.75rem;
}

.ha-blog-content .wp-block-embed .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
}

.ha-blog-content .wp-block-embed .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ---------- Cover ---------- */
.ha-blog-content .wp-block-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 2rem;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: var(--ha-gray-800, rgb(38, 45, 53));
}

.ha-blog-content .wp-block-cover .wp-block-cover__background,
.ha-blog-content .wp-block-cover .has-background-dim {
    position: absolute;
    inset: 0;
    background-color: rgba(38, 45, 53, 0.5);
}

.ha-blog-content .wp-block-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 1;
    color: var(--ha-white, #ffffff);
    text-align: center;
}

.ha-blog-content .wp-block-cover .wp-block-cover__inner-container h2,
.ha-blog-content .wp-block-cover .wp-block-cover__inner-container h3,
.ha-blog-content .wp-block-cover .wp-block-cover__inner-container p {
    color: var(--ha-white, #ffffff);
}

/* ---------- Code Block ---------- */
.ha-blog-content pre,
.ha-blog-content .wp-block-code {
    background-color: #f6f7f8;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.ha-blog-content pre code,
.ha-blog-content .wp-block-code code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    background: none;
    padding: 0;
    border-radius: 0;
}

.ha-blog-content :not(pre) > code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    background-color: #f5f6f7;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

/* ---------- Buttons ---------- */
.ha-blog-content .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-button .wp-block-button__link,
.ha-blog-content .wp-block-button .wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border-radius: 1.5rem;
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
    border: 2px solid transparent;
}

.ha-blog-content .wp-block-button .wp-block-button__link:hover,
.ha-blog-content .wp-block-button .wp-element-button:hover {
    background-color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* Primary style */
.ha-blog-content .wp-block-button.is-style-ha-primary .wp-block-button__link {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

.ha-blog-content .wp-block-button.is-style-ha-primary .wp-block-button__link:hover {
    background-color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* Secondary / outline style */
.ha-blog-content .wp-block-button.is-style-ha-secondary .wp-block-button__link {
    background-color: transparent;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    border: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
}

.ha-blog-content .wp-block-button.is-style-ha-secondary .wp-block-button__link:hover {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

/* Outline style (default WP) */
.ha-blog-content .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    border: 2px solid currentColor;
}

.ha-blog-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

/* ---------- Group Block ---------- */
.ha-blog-content .wp-block-group {
    margin: 1.5rem 0;
}

/* CTA Box pattern */
.ha-blog-content .ha-cta-box {
    background-color: var(--ha-blue-100, rgb(204, 237, 249));
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.ha-blog-content .ha-cta-box h3 {
    margin-top: 0;
}

/* Info Box pattern */
.ha-blog-content .ha-info-box {
    background-color: #f0fafd;
    border-left: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    padding: 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
}

.ha-blog-content .ha-info-box h4 {
    margin-top: 0;
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

/* ---------- Wide / Full Alignments ---------- */
.ha-blog-content .alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ha-blog-content .alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ---------- Article Layout ---------- */
.ha-article__header {
    padding: 2rem 0 1.5rem;
}

.ha-article__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.ha-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

.ha-article__meta-sep {
    color: var(--ha-gray-200, rgb(230, 232, 235));
}

.ha-article__author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ha-article__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
}

.ha-article__featured-image {
    margin-bottom: 2rem;
}

.ha-article__hero-img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.ha-article__content {
    padding-bottom: 2rem;
}

/* ---------- Author Box ---------- */
.ha-article__author-box {
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
}

.ha-author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.ha-author-box__avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.ha-author-box__label {
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-bottom: 0.125rem;
}

.ha-author-box__name {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 0.375rem;
}

.ha-author-box__bio {
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    line-height: 1.5;
}

/* ---------- Related Posts ---------- */
.ha-related-posts {
    padding: 3rem 0;
    background-color: #fbfcfc;
}

.ha-related-posts__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1.5rem;
}

/* ---------- Breadcrumbs ---------- */
.ha-breadcrumbs {
    max-width: 1000px;
    margin: 1.5rem auto 1.5rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

.ha-breadcrumbs a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: none;
}

.ha-breadcrumbs a:hover {
    text-decoration: underline;
}

/* ---------- Pagination ---------- */
.ha-pagination {
    padding: 2rem 0 3rem;
    text-align: center;
}

.ha-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
}

.ha-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.ha-pagination .page-numbers:hover {
    background-color: var(--ha-gray-200, rgb(230, 232, 235));
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.ha-pagination .page-numbers.current {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

.ha-pagination .prev,
.ha-pagination .next {
    font-weight: 500;
}

/* ---------- No Posts ---------- */
.ha-no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ---------- 404 Page ---------- */
.ha-404 {
    text-align: center;
    padding: 6rem 0;
}

.ha-404__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1rem;
}

.ha-404__text {
    font-size: 1.125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-bottom: 2rem;
}

.ha-404__link {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
    border-radius: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.ha-404__link:hover {
    background-color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* ---------- Generic Page ---------- */
.ha-page {
    padding: 2rem 0 3rem;
}

.ha-page__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1.5rem;
}

/* ---------- TOC Styling ---------- */
.ha-toc {
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
    background-color: #fdfdfd;
}

.ha-toc__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 0.75rem;
}

.ha-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ha-toc__list li {
    margin-bottom: 0.375rem;
}

.ha-toc__list li a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.ha-toc__list li a:hover {
    color: var(--ha-blue-600, rgb(46, 124, 192));
    text-decoration: underline;
}

.ha-toc__list li.ha-toc__item--h3 {
    padding-left: 1rem;
}

.ha-toc__list li.ha-toc__item--h3 a {
    font-size: 0.875rem;
}

/* ─── Block styles added 2026-05-27 ─────────────────────────────────── */

/* Blocksatz — briefing §1 */
.wp-block-paragraph.is-style-ha-justify {
    text-align: justify;
    hyphens: auto;
}

/* Sticky-head table — briefing §4 */
.wp-block-table.is-style-ha-sticky-head table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table.is-style-ha-sticky-head thead th {
    position: sticky;
    top: 0;
    background: var(--ha-blue-100, rgb(204, 237, 249));
    color: var(--ha-gray-800, rgb(38, 45, 53));
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
    z-index: 1;
}

.wp-block-table.is-style-ha-sticky-head td,
.wp-block-table.is-style-ha-sticky-head th {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
}

.wp-block-table.is-style-ha-sticky-head tr:hover td {
    background: #f2fbfe;
}

/* Large quote variant */
.wp-block-quote.is-style-ha-large {
    font-size: 1.5rem;
    line-height: 1.4;
    padding-left: 1.5rem;
    border-left-width: 6px;
}

.wp-block-quote.is-style-ha-large cite {
    font-size: 0.9375rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-style: normal;
}

/* ─── hab/image-text ────────────────────────────────────────────────── */

.hab-image-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.hab-image-text--right {
    direction: rtl;
}

.hab-image-text--right > * {
    direction: ltr;
}

.hab-image-text__media {
    margin: 0;
}

.hab-image-text__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

.hab-image-text__caption {
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-top: 0.5rem;
    text-align: center;
}

.hab-image-text__body > :first-child {
    margin-top: 0;
}

.hab-image-text__body > :last-child {
    margin-bottom: 0;
}

.hab-image-text__placeholder {
    aspect-ratio: 16 / 10;
    background: var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-family: 'BrutalType', sans-serif;
}

@media (max-width: 720px) {
    .hab-image-text,
    .hab-image-text--right {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}

/* ─── hab/toc (updated 2026-05-27) ────────────────────────────────── */

.hab-toc__title {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 0 0.75rem 0;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    cursor: pointer;
}

.hab-toc__details {
    margin: 0;
}

.hab-toc__details summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hab-toc__details summary::-webkit-details-marker {
    display: none;
}

.hab-toc__details summary::after {
    content: "▾";
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    transition: transform 0.2s;
}

.hab-toc__details:not([open]) summary::after {
    transform: rotate(-90deg);
}

.hab-toc__placeholder {
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin: 0;
    font-size: 0.9375rem;
}

.hab-toc__item--h4 {
    padding-left: 2rem;
}

.hab-toc__item--h4 a {
    font-size: 0.8125rem;
}

/* Auto-collapse on mobile */
@media (max-width: 720px) {
    .hab-toc--collapsible .hab-toc__details:not([open]) summary::after {
        transform: rotate(-90deg);
    }
}

/* ─── Brand gradient heading text (.ha-gradient) ─────────────────────── */
/* Mirrors helloagain's .editor-gradient: blue→green clipped to the text. */
.ha-gradient {
    background-image: linear-gradient(to right, #00a7e1, #8bc753);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    color: transparent;
}

/* ─── hab/link-grid ──────────────────────────────────────────────────── */

.hab-link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 2.75rem 0;
    border-radius: 1.5rem;
    overflow: hidden;
    scroll-margin-top: 96px;
}

@media (min-width: 720px) {
    .hab-link-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hab-link-grid__card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 3rem 2rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

@media (min-width: 1280px) {
    .hab-link-grid__card {
        padding: 3rem;
    }
}

/* helloagain card background tokens */
.hab-link-grid__card--blue-50   { background: #e5f6fc; }
.hab-link-grid__card--blue-100  { background: var(--ha-blue-100, rgb(204, 237, 249)); }
.hab-link-grid__card--green-100 { background: #d1e9ba; }
.hab-link-grid__card--gray-100  { background: #e6e8eb; }
.hab-link-grid__card--gray-50   { background: #f1f2f4; }

.hab-link-grid__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.25;
    margin: 0 0 1rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-link-grid__body {
    line-height: 1.6;
}

.hab-link-grid__body > :first-child { margin-top: 0; }
.hab-link-grid__body > :last-child  { margin-bottom: 0; }

.hab-link-grid__body ul,
.hab-link-grid__body ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.hab-link-grid__body li {
    margin-bottom: 0.4rem;
}

/* bordered pill CTA (matches helloagain secondary button) */
.hab-link-grid__btn {
    align-self: stretch;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--ha-gray-800, rgb(38, 45, 53));
    border-radius: 1.5rem;
    background: transparent;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.hab-link-grid__btn:hover {
    border-color: var(--ha-gray-600, rgb(125, 129, 134));
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* Die beiden Regeln oben verlieren im Fliesstext gegen die Prosa-Linkregel
 * (.ha-single__prose a in single.css, Spezifitaet 0,1,1 gegen 0,1,0). Der
 * Knopf bekam dadurch Unterstreichung und Blau statt Grau — er sah aus wie
 * ein Textlink in einem Rahmen.
 *
 * Mit vorangestelltem Container und a. steigt die Spezifitaet auf 0,2,1 und
 * gewinnt. Dasselbe Muster wie bei .hab-cta-box__button weiter unten.
 * Beide Container sind genannt, weil das Markup je nach Template
 * .ha-single__prose oder .ha-blog-content verwendet.
 */
.ha-single__prose a.hab-link-grid__btn,
.ha-blog-content a.hab-link-grid__btn {
    color: var(--ha-gray-800, rgb(38, 45, 53));
    text-decoration: none;
}

.ha-single__prose a.hab-link-grid__btn:hover,
.ha-blog-content a.hab-link-grid__btn:hover {
    border-color: var(--ha-gray-600, rgb(125, 129, 134));
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ─── hab/faq ────────────────────────────────────────────────────────── */

.hab-faq {
    margin: 2.75rem 0;
    scroll-margin-top: 96px;
}

.hab-faq__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 1.25rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-faq__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hab-faq__item {
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.875rem;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.hab-faq__item[open] {
    border-color: var(--ha-blue-100, rgb(204, 237, 249));
}

.hab-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.375rem;
    cursor: pointer;
    list-style: none;
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

/* Hide native disclosure triangle (Safari/Firefox/Chrome). */
.hab-faq__question::-webkit-details-marker {
    display: none;
}
.hab-faq__question::marker {
    content: "";
}

.hab-faq__question:hover {
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-faq__icon {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.hab-faq__icon::before,
.hab-faq__icon::after {
    content: "";
    position: absolute;
    background: var(--ha-blue-500, rgb(0, 167, 225));
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* horizontal bar */
.hab-faq__icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

/* vertical bar — collapses to form a minus when open */
.hab-faq__icon::after {
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.hab-faq__item[open] .hab-faq__icon::after {
    transform: translateX(-50%) scaleY(0);
    opacity: 0;
}

.hab-faq__answer {
    padding: 0 1.375rem 1.25rem;
    line-height: 1.6;
    color: var(--ha-gray-700, rgb(55, 65, 81));
}

.hab-faq__answer > :first-child {
    margin-top: 0;
}
.hab-faq__answer > :last-child {
    margin-bottom: 0;
}

.hab-faq__answer a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: underline;
}

/* ─── hab/cta-box ───────────────────────────────────────────────────── */

.hab-cta-box {
    margin: 2.5rem 0;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hab-cta-box--primary {
    background: var(--ha-blue-500, rgb(0, 167, 225));
    color: #fff;
}

.hab-cta-box--primary .hab-cta-box__heading,
.hab-cta-box--primary .hab-cta-box__text {
    color: #fff;
}

.hab-cta-box--secondary {
    background: #fff;
    border: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-cta-box--subtle {
    background: var(--ha-blue-100, rgb(204, 237, 249));
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-cta-box__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.hab-cta-box__text {
    margin: 0;
    max-width: 38rem;
    line-height: 1.5;
}

.hab-cta-box__button {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-family: 'BrutalType', sans-serif;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

/* Never underline the button — the in-content link rule
   (.ha-article__content a) would otherwise win on specificity. */
.hab-cta-box__button,
.ha-blog-content a.hab-cta-box__button {
    text-decoration: none;
}

.hab-cta-box--primary .hab-cta-box__button {
    background: #fff;
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-cta-box--secondary .hab-cta-box__button,
.hab-cta-box--subtle .hab-cta-box__button {
    background: var(--ha-blue-500, rgb(0, 167, 225));
    color: #fff;
}

/* Subtle hover: only nudge the background colour — no lift, no shadow.
 *
 * Die Schriftfarbe muss hier mitgesetzt werden, sonst verschwindet die
 * Beschriftung. Grund ist .ha-single__prose a:hover in single.css, das
 * color auf --ha-blue-600 setzt. Diese Regel hat Spezifitaet (0,2,1) und
 * schlaegt damit die Grundregel des Buttons mit (0,2,0) — die Schrift nahm
 * also genau die Farbe an, die der Hintergrund gleichzeitig bekommt.
 *
 * Deshalb steht hier a.hab-cta-box__button statt nur .hab-cta-box__button:
 * das hebt die Spezifitaet auf (0,3,1) und gewinnt wieder. Aus demselben
 * Grund trennt die Datei weiter oben schon .ha-blog-content a.hab-cta-box__button
 * fuer die Unterstreichung ab.
 */
.hab-cta-box--primary a.hab-cta-box__button:hover {
    background: var(--ha-gray-200, rgb(230, 232, 235));
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-cta-box--secondary a.hab-cta-box__button:hover,
.hab-cta-box--subtle a.hab-cta-box__button:hover {
    background: var(--ha-blue-600, rgb(46, 124, 192));
    color: #fff;
}

/* ─── hab/info-box ──────────────────────────────────────────────────── */

.hab-info-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.75rem 0;
    border-left-width: 4px;
    border-left-style: solid;
}

.hab-info-box--info {
    background: #e8f7fc;
    border-left-color: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-info-box--tip {
    background: #f1f8eb;
    border-left-color: rgb(0, 198, 149);
}

.hab-info-box--warning {
    background: #fff8de;
    border-left-color: rgb(212, 152, 0);
}

.hab-info-box__icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.hab-info-box__body > :first-child {
    margin-top: 0;
}

.hab-info-box__body > :last-child {
    margin-bottom: 0;
}

.hab-info-box__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.375rem 0;
}

/* ─── hab/author-box ────────────────────────────────────────────────── */

.hab-author-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.75rem;
    margin: 3rem 0 1rem 0;
    background: #fff;
}

.hab-author-box__avatar {
    border-radius: 9999px;
    width: 72px;
    height: 72px;
    display: block;
}

.hab-author-box__name {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-author-box__role {
    margin: 0 0 0.5rem 0;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-size: 0.9375rem;
}

.hab-author-box__bio {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.hab-author-box__links {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hab-author-box__links a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: none;
    font-size: 0.9375rem;
}

.hab-author-box__links a:hover {
    text-decoration: underline;
}

@media (max-width: 540px) {
    .hab-author-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hab-author-box__avatar {
        margin: 0 auto;
    }
    .hab-author-box__links {
        justify-content: center;
    }
}

/* ─── hab/video-embed ───────────────────────────────────────────────── */

.hab-video {
    margin: 2rem 0;
}

.hab-video__player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
}

.hab-video__player--direct {
    cursor: default;
}

.hab-video__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.hab-video__player:hover .hab-video__poster {
    opacity: 1;
}

.hab-video__playbtn {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    font-family: 'BrutalType', sans-serif;
}

.hab-video__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: rgba(0, 167, 225, 0.95);
    font-size: 1.5rem;
    padding-left: 0.3rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hab-video__hint {
    background: rgba(0, 0, 0, 0.55);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.hab-video__consent {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.75rem;
    margin: 0;
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    pointer-events: none;
}

.hab-video__player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.hab-video__caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-align: center;
}

/* ─── hab/tldr ──────────────────────────────────────────────────────── */

.hab-tldr {
    margin: 2.25rem 0;
    padding: 1.75rem 2rem;
    border-radius: 1rem;
    background: var(--ha-blue-100, rgb(204, 237, 249));
    scroll-margin-top: 96px;
}

.hab-tldr__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 0 1rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-tldr__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hab-tldr__item {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.875rem;
    line-height: 1.55;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-tldr__item:last-child {
    margin-bottom: 0;
}

.hab-tldr__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-tldr__label {
    font-weight: 700;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

@media (max-width: 540px) {
    .hab-tldr {
        padding: 1.25rem 1.25rem;
        border-radius: 0.75rem;
    }
}

/* Scroll-margin so deep-links don't land under the sticky header */
.hab-info-box, .hab-cta-box, .hab-author-box, .hab-video, .hab-image-text {
    scroll-margin-top: 96px;
}

/* ─── hab/related-links ─────────────────────────────────────────────── */
.hab-related-links {
    margin: 3rem 0;
    scroll-margin-top: 96px;
}

.hab-related-links__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 1.5rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

/* Row layout — full-width stacked rows (thumbnail left, text right).
   Fits the narrow prose column without shrinking cards to thumbnails. */
.hab-related-links__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hab-related-links__card {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: stretch;
    background: rgb(241, 242, 244);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    transition: transform 0.2s, box-shadow 0.2s;
}

.hab-related-links__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(38, 45, 53, 0.10);
}

.hab-related-links__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--ha-gray-200, rgb(230, 232, 235));
    min-height: 120px;
}

/* Card ancestor raises specificity to (0,2,1) so this beats the equal-specificity
   .ha-single__prose img { height:auto } rule the block inherits when rendered inside
   the article prose — otherwise the replaced img keeps its intrinsic height and the
   media box gets a bottom gap. */
.hab-related-links__card .hab-related-links__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    inset: 0;
    display: block;
}

.hab-related-links__body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.125rem 1.25rem;
    justify-content: center;
}

.hab-related-links__type {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ha-blue-600, rgb(46, 124, 192));
}

.hab-related-links__title {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1.3;
}

.hab-related-links__desc {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

.hab-related-links__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    font-size: 0.875rem;
    font-weight: 500;
}

.hab-related-links__card:hover .hab-related-links__cta {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Mobile: stack thumbnail on top */
@media (max-width: 540px) {
    .hab-related-links__card { grid-template-columns: 1fr; }
    .hab-related-links__media { aspect-ratio: 16 / 9; min-height: 0; }
}

.hab-related-links__card--no-media { grid-template-columns: 1fr; }

/* Related-links cards are <a> inside prose — kill the inherited prose underline */
.ha-single__prose .hab-related-links__card,
.ha-single__prose .hab-related-links__card:hover { text-decoration: none; }

/* ─── CTA Box with image (hab/cta-box --has-image) ───────────────────── */
.hab-cta-box--has-image {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.hab-cta-box--img-right {
    flex-direction: row-reverse;
}

.hab-cta-box--has-image .hab-cta-box__media {
    flex: 0 0 38%;
    margin: 0;
}

.hab-cta-box--has-image .hab-cta-box__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
    aspect-ratio: 4 / 3;
}

.hab-cta-box--has-image .hab-cta-box__body {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 600px) {
    .hab-cta-box--has-image {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .hab-cta-box--has-image .hab-cta-box__media {
        flex-basis: auto;
        width: 100%;
    }
}

/* ─── Gallery / Slider (hab/gallery) ─────────────────────────────────── */
.hab-gallery {
    position: relative;
    margin: 2.75rem 0;
}

.hab-gallery__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 1rem;
}

.hab-gallery__viewport::-webkit-scrollbar {
    display: none;
}

.hab-gallery__viewport:focus-visible {
    outline: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
    outline-offset: 3px;
}

.hab-gallery__track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

.hab-gallery__slide {
    scroll-snap-align: start;
    flex: 0 0 85%;
    max-width: 85%;
}

@media (min-width: 720px) {
    .hab-gallery__slide {
        flex-basis: 48%;
        max-width: 48%;
    }
}

.hab-gallery__figure {
    margin: 0;
}

.hab-gallery__img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
}

.hab-gallery__caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-align: center;
}

.hab-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 0;
    cursor: pointer;
    background: var(--ha-blue-500, rgb(0, 167, 225));
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(38, 45, 53, 0.18);
    transition: background 0.2s, opacity 0.2s;
}

.hab-gallery__nav:hover {
    background: var(--ha-blue-600, rgb(46, 124, 192));
}

.hab-gallery__nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.hab-gallery__nav--prev {
    left: 0.5rem;
}

.hab-gallery__nav--next {
    right: 0.5rem;
}

.hab-gallery__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.hab-gallery__placeholder {
    padding: 3rem;
    text-align: center;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    border: 2px dashed var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 1rem;
}

/* ---------- Visualization (SVG/SMIL) ---------- */

.hab-visualization {
    margin: 2rem 0;
}

.hab-viz {
    margin: 0;
}

/* viewBox keeps the intrinsic aspect ratio → no layout shift (CLS) while the
   SVG scales down to the container width. */
.hab-viz__frame {
    width: 100%;
}

.hab-viz__frame > svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.hab-viz__caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-align: center;
}

.hab-viz__placeholder {
    padding: 3rem;
    text-align: center;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    border: 2px dashed var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 1rem;
}

/* Reuse as a card thumbnail / featured visual: constrain to the card frame. */
.ha-card__media .hab-viz,
.ha-card__media .hab-viz__frame > svg {
    width: 100%;
    height: 100%;
}

/* Respect reduced-motion: SMIL has no direct CSS off-switch, but freezing the
   animations' visual end-state via opacity is the safe, progressive default. */
@media (prefers-reduced-motion: reduce) {
    .hab-viz__frame svg * {
        animation: none !important;
    }
}
