/* ============================================================================
   vn-theme.css — "Refined VN"
   Single source of truth for the victorngoma.com design system.
   New pages MUST use these tokens and classes.
   Do not define colors, fonts, radii, or shadows anywhere else.
   Canonical URL: https://victorngoma.com/assets/vn-theme.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------------------------------------------------------------- tokens */
:root {
  /* Colors */
  --sky:        #EAF2FB;
  --sky-deep:   #DDEAF8;
  --white:      #FFFFFF;
  --navy:       #16283E;
  --navy-2:     #1D3350;
  --ink:        #152238;
  --slate:      #51637C;
  --line:       #D5E2F0;
  --blue:       #2E7CD6;
  --blue-deep:  #1E5FB0;
  --blue-soft:  #E3EEFB;
  --green:      #2FA866;
  --green-deep: #238A52;
  --green-soft: #E4F4EB;
  --amber:      #F6C453;
  --amber-deep: #8A6210;
  --red:        #C0392B;   /* negative P&L / destructive only */

  /* Backgrounds */
  --bg-public: linear-gradient(180deg, #EAF2FB, #F2F7FC 60%, #EAF2FB);
  --bg-app:    #F2F7FC;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Shape & elevation */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow:    0 12px 40px rgba(22, 40, 62, .10);
  --shadow-sm: 0 4px 16px rgba(22, 40, 62, .07);

  --ease: .2s ease;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.vn-public { background: var(--bg-public); }
body.vn-app { background: var(--bg-app); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}
h1, h2 { letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.vn-mono { font-family: var(--font-mono); }
.vn-blue { color: var(--blue); }
.vn-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.vn-pos { color: var(--green-deep); }
.vn-neg { color: var(--red); }

/* ------------------------------------------------------------- brand mark */
.vn-mark {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 15px;
}

/* ------------------------------------------------------------------- nav */
.vn-nav {
  position: sticky; top: 16px; z-index: 60;
  max-width: 1160px; margin: 16px auto 0; padding: 0 24px;
}
.vn-nav-pill {
  background: var(--navy); border-radius: var(--r-lg);
  padding: 12px 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 20px;
}
.vn-nav-brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.vn-nav-brand b {
  display: block; color: #fff; font-family: var(--font-display);
  font-weight: 700; font-size: 15.5px; line-height: 1.2;
}
.vn-nav-brand small {
  display: block; color: #8FA5C2; font-size: 10px;
  letter-spacing: .22em; text-transform: uppercase; line-height: 1.3;
}
.vn-nav-links { display: flex; align-items: center; gap: 4px; }
.vn-nav-links a {
  color: #C3D1E4; font-size: 14px; font-weight: 500;
  padding: 8px 13px; border-radius: 99px; transition: all var(--ease);
}
.vn-nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.vn-nav-toggle { display: none; }
.vn-nav-burger {
  display: none; cursor: pointer; padding: 8px; border-radius: 8px;
  flex-direction: column; gap: 4px;
}
.vn-nav-burger span { display: block; width: 20px; height: 2px; background: #C3D1E4; border-radius: 2px; }

/* --------------------------------------------------------------- buttons */
.vn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: var(--r-md); border: none; cursor: pointer;
  transition: all var(--ease); text-decoration: none;
}
.vn-btn.primary {
  background: var(--green); color: #fff;
  box-shadow: 0 4px 14px rgba(47, 168, 102, .35);
}
.vn-btn.primary:hover { background: var(--green-deep); color: #fff; transform: translateY(-1px); }
.vn-btn.ghost {
  background: var(--white); color: var(--ink); border: 1px solid var(--line);
}
.vn-btn.ghost:hover { border-color: var(--blue); color: var(--ink); }
.vn-btn.sm { padding: 9px 16px; font-size: 13px; border-radius: var(--r-sm); }
.vn-nav .vn-btn.primary { padding: 11px 22px; font-size: 14px; border-radius: 12px; }

/* ----------------------------------------------------------------- cards */
.vn-card {
  position: relative; background: var(--white);
  border: 1px solid rgba(213, 226, 240, .6); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.vn-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.vn-card-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 13px 0; border-bottom: 1px solid #EFF4FA; font-size: 14px;
}
.vn-card-row:last-child { border-bottom: none; }
.vn-card-row .v { font-family: var(--font-mono); font-weight: 600; font-size: 13.5px; }
.vn-card-foot {
  background: #F7FAFD; margin: 16px -26px -26px; padding: 13px 26px;
  font-size: 12.5px; color: var(--slate); text-align: center;
}

.vn-card-feature {
  position: relative; background: var(--white); border-radius: var(--r-lg);
  border: 1px solid rgba(213, 226, 240, .6);
  box-shadow: var(--shadow-sm); padding: 28px;
  transition: transform var(--ease), box-shadow var(--ease);
}
.vn-card-feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
  opacity: 0; transition: opacity var(--ease);
}
.vn-card-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.vn-card-feature:hover::before { opacity: 1; }
.vn-ico {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-soft), #CFE2F8);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.vn-ico svg { width: 25px; height: 25px; stroke: var(--blue-deep); }

/* ---------------------------------------------------------------- badges */
.vn-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 8px;
}
.vn-badge.g { background: var(--green-soft); color: var(--green-deep); }
.vn-badge.b { background: var(--blue-soft); color: var(--blue-deep); }

.vn-pill-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-weight: 600; font-size: 11.5px;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--green-deep); background: var(--green-soft);
  padding: 5px 13px; border-radius: 99px;
}
.vn-pill-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: vn-pulse 2.4s infinite;
}
@keyframes vn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* --------------------------------------------------------------- tables */
.vn-table { width: 100%; border-collapse: collapse; }
.vn-table th {
  text-align: left; font-family: var(--font-body); font-weight: 600;
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--slate); padding: 10px 14px;
  border-bottom: 2px solid var(--sky-deep); white-space: nowrap;
}
.vn-table td {
  padding: 13px 14px; border-bottom: 1px solid #EFF4FA;
  font-size: 14px; vertical-align: middle;
}
.vn-table tr:last-child td { border-bottom: none; }
.vn-table .num, .vn-table .sym, .vn-table .time { font-family: var(--font-mono); font-size: 13px; }
.vn-table .sym { font-weight: 600; color: var(--blue-deep); }

/* -------------------------------------------------------- section headers */
.vn-section-head { text-align: center; }
.vn-section-head .tag {
  display: inline-block; background: var(--blue-soft); color: var(--blue-deep);
  font-family: var(--font-body); font-weight: 600; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 99px; margin-bottom: 16px;
}
.vn-section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.vn-section-head .sub {
  margin: 14px auto 0; max-width: 62ch; font-size: 16.5px; color: var(--slate);
}

/* -------------------------------------------- amber stats band (landing) */
.vn-band {
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #F9D06B, #F6C453 55%, #EFB93E);
  box-shadow: 0 16px 44px rgba(246, 196, 83, .35);
  display: flex; flex-wrap: wrap;
  padding: 24px 10px;
}
.vn-band .cell {
  flex: 1 1 140px; text-align: center; padding: 4px 18px; position: relative;
}
.vn-band .cell + .cell::before {
  content: ""; position: absolute; left: 0; top: 26%; bottom: 26%;
  width: 1px; background: rgba(138, 98, 16, .22);
}
.vn-band b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 22px; color: #3A2C08;
}
.vn-band span { font-size: 13px; font-weight: 600; color: var(--amber-deep); }

/* ---------------------------------------------------------------- footer */
.vn-footer {
  background: var(--navy); color: #8FA5C2;
  padding: 44px 0 48px; font-size: 13.5px;
}
.vn-footer .name { color: #fff; font-family: var(--font-display); font-weight: 700; }
.vn-footer a { color: #8FA5C2; }
.vn-footer a:hover { color: #fff; }
.vn-footer .fine {
  font-size: 11.8px; line-height: 1.7; color: #6E85A3;
  border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 22px; margin-top: 26px;
}
.vn-footer .fine b { color: #8FA5C2; }

/* --------------------------------------------------------------- sidebar */
.vn-sidebar {
  background: var(--navy); color: #AABDD6;
  width: 240px; flex-shrink: 0; min-height: 100vh;
  position: sticky; top: 0; display: flex; flex-direction: column;
}
.vn-sidebar .head { padding: 24px 20px 18px; }
.vn-sidebar .head b {
  display: block; color: #fff; font-family: var(--font-display);
  font-weight: 700; font-size: 16px; margin-top: 10px;
}
.vn-sidebar .head small {
  color: #8FA5C2; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
}
.vn-sidebar nav { flex: 1; padding: 6px 0 12px; overflow-y: auto; }
.vn-sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: #AABDD6; font-size: 14px; font-weight: 500;
  border-left: 3px solid transparent; transition: all var(--ease);
}
.vn-sidebar nav a svg { width: 18px; height: 18px; stroke: currentColor; opacity: .9; }
.vn-sidebar nav a:hover { color: #fff; }
.vn-sidebar nav a.active {
  background: var(--navy-2); border-left-color: var(--green);
  color: #fff; font-weight: 600;
}
.vn-sidebar .foot {
  padding: 14px 20px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px; font-family: var(--font-mono);
}

/* app shell helpers */
.vn-shell { display: flex; min-height: 100vh; }
.vn-main { flex: 1; min-width: 0; }
.vn-topbar {
  display: flex; align-items: center; gap: 18px;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 12px 26px; position: sticky; top: 0; z-index: 40;
}
.vn-topbar .tab {
  font-weight: 600; font-size: 14px; color: var(--slate);
  padding: 8px 4px; border-bottom: 2px solid transparent;
}
.vn-topbar .tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.vn-topbar .tab:hover { color: var(--ink); }

/* app content card */
.vn-panel {
  background: var(--white); border: 1px solid rgba(213, 226, 240, .6);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 26px;
}

/* long-form (docs/runbook) */
.vn-prose { max-width: 820px; font-size: 16px; line-height: 1.7; }
.vn-prose h1, .vn-prose h2, .vn-prose h3 { margin: 1.4em 0 .5em; }
.vn-prose p, .vn-prose ul, .vn-prose ol { margin: 0 0 1em; }
.vn-prose code, .vn-prose pre {
  font-family: var(--font-mono); font-size: 13px;
  background: #F7FAFD; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.vn-prose code { padding: 2px 6px; }
.vn-prose pre { padding: 14px 16px; overflow-x: auto; }
.vn-prose pre code { background: none; border: none; padding: 0; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .vn-nav-links { display: none; }
  .vn-nav-burger { display: flex; }
  .vn-nav-toggle:checked ~ .vn-nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: calc(100% + 8px); left: 24px; right: 24px;
    background: var(--navy); border-radius: var(--r-lg); box-shadow: var(--shadow);
    padding: 10px;
  }
  .vn-nav-pill { position: relative; }
  .vn-sidebar {
    position: static; width: 100%; min-height: 0;
  }
  .vn-shell { flex-direction: column; }
  .vn-sidebar nav { display: flex; overflow-x: auto; padding: 0 8px; }
  .vn-sidebar nav a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .vn-sidebar nav a.active { border-bottom-color: var(--green); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .vn-pill-live::before { animation: none; }
  .vn-card-feature:hover { transform: none; }
  .vn-btn.primary:hover { transform: none; }
  html { scroll-behavior: auto; }
}
