/* ==========================================================================
   ETM Tabernacle — Layout (site chrome)
   Announcement bar · header · utility bar · navigation and drawer ·
   breadcrumb · footer · search and 404 pieces · maintenance page.

   The navigation is the core Navigation block restyled (decision D3). Its
   markup is core's: the selectors below are written against
   .wp-block-navigation__* classes as WordPress 7.1 prints them, with
   `.etm-site-header nav.etm-primary-nav` in front so they outrank core's own
   stylesheet without !important. Core switches between inline and overlay at
   600px; the design switches at 1024px, so the band between is overridden.

   Icons are the design's 24×24 / 1.7px-stroke set, drawn as CSS masks so
   they take `currentColor`. A mask uses only the alpha channel, so the
   colour inside each data URI is meaningless and never a design value.

   Every colour, size and space here is a theme.json preset or custom value.
   Reference: assets/css/patterns.css (header, drawer, footer, announcement),
   assets/css/components.css (breadcrumb, forms, empty state).
   ========================================================================== */

:root {
  --etm-icon-menu:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M3 12h18M3 18h18'/%3E%3C/svg%3E");
  --etm-icon-close:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  --etm-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --etm-icon-search:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --etm-icon-play:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E");
  --etm-icon-person:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20a7 7 0 0 1 14 0'/%3E%3C/svg%3E");
}

/* ==== Announcement bar ================================================== */
.etm-announcement-bar {
  background: var(--wp--preset--color--navy);
  color: var(--etm-ink-inverse);
  padding-block: var(--wp--preset--spacing--3);
  padding-inline: var(--etm-gutter);
}
.etm-announcement-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--4);
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
}
.etm-announcement-bar p {
  margin: 0;
  font-size: var(--wp--preset--font-size--body-sm);
}
.etm-announcement-bar a { color: var(--etm-link-inverse); }
.etm-announcement-bar__dismiss {
  margin-left: auto;
  flex: none;
  width: var(--wp--custom--tap);
  height: var(--wp--custom--tap);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--etm-ink-inverse-muted);
  cursor: pointer;
}
.etm-announcement-bar :focus-visible { outline-color: var(--etm-focus-inverse); }

/* ==== Site header ======================================================= */
.etm-site-header {
  background: var(--wp--preset--color--surface);
  position: relative;
  z-index: 20;
}

/* ---- Utility bar. Hidden below 782px, as in the reference. ------------ */
.etm-utility-bar {
  background: var(--wp--preset--color--surface-muted);
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-site-header .etm-utility-bar__inner {
  min-height: 44px;
  padding-block: var(--wp--preset--spacing--2);
  gap: var(--wp--preset--spacing--4);
  font-size: var(--wp--preset--font-size--body-sm);
}
.etm-site-header .etm-service-times--strip {
  margin: 0;
  color: var(--etm-ink-muted);
}
.etm-site-header .etm-utility-bar__right { gap: var(--wp--preset--spacing--4); }
.etm-utility-bar__signin { margin: 0; }
.etm-utility-bar__signin a {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
}
.etm-utility-bar__signin a::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--etm-icon-person) center / contain no-repeat;
  mask: var(--etm-icon-person) center / contain no-repeat;
}
@media (max-width: 48.8125em) { /* below 782px */
  .etm-site-header .etm-utility-bar__right { display: none; }
}

/* ---- The mini search (utility bar and drawer) ------------------------- */
.etm-search-mini.wp-block-search {
  width: min(260px, 40vw);
  margin: 0;
}
/* The reference's .etm-search-mini is the box: border, ground, padding and the
   focus ring are ported to the <form> by reference.css. Core puts one more
   element inside it; until 0.11.2 that wrapper drew the same box again, which
   showed as two borders and, on focus, two rings. The wrapper is only a row. */
.etm-search-mini .wp-block-search__inside-wrapper {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
}
.etm-search-mini .wp-block-search__inside-wrapper::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  background: var(--etm-ink);
  -webkit-mask: var(--etm-icon-search) center / contain no-repeat;
  mask: var(--etm-icon-search) center / contain no-repeat;
}
.etm-search-mini .wp-block-search__input {
  border: 0;
  background: none;
  width: 100%;
  min-height: 34px;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: var(--wp--preset--font-size--body-sm);
  color: var(--etm-ink);
}
.etm-search-mini .wp-block-search__input:focus { outline: none; } /* the ring is on the form (reference.css) */

/* ---- Header main row -------------------------------------------------- */
.etm-site-header .etm-header-main {
  min-height: var(--wp--custom--header-height);
  gap: 16px;   /* fixed: a spacing token grows with the reader's text size, and
                  this row has no room to give away */
}
.etm-site-header .etm-logo {
  display: flex;
  align-items: center;
  flex: none;
  margin: 0;
}
.etm-site-header .etm-logo img {
  display: block;
  width: auto;
  height: 34px;
}
.etm-site-header .etm-logo--text {
  font-size: var(--wp--preset--font-size--heading-4);
}
.etm-site-header .etm-logo--text a { text-decoration: none; color: var(--etm-ink-strong); }

.etm-site-header .etm-header-actions {
  margin-left: auto;
  gap: 8px;
  min-width: 0;
  flex: none;
}
.etm-site-header .etm-header-actions .wp-block-buttons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  min-width: 0;
}
.etm-site-header .etm-header-actions .wp-block-button { flex: none; min-width: 0; margin: 0; }

/* Live stream action: plain link at rest. The label stays on one line (site
   owner, 22 September 2026: it stacked on a phone); the logo shrinks instead,
   and below 352px the label gives way to its icon. Milestone 7 adds the live
   pill. */
.is-style-etm-live-action .wp-block-button__link {
  background: transparent;
  color: var(--etm-ink-strong);
  border-color: transparent;
  padding-block: 0;
  padding-inline: var(--wp--preset--spacing--2);
  min-height: var(--wp--custom--tap);
  gap: var(--wp--preset--spacing--2);
  font-size: var(--wp--preset--font-size--body);
  line-height: var(--wp--custom--line-height--body);
  text-align: left;
  white-space: nowrap;
  word-break: normal;      /* core breaks button text mid-word */
  overflow-wrap: normal;
  flex: none;
  border-radius: 0;
}
.is-style-etm-live-action .wp-block-button__link:hover {
  background: transparent;
  color: var(--etm-ink-strong);
  text-decoration: underline;
  text-underline-offset: 0.35em;
}
.is-style-etm-live-action .wp-block-button__link::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--etm-icon-play) center / contain no-repeat;
  mask: var(--etm-icon-play) center / contain no-repeat;
}

/* No search icon in the phone header (site owner, 21 September 2026): the
   search box is the first thing in the menu. (The footer's Search link
   went at the church's request of 2 November 2026; /search/ still works.) */

/* Narrow phones: tighten at 375px and below (the reference's query stops a
   hair short of a 375px device); below 352px the live label drops to its
   icon and the link keeps its name for assistive technology. */
@media (max-width: 23.5em) {
  .etm-site-header .etm-header-main { gap: 8px; }
  .etm-site-header .etm-logo img { height: 28px; }
  .is-style-etm-live-action .wp-block-button__link { padding-inline: var(--wp--preset--spacing--1); gap: var(--wp--preset--spacing--1); }
}
@media (max-width: 22em) {
  .is-style-etm-live-action .wp-block-button__link { font-size: 0; }
  .is-style-etm-live-action .wp-block-button__link::before { width: 20px; height: 20px; }
}

/* ==== Navigation (core block) =========================================== */
.etm-site-header nav.etm-primary-nav {
  margin: 0;
  min-width: 0;
}

/* The open button: our three-line icon in a 44px target, last in the row. */
.etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-open {
  width: var(--wp--custom--tap);
  height: var(--wp--custom--tap);
  display: grid;
  place-items: center;
  color: var(--etm-ink-strong);
  flex: none;
}
.etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-open svg,
.etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-close svg { display: none; }
.etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-open::before,
.etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-close::before {
  content: "";
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--etm-icon-menu) center / contain no-repeat;
  mask: var(--etm-icon-menu) center / contain no-repeat;
}
.etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-close::before {
  -webkit-mask-image: var(--etm-icon-close);
  mask-image: var(--etm-icon-close);
}

/* The disclosure button core prints beside a section link. Its own SVG is
   replaced by the design's chevron; the button stays the accessible control. */
.etm-site-header nav.etm-primary-nav .wp-block-navigation-submenu__toggle {
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--etm-ink-strong);
  cursor: pointer;
}
.etm-site-header nav.etm-primary-nav .wp-block-navigation-submenu__toggle svg { display: none; }
.etm-site-header nav.etm-primary-nav .wp-block-navigation-submenu__toggle::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--etm-icon-chevron) center / contain no-repeat;
  mask: var(--etm-icon-chevron) center / contain no-repeat;
  transition: transform var(--wp--custom--transition);
}
.etm-site-header nav.etm-primary-nav .wp-block-navigation-submenu__toggle[aria-expanded="true"]::before { transform: rotate(180deg); }

/* Below 1024px the block is the drawer: the row shows only the open button,
   placed after the actions. Core inlines the menu from 600px; hold it back. */
@media (max-width: 63.9375em) {
  .etm-site-header nav.etm-primary-nav { order: 3; }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-open { display: grid; }

  /* The row is the lockup, the live link and the menu button. When a phone's
     text is enlarged the lockup is the one thing that gives way, so the live
     link keeps its two words on one line (site owner, 22 September 2026). */
  .etm-site-header .etm-logo { flex: 0 1 auto; min-width: 0; }
  .etm-site-header .etm-logo a { display: flex; min-width: 0; }
  .etm-site-header .etm-logo img {
    max-width: 100%;
    min-width: 0;
    object-fit: contain;
    object-position: left center;
  }
}

/* ---- Desktop: the inline list and its disclosures (1024px and up) ----- */
@media (min-width: 64em) {
  .etm-site-header .etm-header-main { min-height: 88px; }
  .etm-site-header .etm-logo img { height: 44px; }
  .etm-site-header .etm-header-actions { margin-left: var(--wp--preset--spacing--6); }

  .etm-site-header nav.etm-primary-nav { margin-left: auto; }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-open { display: none; }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: block;
    position: relative;
    width: auto;
  }
  /* Drawer-only pieces stay out of the inline row. */
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .etm-drawer-search,
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .etm-drawer-actions { display: none; }

  .etm-site-header nav.etm-primary-nav .wp-block-navigation__container {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--6);
    margin: 0;
    padding: 0;
  }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__container > .wp-block-navigation-item {
    display: flex;
    align-items: center;
    position: relative;
  }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
    display: inline-flex;
    align-items: center;
    min-height: var(--wp--custom--tap);
    padding: 0;
    font-size: var(--wp--preset--font-size--button);
    font-weight: var(--wp--custom--weight--bold);
    letter-spacing: -0.005em;
    color: var(--etm-ink-strong);
    text-decoration: none;
  }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__container > .wp-block-navigation-item > a.wp-block-navigation-item__content:hover {
    text-decoration: underline;
    text-underline-offset: 0.35em;
  }
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__container > .wp-block-navigation-item > [aria-current="page"] {
    box-shadow: inset 0 -2px 0 0 var(--wp--preset--color--gold);
  }
  /* The chevron button sits 5px after the label in a full-height target. */
  .etm-site-header nav.etm-primary-nav .wp-block-navigation__container > .has-child > .wp-block-navigation-submenu__toggle {
    width: 24px;
    height: var(--wp--custom--tap);
    margin-left: 1px;
  }

  /* The drop-down panel. Core shows it on hover, on the button's
     aria-expanded and while it holds focus; these are its looks. */
  .etm-site-header nav.etm-primary-nav.wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
    left: 0;
    top: 100%;
    min-width: 280px;
    max-width: min(320px, 80vw);
    margin-top: var(--wp--preset--spacing--2);
    padding-block: var(--wp--preset--spacing--2);
    background: var(--wp--preset--color--surface);
    border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
    border-radius: var(--wp--custom--radius--xs);
    box-shadow: var(--wp--preset--shadow--overlay);
    color: var(--etm-ink);
    /* The panel is a flex column and would inherit the 24px gap between the
       top-level items; the reference's rows touch (44px pitch). */
    gap: 0;
  }
  /* Core closes the panel on `pointerleave` of the <li>. The 8px between the
     item and the panel (margin-top above) belongs to neither, so the pointer
     left the <li> on its way down and the panel vanished before a link could
     be reached. This invisible strip is part of the panel - so part of the
     <li> - and carries the pointer across. It is only hit-testable while the
     panel is open (core hides the closed panel with visibility). */
  .etm-site-header nav.etm-primary-nav.wp-block-navigation .has-child > .wp-block-navigation__submenu-container::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: calc(var(--wp--preset--spacing--2) + 2px);
  }
  .etm-site-header nav.etm-primary-nav .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item {
    display: block;
  }
  .etm-site-header nav.etm-primary-nav .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content {
    display: flex;
    align-items: center;
    min-height: var(--wp--custom--tap);
    padding: 0 var(--wp--preset--spacing--4);
    font-size: var(--wp--preset--font-size--body-sm);
    font-weight: var(--wp--custom--weight--medium);
    color: var(--etm-link);
    text-decoration: none;
  }
  .etm-site-header nav.etm-primary-nav .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item > .wp-block-navigation-item__content:hover { text-decoration: underline; }
}

/* ---- The drawer: core's overlay restyled as the right-hand panel ------
   Core expands every section inside its overlay and keeps them expanded,
   so the drawer is a grouped list: each section's landing-page link as a
   bold row, its pages beneath it. That is also the no-JavaScript state. */
.etm-site-header nav.etm-primary-nav.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
  display: block;
  padding: 0;
  background-color: color-mix(in srgb, var(--wp--preset--color--navy) 60%, transparent); /* the scrim */
  color: var(--etm-ink);
  overflow: hidden;
  animation: none;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__responsive-close {
  margin-left: auto;
  width: min(400px, 88vw);
  max-width: none;
  height: 100%;
  background: var(--wp--preset--color--surface);
  border-radius: var(--wp--custom--radius--md) 0 0 var(--wp--custom--radius--md);
  box-shadow: var(--wp--preset--shadow--overlay);
  overflow-y: auto;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__responsive-dialog {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
/* The drawer head: a "Menu" title and the close button, 64px tall. */
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__responsive-dialog::before {
  content: "Menu";
  display: flex;
  align-items: center;
  min-height: var(--wp--custom--header-height);
  padding-inline: var(--wp--preset--spacing--4);
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
  font-size: var(--wp--preset--font-size--heading-5);
  font-weight: var(--wp--custom--weight--bold);
  color: var(--etm-ink-strong);
}
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__responsive-container-close {
  top: calc((var(--wp--custom--header-height) - var(--wp--custom--tap)) / 2);
  right: var(--wp--preset--spacing--4);
  width: var(--wp--custom--tap);
  height: var(--wp--custom--tap);
  display: grid;
  place-items: center;
  color: var(--etm-ink-strong);
}
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__responsive-container-content {
  display: block;
  padding: 0;
  gap: 0;
}
/* Search section. In the utility bar the <form> is the search box; here the
   <form> is a full-width section of the drawer, so until 0.16.3 the box's
   border and its focus ring were drawn on the section, edge to edge, and the
   panel cut them off at both sides. The section keeps only its padding and the
   hairline under it; the box and the ring are on the row inside it. */
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-search {
  width: auto;
  min-height: 0;
  padding: var(--wp--preset--spacing--4);
  border: 0;
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
  border-radius: 0;
  background: none;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-search:focus-within {
  outline: none;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-search .wp-block-search__inside-wrapper {
  min-height: 44px;
  padding-inline: var(--wp--preset--spacing--3);
  background: var(--wp--preset--color--surface);
  border: var(--wp--custom--border--control) solid var(--wp--preset--color--line-strong);
  border-radius: var(--wp--custom--radius--sm);
}
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-search:focus-within .wp-block-search__inside-wrapper {
  outline: var(--wp--custom--border--focus) solid var(--etm-focus);
  outline-offset: 2px;
}
/* The list: 56px rows with hairlines. */
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__container {
  display: block;
  margin: 0;
  padding: 0;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
  display: block;
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation-item__content {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0 var(--wp--preset--spacing--5);
  margin: 0;
  text-align: left;
  text-decoration: none;
  font-size: var(--wp--preset--font-size--button);
  font-weight: var(--wp--custom--weight--bold);
  color: var(--etm-ink-strong);
}
/* Sections are always expanded here, so the disclosure button has nothing
   to do and is not shown. */
.etm-site-header nav.etm-primary-nav .is-menu-open .wp-block-navigation-submenu__toggle { display: none; }
.etm-site-header nav.etm-primary-nav .is-menu-open .has-child .wp-block-navigation__submenu-container {
  display: block;
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: var(--wp--preset--spacing--2) 0;
  background: var(--wp--preset--color--surface-muted);
  border: 0;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  overflow: visible;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item {
  display: block;
  border: 0;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  min-height: 48px;
  padding-left: var(--wp--preset--spacing--8);
  font-size: var(--wp--preset--font-size--body-sm);
  font-weight: var(--wp--custom--weight--medium);
  color: var(--etm-link);
}
/* Actions section. */
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-actions {
  display: grid;
  gap: var(--wp--preset--spacing--3);
  padding: var(--wp--preset--spacing--4);
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-actions .wp-block-button { width: 100%; margin: 0; }
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-actions .wp-block-button__link { width: 100%; }
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-actions__live .wp-block-button__link::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--etm-icon-play) center / contain no-repeat;
  mask: var(--etm-icon-play) center / contain no-repeat;
}
.etm-site-header nav.etm-primary-nav .is-menu-open .etm-drawer-actions__signin .wp-block-button__link::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--etm-icon-person) center / contain no-repeat;
  mask: var(--etm-icon-person) center / contain no-repeat;
}

/* ---- No JavaScript: the menu is an ordinary list below the header. ---- */
html:not(.js) .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container-open { display: none; }
html:not(.js) .etm-site-header nav.etm-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
  display: block;
  position: static;
  width: 100%;
}
@media (max-width: 63.9375em) {
  html:not(.js) .etm-site-header .etm-header-main { flex-wrap: wrap; }
  html:not(.js) .etm-site-header nav.etm-primary-nav { flex-basis: 100%; order: 4; }
  html:not(.js) .etm-site-header nav.etm-primary-nav .wp-block-navigation__container {
    display: block;
    margin: 0;
    padding: var(--wp--preset--spacing--2) 0 var(--wp--preset--spacing--4);
    border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
  }
  html:not(.js) .etm-site-header nav.etm-primary-nav .wp-block-navigation__container > .wp-block-navigation-item { display: block; }
  html:not(.js) .etm-site-header nav.etm-primary-nav .wp-block-navigation-item__content {
    display: flex;
    align-items: center;
    min-height: var(--wp--custom--tap);
    padding: 0;
    font-weight: var(--wp--custom--weight--bold);
    color: var(--etm-ink-strong);
    text-decoration: none;
  }
  html:not(.js) .etm-site-header nav.etm-primary-nav .wp-block-navigation-submenu__toggle { display: none; }
  html:not(.js) .etm-site-header nav.etm-primary-nav.wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
    display: block;
    position: static;
    width: auto;
    height: auto;
    min-width: 0;
    margin: 0;
    padding: 0 0 0 var(--wp--preset--spacing--4);
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    overflow: visible;
  }
  html:not(.js) .etm-site-header nav.etm-primary-nav .has-child .wp-block-navigation__submenu-container > .wp-block-navigation-item { display: block; }
  html:not(.js) .etm-site-header nav.etm-primary-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    font-weight: var(--wp--custom--weight--medium);
    font-size: var(--wp--preset--font-size--body-sm);
    color: var(--etm-link);
  }
  html:not(.js) .etm-site-header nav.etm-primary-nav .etm-drawer-search,
  html:not(.js) .etm-site-header nav.etm-primary-nav .etm-drawer-actions { display: none; }
}

/* ==== Breadcrumb ======================================================== */
.etm-breadcrumb {
  padding-block: var(--wp--preset--spacing--5);
  margin-block: 0;
}
/* The trail's own padding is the space before the hero or band beneath it. */
.etm-main > .etm-breadcrumb + * { margin-block-start: 0; }
.etm-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wp--preset--font-size--body-sm);
}
.etm-breadcrumb__list li { margin: 0; }
.etm-breadcrumb [aria-current="page"] { color: var(--etm-ink-muted); }
.etm-breadcrumb__sep { display: inline-flex; color: var(--etm-ink-muted); }

/* ==== Site footer ======================================================= */
.etm-site-footer {
  padding-block: var(--wp--preset--spacing--16);
}
.etm-site-footer a:where(:not(.wp-block-button__link)) {
  color: var(--etm-link-inverse);
  text-decoration: underline;
}
.etm-site-footer :focus-visible { outline-color: var(--etm-focus-inverse); }
.etm-site-footer h2,
.etm-site-footer h3 {
  font-size: var(--wp--preset--font-size--heading-5);
  line-height: var(--wp--custom--line-height--h-4);
  margin: 0 0 var(--wp--preset--spacing--3);
}
.etm-site-footer .etm-footer-grid {
  display: grid;
  gap: var(--wp--preset--spacing--8);
}
.etm-site-footer .etm-footer-grid > * { min-width: 0; margin: 0; }
.etm-site-footer .etm-footer__mark {
  width: 56px;
  margin: 0 0 var(--wp--preset--spacing--3);
}
.etm-site-footer .etm-footer__mark img { display: block; width: 56px; height: auto; aspect-ratio: 320 / 272; }
.etm-site-footer .etm-contact-details p,
.etm-site-footer .etm-footer__visit {
  font-size: var(--wp--preset--font-size--body-sm);
  line-height: 1.6;
  margin: 0 0 var(--wp--preset--spacing--4);
}
.etm-site-footer .etm-contact-details p:last-child { margin-bottom: 0; }
.etm-site-footer .etm-footer__visit { margin: var(--wp--preset--spacing--4) 0 0; }
.etm-site-footer .etm-service-times--list,
.etm-site-footer .etm-footer__list {
  display: grid;
  gap: var(--wp--preset--spacing--2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--wp--preset--font-size--body-sm);
}
.etm-site-footer .etm-footer__list li,
.etm-site-footer .etm-service-times--list li { margin: 0; }
.etm-site-footer .etm-footer__legal {
  margin-top: var(--wp--preset--spacing--10);
  padding-top: var(--wp--preset--spacing--6);
  border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line-inverse);
}
.etm-site-footer .etm-footer__legal p { margin: 0; }
@media (min-width: 37.5em) {   /* 600px */
  .etm-site-footer .etm-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 48.875em) { /* 782px */
  .etm-site-footer .etm-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--wp--preset--spacing--10); }
}

/* ==== Bands (the section rhythm used by 404 and search) ================= */
.etm-band { padding-block: var(--etm-section-y); }
.etm-band--tight { padding-block: var(--wp--preset--spacing--8); }
.etm-measure { max-width: var(--wp--custom--measure--prose); }
.etm-404__title,
.etm-search__title { margin-block: 0 var(--wp--preset--spacing--6); }

/* ==== Search form (core Search block, full-width field with a button) === */
.etm-search-form.wp-block-search { margin-block-start: var(--wp--preset--spacing--10); }
.etm-search-form .wp-block-search__label {
  display: block;
  margin-bottom: var(--wp--preset--spacing--2);
  font-size: var(--wp--preset--font-size--body-sm);
  font-weight: var(--wp--custom--weight--semibold);
  color: var(--etm-ink-strong);
}
.etm-search-form .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--3);
}
.etm-search-form .wp-block-search__input {
  flex: 1 1 16rem;
  width: 100%;
  min-height: var(--wp--custom--tap);
  padding: var(--wp--preset--spacing--3);
  margin: 0;
  font: inherit;
  font-size: var(--wp--preset--font-size--button); /* 16px: never lower, stops iOS zoom */
  background: var(--wp--preset--color--surface);
  color: var(--etm-ink);
  border: var(--wp--custom--border--control) solid var(--wp--preset--color--line-strong);
  border-radius: var(--wp--custom--radius--sm);
}
.etm-search-form .wp-block-search__button {
  flex: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--2);
  min-height: var(--wp--custom--tap);
  cursor: pointer;
}
.etm-search-form .wp-block-search__button::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--etm-icon-search) center / contain no-repeat;
  mask: var(--etm-icon-search) center / contain no-repeat;
}
.etm-search__title + .etm-search-form.wp-block-search { margin-block-start: 0; }

/* ==== Resource list (404) =============================================== */
.etm-resource-list {
  margin-block-start: var(--wp--preset--spacing--8);
  border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-resource-list__item {
  display: grid;
  gap: var(--wp--preset--spacing--3);
  padding-block: var(--wp--preset--spacing--5);
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-resource-list__item h3 {
  font-size: var(--wp--preset--font-size--heading-4);
  font-weight: var(--wp--custom--weight--semibold);
  margin: 0;
}
.etm-resource-list__item p {
  color: var(--etm-ink-muted);
  font-size: var(--wp--preset--font-size--body-sm);
  margin: 4px 0 0;
}
.etm-resource-list__item .wp-block-buttons { margin: 0; }
@media (min-width: 48.875em) {
  .etm-resource-list__item { grid-template-columns: 1fr auto; align-items: center; gap: var(--wp--preset--spacing--6); }
}

/* ==== Search results and the empty state ================================ */
.etm-results { margin: 0; }
.etm-result {
  padding-block: var(--wp--preset--spacing--5);
  border-bottom: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-results__list > .etm-result:first-child { border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line); }
.etm-result__title {
  font-size: var(--wp--preset--font-size--heading-4);
  margin: 0 0 var(--wp--preset--spacing--1);
}
.etm-result__meta { margin: 0 0 var(--wp--preset--spacing--2); }
.etm-result__excerpt p { margin: 0; font-size: var(--wp--preset--font-size--body-sm); }
.etm-pagination { margin-block-start: var(--wp--preset--spacing--8); }

.etm-empty {
  padding: var(--wp--preset--spacing--8);
  background: var(--wp--preset--color--surface-muted);
  border: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
  border-radius: var(--wp--custom--radius--xs);
}
.etm-empty h3 { margin: 0 0 var(--wp--preset--spacing--3); font-size: var(--wp--preset--font-size--heading-3); }
.etm-empty p { margin: 0 0 var(--wp--preset--spacing--5); max-width: 56ch; }
.etm-empty .etm-empty__actions { margin: 0; gap: var(--wp--preset--spacing--3); }

/* ==== Maintenance page (templates/maintenance.html) ===================== */
/* No header, navigation or footer: every link on them would lead back here. */
.etm-maintenance-main { min-height: 100vh; }
.etm-maintenance__logo { margin-block-end: var(--wp--preset--spacing--10); }
.etm-maintenance__logo img { height: 44px; width: auto; }
.etm-maintenance__title { margin-block: 0 var(--wp--preset--spacing--6); }
.etm-maintenance__message { font-size: var(--wp--preset--font-size--body-lg); }
.etm-maintenance__message > :last-child { margin-block-end: 0; }
.etm-maintenance__back {
  margin-block: var(--wp--preset--spacing--6) 0;
  font-weight: var(--wp--custom--weight--semibold);
  color: var(--etm-ink-strong);
}
.etm-maintenance__facts {
  display: grid;
  gap: var(--wp--preset--spacing--8);
  margin-block-start: var(--wp--preset--spacing--10);
  padding-block-start: var(--wp--preset--spacing--8);
  border-top: var(--wp--custom--border--hairline) solid var(--wp--preset--color--line);
}
.etm-maintenance__facts > * { margin-block: 0; }
.etm-maintenance__facts h2 {
  font-size: var(--wp--preset--font-size--heading-4);
  margin-block: 0 var(--wp--preset--spacing--3);
}
@media (min-width: 48em) {
  .etm-maintenance__facts { grid-template-columns: 1fr 1fr; gap: var(--wp--preset--spacing--10); }
}

/* ==== Button variants (block styles, inc/block-styles.php) ============== */
.is-style-etm-secondary .wp-block-button__link {
  background: var(--wp--preset--color--surface);
  color: var(--etm-ink-strong);
  border-color: var(--wp--preset--color--line-strong);
}
.is-style-etm-secondary .wp-block-button__link:hover {
  background: var(--wp--preset--color--action-quiet);
  color: var(--etm-ink-strong);
}
.is-style-etm-accent .wp-block-button__link {
  background: var(--wp--custom--action--accent);
  color: var(--wp--custom--action--on-accent);
}
.is-style-etm-accent .wp-block-button__link:hover {
  background: var(--wp--custom--action--accent-hover);
  color: var(--wp--custom--action--on-accent);
}
/* On dark grounds a secondary button keeps its own colours (reference layout.css). */
.has-navy-background-color .is-style-etm-secondary .wp-block-button__link,
.has-ink-deep-background-color .is-style-etm-secondary .wp-block-button__link {
  background: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--navy);
}
