/* ==========================================================================
   AliH - theme stylesheet
   Hand-written. No Tailwind, no build step.

   Values mirror the pre-WordPress reference (Tailwind scale):
     font sizes 0.75 → 6rem, spacing 0.25rem steps, radii 0.125 → 2rem.
   Tokens come from theme.json:
     colours   var(--wp--preset--color--*)
     fonts     var(--wp--preset--font-family--*)
     sizes     var(--wp--preset--font-size--*)
     radii     var(--wp--custom--radius--*)
   Dark mode overrides the colour presets under `.dark` / `.alih-dark`.
   ========================================================================== */

/* --- Base (Tailwind-preflight-compatible reset) -------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--wp--preset--color--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--wp--preset--color--canvas);
  color: var(--wp--preset--color--ink);
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video, canvas, audio, iframe, embed, object { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, optgroup, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: inherit; }
table { border-collapse: collapse; border-color: inherit; }
hr { border: 0; border-top: 1px solid var(--wp--preset--color--line); }

::selection { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--button-ink); }
:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }

/* Skip link: hidden until focused, then pinned to the top (start side). */
.alih-skip {
  position: absolute;
  inset-block-start: var(--wp--preset--spacing--2);
  inset-inline-start: var(--wp--preset--spacing--4);
  z-index: 60;
  transform: translateY(-200%);
  border-radius: var(--wp--custom--radius--xl);
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--canvas);
  padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--4);
  font-size: var(--wp--preset--font-size--small);
  text-decoration: none;
}
.alih-skip:focus-visible { transform: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--wp--preset--color--line-strong); border-radius: var(--wp--custom--radius--xl); }
::-webkit-scrollbar-track { background: transparent; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* --- Fonts --------------------------------------------------------------- */
/* The body font is chosen by the composed locale (styles.typography in
   theme.json); the base stylesheet never assumes a language. */

/* --- Dark mode (colour preset overrides) --------------------------------- */

:root { color-scheme: light; }

html.alih-dark {
  color-scheme: dark;
}

/* On a dark canvas the light-mode drop shadow disappears; deepen it. */
html.alih-dark .alih-nav__pill .wp-block-navigation__submenu-container {
  box-shadow: 0 18px 40px -20px rgb(0 0 0 / .75);
}

/* --- Layout primitives --------------------------------------------------- */

.alih-container {
  margin-inline: auto;
  max-width: var(--wp--custom--size--container);
  padding-inline: var(--wp--preset--spacing--6);
  width: 100%;
}
@media (min-width: 640px) { .alih-container { padding-inline: var(--wp--preset--spacing--8); } }
@media (min-width: 1024px) { .alih-container { padding-inline: var(--wp--preset--spacing--10); } }

.alih-measure { max-width: var(--wp--custom--size--measure-prose); }
.alih-narrow { max-width: var(--wp--custom--size--measure-wide); }

.alih-section { padding-block: var(--wp--preset--spacing--20); }
@media (min-width: 640px) { .alih-section { padding-block: var(--wp--preset--spacing--24); } }
@media (min-width: 1024px) { .alih-section { padding-block: var(--wp--preset--spacing--28); } }

.alih-section--tight { padding-block: var(--wp--preset--spacing--16); }
@media (min-width: 640px) { .alih-section--tight { padding-block: var(--wp--preset--spacing--24); } }

.alih-stack { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--3); }
.alih-row { align-items: center; display: flex; gap: var(--wp--preset--spacing--2); }
.alih-row-between { align-items: center; display: flex; gap: var(--wp--preset--spacing--2); justify-content: space-between; }
.alih-inline { align-items: center; display: inline-flex; gap: var(--wp--preset--spacing--2); }

.alih-grid-2, .alih-grid-3, .alih-grid-4 { display: grid; gap: var(--wp--preset--spacing--4); grid-template-columns: 1fr; }
.alih-card-grid { display: grid; gap: var(--wp--preset--spacing--4); grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .alih-grid-2, .alih-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alih-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alih-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .alih-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .alih-grid-4, .alih-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 640px) {
}
@media (min-width: 1024px) {
}

.alih-article-grid { display: grid; gap: var(--wp--preset--spacing--12); grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .alih-article-grid { grid-template-columns: minmax(0, 720px); justify-content: center; }
  /* With a table of contents (rendered only when the TOC block has items),
     content and TOC sit side by side with a sticky TOC. */
  .alih-article-grid:has(.alih-toc-toc) {
    grid-template-columns: minmax(0, 720px) minmax(0, 18rem);
    align-items: start;
  }
  .alih-article-grid:has(.alih-toc-toc) .alih-toc-toc { position: sticky; top: 6rem; }
}

.alih-border-t { border-top: 1px solid var(--wp--preset--color--line); }
.alih-border { border: 1px solid var(--wp--preset--color--line); }

.alih-rounded { border-radius: var(--wp--custom--radius--xl); }
.alih-rounded-2xl { border-radius: var(--wp--custom--radius--xl); }

.alih-surface { background: var(--wp--preset--color--surface); }
.alih-surface-soft { background: color-mix(in srgb, var(--wp--preset--color--surface) 60%, transparent); }

/* --- Text helpers -------------------------------------------------------- */

.alih-muted { color: var(--wp--preset--color--muted); }
.alih-faint { color: var(--wp--preset--color--faint); }
.alih-ink { color: var(--wp--preset--color--ink); }
.alih-accent { color: var(--wp--preset--color--accent); }
.alih-strong { font-weight: 600; }
.alih-medium { font-weight: 500; }
.alih-lead { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); line-height: 2rem; }

/* --- Motion -------------------------------------------------------------- */

.alih-reveal { opacity: 1; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.alih-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .alih-reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Effects ------------------------------------------------------------- */

.alih-hero::before {
  content: "";
  inset-inline: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  height: 28rem;
  z-index: -20;
  background: radial-gradient(ellipse 60% 55% at 50% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 9%, transparent), transparent 72%);
}

.alih-dotgrid {
  background-image: radial-gradient(color-mix(in srgb, var(--wp--preset--color--line-strong) 55%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

.alih-glass {
  background: color-mix(in srgb, var(--wp--preset--color--surface) 55%, transparent);
  border: 1px solid var(--wp--preset--color--line-control);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.alih-gradient-text {
  background: linear-gradient(120deg, var(--wp--preset--color--ink), var(--wp--preset--color--accent) 55%, var(--wp--preset--color--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons ------------------------------------------------------------- */

.alih-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wp--preset--spacing--2);
  border-radius: var(--wp--custom--radius--xl);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  min-height: var(--wp--custom--size--control);
  padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--5);
  line-height: 1;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, background-color .2s ease, filter .2s ease;
}
.alih-btn--primary { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--button-ink); box-shadow: 0 8px 22px -14px color-mix(in srgb, var(--wp--preset--color--accent) 70%, transparent); }
.alih-btn--primary:hover { background: var(--wp--preset--color--accent-2); }
.alih-btn--secondary { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line-control); color: var(--wp--preset--color--ink); }
.alih-btn--secondary:hover { border-color: color-mix(in srgb, var(--wp--preset--color--accent) 60%, transparent); }
.alih-btn--ghost { color: var(--wp--preset--color--muted); padding-inline: var(--wp--preset--spacing--3); }
.alih-btn--ghost:hover { color: var(--wp--preset--color--ink); }
.alih-btn--link { display: inline-flex; align-items: center; gap: var(--wp--preset--spacing--2); font-size: var(--wp--preset--font-size--small); font-weight: 500; color: var(--wp--preset--color--muted); transition: color .2s ease; }
.alih-btn--link:hover { color: var(--wp--preset--color--ink); }
.alih-btn--full { width: 100%; }

/* Core button styles mirroring the AliH buttons. */
.wp-block-button.is-style-alih-primary .wp-block-button__link,
.wp-block-button.is-style-alih-secondary .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  border-radius: var(--wp--custom--radius--xl);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  min-height: var(--wp--custom--size--control);
  padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--5);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.wp-block-button.is-style-alih-primary .wp-block-button__link { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--button-ink); }
.wp-block-button.is-style-alih-primary .wp-block-button__link:hover { background: var(--wp--preset--color--accent-2); color: var(--wp--preset--color--button-ink); }
.wp-block-button.is-style-alih-secondary .wp-block-button__link { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line-control); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-alih-secondary .wp-block-button__link:hover { border-color: color-mix(in srgb, var(--wp--preset--color--accent) 60%, transparent); color: var(--wp--preset--color--ink); }

/* --- Eyebrows ------------------------------------------------------------ */

.alih-eyebrow,
.alih-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  color: var(--wp--preset--color--muted);
  font-size: var(--wp--preset--font-size--small);
}

/* --- Brand --------------------------------------------------------------- */

/* A grid item, so `flex` (not inline-flex) keeps it from shrinking oddly.
   align-items centres the logo against the two text lines. */
.alih-brand { min-width: 0; display: flex; align-items: center; gap: var(--wp--preset--spacing--2); }
.alih-brand__mark { height: var(--wp--custom--size--icon-brand); width: var(--wp--custom--size--icon-brand); flex-shrink: 0; }
/* Core gives the text group `is-layout-flow` and zeroes the child margins at
   `:root :where(.is-layout-flow) > *` (0,2,0); match that specificity so this
   flex column actually wins, and strip the <p> margins so the two lines sit
   symmetrically around the bar's centre. */
.alih-header .alih-brand .alih-brand__text.is-layout-flow {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: var(--wp--preset--spacing--1);
}
.alih-header .alih-brand .alih-brand__text.is-layout-flow > * { margin-block: 0; }
.alih-brand__name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--wp--preset--font-size--large);
  font-weight: 600;
  line-height: 1.05;
}
.alih-brand__tagline {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wp--preset--color--faint);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 500;
  line-height: 1.1;
}

/* --- Header / navigation ------------------------------------------------- */

.alih-header {
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--line) 70%, transparent);
  background: color-mix(in srgb, var(--wp--preset--color--canvas) 92%, transparent);
}
/* One flex row: brand (start) | nav (centred) | actions (end). `order` moves the
   nav to the front on mobile, so the markup stays brand, nav, actions.
   Core's `body .is-layout-flex { display:flex }` outranks a bare class, so this
   selector matches its specificity and resets the flex justification it adds.
   Flex + nowrap cannot create a second row, unlike explicit grid columns. */
.alih-header .alih-header__inner.is-layout-flex {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--wp--preset--spacing--4);
  min-height: 4rem;   /* min-, not height: taller content must not clip or wrap */
}
.alih-brand           { order: 1; min-width: 0; }
.alih-nav__pill       { order: 2; min-width: 0; }
.alih-header__actions { order: 3; }
/* Tablet/narrow desktop (600-900px): size the sides to their content so a long
   site title is not squeezed; the pill centres via auto margins. */
.alih-brand           { flex: 0 1 auto; display: flex; justify-content: flex-start; }
.alih-header__actions { flex: 0 0 auto; display: flex; justify-content: flex-end; }
.alih-nav__pill       { flex: 0 1 auto; margin-inline: auto; }
/* Wide desktop: equal side columns land the pill exactly in the middle. */
@media (min-width: 901px) {
  .alih-brand           { flex: 1 1 0; }
  .alih-header__actions { flex: 1 1 0; }
  .alih-nav__pill       { margin-inline: 0; }
}

/* One control family: toggle, contact and hamburger share height, border and
   surface, so the row reads as a set rather than unrelated buttons. */
.alih-header__actions { display: flex; align-items: center; gap: var(--wp--preset--spacing--1); }

/* Match core's Navigation breakpoint exactly: core shows the hamburger below
   600px (`@media (min-width:600px)` hides it). Staying just under avoids the
   1px band where the mobile order would apply with no hamburger present. */
@media (max-width: 599.98px) {
  .alih-header .alih-header__inner.is-layout-flex {
    gap: var(--wp--preset--spacing--4);
    align-items: center;
  }
  /* Menu first, then the brand, then the controls at the end. The brand takes
     the leftover row so the site title is not squeezed by the small controls. */
  .alih-nav__pill       { order: 1; margin-inline: 0; }
  .alih-brand           { order: 2; flex: 1 1 auto; overflow: hidden; }
  .alih-header__actions { order: 3; flex: 0 0 auto; }
  .alih-nav__pill .wp-block-navigation__container { flex-wrap: nowrap; }
}

/* --- Navigation (core Navigation, styled as the AliH pill) --------------- */
/* Core owns the responsive behaviour; these rules only style its classes.   */

/* Desktop: a single pill container. The <nav> is just the flex wrapper. */
.alih-nav__pill {
  --alih-nav-gap: var(--wp--preset--spacing--1);
  font-size: var(--wp--preset--font-size--small);
  line-height: 1.25rem;
}

/* The list is the one and only pill surface (desktop). */
.alih-nav__pill .wp-block-navigation__container {
  align-items: center;
  gap: var(--alih-nav-gap);
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line-control);
  padding: var(--wp--preset--spacing--1);
}

/* Items: pill links. Padding is uniform so items with and without a dropdown
   have the same width; core's chevron margins are neutralised below. */
.alih-header .alih-nav__pill .wp-block-navigation-item__content.wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  gap: .15em;
  min-height: var(--wp--custom--size--control-sm);
  border-radius: var(--wp--custom--radius--xl);
  padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--3);
  color: var(--wp--preset--color--muted);
  transition: color .2s ease, background-color .2s ease;
}
/* Chevron: keep it snug against its label instead of core's loose margins, and
   slightly larger so the affordance reads. */
.alih-nav__pill .wp-block-navigation__submenu-icon { margin-inline-start: 0; font-size: 1.1em; }
.alih-nav__pill .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-icon { margin-inline-start: 0; }
.alih-header .alih-nav__pill .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.alih-nav__pill .current-menu-item > .wp-block-navigation-item__content,
.alih-header .alih-nav__pill .wp-block-navigation-item__content.wp-block-navigation-item__content[aria-current="page"] {
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--surface-2);
}

/* Submenu chevron. */
.alih-nav__pill .wp-block-navigation-submenu__toggle { transition: transform .2s ease; }
.alih-nav__pill .wp-block-navigation-submenu[aria-expanded="true"] > .wp-block-navigation-submenu__toggle,
.alih-nav__pill li:hover > .wp-block-navigation-submenu__toggle { transform: rotate(180deg); }

/* Desktop: a submenu parent is one pill covering the label AND the chevron, so
   hovering highlights both. Core renders the chevron as a sibling of the link
   (it cannot be nested inside an <a>), so the pill lives on the item instead.
   padding-inline-end on the item does not move the dropdown: core positions it
   with top/left relative to the padding box. */
@media (min-width: 600px) {
  .alih-header .alih-nav__pill .wp-block-navigation-item.has-child {
    border-radius: var(--wp--custom--radius--xl);
    padding-inline-end: var(--wp--preset--spacing--3);
    transition: background-color .2s ease;
  }
  .alih-header .alih-nav__pill .wp-block-navigation-item.has-child:hover {
    background: var(--wp--preset--color--surface-2);
  }
  /* The link stops painting a pill of its own and gives the chevron some room. */
  .alih-header .alih-nav__pill .wp-block-navigation-item.has-child > .wp-block-navigation-item__content.wp-block-navigation-item__content,
  .alih-header .alih-nav__pill .wp-block-navigation-item.has-child > .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
    background: none;
    padding-inline-end: var(--wp--preset--spacing--1);
  }
}

/* Submenu panel (desktop). */
.alih-nav__pill .wp-block-navigation__submenu-container {
  min-width: 14rem;
  gap: var(--wp--preset--spacing--1);
  border: 1px solid var(--wp--preset--color--line-control);
  border-radius: var(--wp--custom--radius--xl);
  background: var(--wp--preset--color--surface);
  padding: var(--wp--preset--spacing--2);
  box-shadow: 0 18px 40px -24px rgb(0 0 0 / .45);
}
/* Offset the panel from the item. Core sets `left:-1px; top:100%` at (0,3,0);
   this outranks it. Logical inset so it flips in RTL. */
.alih-header .alih-nav__pill .wp-block-navigation-item.has-child > .wp-block-navigation__submenu-container {
  inset-inline-start: 10px;
  top: 100%;
}
/* Core ships a hardcoded `#fff`/`#000` fallback at a higher specificity:
   `.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container`
   = (0,3,0). Mirror that guard so the design tokens win. Do not "simplify"
   these selectors - dropping the :not() drops them below core again. */
.alih-nav__pill.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--surface);
  border-color: var(--wp--preset--color--line-control);
}
.alih-nav__pill.wp-block-navigation:not(.has-text-color) .wp-block-navigation__submenu-container {
  color: var(--wp--preset--color--ink);
}
.alih-header .alih-nav__pill .wp-block-navigation__submenu-container .wp-block-navigation-item__content.wp-block-navigation-item__content {
  display: flex;
  width: 100%;
  justify-content: space-between;
  border-radius: var(--wp--custom--radius--xl);
  padding: .65rem var(--wp--preset--spacing--3);
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
}
.alih-header .alih-nav__pill .wp-block-navigation__submenu-container .wp-block-navigation-item__content.wp-block-navigation-item__content:hover,
.alih-header .alih-nav__pill .wp-block-navigation__submenu-container .wp-block-navigation-item__content.wp-block-navigation-item__content[aria-current="page"] {
  color: var(--wp--preset--color--ink);
  background: var(--wp--preset--color--surface-2);
}

/* Mobile: core renders a toggle + an overlay. We only skin them. */
/* No `display` here: core shows the toggle only below its 600px breakpoint. */
.alih-header .wp-block-navigation__responsive-container-open {
  align-items: center;
  justify-content: center;
  height: var(--wp--custom--size--control-sm);
  width: var(--wp--custom--size--control-sm);
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line-control);
  background: color-mix(in srgb, var(--wp--preset--color--surface) 50%, transparent);
  /* One step stronger than the toggle: the menu is the primary action. */
  color: var(--wp--preset--color--ink);
}
.alih-header .wp-block-navigation__responsive-container-open:hover { border-color: var(--wp--preset--color--line-strong); }
.alih-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--muted); }
.alih-header .wp-block-navigation__responsive-container-close:hover { color: var(--wp--preset--color--ink); }

/* The open overlay panel: full viewport, core owns position/scroll.
   Core sets `#fff` here via
   `.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay)`
   = (0,5,0), and its default-overlay padding is `clamp(1rem, …, 20rem)` on all
   sides. Mirror the guard so the tokens win, and reset that padding. */
.alih-header .wp-block-navigation__responsive-container.is-menu-open {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
}
.wp-block-navigation.alih-nav__pill:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
  background-color: var(--wp--preset--color--canvas);
  color: var(--wp--preset--color--ink);
  /* Same gutter as the page container, so the overlay lines up with the site. */
  padding: var(--wp--preset--spacing--6);
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content {
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  gap: var(--wp--preset--spacing--2);
  /* core adds calc(2rem + 24px); the panel frame already supplies the inset. */
  padding: 0;
}
/* The nav is items-justified-center, which core feeds into
   `align-items: var(--navigation-layout-justification-setting)` on this column.
   That centres every child horizontally, so submenus drift away from the start
   edge (padding changes could never fix it). Pin list and items to the start. */
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
  width: 100%;
  align-items: stretch;
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  align-items: stretch;
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  width: 100%;
  gap: var(--wp--preset--spacing--1);
  border: 0;
  background: none;
  padding: 0;
  backdrop-filter: none;
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; }
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--wp--custom--size--control); /* 44px touch target */
  border-radius: var(--wp--custom--radius--xl);
  padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--3);
  font-size: var(--wp--preset--font-size--medium);
  line-height: 1.5rem;
  color: var(--wp--preset--color--muted);
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content[aria-current="page"] {
  background: var(--wp--preset--color--surface-2);
  color: var(--wp--preset--color--ink);
}
/* Nested levels: keep core's 2rem base and add one step per depth. */
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
  border: 0;
  box-shadow: none;
  background: none;
  padding-block: var(--wp--preset--spacing--1);
  /* Core's `.wp-block-navigation:not(.has-text-color)` sets #000 on submenus and
     would leak through in the dark overlay; pin the token instead. */
  color: var(--wp--preset--color--muted);
}
/* Sub-category indent ladder, 2 / 4 / 6.
   Core indents overlay submenus via a selector weighted (0,6) with
   `:where(:not(...))`; repeating `.is-menu-open` raises ours without changing
   what it matches, so the token wins. */
/* Sub-category indent ladder, 4 / 8 / 12, with a guide line so the nesting is
   obvious. Core also sets `min-width: 200px` (which forced the list wider than
   its slot and read as a large gap), so reset that too.
   The `> .wp-block-navigation-item >` chains matter: a plain descendant
   selector would also match the shallower levels and win by specificity. */
.alih-header .wp-block-navigation__responsive-container.is-menu-open.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-container {
  padding-inline: var(--wp--preset--spacing--4);
  min-width: 0;
  width: auto;
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation__submenu-container {
  padding-inline: var(--wp--preset--spacing--8);
  min-width: 0;
  width: auto;
}
.alih-header .wp-block-navigation__responsive-container.is-menu-open.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation__submenu-container {
  padding-inline: var(--wp--preset--spacing--12);
}
/* Guide line marking a sub-category block (logical, so it flips in RTL). */
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
  border-inline-start: 2px solid var(--wp--preset--color--line);
}
/* Also neutralise core's per-level top padding so rows stay even. */
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { padding-block: var(--wp--preset--spacing--1); }
/* Sub-category links: flat start padding so the container indent is the only
   offset (item content carries spacing--3 by default, doubling the indent). */
.alih-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content { padding-inline: var(--wp--preset--spacing--1); }
.alih-header .wp-block-navigation__responsive-container-close {
  position: absolute;
  z-index: 2; /* the list now starts in this band, so keep the button on top */
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--wp--custom--size--control-sm);
  width: var(--wp--custom--size--control-sm);
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line-control);
  background: var(--wp--preset--color--canvas);
}

/* Footer navigation. */
.alih-footer__nav .wp-block-navigation__container { gap: var(--wp--preset--spacing--6); }
.alih-footer .alih-footer__nav .wp-block-navigation-item__content.wp-block-navigation-item__content { color: var(--wp--preset--color--muted); transition: color .2s ease; }
.alih-footer .alih-footer__nav .wp-block-navigation-item__content.wp-block-navigation-item__content:hover { color: var(--wp--preset--color--ink); }


/* --- Footer -------------------------------------------------------------- */

.alih-footer { position: relative; border-top: 1px solid var(--wp--preset--color--line); }
/* One colour for every footer link, so nothing inherits a stray default. */
.alih-footer a { color: var(--wp--preset--color--muted); transition: color .2s ease; }
.alih-footer a:hover { color: var(--wp--preset--color--ink); }
.alih-footer__inner { padding-block: var(--wp--preset--spacing--8); }
@media (min-width: 640px) { .alih-footer__inner { padding-block: var(--wp--preset--spacing--10); } }
.alih-footer__grid { display: grid; gap: var(--wp--preset--spacing--8); margin-block: 0; text-align: start; }
@media (min-width: 768px) { .alih-footer__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--wp--preset--spacing--10); } .alih-footer__nav-col { justify-self: end; } }
.alih-footer__contact { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--wp--preset--spacing--5); row-gap: var(--wp--preset--spacing--2); font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; }
nav.alih-footer__nav { display: flex; flex-wrap: wrap; column-gap: var(--wp--preset--spacing--6); row-gap: var(--wp--preset--spacing--2); font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; }
@media (min-width: 768px) { nav.alih-footer__nav { justify-content: flex-end; } }
/* Mobile: centre the whole footer. */
@media (max-width: 767.98px) {
  .alih-footer__grid { justify-items: center; text-align: center; }
  .alih-footer__contact { justify-content: center; }
  nav.alih-footer__nav,
  .alih-footer__nav .wp-block-navigation__container { justify-content: center; }
  .alih-footer__nav-col { justify-self: center; }
  .alih-footer__secondary { justify-content: center; }
}
.alih-footer__bottom { margin-top: var(--wp--preset--spacing--8); border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--8); }
.alih-footer__bottom-row { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--2); font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; color: var(--wp--preset--color--faint); }
@media (min-width: 640px) { .alih-footer__bottom-row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--wp--preset--spacing--4); } }
.alih-footer__secondary { display: flex; align-items: center; gap: var(--wp--preset--spacing--4); }
.alih-footer__secondary a { transition: color .2s ease; }
.alih-footer__secondary a:hover { color: var(--wp--preset--color--ink); }
/* Mobile: centre the copyright row too (stacks above the legal links). */
@media (max-width: 767.98px) {
  .alih-footer__bottom { text-align: center; }
  .alih-footer__bottom-row { flex-direction: column; align-items: center; justify-content: center; }
}

/* Composition variants (header/footer are now block compositions). */
.alih-header.is-position-sticky { position: sticky; }
/* The contact <a> IS .alih-footer__contact-item (not a descendant). */
.alih-footer__contact-item {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  margin: 0;
  color: var(--wp--preset--color--muted);
  transition: color .2s ease;
}
.alih-footer__contact-item:hover { color: var(--wp--preset--color--ink); }
.alih-footer__bottom-row p { margin: 0; }

/* --- Component: result rows (content list) ------------------------------- */

.alih-result {
  align-items: start;
  display: grid;
  gap: var(--wp--preset--spacing--5);
  grid-template-columns: 1fr;
  padding: var(--wp--preset--spacing--8) var(--wp--preset--spacing--4);
  border-bottom: 1px solid var(--wp--preset--color--line);
  transition: background-color .2s ease;
}
.alih-result:hover { background: var(--wp--preset--color--surface); }
@media (min-width: 640px) {
  .alih-result { align-items: center; gap: var(--wp--preset--spacing--8); }
  .alih-result--text { grid-template-columns: minmax(0, 1fr) auto; }
  .alih-result--thumb { grid-template-columns: 14rem minmax(0, 1fr) auto; }
}
@media (min-width: 1024px) {
  .alih-result { gap: var(--wp--preset--spacing--10); }
  .alih-result--thumb { grid-template-columns: 15rem minmax(0, 1fr) auto; }
}
.alih-result__thumb { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--wp--custom--radius--xl); background: var(--wp--preset--color--surface-2); }
.alih-result__thumb img { height: 100%; width: 100%; object-fit: cover; transition: transform .3s ease; }
.alih-result:hover .alih-result__thumb img { transform: scale(1.02); }
.alih-result__body { min-width: 0; }
.alih-result__meta { margin-top: var(--wp--preset--spacing--2); color: var(--wp--preset--color--faint); font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; }
.alih-result__title { margin-top: var(--wp--preset--spacing--3); font-size: var(--wp--preset--font-size--large); line-height: 1.75rem; font-weight: 600; transition: color .2s ease; }
@media (min-width: 640px) { .alih-result__title { font-size: var(--wp--preset--font-size--x-large); } }
.alih-result:hover .alih-result__title { color: var(--wp--preset--color--accent); }
.alih-result__summary { margin-top: var(--wp--preset--spacing--2); max-width: var(--wp--custom--size--measure-prose); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); line-height: 1.75rem; }
.alih-result__action { display: inline-flex; align-items: center; gap: var(--wp--preset--spacing--2); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); font-weight: 600; transition: color .2s ease; }
@media (min-width: 640px) { .alih-result__action { align-self: center; } }
.alih-result:hover .alih-result__action { color: var(--wp--preset--color--ink); }

/* --- Component: single article ------------------------------------------ */

/* The header and body share one reading column (45rem = 720px): every direct
   child of the header is centered on the same axis as the prose below it. */
.alih-article { padding-block: var(--wp--preset--spacing--12); }
@media (min-width: 640px) { .alih-article { padding-block: var(--wp--preset--spacing--20) var(--wp--preset--spacing--12); } }
.alih-article > * { margin-inline: auto; max-width: 45rem; }
.alih-article-body { padding-block: var(--wp--preset--spacing--4) var(--wp--preset--spacing--20); }
.alih-article__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--wp--preset--spacing--2); color: var(--wp--preset--color--faint); font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; }
.alih-article__meta .alih-card__eyebrow,
.alih-article__meta-item { display: inline-flex; align-items: center; color: inherit; font-family: inherit; font-size: inherit; line-height: inherit; }
.alih-article__meta a { color: inherit; }
.alih-article__title { margin-top: var(--wp--preset--spacing--5); font-size: var(--wp--preset--font-size--4-xl); line-height: 1.05; font-weight: 600; }
@media (min-width: 640px) { .alih-article__title { font-size: var(--wp--preset--font-size--6-xl); line-height: 1; } }
.alih-article__lead { margin-top: var(--wp--preset--spacing--6); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); line-height: 2rem; }
.alih-article__image { margin-top: var(--wp--preset--spacing--10); }
.alih-article__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--wp--custom--radius--xl); }
/* The featured image is allowed to be wider than the running text column. */
.alih-article > .alih-article__image { max-width: var(--wp--custom--size--measure-wide); }
.alih-article__author {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--wp--preset--spacing--3);
  margin-top: var(--wp--preset--spacing--10);
  padding-top: var(--wp--preset--spacing--6);
  border-top: 1px solid var(--wp--preset--color--line);
  color: var(--wp--preset--color--muted);
}
.alih-article__author .wp-block-post-author__avatar { margin: 0; line-height: 0; }
.alih-article__author .wp-block-post-author__avatar img { width: 3rem; height: 3rem; object-fit: cover; border-radius: 50%; }
.alih-article__author .wp-block-post-author__content { margin: 0; }

.alih-author { display: flex; align-items: center; gap: var(--wp--preset--spacing--3); margin-top: var(--wp--preset--spacing--6); border-top: 1px solid var(--wp--preset--color--line); padding-top: var(--wp--preset--spacing--6); }
.alih-author img { flex-shrink: 0; }
.alih-author__avatar { width: var(--wp--custom--size--avatar); height: var(--wp--custom--size--avatar); border-radius: var(--wp--custom--radius--full); }
.alih-author__body { display: flex; flex-direction: column; }
.alih-author__name { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; font-weight: 500; transition: color .2s ease; }
.alih-author:hover .alih-author__name { color: var(--wp--preset--color--accent); }
.alih-author__meta { margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; color: var(--wp--preset--color--faint); }

/* --- Component: hero ----------------------------------------------------- */

.alih-hero { isolation: isolate; overflow: hidden; position: relative; }
.alih-hero__inner { position: relative; padding-block: var(--wp--preset--spacing--24) var(--wp--preset--spacing--20); }
@media (min-width: 640px) { .alih-hero__inner { padding-block: var(--wp--preset--spacing--32) var(--wp--preset--spacing--24); } }
.alih-hero__body { max-width: var(--wp--custom--size--measure-wide); }
.alih-hero__title { margin-top: var(--wp--preset--spacing--7); font-size: var(--wp--preset--font-size--4-xl); line-height: 1.5; font-weight: 600; }
@media (min-width: 640px) { .alih-hero__title { font-size: var(--wp--preset--font-size--6-xl); line-height: 1.5; } }
@media (min-width: 1024px) { .alih-hero__title { font-size: var(--wp--preset--font-size--7-xl); line-height: 1.5; } }
.alih-hero__lead { margin-top: var(--wp--preset--spacing--7); max-width: var(--wp--custom--size--measure-prose); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); line-height: 2rem; }
.alih-hero__ctas { margin-top: var(--wp--preset--spacing--9); display: flex; align-items: flex-start; width: fit-content; gap: var(--wp--preset--spacing--3); }

/* --- Component: section header ------------------------------------------ */

.alih-section-header { display: flex; flex-direction: column; justify-content: space-between; gap: var(--wp--preset--spacing--6); }
@media (min-width: 640px) { .alih-section-header { flex-direction: row; align-items: flex-end; } }
.alih-section-header__title { margin-top: var(--wp--preset--spacing--5); font-size: var(--wp--preset--font-size--xxx-large); line-height: 2.25rem; font-weight: 600; }
@media (min-width: 640px) { .alih-section-header__title { font-size: var(--wp--preset--font-size--4-xl); line-height: 2.5rem; } }
.alih-section-header__lead { margin-top: var(--wp--preset--spacing--4); max-width: var(--wp--custom--size--measure-prose); color: var(--wp--preset--color--muted); }
.alih-section-header__link { flex-shrink: 0; }
.alih-section-header__inner-blocks { margin-top: var(--wp--preset--spacing--5); }
.alih-section-body { margin-top: var(--wp--preset--spacing--12); }

/* --- Archives (category/tag/author/date), blog list and search results ---- */
.alih-archive { padding-block: var(--wp--preset--spacing--12) var(--wp--preset--spacing--20); }
@media (min-width: 640px) { .alih-archive { padding-block: var(--wp--preset--spacing--16) var(--wp--preset--spacing--24); } }
.alih-archive__header .wp-block-query-title { font-size: var(--wp--preset--font-size--5-xl); line-height: 1.1; font-weight: 600; }
@media (min-width: 640px) { .alih-archive__header .wp-block-query-title { font-size: var(--wp--preset--font-size--6-xl); } }
.alih-archive__header .wp-block-term-description { margin-top: var(--wp--preset--spacing--4); max-width: var(--wp--custom--size--measure-prose); color: var(--wp--preset--color--muted); }
.alih-archive__header .wp-block-search { margin-top: var(--wp--preset--spacing--6); max-width: var(--wp--custom--size--measure-prose); }
.alih-post-list { margin-top: var(--wp--preset--spacing--12); }
.alih-post-list--flush { margin-top: 0; }
.alih-post-list .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.alih-post-item { padding-block: var(--wp--preset--spacing--8); border-top: 1px solid var(--wp--preset--color--line); }
.alih-post-item__eyebrow { color: var(--wp--preset--color--faint); font-size: var(--wp--preset--font-size--small); }
.alih-post-item__eyebrow a { color: inherit; }
.alih-post-item .wp-block-post-title { margin-top: var(--wp--preset--spacing--2); font-size: var(--wp--preset--font-size--xx-large); font-weight: 600; line-height: 1.25; }
.alih-post-item .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.alih-post-item .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.alih-post-item .wp-block-post-excerpt { margin-top: var(--wp--preset--spacing--3); max-width: var(--wp--custom--size--measure-prose); color: var(--wp--preset--color--muted); }
.alih-post-list .wp-block-query-pagination { margin-top: var(--wp--preset--spacing--10); }

/* --- Component: card ----------------------------------------------------- */

.alih-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--wp--preset--spacing--7);
  border-radius: var(--wp--custom--radius--xl);
  background: var(--wp--preset--color--surface);
  border: 1px solid var(--wp--preset--color--line-control);
  transition: border-color .2s ease, background-color .2s ease;
}
.alih-card:hover { border-color: color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent); background: color-mix(in srgb, var(--wp--preset--color--surface-2) 45%, transparent); }
.alih-card__arrow { color: var(--wp--preset--color--faint); transition: color .2s ease, transform .2s ease; }
.alih-card:hover .alih-card__arrow { color: var(--wp--preset--color--accent); }
.alih-card__title { margin-top: var(--wp--preset--spacing--8); font-size: var(--wp--preset--font-size--x-large); line-height: 1.75rem; font-weight: 600; }
.alih-card__body { margin-top: var(--wp--preset--spacing--3); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); line-height: 1.5rem; }
.alih-card__cta { align-items: center; color: var(--wp--preset--color--ink); display: inline-flex; font-size: var(--wp--preset--font-size--small); font-weight: 600; gap: var(--wp--preset--spacing--2); margin-top: var(--wp--preset--spacing--6); }
.alih-card__cta svg { transition: transform .2s ease; }
.alih-card:hover .alih-card__cta svg { transform: translateX(var(--alih-shift, .125rem)); }
[dir="rtl"] .alih-card__cta svg { --alih-shift: -.125rem; }

/* --- Component: tool card ------------------------------------------------ */

.alih-toolcard {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--wp--preset--spacing--6);
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line);
  background: color-mix(in srgb, var(--wp--preset--color--surface) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color .2s ease;
}
@media (min-width: 640px) { .alih-toolcard { padding: var(--wp--preset--spacing--7); } }
.alih-toolcard:hover { border-color: color-mix(in srgb, var(--wp--preset--color--accent) 50%, transparent); }
.alih-toolcard__icon {
  display: flex; align-items: center; justify-content: center;
  height: var(--wp--custom--size--avatar); width: var(--wp--custom--size--avatar); flex-shrink: 0;
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line-control);
  background: var(--wp--preset--color--surface-2);
  color: var(--wp--preset--color--accent);
}
.alih-toolcard__title { margin-top: var(--wp--preset--spacing--5); font-size: var(--wp--preset--font-size--large); line-height: 1.75rem; font-weight: 500; }
.alih-toolcard__desc { margin-top: var(--wp--preset--spacing--2); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; }

/* --- Component: CTA band ------------------------------------------------- */

.alih-cta-band__card {
  position: relative;
  overflow: hidden;
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--surface);
  padding: var(--wp--preset--spacing--8);
}
@media (min-width: 640px) { .alih-cta-band__card { padding: var(--wp--preset--spacing--12); } }
.alih-cta-band__body { position: relative; max-width: var(--wp--custom--size--measure-prose); }
.alih-cta-band__title { margin-top: var(--wp--preset--spacing--6); font-size: var(--wp--preset--font-size--xxx-large); line-height: 2.25rem; font-weight: 600; }
@media (min-width: 640px) { .alih-cta-band__title { font-size: var(--wp--preset--font-size--5-xl); line-height: 1; } }
.alih-cta-band__lead { margin-top: var(--wp--preset--spacing--5); color: var(--wp--preset--color--muted); }
.alih-cta-band__ctas { margin-top: var(--wp--preset--spacing--8); display: flex; flex-direction: column; gap: var(--wp--preset--spacing--3); }
@media (min-width: 640px) { .alih-cta-band__ctas { flex-direction: row; } }

/* --- Forms --------------------------------------------------------------- */

.alih-field {
  width: 100%;
  border: 1px solid var(--wp--preset--color--line-control);
  background: color-mix(in srgb, var(--wp--preset--color--surface-2) 60%, transparent);
  min-height: var(--wp--custom--size--control);
  border-radius: var(--wp--custom--radius--xl);
  padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4);
  color: var(--wp--preset--color--ink);
  font-size: var(--wp--preset--font-size--small);
  transition: border-color .2s ease, background-color .2s ease;
}
.alih-field::placeholder { color: var(--wp--preset--color--faint); }
.alih-field:focus { border-color: var(--wp--preset--color--accent); background: var(--wp--preset--color--surface-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent); outline: none; }
.alih-field:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }
select.alih-field { appearance: none; cursor: pointer; }
select.alih-field option { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); }

/* --- Prose --------------------------------------------------------------- */

.alih-prose { color: var(--wp--preset--color--muted); font-size: 1.0625rem; line-height: 1.85; }
.alih-prose > * + * { margin-top: var(--wp--preset--spacing--6); }
.alih-prose h2 { color: var(--wp--preset--color--ink); font-size: 1.6rem; line-height: 1.25; font-weight: 600; margin-top: var(--wp--preset--spacing--12); }
.alih-prose h3 { color: var(--wp--preset--color--ink); font-size: 1.1rem; font-weight: 600; margin-top: var(--wp--preset--spacing--8); }
.alih-prose strong { color: var(--wp--preset--color--ink); font-weight: 600; }
.alih-prose a { color: var(--wp--preset--color--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--wp--preset--color--line-control); }
.alih-prose a:hover { text-decoration-color: var(--wp--preset--color--accent); }
.alih-prose ul { list-style: disc; padding-inline-start: var(--wp--preset--spacing--5); }
.alih-prose ol { list-style: decimal; padding-inline-start: var(--wp--preset--spacing--5); }
.alih-prose li { margin-top: var(--wp--preset--spacing--2); }
.alih-prose blockquote { border-inline-start: 2px solid var(--wp--preset--color--accent); padding-inline-start: var(--wp--preset--spacing--5); color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--x-large); line-height: 1.6; font-weight: 500; }
.alih-prose code { font-family: var(--wp--preset--font-family--mono); font-size: .85em; background: var(--wp--preset--color--surface-3); border-radius: var(--wp--custom--radius--xl); padding: var(--wp--preset--spacing--1) var(--wp--preset--spacing--2); }
.alih-prose pre { background: var(--wp--preset--color--surface-2); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--xl); color: var(--wp--preset--color--ink); padding: var(--wp--preset--spacing--5); overflow-x: auto; font-family: var(--wp--preset--font-family--mono); font-size: .8rem; line-height: 1.7; }

/* --- Table of contents / side links ------------------------------------- */

.alih-toc { position: sticky; top: var(--wp--preset--spacing--24); }

/* --- Misc rows ----------------------------------------------------------- */

/* --- Theme toggle -------------------------------------------------------- */

.alih-theme-toggle {
  display: flex; align-items: center; justify-content: center;
  height: var(--wp--custom--size--control-sm); width: var(--wp--custom--size--control-sm);
  border-radius: var(--wp--custom--radius--xl);
  border: 1px solid var(--wp--preset--color--line-control);
  background: color-mix(in srgb, var(--wp--preset--color--surface) 50%, transparent);
  color: var(--wp--preset--color--ink);
  transition: border-color .2s ease, color .2s ease;
}
.alih-theme-toggle:hover { border-color: var(--wp--preset--color--line-strong); color: var(--wp--preset--color--ink); }
.alih-theme-toggle .alih-icon-sun { display: none; }
.alih-dark .alih-theme-toggle .alih-icon-moon,
.alih-dark .alih-theme-toggle .alih-icon-moon { display: none; }
.alih-dark .alih-theme-toggle .alih-icon-sun,
.alih-dark .alih-theme-toggle .alih-icon-sun { display: inline-flex; }

/* --- Component: 404 ------------------------------------------------------ */

.alih-404 { position: relative; display: flex; align-items: center; overflow: hidden; min-height: 70vh; }
.alih-404__bg { position: absolute; inset: 0; opacity: .7; pointer-events: none; }
.alih-404__inner { position: relative; padding-block: var(--wp--preset--spacing--20); }
.alih-404__body { max-width: var(--wp--custom--size--measure-prose); }
.alih-404__title { margin-top: var(--wp--preset--spacing--6); font-size: var(--wp--preset--font-size--6-xl); line-height: .95; font-weight: 600; }
@media (min-width: 640px) { .alih-404__title { font-size: var(--wp--preset--font-size--8-xl); } }
.alih-404__lead { margin-top: var(--wp--preset--spacing--8); max-width: 36rem; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--large); line-height: 2rem; }
.alih-404__actions { margin-top: var(--wp--preset--spacing--9); display: flex; flex-direction: column; gap: var(--wp--preset--spacing--3); }
@media (min-width: 640px) { .alih-404__actions { flex-direction: row; } }

/* --- Icons --------------------------------------------------------------- */

.alih-icon { display: inline-flex; align-items: center; justify-content: center; }
[dir="rtl"] .alih-icon--rtl { transform: scaleX(-1); }
.alih-icon--sm { width: var(--wp--custom--size--icon-sm); height: var(--wp--custom--size--icon-sm); }
.alih-icon--md { width: var(--wp--custom--size--icon-md); height: var(--wp--custom--size--icon-md); }

/* --- Layout: sidebar / full width --------------------------------------- */

.alih-sidebar { position: sticky; top: var(--wp--preset--spacing--24); }
.alih-sidebar__section { border-radius: var(--wp--custom--radius--xl); border: 1px solid var(--wp--preset--color--line); background: color-mix(in srgb, var(--wp--preset--color--surface) 60%, transparent); padding: var(--wp--preset--spacing--5); }
.alih-sidebar__title { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: var(--wp--preset--color--faint); }
.alih-sidebar__list { font-size: var(--wp--preset--font-size--small); line-height: 1.25rem; }
.alih-sidebar__list a { color: var(--wp--preset--color--muted); transition: color .2s ease; }
.alih-sidebar__list a:hover { color: var(--wp--preset--color--ink); }
.alih-sidebar__list li + li { margin-top: var(--wp--preset--spacing--2); }
.alih-sidebar-layout { --wp--style--block-gap: var(--wp--preset--spacing--12); }
@media (min-width: 1024px) { .alih-sidebar-layout { gap: var(--wp--preset--spacing--12); } }

.alih-full-width { width: 100%; }
.alih-full-width > .alignfull { margin-inline: 0; }

/* --- Core block styles (by their own class names) ----------------------- */

/* Columns: theme.json sets the base gap (1.5rem); widen it on larger screens. */
@media (min-width: 640px) { .wp-block-columns.is-layout-flex { gap: var(--wp--preset--spacing--8); } }
.alih-footer__grid.is-layout-flex { gap: var(--wp--preset--spacing--8); }

/* Forms: reuse the field look for uncustomised core inputs. */
.wp-block-search__input,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea,
.wp-block-comment-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-comment-form textarea {
  width: 100%;
  border: 1px solid var(--wp--preset--color--line-control);
  background: color-mix(in srgb, var(--wp--preset--color--surface-2) 60%, transparent);
  min-height: var(--wp--custom--size--control);
  border-radius: var(--wp--custom--radius--xl);
  padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4);
  color: var(--wp--preset--color--ink);
  font-size: var(--wp--preset--font-size--small);
}
.wp-block-search__input::placeholder,
.wp-block-post-comments-form textarea::placeholder,
.wp-block-comment-form textarea::placeholder { color: var(--wp--preset--color--faint); }
.wp-block-search__input:focus,
.wp-block-post-comments-form input:focus,
.wp-block-post-comments-form textarea:focus,
.wp-block-comment-form input:focus,
.wp-block-comment-form textarea:focus {
  border-color: var(--wp--preset--color--accent);
  outline: 3px solid color-mix(in srgb, var(--wp--preset--color--accent) 22%, transparent);
  outline-offset: 0;
}
.wp-block-search__button { border-radius: var(--wp--custom--radius--xl); }

/* Tables. */
.wp-block-table table { width: 100%; border-collapse: collapse; }
.wp-block-table th,
.wp-block-table td { border: 1px solid var(--wp--preset--color--line); padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--4); text-align: start; }
.wp-block-table thead th { background: var(--wp--preset--color--surface-2); font-weight: 600; }
.wp-block-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--wp--preset--color--surface-2) 50%, transparent); }
.wp-block-table figcaption { color: var(--wp--preset--color--faint); font-size: var(--wp--preset--font-size--small); }

/* Lists in content. */
.wp-block-list { padding-inline-start: var(--wp--preset--spacing--5); }
.wp-block-list li + li { margin-top: var(--wp--preset--spacing--2); }

/* Details / accordion marker. */
.wp-block-details > summary { cursor: pointer; font-weight: 600; list-style: none; }
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after { content: "+"; float: inline-end; color: var(--wp--preset--color--faint); }
.wp-block-details[open] > summary::after { content: "–"; }

/* Pagination. */
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers { color: var(--wp--preset--color--muted); transition: color .2s ease; }
.wp-block-query-pagination a:hover { color: var(--wp--preset--color--ink); }
.wp-block-query-pagination .current { color: var(--wp--preset--color--ink); font-weight: 600; }

/* Comments. */
.wp-block-comments .wp-block-comment-template li { list-style: none; }
.wp-block-comment-author-name { font-weight: 600; }
.wp-block-comment-date,
.wp-block-comment-edit-link { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--faint); }
.wp-block-avatar img { border-radius: var(--wp--custom--radius--full); }
.wp-block-post-author__avatar img { border-radius: 50%; }

/* Comment section: aligned with the running text column. */
.alih-comments {
  max-width: 45rem;
  margin-inline: auto;
  margin-top: var(--wp--preset--spacing--16);
  padding-top: var(--wp--preset--spacing--10);
  border-top: 1px solid var(--wp--preset--color--line);
}
.alih-comments__title,
.alih-comments .comment-reply-title { font-size: var(--wp--preset--font-size--x-large); font-weight: 600; line-height: 1.3; }
.wp-block-comments .wp-block-comment-template,
.wp-block-comments .wp-block-comment-template .children { list-style: none; padding: 0; margin: 0; }
.wp-block-comments .wp-block-comment-template { margin-top: var(--wp--preset--spacing--8); }
.wp-block-comments .wp-block-comment-template > li + li,
.wp-block-comments .wp-block-comment-template .children > li { margin-top: var(--wp--preset--spacing--8); }
.wp-block-comments .wp-block-comment-template .children {
  margin-top: var(--wp--preset--spacing--8);
  padding-inline-start: var(--wp--preset--spacing--8);
  border-inline-start: 1px solid var(--wp--preset--color--line);
}
.alih-comment { margin: 0; }
.alih-comment .wp-block-column { min-width: 0; }
.alih-comment__author { font-weight: 600; }
.alih-comment__meta {
  margin: 0;
  gap: var(--wp--preset--spacing--3);
  color: var(--wp--preset--color--faint);
  font-size: var(--wp--preset--font-size--small);
}
.alih-comment .wp-block-comment-content { margin-top: var(--wp--preset--spacing--3); color: var(--wp--preset--color--muted); line-height: 1.7; }
.alih-comment .wp-block-comment-content a {
  color: var(--wp--preset--color--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--wp--preset--color--line-control);
}
.alih-comment .wp-block-comment-content a:hover { text-decoration-color: var(--wp--preset--color--accent); }
.alih-comment .wp-block-comment-reply-link { margin-top: var(--wp--preset--spacing--2); }
.alih-comment .wp-block-comment-reply-link a { font-size: var(--wp--preset--font-size--small); font-weight: 500; color: var(--wp--preset--color--muted); }
.alih-comment .wp-block-comment-reply-link a:hover { color: var(--wp--preset--color--accent); }
.wp-block-comments-pagination { margin-top: var(--wp--preset--spacing--8); }
.wp-block-post-comments-form { margin-top: var(--wp--preset--spacing--10); padding-top: var(--wp--preset--spacing--8); border-top: 1px solid var(--wp--preset--color--line); }
/* The submit button matches the primary button. */
.wp-block-post-comments-form input[type="submit"],
.wp-block-comment-form input[type="submit"] {
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--button-ink);
  border: 0;
  border-radius: var(--wp--custom--radius--xl);
  min-height: var(--wp--custom--size--control);
  padding: var(--wp--preset--spacing--3) var(--wp--preset--spacing--6);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease;
}
.wp-block-post-comments-form input[type="submit"]:hover,
.wp-block-comment-form input[type="submit"]:hover { background: var(--wp--preset--color--accent-2); }

/* Comment form rhythm: label above each field, even spacing between fields. */
.wp-block-post-comments-form .comment-form p,
.wp-block-comment-form .comment-form p { margin: 0 0 var(--wp--preset--spacing--5); }
.wp-block-post-comments-form .comment-form label,
.wp-block-comment-form .comment-form label {
  display: block;
  margin-bottom: var(--wp--preset--spacing--2);
  color: var(--wp--preset--color--ink);
  font-size: var(--wp--preset--font-size--small);
  font-weight: 600;
}
.wp-block-post-comments-form .comment-form .comment-notes,
.wp-block-comment-form .comment-form .comment-notes { color: var(--wp--preset--color--faint); font-size: var(--wp--preset--font-size--small); }
.wp-block-post-comments-form .comment-form .required,
.wp-block-comment-form .comment-form .required { color: var(--wp--preset--color--accent); }
.wp-block-post-comments-form .comment-form .comment-form-cookies-consent,
.wp-block-comment-form .comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--wp--preset--spacing--2);
}
.wp-block-post-comments-form .comment-form .comment-form-cookies-consent label,
.wp-block-comment-form .comment-form .comment-form-cookies-consent label {
  display: inline;
  margin: 0;
  font-weight: 400;
  color: var(--wp--preset--color--muted);
}
.wp-block-post-comments-form .comment-form textarea,
.wp-block-comment-form .comment-form textarea { resize: vertical; }
.wp-block-post-comments-form .comment-form .form-submit,
.wp-block-comment-form .comment-form .form-submit { margin-bottom: 0; }
.wp-block-post-comments-form { margin-bottom: var(--wp--preset--spacing--10); }

/* Images / galleries. */
.wp-block-image img { border-radius: var(--wp--custom--radius--xl); }
.wp-block-gallery { gap: var(--wp--preset--spacing--4); }
.wp-block-image figcaption,
.wp-block-gallery figcaption { color: var(--wp--preset--color--faint); font-size: var(--wp--preset--font-size--small); text-align: center; }

/* Separator. */
.wp-block-separator { border-color: var(--wp--preset--color--line); }

/* Quote rail (logical so it flips in RTL). */
.wp-block-quote { border-inline-start: 2px solid var(--wp--preset--color--accent); padding-inline-start: var(--wp--preset--spacing--5); }

/* Semantic helpers ------------------------------------------------------- */

.alih-hidden { display: none; }
.alih-w-full { width: 100%; }
.alih-relative { position: relative; }

/* Standalone 4.0 adapters: replace legacy dynamic blocks without changing the visual language. */
.alih-brand__mark--fallback {
  display: block;
  width: var(--wp--custom--size--icon-brand);
  height: var(--wp--custom--size--icon-brand);
  flex: 0 0 var(--wp--custom--size--icon-brand);
  /* Kit logo masked over the theme ink so it flips colour in dark mode. */
  background-color: var(--wp--preset--color--ink);
  -webkit-mask: url("icons/logo.svg") center / contain no-repeat;
          mask: url("icons/logo.svg") center / contain no-repeat;
}

/* Alternate page templates: sidebar, full-width and landing ---------------- */

.alih-layout--sidebar .alih-layout__columns { gap: var(--wp--preset--spacing--12); }
.alih-layout__content { min-width: 0; }
.alih-sidebar { display: grid; gap: var(--wp--preset--spacing--8); }
.alih-sidebar__section { display: grid; gap: var(--wp--preset--spacing--3); }
.alih-sidebar__title { font-size: 1rem; margin: 0; }
.alih-sidebar__list { display: grid; gap: var(--wp--preset--spacing--2); font-size: var(--wp--preset--font-size--small); }
.alih-article--compact { padding-block-end: 0; }
.alih-fullwidth { width: 100%; }
.alih-prose--wide { max-width: none; }
.alih-landing { padding-block: var(--wp--preset--spacing--12); }
