/* Vektrum Brain demo: additions to the console design system (app.css). Same tokens, no new colours. */

.btn.lg { padding: 12px 20px; font-size: 15px; border-radius: 12px; }
.demo-badge { display: inline-flex; align-items: center; gap: 7px; margin-left: 12px; padding: 3px 11px 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: var(--lime); border: 1px solid rgba(214,255,71,.3); background: rgba(214,255,71,.06); cursor: help; }
.demo-journey-btn { margin-left: 8px; border-color: rgba(143,132,255,.45); color: #d9d5ff; }

/* ---- opening sequence ---------------------------------------------------------------------------------------- */
.intro { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(1100px 700px at 50% 40%, rgba(43,31,219,.30), transparent 62%),
              radial-gradient(700px 400px at 90% 0%, rgba(63,213,242,.07), transparent 70%), #05050a;
  animation: fade .6s ease both; }
.intro-stage { position: relative; flex: 1; min-height: 0; }
.intro-svg { position: absolute; inset: 12px 0 0; width: 100%; height: calc(100% - 12px); }
.intro .dept { opacity: 0; animation: rise .9s var(--ease) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.intro .dept-disc { fill: #13132a; stroke: rgba(143,132,255,.65); stroke-width: 1.4; }
.intro .dept-glyph { fill: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.intro .dept-name { fill: var(--text); font-size: 14px; font-weight: 600; }
.intro .dept-sub { fill: var(--muted); font-size: 11px; }
.intro .sys line { stroke: rgba(143,132,255,.3); stroke-width: 1; }
.intro .sys circle { fill: var(--accent-2); }
.intro .sys text { fill: var(--muted); font-size: 11px; }
.intro .chaos line { stroke: rgba(255,90,120,0); stroke-width: 1.2; stroke-dasharray: 3 7; transition: stroke .8s; }
.intro.phase-1 .chaos line { stroke: rgba(255,120,140,.5); animation: jitter 2.6s ease-in-out infinite; }
@keyframes jitter { 50% { stroke-dashoffset: 14; opacity: .4; } }
.intro .links .link, .intro .links .flow { stroke-dasharray: 400; stroke-dashoffset: 400; fill: none; }
.intro .links .link { stroke: rgba(214,255,71,.28); stroke-width: 1.3; }
.intro .links .flow { stroke: var(--lime); stroke-width: 2; opacity: 0; }
.intro.phase-2 .links .link, .intro.phase-3 .links .link { animation: draw 1.1s var(--ease) forwards; }
.intro.phase-2 .links .flow, .intro.phase-3 .links .flow { stroke-dasharray: 2 10; stroke-dashoffset: 0; opacity: 1;
  animation: flow 1.6s linear infinite; filter: drop-shadow(0 0 4px rgba(214,255,71,.7)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.intro .core { opacity: 0; transform-origin: 500px 350px; transform: scale(.6); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.intro.phase-2 .core, .intro.phase-3 .core { opacity: 1; transform: scale(1); }
.intro .core-label { fill: var(--text); font-size: 12px; font-weight: 700; letter-spacing: .22em; }
.intro-copy { position: relative; height: 118px; flex: none; text-align: center; padding: 0 24px; }
.intro-copy .line { position: absolute; inset: 0 24px; opacity: 0; transform: translateY(8px); transition: opacity .7s var(--ease), transform .7s var(--ease); pointer-events: none; }
.intro-copy .line.on { opacity: 1; transform: none; }
.intro-copy h1 { margin: 0 0 8px; font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -.03em; font-weight: 650; }
.intro-copy h1 .atlas { background: linear-gradient(90deg, #fff, #c9c3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-copy p { margin: 0 auto; max-width: 700px; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.intro-cta { flex: none; height: 70px; display: flex; gap: 12px; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.intro-cta.on { opacity: 1; visibility: visible; transform: none; }
.intro-foot { flex: none; display: flex; align-items: center; gap: 14px; padding: 12px 24px 16px; color: var(--faint); font-size: 12px; }
.intro-lang { position: absolute; top: 16px; right: 20px; z-index: 3; }
.intro-foot .logo { height: 18px; }
.intro-foot .btn { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .intro .dept { opacity: 1; } .intro .core { opacity: 1; transform: none; } }

/* ---- guided journey ---------------------------------------------------------------------------------------- */
.tour { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: min(420px, calc(100vw - 44px)); padding: 16px 18px 14px;
  border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(143,132,255,.25); animation: pop2 .35s var(--ease) both; }
.tour h3 { margin: 10px 0 6px; font-size: 18px; letter-spacing: -.01em; }
.tour p { margin: 0 0 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.tour-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(91,77,255,.25); color: #fff; }
.tour-nav { margin-top: 6px; }
.tour .dots { display: flex; gap: 5px; }
.tour .dots .d { width: 7px; height: 7px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); cursor: pointer; }
.tour .dots .d.done { background: rgba(214,255,71,.5); }
.tour .dots .d.on { background: var(--lime); width: 18px; border-radius: 4px; }
.tour.final { width: min(560px, calc(100vw - 44px)); }
.impact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 8px; }
.impact-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.025); }
.impact-item .v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; color: var(--lime); }
.impact-item .l { font-size: 12.5px; color: var(--text); margin-top: 2px; }
.impact-item .n { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---- agent in action ----------------------------------------------------------------------------------------- */
.scn-pick { display: flex; gap: 12px; align-items: stretch; margin-bottom: 16px; flex-wrap: wrap; }
.scn-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 16px; min-width: 260px; border-radius: 13px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; }
.scn-card:hover { border-color: rgba(143,132,255,.4); }
.scn-card.on { border-color: rgba(143,132,255,.7); background: linear-gradient(180deg, rgba(91,77,255,.18), rgba(91,77,255,.04)); }
.scn-card b { font-size: 14px; }
.scn-controls { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.scn-clock { display: inline-flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; color: var(--lime); font-weight: 600;
  padding: 6px 10px; border-radius: 9px; border: 1px solid rgba(214,255,71,.25); background: rgba(214,255,71,.05); }
.scn-grid { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(0, 1.25fr); gap: 16px; }
.scn-log { padding: 16px; max-height: calc(100vh - 280px); min-height: 520px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 92%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; animation: enter .45s var(--ease) both; }
.bubble .bwho { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .08em; }
.bubble.user { align-self: flex-end; background: rgba(91,77,255,.22); border: 1px solid rgba(143,132,255,.35); }
.bubble.agent { align-self: flex-start; background: rgba(214,255,71,.07); border: 1px solid rgba(214,255,71,.3); }
.trace { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); animation: enter .45s var(--ease) both;
  border-left: 3px solid var(--accent-2); }
.trace.ok { border-left-color: var(--lime); } .trace.info { border-left-color: var(--cyan); }
.trace.err { border-left-color: var(--err); background: rgba(255,90,120,.05); } .trace.warn { border-left-color: var(--warn); background: rgba(255,181,71,.05); }
.trace .tool { font-weight: 600; color: #e6e1ff; }
.trace .what { color: var(--muted); font-size: 12.3px; margin: 4px 0 2px; font-family: var(--mono); }
.trace .res { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.trace .chips { margin-top: 8px; }
.trace .note { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.typing { display: flex; gap: 5px; padding: 8px 4px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.scn-value { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; animation: enter .5s var(--ease) both; }
.scn-value div { padding: 10px; border-radius: 11px; border: 1px solid var(--line-2); text-align: center; }
.scn-value b { display: block; font-size: 20px; color: var(--lime); letter-spacing: -.02em; }
.scn-value span { font-size: 11px; color: var(--muted); }
.scn-diagram { position: relative; overflow: hidden;
  background: radial-gradient(700px 420px at 45% 48%, rgba(43,31,219,.16), transparent 70%), var(--panel); }
.scn-svg { width: 100%; height: auto; display: block; padding: 8px 10px 0; }
.scn-edge { stroke: rgba(236,234,244,.09); stroke-width: 1.4; transition: stroke .3s; }
.scn-edge.on { stroke: rgba(214,255,71,.75); stroke-width: 2; stroke-dasharray: 3 7; animation: flow 1.2s linear infinite; }
.scn-edge.on.denied { stroke: var(--err); } .scn-edge.on.approval { stroke: var(--warn); } .scn-edge.on.live { stroke: var(--cyan); }
.scn-node circle { fill: #121226; stroke: rgba(143,132,255,.45); stroke-width: 1.3; transition: all .3s; }
.scn-node.lit circle { stroke: rgba(214,255,71,.8); }
.scn-node.target circle { stroke-width: 2.4; filter: drop-shadow(0 0 10px rgba(214,255,71,.5)); }
.scn-node.target.denied circle { stroke: var(--err); filter: drop-shadow(0 0 10px rgba(255,90,120,.6)); }
.scn-node.target.approval circle { stroke: var(--warn); filter: drop-shadow(0 0 12px rgba(255,181,71,.6)); }
.scn-node.target.live circle { stroke: var(--cyan); }
.scn-node .g { fill: #fff; font-size: 13px; font-weight: 700; }
.scn-node .l { fill: var(--text); font-size: 11.5px; font-weight: 600; }
.scn-node .s { fill: var(--faint); font-size: 10px; }
.pkt { fill: var(--lime); filter: drop-shadow(0 0 6px rgba(214,255,71,.9)); }
.pkt.out { fill: #c9c3ff; filter: drop-shadow(0 0 6px rgba(143,132,255,.9)); }
.pkt.denied { fill: var(--err); } .pkt.approval { fill: var(--warn); }
.scn-legend { display: flex; gap: 14px; padding: 4px 18px 14px; font-size: 11.5px; color: var(--muted); }
.scn-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.scn-legend i.out { background: #c9c3ff; } .scn-legend i.back { background: var(--lime); } .scn-legend i.denied { background: var(--err); } .scn-legend i.approval { background: var(--warn); }
@media (max-width: 1100px) { .scn-grid { grid-template-columns: 1fr; } .scn-controls { margin-left: 0; } }
.cta-hint { color: rgba(255,255,255,.62); font-weight: 500; margin-left: 4px; }

/* While the guided journey is open, keep the content above its card. */
body.tour-open main.view { padding-bottom: 270px; }
body.tour-open .scn-log { max-height: calc(100vh - 560px); min-height: 280px; }
body.tour-open .scn-svg { max-height: calc(100vh - 600px); min-height: 300px; }
body.tour-open .scn-grid { align-items: start; }
.demo-badge .short { display: none; }
.topbar h1 { white-space: nowrap; }
@media (max-width: 1440px) { .demo-badge .long { display: none; } .demo-badge .short { display: inline; } .omni { width: 260px; } }
@media (max-width: 760px) {
  .demo-badge { margin-left: 0; padding: 2px 8px; white-space: nowrap; font-size: 10.5px; }
  .demo-journey-btn { margin-left: 0; padding: 6px 8px; }
  .demo-journey-btn .long { display: none; }
}
