/* ================================================================
   OCG Governance Dashboard — Dark Modern Theme
   ================================================================ */

/* ---- Variables ---- */
:root {
  --bg0: #050810;
  --bg1: #0a0f1e;
  --bg2: #111827;
  --card: rgba(255,255,255,0.038);
  --card-h: rgba(255,255,255,0.065);
  --bdr: rgba(255,255,255,0.08);
  --bdr-h: rgba(255,255,255,0.15);
  --bdr-blue: rgba(79,142,247,0.4);
  --bdr-green: rgba(34,211,160,0.35);
  --bdr-red: rgba(248,113,113,0.35);
  --bdr-amber: rgba(245,158,11,0.35);
  --bdr-purple: rgba(167,139,250,0.35);

  --t1: #e2e8f4;
  --t2: #8892a4;
  --t3: #4a5568;
  --t4: #2d3748;

  --blue: #4f8ef7;
  --green: #22d3a0;
  --purple: #a78bfa;
  --amber: #f59e0b;
  --red: #f87171;

  --bg-blue: rgba(79,142,247,0.1);
  --bg-green: rgba(34,211,160,0.08);
  --bg-red: rgba(248,113,113,0.08);
  --bg-purple: rgba(167,139,250,0.1);
  --bg-amber: rgba(245,158,11,0.09);

  --glow-blue: 0 0 20px rgba(79,142,247,0.25), 0 0 50px rgba(79,142,247,0.08);
  --glow-green: 0 0 20px rgba(34,211,160,0.25), 0 0 50px rgba(34,211,160,0.08);
  --glow-red: 0 0 20px rgba(248,113,113,0.25);

  --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --ease: cubic-bezier(0.4,0,0.2,1);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; min-height: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg0);
  color: var(--t1);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(79,142,247,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(34,211,160,0.06) 0%, transparent 60%);
}

/* ---- Canvas Background ---- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ---- App shell ---- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ================================================================
   HEADER
   ================================================================ */
.hdr {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: rgba(5,8,16,0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--bdr);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(79,142,247,0.25), rgba(34,211,160,0.2));
  border: 1px solid rgba(79,142,247,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background-clip: padding-box;
  color: var(--blue);
  letter-spacing: -0.03em;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(120deg, var(--blue) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sep {
  width: 1px;
  height: 16px;
  background: var(--bdr);
}

.brand-sub {
  font-size: 12px;
  color: var(--t3);
  white-space: nowrap;
}

/* Nav */
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 3px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  color: var(--t3);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.nav-btn:hover {
  color: var(--t2);
  background: rgba(255,255,255,0.04);
  border-color: var(--bdr);
}

.nav-btn.active {
  color: var(--t1);
  background: var(--bg-blue);
  border-color: var(--bdr-blue);
  box-shadow: var(--glow-blue);
}

.nav-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--bdr);
  color: var(--t3);
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
}

.nav-btn.active .nav-num {
  background: var(--bg-blue);
  color: var(--blue);
  border: 1px solid var(--bdr-blue);
}

.project-nav {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding-left: 12px;
  border-left: 1px solid var(--bdr);
}

.project-link {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(34,211,160,0.24);
  border-radius: var(--r-md);
  background: rgba(34,211,160,0.06);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.project-link:hover {
  border-color: rgba(34,211,160,0.46);
  background: rgba(34,211,160,0.12);
  box-shadow: var(--glow-green);
}

/* Status */
.hdr-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--t3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,211,160,0.8);
  animation: pdot 2.5s ease-in-out infinite;
}

@keyframes pdot {
  0%, 100% { box-shadow: 0 0 6px rgba(34,211,160,0.6); opacity: 1; }
  50% { box-shadow: 0 0 18px rgba(34,211,160,1), 0 0 36px rgba(34,211,160,0.3); opacity: 0.7; }
}

/* Language toggle button */
.lang-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 13px;
  background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.22);
  color: var(--blue);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.2s;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.lang-btn:hover { background: rgba(79,142,247,0.18); }

/* ================================================================
   MAIN / PANELS
   ================================================================ */
.main {
  flex: 1;
  padding: 36px 32px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.panel { display: none; }

.panel.active {
  display: block;
  animation: panel-enter 0.45s var(--ease) both;
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Panel heading */
.ph { margin-bottom: 32px; }

.ph-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}

.ph-tag::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  display: block;
}

.ph-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.ph-title span {
  background: linear-gradient(120deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ph-desc {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.85;
  max-width: 680px;
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.card:hover { background: var(--card-h); border-color: var(--bdr-h); }
.card-red { background: rgba(248,113,113,0.04); border-color: rgba(248,113,113,0.18); }
.card-red:hover { background: rgba(248,113,113,0.07); }
.card-green { background: rgba(34,211,160,0.04); border-color: rgba(34,211,160,0.18); }
.card-green:hover { background: rgba(34,211,160,0.07); }
.card-blue { background: var(--bg-blue); border-color: var(--bdr-blue); }

.ch {
  padding: 14px 18px;
  border-bottom: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ch-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.icon-red { background: var(--bg-red); }
.icon-green { background: var(--bg-green); }
.icon-blue { background: var(--bg-blue); }
.icon-amber { background: var(--bg-amber); }
.icon-purple { background: var(--bg-purple); }

.ch-title { font-size: 13px; font-weight: 600; color: var(--t1); }
.ch-sub { font-size: 11px; color: var(--t3); margin-left: auto; }

.cb { padding: 18px; }
.cb-sm { padding: 14px 18px; }

/* ================================================================
   GRIDS
   ================================================================ */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.g2l { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }

/* ================================================================
   BADGES
   ================================================================ */
.bdg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.bdg-r { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.25); }
.bdg-g { background: rgba(34,211,160,0.1); color: var(--green); border: 1px solid rgba(34,211,160,0.25); }
.bdg-b { background: var(--bg-blue); color: var(--blue); border: 1px solid rgba(79,142,247,0.25); }
.bdg-p { background: var(--bg-purple); color: var(--purple); border: 1px solid rgba(167,139,250,0.25); }
.bdg-a { background: var(--bg-amber); color: var(--amber); border: 1px solid rgba(245,158,11,0.25); }

/* ================================================================
   INSIGHT BAR
   ================================================================ */
.insight {
  margin-top: 22px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--bdr);
  border-left: 3px solid var(--blue);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--t2);
  line-height: 1.8;
}

.insight strong { color: var(--t1); font-weight: 600; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 12px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  letter-spacing: 0.01em;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-red { background: var(--bg-red); color: var(--red); border-color: rgba(248,113,113,0.3); }
.btn-red:hover { background: rgba(248,113,113,0.16); box-shadow: var(--glow-red); }

.btn-green { background: var(--bg-green); color: var(--green); border-color: rgba(34,211,160,0.3); }
.btn-green:hover { background: rgba(34,211,160,0.16); box-shadow: var(--glow-green); }

.btn-ghost { background: transparent; color: var(--t3); border-color: var(--bdr); }
.btn-ghost:hover { background: var(--card); color: var(--t2); border-color: var(--bdr-h); }

.ctrl-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--bdr);
  background: rgba(0,0,0,0.2);
}

.ctrl-label { font-size: 12px; color: var(--t3); flex: 1; }

/* ================================================================
   GRAPH STAGE (Panel 1)
   ================================================================ */
.graph-stage {
  padding: 24px 20px;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graph-stage svg { width: 100%; max-width: 400px; height: auto; }

/* Graph states */
#concept-graph .edge-problem-line {
  transition: stroke 0.5s var(--ease), stroke-opacity 0.5s var(--ease),
              filter 0.5s var(--ease);
}

#concept-graph .edge-problem-label {
  transition: fill 0.5s var(--ease), opacity 0.5s var(--ease);
}

#concept-graph .scaffold-node {
  opacity: 0;
  transform-origin: 200px 280px;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

#concept-graph .scaffold-edge {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  transition: stroke-dashoffset 0.6s var(--ease);
}

#concept-graph.diagnosed .edge-problem-line {
  stroke: var(--red) !important;
  filter: drop-shadow(0 0 6px rgba(248,113,113,0.8));
}

#concept-graph.diagnosed .edge-problem-label {
  fill: var(--red) !important;
}

#concept-graph.fixed .edge-problem-line { opacity: 0; }
#concept-graph.fixed .edge-problem-label { opacity: 0; }
#concept-graph.fixed .scaffold-node { opacity: 1; }
#concept-graph.fixed .scaffold-edge { stroke-dashoffset: 0; }

/* Status messages in graph */
.graph-status { display: none; }
.graph-status.visible { display: flex; }

/* ================================================================
   TIMELINE (Panel 3)
   ================================================================ */
.timeline { display: flex; flex-direction: column; }

.tl-item {
  display: flex;
  gap: 14px;
  position: relative;
}

.tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: var(--bdr);
}

.tl-dot {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  z-index: 1;
  transition: all 0.2s var(--ease);
}

.tl-dot.done {
  background: rgba(34,211,160,0.12);
  color: var(--green);
  border: 1px solid rgba(34,211,160,0.35);
}

.tl-dot.active-s {
  background: var(--bg-blue);
  color: var(--blue);
  border: 1px solid var(--bdr-blue);
  animation: step-pulse 2s ease-in-out infinite;
}

.tl-dot.pending {
  background: var(--card);
  color: var(--t4);
  border: 1px solid var(--bdr);
}

@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,142,247,0); }
  50% { box-shadow: 0 0 0 6px rgba(79,142,247,0.15), 0 0 16px rgba(79,142,247,0.2); }
}

.tl-body { padding: 2px 0 22px; }
.tl-title { font-size: 13px; font-weight: 600; color: var(--t1); margin-bottom: 3px; }
.tl-desc { font-size: 12px; color: var(--t3); line-height: 1.65; }

/* ================================================================
   CODE BLOCK
   ================================================================ */
.codeblk {
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.codeblk-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--bdr);
}

.mac-dot { width: 10px; height: 10px; border-radius: 50%; }
.mac-dot:nth-child(1) { background: #ff5f57; }
.mac-dot:nth-child(2) { background: #febc2e; }
.mac-dot:nth-child(3) { background: #28c840; }

.codeblk-fname {
  margin-left: 8px;
  font-size: 11px;
  color: var(--t3);
  font-family: var(--mono);
}

.codeblk-body {
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2.1;
}

.code-line { display: block; }
.ck { color: var(--t3); }
.cv { color: var(--t1); }
.ct { color: var(--blue); }
.cs { color: var(--green); }
.cd { color: var(--amber); }
.cp { color: var(--purple); }
.cr { color: var(--red); }

/* ================================================================
   COMPARISON LIST
   ================================================================ */
.cmp-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bdr);
  font-size: 12px;
  color: var(--t2);
  line-height: 1.6;
}

.cmp-row:last-child { border-bottom: none; }

/* ================================================================
   SVG UTILITIES
   ================================================================ */
.viz svg { width: 100%; height: auto; display: block; }

/* Tree lines animation */
.tree-branch {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 0.7s var(--ease);
}

.tree-branch.drawn { stroke-dashoffset: 0; }

/* ================================================================
   MISC
   ================================================================ */
.divider { height: 1px; background: var(--bdr); margin: 24px 0; }
.spacer { height: 20px; }
.spacer-sm { height: 12px; }

.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-purple { color: var(--purple); }
.text-amber { color: var(--amber); }
.text-dim { color: var(--t3); }
.text-mono { font-family: var(--mono); font-size: 11px; }

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: var(--bdr-h); border-radius: 3px; }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px currentColor); }
  50% { filter: drop-shadow(0 0 10px currentColor); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .g2, .g2l { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr 1fr; }
  .nav-btn .nav-label { display: none; }
  .brand-sub { display: none; }
  .project-link { padding: 0 9px; font-size: 11px; }
  .main { padding: 20px 16px; }
  .hdr { padding: 0 16px; }
}

@media (max-width: 600px) {
  .g3 { grid-template-columns: 1fr; }
  .ph-title { font-size: 24px; }
  .project-nav { display: none; }
}

/* OCG one-page homepage iteration */
.nav {
  display: none;
}

.hdr {
  min-height: 74px;
  height: auto;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.hdr-right {
  display: none;
}

.project-nav-tiered {
  flex: 1;
  justify-content: flex-end;
  gap: 10px;
  border-left: 0;
  padding-left: 0;
  min-width: 640px;
}

.project-tier {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 5px 4px 10px;
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 12px;
  background: rgba(15,23,42,0.52);
}

.project-tier > span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.project-tier:nth-child(1) .project-link {
  border-color: rgba(79,142,247,0.34);
  background: rgba(79,142,247,0.09);
  color: #93c5fd;
}

.project-tier:nth-child(2) .project-link {
  border-color: rgba(34,211,160,0.34);
  background: rgba(34,211,160,0.09);
  color: #86efac;
}

.project-tier:nth-child(3) .project-link {
  border-color: rgba(167,139,250,0.34);
  background: rgba(167,139,250,0.09);
  color: #c4b5fd;
}

.project-link {
  height: 28px;
  padding: 0 10px;
  border-radius: 9px;
}

.main {
  max-width: 1320px;
  padding-top: 30px;
}

.panel {
  display: none !important;
}

.ocg-onepage {
  display: grid;
  gap: 14px;
}

.ocg-hero,
.ocg-layer-card,
.ocg-final-cta {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.16);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(15,23,42,0.82), rgba(7,12,24,0.88)),
    rgba(5,8,16,0.84);
  box-shadow:
    0 22px 70px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.ocg-hero::before,
.ocg-layer-card::before,
.ocg-final-cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79,142,247,0.55), rgba(34,211,160,0.4), transparent);
}

.ocg-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 58px);
  background:
    radial-gradient(circle at 72% 42%, rgba(79,142,247,0.18), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(34,211,160,0.14), transparent 26%),
    linear-gradient(135deg, rgba(9,16,32,0.96), rgba(3,8,18,0.92));
}

.ocg-hero-copy {
  position: relative;
  z-index: 2;
}

.ocg-eyebrow {
  color: #22d3a0;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.ocg-hero h1 {
  max-width: 680px;
  color: #f8fbff;
  font-size: clamp(38px, 4vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.ocg-hero p {
  max-width: 660px;
  margin-top: 22px;
  color: #b8c7dc;
  font-size: 17px;
  line-height: 1.8;
}

.ocg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ocg-hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(79,142,247,0.36);
  border-radius: 12px;
  background: rgba(79,142,247,0.1);
  color: #dff6ff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.ocg-hero-actions a:first-child {
  border-color: rgba(34,211,160,0.44);
  background: rgba(34,211,160,0.13);
  color: #c7ffed;
}

.ocg-hero-art {
  min-height: 430px;
  display: grid;
  place-items: center;
}

.ocg-hero-art svg {
  width: min(106%, 820px);
  filter: drop-shadow(0 32px 80px rgba(34,211,160,0.12));
}

.ocg-layer-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 150px;
}

.ocg-layer-card aside {
  position: relative;
  padding: 22px 18px;
  border-right: 1px solid rgba(148,163,184,0.12);
  background:
    linear-gradient(180deg, rgba(79,142,247,0.12), rgba(79,142,247,0.025));
}

.ocg-layer-card aside b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(79,142,247,0.18);
  border: 1px solid rgba(79,142,247,0.42);
  color: #93c5fd;
  font-size: 18px;
}

.ocg-layer-card aside span {
  display: block;
  margin-top: 12px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 900;
}

.ocg-layer-card > div {
  padding: 24px 30px;
}

.ocg-layer-card h2 {
  color: #f8fbff;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.ocg-layer-card p {
  color: #aebed2;
  line-height: 1.72;
}

.ocg-hook-card h2 {
  color: #dff6ff;
}

.ocg-feature-grid,
.ocg-flow-row,
.ocg-step-row,
.ocg-value-row {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ocg-feature-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ocg-feature-grid.four,
.ocg-flow-row,
.ocg-step-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ocg-feature-grid article,
.ocg-flow-row article,
.ocg-step-row article,
.ocg-value-row span {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(15,23,42,0.66), rgba(3,8,20,0.42));
}

.ocg-feature-grid article strong,
.ocg-flow-row article strong {
  display: block;
  color: #eaf7ff;
  font-size: 17px;
  margin-bottom: 8px;
}

.ocg-step-row article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
}

.ocg-step-row article b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(34,211,160,0.16);
  border: 1px solid rgba(34,211,160,0.36);
  color: #86efac;
}

.ocg-step-row article span {
  color: #dcecff;
  font-weight: 800;
}

.ocg-value-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ocg-value-row span {
  min-height: 84px;
  display: grid;
  place-items: center;
  color: #dff6ff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.ocg-note {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(34,211,160,0.18);
  border-radius: 14px;
  background: rgba(34,211,160,0.06);
  color: #dff6ff !important;
  font-weight: 750;
}

.ocg-final-cta {
  min-height: 170px;
  display: grid;
  align-content: center;
  padding: 36px 48px;
  background:
    radial-gradient(circle at 78% 50%, rgba(79,142,247,0.28), transparent 30%),
    linear-gradient(135deg, rgba(30,64,175,0.92), rgba(3,8,20,0.92));
}

.ocg-final-cta h2 {
  max-width: 920px;
  color: #f8fbff;
  font-size: clamp(28px, 3.5vw, 48px);
  letter-spacing: -0.05em;
}

.ocg-final-cta p {
  margin-top: 12px;
  color: #dbeafe;
  font-size: 18px;
}

@media (max-width: 1180px) {
  .hdr {
    align-items: flex-start;
  }

  .project-nav-tiered {
    order: 4;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .ocg-hero,
  .ocg-layer-card {
    grid-template-columns: 1fr;
  }

  .ocg-layer-card aside {
    border-right: 0;
    border-bottom: 1px solid rgba(148,163,184,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .ocg-layer-card aside span {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .project-nav-tiered {
    display: none;
  }

  .ocg-hero {
    padding: 28px 22px;
  }

  .ocg-feature-grid.three,
  .ocg-feature-grid.four,
  .ocg-flow-row,
  .ocg-step-row,
  .ocg-value-row {
    grid-template-columns: 1fr;
  }
}

/* Product design polish pass: premium depth without changing structure. */
:root {
  --card: rgba(255,255,255,0.052);
  --card-h: rgba(255,255,255,0.086);
  --bdr: rgba(203,213,225,0.095);
  --bdr-h: rgba(226,232,240,0.18);
  --shadow-premium: 0 24px 80px rgba(0,0,0,0.36), inset 0 1px 0 rgba(255,255,255,0.055);
}

body {
  background-image:
    radial-gradient(ellipse 900px 520px at 8% -8%, rgba(79,142,247,0.13) 0%, transparent 62%),
    radial-gradient(ellipse 780px 460px at 92% 104%, rgba(34,211,160,0.095) 0%, transparent 60%),
    linear-gradient(135deg, #040711 0%, #07101e 50%, #050812 100%);
}

.hdr {
  height: 66px;
  background: linear-gradient(180deg, rgba(7,11,22,0.94), rgba(5,8,16,0.86));
  border-bottom-color: rgba(148,163,184,0.12);
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
}

.brand-icon {
  border-color: rgba(79,142,247,0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 26px rgba(79,142,247,0.12);
}

.nav {
  gap: 6px;
}

.nav-btn {
  min-height: 34px;
  padding: 7px 14px;
  border-color: rgba(148,163,184,0.045);
}

.nav-btn:hover {
  background: rgba(255,255,255,0.058);
  border-color: rgba(148,163,184,0.14);
}

.nav-btn.active {
  background: linear-gradient(180deg, rgba(79,142,247,0.16), rgba(79,142,247,0.08));
  box-shadow: 0 0 0 1px rgba(79,142,247,0.08), 0 18px 42px rgba(79,142,247,0.11);
}

.project-link {
  height: 32px;
  background: linear-gradient(180deg, rgba(34,211,160,0.12), rgba(34,211,160,0.055));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.lang-btn {
  min-height: 32px;
  background: linear-gradient(180deg, rgba(79,142,247,0.12), rgba(79,142,247,0.055));
}

.main {
  max-width: 1280px;
  padding-top: 42px;
}

.ph {
  margin-bottom: 28px;
}

.ph-tag {
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid rgba(79,142,247,0.22);
  border-radius: 999px;
  background: rgba(79,142,247,0.07);
}

.ph-title {
  letter-spacing: -0.045em;
}

.ph-desc {
  max-width: 860px;
}

.card,
.insight,
.ctrl-card,
.status-card,
.code-card,
.metric-card {
  border-color: var(--bdr);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.064), rgba(255,255,255,0.028)),
    rgba(8,13,26,0.72);
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.card:hover,
.ctrl-card:hover,
.status-card:hover,
.code-card:hover,
.metric-card:hover {
  border-color: var(--bdr-h);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.082), rgba(255,255,255,0.035)),
    rgba(8,13,26,0.76);
}

.ch {
  border-bottom-color: rgba(148,163,184,0.11);
}

.ch-icon,
.bdg,
.btn {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.065);
}

.viz {
  border-radius: var(--r-lg);
}

.btn {
  min-height: 34px;
}

/* Final homepage override after legacy polish */
.nav {
  display: none !important;
}

.hdr {
  min-height: 74px;
  height: auto !important;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.hdr-right {
  display: none !important;
}

.project-nav-tiered {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  gap: 10px;
  min-width: 640px;
}

.project-nav-tiered .project-link {
  height: 28px;
  background: transparent;
}

.project-link-intro {
  height: 32px !important;
  padding: 0 16px;
  border-color: rgba(96,165,250,0.34);
  background:
    linear-gradient(180deg, rgba(79,142,247,0.18), rgba(79,142,247,0.07)) !important;
  color: #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(79,142,247,0.12);
}

.main {
  max-width: 1320px;
  padding-top: 30px;
}

.panel {
  display: none !important;
}

@media (max-width: 1180px) {
  .project-nav-tiered {
    order: 4;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 820px) {
  .project-nav-tiered {
    display: none;
  }
}

/* OCG landing page v2: English-first, premium product narrative */
.brand-title,
.ocg-hero h1,
.ocg-layer-card h2,
.ocg-final-cta h2,
.ph-title {
  letter-spacing: 0;
}

.main {
  width: min(100% - 48px, 1440px);
  max-width: none;
  padding-top: 38px;
  padding-bottom: 72px;
}

.ocg-onepage {
  gap: 20px;
}

.ocg-hero,
.ocg-layer-card,
.ocg-final-cta {
  border-color: rgba(148, 190, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(16, 28, 52, 0.74), rgba(6, 12, 25, 0.88)),
    rgba(4, 8, 17, 0.92);
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ocg-hero::after,
.ocg-layer-card::after,
.ocg-final-cta::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), transparent 22%, transparent 74%, rgba(34,211,160,0.045));
  opacity: 0.72;
}

.ocg-hero > *,
.ocg-layer-card > *,
.ocg-final-cta > * {
  position: relative;
  z-index: 2;
}

.ocg-hero {
  min-height: 610px;
  grid-template-columns: minmax(0, 1.02fr) minmax(480px, 0.98fr);
  gap: clamp(32px, 4vw, 62px);
  padding: clamp(38px, 4.6vw, 64px);
  background:
    radial-gradient(circle at 12% 15%, rgba(79,142,247,0.22), transparent 32%),
    radial-gradient(circle at 82% 22%, rgba(34,211,160,0.16), transparent 28%),
    linear-gradient(135deg, rgba(5,12,26,0.98), rgba(9,15,35,0.96) 48%, rgba(3,8,18,0.98));
}

.ocg-eyebrow {
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(34,211,160,0.26);
  border-radius: 999px;
  background: rgba(34,211,160,0.07);
  color: #7df5d0;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.ocg-hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 3.65vw, 58px);
  line-height: 1.07;
  font-weight: 920;
  text-wrap: balance;
}

.ocg-hero p {
  max-width: 650px;
  color: #c2d2e7;
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.72;
}

.ocg-hero-actions {
  margin-top: 34px;
  gap: 14px;
}

.ocg-hero-actions a {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border-color: rgba(125, 181, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(79,142,247,0.18), rgba(79,142,247,0.075));
  color: #e9f5ff;
}

.ocg-hero-actions a:first-child {
  background:
    linear-gradient(180deg, rgba(34,211,160,0.24), rgba(34,211,160,0.095));
  color: #edfff8;
}

.ocg-hero-art {
  position: relative;
  min-height: 460px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 30px;
  overflow: hidden;
  background: #061120;
  box-shadow:
    0 36px 110px rgba(2, 6, 23, 0.48),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.ocg-hero-art img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.025);
  filter: saturate(1.1) contrast(1.06);
}

.ocg-hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 46% 46%, transparent 0 28%, rgba(3,7,18,0.08) 44%, rgba(3,7,18,0.58) 100%),
    linear-gradient(180deg, rgba(5,12,28,0.02), rgba(5,12,28,0.36));
  pointer-events: none;
}

.ocg-hero-graph-chip {
  position: absolute;
  left: 26px;
  bottom: 26px;
  z-index: 2;
  min-width: 245px;
  padding: 16px 18px;
  border: 1px solid rgba(125, 181, 255, 0.28);
  border-radius: 18px;
  background: rgba(5, 12, 28, 0.68);
  box-shadow: 0 18px 54px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ocg-hero-graph-chip span {
  display: block;
  color: #9db8d8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ocg-hero-graph-chip strong {
  display: block;
  margin-top: 7px;
  color: #dff6ff;
  font-family: var(--mono);
  font-size: 20px;
}

.ocg-layer-card {
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 178px;
}

.ocg-layer-card aside {
  padding: 28px 24px;
  background:
    linear-gradient(180deg, rgba(79,142,247,0.14), rgba(79,142,247,0.035)),
    radial-gradient(circle at 0% 0%, rgba(34,211,160,0.09), transparent 50%);
}

.ocg-layer-card aside b {
  width: 42px;
  height: 42px;
  background: linear-gradient(180deg, rgba(79,142,247,0.28), rgba(79,142,247,0.12));
  color: #bfdbfe;
  font-size: 20px;
}

.ocg-layer-card aside span {
  color: #dcecff;
  font-size: 15px;
  line-height: 1.28;
}

.ocg-layer-card > div {
  padding: 30px 36px;
}

.ocg-layer-card h2 {
  max-width: 1080px;
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1.16;
  text-wrap: balance;
}

.ocg-layer-card p {
  max-width: 980px;
  color: #b8c9de;
  font-size: 15px;
}

.ocg-feature-grid,
.ocg-flow-row,
.ocg-step-row,
.ocg-value-row {
  gap: 14px;
  margin-top: 22px;
}

.ocg-feature-grid article,
.ocg-flow-row article,
.ocg-step-row article,
.ocg-value-row span {
  border-color: rgba(148, 190, 255, 0.15);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(7, 14, 29, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
}

.ocg-flow-row article {
  position: relative;
}

.ocg-flow-row article:not(:last-child)::after,
.ocg-step-row article:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -17px;
  top: 50%;
  transform: translateY(-50%);
  color: #60a5fa;
  font-weight: 900;
  font-size: 18px;
  z-index: 4;
}

.ocg-feature-grid article strong,
.ocg-flow-row article strong {
  color: #f4fbff;
  font-size: 18px;
  line-height: 1.3;
}

.ocg-note {
  margin-top: 20px;
  padding: 14px 16px;
  border-color: rgba(34,211,160,0.24);
  background: linear-gradient(180deg, rgba(34,211,160,0.09), rgba(34,211,160,0.04));
}

.ocg-final-cta {
  min-height: 235px;
  padding: 48px 58px;
  background:
    radial-gradient(circle at 82% 55%, rgba(34,211,160,0.22), transparent 28%),
    radial-gradient(circle at 66% 0%, rgba(96,165,250,0.26), transparent 34%),
    linear-gradient(135deg, rgba(14,39,97,0.9), rgba(6,12,28,0.94) 62%, rgba(3,8,18,0.98));
}

.ocg-final-cta h2 {
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1.04;
  text-wrap: balance;
}

.ocg-final-cta p {
  max-width: 850px;
  color: #cfe6ff;
  font-size: 19px;
  line-height: 1.65;
}

@media (max-width: 1180px) {
  .main {
    width: min(100% - 32px, 980px);
  }

  .ocg-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .ocg-hero-art,
  .ocg-hero-art img {
    min-height: 420px;
  }

  .ocg-flow-row article:not(:last-child)::after,
  .ocg-step-row article:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 820px) {
  .main {
    width: min(100% - 24px, 680px);
    padding-top: 22px;
  }

  .ocg-hero {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .ocg-hero h1 {
    font-size: clamp(34px, 12vw, 52px);
  }

  .ocg-hero-art,
  .ocg-hero-art img {
    min-height: 320px;
  }

  .ocg-layer-card,
  .ocg-final-cta {
    border-radius: 22px;
  }

  .ocg-layer-card > div,
  .ocg-final-cta {
    padding: 24px 22px;
  }
}

/* Homepage card refinement pass */
.ocg-feature-grid article,
.ocg-flow-row article,
.ocg-step-row article,
.ocg-value-row span {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 22px 20px 20px;
  border-color: rgba(149, 189, 255, 0.19);
  background:
    radial-gradient(circle at 12% -8%, rgba(96,165,250,0.18), transparent 38%),
    radial-gradient(circle at 100% 0%, rgba(34,211,160,0.09), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.078), rgba(255,255,255,0.026)),
    rgba(6, 14, 30, 0.78);
  box-shadow:
    0 18px 46px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.075);
}

.ocg-feature-grid article::before,
.ocg-flow-row article::before,
.ocg-step-row article::before,
.ocg-value-row span::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 18px;
  width: 30px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22d3a0, #60a5fa);
  box-shadow: 0 0 18px rgba(34,211,160,0.28);
}

.ocg-feature-grid article strong,
.ocg-flow-row article strong {
  padding-top: 14px;
  font-size: 18px;
  letter-spacing: 0;
}

.ocg-feature-grid article p,
.ocg-flow-row article p {
  margin-top: 8px;
  color: #aebfd5;
  font-size: 14px;
  line-height: 1.62;
}

.ocg-value-row span {
  min-height: 104px;
  padding-top: 22px;
  color: #f2fbff;
  background:
    radial-gradient(circle at 50% -16%, rgba(34,211,160,0.18), transparent 40%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.024)),
    rgba(6, 14, 30, 0.78);
}

.ocg-step-row article {
  min-height: 92px;
}

.ocg-flow-row article,
.ocg-step-row article {
  overflow: visible;
}

.ocg-step-row article b {
  flex: 0 0 auto;
  box-shadow: 0 0 24px rgba(34,211,160,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}

.ocg-flow-row article:not(:last-child)::after,
.ocg-step-row article:not(:last-child)::after {
  right: -18px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(96,165,250,0.24);
  border-radius: 999px;
  background: rgba(5, 12, 28, 0.92);
  box-shadow: 0 12px 30px rgba(0,0,0,0.24);
}

.ocg-layer-card {
  border-color: rgba(148, 190, 255, 0.2);
}

.ocg-layer-card aside {
  background:
    linear-gradient(180deg, rgba(79,142,247,0.15), rgba(79,142,247,0.035)),
    linear-gradient(90deg, rgba(34,211,160,0.075), transparent);
}

/* Dedicated OCG introduction mode: restores the original tabbed explainer. */
body.intro-mode .ocg-onepage {
  display: none !important;
}

body.intro-mode .nav {
  display: flex !important;
}

body.intro-mode .project-nav-tiered {
  display: none !important;
}

body.intro-mode .main {
  width: min(100% - 48px, 1280px);
  max-width: none;
  padding-top: 46px;
}

body.intro-mode .panel {
  display: none !important;
}

body.intro-mode .panel.active {
  display: block !important;
}

@media (max-width: 1180px) {
  body.intro-mode .main {
    width: min(100% - 32px, 980px);
  }
}
