/* VisionOne Learning — design system
   Official VisionOne High Performance Group brand palette on the RunmAi/Work
   chrome (Inter, green hero, pill nav) so it matches the rest of the platform. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
:root {
  --vo-green: #649954; --vo-green-deep: #4d7a40;
  --vo-blue: #0081B7;  --vo-blue-deep: #006591;
  --vo-purple: #74519A; --vo-yellow: #EBD417; --vo-red: #C73127;

  --brand: var(--vo-green); --brand2: var(--vo-green-deep);
  --bg: #f6f8fb; --surface: #ffffff; --panel: #f1f5f9;
  --line: #e5eaf1; --line2: #cbd5e1;
  --ink: #0f172a; --head: #1e293b; --text: #334155; --mut: #64748b; --dim: #94a3b8;
  --vo-gray: #D1D3D4;
  --ok: #649954; --warn: #b45309; --bad: #C73127;
  --radius: 16px; --radius-sm: 10px; --maxw: 1180px;
  --shadow: 0 1px 3px rgba(15,23,42,.05);
  --shadow-md: 0 4px 14px rgba(15,23,42,.08);
  --shadow-lg: 0 16px 38px rgba(15,23,42,.12);
  --f: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(820px 440px at 6% -12%, rgba(100,153,84,.07) 0%, transparent 58%),
    radial-gradient(820px 440px at 96% -10%, rgba(0,129,183,.07) 0%, transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 14.5px/1.6 var(--f);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand2); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-family: var(--f); font-weight: 800; letter-spacing: -.02em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px 80px; }
/* Smooth tab switching WITHOUT a page rewrite — Chrome cross-document
   View Transitions cross-fade+slide the page on every same-origin nav.
   The top bar is kept persistent (its own name) so it doesn't flash. */
@view-transition { navigation: auto; }
.topbar { view-transition-name: vol-topbar; }
::view-transition-old(root) { animation: vtOut .18s ease both; }
::view-transition-new(root) { animation: vtIn .34s cubic-bezier(.22,1,.36,1) both; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
/* hover polish so the top bar feels interactive like Work */
.brandmark { transition: opacity .15s ease; }
.brandmark:hover { opacity: .85; }
.vol-viewas select { transition: border-color .15s ease, box-shadow .15s ease; }
.vol-viewas select:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.muted { color: var(--mut); }
.dim { color: var(--dim); }

/* ── Top bar — single row exactly like RunmAi/Work: brand · nav · account ── */
.topbar {
  position: sticky; top: 0; z-index: 800;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.topbar .inner { max-width: 1560px; margin: 0 auto; padding: 8px 22px; display: flex; align-items: center; gap: 16px; }
.brandmark { flex: none; display: flex; align-items: center; gap: 11px; font-weight: 800; color: var(--ink); font-size: 15px; }
.brandmark .logo-mark { height: 30px; width: auto; flex: none; }
.brandmark .prod { padding-left: 11px; border-left: 1px solid var(--line2); font-weight: 800; color: var(--ink); font-size: 15px; letter-spacing: -.01em; }
.brandmark .sub { display: none; }

/* centered pill nav — in the SAME row, single line, scrolls only if tight */
.topnav {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: 4px; align-items: center; justify-content: safe center;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.topnav::-webkit-scrollbar { height: 0; }
/* pills — copied verbatim from Work's .ph-nav-btn for identical sizing */
.topnav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 16px; font-size: 12.5px; font-weight: 600; color: #64748b;
  letter-spacing: .01em; cursor: pointer; border-radius: 8px; white-space: nowrap;
  line-height: 1; user-select: none;
  transition: color .18s ease, background .18s ease, transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s ease;
}
.topnav a + a::before { content: ''; position: absolute; left: -3px; top: 50%; width: 1px; height: 14px; transform: translateY(-50%); background: #cbd5e1; opacity: .45; transition: opacity .18s ease; }
/* clear, smooth hover pop — lift + green pill + soft glow */
.topnav a:hover {
  color: var(--brand2);
  background: color-mix(in srgb, var(--brand) 11%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 55%, transparent);
}
.topnav a:hover::before, .topnav a:hover + a::before { opacity: 0; }
.topnav a:active { transform: translateY(0); }
.topnav a.active { color: var(--brand2); background: color-mix(in srgb, var(--brand) 13%, transparent); }
.topnav a.active:hover { background: color-mix(in srgb, var(--brand) 17%, transparent); }
.topnav a.active::before, .topnav a.active + a::before { display: none; }
.spacer { display: none; }

/* visible "View as" switcher (restored) */
.vol-viewas { display: flex; align-items: center; gap: 7px; flex: none; }
.vol-viewas label { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.vol-viewas select {
  border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px;
  font-weight: 650; color: var(--ink); background: var(--surface); cursor: pointer; box-shadow: var(--shadow);
}
.vol-viewas .chip { font-size: 12px; }

/* account bubble + dropdown (right side) */
.topacct { flex: none; display: flex; align-items: center; gap: 10px; position: relative; }
.vol-avatar {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff;
  font-weight: 800; font-size: 12.5px; letter-spacing: .02em; font-family: var(--f);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .15s ease;
}
.vol-avatar:hover { transform: translateY(-1px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.vol-acct-menu {
  position: absolute; top: calc(100% + 9px); right: 0; min-width: 224px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 900;
}
.vol-acct-top { padding: 6px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.vol-acct-name { font-weight: 800; color: var(--ink); font-size: 13.5px; }
.vol-acct-sub { font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.vol-acct-label { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding: 6px 10px 3px; }
.vol-acct-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px;
  font-weight: 650; color: var(--ink); background: none; border: none; cursor: pointer; text-decoration: none;
}
.vol-acct-item:hover { background: var(--panel); }
.vol-acct-chk { color: var(--brand2); font-weight: 800; }
.vol-acct-div { height: 1px; background: var(--line); margin: 6px 0; }

/* "View as" role switcher */
.viewas { display: flex; align-items: center; gap: 8px; }
.viewas label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.viewas select {
  border: 1px solid var(--line2); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px;
  font-weight: 650; color: var(--ink); background: var(--surface); cursor: pointer; box-shadow: var(--shadow);
}
.demo-pill { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--vo-purple); background: #f3edfa; border: 1px solid #e3d7f2; padding: 4px 11px; border-radius: 999px; }

/* ── Hero — green gradient banner (matches Work "hub" header) ── */
.hero {
  position: relative; overflow: hidden;
  margin: 20px 0 22px; padding: 26px 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand2) 0%, var(--brand) 55%, #7bad63 100%);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.hero::after { /* subtle logo-eye glow, like the Work hub header */
  content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,.16) 0%, transparent 62%); pointer-events: none;
}
.kicker { position: relative; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; color: rgba(255,255,255,.82); }
.hero h1 { position: relative; color: #fff; font-size: 27px; line-height: 1.14; margin: 9px 0 8px; font-weight: 800; }
.hero p.lead { position: relative; color: rgba(255,255,255,.9); max-width: 760px; font-size: 15px; }

/* ── Cards & grid ────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); }
.card.pad-lg { padding: 22px 24px; }
.card h3 { font-size: 16px; font-weight: 750; }
.card .ch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); margin: 30px 0 12px; }

/* ── KPI tile ────────────────────────────────────────── */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi .num { font-size: 30px; font-weight: 820; color: var(--ink); letter-spacing: -.02em; }
.kpi .lab { font-size: 13px; color: var(--mut); font-weight: 600; }
.kpi .delta { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.delta.good { color: var(--ok); } .delta.bad { color: var(--bad); } .delta.flat { color: var(--dim); }

/* ── Progress / gap bars ─────────────────────────────── */
.bar { height: 9px; border-radius: 999px; background: var(--panel); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand2)); }
.bar.blue > i { background: linear-gradient(90deg, var(--vo-blue), var(--vo-blue-deep)); }
.bar.warn > i { background: linear-gradient(90deg, #e0a93b, var(--warn)); }
.bar.bad > i  { background: linear-gradient(90deg, #e06a62, var(--bad)); }
.barrow { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; margin: 10px 0; }
.barrow .name { font-weight: 650; color: var(--head); font-size: 14px; }
.barrow .val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--mut); font-size: 13px; min-width: 78px; text-align: right; }
.barrow .bar { grid-column: 1 / -1; }

/* ── Alignment chain (the differentiator) ────────────── */
.chain { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.chain .node { flex: 1; min-width: 150px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px; position: relative; }
.chain .node + .node { margin-left: 22px; }
.chain .node + .node::before { content: "→"; position: absolute; left: -19px; top: 50%; transform: translateY(-50%);
  color: var(--dim); font-weight: 800; }
.chain .node .lvl { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--vo-blue); }
.chain .node .ttl { font-weight: 700; color: var(--ink); font-size: 14px; margin-top: 4px; }
.chain .node .meta { font-size: 12px; color: var(--mut); margin-top: 4px; }
@media (max-width: 900px) {
  .chain { flex-direction: column; }
  .chain .node + .node { margin-left: 0; margin-top: 22px; }
  .chain .node + .node::before { content: "↓"; left: 50%; top: -20px; transform: translateX(-50%); }
}

/* ── Badges / chips ──────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--panel); color: var(--mut); border: 1px solid var(--line); }
.chip.ok { background: #eaf5ec; color: var(--vo-green-deep); border-color: #cbe3c5; }
.chip.warn { background: #fdf3e3; color: var(--warn); border-color: #f0dcb6; }
.chip.bad { background: #fdeceb; color: var(--bad); border-color: #f3cdca; }
.chip.blue { background: #e6f3f9; color: var(--vo-blue-deep); border-color: #c5e3f0; }
.chip.disc { background: #f3edfa; color: var(--vo-purple); border-color: #e3d7f2; }

/* ── Buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2);
  background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 17px; font: inherit;
  font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border-color: transparent; }
.btn.blue { background: linear-gradient(135deg, var(--vo-blue), var(--vo-blue-deep)); color: #fff; border-color: transparent; }
.btn.sm { padding: 6px 13px; font-size: 13px; }

/* ── Misc ────────────────────────────────────────────── */
.why { border-left: 3px solid var(--vo-yellow); background: #fffdf2; padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.5px; color: var(--head); }
.row { display: flex; align-items: center; gap: 10px; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-clean li:last-child { border-bottom: 0; }
.tag-live { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--vo-green-deep);
  background: #eaf5ec; border: 1px solid #cbe3c5; padding: 2px 8px; border-radius: 6px; }
.tag-soon { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--dim);
  background: var(--panel); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.footer-note { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); }

/* Dictation mic (speech-to-text) */
.vol-mic { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: var(--surface);
  cursor: pointer; font-size: 16px; line-height: 1; box-shadow: var(--shadow); margin: 6px 0 0 6px; vertical-align: middle; transition: transform .15s, box-shadow .15s; }
.vol-mic:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.vol-mic.rec { background: var(--vo-red); border-color: var(--vo-red); animation: vol-pulse 1.2s infinite; }
@keyframes vol-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(199,49,39,.5); } 50% { box-shadow: 0 0 0 7px rgba(199,49,39,0); } }
