/*!
 * Atlas — a Tableau extension by Antichaos
 * Copyright (c) 2026 Antichaos. All rights reserved. Proprietary software;
 * unauthorized copying, modification, distribution, or reuse is prohibited.
 * Licensing & enquiries: extensions@antichaosdata.com
 */

/* ---- Zone-filling canvas ---- */
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;   /* never a horizontal bar around the portal (the setup card may still scroll down) */
}
body.ac {
    background: var(--at-canvas, #ece9e3);
    font-family: var(--ac-font, "Inter", system-ui, sans-serif);
    -webkit-font-smoothing: antialiased;
}

/* Atlas theme variables, overridden inline by the runtime from settings. */
#atlas {
    --at-canvas: #ece9e3;
    --at-accent: #12324f;    /* navy group-header bars + current badge */
    --at-card: #ffffff;
    --at-icon: #8b939e;      /* line-icon stroke */
    --at-label: #55606e;     /* card label */
    --at-title: #3a4552;     /* portal title + vertical labels */
    --at-radius: 6px;
    --at-shadow: 0 1px 0 rgba(20,28,42,.04), 0 6px 14px rgba(20,28,42,.10);
    --at-scale: 1;           /* Pro typography scale */
    --at-font: var(--ac-font, "Inter", system-ui, sans-serif);

    box-sizing: border-box;
    height: 100%;
    /* Scrolls down only. A hidden info bubble (Classic/Minimal hang it from the card's left edge,
       up to 300px wide) still counts toward the scroll width and gave cards near the right edge a
       horizontal bar; an OPEN bubble is kept inside by placeBubble(), so clipping loses nothing. */
    overflow-x: hidden;
    overflow-y: auto;
    padding: 18px 20px 22px;
    font-family: var(--at-font);
}
#atlas * { box-sizing: border-box; }

/* ---- Header (logo + title) ---- */
.atlas-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 2px 2px 16px;
}
.atlas-logo { display: block; width: auto; max-width: 240px; object-fit: contain; }

/* ---- Portal title ---- */
.atlas-title {
    font-size: calc(22px * var(--at-scale));
    font-weight: 800;
    letter-spacing: .2px;
    color: var(--at-title);
    margin: 2px 2px 16px;
}
.atlas-head .atlas-title { margin: 0; }

/* ---- Help button (header) + lightbox (help dialog / a card's full remarks) ---- */
.atlas-help {
    margin-left: auto; flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 12px 7px 10px; cursor: pointer;
    /* A plain button: the portal's own corner radius (capped), a hairline border and a lift. */
    border-radius: clamp(4px, var(--at-radius), 8px);
    border: 1px solid color-mix(in srgb, var(--at-label) 26%, transparent);
    background: var(--at-card); color: var(--at-title);
    box-shadow: 0 1px 2px rgba(20, 28, 42, .08);
    font: 600 calc(12.5px * var(--at-scale)) inherit; font-family: inherit; line-height: 1;
    transition: color .12s, border-color .12s, background .12s, box-shadow .12s, transform .08s;
}
.atlas-help svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--at-accent); }
.atlas-help:hover, .atlas-help:focus-visible {
    color: var(--at-accent); border-color: color-mix(in srgb, var(--at-accent) 55%, transparent);
    background: color-mix(in srgb, var(--at-accent) 6%, var(--at-card)); box-shadow: 0 2px 6px rgba(20, 28, 42, .12); outline: none;
}
.atlas-help:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--at-accent) 25%, transparent); }
.atlas-help:active { transform: translateY(1px); box-shadow: 0 1px 1px rgba(20, 28, 42, .08); }
.atlas-head:has(.atlas-help):not(:has(.atlas-title)):not(:has(.atlas-logo)) { margin-bottom: 8px; }

.atlas-bubble .atlas-more {
    display: inline; margin-left: 2px; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-weight: 700; color: #9cc3ff; text-decoration: underline; text-underline-offset: 2px;
}
.atlas-bubble .atlas-more:hover, .atlas-bubble .atlas-more:focus-visible { color: #fff; outline: none; }

.atlas-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; font-family: var(--at-font, inherit); }
.atlas-lightbox[hidden] { display: none; }
/* Runtime: opened level with its trigger (atlas.js placeLightbox), not centred in a zone taller than the screen. */
.atlas-lightbox.anchored { place-items: start center; padding-top: var(--lb-top, 18px); }
.atlas-lightbox-backdrop {
    position: absolute; inset: 0; background: rgba(15, 22, 33, .42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
    opacity: 0; transition: opacity .22s ease;
}
.atlas-lightbox-panel {
    position: relative; width: min(600px, 100%); max-height: 100%; display: flex; flex-direction: column;
    background: var(--at-card, #fff); color: var(--at-title, #1f2733);
    border-radius: clamp(4px, var(--at-radius), 10px);
    border: 1px solid color-mix(in srgb, var(--at-label) 14%, transparent);
    box-shadow: 0 2px 6px rgba(15, 22, 33, .08), 0 24px 56px rgba(15, 22, 33, .22);
    opacity: 0; transform: translateY(12px) scale(.98);
    transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.atlas-lightbox.open .atlas-lightbox-backdrop { opacity: 1; }
.atlas-lightbox.open .atlas-lightbox-panel { opacity: 1; transform: none; }
.atlas-lightbox.closing .atlas-lightbox-backdrop { opacity: 0; transition-duration: .18s; }
.atlas-lightbox.closing .atlas-lightbox-panel { opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .16s ease, transform .18s ease-in; }
/* The text settles a beat after the panel, so the eye lands on the title first. */
.atlas-lightbox-body { opacity: 0; transform: translateY(6px); transition: opacity .28s ease .1s, transform .32s cubic-bezier(.2, .8, .2, 1) .1s; }
.atlas-lightbox.open .atlas-lightbox-body { opacity: 1; transform: none; }
.atlas-lightbox-head {
    display: flex; align-items: center; gap: 12px; padding: 16px 14px 14px 22px;
    border-bottom: 1px solid color-mix(in srgb, var(--at-label) 14%, transparent);
}
.atlas-lightbox-icon {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: clamp(3px, var(--at-radius), 6px); display: grid; place-items: center;
    background: color-mix(in srgb, var(--at-accent) 10%, var(--at-card, #fff)); color: var(--at-accent);
}
.atlas-lightbox-icon[hidden] { display: none; }
.atlas-lightbox-icon svg { width: 20px; height: 20px; }
.atlas-lightbox-icon img { width: 26px; height: 26px; object-fit: contain; border-radius: 3px; }
.atlas-lightbox-titles { flex: 1 1 auto; min-width: 0; }
.atlas-lightbox-head h2 { margin: 0; font-size: calc(16px * var(--at-scale)); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.atlas-lightbox-kicker { margin-top: 2px; font-size: calc(12.5px * var(--at-scale)); color: var(--at-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atlas-lightbox-kicker[hidden] { display: none; }
.atlas-lightbox-close { flex: 0 0 auto; align-self: flex-start; width: 32px; height: 32px; border-radius: clamp(3px, var(--at-radius), 6px); border: 0; background: transparent; color: var(--at-label); cursor: pointer; display: grid; place-items: center; transition: background .12s, color .12s, transform .12s; }
.atlas-lightbox-close svg { width: 18px; height: 18px; }
.atlas-lightbox-close:hover, .atlas-lightbox-close:focus-visible { background: color-mix(in srgb, var(--at-label) 12%, transparent); color: var(--at-title); outline: none; }
.atlas-lightbox-close:active { transform: scale(.92); }
.atlas-lightbox-body { overflow: auto; padding: 18px 22px 24px; font-size: calc(14px * var(--at-scale)); line-height: 1.6; color: var(--at-title); }
.atlas-lightbox-body > :first-child { margin-top: 0; }
.atlas-lightbox-body > :last-child { margin-bottom: 0; }
.atlas-lightbox-body p, .atlas-lightbox-body ul, .atlas-lightbox-body ol, .atlas-lightbox-body blockquote { margin: 0 0 .8em; }
.atlas-lightbox-body ul, .atlas-lightbox-body ol { padding-left: 1.3em; }
.atlas-lightbox-body h1, .atlas-lightbox-body h2, .atlas-lightbox-body h3 { margin: 1.1em 0 .4em; line-height: 1.25; font-weight: 800; }
.atlas-lightbox-body h1 { font-size: 1.25em; } .atlas-lightbox-body h2 { font-size: 1.12em; } .atlas-lightbox-body h3 { font-size: 1em; }
.atlas-lightbox-body a { color: var(--at-accent); text-decoration: underline; text-underline-offset: 2px; }
.atlas-lightbox-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; padding: .1em .35em; border-radius: 4px; background: color-mix(in srgb, var(--at-label) 12%, transparent); }
.atlas-lightbox-body blockquote { padding: .2em 0 .2em .9em; border-left: 3px solid color-mix(in srgb, var(--at-accent) 60%, transparent); color: var(--at-label); }
.atlas-lightbox-body hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--at-label) 18%, transparent); margin: 1em 0; }
.atlas-lightbox-body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: .5em 0; }
@media (prefers-reduced-motion: reduce) { .atlas-lightbox-backdrop, .atlas-lightbox-panel, .atlas-lightbox-body { transition: none; } }

/* ---- Search box ---- */
.atlas-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 340px;
    margin: 0 2px 16px;
    padding: 8px 12px;
    background: var(--at-card);
    border: 1px solid rgba(20, 28, 42, .12);
    border-radius: 10px;
    color: var(--at-icon);
}
.atlas-search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.atlas-search input {
    border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 14px; width: 100%;
    color: var(--at-label);
}
.atlas-card.q-hide, .atlas-group.q-hide, .atlas-vert.q-hide { display: none; }
.atlas-empty { margin: -4px 4px 16px; font-size: calc(14px * var(--at-scale, 1)); color: var(--at-label); }
.atlas-empty[hidden] { display: none; }

/* ---- Vertical (a row band: label on the left, groups on the right) ---- */
.atlas-vert {
    display: flex;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
}
.atlas-vert:last-child { margin-bottom: 4px; }

.atlas-vert-label {
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.atlas-vert-label > span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 12px;
    font-weight: 800;
    color: var(--at-title);
    opacity: .72;
    white-space: nowrap;
}

/* Containment bands: wrap each vertical in a subtle panel so multi-row group
   sets clearly belong to their level-1 label. Toggled by .bands on #atlas. */
#atlas.bands .atlas-vert {
    background: rgba(20, 28, 42, .035);
    border: 1px solid rgba(20, 28, 42, .07);
    border-radius: 14px;
    padding: 12px 16px 14px;
    gap: 10px;
}
#atlas.bands .atlas-vert-label {
    align-self: stretch;
    border-right: 1px solid rgba(20, 28, 42, .09);
    margin-right: 4px;
    flex-basis: 30px;
}

/* The groups sit in a horizontal, wrapping row. `stretch` makes every group in a
   row the same height (as the tallest in that row), so tiles line up even when one
   group has a taller card (subtitle / tag). */
.atlas-groups {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
}

/* ---- Group (navy header bar + a wrapping set of cards) ---- */
.atlas-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
}
/* size-lg verticals let a single group stretch across the row */
.atlas-vert.size-lg .atlas-group { flex: 1 1 auto; }

.atlas-group-head {
    background: var(--at-accent);
    color: #fff;
    font-weight: 700;
    font-size: calc(13px * var(--at-scale));
    letter-spacing: .3px;
    padding: 7px 12px;
    border-radius: 3px;
}

.atlas-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1 1 auto;   /* fill the group's (stretched) height so cards match across groups */
    align-content: stretch;
}
.atlas-vert.size-lg .atlas-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---- Card ---- */
.atlas-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    background: var(--at-card);
    border: 1px solid rgba(20,28,42,.10);
    border-radius: var(--at-radius);
    box-shadow: var(--at-shadow);
    color: var(--at-label);
    text-decoration: none;
    padding: 16px 14px;
    cursor: pointer;
    transition: transform .13s var(--ac-ease, ease), box-shadow .13s ease, border-color .13s ease;
}
.atlas-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 0 rgba(20,28,42,.05), 0 12px 24px rgba(20,28,42,.16);
    border-color: rgba(18,50,79,.35);
}
.atlas-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--at-accent) 45%, transparent);
    outline-offset: 2px;
}
/* A card that sets a parameter to the value it already has: "you are here". */
.atlas-card.is-current {
    border-color: var(--at-accent);
    box-shadow: inset 0 0 0 2px var(--at-accent), var(--at-shadow);
}
.atlas-card.is-current::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px;
    border-radius: 3px 3px 0 0; background: var(--at-accent);
}
/* A card with no link reads clearly as an unfinished placeholder. Its parts fade, not the card:
   a faded card would take its status tag ("Soon") and info button ("Expected in Q4") down with it,
   and those are exactly what a placeholder needs to say. filter: opacity() multiplies with each
   part's own opacity, so the faded look is the same as before. */
.atlas-card.no-link {
    cursor: default;
    background: transparent;
    border-style: dashed;
    border-color: rgba(20, 28, 42, .28);
    box-shadow: none;
}
.atlas-card.no-link > .atlas-card-icon,
.atlas-card.no-link > .atlas-card-label,
.atlas-card.no-link > .atlas-card-sub,
.atlas-card.no-link > .atlas-badge,
.atlas-card.no-link > .atlas-nolink,
.atlas-card.no-link::before { filter: opacity(.62); }
.atlas-card.no-link:hover { transform: none; box-shadow: none; border-color: rgba(20, 28, 42, .28); }
/* Cursor: the whole tile is a link, so every hover should read as clickable. The label/subtitle
   are selectable text; Firefox lets that text's I-beam win over an inherited `cursor: pointer`
   (Chrome doesn't), so the hand never showed over most of the tile. Make the decorative children
   pass their hover through to the <a> (which owns the pointer cursor) and drop text-selection, so
   the pointer shows uniformly across browsers. The info button + tooltip stay interactive. */
.atlas-card { -webkit-user-select: none; user-select: none; }
.atlas-card > .atlas-card-icon,
.atlas-card > .atlas-card-label,
.atlas-card > .atlas-card-sub,
.atlas-card > .atlas-tag,
.atlas-card > .atlas-badge,
.atlas-card > .atlas-nolink { pointer-events: none; }
.atlas-nolink {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 16px;
    height: 16px;
    color: var(--at-icon);
    opacity: .9;
    line-height: 0;
}
.atlas-nolink svg { width: 100%; height: 100%; display: block; }
.atlas-vert.size-sm .atlas-nolink { top: 5px; right: 6px; width: 14px; height: 14px; }

.atlas-card-icon { color: var(--at-icon); line-height: 0; }
.atlas-card-icon svg { display: block; }
.atlas-card-icon img { display: block; object-fit: contain; }

.atlas-card-label {
    font-weight: 700;
    line-height: 1.2;
    color: var(--at-label);
    overflow-wrap: anywhere;   /* a long single word (Dutch compounds) breaks instead of pushing the page wider */
}
.atlas-card-sub {
    margin-top: -2px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--at-label);
    opacity: .68;
}

/* Status tag pill */
.atlas-tag {
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1.5;
}
.tag-new { background: #e6f6ec; color: #1c7a44; }
.tag-beta { background: #e7effe; color: #2c5bd6; }
.tag-updated { background: #fdf1dc; color: #9a6a12; }
.tag-deprecated { background: #f1edf0; color: #86707e; }

/* ---- Alignment modes (set via data-align on each vertical) ---- */
/* fill: groups + cards stretch so each row spans the full width */
.atlas-vert[data-align="fill"] .atlas-group { flex: 1 1 auto; }
.atlas-vert[data-align="fill"] .atlas-cards { display: flex; flex-wrap: wrap; }
.atlas-vert[data-align="fill"] .atlas-card { flex: 1 1 0; }
/* grid: groups stack full-width, cards flow into a uniform N-column grid that lines up across groups */
.atlas-vert[data-align="grid"] .atlas-groups { display: block; }
.atlas-vert[data-align="grid"] .atlas-group { margin-bottom: 12px; }
.atlas-vert[data-align="grid"] .atlas-group:last-child { margin-bottom: 0; }
.atlas-vert[data-align="grid"] .atlas-cards { display: grid; grid-template-columns: repeat(var(--at-cols, 4), minmax(0, 1fr)); }

/* Card sizing by vertical band */
.atlas-vert.size-lg .atlas-card { min-height: 150px; padding: 20px 16px; }
.atlas-vert.size-lg .atlas-card-icon svg,
.atlas-vert.size-lg .atlas-card-icon img { width: 54px; height: 54px; }
.atlas-vert.size-lg .atlas-card-label { font-size: calc(16px * var(--at-scale)); }
.atlas-vert.size-lg .atlas-card-sub { font-size: calc(13px * var(--at-scale)); }

.atlas-vert.size-md .atlas-card { min-width: 150px; min-height: 118px; }
.atlas-vert.size-md .atlas-card-icon svg,
.atlas-vert.size-md .atlas-card-icon img { width: 40px; height: 40px; }
.atlas-vert.size-md .atlas-card-label { font-size: calc(14px * var(--at-scale)); }
.atlas-vert.size-md .atlas-card-sub { font-size: calc(12px * var(--at-scale)); }

.atlas-vert.size-sm .atlas-card { min-width: 104px; min-height: 92px; padding: 12px 10px; gap: 7px; }
.atlas-vert.size-sm .atlas-card-icon svg,
.atlas-vert.size-sm .atlas-card-icon img { width: 28px; height: 28px; }
.atlas-vert.size-sm .atlas-card-label { font-size: calc(12px * var(--at-scale)); }
.atlas-vert.size-sm .atlas-card-sub { font-size: calc(10.5px * var(--at-scale)); }

/* Grid alignment: N columns while N cards of the size's minimum width fit, fewer when the zone is
   narrower - instead of N fixed columns that push cards past the edge (a horizontal scrollbar).
   Every group gets the same tracks, so cards still line up across groups. */
.atlas-vert.size-md { --at-cardmin: 150px; }
.atlas-vert.size-sm { --at-cardmin: 104px; }
.atlas-vert[data-align="grid"] .atlas-cards {
    grid-template-columns: repeat(auto-fill, minmax(max(var(--at-cardmin, 0px), calc((100% - (var(--at-cols, 4) - 1) * 10px) / var(--at-cols, 4) - .1px)), 1fr));
}
.atlas-vert[data-align="grid"] .atlas-card { min-width: 0; }

/* ---- Remarks: info button + hover/click bubble ---- */
.atlas-info {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 17px;
    height: 17px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--at-icon);
    opacity: .55;
    cursor: pointer;
    line-height: 0;
    z-index: 3;
}
.atlas-info:hover, .atlas-info:focus-visible { opacity: 1; color: var(--at-accent); outline: none; }
.atlas-info svg { width: 100%; height: 100%; display: block; }
.atlas-bubble {
    position: absolute;
    top: 27px;
    left: 7px;
    z-index: 30;
    /* max-content: size to the text, not to the card (an absolutely positioned box with one
       horizontal anchor otherwise shrink-wraps to its containing block). placeBubble() in
       atlas.js sets --dx to keep a wide bubble inside the zone; the arrow shifts back by it. */
    width: max-content;
    max-width: min(300px, calc(100vw - 24px));
    min-width: 130px;
    background: #1f2733;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    padding: 8px 11px;
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(15, 22, 33, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .12s var(--ac-ease, ease), transform .12s ease;
    pointer-events: none;
}
/* Styles whose icon tile sits top-left (Modern, Glass) or whose card is a row (Rail) put the
   info button on the RIGHT, beside the certified badge, and hang the bubble from the right edge. */
#atlas.style-modern .atlas-info, #atlas.style-glass .atlas-info { left: auto; right: 8px; top: 8px; }
#atlas.style-modern .atlas-card:has(.atlas-info) .atlas-badge,
#atlas.style-glass .atlas-card:has(.atlas-info) .atlas-badge { right: 32px; }
/* ...and the "no link" mark likewise, or it lies exactly on the info button. */
#atlas.style-modern .atlas-card:has(.atlas-info) .atlas-nolink,
#atlas.style-glass .atlas-card:has(.atlas-info) .atlas-nolink { right: 32px; }
#atlas.style-modern .atlas-bubble, #atlas.style-glass .atlas-bubble { left: auto; right: 7px; top: 29px; }
#atlas.style-modern .atlas-bubble::after, #atlas.style-glass .atlas-bubble::after { left: auto; right: calc(10px + var(--dx, 0px)); }
/* Rail: the info button is already the last flex item of the row (see the Rail block below);
   only the bubble needs to hang from the right edge, below the row. */
#atlas.style-rail .atlas-bubble { left: auto; right: 8px; top: calc(50% + 14px); }
#atlas.style-rail .atlas-bubble::after { left: auto; right: calc(12px + var(--dx, 0px)); }
/* The bubble's z-index only orders it within its own card: a later sibling card paints over the
   whole card, bubble included. While a bubble shows, lift THE CARD above its neighbours, and the
   group and row that hold it above theirs. */
.atlas-card:hover, .atlas-card:focus-within, .atlas-card:has(.atlas-bubble.open) { z-index: 40; }
.atlas-group:has(.atlas-card:hover), .atlas-group:has(.atlas-bubble.open), .atlas-group:has(.atlas-card:focus-within) { position: relative; z-index: 40; }
.atlas-vert:has(.atlas-card:hover), .atlas-vert:has(.atlas-bubble.open), .atlas-vert:has(.atlas-card:focus-within) { position: relative; z-index: 40; }
.atlas-bubble::after {
    content: "";
    position: absolute;
    top: -5px;
    left: calc(10px - var(--dx, 0px));
    border: 5px solid transparent;
    border-top: 0;
    border-bottom-color: #1f2733;
}
.atlas-info:hover + .atlas-bubble,
.atlas-info:focus-visible + .atlas-bubble,
.atlas-bubble.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(var(--dx, 0px));
    pointer-events: auto;
}
.atlas-vert.size-sm .atlas-info { top: 5px; left: 5px; width: 15px; height: 15px; }

/* ---- "Certified" badge (navy rosette + tick, like the mockup) ---- */
.atlas-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    color: var(--at-accent);
}
.atlas-badge svg { width: 100%; height: 100%; display: block; }
.atlas-badge-img { width: 100%; height: 100%; display: block; object-fit: contain; }

/* ---- Setup card (unconfigured) ---- */
.state { display: none; height: 100%; place-items: center; padding: 20px; box-sizing: border-box; }
.state.show { display: grid; }
.setup-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    max-width: 460px; width: 100%; box-sizing: border-box;
    padding: 26px 32px 22px;
    background: var(--ac-surface, #fff);
    border: 1px solid var(--ac-line, #e6e8ee);
    border-radius: 18px;
    box-shadow: var(--ac-shadow, 0 10px 30px rgba(20,28,42,.10));
}
/* icon sits in a soft accent tile, like the configure dialog's mark */
.setup-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 13px; margin-bottom: 12px;
    background: color-mix(in srgb, var(--ac-brand, #4f7cf0) 12%, transparent);
    color: var(--ac-brand, #4f7cf0);
}
.setup-icon svg { width: 26px; height: 26px; }
.setup-card h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--ac-ink, #151b26); }
.setup-card p { margin: 0 0 18px; color: var(--ac-ink-soft, #55606e); line-height: 1.5; max-width: 380px; }
.setup-btn {
    appearance: none; border: 0; cursor: pointer;
    background: var(--ac-brand-gradient, linear-gradient(135deg, #4f7cf0, #7a5cf0));
    color: #fff; font-weight: 700; font-size: 14px;
    padding: 11px 26px; border-radius: 12px;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--ac-brand, #4f7cf0) 34%, transparent);
    transition: transform .12s ease, box-shadow .12s ease;
}
.setup-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px color-mix(in srgb, var(--ac-brand, #4f7cf0) 42%, transparent); }
.setup-btn:active { transform: translateY(0); box-shadow: 0 3px 10px color-mix(in srgb, var(--ac-brand, #4f7cf0) 34%, transparent); }
/* brand drops onto its own line under the button, set off by a hairline */
.setup-brand {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%; margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--ac-line, #eef0f4);
    color: var(--ac-ink-faint, #8a93a3); text-decoration: none; font-size: 12.5px;
}
.setup-brand .ac-logo { width: 18px; height: 18px; }

#atlas.hidden, .state.hidden { display: none; }

/* ============================================================
   MODERN style — a wayfinding skin over the same markup.
   Toggled by `.style-modern` on #atlas (config_style=modern).
   Colours still come from the user's --at-* tokens.
   ============================================================ */
#atlas.style-modern {
    background-image: radial-gradient(color-mix(in srgb, var(--at-label) 13%, transparent) 1px, transparent 1.2px);
    background-size: 22px 22px;
}
/* Modern drops the heavy band panels — it has its own tier headers. */
#atlas.style-modern.bands .atlas-vert { background: transparent; border: 0; padding: 0; }

/* Vertical → a horizontal tier header (name · rule · count). */
#atlas.style-modern .atlas-vert { flex-direction: column; gap: 0; margin-bottom: 26px; }
#atlas.style-modern .atlas-vert-label {
    flex: none; align-self: stretch; justify-content: flex-start;
    display: flex; align-items: center; gap: 10px; height: auto;
    border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--at-label) 22%, transparent);
    margin: 0 2px 16px; padding-bottom: 9px;
}
#atlas.style-modern .atlas-vert-label::before {
    content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--at-accent); flex: none;
}
#atlas.style-modern .atlas-vert-label > span {
    writing-mode: horizontal-tb; transform: none; text-transform: none; white-space: normal;
    font-family: "Bricolage Grotesque", var(--at-font);
    font-size: calc(20px * var(--at-scale)); font-weight: 800; letter-spacing: -.015em; opacity: 1; color: var(--at-title);
}
#atlas.style-modern .atlas-title { font-family: "Bricolage Grotesque", var(--at-font); font-weight: 800; letter-spacing: -.02em; }
#atlas.style-modern .atlas-vert-label[data-count]::after {
    content: attr(data-count) " " attr(data-unit); margin-left: auto; flex: none;
    font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--at-icon);
}

/* Group header → a light eyebrow with an accent dot (no navy bar). */
#atlas.style-modern .atlas-group-head {
    background: transparent; color: var(--at-label); box-shadow: none; border-radius: 0;
    padding: 0 0 9px 2px;
    display: flex; align-items: center; gap: 8px;
    font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: calc(11px * var(--at-scale)); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
#atlas.style-modern .atlas-group-head::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--at-accent); opacity: .6; flex: none;
}

/* Cards → left-aligned with a tinted icon chip + hover arrow. */
#atlas.style-modern .atlas-card { align-items: flex-start; text-align: left; justify-content: flex-start; padding: 16px; gap: 12px; min-height: 0; }
#atlas.style-modern .atlas-vert.size-lg .atlas-card { padding: 20px; }
#atlas.style-modern .atlas-card-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    /* Accent tint independent of the card background, so "Card background" changes the card, not the chip. */
    background: color-mix(in srgb, var(--at-accent) 13%, #ffffff);
    color: var(--at-accent); transition: background .15s var(--ac-ease, ease), color .15s ease;
}
#atlas.style-modern .atlas-card-icon svg,
#atlas.style-modern .atlas-card-icon img { width: 23px; height: 23px; }
#atlas.style-modern .atlas-vert.size-lg .atlas-card-icon { width: 52px; height: 52px; border-radius: 14px; }
#atlas.style-modern .atlas-vert.size-lg .atlas-card-icon svg,
#atlas.style-modern .atlas-vert.size-lg .atlas-card-icon img { width: 27px; height: 27px; }
#atlas.style-modern a.atlas-card:hover .atlas-card-icon { background: var(--at-accent); color: #fff; }
#atlas.style-modern .atlas-card-label,
#atlas.style-modern .atlas-card-sub { text-align: left; }
#atlas.style-modern .atlas-tag { align-self: flex-start; font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* Hover ↗ (links only; bottom-right so it clears the top-right certified badge). */
#atlas.style-modern a.atlas-card::after {
    content: "\2197"; position: absolute; right: 13px; bottom: 10px;
    font-size: 15px; line-height: 1; color: var(--at-accent);
    opacity: 0; transform: translate(-2px, 2px); transition: opacity .15s ease, transform .15s ease;
}
#atlas.style-modern a.atlas-card:hover::after { opacity: 1; transform: none; }

/* ============================================================
   ADDITIONAL LAYOUT SKINS — genuinely different structures over
   the same markup (not palettes). Toggled by .style-<name> on
   #atlas; colours still come from the --at-* tokens.
   Family: rail · gallery · glass · minimal.
   ============================================================ */

/* ---- Shared horizontal tier header (gallery / glass / minimal) ---- */
#atlas.style-gallery .atlas-vert,
#atlas.style-glass .atlas-vert,
#atlas.style-minimal .atlas-vert { flex-direction: column; gap: 0; margin-bottom: 26px; }
#atlas.style-gallery.bands .atlas-vert,
#atlas.style-glass.bands .atlas-vert,
#atlas.style-minimal.bands .atlas-vert { background: transparent; border: 0; padding: 0; }
#atlas.style-gallery .atlas-vert-label,
#atlas.style-glass .atlas-vert-label,
#atlas.style-minimal .atlas-vert-label {
    flex: none; align-self: stretch; justify-content: flex-start; height: auto;
    display: flex; align-items: center; gap: 10px; border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--at-label) 22%, transparent);
    margin: 0 2px 16px; padding-bottom: 9px;
}
#atlas.style-gallery .atlas-vert-label::before,
#atlas.style-glass .atlas-vert-label::before,
#atlas.style-minimal .atlas-vert-label::before {
    content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--at-accent); flex: none;
}
#atlas.style-gallery .atlas-vert-label > span,
#atlas.style-glass .atlas-vert-label > span,
#atlas.style-minimal .atlas-vert-label > span {
    writing-mode: horizontal-tb; transform: none; text-transform: none; white-space: normal; opacity: 1;
    font-size: calc(20px * var(--at-scale)); font-weight: 800; letter-spacing: -.015em; color: var(--at-title);
    font-family: "Bricolage Grotesque", var(--at-font);
}
#atlas.style-gallery .atlas-vert-label[data-count]::after,
#atlas.style-glass .atlas-vert-label[data-count]::after,
#atlas.style-minimal .atlas-vert-label[data-count]::after {
    content: attr(data-count) " " attr(data-unit); margin-left: auto; flex: none;
    font: 600 11.5px/1 "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: .04em; color: var(--at-icon);
}
#atlas.style-gallery .atlas-group-head,
#atlas.style-glass .atlas-group-head,
#atlas.style-minimal .atlas-group-head {
    background: transparent; color: var(--at-label); box-shadow: none; border-radius: 0;
    padding: 0 0 9px 2px; display: flex; align-items: center; gap: 8px;
    font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: calc(11px * var(--at-scale)); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
#atlas.style-gallery .atlas-group-head::before,
#atlas.style-glass .atlas-group-head::before,
#atlas.style-minimal .atlas-group-head::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--at-accent); opacity: .6; flex: none;
}
#atlas.style-gallery .atlas-title,
#atlas.style-glass .atlas-title,
#atlas.style-minimal .atlas-title,
#atlas.style-rail .atlas-title { font-family: "Bricolage Grotesque", var(--at-font); font-weight: 800; letter-spacing: -.02em; }

/* ============ RAIL — compact directory list ============ */
#atlas.style-rail .atlas-vert { flex-direction: column; gap: 0; margin-bottom: 22px; }
#atlas.style-rail.bands .atlas-vert { background: transparent; border: 0; padding: 0; }
#atlas.style-rail .atlas-vert-label {
    flex: none; align-self: stretch; justify-content: flex-start; height: auto;
    display: flex; align-items: center; gap: 9px; border-right: 0;
    margin: 0 0 10px; padding-bottom: 7px;
    border-bottom: 1px solid color-mix(in srgb, var(--at-label) 20%, transparent);
}
#atlas.style-rail .atlas-vert-label > span {
    writing-mode: horizontal-tb; transform: none; text-transform: uppercase; white-space: normal; opacity: 1;
    letter-spacing: .12em; font-size: calc(12px * var(--at-scale)); font-weight: 700; color: var(--at-title);
    font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
#atlas.style-rail .atlas-vert-label[data-count]::after {
    content: attr(data-count); margin-left: auto; flex: none;
    font: 600 11px/1 "IBM Plex Mono", ui-monospace, monospace; color: var(--at-icon);
}
#atlas.style-rail .atlas-groups { display: block; }
#atlas.style-rail .atlas-group { margin: 0 0 12px; }
#atlas.style-rail .atlas-group:last-child { margin-bottom: 0; }
#atlas.style-rail .atlas-group-head {
    background: transparent; color: var(--at-icon); box-shadow: none; border-radius: 0;
    padding: 4px 2px; font-size: calc(10.5px * var(--at-scale)); font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
}
#atlas.style-rail .atlas-cards { display: flex; flex-direction: column; gap: 0; }
#atlas.style-rail .atlas-card {
    flex: 1 1 auto; width: 100%; min-height: 0; min-width: 0;
    flex-direction: row; align-items: center; justify-content: flex-start; text-align: left;
    gap: 12px; padding: 9px 10px; border: 0; border-radius: calc(var(--at-radius) * .5);
    box-shadow: none; background: transparent;
    border-bottom: 1px solid color-mix(in srgb, var(--at-label) 12%, transparent);
}
#atlas.style-rail .atlas-card:last-child { border-bottom: 0; }
#atlas.style-rail a.atlas-card:hover {
    background: color-mix(in srgb, var(--at-accent) 8%, var(--at-card));
    transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--at-label) 12%, transparent);
}
#atlas.style-rail .atlas-card-icon {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; order: 0;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--at-accent) 12%, var(--at-card)); color: var(--at-accent);
}
#atlas.style-rail .atlas-card-icon svg,
#atlas.style-rail .atlas-card-icon img { width: 17px; height: 17px; }
#atlas.style-rail .atlas-card-label {
    text-align: left; font-size: calc(13.5px * var(--at-scale)); font-weight: 600; flex: 0 1 auto; min-width: 0; order: 1;
    margin-right: auto;   /* pushes tag / badge / info to the right edge even without a subtitle */
}
#atlas.style-rail .atlas-card-sub {
    text-align: left; flex: 1 1 auto; margin: 0 0 0 4px; opacity: .8; order: 2;
    font-size: calc(12px * var(--at-scale));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#atlas.style-rail .atlas-tag { position: static; order: 4; align-self: center; }
#atlas.style-rail .atlas-badge { position: static; order: 5; top: auto; right: auto; }
#atlas.style-rail .atlas-nolink { position: static; order: 6; top: auto; right: auto; }
#atlas.style-rail .atlas-info { position: static; order: 7; top: auto; left: auto; margin-left: 2px; }

/* ============ GALLERY — poster tiles ============ */
#atlas.style-gallery .atlas-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
#atlas.style-gallery .atlas-vert[data-align="grid"] .atlas-cards { grid-template-columns: repeat(var(--at-cols, 4), minmax(0, 1fr)); }
#atlas.style-gallery .atlas-card {
    flex: none; min-width: 0; min-height: 158px; padding: 0; overflow: hidden; position: relative;
    align-items: stretch; justify-content: flex-end; text-align: left;
    border: 1px solid color-mix(in srgb, var(--at-label) 16%, transparent);
    background: linear-gradient(160deg, color-mix(in srgb, var(--at-accent) 26%, var(--at-card)) 0%, var(--at-card) 78%);
}
#atlas.style-gallery .atlas-vert.size-lg .atlas-card { min-height: 190px; }
#atlas.style-gallery .atlas-vert.size-sm .atlas-card { min-height: 128px; }
#atlas.style-gallery .atlas-card-icon {
    position: absolute; left: 0; right: 0; top: 8%; bottom: 40%; order: 0;
    display: grid; place-items: center; z-index: 0;
    color: color-mix(in srgb, var(--at-accent) 78%, var(--at-title)); opacity: .92;
}
#atlas.style-gallery .atlas-card-icon svg,
#atlas.style-gallery .atlas-card-icon img { width: 48px; height: 48px; }
#atlas.style-gallery .atlas-card::before {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 58%; z-index: 1;
    background: linear-gradient(to top, color-mix(in srgb, var(--at-card) 90%, #000) 60%, transparent);
}
#atlas.style-gallery .atlas-card-label,
#atlas.style-gallery .atlas-card-sub { position: relative; z-index: 2; width: 100%; text-align: left; padding: 0 13px; }
#atlas.style-gallery .atlas-card-label {
    font-family: "Bricolage Grotesque", var(--at-font); font-weight: 700;
    font-size: calc(15px * var(--at-scale)); padding-bottom: 4px;
}
#atlas.style-gallery .atlas-card-sub { padding-bottom: 13px; opacity: .78; font-size: calc(12px * var(--at-scale)); }
#atlas.style-gallery .atlas-tag { position: relative; z-index: 2; align-self: flex-start; margin: 0 13px 12px; }
#atlas.style-gallery a.atlas-card:hover {
    transform: translateY(-3px); border-color: color-mix(in srgb, var(--at-accent) 50%, transparent);
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
}

/* ============ GLASS — frosted translucent cards ============ */
#atlas.style-glass .atlas-card {
    align-items: flex-start; text-align: left; justify-content: flex-start; padding: 16px; gap: 12px; min-height: 0;
    background: color-mix(in srgb, var(--at-card) 52%, transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--at-title) 16%, transparent);
    box-shadow: 0 6px 22px rgba(0,0,0,.20), inset 0 1px 0 color-mix(in srgb, var(--at-title) 14%, transparent);
}
#atlas.style-glass .atlas-vert.size-lg .atlas-card { padding: 20px; }
#atlas.style-glass .atlas-card-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--at-accent) 20%, transparent); color: var(--at-accent);
    transition: background .15s var(--ac-ease, ease), color .15s ease;
}
#atlas.style-glass .atlas-card-icon svg,
#atlas.style-glass .atlas-card-icon img { width: 23px; height: 23px; }
#atlas.style-glass .atlas-vert.size-lg .atlas-card-icon { width: 52px; height: 52px; border-radius: 14px; }
#atlas.style-glass .atlas-vert.size-lg .atlas-card-icon svg,
#atlas.style-glass .atlas-vert.size-lg .atlas-card-icon img { width: 27px; height: 27px; }
#atlas.style-glass .atlas-card-label,
#atlas.style-glass .atlas-card-sub { text-align: left; }
#atlas.style-glass a.atlas-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--at-accent) 55%, transparent);
    box-shadow: 0 12px 34px rgba(0,0,0,.30), 0 0 0 1px color-mix(in srgb, var(--at-accent) 38%, transparent),
                0 0 22px color-mix(in srgb, var(--at-accent) 28%, transparent);
}
#atlas.style-glass a.atlas-card:hover .atlas-card-icon { background: var(--at-accent); color: #fff; }

/* ============ MINIMAL — flat, borderless ============ */
#atlas.style-minimal .atlas-card { background: transparent; border: 0; box-shadow: none; padding: 14px 8px; }
#atlas.style-minimal .atlas-card.no-link { background: transparent; border: 0; }
#atlas.style-minimal a.atlas-card:hover {
    background: color-mix(in srgb, var(--at-title) 5%, transparent);
    transform: none; box-shadow: none; border: 0;
}
#atlas.style-minimal .atlas-card-icon { color: var(--at-accent); }
#atlas.style-minimal .atlas-card-label { font-weight: 600; }
