/* ==========================================================================================================
   Atlas — site stylesheet: landing sections, changelog, search (page and overlay), pages, contact
   ----------------------------------------------------------------------------------------------------------
   Loaded after assets/atlas.css and written into ITS cascade layers (declared there: reset, tokens, base, layout,
   components, sections, utilities, print), so the order of precedence is the same as if it were one file.
   Every colour is a token (or a color-mix() of one), so each style and both modes stay correct; every class starts
   with `atlas-`. Breakpoints are atlas.css's (max-width: xl 1280, lg 1024, md 900, sm 640); a component that can
   sit in a narrow column measures itself with a container query instead.
   ========================================================================================================== */

/* ==========================================================================================================
   LAYOUT
   ========================================================================================================== */
@layer layout {
  /* Inside the doc shell, the main column already has the page gutter: a section's container takes the column's
     width up to its own maximum and starts at the column's edge (R§2.1: landing content starts with the article). */
  .atlas-shell__main .atlas-container {
    width: 100%;
    max-width: var(--atlas-container-max, var(--atlas-content-width));
    margin-inline: 0;
  }

  /* --- Bands: what a landing section's "Background" select paints. On the page background a band is invisible;
     any other choice draws it as a rounded panel (R§4.22, R§4.24). --- */
  .atlas-band {
    min-width: 0;
  }

  .atlas-band--panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: var(--atlas-radius-xl);
  }

  .atlas-band--panel.atlas-surface--page {
    border: 1px solid var(--atlas-border);
  }
}

/* ==========================================================================================================
   COMPONENTS
   ========================================================================================================== */
@layer components {
  /* --- Section intro (snippets/section-intro) --- */
  /* The heading may run wider than the reading measure (a landing H2 fits one line at 1440, R§5.1); the text keeps it. */
  .atlas-intro {
    max-width: 64rem;
    margin-block-end: var(--atlas-space-lg);
  }

  .atlas-intro__heading {
    color: var(--atlas-text);
  }

  .atlas-intro__heading--lg {
    font-size: var(--atlas-heading-xl);
    line-height: var(--atlas-leading-heading-lg);
    letter-spacing: var(--atlas-tracking-tighter);
  }

  .atlas-intro__heading--md {
    font-size: var(--atlas-heading-md);
    line-height: var(--atlas-leading-heading-md);
    letter-spacing: var(--atlas-tracking-tight);
  }

  .atlas-intro__heading--sm {
    font-size: var(--atlas-heading-sm);
    line-height: var(--atlas-leading-heading-sm);
    letter-spacing: var(--atlas-tracking-tight);
  }

  .atlas-intro__text {
    max-width: 48rem;
    margin-block-start: var(--atlas-space-sm);
    color: var(--atlas-text);
    line-height: var(--atlas-leading-relaxed);
  }

  /* --- Eyebrow pill (R§4.23) --- */
  .atlas-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--atlas-space-sm);
    max-width: 100%;
    margin-block-end: var(--atlas-space-lg);
    padding: var(--atlas-space-xs) var(--atlas-space-md);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-full);
    background: var(--atlas-surface);
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-xs);
    line-height: 1.5;
  }

  .atlas-pill__dot {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--atlas-accent);
  }

  /* --- Kind chips (changelog; R§4.27) --- */
  .atlas-chip {
    flex: none;
    display: inline-block;
    min-width: 72px;
    padding: 0 var(--atlas-space-xs);
    border-radius: var(--atlas-radius-xs);
    background: var(--atlas-muted);
    color: var(--atlas-text-secondary);
    font-family: var(--atlas-font-mono);
    font-size: var(--atlas-text-xs);
    line-height: 1.75;
    text-align: center;
  }

  /* The status hue pulled a fifth toward the text colour: on its own tint at 12.5px it fell under 4.5:1 in two
     styles' light mode (#15803d on its green tint, 4.2:1). */
  .atlas-chip--added {
    background: var(--atlas-success-subtle);
    color: color-mix(in srgb, var(--atlas-success) 80%, var(--atlas-text));
  }

  .atlas-chip--breaking {
    background: var(--atlas-danger-subtle);
    color: color-mix(in srgb, var(--atlas-danger) 80%, var(--atlas-text));
  }

  /* --- Pagination (snippets/pagination) --- */
  .atlas-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--atlas-space-md);
    margin-block-start: var(--atlas-space-2xl);
    padding-block-start: var(--atlas-space-lg);
    border-block-start: 1px solid var(--atlas-border);
  }

  .atlas-pagination__status {
    color: var(--atlas-text-faint);
    font-size: var(--atlas-text-sm);
    font-variant-numeric: tabular-nums;
  }

  .atlas-pagination__next {
    margin-inline-start: auto;
  }

  /* --- Notices (form success and errors; R§4.28) --- */
  .atlas-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--atlas-space-sm);
    margin-block-end: var(--atlas-space-lg);
    padding: var(--atlas-space-md);
    border-inline-start: 2px solid var(--atlas-border-strong);
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-surface);
    color: var(--atlas-text);
    font-size: var(--atlas-text-sm);
  }

  .atlas-notice:focus {
    outline: none;
  }

  .atlas-notice .atlas-icon {
    --atlas-icon-size: 1.25rem;
    margin-block-start: 0.05rem;
  }

  .atlas-notice p {
    margin: 0;
  }

  .atlas-notice ul {
    margin: var(--atlas-space-xs) 0 0;
    padding-inline-start: 1.25rem;
    color: var(--atlas-text-secondary);
  }

  .atlas-notice--success {
    border-inline-start-color: var(--atlas-success);
    background: var(--atlas-success-subtle);
  }

  .atlas-notice--success .atlas-icon {
    color: var(--atlas-success);
  }

  .atlas-notice--error {
    border-inline-start-color: var(--atlas-danger);
    background: var(--atlas-danger-subtle);
  }

  .atlas-notice--error .atlas-icon {
    color: var(--atlas-danger);
  }

  .atlas-notice__title {
    font-weight: var(--atlas-weight-semibold);
  }

  /* --- Empty states --- */
  .atlas-empty {
    padding: var(--atlas-space-lg);
    border: 1px dashed var(--atlas-border-strong);
    border-radius: var(--atlas-radius-md);
    color: var(--atlas-text-secondary);
  }

  /* --- Search overlay (R§6; snippets/search-overlay, assets/atlas-site.js) --------------------------------
     A modal <dialog>: 640 x 640 centred on desktop, a full-screen sheet under 640px. It fades in with a 16px rise;
     the input's row underlines in ink while the input has focus. */
  .atlas-search {
    position: fixed;
    inset: 0;
    width: min(640px, 100% - 2 * var(--atlas-gutter));
    max-width: none;
    height: min(640px, 100dvh - 64px);
    max-height: none;
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-sm);
    background: var(--atlas-background);
    color: var(--atlas-text);
    box-shadow: var(--atlas-shadow-lg);
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity var(--atlas-duration-normal) var(--atlas-ease),
      transform var(--atlas-duration-normal) var(--atlas-ease),
      overlay var(--atlas-duration-normal) allow-discrete,
      display var(--atlas-duration-normal) allow-discrete;
  }

  .atlas-search[open] {
    display: block;
    opacity: 1;
    transform: none;
  }

  @starting-style {
    .atlas-search[open] {
      opacity: 0;
      transform: translateY(16px);
    }
  }

  .atlas-search::backdrop {
    background: rgb(8 9 11 / 0.55);
    background: var(--atlas-overlay, rgb(8 9 11 / 0.55));
  }

  .atlas-search__panel {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .atlas-search__head {
    display: flex;
    flex: none;
    align-items: center;
    gap: var(--atlas-space-sm);
    min-height: 64px;
    padding-inline: 20px 12px;
    border-block-end: 1px solid var(--atlas-border);
    transition: border-color var(--atlas-duration-fast) var(--atlas-ease);
  }

  .atlas-search__head:focus-within {
    border-block-end-color: var(--atlas-text);
  }

  .atlas-search__icon {
    --atlas-icon-size: 18px;
    color: var(--atlas-text-secondary);
  }

  .atlas-search__input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--atlas-text);
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
  }

  .atlas-search__input::placeholder {
    color: var(--atlas-text-faint);
  }

  /* The row's ink underline is the input's focus indicator. */
  .atlas-search__input:focus-visible {
    outline: none;
    box-shadow: none;
  }

  .atlas-search__input::-webkit-search-cancel-button,
  .atlas-search__input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
  }

  @media (forced-colors: active) {
    .atlas-search__input:focus-visible {
      outline: 2px solid CanvasText;
    }
  }

  .atlas-search__clear {
    min-height: 32px;
    padding: var(--atlas-space-xs) var(--atlas-space-sm);
    border: 0;
    border-radius: var(--atlas-radius-xs);
    background: transparent;
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
  }

  .atlas-search__clear:hover {
    color: var(--atlas-text);
  }

  .atlas-search__body {
    flex: 1;
    min-height: 0;
    padding: var(--atlas-space-md);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .atlas-search__summary {
    margin-block-end: 12px;
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
  }

  .atlas-search__group + .atlas-search__group {
    margin-block-start: var(--atlas-space-md);
  }

  .atlas-search__group-label {
    padding: var(--atlas-space-xs) 10px;
    color: var(--atlas-text-faint);
    font-family: var(--atlas-font-mono);
    font-size: var(--atlas-text-xs);
    font-weight: var(--atlas-weight-semibold);
    letter-spacing: var(--atlas-tracking-wide);
    text-transform: uppercase;
  }

  .atlas-search__option {
    display: block;
    padding: var(--atlas-space-sm) 10px;
    border-radius: var(--atlas-radius-xs);
    color: var(--atlas-text);
    text-decoration: none;
    transition: background-color var(--atlas-duration-fast) var(--atlas-ease);
  }

  a.atlas-search__option:hover {
    background: var(--atlas-accent-surface);
    color: var(--atlas-text);
  }

  .atlas-search__option.is-active {
    background: var(--atlas-accent-surface);
    box-shadow: inset 0 0 0 1.5px var(--atlas-text);
  }

  .atlas-search__option.is-static {
    color: var(--atlas-text-secondary);
  }

  .atlas-search__option-title {
    display: block;
    color: var(--atlas-text);
    font-size: var(--atlas-text-sm);
    font-weight: var(--atlas-weight-semibold);
  }

  .atlas-search__option-text {
    display: block;
    margin-block-start: 2px;
    overflow: hidden;
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-xs);
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* Matched words: bold ink, no fill (R§6). */
  .atlas-search__option mark {
    background: none;
    color: var(--atlas-text);
    font-weight: var(--atlas-weight-bold);
  }

  .atlas-search__more {
    margin-block-start: var(--atlas-space-md);
    padding-inline: 10px;
    font-size: var(--atlas-text-sm);
  }

  .atlas-search__more-link {
    display: inline-flex;
    align-items: center;
    gap: var(--atlas-space-xs);
    font-weight: var(--atlas-weight-semibold);
  }

  .atlas-search__more-link .atlas-icon {
    --atlas-icon-size: 1em;
  }

  .atlas-search__skeleton {
    display: flex;
    flex-direction: column;
    gap: var(--atlas-space-sm);
    padding: var(--atlas-space-xs) 10px;
  }

  .atlas-search__skeleton[hidden] {
    display: none;
  }

  .atlas-search__bone {
    display: block;
    width: 100%;
    height: 10px;
    border-radius: var(--atlas-radius-xs);
    background: var(--atlas-muted);
    animation: atlas-pulse 1.4s ease-in-out infinite;
  }

  .atlas-search__bone--title {
    width: 44%;
    height: 14px;
    margin-block-start: var(--atlas-space-sm);
  }

  .atlas-search__bone--short {
    width: 72%;
  }

  .atlas-search__foot {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    gap: var(--atlas-space-md);
    padding: var(--atlas-space-sm) var(--atlas-space-md);
    border-block-start: 1px solid var(--atlas-border);
    background: var(--atlas-surface);
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-xs);
  }

  .atlas-search__hint {
    display: inline-flex;
    align-items: center;
    gap: var(--atlas-space-xs);
  }

  .atlas-search__hint kbd {
    min-width: 1.5em;
    color: var(--atlas-text-secondary);
    font-family: var(--atlas-font-body);
    text-align: center;
  }

  @media (max-width: 639.98px) {
    .atlas-search {
      width: 100%;
      height: 100vh;
      height: 100dvh;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }

    .atlas-search__foot {
      display: none;
    }

    /* One line is too little on a phone to show where the matched word sits: two, then an ellipsis. */
    .atlas-search__option-text {
      display: -webkit-box;
      white-space: normal;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      line-clamp: 2;
    }
  }

  @keyframes atlas-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
  }

  @keyframes atlas-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ==========================================================================================================
   SECTIONS — one block per section file
   ========================================================================================================== */
@layer sections {
  /* --- hero.liquid (R§4.23) --- */
  .atlas-hero__inner--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .atlas-hero__heading {
    max-width: 15ch;
    margin-block-end: var(--atlas-space-lg);
  }

  .atlas-hero__inner--center .atlas-hero__heading {
    margin-inline: auto;
  }

  .atlas-hero__heading em {
    color: var(--atlas-accent);
    font-style: normal;
  }

  /* An accent that equals the text colour cannot mark the word, so the scheme that has one marks it with the highlight
     fill (sections/hero.liquid sets the classes per scheme). The light scheme is in force in light mode and on an
     inverse band in dark mode; the dark scheme the other way round. */
  [data-mode="light"] .atlas-hero--mark-light .atlas-hero__inner:not(.atlas-surface--inverse) .atlas-hero__heading em,
  [data-mode="dark"] .atlas-hero--mark-light .atlas-surface--inverse .atlas-hero__heading em,
  [data-mode="dark"] .atlas-hero--mark-dark .atlas-hero__inner:not(.atlas-surface--inverse) .atlas-hero__heading em,
  [data-mode="light"] .atlas-hero--mark-dark .atlas-surface--inverse .atlas-hero__heading em {
    margin-inline: -0.02em;
    padding-inline: 0.08em;
    /* A highlighter stroke: drawn a little shorter than the glyph box, so a tight display line height never lets it
       touch the line above. */
    background: linear-gradient(var(--atlas-highlight), var(--atlas-highlight)) 0 70% / 100% 84% no-repeat;
    color: var(--atlas-highlight-label);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }

  .atlas-hero__text {
    max-width: 48rem;
    margin-block-end: var(--atlas-space-lg);
    color: var(--atlas-text);
    font-size: var(--atlas-text-lg);
    line-height: var(--atlas-leading-relaxed);
  }

  .atlas-hero__inner--center .atlas-hero__actions {
    justify-content: center;
  }

  /* --- stat-tiles.liquid (R§4.21): the value reads first, the label and detail under it. The columns follow the
     row's own width, in the counts the section chose so no tile is left alone under a full row. --- */
  .atlas-stats-frame {
    container: atlas-stats / inline-size;
  }

  .atlas-stats {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--atlas-space-sm);
    margin: 0;
  }

  @container atlas-stats (min-width: 23rem) {
    .atlas-stats {
      grid-template-columns: repeat(var(--atlas-stats-sm, 2), minmax(0, 1fr));
    }
  }

  @container atlas-stats (min-width: 35rem) {
    .atlas-stats {
      grid-template-columns: repeat(var(--atlas-stats-md, 3), minmax(0, 1fr));
    }
  }

  @container atlas-stats (min-width: 47rem) {
    .atlas-stats {
      grid-template-columns: repeat(var(--atlas-stats-lg, 4), minmax(0, 1fr));
    }
  }

  .atlas-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: var(--atlas-space-md) var(--atlas-space-lg);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-md);
  }

  .atlas-stat__value {
    order: -1;
    margin: 0 0 var(--atlas-space-xs);
    color: var(--atlas-text);
    font-family: var(--atlas-font-mono);
    font-size: var(--atlas-text-xl);
    font-weight: var(--atlas-weight-semibold);
    letter-spacing: var(--atlas-tracking-tight);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
  }

  .atlas-stat__label,
  .atlas-stat__detail {
    margin: 0;
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
  }

  .atlas-stats--divided {
    gap: 0;
  }

  .atlas-stats--divided .atlas-stat {
    align-items: center;
    border: 0;
    border-radius: 0;
    text-align: center;
  }

  /* Stacked, a rule between figures; once the row is one line (47rem, the section's divided rule), between columns. */
  .atlas-stats--divided .atlas-stat + .atlas-stat {
    border-block-start: 1px solid var(--atlas-border);
  }

  @container atlas-stats (min-width: 47rem) {
    .atlas-stats--divided .atlas-stat + .atlas-stat {
      border-block-start: 0;
      border-inline-start: 1px solid var(--atlas-border);
    }
  }

  /* --- feature-showcase.liquid (R§4.13): radio tabs; an accordion under a 640px container --- */
  .atlas-showcase-frame {
    container: atlas-showcase / inline-size;
  }

  .atlas-showcase {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-lg);
    background: var(--atlas-background);
  }

  .atlas-showcase__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  .atlas-showcase__tab {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--atlas-space-sm);
    min-height: 44px;
    padding: var(--atlas-space-sm) var(--atlas-space-md);
    border-block-end: 1px solid var(--atlas-border);
    background: var(--atlas-surface);
    color: var(--atlas-text-secondary);
    font-family: var(--atlas-font-heading);
    font-size: var(--atlas-text-sm);
    font-weight: var(--atlas-weight-semibold);
    cursor: pointer;
    user-select: none;
    transition: background-color var(--atlas-duration-fast) var(--atlas-ease), color var(--atlas-duration-fast) var(--atlas-ease);
  }

  .atlas-showcase__tab:hover {
    color: var(--atlas-text);
  }

  .atlas-showcase__radio:checked + .atlas-showcase__tab {
    border-block-end-color: transparent;
    background: var(--atlas-background);
    color: var(--atlas-text);
  }

  .atlas-showcase__radio:focus-visible + .atlas-showcase__tab {
    outline: 2px solid var(--atlas-focus-outline);
    outline-offset: -2px;
  }

  .atlas-showcase__chevron {
    --atlas-icon-size: 16px;
    display: none;
    transition: transform var(--atlas-duration-fast) var(--atlas-ease-toggle);
  }

  .atlas-showcase__fill {
    flex: 1 0 0;
    min-width: 0;
    border-block-end: 1px solid var(--atlas-border);
    background: var(--atlas-surface);
  }

  .atlas-showcase__panel {
    display: none;
    flex: 0 0 100%;
    order: 1;
    min-width: 0;
    padding: var(--atlas-space-lg);
  }

  .atlas-showcase__radio:checked + .atlas-showcase__tab + .atlas-showcase__panel {
    display: block;
    animation: atlas-fade-in var(--atlas-duration-slow) var(--atlas-ease);
  }

  @container atlas-showcase (max-width: 639.98px) {
    .atlas-showcase {
      display: block;
    }

    .atlas-showcase__tab {
      display: flex;
      width: 100%;
      border-block-start: 1px solid var(--atlas-border);
      border-block-end: 0;
      background: transparent;
    }

    .atlas-showcase__tab:first-of-type {
      border-block-start: 0;
    }

    .atlas-showcase__radio:checked + .atlas-showcase__tab {
      background: var(--atlas-state-hover);
    }

    .atlas-showcase__chevron {
      display: block;
    }

    .atlas-showcase__radio:checked + .atlas-showcase__tab .atlas-showcase__chevron {
      transform: rotate(180deg);
    }

    .atlas-showcase__fill {
      display: none;
    }

    .atlas-showcase__panel {
      padding: var(--atlas-space-sm) var(--atlas-space-md) var(--atlas-space-md);
    }
  }

  /* --- card-grid.liquid (R§4.20): the title's link stretches over the card --- */
  .atlas-link-grid-frame {
    container: atlas-link-grid / inline-size;
  }

  /* As many columns as the setting asks for while each stays at least 12.5rem wide, then fewer (no fixed 2-column
     step, which left a 3-card row with an orphan on tablets). */
  .atlas-link-grid {
    --atlas-link-grid-gap: var(--atlas-space-sm);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(12.5rem, (100% - (var(--atlas-columns, 3) - 1) * var(--atlas-link-grid-gap)) / var(--atlas-columns, 3)), 1fr));
    gap: var(--atlas-link-grid-gap);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  @container atlas-link-grid (max-width: 539.98px) {
    .atlas-link-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .atlas-link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--atlas-space-sm);
    min-width: 0;
    padding: var(--atlas-space-lg);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-background);
    color: var(--atlas-text);
    transition:
      border-color var(--atlas-duration-normal) var(--atlas-ease),
      box-shadow var(--atlas-duration-normal) var(--atlas-ease),
      transform var(--atlas-duration-normal) var(--atlas-ease);
  }

  .atlas-link-card__title {
    font-size: var(--atlas-heading-xs);
    line-height: var(--atlas-leading-heading-xs);
    letter-spacing: var(--atlas-tracking-tight);
  }

  .atlas-link-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375em;
    color: var(--atlas-text);
    text-decoration: none;
  }

  .atlas-link-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
  }

  .atlas-link-card__link:hover {
    color: var(--atlas-text);
  }

  .atlas-link-card__link:focus-visible {
    outline: none;
    box-shadow: none;
  }

  .atlas-link-card:has(.atlas-link-card__link:focus-visible) {
    outline: 2px solid var(--atlas-focus-outline);
    box-shadow: 0 0 0 6px var(--atlas-focus-halo);
  }

  .atlas-link-card__arrow {
    --atlas-icon-size: 1em;
    transition: transform var(--atlas-duration-normal) var(--atlas-ease), color var(--atlas-duration-normal) var(--atlas-ease);
  }

  .atlas-link-card__text {
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
    line-height: var(--atlas-leading-relaxed);
  }

  .atlas-link-card--link:hover {
    border-color: var(--atlas-border-strong);
    box-shadow: var(--atlas-shadow-md);
    transform: translateY(-3px);
  }

  .atlas-link-card--link:hover .atlas-link-card__arrow {
    color: var(--atlas-accent);
    transform: translateX(3px);
  }

  [dir="rtl"] .atlas-link-card--link:hover .atlas-link-card__arrow {
    transform: scaleX(-1) translateX(3px);
  }

  @media (prefers-reduced-motion: reduce) {
    .atlas-link-card--link:hover {
      transform: none;
    }

    .atlas-link-card--link:hover .atlas-link-card__arrow {
      transform: none;
    }

    [dir="rtl"] .atlas-link-card--link:hover .atlas-link-card__arrow {
      transform: scaleX(-1);
    }
  }

  /* --- feature-list.liquid (R§4.22) --- */
  .atlas-feature-list-frame {
    container: atlas-features / inline-size;
  }

  .atlas-feature-list {
    display: grid;
    grid-template-columns: repeat(var(--atlas-columns, 3), minmax(0, 1fr));
    gap: var(--atlas-space-md) var(--atlas-space-lg);
    margin: 0;
    padding: 0;
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
    line-height: var(--atlas-leading-normal);
    list-style: none;
  }

  @container atlas-features (max-width: 639.98px) {
    .atlas-feature-list {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .atlas-feature-list__title {
    color: var(--atlas-text);
    font-weight: var(--atlas-weight-semibold);
  }

  .atlas-feature-list__dash {
    color: var(--atlas-text-faint);
  }

  /* --- cta-band.liquid (R§4.24) --- */
  .atlas-cta-frame {
    container: atlas-cta / inline-size;
  }

  .atlas-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--atlas-space-lg) var(--atlas-space-2xl);
  }

  .atlas-cta__copy {
    flex: 1 1 22rem;
    min-width: 0;
    max-width: 40rem;
  }

  .atlas-cta__heading {
    font-size: var(--atlas-heading-md);
    line-height: var(--atlas-leading-heading-md);
    letter-spacing: var(--atlas-tracking-tighter);
  }

  .atlas-cta__text {
    margin-block-start: var(--atlas-space-sm);
    color: var(--atlas-text);
    font-size: var(--atlas-text-lg);
    line-height: var(--atlas-leading-relaxed);
  }

  .atlas-cta__actions {
    flex: none;
  }

  @container atlas-cta (max-width: 639.98px) {
    .atlas-cta__actions {
      flex-direction: column;
      align-items: flex-end;
      width: 100%;
    }
  }

  /* --- faq.liquid (R§4.12): native disclosures; the open animates where the browser can size to auto --- */
  .atlas-faq {
    border-block-start: 1px solid var(--atlas-border);
  }

  .atlas-faq__item {
    border-block-end: 1px solid var(--atlas-border);
  }

  .atlas-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--atlas-space-md);
    min-height: 44px;
    padding: var(--atlas-space-md);
    color: var(--atlas-text);
    font-weight: var(--atlas-weight-semibold);
    cursor: pointer;
    list-style: none;
    transition: background-color var(--atlas-duration-fast) var(--atlas-ease);
  }

  .atlas-faq__question::-webkit-details-marker {
    display: none;
  }

  .atlas-faq__question:hover {
    background: var(--atlas-surface);
  }

  .atlas-faq__chevron {
    --atlas-icon-size: 18px;
    color: var(--atlas-text-secondary);
    transition: transform var(--atlas-duration-normal) var(--atlas-ease-toggle);
  }

  .atlas-faq__item[open] > .atlas-faq__question .atlas-faq__chevron {
    transform: rotate(180deg);
  }

  .atlas-faq__answer {
    padding: 0 var(--atlas-space-md) var(--atlas-space-md);
  }

  @supports (interpolate-size: allow-keywords) {
    .atlas-faq__item {
      interpolate-size: allow-keywords;
    }

    .atlas-faq__item::details-content {
      height: 0;
      overflow: clip;
      transition: height var(--atlas-duration-normal) var(--atlas-ease), content-visibility var(--atlas-duration-normal) allow-discrete;
    }

    .atlas-faq__item[open]::details-content {
      height: auto;
    }
  }

  /* --- main-changelog.liquid (R§4.27, R§5.3) --- */
  .atlas-changelog__head .atlas-title {
    margin-block-end: var(--atlas-space-md);
  }

  .atlas-changelog__intro {
    margin-block-end: var(--atlas-space-2xl);
  }

  .atlas-releases {
    display: flex;
    flex-direction: column;
    gap: var(--atlas-space-2xl);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .atlas-release__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--atlas-space-xs) var(--atlas-space-lg);
    margin-block-end: var(--atlas-space-md);
    padding-block-end: 12px;
    border-block-end: 1px solid var(--atlas-border);
  }

  .atlas-release__version {
    font-size: var(--atlas-heading-sm);
    line-height: var(--atlas-leading-heading-sm);
    letter-spacing: var(--atlas-tracking-tight);
  }

  .atlas-release__date {
    color: var(--atlas-text-faint);
    font-family: var(--atlas-font-mono);
    font-size: var(--atlas-text-xs);
  }

  .atlas-release__summary {
    margin-block-end: var(--atlas-space-md);
    color: var(--atlas-text-secondary);
    line-height: var(--atlas-leading-relaxed);
  }

  .atlas-release__changes {
    display: flex;
    flex-direction: column;
    gap: var(--atlas-space-sm);
    margin: 0;
    padding: 0;
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
    list-style: none;
  }

  .atlas-change {
    display: flex;
    align-items: baseline;
    gap: var(--atlas-space-xs) 12px;
  }

  .atlas-change__text {
    min-width: 0;
  }

  /* --- main-search.liquid (R§5.5) --- */
  .atlas-search-page__head .atlas-title {
    margin-block-end: var(--atlas-space-md);
  }

  .atlas-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--atlas-space-sm);
    margin-block: var(--atlas-space-lg) var(--atlas-space-xl);
  }

  .atlas-search-form__field {
    position: relative;
    flex: 1 1 16rem;
    min-width: 0;
  }

  .atlas-search-form__icon {
    --atlas-icon-size: 18px;
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 14px;
    color: var(--atlas-text-faint);
    transform: translateY(-50%);
    pointer-events: none;
  }

  .atlas-search-form__input {
    min-height: 48px;
    padding-inline-start: 44px;
  }

  .atlas-search-page__summary {
    margin-block-end: var(--atlas-space-sm);
    color: var(--atlas-text-faint);
    font-size: var(--atlas-text-sm);
  }

  .atlas-search-hits {
    margin: 0;
    padding: 0;
    list-style: none;
    border-block-start: 1px solid var(--atlas-border);
  }

  .atlas-search-hit {
    padding-block: var(--atlas-space-md);
    border-block-end: 1px solid var(--atlas-border);
  }

  .atlas-search-hit__title {
    font-size: var(--atlas-text-lg);
    line-height: var(--atlas-leading-heading-xs);
    letter-spacing: var(--atlas-tracking-tight);
  }

  .atlas-search-hit__link {
    color: var(--atlas-text);
    text-decoration: none;
  }

  .atlas-search-hit__link:hover {
    color: var(--atlas-accent);
    text-decoration: underline;
  }

  .atlas-search-hit__text {
    margin-block-start: var(--atlas-space-xs);
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
    line-height: var(--atlas-leading-relaxed);
  }

  .atlas-search-hit__path {
    margin-block-start: var(--atlas-space-xs);
    color: var(--atlas-text-faint);
    font-family: var(--atlas-font-mono);
    font-size: var(--atlas-text-xs);
    overflow-wrap: anywhere;
  }

  .atlas-search-page__empty {
    padding: var(--atlas-space-lg);
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-surface);
    color: var(--atlas-text-secondary);
  }

  .atlas-search-page__empty-title {
    margin-block-end: var(--atlas-space-xs);
    color: var(--atlas-text);
    font-weight: var(--atlas-weight-semibold);
  }

  /* --- main-page.liquid, main-data-list.liquid, contact-form.liquid --- */
  .atlas-page__head,
  .atlas-listing__head,
  .atlas-contact__head {
    margin-block-end: var(--atlas-space-xl);
  }

  .atlas-page__meta {
    margin-block-start: var(--atlas-space-sm);
    color: var(--atlas-text-faint);
    font-size: var(--atlas-text-xs);
  }

  /* An entry's own fields (snippets/entry-field.liquid), after the page body. */
  .atlas-entry-fields {
    margin-block-start: var(--atlas-space-xl);
  }

  .atlas-entry-field + .atlas-entry-field {
    margin-block-start: var(--atlas-space-lg);
  }

  .atlas-entry-field__label {
    color: var(--atlas-text-faint);
    font-size: var(--atlas-text-xs);
  }

  .atlas-entry-field__media :is(img, video, iframe) {
    display: block;
    width: 100%;
    height: auto;
  }

  .atlas-entry-field__media iframe {
    aspect-ratio: 16 / 9;
  }

  .atlas-video-facade {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    background: #000;
  }

  .atlas-entry-field__cell--media .atlas-video-facade {
    width: 10rem;
  }

  .atlas-video-facade__play {
    width: 3.5rem;
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
  }

  .atlas-video-facade__play::before {
    content: '';
    display: block;
    margin: auto;
    translate: 10% 0;
    width: 34%;
    height: 38%;
    background: #000;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
  }

  .atlas-entry-field__rows {
    padding-inline-start: 1.25rem;
  }

  .atlas-entry-field__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--atlas-space-xs) var(--atlas-space-md);
  }

  .atlas-entry-field__cell--media img {
    display: block;
    width: 10rem;
    height: auto;
  }

  .atlas-listing {
    margin: 0;
    padding: 0;
    list-style: none;
    border-block-start: 1px solid var(--atlas-border);
  }

  .atlas-listing__item {
    padding-block: var(--atlas-space-md);
    border-block-end: 1px solid var(--atlas-border);
  }

  .atlas-listing__title {
    font-size: var(--atlas-text-lg);
    line-height: var(--atlas-leading-heading-xs);
    letter-spacing: var(--atlas-tracking-tight);
  }

  .atlas-listing__link {
    color: var(--atlas-text);
    text-decoration: none;
  }

  .atlas-listing__link:hover {
    color: var(--atlas-accent);
    text-decoration: underline;
  }

  .atlas-listing__text {
    margin-block-start: var(--atlas-space-xs);
    color: var(--atlas-text-secondary);
    font-size: var(--atlas-text-sm);
  }

  .atlas-contact__intro {
    margin-block-end: var(--atlas-space-xl);
  }

  .atlas-contact__panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-lg);
    background: var(--atlas-background);
  }

  .atlas-form__submit {
    margin-block-start: var(--atlas-space-sm);
  }
}

/* ==========================================================================================================
   PRINT (R§8): the overlay and controls never print; every showcase panel prints, under its tab's name; answers
   print open.
   ========================================================================================================== */
@layer print {
  @media print {
    .atlas-search {
      display: none !important;
    }

    .atlas-showcase {
      display: block !important;
      border: 0 !important;
    }

    .atlas-showcase__tab {
      display: block !important;
      padding: var(--atlas-space-md) 0 var(--atlas-space-xs) !important;
      border: 0 !important;
      background: none !important;
    }

    .atlas-showcase__panel {
      display: block !important;
      padding: 0 !important;
      animation: none !important;
    }

    .atlas-showcase__fill,
    .atlas-showcase__chevron {
      display: none !important;
    }

    /* A closed answer prints too: its content box is made visible (the browser hides a closed one). */
    .atlas-faq__item::details-content {
      height: auto !important;
      content-visibility: visible !important;
    }

    .atlas-faq__chevron {
      display: none !important;
    }

    /* Controls that do nothing on paper: the landing's buttons, the search form, page links. */
    .atlas-hero__actions,
    .atlas-cta__actions,
    .atlas-notfound .atlas-actions,
    .atlas-search-form,
    .atlas-pagination {
      display: none !important;
    }

    .atlas-link-card,
    .atlas-stat,
    .atlas-release {
      break-inside: avoid;
    }

    .atlas-link-card {
      transform: none !important;
      box-shadow: none !important;
    }
  }
}

/* ---------------------------------------------------------------- comments, author pages, map (21 Nov 2026) */
.comments__title, .author__posts-title { margin-block: 0 24px; }
.comments__list, .comments__replies, .author__posts { list-style: none; margin: 0; padding: 0; }
.comments__item { padding-block: 18px; border-block-start: 1px solid var(--atlas-border); }
.comments__replies { margin-block-start: 12px; padding-inline-start: clamp(16px, 4vw, 40px); border-inline-start: 2px solid var(--atlas-border); }
.comments__replies .comments__item { border-block-start: 0; padding-block: 10px; }
.comment__head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-block-end: 6px; }
.comment__author { font-weight: 600; }
.comment__date, .comments__note, .comments__empty, .author__role, .author__post-date, .author__empty { color: var(--atlas-text-secondary); font-size: 0.92em; }
.comment__text { overflow-wrap: anywhere; }
.comments__link { margin-block-start: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 0.92em; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.comments__form { margin-block-start: 40px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--atlas-border); border-radius: 12px; background: transparent; }
.comments__form-title { margin-block: 0 16px; }
.comments__replying { margin-block: 0 12px; }
.comments__note { margin-block: 12px; }
.author__head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-block-end: 24px; }
.author__photo { width: 112px; height: 112px; flex: none; overflow: hidden; border-radius: 50%; }
.author__photo img { width: 100%; height: 100%; object-fit: cover; }
.author__name { margin: 0; }
.author__role, .author__website { margin-block: 6px 0; }
.author__bio { margin-block-end: 40px; }
.author__post { padding-block: 16px; border-block-start: 1px solid var(--atlas-border); }
.author__post-link { display: block; font-weight: 600; font-size: 1.08em; }
.author__post-excerpt { margin-block: 6px 0; }
.author__pager { display: flex; gap: 16px; justify-content: space-between; margin-block-start: 24px; }
.map-embed__title { margin-block: 0 12px; }
.map-embed__address { margin-block: 0 16px; color: var(--atlas-text-secondary); }
.map-embed__frame { position: relative; height: var(--map-h, 360px); overflow: hidden; border: 1px solid var(--atlas-border); border-radius: 12px; }
.map-embed__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-embed__facade { display: grid; place-content: center; justify-items: center; gap: 14px; height: 100%; padding: 20px; text-align: center; color: var(--atlas-text-secondary); }
.map-embed__link { margin-block: 12px 0; }
