/* The subscription block. One dense component sized for a column: a mark, two
   short lines, and a joined field. It is deliberately never a full-width band —
   stretched across the shell it leaves a wide empty stripe down the middle. */

.gi-newsletter {
    background: color-mix(in oklch, var(--gi-brand-paper) 88%, var(--gi-cat-wash));
    border: 1px solid var(--gi-cat-line);
    border-radius: .9rem;
    color: var(--gi-ink);
    display: grid;
    padding: 1.15rem 1.25rem 1.25rem;
    position: relative;
}

.gi-newsletter__head { align-items: center; display: flex; gap: .6rem; margin-bottom: .7rem; }
.gi-newsletter__mark { display: block; flex: 0 0 auto; height: auto; width: 2.6rem; }
.gi-newsletter__eyebrow {
    color: var(--gi-cat-ink);
    font-size: .625rem;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.3;
    margin: 0;
    text-transform: uppercase;
}

/* Host surfaces style bare headings; the block keeps its own voice. */
.gi-newsletter .gi-newsletter__title {
    color: var(--gi-cat-ground);
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -.03em;
    line-height: 1.2;
    margin: 0 0 .35rem;
    text-transform: none;
}
.gi-newsletter__lead { color: var(--gi-muted); font-size: .8125rem; line-height: 1.55; margin: 0 0 .9rem; }

/* The address and the action read as one control. */
.gi-newsletter__row {
    align-items: center;
    background: var(--gi-brand-paper);
    border: 1px solid var(--gi-cat-line);
    border-radius: .6rem;
    display: flex;
    gap: .3rem;
    padding: .25rem;
    transition: border-color 180ms var(--gi-ease), box-shadow 180ms var(--gi-ease);
}
.gi-newsletter__row:focus-within {
    border-color: var(--gi-cat-ink);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--gi-cat-line) 60%, transparent);
}
.gi-newsletter__row input {
    background: transparent;
    border: 0;
    color: var(--gi-ink);
    flex: 1 1 7rem;
    font-size: .875rem;
    min-height: 2.5rem;
    min-width: 0;
    padding: .35rem .6rem;
}
.gi-newsletter__row input:focus-visible { outline: none !important; }
.gi-newsletter__row input::placeholder { color: var(--gi-muted); opacity: 1; }
.gi-newsletter__row button {
    background: var(--gi-cat-ground);
    border: 0;
    border-radius: .4rem;
    color: var(--gi-brand-paper);
    cursor: pointer;
    flex: 0 0 auto;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 750;
    min-height: 2.5rem;
    padding: .45rem .9rem;
    transition: background-color 180ms var(--gi-ease);
    white-space: nowrap;
}
.gi-newsletter__row button:hover { background: var(--gi-cat-deep); }

.gi-newsletter__consent { align-items: start; color: var(--gi-muted); display: flex; font-size: .6875rem; gap: .45rem; line-height: 1.5; margin-top: .6rem; }
.gi-newsletter__consent input { accent-color: var(--gi-cat-ground); flex: 0 0 auto; height: .95rem; margin-top: .1rem; width: .95rem; }
.gi-newsletter .gi-newsletter__consent a { color: var(--gi-cat-ink); text-decoration: underline; text-underline-offset: .15em; }

/* The captcha ships its own spacing and can render wider than the column. */
.gi-newsletter .tsg-field,
.gi-newsletter .cf-turnstile { margin: .6rem 0 0 !important; max-width: 100%; overflow: hidden; }
/* turnstile-guard reserves 73px so a submit button below the widget cannot move
   under the pointer. Here the button sits above the slot, so nothing can shift
   and the reservation would only leave a hole in the footer. */
.gi-newsletter .tsg-field--deferred { margin-top: 0 !important; }
.gi-newsletter .tsg-field--deferred .tsg-widget { min-height: 0; }
.gi-newsletter .tsg-field--deferred.is-tsg-loading .tsg-widget,
.gi-newsletter .tsg-field:not(.tsg-field--deferred) .tsg-widget { min-height: 73px; }

/* The block adapts to its column, not the viewport, because it sits in a footer
   column, a homepage column and an article rail at three different widths. */
.gi-site-footer__newsletter,
.gi-homepage__newsletter,
.gi-article-newsletter { container-type: inline-size; }

/* Below ~330px of column the button drops under the field rather than crushing it. */
@container (max-width: 20rem) {
    .gi-newsletter__row { flex-wrap: wrap; }
    .gi-newsletter__row button { flex: 1 1 100%; }
}
