/* ─────────────────────────────────────────────────────────────────
   Econometrics Explorers — unified shell stylesheet.
   Re-themed to the Monash University brand (April 2026 Brand Fast Facts):
   white-dominant, Monash Blue leads, Helvetica Neue Condensed / Arial type.
   The :root token block mirrors monash-tokens.css so the shell is
   self-contained on a no-build static host.
   ───────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;

  /* ── Monash brand primitives ── */
  --monash-blue: #006DAE;        /* PMS 2945C — primary, always dominant */
  --monash-electric: #285AFF;    /* tertiary — Electric Blue */
  --monash-blueberry: #121256;   /* tertiary — Blueberry (deep) */
  --monash-heritage: #ABF5F9;    /* tertiary — Heritage Blue (light) */
  --monash-black: #000000;
  --monash-white: #FFFFFF;
  --grey-1: #F6F6F6;
  --grey-2: #E3E3E3;
  --grey-3: #505050;
  --grey-4: #3C3C3C;

  /* ── Semantic roles ── */
  --surface: #FFFFFF;
  --surface-alt: #F6F6F6;
  --surface-tint: rgba(0,109,174,0.04);
  --ink: #101820;
  --ink-soft: #3C3C3C;
  --muted: #5F6B75;
  --dim: #8B95A0;
  --line: rgba(0,0,0,0.10);
  --line-strong: rgba(0,0,0,0.16);

  --primary: #006DAE;
  --primary-ink: #FFFFFF;
  --primary-strong: #005A90;
  --primary-soft: rgba(0,109,174,0.08);
  --accent: var(--primary);          /* per-domain override via inline --accent */
  --accent-soft: var(--primary-soft);

  /* ── Legacy aliases (kept so shared/viewer rules resolve) ── */
  --bg-warm: var(--surface-alt);
  --bg-paper: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: var(--surface-alt);

  /* ── Type — Monash online fonts ── */
  --font-head: 'Helvetica Neue Condensed', 'Helvetica Neue', 'Arial Narrow', Arial, sans-serif;  /* headlines, ALL CAPS */
  --font-sans: 'Helvetica Neue', Arial, Helvetica, sans-serif;          /* body */
  --font-mono: ui-monospace, Menlo, Consolas, 'Courier New', monospace; /* numeric / code (utility) */
  --font-serif: var(--font-sans);                                      /* no brand serif → Helvetica/Arial */

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* ── Utility data-viz palette (charts/graphs ONLY) ── */
  --data-1: #006DAE; --data-2: #285AFF; --data-3: #00739D; --data-4: #006F29;
  --data-5: #C33603; --data-6: #6F64A9; --data-7: #C90095; --data-8: #121256;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }

/* Visible Monash-blue focus ring (WCAG AA). */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* (The unused "Studio" light direction was removed — index.html mounts <Atlas/> only.) */

/* ─────────────────────────────────────────────────────────────────
   ATLAS — Monash light shell: white surfaces, Monash-blue chrome,
   big touch tiles, the 'M' device as hero graphic. Scope under .atlas.
   ───────────────────────────────────────────────────────────────── */
.atlas {
  background: var(--surface);
  color: var(--ink);
  min-height: 100vh;
}

.atlas-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.atlas-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.atlas-logo-mark { height: 46px; width: auto; display: block; }
.atlas-logo-dark { display: none; }
.atlas-logo-text { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 12px; }
.all-name {
  font-family: var(--font-head); text-transform: uppercase;
  font-weight: 700; font-size: 14px; letter-spacing: 0.01em; color: var(--ink);
}
.all-sub {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 10px; color: var(--muted); letter-spacing: 0.1em; margin-top: 3px;
}

.atlas-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px;
  flex: 0 1 320px; color: var(--muted);
}
.atlas-search input {
  border: 0; background: transparent; outline: none;
  color: var(--ink); font: inherit; font-size: 13px;
  padding: 9px 0; flex: 1;
}
.atlas-search input::placeholder { color: var(--dim); }
.atlas-search button { color: var(--muted); font-size: 18px; }

.atlas-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.atab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.atab:hover { color: var(--ink); background: var(--surface-alt); }
.atab.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.atab-dot { width: 7px; height: 7px; border-radius: 50%; }

/* Atlas home hero */
.atlas-home { padding: 64px 56px 80px; max-width: 1480px; margin: 0 auto; }
.hero { max-width: 920px; margin-bottom: 56px; position: relative; }
/* Brand-mandated 'M' device, faint, behind the hero copy. */
.hero::after {
  content: ""; position: absolute; z-index: 0;
  top: -28px; right: 0; width: 200px; height: 460px;
  background: url("assets/brand/monash-m-blue.png") no-repeat center / contain;
  opacity: 0.06; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 12px; letter-spacing: 0.12em; font-weight: 600;
  color: var(--primary); margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 48px; font-weight: 700; line-height: 1.04; letter-spacing: -0.01em;
  margin: 0 0 20px; color: var(--ink);
  text-wrap: pretty;
}
.hero-em { color: var(--primary); font-style: normal; }
.hero-sub {
  font-size: 18px; line-height: 1.55; max-width: 680px;
  color: var(--ink-soft); margin: 0;
}

.dom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}
.dom-tile {
  text-align: left; display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative;
}
.dom-tile::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
  pointer-events: none;
  opacity: 0.5;
  transition: opacity .25s;
}
.dom-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
}
.dom-tile:hover::after { opacity: 0.9; }
.dt-bezel {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-alt));
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.dt-bezel::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 50%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.dt-bezel svg { position: relative; z-index: 1; }
.dt-meta { padding: 22px 24px 24px; position: relative; z-index: 1; }
.dt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.dt-name { font-family: var(--font-head); text-transform: uppercase; font-size: 22px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.dt-code { font-family: var(--font-head); text-transform: uppercase; font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.dt-tag { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.dt-foot { display: flex; align-items: baseline; gap: 8px; }
.dt-count { font-family: var(--font-head); font-size: 28px; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
.dt-lbl { font-size: 12px; color: var(--muted); }
.dt-arrow { margin-left: auto; font-size: 22px; color: var(--dim); transition: transform .2s, color .2s; }
.dom-tile:hover .dt-arrow { color: var(--accent); transform: translateX(4px); }

.featured { margin-top: 24px; }
.ft-label {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 11px; letter-spacing: 0.12em; color: var(--dim);
  margin-bottom: 14px;
}
.ft-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.ft-card {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s, background .2s;
}
.ft-card:hover { background: var(--surface-alt); border-color: var(--accent); }
.ft-title {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 22px; font-weight: 700; color: var(--ink);
  line-height: 1.1; margin-bottom: 8px;
  text-wrap: pretty;
}
.ft-count { font-family: var(--font-head); text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 16px; }
.ft-line { height: 2px; background: var(--line); border-radius: 1px; overflow: hidden; }
.ft-line span { display: block; height: 100%; width: 30%; }

/* Collection view */
.coll-view { padding: 56px 56px 80px; max-width: 1480px; margin: 0 auto; }
.cv-hero {
  display: flex; align-items: center; gap: 36px;
  padding-bottom: 36px; margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.cv-glyph {
  width: 200px; height: 200px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-alt));
  border: 1px solid var(--line);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.cv-glyph::before {
  content: ""; position: absolute; inset: 0; border-radius: 22px;
  background: radial-gradient(60% 70% at 50% 50%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.cv-glyph svg { position: relative; z-index: 1; }
.cv-eyebrow {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 12px; color: var(--accent); letter-spacing: 0.12em; font-weight: 600;
  margin-bottom: 8px;
}
.cv-title { font-family: var(--font-head); text-transform: uppercase; font-size: 56px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; margin: 0 0 12px; color: var(--ink); }
.cv-sub { font-size: 18px; color: var(--muted); margin: 0; }

.cv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 36px; }
.cv-tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 6px 12px; border-radius: 6px;
  background: var(--surface-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.cv-tag:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, var(--surface-alt)); }
.cv-tag.active { background: var(--accent); color: #fff; border-color: transparent; }

.cv-sec { margin-bottom: 44px; }
.cv-sec-label { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.cv-sec-num { font-family: var(--font-head); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.cv-sec-name { font-family: var(--font-head); text-transform: uppercase; font-size: 22px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.cv-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 14px;
}
.cv-card {
  display: grid; grid-template-columns: 80px 1fr 32px;
  gap: 18px; align-items: center;
  padding: 20px 22px; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.cv-card:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateX(2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.cv-card-preview {
  width: 80px; height: 80px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-alt));
  display: flex; align-items: center; justify-content: center;
}
.cv-card-title { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 4px; color: var(--ink); }
.cv-card-desc { font-size: 13px; color: var(--muted); line-height: 1.4; margin-bottom: 8px; }
.cv-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cv-card-tags span {
  font-family: var(--font-mono); font-size: 9.5px;
  padding: 2px 6px; border-radius: 3px;
  background: var(--surface-alt); color: var(--muted);
}
.cv-card-cta { color: var(--accent); }

/* Search results inside Atlas */
.search-results { padding: 48px 56px 80px; max-width: 1480px; margin: 0 auto; }
.sr-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.sr-title { font-family: var(--font-head); text-transform: uppercase; font-size: 22px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.sr-q { color: var(--primary); }
.sr-clear {
  font-family: var(--font-head); text-transform: uppercase; font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px;
}
.sr-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}
.sr-card {
  padding: 18px 20px; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.sr-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.sr-coll { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; margin-bottom: 8px; }
.sr-title-card { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 4px; color: var(--ink); }
.sr-desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-bottom: 10px; }
.sr-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sr-tags span {
  font-family: var(--font-mono); font-size: 9.5px;
  padding: 2px 6px; border-radius: 3px;
  background: var(--surface-alt); color: var(--muted);
}

.atlas .empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.atlas .empty-mark { font-size: 64px; color: var(--dim); margin-bottom: 12px; }
.atlas .empty-title { font-size: 18px; font-weight: 600; color: var(--ink-soft); }

/* Touch/large screen tweaks */
@media (pointer: coarse), (min-width: 1600px) {
  .hero-title { font-size: 56px; }
  .dt-name { font-size: 24px; }
  .cv-card { padding: 22px 24px; }
}
@media (max-width: 900px) {
  .atlas-bar { flex-wrap: wrap; padding: 14px 18px; }
  .atlas-search { flex-basis: 100%; order: 3; }
  .atlas-tabs { order: 4; flex-basis: 100%; margin-left: 0; }
  .atlas-home, .coll-view, .search-results { padding: 32px 22px 60px; }
  .hero-title { font-size: 38px; letter-spacing: -0.01em; }
  .hero::after { width: 120px; height: 276px; top: -10px; opacity: 0.05; }
  .cv-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .cv-glyph { width: 120px; height: 120px; }
  .cv-glyph svg { width: 90px !important; height: 90px !important; }
  .cv-title { font-size: 36px; }
}

/* ─────────────────────────────────────────────────────────────────
   APP VIEWER (full-bleed iframe overlay) — light, shared by views.
   ───────────────────────────────────────────────────────────────── */
.viewer {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--surface);
  display: flex; flex-direction: column;
  animation: viewer-in 0.18s ease-out;
}
@keyframes viewer-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.viewer-bar {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
}
.vb-close {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: 8px;
  background: rgba(0,0,0,0.04);
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft);
  transition: background .15s;
}
.vb-close:hover { background: rgba(0,0,0,0.08); color: var(--ink); }
.vb-meta { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.vb-coll { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; flex-shrink: 0; }
.vb-dot { color: var(--dim); }
.vb-section { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.vb-title { font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-newtab {
  font-family: var(--font-mono); font-size: 11px;
  padding: 6px 10px; border-radius: 6px;
  background: rgba(0,0,0,0.04); color: var(--accent);
  text-decoration: none;
  transition: background .15s;
  flex-shrink: 0;
}
.vb-newtab:hover { background: rgba(0,0,0,0.08); }
.vb-thread { font-family: var(--font-sans); }
.vb-thread .vb-coll { font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: -0.005em; }
.vb-thread-nav { display: inline-flex; gap: 4px; flex-shrink: 0; }
.vb-step {
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(0,0,0,0.04); color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 16px; line-height: 1;
  border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.vb-step:hover:not(:disabled) { background: rgba(0,0,0,0.08); color: var(--accent); }
.vb-step:disabled { opacity: 0.3; cursor: not-allowed; background: var(--surface-alt); color: var(--dim); }
.viewer-frame {
  flex: 1; width: 100%; height: 100%; border: 0; background: #fff;
}
@media (max-width: 700px) {
  .vb-section, .vb-dot:nth-of-type(2) { display: none; }
  .vb-close span { display: none; }
}

/* ─────────────────────────────────────────────────────────────────
   Bookmarks, threads, custom tracks, track builder — Monash light.
   ───────────────────────────────────────────────────────────────── */

.atlas-tabs .atab-saved { margin-left: 6px; }
.atlas-tabs .atab .atab-star { color: var(--primary); margin-right: 2px; }
.atlas-tabs .atab .atab-num {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 6px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
  margin-left: 4px;
}
.atlas-tabs .atab.active .atab-num { background: var(--primary); color: #fff; }

/* Bookmark star (overlaid on cards). 28px visual; ::after extends the
   hit area to 44px for touch without shifting the layout. */
.bm-star {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface);
  color: var(--dim);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s, transform .15s;
}
.bm-star::after { content: ""; position: absolute; inset: -8px; }
.bm-star:hover { color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.bm-star.on { color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.bm-star.on:hover { transform: scale(1.05); }

.cv-card-wrap, .sr-card-wrap { position: relative; display: block; width: 100%; }
.cv-card-wrap .cv-card, .sr-card-wrap .sr-card { display: grid; width: 100%; }
.sr-card-wrap .sr-card { display: block; }
.cv-card-bm, .sr-card-bm {
  position: absolute; top: 12px; right: 12px; z-index: 2;
}
.cv-card-wrap .cv-card { padding-right: 64px; }
.sr-card-wrap .sr-card { padding-right: 52px; }

/* Featured-thread head row. */
.featured + .featured { margin-top: 56px; }
.ft-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.ft-head .ft-label { margin-bottom: 0; }
.ft-sub {
  font-size: 13px; color: var(--muted);
}

/* Thread / custom-track card. */
.ft-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s, box-shadow .15s;
  position: relative;
  min-height: 156px;
}
.ft-card:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.ft-card .ft-tag-custom {
  position: absolute; top: 12px; right: 14px;
  font-family: var(--font-head); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); padding: 2px 6px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface-alt);
}
.ft-blurb {
  font-size: 12.5px; color: var(--ink-soft);
  line-height: 1.5; margin: 4px 0 8px;
  text-wrap: pretty;
}
.ft-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: auto; padding-top: 8px;
}
.ft-cta { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; color: var(--primary); }
.ft-card .ft-line { margin-top: 10px; }

/* "+ New track" card variant. */
.ft-new {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  cursor: pointer;
}
.ft-new:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--ink);
}
.ft-new .ft-new-plus {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; margin-bottom: 12px; color: var(--primary);
}
.ft-new:hover .ft-new-plus { background: color-mix(in srgb, var(--primary) 18%, #fff); border-color: var(--primary); }
.ft-new .ft-new-text { font-size: 16px; font-weight: 600; }
.ft-new .ft-new-sub { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 200px; }

/* Custom track edit/delete actions (Saved view). */
.ft-card-wrap { position: relative; }
.ft-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 4px; z-index: 2;
}
.ft-act {
  font-family: var(--font-mono); font-size: 10px;
  padding: 4px 8px; border-radius: 5px;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.ft-act:hover { background: var(--surface-alt); color: var(--ink); }
.ft-act.ft-del:hover { background: color-mix(in srgb, #C33603 14%, #fff); border-color: #C33603; color: #C33603; }

/* ──── Track builder modal ──── */
.tb-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(16, 24, 32, 0.55);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: tb-fade .15s ease-out;
}
@keyframes tb-fade { from { opacity: 0 } to { opacity: 1 } }
.tb-modal {
  width: 100%; max-width: 940px; max-height: 92vh;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex; flex-direction: column;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
  overflow: hidden;
}
.tb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.tb-title { font-family: var(--font-head); text-transform: uppercase; font-size: 18px; font-weight: 700; letter-spacing: -0.005em; color: var(--ink); }
.tb-x {
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 22px; line-height: 1; color: var(--muted);
  background: var(--surface-alt);
}
.tb-x:hover { background: var(--line); color: var(--ink); }

.tb-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; flex: 1; overflow: hidden;
}
.tb-col {
  padding: 20px 24px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.tb-col + .tb-col { border-left: 1px solid var(--line); }

.tb-label {
  font-family: var(--font-head); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.tb-input {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit; font-size: 13px;
  color: var(--ink);
}
.tb-input::placeholder { color: var(--dim); }
.tb-input:focus { outline: none; border-color: var(--primary); }

.tb-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}
.tb-swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--line); }

.tb-section-head {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
  font-family: var(--font-head); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.tb-pill {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 6px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary);
}
.tb-empty {
  font-size: 13px; color: var(--dim);
  padding: 18px 0;
}

.tb-picked { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tb-pick {
  display: grid; grid-template-columns: 22px 10px 1fr auto auto auto;
  align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tb-i { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center; }
.tb-pdot { width: 8px; height: 8px; border-radius: 50%; }
.tb-pname { font-size: 13px; font-weight: 500; }
.tb-pname .tb-psub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.tb-mv, .tb-rm {
  width: 26px; height: 26px; border-radius: 5px;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: 13px; line-height: 1;
}
.tb-mv:hover, .tb-rm:hover { background: var(--surface-alt); color: var(--ink); }
.tb-rm:hover { background: color-mix(in srgb, #C33603 12%, #fff); color: #C33603; }
.tb-mv:disabled { opacity: 0.25; cursor: default; }

.tb-results {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 100%;
}
.tb-res {
  display: grid; grid-template-columns: 10px 1fr auto;
  align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}
.tb-res:hover { background: var(--surface-alt); border-color: var(--line-strong); }
.tb-res.on { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.tb-add {
  font-family: var(--font-mono); font-size: 13px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-alt); color: var(--ink-soft);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-res.on .tb-add { background: var(--primary); color: #fff; border-color: var(--primary); }

.tb-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}
.tb-btn {
  font-size: 13px; padding: 9px 16px; border-radius: 8px;
  background: var(--surface-alt); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.tb-btn:hover { background: var(--line); color: var(--ink); }
.tb-primary {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--primary); color: #fff; border-color: var(--primary);
  font-weight: 700;
}
.tb-primary:hover:not(:disabled) { background: var(--primary-strong); border-color: var(--primary-strong); }
.tb-primary:disabled { opacity: 0.4; cursor: not-allowed; background: var(--surface-alt); border-color: var(--line); color: var(--dim); }

@media (max-width: 800px) {
  .tb-body { grid-template-columns: 1fr; max-height: 70vh; }
  .tb-col + .tb-col { border-left: 0; border-top: 1px solid var(--line); }
}

/* ─────────────────────────────────────────────────────────────────
   Floating feedback widget — Monash light card.
   ───────────────────────────────────────────────────────────────── */
.fb-widget { position: fixed; bottom: 24px; right: 24px; z-index: 3000; }

.fb-fab {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 28px rgba(0,109,174,0.32), 0 2px 6px rgba(0,0,0,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.fb-fab:hover { transform: translateY(-2px) scale(1.04); background: var(--primary-strong); box-shadow: 0 14px 36px rgba(0,109,174,0.4), 0 3px 8px rgba(0,0,0,0.2); }
.fb-fab:active { transform: translateY(0) scale(0.98); }

.fb-panel {
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 14px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: fb-pop .18s ease-out;
  font-family: var(--font-sans);
}
@keyframes fb-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fb-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.fb-title { font-family: var(--font-head); text-transform: uppercase; font-size: 14px; font-weight: 700; letter-spacing: 0.01em; color: var(--ink); }
.fb-sub {
  font-size: 11.5px; color: var(--muted);
  margin-top: 3px; line-height: 1.4;
}
.fb-ctx {
  color: var(--primary);
  font-family: var(--font-mono); font-size: 10.5px;
}
.fb-x {
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 20px; line-height: 1; color: var(--muted);
  background: var(--surface-alt);
  flex-shrink: 0;
}
.fb-x:hover { background: var(--line); color: var(--ink); }

.fb-text {
  margin: 12px 16px 8px;
  width: calc(100% - 32px);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit; font-size: 13px; line-height: 1.5;
  padding: 10px 12px;
  resize: vertical;
  min-height: 110px;
}
.fb-text:focus { outline: none; border-color: var(--primary); background: #fff; }
.fb-text::placeholder { color: var(--dim); }

.fb-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 14px;
  gap: 10px;
}
.fb-hint {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--dim);
}
.fb-submit {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.03em;
  font-size: 12.5px; font-weight: 700;
  padding: 8px 16px; border-radius: 8px;
  background: var(--primary); color: #fff;
  border: 1px solid var(--primary);
}
.fb-submit:hover:not(:disabled) { background: var(--primary-strong); border-color: var(--primary-strong); }
.fb-submit:disabled { opacity: 0.45; cursor: not-allowed; background: var(--surface-alt); border-color: var(--line); color: var(--dim); }

.fb-done {
  padding: 28px 20px 26px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.fb-check {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0, 111, 41, 0.14); color: #006F29;
  font-size: 24px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.fb-done-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.fb-done-sub { font-size: 12px; color: var(--muted); }

@media (max-width: 480px) {
  .fb-widget { bottom: 16px; right: 16px; }
  .fb-fab { width: 50px; height: 50px; }
  .fb-panel { width: calc(100vw - 32px); }
}

/* ─────────────────────────────────────────────────────────────────
   References card — sits at the bottom of the Atlas home (Monash light).
   ───────────────────────────────────────────────────────────────── */
.refs {
  margin-top: 64px;
  padding: 36px 32px 32px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}
.refs::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
  pointer-events: none;
  opacity: 0.7;
}
.refs-head {
  position: relative; z-index: 1;
  margin-bottom: 22px;
  max-width: 720px;
}
.refs-eyebrow {
  font-family: var(--font-head); font-size: 11px; letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.refs-title {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 36px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 8px;
}
.refs-sub {
  font-size: 15px; color: var(--muted); line-height: 1.55;
  margin: 0;
}

.refs-tabs {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.refs-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-soft);
  transition: background .15s, color .15s, border-color .15s;
}
.refs-tab:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.refs-tab.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.refs-tab.active .refs-tab-dot { background: #fff !important; }
.refs-tab-dot { width: 7px; height: 7px; border-radius: 50%; }

.refs-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.refs-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 16px 12px;
  display: flex; flex-direction: column;
}
.refs-col-head { margin-bottom: 12px; }
.refs-col-label {
  font-family: var(--font-head); text-transform: uppercase;
  font-size: 12.5px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
.refs-col-note {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.04em;
}
.refs-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 12px;
}
.refs-item {
  font-size: 12.5px; line-height: 1.5;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.refs-item-authors {
  font-weight: 600; color: var(--ink);
  font-size: 12px;
  margin-bottom: 3px;
}
.refs-item-title {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 4px;
  text-wrap: pretty;
}
.refs-item-venue {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.refs-item-note {
  font-size: 11px; color: var(--muted);
  font-style: italic;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--line);
}
.refs-empty {
  color: var(--dim);
  font-size: 13px;
  padding: 6px 0;
}

@media (max-width: 1100px) {
  .refs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .refs { padding: 28px 18px 22px; }
  .refs-title { font-size: 26px; }
  .refs-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ─────────────────────────────────────────────────────────────────
   About modal + site-wide credit line.
   ───────────────────────────────────────────────────────────────── */
.atab-about-i { font-size: 13px; opacity: 0.85; }
.about-overlay {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(16,24,32,0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: tb-fade .15s ease-out;
}
.about-modal {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
  padding: 32px 34px 28px;
}
.about-x {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 22px; line-height: 1; color: var(--muted); background: var(--surface-alt);
}
.about-x:hover { background: var(--line); color: var(--ink); }
.about-eyebrow {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 11px; font-weight: 600; color: var(--primary); margin-bottom: 10px;
}
.about-title {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: -0.01em;
  font-size: 30px; font-weight: 700; color: var(--ink); margin: 0 0 14px; line-height: 1.05;
}
.about-lead { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 20px; }
.about-h {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 10px;
}
.about-list { margin: 0 0 22px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.about-list li { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.about-list b { color: var(--ink); }
.about-credit { border-top: 1px solid var(--line); padding-top: 16px; }
.about-by { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.about-aff { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.about-copy { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
@media (max-width: 600px) { .about-modal { padding: 24px 20px 20px; } .about-title { font-size: 24px; } }

/* Site-wide copyright line (injected by monash-theme.js on every page). */
#monash-credit {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 6px; z-index: 850;
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 10.5px; line-height: 1; white-space: nowrap;
  color: var(--muted, #8a8a8a); opacity: 0.66; pointer-events: none;
}
@media (max-width: 600px) { #monash-credit { font-size: 9px; } }

/* ─────────────────────────────────────────────────────────────────
   DARK THEME — real Monash dark tokens for the shell (.atlas).
   Activated by html[data-theme="dark"] (set by monash-theme.js).
   Inner apps invert instead (monash-app.css); the shell uses tokens.
   ───────────────────────────────────────────────────────────────── */
html[data-theme="dark"] {
  --surface: #0E1320;
  --surface-alt: #161C2B;
  --surface-tint: rgba(63,160,220,0.06);
  --ink: #EAEFF5;
  --ink-soft: #C3CCD8;
  --muted: #93A0AE;
  --dim: #6B7886;
  --line: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.22);
  --primary: #3FA0DC;
  --primary-ink: #06121E;
  --primary-strong: #5FB4E6;
  --primary-soft: rgba(63,160,220,0.16);
  --bg-warm: var(--surface-alt);
  --bg-paper: var(--surface);
  --card: var(--surface);
  --card-hover: var(--surface-alt);
}

/* Translucent bar / overlays that were hardcoded light */
html[data-theme="dark"] .atlas-bar { background: rgba(14,19,32,0.86); }
html[data-theme="dark"] .viewer, html[data-theme="dark"] .viewer-frame { background: var(--surface); }
html[data-theme="dark"] .tb-overlay { background: rgba(0,0,0,0.66); }

/* Reverse (white) Monash logo + white 'M' device on dark — brand rule */
html[data-theme="dark"] .atlas-logo-light { display: none; }
html[data-theme="dark"] .atlas-logo-dark { display: block; }
html[data-theme="dark"] .hero::after { background-image: url("assets/brand/monash-m-white.png"); opacity: 0.08; }

/* Inline per-domain --accent can't be overridden, so lighten it at point of use
   (mix toward white) wherever it must read on the dark surface. */
html[data-theme="dark"] .dt-count,
html[data-theme="dark"] .cv-eyebrow,
html[data-theme="dark"] .cv-sec-num,
html[data-theme="dark"] .refs-eyebrow,
html[data-theme="dark"] .refs-col-label,
html[data-theme="dark"] .cv-card-cta,
html[data-theme="dark"] .ft-cta {
  color: color-mix(in srgb, var(--accent) 55%, white);
}
html[data-theme="dark"] .sr-coll { color: color-mix(in srgb, var(--accent) 55%, white) !important; }

/* Accent-filled chips/tabs: lighten fill, dark text */
html[data-theme="dark"] .cv-tag.active,
html[data-theme="dark"] .refs-tab.active {
  background: color-mix(in srgb, var(--accent) 62%, white);
  color: #06121E;
}
html[data-theme="dark"] .refs-tab.active .refs-tab-dot { background: #06121E !important; }

/* Hover borders + glyph panels lightened so the accent shows on dark */
html[data-theme="dark"] .dom-tile:hover,
html[data-theme="dark"] .cv-card:hover,
html[data-theme="dark"] .ft-card:hover,
html[data-theme="dark"] .sr-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, white);
}
html[data-theme="dark"] .dt-bezel,
html[data-theme="dark"] .cv-glyph,
html[data-theme="dark"] .cv-card-preview {
  background: color-mix(in srgb, var(--accent) 24%, var(--surface-alt));
}

/* Primary buttons: lighter blue fill needs dark text in dark mode */
html[data-theme="dark"] .tb-primary,
html[data-theme="dark"] .fb-submit,
html[data-theme="dark"] .fb-fab { color: var(--primary-ink); }

/* ── Floating theme toggle (shell copy; inner apps style it in monash-app.css) ── */
#monash-theme-toggle {
  position: fixed; left: 18px; bottom: 18px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-ink); border: none; padding: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
#monash-theme-toggle:hover { background: var(--primary-strong); }
#monash-theme-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
#monash-theme-toggle svg { width: 22px; height: 22px; display: block; }
@media (max-width: 600px) { #monash-theme-toggle { width: 42px; height: 42px; left: 12px; bottom: 12px; } }

/* ─────────────────────────────────────────────────────────────────
   Viewer loading spinner (shown until the app iframe fires onLoad).
   ───────────────────────────────────────────────────────────────── */
.viewer-loading {
  position: absolute; inset: 48px 0 0 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  pointer-events: none;
}
.viewer-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  animation: viewer-spin 0.8s linear infinite;
}
@keyframes viewer-spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────────────────────────
   Accessibility: respect reduced-motion preference.
   ───────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keyboard focus visibility for interactive shell elements. */
.atab:focus-visible, .cv-card:focus-visible, .sr-card:focus-visible,
.ft-card:focus-visible, .bm-star:focus-visible, .cv-tag:focus-visible,
.sr-clear:focus-visible, .vb-close:focus-visible, .vb-step:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* Empty-state hint + inline clear action. */
.atlas .empty-hint { font-size: 13.5px; color: var(--muted); margin: 10px 0 18px; }
.atlas .empty-clear { display: inline-block; }

/* Feedback error state. */
.fb-error {
  font-size: 12.5px; color: #C33603;
  background: rgba(195,54,3,0.07);
  border: 1px solid rgba(195,54,3,0.25);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 10px;
}
html[data-theme="dark"] .fb-error { color: #FF8A5C; background: rgba(195,54,3,0.18); border-color: rgba(255,138,92,0.35); }
