/* VectorIT: the running reel, live chart and theme switch. Our own design. Shared by the homepage and /demo. */
:root {
  --vx-bg: #F6F8FD; --vx-card: #FFFFFF; --vx-soft: #F1F4FA; --vx-ink: #0F1B33; --vx-mute: #55617D; --vx-faint: #7C89A3;
  --vx-line: rgba(15, 27, 51, .11); --vx-accent: #2E5BDB; --vx-accent-2: #5B8CFF; --vx-tint: rgba(46, 91, 219, .10);
  --vx-copper: #EC7C3C; --vx-ok: #12814B; --vx-ok-t: #DFF5E9; --vx-warn: #B4531D; --vx-warn-t: #FCEEE4; --vx-lcd: #0B1620; --vx-frost: #5CE1F2;
  --vx-shadow: 0 1px 2px rgba(15, 27, 51, .05), 0 24px 60px -28px rgba(15, 27, 51, .28);
}
html[data-theme="dark"] {
  --vx-bg: #0A101C; --vx-card: #121A2A; --vx-soft: #1A2336; --vx-ink: #EDF2FB; --vx-mute: #A9B6CE; --vx-faint: #8493AD;
  --vx-line: rgba(226, 234, 248, .13); --vx-accent: #7DA2FF; --vx-accent-2: #A8C1FF; --vx-tint: rgba(125, 162, 255, .16);
  --vx-ok: #5FD79B; --vx-ok-t: rgba(95, 215, 155, .14); --vx-warn: #F5A877; --vx-warn-t: rgba(236, 124, 60, .16);
  --vx-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 24px 60px -28px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- theme switch ---------- */
.vx-theme { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid var(--vx-line); background: var(--vx-card); color: var(--vx-ink); cursor: pointer; transition: transform .15s; }
.vx-theme:hover { transform: rotate(14deg); }
.vx-theme svg { width: 18px; height: 18px; }
.vx-theme .moon, html[data-theme="dark"] .vx-theme .sun { display: none; }
html[data-theme="dark"] .vx-theme .moon { display: block; }

/* ---------- section ---------- */
.vx { position: relative; z-index: 2; padding: clamp(48px, 7vw, 92px) 0; background: var(--vx-bg); color: var(--vx-ink); }
.vx-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: 26px; }
.vx-kicker { margin: 0 0 10px; font-family: var(--font-mono, "IBM Plex Mono", monospace); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--vx-mute); }
.vx-kicker i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--vx-ok); animation: vx-pulse 1.8s infinite; }
.vx-head h2 { margin: 0; color: var(--vx-ink); font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.04; letter-spacing: -.025em; }
.vx-head h2 em { font-style: normal; color: var(--vx-accent); }
.vx-head p:last-child { margin: 0; color: var(--vx-mute); font-size: 1.04rem; line-height: 1.6; }
@keyframes vx-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--vx-ok) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* ---------- reel ---------- */
.vx-tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.vx-tabs::-webkit-scrollbar { display: none; }
.vx-tab { position: relative; flex: 1 0 auto; min-height: 58px; padding: 10px 16px 12px; overflow: hidden; border: 1px solid var(--vx-line); border-radius: 14px; background: var(--vx-card); color: var(--vx-mute); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, color .15s, transform .15s; }
.vx-tab b { display: block; font-size: .95rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.vx-tab small { display: block; margin-top: 2px; font-size: .76rem; white-space: nowrap; color: var(--vx-faint); }
.vx-tab:hover { transform: translateY(-1px); border-color: var(--vx-accent); }
.vx-tab[aria-selected="true"] { color: var(--vx-ink); border-color: var(--vx-accent); }
.vx-tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--vx-accent); transform: scaleX(0); transform-origin: left; }
.vx-tab.playing::after { animation: vx-bar var(--vx-len, 9s) linear forwards; }
.paused .vx-tab::after, .offscreen .vx-tab::after { animation-play-state: paused; }
@keyframes vx-bar { to { transform: scaleX(1); } }

.vx-window { overflow: hidden; border: 1px solid var(--vx-line); border-radius: 20px; background: var(--vx-card); box-shadow: var(--vx-shadow); }
.vx-bar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--vx-line); color: var(--vx-mute); font-size: .82rem; }
.vx-bar .dots { display: flex; gap: 6px; }
.vx-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--vx-line); }
.vx-sample { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--vx-tint); color: var(--vx-accent); font-size: .72rem; font-weight: 700; }
.vx-stage { position: relative; min-height: 430px; padding: clamp(16px, 2.6vw, 28px); overflow: hidden; }
.vx-pointer { position: absolute; left: 0; top: 0; z-index: 9; width: 22px; height: 26px; opacity: 0; pointer-events: none; transition: transform .62s cubic-bezier(.3, .9, .3, 1), opacity .2s; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35)); }
.vx-pointer svg { display: block; }
.vx-pointer::after { content: ""; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--vx-accent); opacity: 0; }
.vx-pointer.tap::after { animation: vx-tap .45s ease-out; }
@keyframes vx-tap { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.7); } }
.vx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-top: 16px; }
.vx-foot p { margin: 0; color: var(--vx-mute); font-size: .9rem; }
.vx-go { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; background: var(--vx-accent); color: #fff; font-weight: 700; text-decoration: none; transition: transform .15s; }
html[data-theme="dark"] .vx-go { color: #0A101C; }
.vx-go:hover { transform: translateY(-2px); }
.vx-go svg { width: 16px; height: 16px; }

/* things that appear in turn while a scene plays */
.vx-play [data-step]:not(.on) { opacity: 0; transform: translateY(8px); }
[data-step] { transition: opacity .32s, transform .32s; }
.vx-pressed { animation: vx-press .3s; }
@keyframes vx-press { 40% { transform: scale(.95); } }

/* shared parts */
.vx-grid2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px 26px; }
.vx-label { margin: 0; color: var(--vx-mute); font-size: .84rem; }
.vx-big { display: block; margin: 2px 0 2px; color: var(--vx-ink); font-size: clamp(2.2rem, 5.4vw, 3.7rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.vx-up { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--vx-ok-t); color: var(--vx-ok); font-size: .8rem; font-weight: 700; }

/* chart */
[data-vx-chart] { position: relative; margin-top: 12px; outline-offset: 4px; cursor: crosshair; touch-action: pan-y; }
[data-vx-chart] svg { display: block; width: 100%; height: auto; overflow: visible; }
.vx-grid { stroke: var(--vx-line); stroke-width: 1; }
.vx-tick { fill: var(--vx-faint); font-size: 11px; }
.vx-area { fill: var(--vx-tint); }
.vx-line { fill: none; stroke: var(--vx-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.vx-play .vx-line, .vx-draw .vx-line { animation: vx-line 1.3s ease-out; }
@keyframes vx-line { from { stroke-dashoffset: 1; } }
.vx-cross { stroke: var(--vx-faint); stroke-dasharray: 3 4; opacity: 0; }
.vx-dot { fill: var(--vx-card); stroke: var(--vx-accent); stroke-width: 3; opacity: 0; }
.hot .vx-cross, .hot .vx-dot { opacity: 1; }
.vx-tip { position: absolute; z-index: 3; padding: 7px 11px; border-radius: 10px; background: var(--vx-ink); color: var(--vx-card); font-size: .8rem; line-height: 1.3; white-space: nowrap; pointer-events: none; }
.vx-tip b { display: block; font-size: .95rem; }
.vx-tip span { opacity: .8; }

/* feed */
.vx-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vx-feed li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--vx-soft); font-size: .86rem; line-height: 1.35; color: var(--vx-ink); }
.vx-feed li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--vx-ok); }
.vx-feed small { display: block; color: var(--vx-mute); font-size: .76rem; }
.vx-in { animation: vx-slide .4s; }
@keyframes vx-slide { from { opacity: 0; transform: translateY(-8px); } }

/* shop counter */
.vx-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vx-item { padding: 14px; border: 1px solid var(--vx-line); border-radius: 16px; background: var(--vx-card); }
.vx-item .art { display: grid; place-items: center; height: 62px; margin-bottom: 8px; border-radius: 12px; background: var(--vx-tint); color: var(--vx-accent); }
.vx-item .art svg { width: 34px; height: 34px; }
.vx-item b { display: block; font-size: .92rem; font-weight: 600; color: var(--vx-ink); }
.vx-item span { color: var(--vx-mute); font-size: .86rem; }
.vx-cart { list-style: none; margin: 0 0 12px; padding: 0; min-height: 118px; }
.vx-cart li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--vx-line); font-size: .88rem; color: var(--vx-ink); }
.vx-lcd { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--vx-lcd); border: 1px solid #1E3346; color: var(--vx-frost); font-family: var(--font-mono, "IBM Plex Mono", monospace); box-shadow: inset 0 2px 14px rgba(0, 0, 0, .8); }
.vx-lcd span { font-size: .72rem; letter-spacing: .14em; }
.vx-lcd b { font-size: clamp(1.3rem, 2.8vw, 1.8rem); font-weight: 600; text-shadow: 0 0 9px rgba(92, 225, 242, .55); font-variant-numeric: tabular-nums; }
.vx-pay { width: 100%; margin-top: 10px; padding: 14px; border: 0; border-radius: 13px; background: linear-gradient(180deg, #F8A56E, #EC7C3C 55%, #DC7537); color: #2A1204; font: inherit; font-weight: 700; }
.vx-done { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--vx-ok-t); color: var(--vx-ok); font-size: .86rem; font-weight: 600; }

/* FBR invoice */
.vx-paper-doc { position: relative; padding: 20px; border: 1px solid var(--vx-line); border-radius: 14px; background: var(--vx-soft); min-height: 300px; }
.vx-doc { list-style: none; margin: 12px 0 0; padding: 0; }
.vx-doc li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--vx-line); font-size: .9rem; color: var(--vx-ink); }
.vx-doc li.t { border: 0; font-weight: 800; font-size: 1.04rem; }
.vx-doctitle { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; color: var(--vx-ink); }
.vx-doctitle span { font-weight: 500; color: var(--vx-mute); font-size: .86rem; }
.vx-qr { position: absolute; right: 18px; bottom: 18px; width: 66px; height: 66px; border-radius: 6px; background: conic-gradient(#0F1B33 25%, #fff 0 50%, #0F1B33 0 75%, #fff 0) 0 0 / 11px 11px; border: 4px solid #fff; }
.vx-stampd { position: absolute; right: 100px; bottom: 24px; padding: 6px 12px; border: 2.5px solid var(--vx-ok); border-radius: 8px; color: var(--vx-ok); font-weight: 800; font-size: .86rem; letter-spacing: .05em; text-transform: uppercase; transform: rotate(-6deg); }
.vx-play .vx-stampd:not(.on) { transform: rotate(-6deg) scale(1.7); }
.vx-steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.vx-steps li { display: flex; gap: 10px; align-items: center; color: var(--vx-mute); font-size: .92rem; }
.vx-steps li::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--vx-line); transition: background .2s, border-color .2s; }
.vx-steps li.on { color: var(--vx-ink); font-weight: 600; }
.vx-steps li.on::before { background: var(--vx-ok); border-color: var(--vx-ok); }
.vx-stage:not(.vx-play) .vx-steps li::before { background: var(--vx-ok); border-color: var(--vx-ok); }
.vx-file { width: 100%; padding: 13px; border: 0; border-radius: 12px; background: var(--vx-accent); color: #fff; font: inherit; font-weight: 700; }
html[data-theme="dark"] .vx-file { color: #0A101C; }

/* plant */
.vx-machine { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 16px; background: var(--vx-soft); min-height: 210px; }
.vx-paper { --r: 1; flex: none; display: grid; place-items: center; width: 150px; height: 150px; }
.vx-paper svg { width: calc(150px * var(--r)); height: calc(150px * var(--r)); min-width: 50px; min-height: 50px; transition: width .6s, height .6s; animation: vx-spin 5s linear infinite; }
@keyframes vx-spin { to { transform: rotate(360deg); } }
.paused .vx-paper svg, .offscreen .vx-paper svg { animation-play-state: paused; }
.vx-belt { flex: 1; min-width: 0; height: 8px; border-radius: 8px; background: repeating-linear-gradient(90deg, var(--vx-line) 0 14px, transparent 14px 24px); }
.vx-out { flex: none; display: grid; grid-template-columns: repeat(5, 22px); gap: 6px; }
.vx-out i { height: 34px; border-radius: 6px; background: linear-gradient(90deg, #C89A5B, #E8C995, #C89A5B); }
.vx-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.vx-stat { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--vx-line); }
.vx-stat b { display: block; font-size: 1.5rem; font-weight: 800; color: var(--vx-ink); font-variant-numeric: tabular-nums; }
.vx-stat span { color: var(--vx-mute); font-size: .82rem; }
.vx-costline { margin: 12px 0 0; color: var(--vx-mute); font-size: .9rem; }
.vx-costline b { color: var(--vx-ink); }

/* farmhouse */
.vx-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.vx-dow { text-align: center; color: var(--vx-faint); font-size: .72rem; }
.vx-day { display: grid; place-items: center; aspect-ratio: 1.35; border: 1px solid var(--vx-line); border-radius: 10px; color: var(--vx-mute); font-size: .84rem; font-variant-numeric: tabular-nums; background: var(--vx-card); }
.vx-day[data-b], .vx-day[data-free] { transition: background .2s, color .2s; }
.vx-day[data-b] { background: var(--vx-accent); border-color: transparent; color: #fff; }
html[data-theme="dark"] .vx-day[data-b] { color: #0A101C; }
.vx-play .vx-day[data-b]:not(.on) { background: var(--vx-card); border-color: var(--vx-line); color: var(--vx-mute); }
.vx-day[data-free].on { background: var(--vx-ok); color: #fff; border-color: transparent; }
.shake { animation: vx-shake .45s; }
@keyframes vx-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.vx-note { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; font-size: .86rem; font-weight: 600; }
.vx-warn { background: var(--vx-warn-t); color: var(--vx-warn); }
.vx-ok { background: var(--vx-ok-t); color: var(--vx-ok); }

@media (max-width: 860px) {
  .vx-head { grid-template-columns: minmax(0, 1fr); }
  .vx-grid2 { grid-template-columns: minmax(0, 1fr); }
  .vx-stage { min-height: 660px; }
  .vx-tab { flex: 0 0 auto; }
  .vx-foot { flex-direction: column; align-items: stretch; }
  .vx-go { justify-content: center; }
}
@media (max-width: 460px) {
  .vx-paper { width: 96px; height: 96px; }
  .vx-paper svg { width: calc(96px * var(--r)); height: calc(96px * var(--r)); min-width: 36px; min-height: 36px; }
  .vx-out { grid-template-columns: repeat(5, 12px); gap: 4px; }
  .vx-machine { gap: 10px; padding: 12px; }
  .vx-stampd { right: 92px; font-size: .72rem; padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .vx *, .vx-kicker i, .vx-paper svg { animation: none !important; transition: none !important; }
  .vx-pointer { display: none; }
}

/* ---------- homepage: dark mode for the existing sections ---------- */
html[data-theme="dark"] body.future {
  --paper: #0A101C; --paper-2: #101827; --card: #121A2A; --ink: #EDF2FB; --muted: #A9B6CE; --faint: #8493AD;
  --line: rgba(226, 234, 248, .13); --line-soft: rgba(226, 234, 248, .08); --grid: rgba(125, 162, 255, .07);
  --blue: #7DA2FF; --blue-deep: #A8C1FF; --blue-soft: #A8C1FF; --blue-tint: rgba(125, 162, 255, .16);
  background: #0A101C; color: #EDF2FB;
}
html[data-theme="dark"] .cm { background: #121A2A; }
html[data-theme="dark"] .cm-track a { color: #EDF2FB; }
html[data-theme="dark"] .cm-track img { padding: 4px 8px; border-radius: 10px; background: #fff; }
html[data-theme="dark"] .cm-mono { background: #fff; color: #0F1B33; }
html[data-theme="dark"] .site-header { background: rgba(10, 16, 28, .82); border-bottom-color: rgba(226, 234, 248, .1); }
html[data-theme="dark"] .site-header .brand-name, html[data-theme="dark"] .site-header .nav-links a { color: #DCE4F3; }
html[data-theme="dark"] .site-header .nav-toggle { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); }
html[data-theme="dark"] .site-header .nav-toggle span { background: #fff; }
html[data-theme="dark"] .btn-primary { color: #0A101C; }
.future .nav-tools { display: flex; align-items: center; gap: 10px; }
html[data-theme="dark"] .site-header .nav-links a.nav-cta, html[data-theme="dark"] .site-header .nav-links a.btn { color: #0A101C; }
html[data-theme="dark"] .fx-chip, html[data-theme="dark"] .fx-stamp { background: rgba(18, 26, 42, .88); color: #EDF2FB; }
html[data-theme="dark"] .fx-frame { background: #121A2A; }
html[data-theme="dark"] .fx-art::after { background: linear-gradient(180deg, rgba(18, 26, 42, 0), #121A2A); }
html[data-theme="dark"] .fx-field canvas { opacity: .6; }
html[data-theme="dark"] .fx-leaf { background: #121A2A; }
html[data-theme="dark"] .ed-row:hover { background: rgba(125, 162, 255, .06); }
.future .fx-solutions { z-index: 1; background: var(--paper); }
html[data-theme="dark"] .drafted svg, html[data-theme="dark"] .drafted svg * { stroke: #7DA2FF; }
