/* Skeleton layout (l-*): page structure around the brand's components. Reads only contract
 * tokens (core/theme/contract.test.ts enforces it). */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-body);
  font: 400 var(--size-body) / var(--leading-body) var(--font-body);
}
img,
video {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--link);
}
a:hover {
  color: var(--link-hover);
}
::selection {
  background: var(--selection);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* The skip link focuses <main>; the jump is the feedback, not a ring around the page. */
main:focus {
  outline: none;
}
/* In-page targets land below the sticky header (WCAG 2.4.11). shared.js measures the header into
 * --l-header-h; without JS, a one-row header: its 44px controls, padding and border. */
:root:has(.c-header--sticky) {
  --l-header-row: calc(44px + 2 * var(--space-3) + max(1px, var(--border-w)));
  scroll-padding-top: calc(var(--l-header-h, var(--l-header-row)) + var(--space-3));
}
/* Page rhythm: each block is one section in the brand's page column. */
.l-section {
  width: min(100% - 2 * var(--gutter), var(--width-page));
  margin: var(--space-7) auto;
}
/* A bleed hero runs to the window edges: the skill sets its text column from the full width. */
.l-section--bleed {
  width: 100%;
}
/* A statement band runs edge to edge, with its sentence on the page column. */
.l-section--bleed > .c-statement {
  padding-inline: max(var(--gutter), calc((100% - var(--width-page)) / 2));
}
/* A bleed hero that opens the page meets the header, with no strip of page above its photo. */
main > .l-section--bleed:first-child {
  margin-block-start: 0;
}
.l-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Minimum widths chosen so the standard 76rem page column fits at most 2, 3 or 4. auto-fit lets a
 * short row stretch instead of leaving empty tracks. */
.l-grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
}
.l-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.l-grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
/* One column with the grid's gap, for blocks a script shows and hides. */
.l-stack {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
}
/* Wide rich text: the whole page column instead of c-prose's reading width. */
.l-wide {
  max-width: none;
}

/* A button that reads as the link beside it: Cookie settings among the footer's legal links. */
.l-link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* The menu button shows the action it will take. */
[aria-expanded="true"] > .l-icon-open,
[aria-expanded="false"] > .l-icon-close {
  display: none;
}

/* Logos: one image per mode, switched with the page. */
.l-logo {
  display: block;
  width: auto;
  height: 2.5rem;
}
/* The nearest data-mode decides, so inverse chrome (set by shared.js) shows the logo that
 * suits its own surface, not the page's. Nesting is listed out: a descendant selector cannot
 * find the nearest ancestor. */
.l-logo--dark,
[data-mode="dark"] .l-logo--light,
[data-mode="light"] .l-logo--dark {
  display: none;
}
[data-mode="dark"] .l-logo--dark,
[data-mode="light"] .l-logo--light {
  display: block;
}
[data-mode="dark"] [data-mode="light"] .l-logo--light,
[data-mode="light"] [data-mode="dark"] .l-logo--dark {
  display: block;
}
[data-mode="dark"] [data-mode="light"] .l-logo--dark,
[data-mode="light"] [data-mode="dark"] .l-logo--light {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) .l-logo--light {
    display: none;
  }
  :root:not([data-mode]) .l-logo--dark {
    display: block;
  }
  :root:not([data-mode]) [data-mode="light"] .l-logo--light {
    display: block;
  }
  :root:not([data-mode]) [data-mode="light"] .l-logo--dark {
    display: none;
  }
}
.l-brand-name {
  color: var(--text-heading);
  font: var(--weight-heading) var(--size-h3) / 1 var(--font-display);
  letter-spacing: var(--tracking-display);
  text-transform: var(--case-display);
}

/* The footer runs to the page edges. */
.l-footer {
  margin-top: var(--space-8);
  border-radius: 0;
}

/* Fixed-position helpers */
.l-preview {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 100;
}

/* The attribute must beat brand display rules such as the field grid. until-found is left to the
 * browser, which cannot find text inside display: none. */
[hidden]:not([hidden="until-found"]) {
  display: none !important;
}

/* The honeypot: present for bots, absent for people and screen readers. */
.l-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.l-consent {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 100;
  margin-left: auto;
}

/* The video hero's control shows the action it will take. */
[data-playing="true"] > .l-icon-play,
[data-playing="false"] > .l-icon-pause {
  display: none;
}

/* Where a block uses a brand component a little differently from components.md */
/* c-cta paints its own surface, so a raised CTA band needs the raised color here. */
.c-cta.c-band--raised {
  background: var(--bg-raised);
}
/* A strip image with no link opens nothing. */
div.c-gallery__item {
  cursor: default;
}
/* The cookie table: one table per category, spaced apart. */
.c-table__wrap + .c-table__wrap {
  margin-top: var(--space-5);
}
/* Desktop grids take their column count from their items (core/blocks/fit.ts), so no last row
 * is left mostly empty. */
@media (min-width: 64rem) {
  .l-fit {
    grid-template-columns: repeat(var(--l-cols), minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Toasts (site.toast) stack in the corner, above the modal's layer. */
.l-toasts{position:fixed;inset-block-end:var(--space-4);inset-inline-end:var(--space-4);z-index:110;display:grid;gap:var(--space-2);max-width:calc(100vw - 2 * var(--space-4))}

/* A hero has one photo, so a composed collage shows it across its whole frame. */
.c-hero__collage > .c-hero__media:only-child{grid-column:1 / -1}

/* A tooltip wrap must follow the control it wraps in and out of the header's container query. */
.c-tooltip__wrap:has(> .c-header__menu){display:none}
@container (max-width:64rem){
  .c-header:has(.c-header__menu) .c-tooltip__wrap:has(> .c-header__menu){display:inline-flex}
  .c-header:not(.c-header--composed):has(.c-header__menu) .c-tooltip__wrap:has(> .c-header__search, > .c-header__account){display:none}
}

/* The header sits at the top of the page, so its tooltips open downward and stay on screen. */
.c-header .c-tooltip{top:calc(100% + var(--space-2));bottom:auto}
.c-header .c-tooltip::after{top:auto;bottom:100%;border-top-color:transparent;border-bottom-color:var(--text-heading)}

/* The last action sits at the viewport edge: end-align its tip, with the arrow over the 44px button's centre. */
.c-header__actions > .c-tooltip__wrap:last-child .c-tooltip{left:auto;right:0;transform:none}
.c-header__actions > .c-tooltip__wrap:last-child .c-tooltip::after{left:auto;right:17px;margin-left:0}

/* A tap leaves :hover and :focus-within stuck, so touch gets no header tips. */
@media (hover:none){.c-header .c-tooltip{display:none}}

/* Places map: the list always sits beside it; pins are placed by map.js. */
.l-map{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-6)}
.l-map > .c-embed{margin:0}
.l-map .c-embed__frame{aspect-ratio:4/3;overflow:hidden}
.l-map__canvas{position:absolute;inset:0}
@media (min-width:64rem){
  .l-map{grid-template-columns:minmax(0,3fr) minmax(0,2fr);align-items:start}
  .l-map > .c-embed{position:sticky;top:var(--space-6)}
}
.l-map__marker{position:absolute;z-index:0;transform:translate(-50%,-50%)}
.l-map__marker[data-open]{z-index:1}
.l-map__marker[hidden]{display:none}
.l-map__marker .c-popup{position:absolute;bottom:calc(100% + var(--space-2));left:50%;transform:translateX(calc(-50% + var(--l-popup-shift,0px)))}
.l-map__marker[data-below] .c-popup{top:calc(100% + var(--space-2));bottom:auto}
/* MapLibre's stylesheet draws white controls; these read the brand tokens in both modes. */
/* map.js appends that stylesheet after this one, so the attribution selectors out-rank its (0,2,0) ones. */
.l-map .maplibregl-ctrl-group,.l-map .maplibregl-ctrl.maplibregl-ctrl-attrib,.l-map .maplibregl-ctrl-attrib.maplibregl-compact{background-color:var(--bg-base);color:var(--text-body);box-shadow:var(--shadow-1)}
.l-map .maplibregl-ctrl-attrib a,.l-map .maplibregl-ctrl-attrib a:hover{color:var(--link)}
.l-map .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button{background-color:transparent}
.l-map .maplibregl-ctrl-group button{background-color:var(--bg-base)}
.l-map .maplibregl-ctrl-icon{filter:none}
/* The nearest data-mode decides, as for the logo. */
[data-mode="dark"] .l-map .maplibregl-ctrl-icon,
[data-mode="dark"] .l-map .maplibregl-ctrl-attrib-button,
[data-mode="light"] [data-mode="dark"] .l-map .maplibregl-ctrl-icon,
[data-mode="light"] [data-mode="dark"] .l-map .maplibregl-ctrl-attrib-button{filter:invert(1)}
[data-mode="light"] .l-map .maplibregl-ctrl-icon,
[data-mode="light"] .l-map .maplibregl-ctrl-attrib-button,
[data-mode="dark"] [data-mode="light"] .l-map .maplibregl-ctrl-icon,
[data-mode="dark"] [data-mode="light"] .l-map .maplibregl-ctrl-attrib-button{filter:none}
@media (prefers-color-scheme:dark){
  :root:not([data-mode]) .l-map .maplibregl-ctrl-icon,
  :root:not([data-mode]) .l-map .maplibregl-ctrl-attrib-button{filter:invert(1)}
  :root:not([data-mode]) [data-mode="light"] .l-map .maplibregl-ctrl-icon,
  :root:not([data-mode]) [data-mode="light"] .l-map .maplibregl-ctrl-attrib-button{filter:none}
  :root:not([data-mode]) [data-mode="light"] [data-mode="dark"] .l-map .maplibregl-ctrl-icon,
  :root:not([data-mode]) [data-mode="light"] [data-mode="dark"] .l-map .maplibregl-ctrl-attrib-button{filter:invert(1)}
}
/* Owner editor */
.l-editor__bar{display:flex;flex-wrap:wrap;gap:var(--space-1);margin-block-end:var(--space-2)}
.l-editor__bar [aria-pressed="true"]{background:var(--bg-sunken);border-color:var(--border-strong);color:var(--text-heading)}
.l-editor__area{min-block-size:10rem;overflow-wrap:anywhere}

/* A tall logo spans the header's rows on desktop; on a phone it keeps the bar's size. */
@container (min-width: 64.01rem) {
  .c-header--logo-tall > .c-header__item--tall .l-logo {
    height: calc(2.5rem * var(--_rows, 2));
  }
}

/* The skill draws a lead logo at 56px. */
.c-footer--lead-logo .c-footer__brand .l-logo {
  height: 3.5rem;
}
