/* ===================================================================
   STUDIO SKIN: shared Bloomberg-black terminal styling for the studio
   wing (dashboard.html, foundry.html) + the persistent studio nav band
   + glossary tooltip styles. Values match the dashboard's terminal skin
   exactly.

   2026-07-18 FIX (white/GST restyle R1 critic, CRITICAL #1): every
   selector below that used to be bare `html.studio ...` or an unscoped
   `.studio-nav`/`.studio-section-title`/etc. tied on CSS specificity
   against gameworks.css's `html.gst-light ...` overrides -- and because
   this file is <link>-ed AFTER gameworks.css on every page, studio.css
   won every tie (later source order wins on equal specificity), so the
   dark terminal skin kept bleeding through on every page that also
   carries html.gst-light (play/library/roblox/sk26/academy/cloud/
   archive). Root fix: every selector here is now scoped with
   `:not(.gst-light)` so it (a) cannot match at all on a light page,
   full stop, regardless of specificity/order, and (b) is completely
   unchanged for the pages that still want the dark terminal skin
   (dashboard.html, foundry.html -- neither carries .gst-light). This
   is additive-safe: no page loses layout, only the dark color rules
   are gated. */
:root {
  --tk-bg: #060606;
  --tk-panel: #0A0A0A;
  /* Reads off the canonical gold pair in gameworks.css (--gold-dim /
     --gold-hot) instead of re-declaring its own hex -- one source of
     truth estate-wide, per the 2026-07-17 consistency pass. Falls back
     to the historical literal if gameworks.css is ever not loaded. */
  --tk-gold: var(--gold-dim, #C9A84C);
  --tk-gold-hot: var(--gold-hot, #FFD56B);
  --tk-hair: rgba(201, 168, 76, 0.28);
  --tk-hair-soft: rgba(201, 168, 76, 0.16);
  --tk-label: #8E8E8E;
  --tk-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html.studio:not(.gst-light), html.studio:not(.gst-light) body { background: var(--tk-bg); }
html.studio:not(.gst-light) body {
  background:
    radial-gradient(ellipse 70% 40% at 50% -5%, rgba(201, 168, 76, 0.06), transparent),
    var(--tk-bg);
}
html.studio:not(.gst-light) #gw-starfield { opacity: 0.5; }

html.studio:not(.gst-light) .gw-card {
  background: var(--tk-panel);
  border: 1px solid var(--tk-hair-soft);
  backdrop-filter: none;
}
html.studio:not(.gst-light) .gw-card:hover, html.studio:not(.gst-light) .gw-card:focus-within {
  border-color: var(--tk-hair);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6), 0 0 14px rgba(201, 168, 76, 0.10);
}

/* ---------- persistent studio nav band (dashboard.html/foundry.html
   only now -- every gst-light page has migrated to the shared
   .gst-mast masthead in gameworks.css, see _nav-pattern.md) ---------- */
html:not(.gst-light) .studio-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #050505;
  border-bottom: 2px solid var(--tk-gold);
  padding: 0 12px;
}
html:not(.gst-light) .studio-nav .brand {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--tk-gold);
  padding: 14px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
html:not(.gst-light) .studio-nav a.tab {
  font-family: var(--tk-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--tk-label);
  padding: 16px 16px 13px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}
html:not(.gst-light) .studio-nav a.tab:hover { color: var(--tk-gold-hot); }
html:not(.gst-light) .studio-nav a.tab.active {
  color: var(--tk-gold-hot);
  border-bottom-color: var(--tk-gold-hot);
}
html:not(.gst-light) .studio-nav .spacer { flex: 1; }
html:not(.gst-light) .studio-nav a.arcade-link {
  font-family: var(--tk-mono);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: #4DE1FF;
  padding: 14px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* structural-only fallback: .spacer's flex:1 and the row's flex layout
   are load-bearing even in the (now theoretical, post-migration) case
   a light page still carried this markup -- keep layout unconditioned
   so a stray instance never collapses, only the dark paint is gated. */
.studio-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 12px; }
.studio-nav .spacer { flex: 1; }

/* ---------- shared section furniture (foundry.html/dashboard.html;
   academy.html migrated off these classes onto .section-title) ---------- */
html:not(.gst-light) .studio-section-title {
  font-family: var(--font-head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.86rem;
  color: var(--tk-gold);
  margin: 42px 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.studio-section-title { font-family: var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.86rem; margin: 42px 0 6px; display: flex; align-items: center; gap: 10px; }
html:not(.gst-light) .studio-section-title .bar { width: 6px; height: 16px; background: var(--tk-gold); border-radius: 2px; box-shadow: 0 0 10px rgba(201, 168, 76, 0.6); }
.studio-section-title .bar { width: 6px; height: 16px; border-radius: 2px; }
html:not(.gst-light) .studio-rule { border-top-color: var(--tk-hair-soft); }
.studio-rule { border: none; border-top: 1px solid transparent; margin: 0 0 18px; }

html:not(.gst-light) .studio-micro-label {
  color: var(--tk-label);
}
.studio-micro-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
html:not(.gst-light) .studio-mono-value { color: #FFFFFF; }
.studio-mono-value {
  font-family: var(--tk-mono);
  font-weight: 700;
}

/* ---------- glossary term tooltips (foundry.html; gameworks.css carries
   the html.gst-light color override for any light page that uses these) ---------- */
html:not(.gst-light) .gw-term {
  border-bottom: 1px dotted var(--tk-gold-hot);
  color: var(--tk-gold-hot);
}
.gw-term {
  cursor: help;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font: inherit;
  padding: 0;
}
html:not(.gst-light) .gw-term-tip {
  background: #10100C;
  border: 1px solid var(--tk-gold);
  color: #EDEDED;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.gw-term-tip {
  position: absolute;
  z-index: 60;
  max-width: 280px;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  line-height: 1.45;
}
html:not(.gst-light) .gw-term-tip b { color: var(--tk-gold-hot); }
.gw-term-tip b {
  display: block;
  font-family: var(--tk-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

/* ---------- dedication line (color already deterministically overridden
   by gameworks.css's html.gst-light .dedication -- (0,2,0) beats this
   bare (0,1,0) selector regardless of link order, no gating needed) ---------- */
.dedication {
  text-align: center;
  color: var(--tk-label);
  font-size: 0.8rem;
  font-style: italic;
  letter-spacing: 0.02em;
  margin: 26px 0 0;
}
