:root {
  --bg: #07080a;
  --bg-elev: #0d0f13;
  --panel: rgba(20, 23, 29, 0.78);
  --panel-solid: #14171d;
  --panel-hover: rgba(28, 32, 41, 0.92);
  --gold: #d8b36c;
  --gold-bright: #f3d99d;
  --gold-dim: rgba(216, 179, 108, 0.16);
  --cyan: #4ecdc4;
  --cyan-dim: rgba(78, 205, 196, 0.14);
  --coral: #e07a5f;
  --coral-dim: rgba(224, 122, 95, 0.15);
  --muted: #a6a7ab;
  --text: #f5f1e8;
  --line: rgba(255, 255, 255, 0.09);
  --line-gold: rgba(216, 179, 108, 0.34);
  --radius: 20px;
  --radius-sm: 12px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --mx: 50vw;
  --my: 30vh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.65 var(--font-sans);
  overflow-x: hidden;
  position: relative;
}

/* Ambient Blobs & FX Canvas */
.ambient-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.24;
  animation: floatBlob 18s ease-in-out infinite alternate;
}

.blob-gold {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #d8b36c 0%, transparent 70%);
  top: -140px;
  right: 8%;
}

.blob-cyan {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, #3a9ca8 0%, transparent 70%);
  bottom: -120px;
  left: 18%;
  animation-delay: -6s;
}

.blob-warm {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #8d5b4c 0%, transparent 70%);
  top: 42%;
  left: 55%;
  animation-delay: -11s;
  opacity: 0.15;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 25px) scale(1.08); }
  100% { transform: translate(25px, -20px) scale(0.95); }
}

#fx-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Global Interactive Elements */
button, input, select, textarea {
  font: inherit;
}

button, a, input, select, summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  background: rgba(30, 33, 41, 0.85);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

button:hover {
  border-color: var(--gold);
  background: rgba(216, 179, 108, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(216, 179, 108, 0.3);
}

button.primary, .primary {
  background: linear-gradient(135deg, #e5c47f 0%, #c89d4f 100%);
  color: #12100c;
  border-color: var(--gold-bright);
  font-weight: 700;
  box-shadow: 0 8px 24px -6px rgba(216, 179, 108, 0.45);
}

button.primary:hover, .primary:hover {
  background: linear-gradient(135deg, #f3d99d 0%, #d8b36c 100%);
  color: #090806;
  box-shadow: 0 12px 30px -4px rgba(243, 217, 157, 0.6);
}

.quiet {
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  font-size: 11.5px;
  padding: 7px 12px;
  border-radius: 8px;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* Sidebar */
aside {
  width: 248px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 26px 22px;
  background: rgba(12, 14, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.logo {
  font: 700 80px/0.86 var(--font-serif);
  letter-spacing: -5px;
  color: var(--text);
  display: inline-block;
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo span, .intro-mark span {
  color: var(--gold);
}

.brand-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 2.8px;
  line-height: 1.75;
  margin: 14px 0 32px;
  color: var(--muted);
}

.nav-label, .eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold);
}

.nav-label {
  color: #7c7e84;
  margin-bottom: 12px;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  padding: 11px 14px;
  border-radius: 11px;
  color: #b4b5b9;
  display: flex;
  gap: 13px;
  align-items: center;
  font-weight: 500;
  font-size: 13.5px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

nav a b {
  font: 600 17px var(--font-serif);
  min-width: 22px;
  color: #7c7567;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.06);
}

nav a.active {
  color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(216, 179, 108, 0.18) 0%, rgba(216, 179, 108, 0.04) 100%);
  border-color: rgba(216, 179, 108, 0.35);
  box-shadow: inset 3px 0 0 var(--gold);
}

nav a.active b {
  color: var(--gold);
}

.side-meta {
  margin-top: auto;
  padding: 14px;
  border-radius: 12px;
  background: rgba(216, 179, 108, 0.06);
  border: 1px solid rgba(216, 179, 108, 0.18);
  margin-bottom: 16px;
}

.side-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-bright);
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ecdc4;
  box-shadow: 0 0 10px #4ecdc4;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.side-loc {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.side-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 13px;
}

.side-bottom small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.avatar {
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  background: rgba(216, 179, 108, 0.12);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 15px var(--font-serif);
  color: var(--gold-bright);
  flex-shrink: 0;
}

.agency {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 18px;
}

/* Workspace & Header */
.workspace {
  margin-left: 248px;
  position: relative;
  z-index: 2;
}

header {
  height: 74px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 13, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  padding: 0 38px;
  gap: 20px;
  font-size: 12.5px;
  color: var(--muted);
}

#breadcrumb {
  font-weight: 600;
  color: var(--text);
}

.header-note {
  margin-left: auto;
  font-size: 9.5px;
  letter-spacing: 2.2px;
  color: var(--gold);
  font-weight: 700;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

main {
  max-width: 1440px;
  margin: auto;
  padding: 34px 38px 75px;
  min-height: calc(100vh - 140px);
}

/* Typography */
h1, h2, h3, h4, p {
  margin-top: 0;
}

h1 {
  font: 600 50px/1.08 var(--font-serif);
  letter-spacing: -1px;
  margin-bottom: 14px;
  color: var(--text);
}

h2 {
  font: 600 32px/1.18 var(--font-serif);
  margin-bottom: 14px;
  color: var(--text);
}

h3 {
  font: 600 23px/1.25 var(--font-serif);
  margin-bottom: 10px;
  color: var(--text);
}

h4 {
  font: 700 14px/1.35 var(--font-sans);
  margin-bottom: 8px;
  color: var(--gold-bright);
}

p {
  color: var(--muted);
}

.page-title {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-title .eyebrow {
  display: block;
  margin-bottom: 10px;
}

/* Hero with Interactive 3D Viewport */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 390px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(24, 24, 22, 0.92) 0%, rgba(14, 16, 20, 0.95) 100%);
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin: 18px 0 32px;
  position: relative;
}

.hero-copy {
  padding: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: 56px;
  max-width: 560px;
  margin: 12px 0 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f3d99d 60%, #d8b36c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 470px;
  font-size: 15.5px;
  color: #c7c4bc;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  background: radial-gradient(ellipse at center, rgba(69, 60, 43, 0.45) 0%, rgba(20, 22, 27, 0.85) 60%, #0b0c0f 100%);
  border-left: 1px solid var(--line);
}

#skin-3d-canvas {
  width: 100%;
  height: 100%;
  min-height: 300px;
  flex: 1;
  cursor: grab;
  display: block;
}

#skin-3d-canvas:active {
  cursor: grabbing;
}

.lab-3d-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(9, 10, 13, 0.82);
  border-top: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
}

.lab-3d-controls .btn-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pill-btn {
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill-btn.active {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.pill-btn.state-alert.active {
  background: var(--coral-dim);
  border-color: var(--coral);
  color: #ffb49e;
}

/* KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.kpi-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.kpi-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(280px circle at var(--card-mx, 50%) var(--card-my, 50%), rgba(216, 179, 108, 0.1), transparent 70%);
  pointer-events: none;
}

.kpi-val {
  font: 700 36px/1 var(--font-serif);
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.kpi-label {
  font-size: 11.5px;
  color: var(--muted);
}

/* Section Headers & Grids */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 36px 0 18px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
}

.section-head a, .section-head .link-gold {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
}

/* Cards with 3D Tilt & Specular Sheen */
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.18s ease-out;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--card-mx, 50%) var(--card-my, 0%), rgba(216, 179, 108, 0.11), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(216, 179, 108, 0.42);
  box-shadow: 0 18px 40px -15px rgba(0, 0, 0, 0.65);
}

.card:hover::before {
  opacity: 1;
}

.card p {
  font-size: 13.5px;
}

.card button, .card .actions {
  margin-top: auto;
}

.card .eyebrow {
  display: block;
  margin-bottom: 12px;
}

/* Cluster Cards with Photography */
.cluster-card {
  padding: 0;
  overflow: hidden;
}

.cluster-img-wrap {
  position: relative;
  height: 185px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.cluster-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.cluster-card:hover .cluster-img-wrap img {
  transform: scale(1.06);
}

.cluster-weight-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(9, 10, 13, 0.85);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  font: 700 12px var(--font-mono);
  padding: 4px 10px;
  border-radius: 99px;
  backdrop-filter: blur(8px);
}

.cluster-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Storyboard Grid */
.storyboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 22px;
}

.shot-card {
  background: rgba(12, 14, 18, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.shot-img-box {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #090a0d;
  overflow: hidden;
}

.shot-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-time {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(216, 179, 108, 0.95);
  color: #111;
  font: 700 10px var(--font-mono);
  padding: 3px 8px;
  border-radius: 6px;
}

.shot-info {
  padding: 12px 14px;
}

.shot-info h4 {
  font-size: 13px;
  margin: 0 0 5px;
  color: var(--text);
}

.shot-info p {
  font-size: 12px;
  margin: 0;
  line-height: 1.45;
}

/* Technical Timecode & Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 14, 18, 0.75);
  margin: 14px 0 22px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.data-table th {
  background: rgba(216, 179, 108, 0.12);
  color: var(--gold-bright);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-gold);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: #d6d3cb;
  vertical-align: top;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.mono-badge {
  font: 600 11px var(--font-mono);
  color: var(--gold-bright);
  background: rgba(216, 179, 108, 0.14);
  border: 1px solid rgba(216, 179, 108, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.score-badge {
  font: 700 11.5px var(--font-mono);
  color: #091312;
  background: var(--cyan);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.overlay-chip {
  font: 700 10.5px var(--font-sans);
  letter-spacing: 0.6px;
  color: var(--gold-bright);
  background: rgba(216, 179, 108, 0.1);
  border-left: 2px solid var(--gold);
  padding: 4px 8px;
  display: inline-block;
}

/* Sub-navigation Tabs (Biblioteca / Data Explorer) */
.subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
  padding: 6px;
  background: rgba(14, 16, 21, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.subtab-btn {
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.subtab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transform: none;
  box-shadow: none;
}

.subtab-btn.active {
  background: linear-gradient(135deg, rgba(216, 179, 108, 0.24) 0%, rgba(216, 179, 108, 0.08) 100%);
  color: var(--gold-bright);
  border-color: var(--gold);
}

/* Ethnography 5-Dimension Matrix */
.ethno-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.ethno-box {
  background: rgba(11, 13, 17, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.ethno-box.full-span {
  grid-column: 1 / -1;
}

.ethno-box h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ethno-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ethno-list li {
  font-size: 13px;
  color: #d2cfc7;
  line-height: 1.5;
  padding-left: 12px;
  border-left: 2px solid rgba(216, 179, 108, 0.35);
}

/* Tags, Badges, Progress & Forms */
.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--gold-bright);
  background: rgba(216, 179, 108, 0.12);
  border: 1px solid rgba(216, 179, 108, 0.28);
  padding: 3px 9px;
  border-radius: 99px;
  display: inline-block;
  margin: 0 6px 8px 0;
}

.tag.cyan {
  color: #8bf2ea;
  background: var(--cyan-dim);
  border-color: rgba(78, 205, 196, 0.35);
}

.num {
  font: 700 42px/1 var(--font-serif);
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

.progress-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0;
  border-radius: 99px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--cyan) 100%);
  border-radius: 99px;
  transition: width 0.35s ease;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

input, select, textarea {
  background: #0d0f14;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 11px 14px;
  max-width: 100%;
  font-size: 13.5px;
}

input[type=search] {
  flex: 1;
  min-width: 200px;
}

textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}

label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

details {
  border: 1px solid var(--line);
  background: rgba(17, 19, 25, 0.68);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

details[open] {
  border-color: rgba(216, 179, 108, 0.4);
  background: rgba(20, 23, 30, 0.9);
}

summary {
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

details p {
  margin: 12px 0 0;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.notice {
  border-left: 3px solid var(--gold);
  background: rgba(216, 179, 108, 0.07);
  padding: 12px 16px;
  border-radius: 0 12px 12px 0;
  font-size: 13px;
  color: #d8d4ca;
  margin: 16px 0;
}

.steps {
  padding-left: 18px;
  margin: 12px 0;
}

.steps li {
  margin: 8px 0;
  color: #ccc9c0;
  font-size: 13.5px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.check input {
  accent-color: var(--gold);
  margin-top: 4px;
  width: 16px;
  height: 16px;
}

.check label {
  color: var(--text);
  font-weight: 400;
  font-size: 13.5px;
  cursor: pointer;
}

.script {
  white-space: pre-line;
  font: 500 21px/1.75 var(--font-serif);
  color: #f3ede0;
  background: rgba(9, 10, 13, 0.75);
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 16px 0;
}

.source {
  font-size: 11px;
  color: #8c8d92;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.stat {
  font: 700 48px/1 var(--font-serif);
  color: var(--gold-bright);
}

.empty {
  padding: 48px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Weight Distribution Bars */
.weight-bar-row {
  margin-bottom: 12px;
}

.weight-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

/* Modals (Detail & Teleprompter) */
dialog {
  background: #12141a;
  color: var(--text);
  border: 1px solid var(--line-gold);
  border-radius: 22px;
  width: min(980px, 95vw);
  max-height: 90vh;
  padding: 28px 32px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
}

dialog::backdrop {
  background: rgba(4, 5, 8, 0.82);
  backdrop-filter: blur(8px);
}

.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.close {
  font-size: 22px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
}

#prompter {
  width: min(1060px, 96vw);
}

.prompter-guide {
  text-align: center;
  font: 700 10px var(--font-mono);
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(216, 179, 108, 0.09);
  border-y: 1px dashed rgba(216, 179, 108, 0.35);
  padding: 5px;
  margin-top: 14px;
}

#prompt-text {
  height: 56vh;
  overflow: auto;
  font: 600 34px/1.75 var(--font-serif);
  color: #f7f3eb;
  white-space: pre-line;
  padding: 32px 9%;
  background: #090a0d;
  border-radius: 0 0 16px 16px;
  border: 1px solid var(--line);
}

#prompt-text.mirrored {
  transform: scaleX(-1);
}

.prompt-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.prompt-controls input[type=range] {
  width: 115px;
  padding: 0;
}

.mirror-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Footer & Toast */
footer {
  border-top: 1px solid var(--line);
  padding: 22px 38px;
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8d8b87;
}

footer span {
  margin: auto;
  letter-spacing: 0;
}

#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f3d99d 0%, #d8b36c 100%);
  color: #111;
  font-weight: 700;
  font-size: 13px;
  padding: 11px 22px;
  border-radius: 99px;
  z-index: 50;
  display: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

/* Intro Screen with 3D Orbital Rings */
#intro {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #171510 0%, #090a0d 70%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

#intro[hidden] {
  display: none;
}

.intro-orbit {
  position: absolute;
  width: 520px;
  height: 520px;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(216, 179, 108, 0.25);
}

.ring-1 {
  width: 340px;
  height: 340px;
  animation: spinOrbit 22s linear infinite;
  border-top-color: var(--gold);
}

.ring-2 {
  width: 440px;
  height: 440px;
  animation: spinOrbit 32s linear infinite reverse;
  border-right-color: var(--cyan);
}

.ring-3 {
  width: 520px;
  height: 520px;
  border-style: dashed;
  animation: spinOrbit 45s linear infinite;
}

@keyframes spinOrbit {
  from { transform: rotate(0deg) scaleY(0.78); }
  to { transform: rotate(360deg) scaleY(0.78); }
}

.intro-mark {
  font: 700 165px/0.9 var(--font-serif);
  letter-spacing: -10px;
  color: var(--text);
  z-index: 1;
  margin: 10px 0;
  animation: reveal 0.9s ease both;
}

.intro-sub {
  font: 500 22px/1.45 var(--font-serif);
  color: #e2dbcd;
  max-width: 580px;
  margin: 8px 0 22px;
  z-index: 1;
}

.intro-sub small {
  display: block;
  font: 500 12.5px var(--font-sans);
  color: var(--muted);
  margin-top: 8px;
}

.intro-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
  z-index: 1;
}

.intro-badges span {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(216, 179, 108, 0.12);
  border: 1px solid rgba(216, 179, 108, 0.3);
  padding: 5px 12px;
  border-radius: 99px;
}

.intro-btn {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 99px;
  z-index: 1;
}

.skip {
  position: fixed;
  left: 260px;
  top: -100px;
  z-index: 60;
  background: var(--gold);
  color: black;
  padding: 12px;
}

.skip:focus {
  top: 0;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Responsive Breakpoints */
@media (max-width: 1140px) {
  aside { width: 205px; padding: 22px 16px; }
  .workspace { margin-left: 205px; }
  main { padding: 28px 24px 65px; }
  header { padding: 0 24px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { border-left: none; border-top: 1px solid var(--line); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-note { display: none; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 780px) {
  aside {
    inset: auto 0 0 0;
    width: 100%;
    height: 68px;
    padding: 4px 8px;
    border-top: 1px solid var(--line);
    border-right: none;
    background: rgba(10, 11, 14, 0.96);
  }
  aside > .logo, .brand-sub, .nav-label, .side-meta, .side-bottom, .agency {
    display: none;
  }
  nav {
    display: flex;
    justify-content: space-around;
    gap: 2px;
    height: 100%;
  }
  nav a {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    font-size: 10px;
    min-width: 48px;
    box-shadow: none !important;
  }
  nav a b {
    font-size: 15px;
    text-align: center;
  }
  .workspace { margin-left: 0; }
  header { height: 62px; padding: 0 16px; }
  main { padding: 22px 16px 90px; }
  h1 { font-size: 36px; }
  .hero-copy { padding: 24px 20px; }
  .hero h1 { font-size: 38px; }
  .grid, .grid.two, .grid.four, .split, .ethno-matrix, .storyboard-grid {
    grid-template-columns: 1fr;
  }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { padding: 20px 16px 90px; flex-wrap: wrap; }
  footer span { width: 100%; order: 3; margin-top: 6px; }
  dialog { padding: 20px 16px; }
  .intro-mark { font-size: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
