/* CTF Atlas (/ctf-atlas/): list on the left, 3D Earth on the right.

   The list side is built on ctf7.css tokens (surfaces, lines, orange
   primary, green accent, site fonts), so it follows the dark and
   [data-theme="light"] site themes like /careers/ and /pathways/. Only the
   globe stage keeps a dark space backdrop in both themes; its canvas-side
   pieces (projected labels, the "space" gradient) pin the dark tokens they
   need, while its overlays (legend, HUD, control pills, tooltip) use the
   theme's own surface. */

.atlas {
  /* Format-family colours, shared by the list dots and the legend. The
     globe draws the same hues (and shades of them in a crowd). */
  --a-jeopardy: #fd9a33;
  --a-ad: #34f55b;
  --a-quest: #d9c08a;
  --a-other: #bcc7c0;
  --a-glass: rgba(var(--surface-rgb), .78);
  --a-space: #030605;
  position: relative;
  display: grid;
  grid-template-columns: clamp(380px, 32%, 520px) minmax(0, 1fr);
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  min-height: 600px;
  max-height: 1180px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
[data-theme="light"] .atlas {
  --a-jeopardy: #e8730c;
  --a-ad: #16a34a;
  --a-quest: #a8863f;
  --a-other: #8a7f76;
}

/* ---------- Left panel ---------- */
.atlas-panel {
  position: relative;
  z-index: 2;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.25rem 1rem 1.5rem max(16px, min(calc((100vw - 1320px) / 2 + 12px), 32px));
  border-right: 1px solid var(--line);
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--ink-rgb), .18) transparent;
}
.atlas-head { margin-bottom: .9rem; }
.atlas-head h1 { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.2; margin: 0 0 .25rem; color: var(--heading); }
.atlas-sub { font-size: .9rem; color: var(--text-2); margin: 0 0 .45rem; }
.atlas-stats { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); margin: 0; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.atlas-stats strong { color: var(--heading); font-weight: 600; }

.atlas-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green-glow); animation: atlas-pulse 1.8s infinite; flex-shrink: 0; vertical-align: middle; }
.atlas-pulse.is-idle { background: var(--muted); animation: none; }
@keyframes atlas-pulse { 0% { box-shadow: 0 0 0 0 var(--green-glow); } 70% { box-shadow: 0 0 0 8px rgba(52, 245, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 245, 91, 0); } }

/* Filters stay at the top of the panel while the list scrolls. */
.atlas-filters {
  position: sticky;
  top: -1.25rem;
  z-index: 3;
  margin: 0 -.5rem .5rem;
  padding: 1.25rem .5rem .7rem;
  display: grid;
  gap: .5rem;
  background: var(--bg);
  box-shadow: 0 12px 14px -12px rgba(var(--bg-rgb), .95);
}
.atlas-search { position: relative; }
.atlas-search .bi { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.atlas-search input,
.atlas-selects select {
  width: 100%;
  font: inherit;
  font-size: .88rem;
  color: var(--heading);
  background-color: rgba(var(--ink-rgb), .03);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: .52rem .8rem;
  min-width: 0;
}
.atlas-search input { padding-left: 2.2rem; }
.atlas-search input::placeholder { color: var(--muted); }
.atlas-search input:focus, .atlas-selects select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-glow); }
.atlas-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.atlas-selects select {
  appearance: none;
  padding-right: 1.7rem;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238d9b93' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
  cursor: pointer;
}
.atlas-selects option { background: var(--surface); color: var(--heading); }
.atlas-seg { display: flex; gap: .35rem; margin: 0; padding: 0; border: 0; min-width: 0; flex-wrap: wrap; }
.atlas-chip { position: relative; cursor: pointer; }
.atlas-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.atlas-chip > span { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .32rem .8rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); background: rgba(var(--ink-rgb), .03); transition: background .15s, border-color .15s, color .15s; }
.atlas-chip:hover > span { color: var(--heading); border-color: rgba(var(--ink-rgb), .28); }
.atlas-chip input:checked + span { color: var(--on-orange); background: var(--orange-fill); border-color: var(--orange-fill); }
.atlas-chip input:checked + span .atlas-pulse { background: var(--on-orange); animation: none; }
.atlas-chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.atlas-apply { display: flex; align-items: center; gap: .8rem; }
.atlas-btn { font: inherit; font-size: .82rem; font-weight: 600; color: var(--on-orange); background: var(--orange-fill); border: 1px solid var(--orange-fill); border-radius: var(--radius-sm); padding: .42rem .95rem; cursor: pointer; }
.atlas-btn:hover { filter: brightness(1.08); }
.atlas-clear { font-size: .8rem; font-weight: 600; }
html:not(.no-js) .atlas-btn { display: none; }
html:not(.no-js) .atlas-apply:not(:has(.atlas-clear:not([hidden]))) { display: none; }

/* ---------- List ---------- */
.atlas-group { margin-top: .6rem; }
.atlas-gh { display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: .4rem 0 .5rem; }
.atlas-n { font-size: .68rem; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .05rem .45rem; letter-spacing: 0; }
.atlas-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.atlas-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .7rem;
  padding: .7rem .75rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
[data-theme="light"] .atlas-card { box-shadow: 0 1px 2px rgba(60, 35, 10, .05); }
.atlas-card:hover, .atlas-card:focus-within { background: var(--surface-2); border-color: var(--line-2); }
.atlas-card.is-live { border-color: var(--line-green); }
.atlas-card.is-selected { border-color: var(--orange); box-shadow: 0 0 0 1px var(--line-orange), 0 10px 30px -14px var(--orange-glow); }
.atlas-card.is-flash { animation: atlas-flash 1.2s ease-out; }
@keyframes atlas-flash { 0% { box-shadow: 0 0 0 4px var(--orange-glow); } 100% { box-shadow: 0 0 0 1px var(--line-orange); } }
.atlas-card.is-hosted { box-shadow: inset 3px 0 0 var(--green); }
.atlas-card.is-hosted.is-selected { box-shadow: inset 3px 0 0 var(--green), 0 0 0 1px var(--line-orange); }
.atlas-ended .atlas-card { opacity: .72; }
.atlas-logo { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 1.1rem; }
.atlas-logo img { width: 100%; height: 100%; object-fit: cover; }
.atlas-card.is-hosted .atlas-logo { color: var(--green); border-color: var(--line-green); }
.atlas-body { min-width: 0; }
.atlas-top { display: flex; align-items: flex-start; gap: .5rem; }
.atlas-title { flex: 1 1 auto; min-width: 0; font-family: var(--font-body); font-size: .98rem; font-weight: 700; line-height: 1.3; margin: 0; color: var(--heading); overflow-wrap: anywhere; }
.atlas .atlas-title a { color: var(--heading); text-decoration: none; }
.atlas .atlas-title a:hover { color: var(--orange); }
.atlas-locate { flex-shrink: 0; width: 28px; height: 28px; margin: -.2rem -.3rem 0 0; display: none; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; }
.atlas-locate:hover, .atlas-locate:focus-visible { color: var(--orange); border-color: var(--line-orange); background: rgba(253, 154, 51, .08); }
.atlas.is-3d .atlas-locate { display: grid; }
.atlas-when { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; margin: .25rem 0 .35rem; font-size: .78rem; color: var(--text-2); }
.atlas-count { font-family: var(--font-mono); font-size: .74rem; color: var(--heading); }
.atlas-card.is-live .atlas-count { color: var(--green); }
.atlas-card.is-ended .atlas-count { color: var(--muted); }
.atlas-live { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-mono); font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); background: rgba(52, 245, 91, .1); border: 1px solid var(--line-green); border-radius: 6px; padding: .08rem .38rem; }
.atlas-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: atlas-pulse 1.8s infinite; }
.atlas-dates { color: var(--muted); }
.atlas-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.atlas-meta .atlas-fmt { cursor: help; }
.atlas-meta li { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; font-family: var(--font-mono); color: var(--text-2); background: rgba(var(--ink-rgb), .05); border: 1px solid var(--line); border-radius: 8px; padding: .14rem .5rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-meta .atlas-hosted { color: var(--green); background: rgba(52, 245, 91, .1); border-color: var(--line-green); }
.atlas-meta .atlas-onsite { color: var(--orange); }
.atlas-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--a-other); display: inline-block; }
[data-group="jeopardy"] > .atlas-dot, .atlas-dot[data-group="jeopardy"] { background: var(--a-jeopardy); }
[data-group="ad"] > .atlas-dot, .atlas-dot[data-group="ad"] { background: var(--a-ad); }
[data-group="quest"] > .atlas-dot, .atlas-dot[data-group="quest"] { background: var(--a-quest); }
[data-group="other"] > .atlas-dot, .atlas-dot[data-group="other"] { background: var(--a-other); }
/* Attack-Defense is a diamond everywhere, as on the globe. */
[data-group="ad"] > .atlas-dot, .atlas-dot[data-group="ad"]:not(.atlas-shades) { border-radius: 1px; transform: rotate(45deg) scale(.88); }
.atlas-org { margin: .35rem 0 0; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.atlas-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .4rem 0 0; font-size: .8rem; font-weight: 600; }
.atlas-links a { text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.atlas-links .bi { font-size: .68rem; }
.atlas-ended summary { cursor: pointer; list-style: none; padding: .35rem 0; }
.atlas-ended summary::-webkit-details-marker { display: none; }
.atlas-ended summary .bi { transition: transform .2s; }
.atlas-ended[open] summary .bi { transform: rotate(180deg); }
.atlas-note { font-size: .76rem; color: var(--muted); margin: .5rem 0 0; }
.atlas-empty { text-align: center; padding: 2rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--radius); margin-top: .6rem; color: var(--text-2); font-size: .9rem; background: var(--surface); }
.atlas-empty > .bi { font-size: 1.6rem; color: var(--muted); }
.atlas-empty-h { font-weight: 700; color: var(--heading); margin: .4rem 0 .2rem; font-size: .98rem; }
.atlas-empty-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: .6rem 0 0; font-weight: 600; }
.atlas-foot { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.atlas-foot p { margin: 0 0 .6rem; }
.atlas-foot-cta { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .84rem; font-weight: 600; }
.atlas-foot-cta a { text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }

/* ---------- Stage ---------- */
.atlas-stage {
  position: relative; min-width: 0; min-height: 0; overflow: hidden; container-type: size;
  background:
    radial-gradient(ellipse 60% 70% at 55% 48%, rgba(31, 120, 60, .16) 0%, rgba(6, 30, 18, .12) 40%, transparent 70%),
    radial-gradient(ellipse at 20% 0%, #08120c 0%, transparent 60%),
    var(--a-space);
}
.atlas-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .8s ease; outline: none; touch-action: none; }
.atlas-stage.is-ready .atlas-canvas { opacity: 1; }
.atlas-stage.is-ready .atlas-canvas.is-grab { cursor: grab; }
.atlas-stage.is-ready .atlas-canvas.is-point { cursor: pointer; }
.atlas-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* Planet shown while loading, without JS and when WebGL is missing. */
.atlas-planet {
  position: absolute; left: 50%; top: 50%;
  width: 60%; width: min(72cqw, 72cqh);
  aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #23627e 0%, #0e3550 45%, #061a28 72%, #030c14 100%);
  box-shadow: 0 0 0 1px rgba(52, 245, 91, .12), 0 0 70px 6px rgba(52, 245, 91, .14), 0 0 180px 40px rgba(20, 110, 50, .12);
  transition: opacity .8s ease;
}
.atlas-planet span { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .1) 0%, transparent 38%, rgba(0, 0, 0, .55) 74%, rgba(0, 0, 0, .8) 100%); }
.atlas-stage.is-loading .atlas-planet { animation: atlas-breathe 2.4s ease-in-out infinite; }
@keyframes atlas-breathe { 50% { opacity: .55; } }
.atlas-stage.is-ready .atlas-planet { opacity: 0; animation: none; pointer-events: none; }
.no-js .atlas-planet, .atlas-stage.is-fallback .atlas-planet {
  opacity: 1;
  animation: atlas-drift 120s linear infinite;
  background: url("../vendor/earth/earth-day.webp") 0 50% / 200% 100% repeat-x, #0e3550;
}
@keyframes atlas-drift { to { background-position: -200% 50%; } }

/* Overlays on the stage: the site's own surface, in either theme. */
.atlas-controls { position: absolute; top: 1rem; right: 1rem; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; z-index: 3; }
.atlas-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  font: inherit; font-size: .78rem; font-weight: 600; color: var(--text);
  padding: .42rem .85rem; border-radius: 999px;
  background: var(--a-glass); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.atlas-pill:hover { border-color: var(--orange); color: var(--heading); }
.atlas-pill:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.atlas-pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transition: background .15s, box-shadow .15s; }
.atlas-pill.is-on .atlas-pill-dot { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }

.atlas-legend { position: absolute; left: 1rem; bottom: 1rem; list-style: none; margin: 0; padding: .6rem .85rem; display: grid; gap: .32rem; font-size: .74rem; color: var(--text-2); background: var(--a-glass); border: 1px solid var(--line-2); border-radius: var(--radius-sm); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 3; }
.atlas-legend li { display: flex; align-items: center; gap: .5rem; }
.atlas-lg-note { color: var(--muted); }
.atlas-lg-live { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--green); box-shadow: 0 0 8px var(--green-glow); }
.atlas-lg-ring { position: relative; width: 13px; height: 13px; flex-shrink: 0; background: #34f55b; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.atlas-lg-ring::after { content: ""; position: absolute; inset: 3px; background: #fff; clip-path: inherit; }
.atlas-lg-hosted { color: var(--heading); font-weight: 600; }
.atlas-lg-cluster { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 241, 220, .95) 0 22%, rgba(255, 241, 220, .25) 23% 60%, transparent 62%); border: 1px solid rgba(255, 241, 220, .6); }
[data-theme="light"] .atlas-lg-cluster { background: radial-gradient(circle, #6a5f57 0 22%, rgba(106, 95, 87, .2) 23% 60%, transparent 62%); border-color: rgba(106, 95, 87, .5); }
/* "Shades": the legend dot shows three shades of its family. */
.atlas-legend .atlas-dot.atlas-shades { width: 18px; height: 8px; border-radius: 4px; }
.atlas-legend .atlas-dot.atlas-shades[data-group="jeopardy"] { background: linear-gradient(90deg, #fd9a33 0 33%, #ff7a1a 33% 66%, #ffc670 66%); }
.atlas-legend .atlas-dot.atlas-shades[data-group="ad"] { background: linear-gradient(90deg, #34f55b 0 33%, #1fd14a 33% 66%, #a4ffb6 66%); }
.atlas-legend .atlas-dot.atlas-shades[data-group="quest"] { background: linear-gradient(90deg, #d9c08a 0 33%, #b89a5c 33% 66%, #f0e0b8 66%); }
.atlas-legend .atlas-dot.atlas-shades[data-group="other"] { background: linear-gradient(90deg, #bcc7c0 0 33%, #8d9b93 33% 66%, #e9f1eb 66%); }
.atlas-legend li[title] { cursor: help; }
.atlas-stage.is-fallback .atlas-legend, .no-js .atlas-legend { display: none; }

.atlas-hud {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .6rem; margin: 0;
  max-width: calc(100% - 2rem);
  padding: .45rem .95rem; border-radius: 999px;
  background: var(--a-glass); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: .76rem; color: var(--text); white-space: nowrap; z-index: 3;
}
.atlas-hud::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green-glow); flex-shrink: 0; }
.atlas-hud-k { color: var(--green); letter-spacing: .06em; text-transform: uppercase; font-size: .7rem; font-weight: 600; }
.atlas-hud-v { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.atlas-stage:has(.atlas-legend) .atlas-hud { left: auto; right: 1rem; transform: none; }

.atlas-fallback-msg { position: absolute; left: 50%; top: 1rem; transform: translateX(-50%); width: min(420px, calc(100% - 2rem)); margin: 0; text-align: center; font-size: .82rem; color: var(--text-2); background: var(--a-glass); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .6rem .9rem; z-index: 3; }
.atlas-savedata p { margin: 0 0 .5rem; }
.atlas-savedata[hidden] { display: none; }

/* Pill labels projected onto the globe: always dark, they sit on the
   planet itself. */
.atlas-label {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .26rem .6rem .26rem .5rem; border-radius: 999px;
  background: rgba(6, 9, 7, .78); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .8);
  font-family: var(--font-body); font-size: .72rem; line-height: 1.2; color: #fff; white-space: nowrap;
  will-change: transform, opacity; transition: opacity .25s ease;
}
.atlas-label.is-hidden { opacity: 0; }
.atlas-label .atlas-dot { width: 7px; height: 7px; }
.atlas-label .atlas-dot[data-group="jeopardy"] { background: #fd9a33; }
.atlas-label .atlas-dot[data-group="ad"] { background: #34f55b; }
.atlas-label .atlas-dot[data-group="quest"] { background: #d9c08a; }
.atlas-label .atlas-dot[data-group="other"] { background: #bcc7c0; }
.atlas-label.is-hosted .atlas-dot { background: #fff; }
.atlas-label-t { max-width: 170px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.atlas-label-m { color: #a6b4ac; font-family: var(--font-mono); font-size: .66rem; }
.atlas-label.is-live { border-color: rgba(52, 245, 91, .5); }
.atlas-label.is-live .atlas-label-m { color: #34f55b; }
/* CTF7's own events: logo-green outline and a hexagon CTF7 chip. */
.atlas-label.is-hosted { border-color: rgba(52, 245, 91, .8); background: rgba(4, 20, 9, .88); box-shadow: 0 0 0 1px rgba(52, 245, 91, .22), 0 6px 18px -8px rgba(0, 0, 0, .8); }
.atlas-label-b { font-family: var(--font-mono); font-size: .6rem; font-weight: 700; letter-spacing: .04em; color: #04110a; background: #34f55b; padding: .08rem .5rem; clip-path: polygon(12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%, 0 50%); }
/* Cluster count badge. */
.atlas-crowd { background: rgba(14, 12, 9, .84); border-color: rgba(255, 241, 220, .45); padding: .24rem .65rem .24rem .45rem; }
.atlas-crowd .atlas-label-t { max-width: 200px; font-weight: 700; }
.atlas-crowd-i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle, #fff1dc 0 30%, rgba(255, 241, 220, .25) 32% 100%); }
.atlas-crowd.is-open { border-color: rgba(255, 241, 220, .85); }

.atlas-tip {
  position: absolute; left: 0; top: 0; z-index: 4;
  width: max-content; max-width: 290px;
  padding: .7rem .85rem; border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), .94); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  color: var(--text); font-size: .78rem; pointer-events: none;
}
.atlas-tip-t { font-weight: 700; font-size: .88rem; color: var(--heading); margin: 0 0 .25rem; overflow-wrap: anywhere; }
.atlas-tip-s { font-family: var(--font-mono); font-size: .72rem; color: var(--orange); margin: 0 0 .2rem; }
.atlas-tip-s.is-live { color: var(--green); }
.atlas-tip-m { color: var(--text-2); margin: 0; }
.atlas-tip-h { color: var(--muted); margin: .35rem 0 0; font-size: .7rem; }
.atlas-tip-list { list-style: none; margin: .1rem 0 .2rem; padding: 0; display: grid; gap: .2rem; }
.atlas-tip-list li { display: flex; align-items: center; gap: .45rem; color: var(--text); min-width: 0; }
.atlas-tip-list li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.atlas-tip-list li.is-hosted { color: var(--green); font-weight: 600; }
.atlas-tip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(var(--ink-rgb), .2); }

/* ---------- Phone and tablet: globe on top, list below ---------- */
@media (max-width: 991.98px) {
  .atlas { display: flex; flex-direction: column; height: auto; min-height: 0; max-height: none; }
  .atlas-stage { order: -1; height: 55vh; height: 55svh; min-height: 340px; max-height: 620px; flex: 0 0 auto; border-bottom: 1px solid var(--line); }
  .atlas-panel { overflow: visible; border-right: 0; padding: 1rem 16px 2rem; }
  .atlas-filters { position: static; margin: 0 0 .4rem; padding: 0; background: none; box-shadow: none; }
  .atlas-controls { top: .6rem; right: .6rem; gap: .3rem; }
  .atlas-pill { font-size: .7rem; padding: .34rem .62rem; }
  .atlas-legend { left: .6rem; bottom: .6rem; font-size: .66rem; padding: .4rem .6rem; gap: .2rem; }
  .atlas-hud { bottom: .6rem; font-size: .68rem; padding: .36rem .75rem; }
  .atlas-stage:has(.atlas-legend) .atlas-hud { right: .6rem; max-width: calc(100% - 11rem); }
  .atlas-tip { max-width: 230px; }
}
@media (max-width: 575.98px) {
  .atlas-hud-k { display: none; }
  .atlas-pill { padding: .32rem .55rem; }
  .atlas-lg-note { display: none; }
  .atlas-legend { grid-template-columns: auto auto; column-gap: .7rem; max-width: calc(100% - 1.2rem); bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-pulse, .atlas-live::before, .atlas-stage.is-loading .atlas-planet, .no-js .atlas-planet, .atlas-stage.is-fallback .atlas-planet, .atlas-card.is-flash { animation: none; }
  .atlas-canvas, .atlas-planet, .atlas-label { transition: none; }
}
