/**
 * Armory Engagement Hub (blocks/armory-hub). Loaded only where the hub renders.
 * Spacing follows the Figma Overview boards: desktop content 64/60/120, main + 400px rail 52 apart,
 * 40 between sections; phones 40/16, 54 between sections, 24 inside a section.
 */

/* The site header scrolls away, so the tab bar pins to the very top (see --afe-sticky-offset in app.css). */
.afe-hub { --hub-sticky-top: var(--afe-sticky-offset, 0px); }
.afe-hub { --hub-gutter: max(var(--wp--style--root--padding-left, 1rem), calc((100% - var(--wp--style--global--content-size)) / 2)); }
.afe-hub > * { margin-block: 0; }
.afe-hub *, .afe-hub *::before, .afe-hub *::after { box-sizing: border-box; }
.afe-hub [hidden] { display: none !important; }

/* ---------------------------------------------------------------- Tab bar */
.afe-hub-bar {
	position: sticky; top: var(--hub-sticky-top); z-index: 40;
	display: flex; align-items: center; gap: 8px; padding: 12px var(--hub-gutter); background: var(--afe-ink); color: var(--afe-paper);
}
.afe-hub-bar__top { display: flex; align-items: center; gap: 12px; flex: none; }
.afe-hub-bar__label { padding-right: 16px; font: 400 1.5rem/1 var(--afe-display); text-transform: uppercase; color: inherit; text-decoration: none; white-space: nowrap; }
.afe-hub-bar__actions { display: none; }
.afe-hub-tabs { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.afe-hub-tabs::-webkit-scrollbar { display: none; }
.afe-hub-tab {
	display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 8px; white-space: nowrap;
	background: rgb(255 255 255 / 14%); border: 1px solid rgb(255 255 255 / 22%); color: var(--afe-paper);
	font: 600 .9375rem/1.1 var(--afe-ui); text-decoration: none; transition: background .15s;
}
.afe-hub-tab:hover { background: rgb(255 255 255 / 24%); }
.afe-hub-tab[aria-selected="true"] { background: var(--afe-paper); border-color: var(--afe-paper); color: var(--afe-ink); }
.afe-hub-tab:focus-visible { outline: 3px solid var(--wp--preset--color--yellow); outline-offset: 2px; }

/* ---------------------------------------------------------------- Layout */
.afe-hub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 52px; align-items: start; padding: 64px var(--hub-gutter) 120px; }
.afe-hub-main, .afe-hub-rail { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.afe-hub-main > *, .afe-hub-rail > * { margin: 0; }
.afe-hub-rail__group { display: flex; flex-direction: column; gap: 16px; }
.afe-hub-rail__title { margin: 0; font-size: var(--wp--preset--font-size--md); }

.afe-hub-head { display: flex; flex-direction: column; gap: 8px; }
.afe-hub-head__title { margin: 0; font-size: var(--wp--preset--font-size--xl); }
.afe-hub-head__desc { margin: 0; font: 500 1rem/1.4 var(--afe-ui); color: var(--wp--preset--color--muted); max-width: 72ch; }
.afe-hub-subhead { margin: 0 0 16px; font-size: var(--wp--preset--font-size--lg); }
.afe-hub-empty { margin: 0; padding: 24px; border-radius: 12px; background: var(--wp--preset--color--surface); font: 500 1rem/1.4 var(--afe-ui); }
.afe-hub-source { margin: 0; font: 400 .8125rem/1.4 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-list { display: flex; flex-direction: column; gap: 16px; }
.afe-hub-year { display: flex; flex-direction: column; gap: 16px; }
.afe-hub-year__title { margin: 0; font-size: var(--wp--preset--font-size--md); }

/* ---------------------------------------------------------------- Small parts */
.afe-hub-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 .8125rem/1 var(--afe-ui); letter-spacing: .1em; text-transform: uppercase; }
.afe-hub-sample { display: inline-block; margin-left: 8px; padding: 3px 7px; border-radius: 999px; background: var(--wp--preset--color--yellow-light); border: 1px dashed var(--wp--preset--color--yellow); font: 700 10px/1 var(--afe-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--afe-ink); vertical-align: middle; }
.afe-hub-arrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 4px 0 6px; border-bottom: 2px solid currentColor; font: 400 .9375rem/1.1 var(--afe-display); letter-spacing: .04em; text-transform: uppercase; color: var(--afe-ink); text-decoration: none; }
.afe-hub-arrow .afe-icon { width: 16px; height: 16px; transition: transform .15s var(--afe-ease); }
.afe-hub-arrow:hover .afe-icon { transform: translateX(3px); }
.afe-hub-progress { display: flex; align-items: center; gap: 12px; font: 600 1rem/1.3 var(--afe-ui); }
.afe-hub-progress__bar { flex: 1; max-width: 220px; height: 8px; border-radius: 4px; background: var(--wp--preset--color--surface-2); overflow: hidden; }
.afe-hub-progress__bar > span { display: block; height: 100%; border-radius: 4px; background: var(--wp--preset--color--blue); }
.afe-hub-date { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 10px; background: var(--afe-paper); box-shadow: var(--wp--preset--shadow--card); line-height: 1; }
.afe-hub-date span { font: 700 11px/1.1 var(--afe-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--afe-red-ink); }
.afe-hub-date strong { font: 400 1.75rem/1 var(--afe-display); }
.afe-hub-iconbtn { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--afe-ink); background: var(--afe-paper); color: var(--afe-ink); cursor: pointer; }
.afe-hub-iconbtn:hover { background: var(--afe-ink); color: var(--afe-paper); }
.afe-hub-iconbtn .afe-icon { width: 20px; height: 20px; }
.afe-hub-pill { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--afe-ink); font: 600 .9375rem/1 var(--afe-ui); color: var(--afe-ink); text-decoration: none; white-space: nowrap; }
.afe-hub-pill:hover { background: var(--afe-ink); color: var(--afe-paper); }
.afe-hub-pill .afe-icon { width: 18px; height: 18px; }
.afe-hub-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--afe-line); background: var(--afe-paper); font: 600 .9375rem/1 var(--afe-ui); color: var(--afe-ink); text-decoration: none; cursor: pointer; }
.afe-hub-chip:hover { border-color: var(--afe-ink); }
.afe-hub-chip .afe-icon { width: 18px; height: 18px; }
.afe-hub-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 16px; border-radius: 12px; background: var(--afe-paper); box-shadow: var(--wp--preset--shadow--card); }
.afe-hub-card > * { margin: 0; }
.afe-hub-mail { display: inline-flex; align-items: center; gap: 8px; font: 600 1rem/1.3 var(--afe-ui); color: var(--afe-ink); overflow-wrap: anywhere; }
.afe-hub-mail .afe-icon { width: 18px; height: 18px; flex: none; }

/* ---------------------------------------------------------------- Overview */
/* Overview: the intro heads the main column so both columns start level. */
.afe-hub-intro { display: flex; flex-direction: column; gap: 16px; }
.afe-hub-intro > * { margin: 0; }
.afe-hub-intro__media { margin-top: 16px !important; }
.afe-hub-status { display: grid; gap: 16px; }
.afe-hub-status__card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 16px; background: var(--wp--preset--color--surface); }
.afe-hub-status__card.has-accent-green { background: var(--wp--preset--color--green-light); }
.afe-hub-status__card > * { margin: 0; }
.afe-hub-status__title { font: 800 1.125rem/1.1 var(--afe-ui); text-transform: none; }
.afe-hub-status__meta { font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-status__meta.is-ink { color: var(--afe-ink); }
.afe-hub-intro__media { display: flex; flex-direction: column; gap: 16px; }
.afe-hub-intro__media > .wp-block-button { align-self: flex-start; }

.afe-hub-video { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.afe-hub-video__poster { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--wp--preset--color--surface-2); }
.afe-hub-video__poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 50%, rgb(0 0 0 / 35%)); pointer-events: none; }
.afe-hub-video__img, .afe-hub-video__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.afe-hub-video__play { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; place-items: center; width: 76px; height: 76px; margin: -38px 0 0 -38px; border: 0; border-radius: 50%; background: var(--afe-paper); color: var(--afe-ink); box-shadow: var(--wp--preset--shadow--raised); cursor: pointer; transition: transform .15s var(--afe-ease); }
.afe-hub-video__play:hover { transform: scale(1.06); }
.afe-hub-video__play .afe-icon { width: 30px; height: 30px; margin-left: 4px; }
.afe-hub-video__time { position: absolute; z-index: 1; right: 12px; bottom: 12px; padding: 4px 8px; border-radius: 6px; background: rgb(0 0 0 / 70%); color: var(--afe-paper); font: 700 11px/1.1 var(--afe-ui); }
.afe-hub-video figcaption { display: flex; flex-direction: column; gap: 4px; }
.afe-hub-video figcaption strong { font: 800 1.25rem/1.1 var(--afe-ui); }
.afe-hub-video figcaption span { font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }

.afe-hub-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.afe-hub-tile {
	display: flex; flex-direction: column; gap: 14px; min-height: 204px; padding: 20px; border: 2px solid var(--afe-ink); border-radius: 16px;
	background: var(--afe-accent-light); color: var(--afe-ink); text-decoration: none; transition: transform .18s var(--afe-ease), box-shadow .18s var(--afe-ease);
}
.afe-hub-tile:hover, .afe-hub-tile:focus-visible { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--afe-ink); }
.afe-hub-tile__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: auto; border-radius: 50%; background: var(--afe-paper); }
.afe-hub-tile__icon .afe-icon { width: 22px; height: 22px; }
.afe-hub-tile__title { font: 400 var(--wp--preset--font-size--md)/1.05 var(--afe-display); text-transform: uppercase; }
.afe-hub-tile__meta { font: 400 .875rem/1.35 var(--afe-ui); }

.afe-hub-about { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 16px; background: var(--wp--preset--color--surface); }
.afe-hub-about > * { margin: 0; }
.afe-hub-about h2, .afe-hub-about h3 { font-size: var(--wp--preset--font-size--lg); }
.afe-hub-about p { font-size: 1.0625rem; line-height: 1.6; max-width: 72ch; }

/* Rail rows */
.afe-hub-row { display: flex; align-items: center; gap: 12px; padding: 20px 16px; border: 1px solid var(--afe-line); border-radius: 12px; background: var(--afe-paper); }
.afe-hub-row--doc { gap: 14px; padding: 16px; }
.afe-hub-row__icon { display: grid; flex: none; place-items: center; width: 48px; height: 56px; border-radius: 8px; background: var(--wp--preset--color--red-light); }
.afe-hub-row__icon .afe-icon { width: 24px; height: 24px; }
.afe-hub-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.afe-hub-row__title { margin: 0; font: 800 1.125rem/1.1 var(--afe-ui); text-transform: none; overflow-wrap: break-word; hyphens: auto; } /* long words hyphenate instead of running under the download button */
.afe-hub-row__title a { color: inherit; text-decoration: none; }
.afe-hub-row__title a:hover { text-decoration: underline; }
.afe-hub-row__meta { margin: 0; font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-press__date { display: flex; align-items: center; font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-press__title { font: 800 1.25rem/1.1 var(--afe-ui); text-transform: none; }
.afe-hub-press__title a { color: inherit; text-decoration: none; }
.afe-hub-press__title a:hover { text-decoration: underline; }
.afe-hub-press__excerpt { font: 500 1rem/1.4 var(--afe-ui); }

/* Signup card */
.afe-hub-signup { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 16px; background: var(--afe-ink); color: var(--afe-paper); }
.afe-hub-signup > * { margin: 0; }
.afe-hub-signup__title { font-size: var(--wp--preset--font-size--md); color: inherit; }
.afe-hub-signup > p { font: 500 1rem/1.4 var(--afe-ui); }
.afe-hub-signup .afe-hub-signup__consent { font: 400 .8125rem/1.4 var(--afe-ui); }
.afe-hub-signup .afe-hub-form { gap: 12px; }

/* Rail call-to-action cards */
.afe-hub-cta { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 16px; background: var(--wp--preset--color--surface); }
.afe-hub-cta[class*="has-accent-"] { background: var(--afe-accent-light); }
.afe-hub-cta > * { margin: 0; }
.afe-hub-cta__icon { width: 24px; height: 24px; }
.afe-hub-cta__title { font-size: var(--wp--preset--font-size--md); }
.afe-hub-cta p { font: 500 1rem/1.4 var(--afe-ui); }
.afe-hub-cta .wp-block-button { align-self: flex-start; }

/* ---------------------------------------------------------------- Timeline */
.afe-hub-timeline { list-style: none; margin: 0; padding: 0; }
.afe-hub-milestone { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 0 32px 44px; }
.afe-hub-milestone::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--wp--preset--color--surface-2); }
.afe-hub-milestone.is-complete::before { background: var(--wp--preset--color--green); }
.afe-hub-milestone > * { margin: 0; }
.afe-hub-milestone__dot { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--wp--preset--color--surface-2); background: var(--afe-paper); color: var(--afe-paper); }
.is-complete > .afe-hub-milestone__dot { background: var(--wp--preset--color--green); border-color: var(--wp--preset--color--green); }
.is-complete > .afe-hub-milestone__dot .afe-icon { width: 14px; height: 14px; stroke-width: 3; }
.is-in-progress > .afe-hub-milestone__dot { border: 2px solid var(--wp--preset--color--blue); box-shadow: inset 0 0 0 4px var(--afe-paper), inset 0 0 0 12px var(--wp--preset--color--blue); }
.afe-hub-status-pill { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--wp--preset--color--surface); font: 700 11px/1.1 var(--afe-ui); letter-spacing: .05em; text-transform: uppercase; }
.afe-hub-status-pill.is-complete { background: var(--wp--preset--color--green-light); }
.afe-hub-status-pill.is-in-progress { background: var(--wp--preset--color--blue-light); }
.afe-hub-milestone__when { font: 700 .875rem/1.3 var(--afe-ui); letter-spacing: .02em; }
.afe-hub-milestone__title { font: 800 1.125rem/1.2 var(--afe-ui); text-transform: none; }
.afe-hub-milestone__desc { font: 400 .9375rem/1.45 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-milestone .afe-hub-progress { width: 100%; max-width: 360px; margin-top: 6px; }
.afe-hub-milestone .afe-hub-progress__bar { max-width: none; }

/* ---------------------------------------------------------------- Events */
.afe-hub-event { display: flex; align-items: flex-start; gap: 16px; padding: 20px 16px; border: 2px solid var(--afe-ink); border-radius: 12px; background: var(--afe-paper); }
.afe-hub-event__body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.afe-hub-event__body > * { margin: 0; }
.afe-hub-event__title { font: 800 1.25rem/1.15 var(--afe-ui); text-transform: none; }
.afe-hub-event__title a { color: inherit; text-decoration: none; }
.afe-hub-event__meta { display: flex; align-items: center; gap: 8px; font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-event__meta .afe-icon { width: 16px; height: 16px; color: var(--afe-ink); }
.afe-hub-spots { margin-top: 4px; padding: 4px 8px; border-radius: 999px; background: var(--wp--preset--color--green-light); font: 700 11px/1.1 var(--afe-ui); letter-spacing: .05em; text-transform: uppercase; }
.afe-hub-spots.is-full { background: var(--wp--preset--color--yellow-light); }
.afe-hub-event > .wp-block-button { flex: none; }
/* Past events: same card, quieter (no registration). */
.afe-hub-event.is-past { border-color: var(--wp--preset--color--surface-2); background: var(--wp--preset--color--surface); }

/* ---------------------------------------------------------------- Stories */
.afe-hub-stories { columns: 2 280px; column-gap: 16px; }
.afe-hub-story { break-inside: avoid; margin: 0 0 16px; border-radius: 12px; overflow: hidden; background: var(--afe-paper); box-shadow: var(--wp--preset--shadow--card); }
.afe-hub-story__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.afe-hub-story__body { display: flex; flex-direction: column; gap: 12px; padding: 24px 16px; }
.afe-hub-story__body > * { margin: 0; }
.afe-hub-story__title { font: 800 1.125rem/1.2 var(--afe-ui); text-transform: none; }
.afe-hub-story__quote { margin: 0; padding: 0; border: 0; }
.afe-hub-story__quote p { margin: 0; font: 400 1.3125rem/1.4 var(--afe-subtitle); }
.afe-hub-story__by { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-story__by strong { flex: 0 0 100%; order: -1; font: 600 1rem/1.3 var(--afe-ui); color: var(--afe-ink); }
.afe-hub-story__by .afe-hub-sample { order: 2; }
.afe-hub-more { align-self: flex-start; }
.afe-hub-fab { display: none; }

.afe-hub-formpanel { display: flex; flex-direction: column; gap: 12px; padding: 24px 16px; border: 2px solid var(--afe-ink); border-radius: 16px; background: var(--afe-accent-light); box-shadow: var(--wp--preset--shadow--hard); }
.afe-hub-formpanel > * { margin: 0; }
.afe-hub-formpanel__title { font-size: var(--wp--preset--font-size--md); }
.afe-hub-formpanel > p { font: 400 .875rem/1.4 var(--afe-ui); }

/* ---------------------------------------------------------------- FAQs */
.afe-hub-topic { display: flex; flex-direction: column; }
.afe-hub-topic__title { margin: 0 0 8px; font-size: var(--wp--preset--font-size--md); }
.afe-hub-faq { border-bottom: 1px solid var(--afe-line); }
.afe-hub-faq summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; font: 600 1rem/1.3 var(--afe-ui); }
.afe-hub-faq summary::-webkit-details-marker { display: none; }
.afe-hub-faq summary > span:first-child { flex: 1; }
.afe-hub-faq summary .afe-icon { width: 18px; height: 18px; flex: none; transition: transform .2s var(--afe-ease); }
.afe-hub-faq[open] summary .afe-icon { transform: rotate(90deg); }
.afe-hub-faq__answer { padding: 0 0 16px; max-width: 72ch; }
.afe-hub-faq__answer p { margin: 0 0 .5em; font: 400 1rem/1.55 var(--afe-ui); }
.afe-hub-faq__answer :is(ul, ol) { margin: .25em 0 .75em; padding-left: 1.25em; font: 400 1rem/1.55 var(--afe-ui); }
.afe-hub-faq__answer li + li { margin-top: .35em; }
.afe-hub-faq__answer .wp-block-table { margin: .75em 0; overflow-x: auto; }
.afe-hub-faq__answer table { width: 100%; border-collapse: collapse; font: 400 .9375rem/1.45 var(--afe-ui); }
.afe-hub-faq__answer :is(th, td) { padding: 10px 12px 10px 0; border: 0; border-bottom: 1px solid var(--afe-line); text-align: left; vertical-align: top; }
.afe-hub-faq__answer td:first-child, .afe-hub-faq__answer th { font-weight: 600; }
.afe-hub-faq__answer .has-sm-font-size { color: var(--wp--preset--color--muted); }

/* ---------------------------------------------------------------- Photos */
.afe-hub-albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
.afe-hub-album { display: flex; flex-direction: column; gap: 6px; }
.afe-hub-album > * { margin: 0; }
.afe-hub-album__cover { position: relative; display: block; aspect-ratio: 413 / 256; margin-bottom: 8px !important; border-radius: 12px; overflow: hidden; background: var(--wp--preset--color--purple-light); }
.afe-hub-album__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--afe-ease); }
a.afe-hub-album__cover:hover img { transform: scale(1.03); }
.afe-hub-album__badge { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--afe-paper); font: 700 11px/1.1 var(--afe-ui); letter-spacing: .05em; text-transform: uppercase; color: var(--afe-ink); }
.afe-hub-album__badge .afe-icon { width: 14px; height: 14px; }
.afe-hub-album__title { font: 800 1.125rem/1.2 var(--afe-ui); text-transform: none; }
.afe-hub-album__date { font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }

/* ---------------------------------------------------------------- Minutes rail */
.afe-hub-upcoming ul { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.afe-hub-upcoming li { display: flex; align-items: center; gap: 12px; }
.afe-hub-upcoming li > span:last-child { display: flex; flex-direction: column; gap: 2px; font: 400 .875rem/1.35 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-upcoming li strong { font: 600 1rem/1.3 var(--afe-ui); color: var(--afe-ink); }
.afe-hub-upcoming__note { font: 400 .8125rem/1.4 var(--afe-ui) !important; color: var(--wp--preset--color--muted); }

/* ---------------------------------------------------------------- Support */
/* Support: intro → video matches the Overview intro (32px), not the column's 40px section gap. */
.afe-hub-main > .afe-hub-head + .afe-hub-video { margin-top: -8px; }
.afe-hub-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -16px !important; }
.afe-hub-share__label { font: 600 1rem/1.3 var(--afe-ui); margin-right: 4px; }
.afe-hub-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.afe-hub-way { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; border: 2px solid var(--afe-ink); border-radius: 16px; background: var(--afe-paper); }
.afe-hub-way > * { margin: 0; }
.afe-hub-way__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--afe-accent-light); }
.afe-hub-way__icon .afe-icon { width: 22px; height: 22px; }
.afe-hub-way__title { font-size: var(--wp--preset--font-size--md); }
.afe-hub-way p { font: 500 1rem/1.4 var(--afe-ui); }
.afe-hub-way .afe-hub-arrow { margin-top: auto; }
.afe-hub-kit .afe-hub-head__desc { margin-bottom: 16px; }
.afe-hub-clips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.afe-hub-clip { display: flex; flex-direction: column; gap: 8px; margin: 0; scroll-snap-align: start; }
.afe-hub-clip__media { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--wp--preset--color--surface-2); }
.afe-hub-clip__media img { width: 100%; height: 100%; object-fit: cover; }
.afe-hub-clip figcaption { font: 600 1rem/1.3 var(--afe-ui); }
.afe-hub-clip__actions { display: flex; gap: 8px; }
.afe-hub-quickgive { align-items: flex-start; gap: 14px; padding: 24px; border: 2px solid var(--afe-ink); border-radius: 16px; box-shadow: var(--wp--preset--shadow--hard); }
.afe-hub-quickgive .wp-block-button, .afe-hub-quickgive .wp-block-button__link { width: 100%; text-align: center; }
.afe-hub-quickgive__note { font: 400 .8125rem/1.4 var(--afe-ui) !important; }
/* Reversed so the Give card stands out from the rail: green card, white text, white button. */
.afe-hub-quickgive { background: var(--afe-green-ink); color: var(--afe-paper); }
.afe-hub-quickgive .wp-block-button.is-style-cta > .wp-block-button__link { background: var(--afe-paper); border-color: var(--afe-paper); color: var(--afe-ink); }
.afe-hub-quickgive .wp-block-button.is-style-cta > .wp-block-button__link:hover { background: var(--afe-ink); border-color: var(--afe-ink); color: var(--afe-paper); }

/* ---------------------------------------------------------------- Forms */
.afe-hub-form { display: flex; flex-direction: column; gap: 16px; }
.afe-hub-form > * { margin: 0; }
.afe-hub-field { display: flex; flex-direction: column; gap: 8px; }
.afe-hub-field__label { font: 700 12px/1 var(--afe-ui); letter-spacing: .06em; text-transform: uppercase; }
.afe-hub-field__opt { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--wp--preset--color--muted); }
.afe-hub-field input, .afe-hub-field textarea, .afe-hub-field select {
	width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--afe-line); border-radius: 6px; background: var(--afe-paper);
	font: 500 1rem/1.2 var(--afe-ui); color: var(--afe-ink);
}
.afe-hub-field textarea { min-height: 120px; resize: vertical; line-height: 1.4; }
.afe-hub-field select { appearance: none; padding-right: 40px; background: var(--afe-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
.afe-hub-field input:focus, .afe-hub-field textarea:focus, .afe-hub-field select:focus { outline: 0; border-color: var(--afe-ink); box-shadow: 0 0 0 3px rgb(0 115 189 / 25%); }
.afe-hub-field__help { font: 400 .875rem/1.4 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-field__error { font: 600 .875rem/1.3 var(--afe-ui); color: #b3141a; }
.afe-hub-field.is-invalid input, .afe-hub-field.is-invalid textarea, .afe-hub-field.is-invalid select { border-color: #b3141a; }
.afe-hub-upload { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px; border: 1.5px dashed var(--wp--preset--color--muted); border-radius: 8px; background: rgb(255 255 255 / 50%); font: 500 .875rem/1.3 var(--afe-ui); color: var(--wp--preset--color--muted); text-align: center; cursor: pointer; }
.afe-hub-upload .afe-icon { width: 20px; height: 20px; color: var(--afe-ink); }
.afe-hub-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.afe-hub-upload:focus-within { border-color: var(--afe-ink); }
.afe-hub-check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 500 1rem/1.3 var(--afe-ui); cursor: pointer; }
.afe-hub-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--afe-ink); }
.afe-hub-check .afe-hub-field__error { flex: 0 0 100%; }
.afe-hub-form .wp-block-button, .afe-hub-form .wp-block-button__link { width: 100%; }
.afe-hub-form .wp-block-button__link { cursor: pointer; }
.afe-hub-form .wp-block-button:not(.is-style-cta):not(.is-style-on-dark-green) .wp-block-button__link { background: var(--afe-ink); color: var(--afe-paper); }
.afe-hub-form--updates .wp-block-button, .afe-hub-form--updates .wp-block-button__link { width: auto; align-self: flex-start; }
.afe-hub-form__note { font: 400 .8125rem/1.4 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-form__status { padding: 10px 12px; border-radius: 8px; background: var(--wp--preset--color--surface); color: var(--afe-ink); font: 600 .9375rem/1.35 var(--afe-ui); }
.afe-hub-form__status.is-success { background: var(--wp--preset--color--green-light); }
.afe-hub-form__status.is-error { background: var(--wp--preset--color--red-light); }
.afe-hub-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------------------------------------------------------------- Dialogs (modal → bottom sheet on phones) */
html.afe-hub-locked { overflow: hidden; }
.afe-hub-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 64px); padding: 32px; border: 0; border-radius: 20px; background: var(--afe-paper); color: var(--afe-ink); box-shadow: 0 16px 48px rgb(0 0 0 / 25%); overflow-y: auto; overscroll-behavior: contain; }
.afe-hub-dialog::backdrop { background: rgb(0 0 0 / 45%); }
/* Centered (".afe-hub > *" zeroes block margins for the panels, which would pin dialogs to the top). */
.afe-hub > .afe-hub-dialog { margin: auto; }
.afe-hub-dialog[open] { animation: afe-pop .18s var(--afe-ease); }
.afe-hub-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.afe-hub-dialog__head h2 { margin: 0; font-size: var(--wp--preset--font-size--lg); }
.afe-hub-dialog__close { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--wp--preset--color--surface); color: var(--afe-ink); cursor: pointer; }
.afe-hub-dialog__close .afe-icon { width: 20px; height: 20px; }
.afe-hub-dialog__intro { margin: -8px 0 20px; font: 500 1rem/1.4 var(--afe-ui); color: var(--wp--preset--color--muted); }
.afe-hub-lgl.is-placeholder { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px dashed var(--afe-ink); border-radius: 12px; font: 500 1rem/1.45 var(--afe-ui); }
.afe-hub-lgl.is-placeholder > * { margin: 0; }
.afe-hub-lgl__tag { font: 700 .8125rem/1 var(--afe-ui) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.afe-hub-lgl iframe { width: 100%; min-height: 640px; border: 0; }
.afe-hub-dialog--video { width: min(1000px, calc(100vw - 32px)); padding: 0; background: #000; overflow: visible; }
.afe-hub-dialog--video .afe-hub-dialog__close { position: absolute; top: -48px; right: 0; background: rgb(255 255 255 / 90%); }
.afe-hub-dialog__video iframe, .afe-hub-dialog__video video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 20px; }

/* ---------------------------------------------------------------- Tablet */
@media (max-width: 1100px) {
	.afe-hub-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
	.afe-hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- Phones (Figma mobile boards) */
@media (max-width: 781px) {
	/* The whole bar sticks, offset by the title row's height, so the title row scrolls off and only
	 * the tab row stays pinned (a sticky child can't outrun its parent, so the tabs can't stick alone). */
	.afe-hub-bar { position: sticky; top: calc(var(--hub-sticky-top) - 60px); flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
	.afe-hub-bar__top { justify-content: space-between; height: 60px; padding: 0 16px; }
	.afe-hub-bar__label { padding: 0; }
	.afe-hub-bar__actions { display: flex; align-items: center; gap: 8px; }
	.afe-hub-bar__actions .wp-block-button__link { padding: .75em 1.4em .65em; }
	.afe-hub-bar__share { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgb(255 255 255 / 40%); border-radius: 50%; background: none; color: var(--afe-paper); cursor: pointer; }
	.afe-hub-bar__share .afe-icon { width: 20px; height: 20px; }
	.afe-hub-tabs { padding: 8px 16px; background: var(--afe-ink); scroll-padding-inline: 16px; }

	.afe-hub-layout { grid-template-columns: 1fr; gap: 54px; padding: 40px 16px; }
	.afe-hub-main, .afe-hub-rail { gap: 54px; }
	.afe-hub-head__title { font-size: 2.5rem; }
	.afe-hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
	.afe-hub-tile { min-height: 172px; padding: 16px; }
	.afe-hub-tile__title { font-size: 1.25rem; }
	.afe-hub-about { padding: 24px 20px; }
	.afe-hub-albums, .afe-hub-ways { grid-template-columns: 1fr; }
	.afe-hub-stories { columns: 1; }
	.afe-hub-event { flex-wrap: wrap; }
	.afe-hub-event > .wp-block-button { flex: 0 0 calc(100% - 68px); margin-left: 68px; }
	/* Minutes pill → round download icon (as on document rows); the label stays for screen readers. */
	.afe-hub-row--meeting .afe-hub-pill { justify-content: center; width: 44px; height: 44px; padding: 0; }
	.afe-hub-row--meeting .afe-hub-pill .afe-icon { width: 20px; height: 20px; }
	.afe-hub-row--meeting .afe-hub-pill span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.afe-hub-main > .afe-hub-head + .afe-hub-video { margin-top: -22px; }
	.afe-hub-share { margin-top: -30px !important; }
	.afe-hub-clips { grid-auto-columns: 62vw; margin-inline: -16px; padding-inline: 16px; }

	/* Stories: the form moves into a bottom sheet behind a floating button. */
	.afe-hub-panel--stories .afe-hub-formpanel { display: none; }
	.afe-hub-fab { position: fixed; z-index: 45; right: 16px; bottom: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 999px; background: var(--afe-ink); color: var(--afe-paper); box-shadow: var(--wp--preset--shadow--raised); font: 600 1rem/1 var(--afe-ui); text-decoration: none; }
	.afe-hub-fab .afe-icon { width: 20px; height: 20px; }

	.afe-hub-dialog { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
	.afe-hub-dialog::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: var(--wp--preset--color--surface-2); }
	.afe-hub-dialog[open] { animation: afe-sheet-up .28s var(--afe-ease); }
	.afe-hub-dialog--video { margin: auto; border-radius: 0; padding: 0; }
	.afe-hub-dialog--video::before { display: none; }
	.afe-hub-dialog--video .afe-hub-dialog__close { top: -52px; right: 8px; }
	.afe-hub > .afe-hub-dialog { margin: auto 0 0; }
	.afe-hub > .afe-hub-dialog--video { margin: auto; }
}
@keyframes afe-sheet-up { from { transform: translateY(100%); } to { transform: none; } }

/* Phones: a smaller file icon leaves document titles more room. */
@media (max-width: 480px) {
	.afe-hub-row--doc { gap: 10px; padding: 14px 12px; }
	.afe-hub-row--doc .afe-hub-row__icon { width: 36px; height: 44px; }
	.afe-hub-row--doc .afe-hub-row__icon .afe-icon { width: 20px; height: 20px; }
}
