/* Attractor — shared layer for every explorable page (loads after each page's own <style>). */
:root {
  --atlas-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --atlas-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
html, body { font-family: var(--atlas-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { letter-spacing: .01em; }
h1 { letter-spacing: -.012em; }
code, kbd, .stat-value, .ctrl span { font-family: var(--atlas-mono); }
::selection { background: rgba(135, 134, 238, .45); }

/* ---------- sliders: filled track in the realm color ---------- */
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 22px; background: transparent; cursor: pointer; vertical-align: middle; accent-color: var(--realm, #B9B8FC);
}
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 999px;
  background: linear-gradient(90deg, var(--realm, #B9B8FC) 0, var(--realm, #B9B8FC) var(--p, 50%), rgba(185, 184, 252, .18) var(--p, 50%), rgba(185, 184, 252, .18) 100%);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%;
  background: #F5F5FF; border: 2px solid var(--realm, #8786EE); box-shadow: 0 0 0 4px rgba(135, 134, 238, .16), 0 2px 8px rgba(0, 0, 0, .45);
  transition: transform .15s, box-shadow .15s;
}
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.12); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(135, 134, 238, .38), 0 2px 8px rgba(0, 0, 0, .45); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(185, 184, 252, .18); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--realm, #B9B8FC); }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #F5F5FF; border: 2px solid var(--realm, #8786EE); box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }

/* ---------- buttons & selects ---------- */
button { border-radius: 10px; transition: filter .15s, transform .08s, border-color .15s, background .15s; }
button:hover { filter: brightness(1.2); }
button:active { transform: scale(.97); }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--realm, #B9B8FC); outline-offset: 2px; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 28px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23B9B8FC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 11px;
}
select option { background: #13133D; color: #EBEBFF; }

/* ---------- atlas bar (replaces each page's minimal nav) ---------- */
.nav.atlas-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; font-size: 13px; color: rgba(235, 235, 255, .5); }
.atlas-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #EBEBFF !important; font-weight: 600; font-size: 14px; }
.atlas-mark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #6057C7, #231f63); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.atlas-sep { opacity: .35; }
.atlas-crumb { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.atlas-crumb a { color: rgba(235, 235, 255, .62) !important; text-decoration: none; white-space: nowrap; }
.atlas-crumb a:hover { color: #EBEBFF !important; }
.atlas-crumb .atlas-realm { color: var(--realm, #B9B8FC) !important; }
.atlas-spacer { flex: 1; }
.atlas-nb {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 10px; max-width: 230px;
  border: 1px solid rgba(185, 184, 252, .15); background: rgba(255, 255, 255, .04); color: #EBEBFF !important; text-decoration: none; font-size: 12.5px;
  transition: background .15s, border-color .15s;
}
.atlas-nb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-nb:hover { background: rgba(135, 134, 238, .16); border-color: rgba(185, 184, 252, .32); }
@media (max-width: 680px) { .atlas-nb span, .atlas-crumb .atlas-section, .atlas-crumb .atlas-sep { display: none; } }

.atlas-float {
  position: fixed; left: 14px; top: 14px; z-index: 1000; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 8px; border-radius: 14px;
  background: rgba(10, 8, 32, .62); border: 1px solid rgba(185, 184, 252, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--atlas-font); font-size: 13px; color: #EBEBFF;
}

/* ---------- keep exploring ---------- */
.atlas-more { margin-top: 56px; padding-top: 30px; border-top: 1px solid rgba(185, 184, 252, .12); font-family: var(--atlas-font); }
.atlas-more-kicker { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--realm, #B9B8FC); }
.atlas-more h2 { margin: 0 0 18px; font-size: 22px; line-height: 1.3; font-weight: 600; color: #EBEBFF; }
.atlas-journeys { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.atlas-journeys a {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 999px; text-decoration: none; font-size: 13px;
  color: #EBEBFF !important; border: 1px solid rgba(185, 184, 252, .16); background: rgba(255, 255, 255, .03); transition: border-color .15s, background .15s;
}
.atlas-journeys a:hover { border-color: var(--jc); background: rgba(135, 134, 238, .1); }
.atlas-journeys a i { width: 16px; height: 3px; border-radius: 3px; background: var(--jc); flex: 0 0 auto; }
.atlas-journeys a b { font-weight: 600; }
.atlas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.atlas-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; text-decoration: none; color: #EBEBFF !important;
  border: 1px solid rgba(185, 184, 252, .12); background: rgba(20, 18, 60, .55); transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s;
}
.atlas-card:hover { transform: translateY(-3px); border-color: var(--c); }
.atlas-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #050416; }
.atlas-card span { display: block; padding: 10px 12px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.atlas-card small { display: block; margin-top: 3px; font-size: 11px; font-weight: 500; color: var(--c); font-family: var(--atlas-mono); letter-spacing: 0; }
.atlas-more-foot { margin: 22px 0 0; font-size: 12.5px; color: rgba(235, 235, 255, .42); }
.atlas-more-foot a { color: #8786EE !important; }
@media (max-width: 860px) { .atlas-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- embedded in the atlas viewer ---------- */
html.atlas-embedded .nav, html.atlas-embedded .atlas-float { display: none !important; }
html.atlas-embedded .wrap { padding-top: 26px !important; }

/* ---------- thumbnail capture mode ---------- */
html.atlas-capture .nav, html.atlas-capture .atlas-float, html.atlas-capture .atlas-more { display: none !important; }
html.atlas-capture ::-webkit-scrollbar { display: none; }
