/* ============================================================
   Noetic — Compute Network
   Palette   void #04070F · panel-ink rgba(8,15,30,.78)
             cobalt #2F6BFF · ice #E6F1FF · amber #FFB65C · slate #64748E
   Type      Suisse Intl → Space Grotesk fallback (display)
             Anka Coder → IBM Plex Mono fallback (data)
   ============================================================ */

/* Licensed brand fonts (local). Google fonts remain as loading fallbacks. */
@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Suisse Intl";
  src: url("../fonts/SuisseIntl-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Anka Coder";
  src: url("../fonts/AnkaCoder-b.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --void: #04070F;
  --ink: rgba(8, 15, 30, 0.78);
  --line: rgba(120, 150, 200, 0.16);
  --cobalt: #2F6BFF;
  --ice: #E6F1FF;
  --amber: #FFB65C;
  --slate: #64748E;
  --display: "Suisse Intl", "Space Grotesk", system-ui, sans-serif;
  --mono: "Anka Coder", "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--void);
  color: var(--ice);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }
.hidden { opacity: 0 !important; pointer-events: none !important; }

/* ---------- parallax background + starfield ---------- */
/* #bg is oversized and translated by JS so edges never show while it drifts.
   Opacity is driven by JS during intro (0 → 0.35 → 1 over 1200ms). */
#bg {
  position: fixed; inset: -3%;
  background: url("../assets/bg-space.png") center / cover no-repeat;
  will-change: transform, opacity;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease-out;
}
/* Left / right nebula bleed — same dual radials as noetic-landing-v1 */
#bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(0, 60, 220, 0.35), transparent 70%),
    radial-gradient(55% 60% at 100% 100%, rgba(0, 40, 180, 0.3), transparent 70%);
  opacity: 0;
  transition: opacity 1.2s ease-out;
  will-change: opacity;
}

#stars { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
/* Each layer is a 2px dot whose box-shadow carries all its stars (set by JS).
   Layers twinkle at different rates; data-depth drives parallax strength. */
.star-layer {
  position: absolute; top: 0; left: 0;
  width: 2px; height: 2px; border-radius: 50%;
  background: transparent;
  will-change: transform, opacity;
}
.star-layer:nth-child(1) { animation: twinkle 7.5s ease-in-out infinite; }
.star-layer:nth-child(2) { animation: twinkle 5s   ease-in-out infinite 1.2s; }
.star-layer:nth-child(3) { animation: twinkle 3.4s ease-in-out infinite 0.5s; }

/* A handful of individually timed bright stars for irregular sparkle */
#star-sparks { position: absolute; inset: 0; will-change: transform; }
.spark {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 6px 1px rgba(230, 241, 255, 0.7);
  animation: sparkle var(--dur, 4s) ease-in-out infinite var(--delay, 0s);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes sparkle {
  0%, 100% { opacity: 0.1; transform: scale(0.7); }
  50%      { opacity: 1;   transform: scale(1); }
}

#stage, #labels { position: fixed; inset: 0; }
#stage { z-index: 2; }
#stage canvas { display: block; }
#labels { pointer-events: none; z-index: 3; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: var(--void);
  transition: opacity 0.6s ease;
}
.loader-mark { display: block; height: 18px; width: auto; opacity: 0.85; }
.loader-bar { width: 180px; height: 1px; background: rgba(120,150,200,0.2); }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--cobalt); transition: width 0.2s; }
.loader-pct { font-size: 11px; color: var(--slate); }

/* ---------- brand / footer ---------- */
#brand {
  position: fixed; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px;
  pointer-events: none;
}
.brand-logo { display: block; height: 20px; width: auto; pointer-events: auto; }
.brand-tag {
  font-size: 14px; letter-spacing: -0.42px;
  color: rgba(255, 255, 255, 0.6);
}

#site-footer {
  position: fixed; inset: auto 0 0; z-index: 5;
  padding: 24px;
  pointer-events: none;
}
.footer-landing, .footer-explore {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
/* reference Footer: gap-1.5 + opacity-60 wrapper, FEED text is solid white inside */
.footer-feed {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; letter-spacing: -0.42px;
  color: #fff; opacity: 0.6;
}
.feed-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #46ff6b;
  animation: pulse-dot 2s ease-in-out infinite;
}
.footer-api {
  font-size: 14px; letter-spacing: -0.42px;
  color: rgba(255, 255, 255, 0.6);
}
.footer-explore {
  font-size: 10.5px; letter-spacing: 0.12em; color: var(--slate);
}
#credit { letter-spacing: 0.06em; color: rgba(100, 116, 142, 0.55); }
/* landing shows FEED CONNECTED footer; explore shows interaction hint + credit */
body.landing .footer-explore,
body:not(.landing) .footer-landing { display: none; }
body.commit #site-footer { display: none; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- chrome pills (match Commit / landing CTA) ---------- */
#btn-back,
#viewctl button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border: none; border-radius: 100px;
  background: #0055ff; color: #fff;
  font-family: var(--display); font-size: 14px; font-weight: 500;
  letter-spacing: -0.32px; cursor: pointer;
  transition: background-color 0.15s;
}
#btn-back:hover,
#viewctl button:hover { background: #2266ff; color: #fff; }
#viewctl button.busy { background: #1a4fcc; pointer-events: none; }
#viewctl svg { flex: none; }
@media (min-width: 1024px) {
  #btn-back,
  #viewctl button { height: 44px; padding: 0 20px; font-size: 15px; }
}

/* ---------- view controls ---------- */
#viewctl {
  position: fixed; right: 32px; bottom: 64px; z-index: 6;
  display: flex; flex-direction: column; gap: 8px;
}

/* ---------- region panel (glass card, aligned with commit panel) ---------- */
#panel {
  position: fixed; top: 50%; right: 24px; z-index: 6;
  transform: translateY(-50%);
  width: min(360px, 90vw); max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  color: var(--ice);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}
#panel.hidden { transform: translateY(calc(-50% + 12px)); }

.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 0; border: none;
}
.panel-eyebrow {
  font-size: 14px; letter-spacing: -0.42px; line-height: 1;
  color: rgba(255, 255, 255, 0.4); margin-bottom: 10px;
}
.panel-title {
  font-family: var(--display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.32px; line-height: 1.15;
}
#panel-close {
  flex: none; width: 32px; height: 32px; margin-top: 2px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.6);
  font-size: 12px; cursor: pointer; visibility: hidden;
  transition: background 0.15s, color 0.15s;
}
#panel.locked #panel-close { visibility: visible; }
#panel-close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

.panel-stats {
  display: flex; flex-direction: column; gap: 12px;
  border: none;
}
.stat {
  display: flex; align-items: baseline; gap: 0; padding: 0;
  font-family: var(--mono); font-size: 15px; letter-spacing: -0.48px;
}
.stat + .stat { border: none; }
.stat-k {
  width: 110px; flex: none; margin: 0;
  font-size: inherit; letter-spacing: inherit;
  color: rgba(255, 255, 255, 0.6); text-transform: lowercase;
}
.stat-v { font-size: inherit; font-weight: 400; color: #85b5ff; }

.panel-tabs {
  display: flex; gap: 6px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.panel-tab {
  flex: 1; height: 32px; padding: 0 12px;
  border: none; border-radius: 999px;
  background: transparent; color: rgba(255, 255, 255, 0.45);
  font-family: var(--display); font-size: 13px; font-weight: 500;
  letter-spacing: -0.28px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.panel-tab:hover { color: rgba(255, 255, 255, 0.75); }
.panel-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.panel-list {
  overflow-y: auto; padding: 0; margin: 0 -4px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(100,116,142,.4) transparent;
}
.row {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 12px; align-items: baseline;
  padding: 6px 8px; border-radius: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: -0.42px;
}
.row .iso { color: rgba(255, 255, 255, 0.4); font-size: inherit; letter-spacing: inherit; }
.row .cname { color: var(--ice); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: inherit; }
.row .val { color: #85b5ff; font-size: inherit; }
.row.hot { background: rgba(255, 255, 255, 0.06); }
.row.hot .val { color: #85b5ff; }
.row.row-device {
  grid-template-columns: 1fr auto;
}
.row .dname {
  color: var(--ice); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- tooltip (landing-card chrome, cursor-following) ---------- */
#tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  min-width: 180px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(150deg, rgba(16, 30, 58, 0.95), rgba(6, 12, 26, 0.92));
  border: 1px solid rgba(96, 143, 255, 0.5);
  box-shadow:
    0 0 40px rgba(50, 105, 255, 0.22),
    inset 0 0 24px rgba(70, 120, 255, 0.06);
  backdrop-filter: none;
  transition: opacity 0.12s;
}
.tt-name {
  font-family: var(--display); font-size: 16px; font-weight: 400;
  color: #fff; margin-bottom: 6px; letter-spacing: -0.32px;
}
.tt-row {
  display: flex; justify-content: space-between; gap: 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: -0.36px;
  color: rgba(255, 255, 255, 0.6); line-height: 1.6;
}
.tt-row b { color: rgba(255, 255, 255, 0.6); font-weight: 400; }

/* ---------- toast (geolocation errors etc.) ---------- */
#toast {
  position: fixed; left: 50%; bottom: 68px; z-index: 20;
  transform: translateX(-50%);
  padding: 9px 16px;
  background: var(--ink); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 10.5px; letter-spacing: 0.06em; color: var(--ice);
  transition: opacity 0.3s;
}

/* ---------- pins (same card language as landing intro tags) ---------- */
.pin { pointer-events: none; }
.pin-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  /* CSS2D centers the element; put the white dot on the geo point (like .it-inner) */
  transform: translateY(calc(50% - 8px));
  animation: pin-in 0.3s ease backwards;
}
.pin-card {
  min-width: 140px; padding: 12px 14px; border-radius: 14px;
  text-align: left; color: #fff; white-space: nowrap;
  background: linear-gradient(150deg, rgba(16, 30, 58, 0.95), rgba(6, 12, 26, 0.92));
  border: 1px solid rgba(96, 143, 255, 0.5);
  box-shadow:
    0 0 40px rgba(50, 105, 255, 0.22),
    inset 0 0 22px rgba(70, 120, 255, 0.06);
  font-family: var(--display);
  order: 2;
}
.pin-card .p-name { font-size: 15px; line-height: 1.15; letter-spacing: -0.32px; }
.pin-card .p-row {
  display: flex; align-items: baseline; gap: 8px; margin-top: 4px;
  font-size: 12px; letter-spacing: -0.36px;
}
.pin-card .p-iso { color: rgba(255, 255, 255, 0.45); font-family: var(--mono); }
.pin-card .p-val { color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }
.pin-leader {
  position: relative; width: 20px; height: 48px; flex: none;
  order: 1; transform: scaleY(-1);
}
.pin-leader img {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  height: 36px; pointer-events: none;
}
.pin-leader .pin-l1 { width: 48px; opacity: 0.5; }
.pin-leader .pin-l3 { width: 46px; opacity: 0.5; mix-blend-mode: screen; }
.pin-leader .pin-l4 { width: 24px; opacity: 0.5; mix-blend-mode: screen; }
.pin-leader .pin-l2 { width: 2px; mix-blend-mode: plus-lighter; }
.pin-dot {
  position: absolute; left: 50%; top: 32px;
  width: 14px; height: 14px; border-radius: 50%;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* ---------- intro continent totals (landing self-rotation) ---------- */
/* Intro continent cards — pin ABOVE, label BELOW so cards stay in-frame.
   CSS2D centers .intro-tag; .it-inner is shifted so the pin-dot sits on the
   geographic point. */
.intro-tag { pointer-events: none; }
.it-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  /* CSS2D applies translate(-50%,-50%); nudge so the 20px dot's center
     (top of the stack) lands on the projected point */
  transform: translateY(calc(50% - 10px));
  animation: intro-tag-in 0.45s ease both;
}
.it-card {
  min-width: 200px; padding: 16px 20px; border-radius: 18px;
  text-align: left; color: #fff; white-space: nowrap;
  background: linear-gradient(150deg, rgba(16, 30, 58, 0.95), rgba(6, 12, 26, 0.92));
  border: 1px solid rgba(96, 143, 255, 0.5);
  box-shadow:
    0 0 60px rgba(50, 105, 255, 0.28),
    inset 0 0 30px rgba(70, 120, 255, 0.08);
  font-family: var(--display);
  order: 2;                                 /* label below the pin */
}
.it-name { font-size: 20px; line-height: 1.15; }
.it-row {
  display: flex; align-items: baseline; gap: 8px; margin-top: 6px;
  font-size: 14px;
}
.it-row .it-label { color: #fff; }
.it-row .it-val { color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; }

/* Leader line + pin dot — mirrored so the line drops from the dot down to the card */
.it-leader {
  position: relative; width: 26px; height: 71px; flex: none;
  order: 1; transform: scaleY(-1);           /* pin/dot on top, stem toward the card */
}
.it-leader img {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  height: 53px; pointer-events: none;
}
.it-leader .it-l1 { width: 70px; opacity: 0.5; }
.it-leader .it-l3 { width: 67px; opacity: 0.5; mix-blend-mode: screen; }
.it-leader .it-l4 { width: 34px; opacity: 0.5; mix-blend-mode: screen; }
.it-leader .it-l2 { width: 2px; mix-blend-mode: plus-lighter; }
.it-dot {
  position: absolute; left: 50%; top: 49px;
  width: 20px; height: 20px; border-radius: 50%;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}
@keyframes intro-tag-in {
  from { opacity: 0; transform: translateY(calc(50% - 4px)) scale(0.96); }
  to   { opacity: 1; transform: translateY(calc(50% - 10px)) scale(1); }
}
@media (min-width: 1024px) {
  .it-card { min-width: 320px; padding: 30px 38px; border-radius: 30px; }
  .it-name { font-size: 32px; }
  .it-row { margin-top: 10px; font-size: 24px; gap: 8px; }
}

/* user location marker */
.user-pin { pointer-events: none; }
.user-pin .ring {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(47, 107, 255, 0.9);
  animation: user-pulse 2s ease-out infinite;
}
.user-pin .core {
  position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--cobalt); box-shadow: 0 0 10px 2px rgba(47,107,255,0.8);
}
@keyframes user-pulse {
  from { transform: scale(0.4); opacity: 1; }
  to   { transform: scale(1.6); opacity: 0; }
}

@keyframes pin-in {
  from { opacity: 0; transform: translateY(calc(50% - 2px)) scale(0.96); }
  to   { opacity: 1; transform: translateY(calc(50% - 8px)) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pin-inner, .star-layer, .spark, .user-pin .ring, .it-inner, .feed-dot { animation: none; }
  #panel { transition: none; }
}

@media (max-width: 720px) {
  #brand, #site-footer { padding: 16px; }
  #panel {
    top: auto; bottom: 72px; left: 12px; right: 12px;
    width: auto; max-height: 38vh;
    transform: none; padding: 18px; gap: 14px; border-radius: 18px;
  }
  #panel.hidden { transform: translateY(10px); }
  .panel-title { font-size: 18px; }
  .stat, .stat-k { font-size: 13px; }
  .stat-k { width: 88px; }
  #viewctl { right: 12px; bottom: 12px; flex-direction: row; }
  body:not(.landing) .footer-explore #credit { display: none; }
}

/* ---------- landing hero (ported from noetic-landing-v1 HeroPanel) ---------- */
/* top-[30vh] / lg:top-[calc(50%-192px)] + -translate-x/y-1/2 */
#hero {
  position: fixed; z-index: 7;
  top: 30vh; left: 50%;
  width: min(629px, 90vw);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column;
  align-items: flex-start;
  text-align: left;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
#hero.hidden { transform: translate(-50%, calc(-50% - 14px)); }
@media (min-width: 1024px) {
  #hero { top: calc(50% - 192px); }
}

/* DeviceCountDisplay: flex-col gap-4 xl:gap-6; number centered over the CTA */
.hero-count-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; width: 100%; color: #fff;
}
.hero-eyebrow {
  margin: 0; align-self: flex-start;   /* label stays left like the reference */
  font-size: 16px; line-height: 0.9; letter-spacing: -0.48px;
  color: rgba(255, 255, 255, 0.6);
}
.hero-stat {
  font-family: var(--display);
  font-size: clamp(56px, 20.4vw, 140px);
  font-weight: 400; line-height: 1;
  color: #fff;
  letter-spacing: -0.2px;   /* ≈ -0.0014em at 140px */
  font-variant-numeric: proportional-nums;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
}

/* CTA column: mt-4 xl:mt-12, gap-4 xl:gap-6 */
.hero-actions {
  margin-top: 16px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 16px; width: 100%;
}
.hero-ctas {
  display: flex; align-items: center; gap: 4px;
  width: 100%;
  pointer-events: auto;
}
/* h-11 / lg:h-13 (= 44 / 52), rounded-[100px], tracking-[-0.32px] */
#cta-commit {
  flex: 1; height: 44px; padding: 0 24px;
  border: none; border-radius: 100px;
  background: #0055ff; color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 500;
  letter-spacing: -0.32px; cursor: pointer;
  transition: background-color 0.15s;
}
#cta-commit-go {
  flex: none; width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: #0055ff; color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 500;
  cursor: pointer; transition: background-color 0.15s;
}
#cta-commit:hover, #cta-commit-go:hover { background: #2266ff; }
@media (min-width: 1024px) {
  #cta-commit { height: 52px; }
  #cta-commit-go { width: 52px; height: 52px; }
}
@media (min-width: 1280px) {
  .hero-count-block { gap: 24px; }
  .hero-actions { margin-top: 48px; gap: 24px; }
}

/* text-xs sm:text-sm leading-[0.9] tracking-[-0.42px] text-white/40 */
.hero-sub {
  margin: 0;
  font-size: 12px; line-height: 0.9; letter-spacing: -0.42px;
  color: rgba(255, 255, 255, 0.4);
}
@media (min-width: 640px) {
  .hero-sub { font-size: 14px; }
}
.hero-explore-link {
  display: inline; margin: 0 0 0 0.35em; padding: 0;
  border: 0; border-radius: 0; background: transparent;
  font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer; pointer-events: auto;
  -webkit-appearance: none; appearance: none;
  box-shadow: none;
}
.hero-explore-link:hover { color: rgba(255, 255, 255, 0.7); }
.hero-explore-link:focus { outline: none; }
.hero-explore-link:focus-visible { outline: 1px solid rgba(255,255,255,0.35); outline-offset: 2px; }

/* ---------- back to landing ---------- */
#btn-back {
  position: fixed; top: 92px; left: 32px; z-index: 6;
}
/* ---------- commit mode visibility ---------- */
body.commit #viewctl,
body.commit #panel, body.commit #tooltip { display: none; }
/* #btn-back stays visible in commit mode and doubles as Cancel */

/* ---------- commit panel ---------- */
/* Outer shell: no glass — card and Commit button are siblings (ref CommitPanel). */
#commit-panel {
  position: fixed; top: 50%; right: 24px; z-index: 7;
  transform: translateY(-50%);
  width: min(629px, 90vw);
  display: flex; flex-direction: column;
  background: none; border: none; border-radius: 0;
  backdrop-filter: none; overflow: visible;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#commit-panel.hidden { transform: translateY(calc(-50% + 12px)); }

.cp-card {
  display: flex; flex-direction: column; gap: 24px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  color: var(--ice);
  container-type: inline-size;
  container-name: cp-card;
}

.cp-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0; border: none;
  font-size: 14px; letter-spacing: -0.42px; line-height: 1;
  color: rgba(255, 255, 255, 0.4);
}
.cp-status { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.4); }
.cp-status i {
  width: 8px; height: 8px; border-radius: 50%; background: #46ff6b;
  box-shadow: 0 0 8px 1px rgba(70, 255, 107, 0.55);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.cp-body {
  display: flex; flex-direction: column; gap: 12px;
  padding: 0; font-size: 16px; line-height: 1.5; letter-spacing: -0.48px;
}
.cp-line { color: var(--ice); }
.cp-line .cp-prompt { color: #46ff6b; }
.cp-line .cp-gt { color: #46ff6b; }
.cp-line.dim { color: rgba(255, 255, 255, 0.6); }
.cp-line.ok { margin-top: 0; color: rgba(255, 255, 255, 0.6); }
.cp-line.ok b { color: #46ff6b; font-weight: 400; }

.cp-rows { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.cp-row { display: flex; align-items: flex-start; gap: 0; }
.cp-k { width: 110px; flex: none; color: rgba(255, 255, 255, 0.6); }
.cp-v { color: #85b5ff; }
.cp-v.blue { color: #85b5ff; }
.cp-v.amber { color: var(--amber); }

/* Commit CTA lives outside the glass card — same pill + round-go as landing */
.cp-ctas {
  display: flex; align-items: center; gap: 4px;
  width: 100%; margin-top: 24px;
}
#btn-commit-confirm {
  display: flex; align-items: center; justify-content: center;
  flex: 1; height: 52px; padding: 0;
  border-radius: 100px; border: none;
  background: #0055ff; color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 500;
  letter-spacing: -0.32px; cursor: pointer;
  transition: background-color 0.15s;
}
#btn-commit-go {
  flex: none; width: 52px; height: 52px;
  border: none; border-radius: 50%;
  background: #0055ff; color: #fff;
  font-family: var(--display); font-size: 16px; font-weight: 500;
  cursor: pointer; transition: background-color 0.15s;
}
#btn-commit-go[hidden] { display: none !important; }
#btn-commit-confirm:hover:not(:disabled),
#btn-commit-go:hover:not(:disabled) { background: #2266ff; }
#btn-commit-confirm.busy {
  cursor: progress; filter: none;
  background: #1a4fcc; color: rgba(255, 255, 255, 0.85);
}
#btn-commit-confirm:disabled {
  cursor: not-allowed;
  background: #243556; color: rgba(255, 255, 255, 0.45);
}
#btn-commit-confirm:disabled:hover { background: #243556; }
#btn-commit-confirm.busy:disabled {
  background: #1a4fcc; color: rgba(255, 255, 255, 0.85);
}
#btn-commit-go:disabled {
  cursor: progress;
  background: #1a4fcc; color: rgba(255, 255, 255, 0.85);
}

/* Auth + turnstile + consent: tighter stack than the card's 24px section gap */
.cp-gate {
  display: flex; flex-direction: column; gap: 10px;
  font-size: 16px; line-height: 1.5; letter-spacing: -0.48px;
}
.cp-auth { margin: 0; }
.cp-auth-btns {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; margin-top: 12px;
}
.cp-auth-btns[hidden],
#cp-auth-prompt[hidden],
.cp-auth-signed[hidden] { display: none !important; }
.oauth-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 0; padding: 10px 8px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ice); font-family: var(--mono); font-size: 12px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.oauth-btn span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.oauth-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }
.oauth-btn:disabled { cursor: default; opacity: 0.55; }
.oauth-btn.loading { color: var(--slate); }
.oauth-btn svg { width: 16px; height: 16px; flex: none; }
/* Narrow card: drop labels so the 1×4 row stays a single line */
@container cp-card (max-width: 420px) {
  .oauth-btn span { display: none; }
  .oauth-btn { padding: 12px; gap: 0; }
}
.cp-auth-signed {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  font-family: var(--mono); font-size: 13px; color: var(--ice);
}
.cas-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #46ff6b;
  box-shadow: 0 0 8px 1px rgba(70, 255, 107, 0.6); flex: none;
}
.cas-out {
  margin-left: auto; background: none; border: none; color: var(--slate);
  font-family: var(--mono); font-size: 11px; text-decoration: underline; cursor: pointer;
}
.cas-out:hover { color: var(--ice); }

/* Turnstile widget + consent notice inside the glass card */
.cp-turnstile { margin: 0; min-height: 0; }
.cp-turnstile:empty { display: none; }
.cp-consent {
  margin: 0; font-size: 11px; line-height: 1.7;
  color: rgba(255, 255, 255, 0.4); letter-spacing: 0.01em;
}
.cp-consent a { color: #85b5ff; text-decoration: underline; }

@media (max-width: 1023px) {
  #commit-panel {
    top: 72px; right: 16px; left: 16px; width: auto; max-width: 629px;
    margin: 0 auto; transform: none;
  }
  #commit-panel.hidden { transform: translateY(12px); }
  .cp-card { gap: 10px; padding: 16px; border-radius: 16px; }
  .cp-head { font-size: 12px; }
  .cp-body { font-size: 13px; letter-spacing: -0.48px; gap: 4px; }
  .cp-gate { font-size: 13px; letter-spacing: -0.48px; gap: 8px; }
  .cp-rows { gap: 4px; }
  .cp-k { width: 88px; }
  .cp-ctas { margin-top: 10px; }
  #btn-commit-confirm { height: 40px; font-size: 14px; }
  #btn-commit-go { width: 40px; height: 40px; font-size: 14px; }
  .oauth-btn span { display: none; }
  .oauth-btn { padding: 12px; gap: 0; }
}

/* Honeypot: visually hidden, kept focusable-out for bots */
.hp-field {
  position: absolute !important; left: -9999px !important; top: auto !important;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

/* ---------- device pin (ported from noetic-landing-v1 DevicePin) ---------- */
/* CSS2D centers .device-pin; translateY(-50%) puts the white dp-dot on the
   geo attach point (card + leader sit above). */
.device-pin { pointer-events: none; }
.device-pin .dp-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transform: translateY(-50%);
}
@media (max-width: 1023px) {
  .device-pin .dp-inner {
    transform: translateY(-50%) scale(0.7);
    transform-origin: 50% calc(100% - 12px);
  }
}
.dp-card {
  position: relative;
  width: 168px; height: 168px; border-radius: 42px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%,
    rgba(40, 90, 220, 0.28), rgba(8, 18, 44, 0.35) 70%);
  border: 1.5px solid rgba(96, 152, 255, 0.85);
  box-shadow:
    0 0 60px rgba(50, 110, 255, 0.5),
    inset 0 0 44px rgba(60, 120, 255, 0.22);
  backdrop-filter: blur(6px);
}
.dp-icon {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.dp-v { position: absolute; pointer-events: none;
  filter: drop-shadow(0 0 12px rgba(80, 150, 255, 0.9)); }
.dp-v-wide { width: 140px; height: 100px; }
.dp-v-core { width: 52px; height: 52px; }
.dp-blend { mix-blend-mode: plus-lighter; }

.dp-leader {
  position: relative; width: 26px; height: 71px; flex: none;
}
.dp-leader img {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  height: 53px; pointer-events: none;
}
.dp-leader .dp-l1 { width: 70px; opacity: 0.5; }
.dp-leader .dp-l3 { width: 67px; opacity: 0.5; mix-blend-mode: screen; }
.dp-leader .dp-l4 { width: 34px; opacity: 0.5; mix-blend-mode: screen; }
.dp-leader .dp-l2 { width: 2px; mix-blend-mode: plus-lighter; }
.dp-dot {
  position: absolute; left: 50%; top: 49px;
  width: 20px; height: 20px; border-radius: 50%;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* Post-commit LocationCard ("> You are here") — same glass as intro tags */
.loc-card {
  display: block; min-width: 200px; padding: 16px 20px; border-radius: 18px;
  text-align: left; color: #fff; white-space: nowrap;
  background: linear-gradient(150deg, rgba(16, 30, 58, 0.95), rgba(6, 12, 26, 0.92));
  border: 1px solid rgba(96, 143, 255, 0.5);
  box-shadow:
    0 0 60px rgba(50, 105, 255, 0.28),
    inset 0 0 30px rgba(70, 120, 255, 0.08);
  font-family: var(--display);
  pointer-events: auto;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.loc-card:hover {
  border-color: rgba(96, 143, 255, 0.85);
  box-shadow:
    0 0 70px rgba(50, 105, 255, 0.4),
    inset 0 0 30px rgba(70, 120, 255, 0.12);
}
.loc-card:focus { outline: none; }
.loc-card:focus-visible {
  outline: 1px solid rgba(96, 143, 255, 0.7);
  outline-offset: 3px;
}
.loc-here {
  margin: 0;
  font-size: 14px; line-height: 1.15;
  color: rgba(255, 255, 255, 0.6);
}
.loc-name {
  margin: 3px 0 0;
  font-size: 20px; line-height: 1.15;
}
.loc-row {
  display: flex; align-items: baseline; gap: 8px; margin-top: 6px;
  font-size: 14px;
}
.loc-row .loc-val {
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1024px) {
  .loc-card { min-width: 320px; padding: 30px 38px; border-radius: 30px; }
  .loc-here { font-size: 24px; }
  .loc-name { margin-top: 6px; font-size: 32px; }
  .loc-row { margin-top: 10px; font-size: 24px; }
}

/* ---------- post-commit / waitlist (ported from WaitlistPanel) ---------- */
/* PostCommitPanel sits higher than HeroPanel so the tall card + count fit. */
#hero.post-commit {
  top: 15vh;
  transform: translate(-50%, 0);
}
#hero.post-commit.hidden { transform: translate(-50%, -14px); }
@media (min-width: 1024px) {
  #hero.post-commit { top: 100px; }
}
#hero.post-commit .hero-actions { display: none; }
#hero.post-commit .hero-count-block { align-items: flex-start; }
#hero.post-commit .hero-stat { text-align: left; }

.hero-email {
  display: none;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
@media (min-width: 1024px) {
  .hero-email { margin-top: 24px; padding: 32px; gap: 24px; }
}
#hero.post-commit.show-waitlist .hero-email {
  display: flex;
  opacity: 1;
  transform: none;
}
.he-label {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.48px;
  color: rgba(255, 255, 255, 0.6);
}
@media (min-width: 1024px) {
  .he-label { font-size: 16px; }
}
#hero-email-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
@media (min-width: 1024px) {
  #hero-email-form {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }
}
#hero-email-form input {
  width: 100%;
  height: 40px;
  padding: 0 24px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 14px;
  letter-spacing: -0.42px;
  outline: none;
}
#hero-email-form input::placeholder { color: rgba(255, 255, 255, 0.6); }
#hero-email-form input:focus { border-color: rgba(255, 255, 255, 0.3); }
#hero-email-form button {
  flex: 1;
  width: 100%;
  height: 40px;
  padding: 0 24px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.28px;
  cursor: pointer;
  transition: background-color 0.15s;
}
#hero-email-form button:hover { background: rgba(255, 255, 255, 0.2); }
@media (min-width: 1024px) {
  #hero-email-form input {
    flex: 1;
    width: auto;
    height: 52px;
  }
  #hero-email-form button {
    flex: 1;
    max-width: 150px;
    width: auto;
    height: 52px;
  }
}
.he-ok {
  margin: 0;
  font-size: 12px;
  letter-spacing: -0.42px;
  color: #46ff6b;
}
@media (min-width: 1024px) {
  .he-ok { font-size: 14px; }
}
/* display:flex/block on the form/ok must not beat the hidden attribute */
#hero-email-form[hidden],
#hero-email-ok[hidden],
#hero-email-follow[hidden] { display: none !important; }

.he-follow {
  margin: 0;
  font-size: 12px;
  letter-spacing: -0.42px;
  color: rgba(255, 255, 255, 0.7);
}
.he-follow a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.he-follow a:hover { color: #85b5ff; }
@media (min-width: 1024px) {
  .he-follow { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) { .dp-card { animation: none; } }
.hero-stat.neon {
  color: #fff;
  animation: neon-breathe 2.8s ease-in-out infinite;
}
@keyframes neon-breathe {
  0%, 100% {
    text-shadow:
      0 0 6px  rgba(230, 241, 255, 0.7),
      0 0 22px rgba(47, 107, 255, 0.55),
      0 0 60px rgba(47, 107, 255, 0.3);
  }
  50% {
    text-shadow:
      0 0 10px rgba(230, 241, 255, 0.95),
      0 0 34px rgba(47, 107, 255, 0.85),
      0 0 90px rgba(47, 107, 255, 0.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stat.neon { animation: none; }
}
.hero-ctas.cta-fade {
  animation: cta-fade 1.4s ease both;
}
@keyframes cta-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-ctas.cta-fade { animation: none; }
}

/* ---------- mode visibility ----------
   body.landing = hero view; without it = explore view */
body.landing #viewctl,
body.landing #btn-back,
body.landing #panel,
body.landing #tooltip { display: none; }
/* Post-commit keeps Overview top-left (reference logo / back-to-here). */
body.landing.post-commit #btn-back { display: flex; }
/* #hero is hidden via the .hidden class so its fade transition can play */

@media (max-width: 720px) {
  #btn-back { top: auto; bottom: 64px; left: 12px; }
  body.post-commit #btn-back { top: 72px; bottom: auto; left: 12px; }
}
