/* Xeroverse experiential layer (UX-B) — shared across the internal and client
   workspaces on top of workspace.css. Option A from the audit: premium dark
   command centre with lighter layered panels. Brings the approved landing
   identity inside: self-hosted Oxanium (headings/labels) + Manrope (body),
   champagne accents, and the trace / pulse / build / reveal motion primitives
   that animate the procedural visuals from xv-visuals.js.
   No product CSS. Reduced motion renders everything drawn and static. */

@font-face { font-family: 'Oxanium'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/oxanium-latin-wght-normal.woff2') format('woff2-variations'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2-variations'); }

:root {
  --xv-head: 'Oxanium', 'Segoe UI', system-ui, sans-serif;
  --xv-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --panel-hi: #1e2531;           /* lighter layered panel */
  --gold-line: rgba(233, 200, 126, 0.28);
}

/* typography takeover — headings speak Oxanium, body speaks Manrope */
body { font-family: var(--xv-body); }
h1, h2, h3, .btn, .ws-nav, .ws-brand b, .chip, .xv-stage, .xv-kicker, .tab {
  font-family: var(--xv-head);
}
h1 { font-weight: 550; letter-spacing: 0.4px; }
.sub { font-size: 13.5px; }

/* ---------------- motion primitives ----------------
   Wrappers gain .in from IntersectionObserver (workspace.js). */
.xvv { display: block; width: 100%; height: auto; }
.xvv .t { stroke-dasharray: 1400; stroke-dashoffset: 1400; } /* budget > longest path, so nothing dashes */
.in .xvv .t, .xvv.in .t { animation: xvTrace 1.4s ease forwards; }
.xvv .p { opacity: 0; }
.in .xvv .p, .xvv.in .p { animation: xvPulseIn 0.5s ease 1s forwards; }
@keyframes xvTrace { to { stroke-dashoffset: 0; } }
@keyframes xvPulseIn { from { opacity: 0; transform: scale(0.6); transform-origin: center; } to { opacity: 1; transform: none; } }
.xv-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.xv-reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .xvv .t { stroke-dashoffset: 0 !important; animation: none !important; }
  .xvv .p { opacity: 1 !important; animation: none !important; }
  .xv-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- grouped sidebar (UX-H) ---------------- */
.ws-navgroup {
  margin: 12px 12px 4px; font-size: 10px; letter-spacing: 2.4px;
  color: var(--ink-faint); text-transform: uppercase; font-family: var(--xv-head);
}
.ws-navgroup:first-child { margin-top: 4px; }
.ws-rail nav hr { border: 0; border-top: 1px solid var(--hairline); margin: 8px 10px; }

/* compact status line replacing raw product-health chips for non-admins */
.ws-health .ok-line { color: var(--ink-dim); display: flex; gap: 6px; align-items: center; }
.ws-health .ok-line::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---------------- command-centre home (UX-G) ---------------- */
.xv-hero {
  display: flex; gap: 26px; align-items: center; justify-content: space-between;
  padding: 22px 26px; margin-bottom: 18px; border-radius: 18px;
  background: linear-gradient(150deg, rgba(233, 200, 126, 0.07), var(--panel) 55%);
  border: 1px solid var(--gold-line);
}
.xv-hero h1 { font-size: 24px; }
.xv-hero .sub { margin: 6px 0 0; max-width: 60ch; }
.xv-hero-visual { width: 210px; flex: none; }

.xv-kicker { font-size: 11px; letter-spacing: 2.6px; text-transform: uppercase; color: var(--gold-mute); margin: 22px 0 10px; }

/* meaningful empty state with the Experience Core */
.xv-empty {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 28px; align-items: center;
  padding: 30px 32px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--gold-line);
}
.xv-empty h2 { font-size: 21px; margin-bottom: 8px; }
.xv-empty p { color: var(--ink-dim); max-width: 52ch; line-height: 1.6; margin-bottom: 16px; }
.xv-empty .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Continue Working (UX-15) */
.xv-continue {
  display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto;
  gap: 20px; align-items: center;
  padding: 16px 20px; border-radius: 16px;
  background: var(--panel-hi); border: 1px solid var(--hairline);
  transition: border-color 0.2s;
  text-decoration: none; color: var(--ink);
}
.xv-continue h3 { color: var(--ink-bright); }
.xv-continue:hover { border-color: var(--gold-line); }
.xv-continue .xv-thumb { border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--hairline); }
.xv-continue h3 { font-size: 16px; }
.xv-continue .meta { color: var(--ink-dim); font-size: 12.5px; margin-top: 4px; }
.xv-next { color: var(--gold-hi); font-size: 12.5px; margin-top: 8px; display: flex; gap: 7px; align-items: center; }
.xv-next::before { content: '→'; color: var(--gold); }

/* ---------------- presentation project cards (UX-J §16) ---------------- */
.xv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.xv-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--hairline);
  transition: transform 0.2s, border-color 0.2s; text-decoration: none; color: var(--ink);
}
.xv-card:hover, .xv-card:focus-visible { transform: translateY(-3px); border-color: var(--gold-line); }
.xv-card-media { position: relative; background: var(--bg-2); border-bottom: 1px solid var(--hairline); min-height: 128px; }
.xv-card-media img.photo { width: 100%; height: 150px; object-fit: cover; display: block; }
.xv-card-media .logo {
  position: absolute; left: 12px; bottom: -16px; width: 44px; height: 44px;
  border-radius: 11px; background: rgba(13, 17, 23, 0.9); border: 1px solid var(--gold-line);
  object-fit: contain; padding: 5px;
}
.xv-card-media .status { position: absolute; top: 10px; right: 10px; }
.xv-card-body { padding: 22px 16px 12px; }
.xv-card-body h3 { font-size: 16.5px; color: var(--ink-bright); }
.xv-card-body .meta { color: var(--ink-dim); font-size: 12.5px; margin-top: 3px; }
.xv-stage { margin-top: 8px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--gold-mute); }
.xv-card-foot {
  margin-top: auto; padding: 10px 16px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
}
/* service badges: glyph + visible name — identifiable without hovering */
.xv-svc-ico { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.xv-svc-ico i {
  font-style: normal; height: 24px; padding: 0 9px 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  border: 1px solid var(--hairline); color: var(--ink-dim); background: var(--glass);
}
.xv-svc-ico i b {
  font-weight: 650; font-size: 9px; letter-spacing: 0.7px; text-transform: uppercase;
}
.xv-svc-ico i.on { color: var(--gold); border-color: var(--gold-line); }
.xv-card-foot .xv-next { margin: 0 0 0 auto; font-size: 12px; }

/* ---------------- project journey + coverage (UX-M §23-24) ---------------- */
.xv-journey { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 14px 0 4px; }
.xv-journey span {
  position: relative; padding: 8px 16px; font-family: var(--xv-head); font-size: 12px;
  letter-spacing: 0.6px; color: var(--ink-dim);
  border: 1px solid var(--hairline); background: var(--glass);
}
.xv-journey span:first-child { border-radius: 999px 0 0 999px; }
.xv-journey span:last-child { border-radius: 0 999px 999px 0; }
.xv-journey span.done { color: var(--ink); border-color: rgba(233, 200, 126, 0.2); }
.xv-journey span.now { color: var(--gold-hi); border-color: var(--gold-line); background: rgba(233, 200, 126, 0.08); }
.xv-journey span.done::after { content: ' ✓'; color: var(--ok); }

.xv-coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.xv-cov {
  border-radius: 14px; overflow: hidden; background: var(--panel-hi); border: 1px solid var(--hairline);
}
.xv-cov .art { background: var(--bg-2); border-bottom: 1px solid var(--hairline); }
.xv-cov .body { padding: 10px 12px 12px; }
.xv-cov b { display: block; font-family: var(--xv-head); font-size: 13px; color: var(--ink-bright); }
.xv-cov .state { margin-top: 5px; font-size: 12px; display: flex; gap: 6px; align-items: center; }

/* ---------------- staged creation journey (UX-K §21) ---------------- */
.xv-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 18px; align-items: start; }
.xv-builder .stages { min-width: 0; }
.xv-stagecard { position: relative; padding-left: 42px; margin-bottom: 14px; }
.xv-stagecard::before {
  content: attr(data-n); position: absolute; left: 0; top: 14px;
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--xv-head); font-size: 12.5px; color: var(--gold);
  border: 1px solid var(--gold-line); background: var(--bg-2);
}
.xv-stagecard::after {
  content: ''; position: absolute; left: 13.5px; top: 46px; bottom: -14px; width: 1px;
  background: linear-gradient(to bottom, var(--gold-line), transparent);
}
.xv-stagecard:last-child::after { content: none; }
.xv-preview { position: sticky; top: 16px; }
.xv-preview .card { padding: 0; overflow: hidden; }
.xv-preview .art { background: var(--bg-2); border-bottom: 1px solid var(--hairline); }
.xv-preview .body { padding: 14px 16px 16px; }
.xv-preview h3 { font-size: 16px; min-height: 20px; }
.xv-preview .meta { color: var(--ink-dim); font-size: 12.5px; margin-top: 3px; min-height: 16px; }
.xv-preview .tag { color: var(--gold-mute); font-size: 12px; margin-top: 6px; font-style: italic; min-height: 16px; }

/* experience selection (UX-L §22) */
.xv-exps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.xv-exp {
  border-radius: 14px; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--panel-hi); border: 1px solid var(--hairline); color: var(--ink); padding: 0;
  transition: border-color 0.2s, transform 0.2s; font-family: var(--xv-body);
}
.xv-exp:hover, .xv-exp:focus-visible { border-color: var(--gold-line); transform: translateY(-2px); }
.xv-exp .art { background: var(--bg-2); border-bottom: 1px solid var(--hairline); }
.xv-exp .body { padding: 10px 12px 12px; }
.xv-exp b { display: block; font-family: var(--xv-head); font-size: 13.5px; color: var(--ink-bright); }
.xv-exp .promise { font-size: 12px; color: var(--ink-dim); margin-top: 4px; line-height: 1.45; }
.xv-exp .state { margin-top: 8px; font-size: 12px; }
.xv-exp[aria-pressed="true"] { border-color: var(--gold); background: linear-gradient(150deg, rgba(233, 200, 126, 0.1), var(--panel-hi) 60%); }
.xv-exp[aria-pressed="true"] b::after { content: ' ✓'; color: var(--gold); }

/* ---------------- review centre (UX-N §25) ---------------- */
.xv-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.xv-review { border-radius: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--hairline); display: flex; flex-direction: column; }
.xv-review .art { background: var(--bg-2); border-bottom: 1px solid var(--hairline); }
.xv-review .body { padding: 12px 14px; }
.xv-review .actions { display: flex; gap: 8px; padding: 0 14px 14px; margin-top: auto; flex-wrap: wrap; }

/* ---------------- onboarding journey (UX-F §9) ---------------- */
.xv-onboard {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 10, 14, 0.78); backdrop-filter: blur(6px); padding: 20px;
}
.xv-onboard-card {
  width: min(660px, 100%); border-radius: 20px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--gold-line);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.xv-onboard-visual { background: var(--bg-2); border-bottom: 1px solid var(--hairline); padding: 8px 24px 0; }
.xv-onboard-visual .xvv { max-height: 210px; }
.xv-onboard-body { padding: 20px 26px 24px; }
.xv-onboard-body h2 { font-size: 20px; }
.xv-onboard-body p { color: var(--ink-dim); line-height: 1.6; margin-top: 8px; min-height: 44px; }
.xv-onboard-path { display: flex; gap: 6px; margin: 14px 0 18px; align-items: center; }
.xv-onboard-path i {
  height: 3px; flex: 1; border-radius: 2px; background: var(--hairline); font-style: normal;
}
.xv-onboard-path i.done { background: var(--gold); }
.xv-onboard .row { display: flex; gap: 10px; justify-content: space-between; align-items: center; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .xv-hero { flex-direction: column; align-items: flex-start; }
  .xv-hero-visual { width: 170px; align-self: center; }
  .xv-empty { grid-template-columns: 1fr; }
  .xv-empty > .xvv-wrap { max-width: 300px; margin: 0 auto; }
  .xv-continue { grid-template-columns: 1fr; }
  .xv-builder { grid-template-columns: 1fr; }
  .xv-preview { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .xv-card, .xv-exp, .xv-continue { transition: none; }
  .xv-card:hover, .xv-exp:hover { transform: none; }
}

/* experience cards inside the project workspace (UX-L) */
.svc-card .art { margin: -14px -14px 10px; background: var(--bg-2); border-bottom: 1px solid var(--hairline); border-radius: 12px 12px 0 0; overflow: hidden; }
.svc-card .art .xvv { max-height: 110px; }

/* ---------------- mobile workspace shell (§28) ----------------
   Below tablet width the rail becomes a compact top bar with a horizontally
   scrollable nav — the content keeps the full width. */
@media (max-width: 760px) {
  .ws-shell { flex-direction: column; }
  .ws-rail { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .ws-rail nav { flex-direction: row; overflow-x: auto; align-items: center; gap: 6px; padding: 8px 10px; scrollbar-width: thin; }
  .ws-navgroup { margin: 0 4px 0 10px; white-space: nowrap; }
  .ws-nav { white-space: nowrap; padding: 9px 12px; min-height: 40px; display: inline-flex; align-items: center; }
  .ws-health, .ws-rail footer { display: none; }
  .ws-account { flex-wrap: wrap; }
  .xv-hero-visual { display: none; }
}
