/* ==========================================================================
   Sydney Quant — design system
   Dark, terminal-adjacent, built for a research studio.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:        #06080d;
  --bg-2:      #080b12;
  --surface:   #0d1219;
  --surface-2: #111823;
  --surface-3: #161f2c;

  /* Lines */
  --line:   rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);

  /* Ink */
  --ink:   #e9edf5;
  --ink-2: #a3adc2;
  --ink-3: #6d7789;

  /* Brand */
  --teal:       #5eead4;
  --teal-2:     #2dd4bf;
  --teal-dim:   #14b8a6;
  --amber:      #f5b733;
  --violet:     #8b7bff;

  /* Chart roles (validated against surface #0d1219, dark mode) */
  --viz-median:  #c98500;
  --viz-band:    #0d9488;
  --viz-bar:     #0d9488;
  --viz-ref:     #6d7789;

  /* Status */
  --st-live:  #2dd4bf;
  --st-build: #f5b733;
  --st-lab:   #8b7bff;

  --glow: 0 0 0 1px rgba(94, 234, 212, 0.22), 0 18px 48px -18px rgba(94, 234, 212, 0.28);

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;

  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: min(1180px, calc(100% - 44px));
  --nav-h: 62px;

  color-scheme: dark;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: #8ff5e3; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(94, 234, 212, 0.26); color: #fff; }

/* -------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}

.lede { color: var(--ink-2); font-size: 1.0625rem; max-width: 62ch; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--teal);
  color: #04120f;
  border-radius: var(--r-sm);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}
.skip:focus { transform: none; }

/* --------------------------------------------------------------- layout -- */

.shell { width: var(--shell); margin-inline: auto; }

section { position: relative; }

.band {
  padding: clamp(72px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}

.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 28px 56px;
  align-items: end;
  margin-bottom: 52px;
}
.band-head h2 { font-size: clamp(1.85rem, 3.6vw, 2.65rem); }
.band-head .lede { margin: 0; }

@media (max-width: 860px) {
  .band-head { grid-template-columns: 1fr; align-items: start; }
}

/* ------------------------------------------------------------- progress -- */

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--teal-dim), var(--teal));
  z-index: 90;
  transition: width 0.08s linear;
}

/* ------------------------------------------------------------------ nav -- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 80;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.is-stuck {
  background: rgba(6, 8, 13, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav .shell { display: flex; align-items: center; gap: 26px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-suffix { color: var(--ink-3); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 450;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.nav-links a.is-active { color: var(--teal); background: rgba(94, 234, 212, 0.09); }

.k-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.k-trigger:hover { color: var(--ink); border-color: rgba(94, 234, 212, 0.4); background: rgba(94, 234, 212, 0.07); }
.k-trigger svg { width: 14px; height: 14px; }

kbd {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}

@media (max-width: 900px) { .nav-links { display: none; } .k-trigger { margin-left: auto; } }
@media (max-width: 460px) { .k-trigger span { display: none; } }

/* ----------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  min-height: min(94vh, 880px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 72px) 0 0;
  overflow: hidden;
  isolation: isolate;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 12% 8%, rgba(94, 234, 212, 0.10), transparent 62%),
    radial-gradient(90% 60% at 92% 12%, rgba(139, 123, 255, 0.10), transparent 60%),
    linear-gradient(180deg, rgba(6, 8, 13, 0.35) 0%, rgba(6, 8, 13, 0.72) 58%, var(--bg) 100%);
  pointer-events: none;
}

.hero-inner { flex: 1; display: flex; align-items: center; padding-bottom: 56px; }

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 5rem);
  line-height: 0.99;
  letter-spacing: -0.045em;
  max-width: 15ch;
  margin-bottom: 26px;
  font-weight: 600;
}
.hero h1 .grad {
  background: linear-gradient(96deg, var(--teal) 0%, #a5b4ff 52%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede { font-size: clamp(1.02rem, 1.6vw, 1.19rem); max-width: 58ch; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: linear-gradient(180deg, var(--teal) 0%, var(--teal-2) 100%);
  border-color: transparent;
  color: #04211c;
  font-weight: 600;
}
.btn-primary:hover { background: linear-gradient(180deg, #7df3e0 0%, var(--teal) 100%); color: #04211c; box-shadow: 0 14px 34px -14px rgba(94, 234, 212, 0.7); }

/* stat strip */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-stats > div {
  padding: 22px 26px 22px 0;
  border-right: 1px solid var(--line);
}
.hero-stats > div:last-child { border-right: 0; }
.hero-stats .n {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hero-stats .l {
  margin-top: 9px;
  font-size: 0.75rem;
  color: var(--ink-3);
  letter-spacing: 0.03em;
  line-height: 1.4;
}
@media (max-width: 760px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > div { padding: 18px 20px 18px 0; }
  .hero-stats > div:nth-child(2) { border-right: 0; }
  .hero-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* --------------------------------------------------------------- ticker -- */

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 13px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.ticker-track span::after { content: "\25C6"; color: rgba(94, 234, 212, 0.45); font-size: 7px; }
.ticker-track span > i { font-style: normal; padding-left: 26px; }

@keyframes slide { to { transform: translateX(-50%); } }

/* ----------------------------------------------------------- capability -- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cap {
  background: var(--bg);
  padding: 34px 30px 36px;
  transition: background 0.25s ease;
}
.cap:hover { background: var(--surface); }
.cap-ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.2);
  color: var(--teal);
  margin-bottom: 20px;
}
.cap-ico svg { width: 19px; height: 19px; }
.cap h3 { font-size: 1.0625rem; margin-bottom: 10px; }
.cap p { color: var(--ink-2); font-size: 0.9rem; line-height: 1.62; }
.cap ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cap li {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
}

/* --------------------------------------------------------------- panels -- */

.panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.note {
  display: flex;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--teal-dim);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(20, 184, 166, 0.05);
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.6;
}
.note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--teal); }

/* ------------------------------------------------------------------ lab -- */

.lab {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.lab-controls { background: var(--surface); padding: 26px 24px 28px; }
.lab-stage    { background: var(--bg-2); padding: 24px 26px 26px; min-width: 0; }

.lab-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-title::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px var(--teal);
}

.ctrl { margin-bottom: 20px; }
.ctrl-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 9px;
}
.ctrl-top label { font-size: 0.8125rem; color: var(--ink-2); }
.ctrl-top output {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--teal);
  background: rgba(94, 234, 212, 0.09);
  padding: 2px 8px;
  border-radius: 5px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-dim) var(--fill, 50%), rgba(255, 255, 255, 0.11) var(--fill, 50%));
}
input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-dim) var(--fill, 50%), rgba(255, 255, 255, 0.11) var(--fill, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid #06080d;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.55), 0 3px 10px rgba(0, 0, 0, 0.6);
  transition: transform 0.14s ease;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid #06080d;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.55);
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.18); }

.lab-actions { display: flex; gap: 8px; margin-top: 24px; }
.lab-actions .btn { padding: 9px 14px; font-size: 0.8125rem; flex: 1; justify-content: center; }

.lab-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.lab-chart-head h3 { font-size: 0.9375rem; font-weight: 550; }
.lab-chart-head .sub { font-size: 0.75rem; color: var(--ink-3); margin-top: 3px; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; }
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: var(--ink-2);
}
.legend i {
  width: 12px; height: 3px; border-radius: 2px; flex: none;
  background: var(--k, var(--teal));
}
.legend i.sw { height: 10px; width: 10px; border-radius: 3px; }
.legend i.dash {
  height: 0; width: 14px;
  border-top: 2px dashed var(--viz-ref);
  background: none;
}

.canvas-wrap { position: relative; }
.canvas-wrap canvas { width: 100%; height: auto; border-radius: var(--r-sm); }

.tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -112%);
  transition: opacity 0.12s ease;
  background: rgba(9, 13, 20, 0.96);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 9px 11px;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.9);
  font-size: 0.75rem;
  white-space: nowrap;
  min-width: 132px;
}
.tip.on { opacity: 1; }
.tip b { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.tip .row { display: flex; justify-content: space-between; gap: 18px; color: var(--ink-2); }
.tip .row b { display: inline; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0; text-transform: none; margin: 0; }
.tip .row .v { font-family: var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 22px;
}
.kpi { background: var(--surface); padding: 15px 16px 16px; }
.kpi .k {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.kpi .v {
  font-family: var(--mono);
  font-size: 1.28rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.kpi .v.pos { color: var(--teal); }
.kpi .v.neg { color: #f18b8b; }

@media (max-width: 980px) { .lab { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.tablewrap { margin-top: 20px; overflow-x: auto; }
.tablewrap table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.tablewrap th, .tablewrap td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tablewrap th { color: var(--ink-3); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; }
.tablewrap td { color: var(--ink-2); }
.tablewrap th:first-child, .tablewrap td:first-child { text-align: left; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.toggle:hover, .toggle[aria-expanded="true"] { color: var(--teal); border-color: rgba(94, 234, 212, 0.4); }

/* ------------------------------------------------------------- projects -- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  align-items: center;
}
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.26); }
.chip[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #04211c;
  font-weight: 550;
}
.chip .ct { font-family: var(--mono); font-size: 10px; opacity: 0.66; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(316px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: transform 0.22s cubic-bezier(.2,.7,.3,1), border-color 0.22s ease, background 0.22s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(94, 234, 212, 0.11), transparent 68%);
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); border-color: rgba(94, 234, 212, 0.3); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card.is-out { display: none; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.card h3 { font-size: 1.0625rem; letter-spacing: -0.025em; }
.card .cat {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 7px;
}
.card p { color: var(--ink-2); font-size: 0.875rem; line-height: 1.6; flex: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
  flex: none;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.live  { color: var(--st-live);  background: rgba(45, 212, 191, 0.09); }
.badge.build { color: var(--st-build); background: rgba(245, 183, 51, 0.09); }
.badge.lab   { color: var(--st-lab);   background: rgba(139, 123, 255, 0.09); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 5px;
  padding: 3px 7px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--teal);
  font-weight: 500;
}
.card-foot svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.card:hover .card-foot svg { transform: translateX(3px); }

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--ink-3);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
}

/* ----------------------------------------------------------- principles -- */

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 34px 40px; }
.rule { border-top: 1px solid var(--line-2); padding-top: 20px; }
.rule .n { font-family: var(--mono); font-size: 11px; color: var(--teal); letter-spacing: 0.12em; margin-bottom: 12px; }
.rule h3 { font-size: 1.0625rem; margin-bottom: 9px; }
.rule p { color: var(--ink-2); font-size: 0.875rem; line-height: 1.62; }

/* ---------------------------------------------------------------- about -- */

.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-grid p { color: var(--ink-2); }
.about-grid strong { color: var(--ink); font-weight: 550; }

.idcard { padding: 28px 26px; }
.idcard .who {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 14px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(94, 234, 212, 0.18), rgba(139, 123, 255, 0.18));
  border: 1px solid var(--line-2);
}
.avatar svg { width: 26px; height: 26px; color: var(--teal); }
.idcard .who h3 { font-size: 1.0625rem; font-family: var(--mono); letter-spacing: -0.01em; }
.idcard .who .r { font-size: 0.8125rem; color: var(--ink-3); margin-top: 4px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 11px 18px; font-size: 0.8125rem; }
.kv dt { color: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; color: var(--ink-2); }

/* -------------------------------------------------------------- contact -- */

.contact { text-align: center; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 20px; }
.contact .lede { margin-inline: auto; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }

.copybtn { position: relative; }
.copybtn .done {
  position: absolute;
  inset: auto 0 calc(100% + 10px) 0;
  margin: auto;
  width: max-content;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  pointer-events: none;
}
.copybtn.copied .done { opacity: 1; transform: none; }

/* --------------------------------------------------------------- footer -- */

footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 40px;
  background: var(--bg-2);
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--ink-3); }
.foot-links a:hover { color: var(--teal); }

/* --------------------------------------------------------- detail sheet -- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s;
}
.scrim.on { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 101;
  width: min(560px, 100%);
  background: var(--bg-2);
  border-left: 1px solid var(--line-2);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(101%);
  transition: transform 0.34s cubic-bezier(.22,.75,.3,1);
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, 0.9);
}
.sheet.on { transform: none; }

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  background: rgba(8, 11, 18, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.sheet-head .t { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.iconbtn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
  transition: all 0.18s ease;
}
.iconbtn:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.06); }
.iconbtn svg { width: 15px; height: 15px; }

.sheet-body { padding: 30px 26px 46px; }
.sheet-body h2 { font-size: 1.85rem; margin-bottom: 12px; }
.sheet-body .sub { color: var(--ink-2); font-size: 1rem; margin-bottom: 24px; }
.sheet-body h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 30px 0 13px;
  font-weight: 500;
}
.sheet-body ul { margin: 0; padding-left: 19px; color: var(--ink-2); font-size: 0.9rem; line-height: 1.68; }
.sheet-body ul li { margin-bottom: 8px; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sheet-links .btn { padding: 10px 16px; font-size: 0.8375rem; }

/* ------------------------------------------------------- command palette -- */

.kpal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: start center;
  padding: clamp(56px, 12vh, 130px) 18px 18px;
  background: rgba(3, 5, 9, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.kpal.on { opacity: 1; visibility: visible; }

.kbox {
  width: min(620px, 100%);
  max-height: min(62vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
  transform: translateY(-10px) scale(0.985);
  transition: transform 0.22s cubic-bezier(.2,.8,.3,1);
}
.kpal.on .kbox { transform: none; }

.kbox-in { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.kbox-in svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.kbox-in input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  outline: none;
}
.kbox-in input::placeholder { color: var(--ink-3); }

.kbox-list { overflow-y: auto; padding: 8px; }
.kbox-group { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-3); padding: 12px 12px 7px; }
.kitem {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--ink-2);
  transition: background 0.12s ease;
}
.kitem .nm { color: var(--ink); font-size: 0.9rem; }
.kitem .ds { font-size: 0.75rem; color: var(--ink-3); margin-top: 2px; }
.kitem .go { margin-left: auto; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); flex: none; }
.kitem.sel { background: rgba(94, 234, 212, 0.11); }
.kitem.sel .go { color: var(--teal); }
.kdot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--ink-3); }
.kdot.live { background: var(--st-live); }
.kdot.build { background: var(--st-build); }
.kdot.lab { background: var(--st-lab); }
.kbox-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  color: var(--ink-3);
  background: var(--bg-2);
}
.kbox-foot span { display: inline-flex; align-items: center; gap: 6px; }
.knone { padding: 34px 16px; text-align: center; color: var(--ink-3); font-size: 0.875rem; }

/* --------------------------------------------------------------- reveal -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
}

/* ==========================================================================
   Instruments, showcase and lab — added with the interactive build.
   ========================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted-note { color: var(--ink-3); font-size: 0.8125rem; margin: 0; }

/* ----------------------------------------------------------------- tabs -- */

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 26px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--teal); color: #04211c; font-weight: 550; }
.tab svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------- verdict -- */

.verdict {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r);
  border: 1px solid;
  margin-bottom: 22px;
}
.verdict svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.verdict b { display: block; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; }
.verdict i { display: block; font-style: normal; color: var(--ink-2); font-size: 0.8375rem; margin-top: 4px; line-height: 1.55; }
.verdict.good { color: #2dd4bf; border-color: rgba(45, 212, 191, 0.35); background: rgba(13, 148, 136, 0.10); }
.verdict.flat { color: var(--ink-2); border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }
.verdict.bad  { color: #e0526e; border-color: rgba(224, 82, 110, 0.35); background: rgba(224, 82, 110, 0.09); }

/* ----------------------------------------------------------------- meter -- */

.meter-wrap { padding: 44px 4px 20px; }
.meter {
  position: relative;
  height: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}
.meter-gap {
  position: absolute;
  top: -1px; bottom: -1px;
  border-radius: 5px;
  transition: left 0.12s ease, width 0.12s ease;
}
.meter-gap.good { background: rgba(13, 148, 136, 0.62); }
.meter-gap.bad  { background: rgba(224, 82, 110, 0.55); }

.mark {
  position: absolute;
  top: 50%;
  width: 0;
  transition: left 0.12s ease;
}
.mark::before {
  content: "";
  position: absolute;
  left: -1px; top: -13px;
  width: 2px; height: 26px;
  background: currentColor;
  border-radius: 2px;
}
.mark span {
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid currentColor;
}
.mark.flip span { transform: translateX(-50%); }
.mark.mine { color: var(--teal); }
.mark.mine span { top: -38px; }
.mark.mkt { color: var(--ink-2); }
.mark.mkt span { top: 18px; }

.meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- fund chips */

.fundpicker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.fundchip {
  text-align: left;
  padding: 9px 15px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}
.fundchip b { display: block; font-family: var(--mono); font-size: 0.875rem; color: var(--ink); letter-spacing: 0.02em; }
.fundchip i { display: block; font-style: normal; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
.fundchip:hover { border-color: rgba(255, 255, 255, 0.28); }
.fundchip[aria-pressed="true"] { border-color: var(--teal); background: rgba(94, 234, 212, 0.10); }
.fundchip[aria-pressed="true"] b { color: var(--teal); }

/* ------------------------------------------------------ horizontal bars -- */

.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: 190px minmax(0, 1fr) 92px; gap: 14px; align-items: center; }
.hbar-k b { font-family: var(--mono); font-size: 0.8125rem; color: var(--ink); }
.hbar-k i {
  display: block; font-style: normal; font-size: 11px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hbar-track { height: 16px; background: rgba(255, 255, 255, 0.04); border-radius: 4px; overflow: hidden; }
.hbar-fill {
  height: 100%;
  background: var(--viz-bar);
  border-radius: 0 4px 4px 0;
  transition: width 0.25s cubic-bezier(.2,.7,.3,1);
}
.hbar.shared .hbar-fill { background: var(--teal-dim); }
.hbar-v {
  font-family: var(--mono); font-size: 0.8125rem; color: var(--ink);
  font-variant-numeric: tabular-nums; text-align: right;
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
}
.hbar-v em {
  font-style: normal; font-family: var(--mono); font-size: 9.5px;
  color: var(--teal); background: rgba(94, 234, 212, 0.12);
  padding: 2px 5px; border-radius: 4px; cursor: help;
}
@media (max-width: 620px) { .hbar { grid-template-columns: 116px minmax(0, 1fr) 78px; gap: 10px; } .hbar-k i { display: none; } }

/* --------------------------------------------------------------- matrix -- */

.matrix { border-collapse: separate; border-spacing: 3px; font-family: var(--mono); font-size: 0.75rem; }
.matrix th {
  color: var(--ink-3); font-weight: 500; font-size: 10px;
  letter-spacing: 0.1em; padding: 6px 10px; text-align: center;
}
.matrix td {
  padding: 10px 14px; text-align: center; border-radius: 6px;
  border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.matrix td.self { color: var(--ink-3); background: rgba(255, 255, 255, 0.02); }

/* ------------------------------------------------------------ tax bands -- */

.taxbands { display: flex; height: 26px; border-radius: 6px; overflow: hidden; gap: 2px; margin-bottom: 20px; }
.taxbands .seg { transition: width 0.25s cubic-bezier(.2,.7,.3,1); min-width: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 9px; vertical-align: -1px; }

.quickset { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.quickset button {
  font-family: var(--mono); font-size: 11px; padding: 5px 10px;
  border-radius: 6px; border: 1px solid var(--line-2);
  background: none; color: var(--ink-3); cursor: pointer; transition: all 0.16s ease;
}
.quickset button:hover { color: var(--teal); border-color: rgba(94, 234, 212, 0.4); }

/* ------------------------------------------------------------ visualiser */

.viz-shell { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 1px; background: var(--line); }
@media (max-width: 900px) { .viz-shell { grid-template-columns: 1fr; } }

.viz-stage { background: #04060a; padding: 0; position: relative; min-height: 340px; }
/* Absolute so the canvas fills the row height set by the control column,
   instead of leaving a dead strip under a fixed-height canvas. */
#vizCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viz-side { background: var(--surface); padding: 22px 20px; }

.viz-controls { display: flex; flex-direction: column; gap: 8px; }
.viz-controls .btn { justify-content: center; width: 100%; padding: 10px 14px; font-size: 0.8375rem; }
#vizPlay .ico-stop, #vizPlay[aria-pressed="true"] .ico-play { display: none; }
#vizPlay[aria-pressed="true"] .ico-stop { display: block; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.viz-status {
  margin-top: 18px; padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.75rem; color: var(--ink-3); line-height: 1.5;
  display: flex; gap: 9px; align-items: flex-start;
}
.viz-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3); flex: none; margin-top: 6px;
}
.viz-status.on { color: var(--ink-2); }
.viz-status.on::before { background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.bands { margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }
.band-row { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 11px; align-items: center; }
.band-row span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.band-row i { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.band-row i b { display: block; height: 100%; border-radius: 3px; background: var(--teal-dim); width: 0; transition: width 0.08s linear; }
.band-row.hi i b { background: var(--teal); }

/* ------------------------------------------------------------- showcase -- */

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 940px) { .showcase { grid-template-columns: 1fr; gap: 40px; } }

.showcase-art {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 70% at 50% 24%, rgba(245, 183, 51, 0.16), transparent 66%),
    linear-gradient(180deg, #131c33 0%, #0a1020 100%);
  padding: 48px 40px 44px;
  text-align: center;
  overflow: hidden;
}
.showcase-art::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 40% at 50% 100%, rgba(245, 183, 51, 0.10), transparent 70%);
  pointer-events: none;
}
.showcase-art img { width: min(280px, 78%); margin: 0 auto 26px; filter: drop-shadow(0 20px 44px rgba(0, 0, 0, .55)); }
.showcase-art .tagline {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber);
}

.appfacts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 28px;
}
.appfacts div { background: var(--surface); padding: 13px 15px; }
.appfacts dt {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px;
}
.appfacts dd { margin: 0; font-size: 0.875rem; color: var(--ink); }
@media (max-width: 520px) { .appfacts { grid-template-columns: repeat(2, 1fr); } }

.applinks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.storebtn {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 20px 11px 17px; border-radius: 999px;
  background: #fff; color: #06080d; font-weight: 600; font-size: 0.9rem;
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}
.storebtn:hover { transform: translateY(-1px); color: #06080d; box-shadow: 0 14px 32px -14px rgba(255, 255, 255, 0.5); }
.storebtn svg { width: 20px; height: 20px; }
.storebtn i { display: block; font-style: normal; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; opacity: .62; font-weight: 500; }

/* ------------------------------------------------------- trading detail -- */

.tdetail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tstep { background: var(--bg); padding: 30px 28px 32px; transition: background 0.25s ease; }
.tstep:hover { background: var(--surface); }
.tstep .n {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--teal); margin-bottom: 14px;
}
.tstep h3 { font-size: 1.0625rem; margin-bottom: 10px; }
.tstep p { color: var(--ink-2); font-size: 0.875rem; line-height: 1.62; }
.tstep ul { margin: 15px 0 0; padding: 0; list-style: none; }
.tstep li {
  position: relative; padding-left: 17px; font-size: 0.8125rem;
  color: var(--ink-3); line-height: 1.55; margin-bottom: 6px;
}
.tstep li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--teal-dim);
}
/* Six stages read as two rows of three; never leave a ragged trailing row. */
@media (max-width: 1040px) { .tdetail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 660px)  { .tdetail { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- media frame */

.mediaframe {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #04060a;
  margin: 18px 0 10px;
}
.mediaframe video { width: 100%; display: block; }
.mediacap { font-size: 0.75rem; color: var(--ink-3); line-height: 1.55; }

/* ------------------------------------------------------- instrument shell */

.inst {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.inst-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1px; background: var(--line); }
.inst-side { background: var(--surface); padding: 26px 24px 28px; }
.inst-main { background: var(--bg-2); padding: 26px 28px 30px; min-width: 0; }
@media (max-width: 980px) { .inst-grid { grid-template-columns: 1fr; } }

.inst-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 20px;
  display: flex; align-items: center; gap: 8px;
}
.inst-title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 9px var(--teal);
}
.inst-head { margin-bottom: 18px; }
.inst-head h3 { font-size: 0.9375rem; font-weight: 550; }
.inst-head .sub { font-size: 0.75rem; color: var(--ink-3); margin-top: 3px; }

/* Status badges for the verified statuses (live / internal / build / offline / lab). */
.badge.internal { color: #8b7bff; background: rgba(139, 123, 255, 0.09); }
.badge.offline  { color: var(--ink-3); background: rgba(255, 255, 255, 0.035); }
.kdot.internal { background: #8b7bff; }
.kdot.offline  { background: var(--ink-3); }

/* Dossier extras: verified store facts and embedded media. */
.sheet-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: 4px;
}
.sheet-facts div { background: var(--surface); padding: 11px 14px; }
.sheet-facts dt {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.sheet-facts dd { margin: 0; font-size: 0.8375rem; color: var(--ink); }
