/*
 * The shared design layer for rebuilt pages. A page opts in by wrapping its
 * view in `.ui` and linking this file (PageController::DESIGNED_PAGES); its own
 * stylesheet then adds only what is particular to it. Behaviour is in
 * assets/scripts/ui.js.
 *
 * Palette and type follow the site header (chrome.css): Roboto, the brand
 * blues of the logo, and the header's dark ink. Every colour a component uses
 * is a token, and the dark surfaces redefine the tokens rather than the
 * components, so anything placed on a dark section adapts by itself.
 *
 * The legacy stylesheets this route still loads style bare elements (style.css
 * sets a font and letter-spacing on `*`, page-inner.css centres every h1, h2
 * and p, Bootstrap's reboot colours and underlines links), so the base rules
 * below are scoped to `.ui` to outrank them, and every component class carries
 * the `ui-` prefix so neither side can reach into the other.
 */

/* `.ui-light` puts a block back on the light surface inside a dark one. */
.ui,
.ui-light {
  --ui-ink: #0f1923;
  --ui-ink-raised: #192837;
  --ui-text: #14212e;
  --ui-muted: #56636f;
  --ui-line: #e1e7ed;
  --ui-surface: #fff;
  --ui-surface-alt: #f3f6f9;
  --ui-tint: #e9f3fa;
  --ui-brand: #2768aa;
  --ui-brand-hover: #1d5a96;
  --ui-brand-bright: #38a1da;
  --ui-brand-light: #7cc4ec;
  --ui-accent: var(--ui-brand);
  --ui-link: var(--ui-brand);
  --ui-positive: #2fbf71;
  --ui-danger: #b42318;
  --ui-focus: #38a1da;
  --ui-field-border: #b9c4cf;

  color: var(--ui-text);
  background: var(--ui-surface);
}

.ui {
  --ui-font: Roboto, Roboto-Regular, system-ui, sans-serif;
  --ui-font-display: Roboto-Light, Roboto, system-ui, sans-serif;
  --ui-radius: 4px;
  --ui-radius-lg: 10px;
  --ui-width: 1200px;
  --ui-gutter: clamp(16px, 4vw, 40px);
  --ui-section-space: clamp(64px, 9vw, 120px);
  --ui-ease: 0.2s ease;

  display: block;
  font-family: var(--ui-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  interpolate-size: allow-keywords;

  * {
    font-family: inherit;
    letter-spacing: inherit;
  }

  :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) {
    margin: 0;
  }

  :where(h1, h2, h3, h4) {
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
    text-align: inherit;
    text-wrap: balance;
  }

  :where(p) {
    text-align: inherit;
    text-wrap: pretty;
  }

  :where(ul, ol) {
    padding: 0;
    list-style: none;
  }

  :where(strong, b, dt, th) {
    font-weight: 500;
  }

  :where(a) {
    color: var(--ui-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;

    &:hover {
      color: inherit;
      text-decoration: underline;
    }
  }

  :where(a, button, summary):focus-visible {
    outline: 2px solid var(--ui-focus);
    outline-offset: 3px;
    border-radius: 2px;
  }
}

/* Smooth in-page jumps, offset so a target clears both sticky bars. */
html:has(.ui) {
  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }
}

html:has(.ui-section-nav) {
  --ui-section-nav-height: 52px;

  scroll-padding-top: calc(var(--site-header-scrolled-height, 0px) + var(--ui-section-nav-height) + 24px);
}

/* --- surfaces --- */

/* `.ui-dark` puts any block on the dark surface; the hero and dark sections
   are always on it. */
.ui-dark,
.ui-hero,
.ui-section--dark {
  --ui-text: #fff;
  --ui-muted: rgb(255 255 255 / 0.7);
  --ui-line: rgb(255 255 255 / 0.14);
  --ui-surface: var(--ui-ink);
  --ui-surface-alt: var(--ui-ink-raised);
  --ui-tint: rgb(124 196 236 / 0.12);
  --ui-accent: var(--ui-brand-light);
  --ui-link: var(--ui-brand-light);
  --ui-danger: #ff9b8f;
  --ui-field-border: rgb(255 255 255 / 0.3);

  color: var(--ui-text);
  background: var(--ui-surface);
}

/* Every container is queryable as `ui`, so a component lays out by the room
   it actually has: @container ui (width >= 900px). An element cannot query
   itself, so a layout that switches on width goes inside the container, not
   on it. */
.ui-container {
  container: ui / inline-size;
  width: min(100% - 2 * var(--ui-gutter), var(--ui-width));
  margin-inline: auto;
}

.ui-section {
  padding-block: var(--ui-section-space);
  background: var(--ui-surface);
}

.ui-section--alt {
  background: var(--ui-surface-alt);
}

/* A section that carries on from the one before it on the same surface: the
   two share one section gap, split by a hairline. */
.ui-section:has(+ .ui-section--continued) {
  padding-bottom: calc(var(--ui-section-space) / 2);
}

.ui-section--continued {
  padding-top: 0;

  > .ui-container {
    padding-top: calc(var(--ui-section-space) / 2);
    border-top: 1px solid var(--ui-line);
  }
}

/* Clears the fixed site header, which is transparent over the hero until the
   page scrolls. */
.ui-hero {
  position: relative;
  isolation: isolate;
  padding-block: calc(var(--site-header-height, 0px) + clamp(32px, 5vw, 64px)) clamp(56px, 8vw, 104px);
  overflow: hidden;

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(60rem 36rem at 85% 0%, rgb(56 161 218 / 0.22), transparent 70%),
      radial-gradient(40rem 30rem at 0% 100%, rgb(39 104 170 / 0.18), transparent 70%);
  }
}

/* A hero's copy beside a supporting panel; the panel drops below it on
   narrow screens. --ui-hero-columns sets the split. */
.ui-hero__layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: clamp(40px, 6vw, 80px);
  align-items: center;

  @container ui (width >= 960px) {
    grid-template-columns: var(--ui-hero-columns, 1.35fr 1fr);
  }
}

.ui-hero__copy {
  display: grid;
  justify-items: start;
  gap: 24px;

  .ui-actions {
    margin-top: 8px;
  }
}

/* A notice across the top of a hero: a tag, then the message and an arrow.
   Placed above .ui-hero__layout it has the container's full width, and the
   message runs on from the tag, so where it must wrap it wraps as one line of
   text rather than dropping under the tag as a block. */
.ui-announce {
  display: inline-block;
  max-width: 100%;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ui-text);
  text-decoration: none;
  transition: border-color var(--ui-ease), background-color var(--ui-ease);

  .ui-hero & {
    margin-bottom: clamp(24px, 3vw, 32px);
  }

  &:hover {
    border-color: var(--ui-brand-light);
    background: rgb(255 255 255 / 0.04);
    color: var(--ui-text);
    text-decoration: none;
  }
}

.ui-announce__tag {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 8px;
  line-height: 1.6;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ui-brand);
}

/* The arrow rides the end of the text, so it wraps with the last word. */
.ui-announce__text::after {
  content: "\2192";
  display: inline-block;
  margin-left: 8px;
  transition: translate var(--ui-ease);

  .ui-announce:hover & {
    translate: 3px 0;
  }
}

/* --- type --- */

.ui-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-accent);

  &::before {
    content: "";
    flex: none;
    width: 24px;
    height: 1px;
    background: currentColor;
  }
}

.ui-display,
.ui-title {
  font-family: var(--ui-font-display);
  font-weight: 400;
}

.ui-display {
  font-size: clamp(2.375rem, 1.5rem + 3.6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.ui-title {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.ui-subtitle {
  font-size: 1.25rem;
  line-height: 1.3;
}

.ui-lead {
  max-width: 40em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--ui-muted);
}

.ui-muted {
  color: var(--ui-muted);
}

.ui-fineprint {
  max-width: 60em;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ui-muted);
}

/* Fine print closing a section, under whatever it qualifies. */
.ui-footnote {
  margin-top: 28px;
}

.ui-section__head {
  display: grid;
  gap: 16px;
  max-width: 48rem;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* A heading beside its text on wide screens, stacked on narrow ones. */
.ui-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(24px, 5vw, 80px);
  align-items: start;
}

/* --- actions --- */

.ui-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ui-ease), border-color var(--ui-ease), color var(--ui-ease);

  &:hover {
    text-decoration: none;
  }
}

.ui-button--primary {
  background: var(--ui-brand);
  color: #fff;

  &:hover {
    background: var(--ui-brand-hover);
    color: #fff;
  }
}

.ui-button--outline {
  border-color: color-mix(in srgb, currentColor 55%, transparent);
  color: var(--ui-text);

  &:hover {
    border-color: currentColor;
    background: color-mix(in srgb, currentColor 10%, transparent);
    color: var(--ui-text);
  }
}

.ui-button--block {
  width: 100%;
}

/* A text link that leads somewhere: the arrow moves on hover. */
.ui-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ui-link);
  text-decoration: none;

  &::after {
    content: "\2192";
    transition: translate var(--ui-ease);
  }

  &:hover {
    color: var(--ui-link);
    text-decoration: none;

    &::after {
      translate: 4px 0;
    }
  }
}

/* --- small parts --- */

/* A statement that a person checked the work. */
.ui-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;

  &::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 0.05em;
    border-radius: 50%;
    background: var(--ui-brand-bright) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.4 2.4 4.6-5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
  }
}

.ui-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--ui-radius);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ui-accent);
  background: var(--ui-tint);
  white-space: nowrap;
}

/* A live indicator: a dot that breathes while something is running. */
.ui-status {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ui-positive);

  @media (prefers-reduced-motion: no-preference) {
    &::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: inherit;
      animation: ui-status-pulse 2.4s ease-out infinite;
    }
  }
}

@keyframes ui-status-pulse {
  from {
    opacity: 0.6;
    scale: 1;
  }

  to {
    opacity: 0;
    scale: 3;
  }
}

/* --- layouts --- */

.ui-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ui-grid-min, 280px)), 1fr));
  gap: var(--ui-grid-gap, 24px);
}

/* Children in one column, evenly spaced. */
.ui-stack {
  display: grid;
  align-content: start;
  gap: var(--ui-stack-gap, 20px);
}

/* A heading column that stays in view beside long content -- a timeline, a
   list of questions -- and sits above it on narrow screens.
   --ui-sidebar-columns sets the split. */
.ui-sidebar-layout {
  display: grid;
  gap: clamp(36px, 5vw, 64px);

  @container ui (width >= 860px) {
    grid-template-columns: var(--ui-sidebar-columns, 1fr 2fr);
  }

  > .ui-section__head {
    margin-bottom: 0;
  }
}

.ui-sidebar-layout__aside {
  align-self: start;

  @container ui (width >= 860px) {
    position: sticky;
    top: calc(var(--site-header-scrolled-height, 0px) + var(--ui-section-nav-height, 0px) + 32px);
  }
}

/* A closing call to action: one centred column. */
.ui-cta {
  text-align: center;

  .ui-stack {
    justify-items: center;
    max-width: 48rem;
  }

  .ui-actions {
    justify-content: center;
    margin-top: 8px;
  }
}

/* --- panels --- */

/* --ui-card-padding is exposed so anything pinned inside can line up with it. */
.ui-card {
  --ui-card-padding: clamp(24px, 3vw, 32px);

  padding: var(--ui-card-padding);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
}

.ui-card--alt {
  background: var(--ui-surface-alt);
}

/* Frosted glass for the dark surfaces, after the site header's own. */
.ui-glass {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-lg);
  background: rgb(255 255 255 / 0.04);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* --- lists --- */

/* A short run of facts that reads as one line, each behind a dot. */
.ui-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 0.875rem;
  color: var(--ui-muted);

  > li {
    display: flex;
    align-items: center;
    gap: 8px;

    &::before {
      content: "";
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--ui-brand-light);
    }
  }
}

/* Points under a heavy rule each; pair with .ui-grid for columns. */
.ui-features {
  --ui-grid-gap: 32px;

  > li {
    display: grid;
    align-content: start;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--ui-text);
  }
}

/* --- meters --- */

/* A filled track. The fill's width is --share, set on the meter or the fill. */
.ui-meter {
  --ui-meter-size: 10px;

  display: block;
  height: var(--ui-meter-size);
  border-radius: calc(var(--ui-meter-size) / 2);
  background: var(--ui-surface-alt);
  overflow: hidden;

  > span {
    display: block;
    width: var(--share);
    height: 100%;
    border-radius: inherit;
    background: var(--ui-meter-fill, var(--ui-brand));
    transition: width 0.6s ease;
  }
}

.ui-meter--large {
  --ui-meter-size: 12px;
}

/* The figure being compared against, so the highlighted one stands out. */
.ui-meter--muted {
  --ui-meter-fill: #8a97a4;
}

/* Figures with a caption under each; the number is the dd so it reads after
   its label, and is shown first. */
.ui-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 32px 24px;

  > div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 8px;
    padding-left: 20px;
    border-left: 1px solid var(--ui-line);
  }

  dt {
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ui-muted);
  }

  dd {
    font-family: var(--ui-font-display);
    font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }
}

/* Numbered steps across the page. */
.ui-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ui-steps-min, 220px)), 1fr));
  gap: 32px 24px;
  counter-reset: ui-step;

  > li {
    display: grid;
    align-content: start;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--ui-line);
    counter-increment: ui-step;

    &::before {
      content: counter(ui-step, decimal-leading-zero);
      font-size: 0.8125rem;
      font-weight: 500;
      letter-spacing: 0.12em;
      color: var(--ui-accent);
    }
  }

  h3 {
    font-size: 1.1875rem;
  }

  p {
    color: var(--ui-muted);
  }
}

/* Numbered steps down the page, joined by a line. */
.ui-timeline {
  display: grid;
  counter-reset: ui-timeline;

  > li {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 6px 20px;
    padding-bottom: 32px;
    counter-increment: ui-timeline;

    &::before {
      content: counter(ui-timeline);
      grid-row: 1 / span 3;
      display: grid;
      place-items: center;
      width: 40px;
      height: 40px;
      border: 1px solid var(--ui-line);
      border-radius: 50%;
      font-weight: 500;
      color: var(--ui-text);
      background: var(--ui-surface);
    }

    &:not(:last-child)::after {
      content: "";
      position: absolute;
      top: 44px;
      bottom: 4px;
      left: 19.5px;
      width: 1px;
      background: var(--ui-line);
    }

    > * {
      grid-column: 2;
    }
  }

  > .ui-timeline__key::before {
    border-color: var(--ui-brand);
    color: #fff;
    background: var(--ui-brand);
  }
}

.ui-timeline__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-height: 40px;

  h3 {
    font-size: 1.125rem;
  }
}

/* --- tables --- */

.ui-table-wrap {
  container-type: inline-size;
}

.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;

  th,
  td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ui-line);
    text-align: left;
    vertical-align: top;

    &:first-child {
      padding-left: 0;
    }

    &:last-child {
      padding-right: 0;
    }
  }

  thead th {
    padding-block: 0 12px;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-muted);
  }

  tfoot :is(th, td) {
    border-bottom: 0;
    font-size: 1.125rem;
  }

  .ui-num {
    text-align: right;
    white-space: nowrap;
  }
}

/* Narrow containers turn each row into a block, labelled from data-label. */
@container (width < 600px) {
  .ui-table--stack {
    thead {
      display: none;
    }

    tr {
      display: block;
      padding-block: 12px;
      border-bottom: 1px solid var(--ui-line);
    }

    th,
    td {
      display: block;
      padding: 2px 0;
      border: 0;
    }

    td[data-label]::before {
      content: attr(data-label) ": ";
      color: var(--ui-muted);
    }

    .ui-num {
      text-align: left;
    }
  }
}

/* --- questions and answers --- */

.ui-faq {
  border-top: 1px solid var(--ui-line);
}

.ui-faq__item {
  border-bottom: 1px solid var(--ui-line);

  summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 44px;
    padding-block: 18px;
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
    transition: color var(--ui-ease);

    &::-webkit-details-marker {
      display: none;
    }

    &:hover {
      color: var(--ui-link);
    }

    /* A plus whose vertical bar folds away into a minus. */
    &::after {
      content: "";
      flex: none;
      width: 14px;
      height: 14px;
      background:
        linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
      transition: background-size var(--ui-ease);
    }
  }

  &[open] summary::after {
    background-size: 100% 2px, 2px 0;
  }

  &::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size var(--ui-ease), content-visibility var(--ui-ease) allow-discrete;
  }

  &[open]::details-content {
    block-size: auto;
  }
}

.ui-faq__answer {
  max-width: 44em;
  padding-bottom: 22px;
  color: var(--ui-muted);
}

/* Several .ui-faq lists under their own titles, and an index of those titles. */
.ui-faq-groups {
  display: grid;
  gap: 48px;
}

.ui-faq-groups__title {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-accent);
}

.ui-faq-topics {
  display: grid;
  gap: 2px;
  margin-top: 8px;

  a {
    display: block;
    padding-block: 6px;
    font-size: 0.9375rem;
    color: var(--ui-muted);
    text-decoration: none;

    &:hover {
      color: var(--ui-link);
      text-decoration: none;
    }
  }
}

/* --- forms (ui.js sends a `form.ui-form[data-async]` in place) --- */

.ui-form__fields {
  display: grid;
  gap: 14px;
}

.ui-field {
  display: grid;
  gap: 6px;

  label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
  }

  /* common.css styles every input[type="text"] for the dark footer -- no box,
     a white underline, white text -- and forces its focus borders with
     !important. These rules restate each property it sets, and the focus rule
     answers its !important with one of its own. */
  :is(input, select, textarea) {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 46px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--ui-field-border);
    border-radius: var(--ui-radius);
    font: inherit;
    color: var(--ui-text);
    background: var(--ui-surface);
    transition: border-color var(--ui-ease), box-shadow var(--ui-ease);

    &:focus {
      border: 1px solid var(--ui-brand) !important;
      outline: 2px solid transparent;
      box-shadow: 0 0 0 3px rgb(56 161 218 / 0.3);
    }

    &:user-invalid {
      border-color: var(--ui-danger);
    }
  }
}

.ui-form[aria-busy="true"] [type="submit"] {
  cursor: progress;
  opacity: 0.7;
}

.ui-form__status {
  font-weight: 500;

  &:not(:empty) {
    margin-top: 14px;
  }

  &:focus {
    outline: none;
  }

  &.is-error {
    color: var(--ui-danger);
  }
}

/* --- in-page navigation (ui.js <section-nav>) --- */

/* Sticks under the slim site header and continues its frosted bar. */
.ui-section-nav {
  position: sticky;
  top: var(--site-header-scrolled-height, 0px);
  z-index: 50;
  display: block;
  color: #fff;
  background: var(--frost-bg, rgb(25 40 55 / 0.95));
  -webkit-backdrop-filter: var(--frost-blur, none);
  backdrop-filter: var(--frost-blur, none);
  border-top: 1px solid rgb(255 255 255 / 0.08);
  transition: box-shadow var(--ui-ease);

  &.is-stuck {
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.25);
  }
}

.ui-section-nav {
  container: ui-section-nav / inline-size;
}

.ui-section-nav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--ui-section-nav-height);
}

.ui-section-nav__nav {
  flex: 1;
  min-width: 0;
  height: 100%;
}

.ui-section-nav__list {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);

  &::-webkit-scrollbar {
    display: none;
  }

  li {
    flex: none;
  }

  a {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding-inline: 14px;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgb(255 255 255 / 0.72);
    text-decoration: none;
    transition: color var(--ui-ease);

    &::after {
      content: "";
      position: absolute;
      inset: auto 14px 0;
      height: 2px;
      background: var(--ui-brand-light);
      scale: 0 1;
      transition: scale var(--ui-ease);
    }

    &:hover {
      color: #fff;
      text-decoration: none;
    }

    &[aria-current="true"] {
      color: var(--ui-brand-light);

      &::after {
        scale: 1 1;
      }
    }
  }

  li:first-child a {
    margin-left: -14px;
  }
}

.ui-section-nav__cta {
  flex: none;
  min-height: 36px;
  padding: 6px 16px;
  font-size: 0.8125rem;
}

@container ui-section-nav (width < 760px) {
  .ui-section-nav__cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui *,
  .ui *::before,
  .ui *::after {
    transition-duration: 0s !important;
    animation: none !important;
  }

  /* Apart from the rule above: a browser without ::details-content would
     discard the whole selector list. */
  .ui-faq__item::details-content {
    transition-duration: 0s !important;
  }
}
