/* AGS Orbit — iOS-style liquid glass design system */

:root {
  --navy: #0b1f6b;
  --blue: #1e88ff;
  --cyan: #4fc3ff;
  --violet: #7b6cff;
  --ok: #22c55e;
  --warn: #f5a524;
  --bad: #ff4d5e;

  --bg: #f7f9fc;
  --bg-2: #ffffff;
  --text: #0d1530;
  --muted: #5b6785;
  --faint: #8a94ad;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glass-soft: rgba(244, 247, 252, 0.75);
  --stroke: rgba(225, 232, 244, 0.9);
  --stroke-soft: rgba(13, 21, 48, 0.07);
  --shadow: 0 10px 34px rgba(16, 40, 120, 0.06), 0 1px 3px rgba(16, 40, 120, 0.05);
  --shadow-lg: 0 30px 70px rgba(16, 40, 120, 0.12);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --input: #ffffff;
  --tint: rgba(30, 136, 255, 0.08);
  --orb-1: rgba(30, 136, 255, 0.10);
  --orb-2: rgba(123, 108, 255, 0.06);
  --orb-3: rgba(79, 195, 255, 0.08);
  --r: 22px;
  --r-sm: 14px;
  --blur: saturate(180%) blur(24px);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Inter, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #070b1d;
  --bg-2: #0b1230;
  --text: #eef2ff;
  --muted: #a3acc8;
  --faint: #6f7a99;
  --glass: rgba(22, 32, 72, 0.45);
  --glass-strong: rgba(26, 36, 80, 0.75);
  --glass-soft: rgba(255, 255, 255, 0.05);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.06);
  --orb-1: rgba(30, 136, 255, 0.42);
  --orb-2: rgba(123, 108, 255, 0.3);
  --orb-3: rgba(0, 180, 255, 0.24);
  --tint: rgba(30, 136, 255, 0.16);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9em; }

/* Ambient background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(160deg, var(--bg), var(--bg-2)); }
.bg-orbs::before, .bg-orbs::after, .bg-orbs span {
  content: ''; position: absolute; border-radius: 50%; filter: blur(80px);
}
.bg-orbs::before { width: 55vw; height: 55vw; left: -12vw; top: -15vw; background: var(--orb-1); animation: drift 22s ease-in-out infinite alternate; }
.bg-orbs::after { width: 45vw; height: 45vw; right: -10vw; top: 20vh; background: var(--orb-2); animation: drift 28s ease-in-out infinite alternate-reverse; }
.bg-orbs span { width: 40vw; height: 40vw; left: 25vw; bottom: -20vw; background: var(--orb-3); animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(6vw, 4vh) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .bg-orbs::before, .bg-orbs::after, .bg-orbs span { animation: none; } }

/* Glass surfaces */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), var(--highlight);
  border-radius: var(--r);
}
.glass-strong { background: var(--glass-strong); }
.card { padding: 22px; }
.card.narrow { max-width: 420px; width: 100%; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 17px; }
.inset { background: var(--glass-soft); border: 1px solid var(--stroke-soft); border-radius: var(--r-sm); padding: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--font); padding: 11px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--stroke); color: var(--text); background: var(--glass-strong);
  box-shadow: var(--highlight), 0 2px 8px rgba(16, 40, 120, 0.06);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, opacity 0.15s; white-space: nowrap;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: var(--highlight), 0 6px 18px rgba(16, 40, 120, 0.12); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, #3a9bff, var(--blue)); color: #fff; border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 8px 24px rgba(30, 136, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.navy { background: linear-gradient(180deg, #1a3192, var(--navy)); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn.ghost:hover { background: var(--glass-soft); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.lg { padding: 15px 26px; font-size: 16px; }
.btn.icon { padding: 8px; width: 36px; height: 36px; }
.btn svg { width: 16px; height: 16px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; font: 15px var(--font); color: var(--text); background: var(--input);
  border: 1px solid var(--stroke-soft); border-radius: 12px; padding: 11px 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, [contenteditable]:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30, 136, 255, 0.15); }
input[type='checkbox'], input[type='radio'] { width: auto; accent-color: var(--blue); }
input[type='range'] { padding: 0; accent-color: var(--blue); background: transparent; border: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { min-width: 0; }
.grow { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* iOS switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--text); margin: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 46px; height: 28px; border-radius: 999px; background: rgba(120, 130, 160, 0.3); position: relative; transition: background 0.2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(18px); }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--stroke-soft); gap: 2px; flex-wrap: wrap; }
.seg button { font: 600 13px var(--font); border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px rgba(16, 40, 120, 0.12); }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--stroke-soft); color: var(--muted); white-space: nowrap; }
.badge.ok { color: #0f9d4a; background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.25); }
.badge.warn { color: #b7700a; background: rgba(245, 165, 36, 0.16); border-color: rgba(245, 165, 36, 0.3); }
.badge.bad { color: #d81f33; background: rgba(255, 77, 94, 0.14); border-color: rgba(255, 77, 94, 0.28); }
.badge.blue { color: var(--blue); background: rgba(30, 136, 255, 0.12); border-color: rgba(30, 136, 255, 0.25); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: 600 13px var(--font); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--stroke-soft); background: var(--glass-soft); color: var(--muted); cursor: pointer; }
.chip.on { background: var(--blue); color: #fff; border-color: transparent; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--stroke-soft); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--stroke-soft); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--glass-soft); }
table.t td[contenteditable] { outline: none; border-radius: 6px; }

/* KPI */
.kpi { padding: 18px; position: relative; overflow: hidden; }
.kpi .label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--faint); }
.kpi .value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0; }
.kpi svg.spark { width: 100%; height: 36px; display: block; }

/* Progress */
.bar { height: 8px; border-radius: 999px; background: var(--glass-soft); border: 1px solid var(--stroke-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); border-radius: 999px; transition: width 0.4s; }

/* Modal (iOS sheet) */
.modal-back { position: fixed; inset: 0; background: rgba(5, 10, 30, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade 0.2s; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; background: var(--glass-strong); animation: rise 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.modal.wide { width: min(1100px, 100%); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(20px) scale(0.98); opacity: 0; } }

/* Toast */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); }
.toast { padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; animation: rise 0.25s; }
.toast.bad { color: var(--bad); }
.toast.ok { color: #0f9d4a; }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ico { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--glass-soft); border: 1px solid var(--stroke-soft); }

/* Centered auth / utility pages */
.center-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--stroke-soft); margin-bottom: 14px; }
.tabs button { font: 600 14px var(--font); border: 0; background: none; color: var(--muted); padding: 9px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }

/* Utilities */
.spacer { height: 16px; }
.hide { display: none !important; }
.right { margin-left: auto; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
hr.sep { border: 0; border-top: 1px solid var(--stroke-soft); margin: 18px 0; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: rot 0.7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Brand logo: sits directly on the page in light mode. The wordmark is navy,
   so in dark mode it gets a soft light backing to stay readable. */
.logo-plate { display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; box-shadow: none; padding: 0; }
.logo-plate img { display: block; height: 100%; width: auto; margin: 0; }
.logo-d { display: none !important; }
/* ---------- Dark mode: white glass panels on a deep navy backdrop ----------
   Panels (sidebar, bars, cards, popups) keep the light palette so the logo and
   content sit on white everywhere; only the backdrop and text on it go dark. */
:root[data-theme='dark'] .glass,
:root[data-theme='dark'] .modal,
:root[data-theme='dark'] .side,
:root[data-theme='dark'] .theme-pop {
  --text: #0d1530;
  --muted: #5b6785;
  --faint: #8a94ad;
  --glass: rgba(255, 255, 255, 0.9);
  --glass-strong: rgba(255, 255, 255, 0.97);
  --glass-soft: rgba(239, 243, 250, 0.95);
  --stroke: rgba(255, 255, 255, 0.55);
  --stroke-soft: rgba(13, 21, 48, 0.08);
  --input: #ffffff;
  --tint: rgba(30, 136, 255, 0.1);
  --highlight: inset 0 1px 0 #ffffff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38), 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  color: var(--text);
  color-scheme: light;
}
/* Buttons that sit directly on the dark backdrop become white pills too. */
:root[data-theme='dark'] .btn:not(.primary):not(.navy):not(.ghost) {
  background: rgba(255, 255, 255, 0.95);
  color: #0d1530;
  border-color: rgba(255, 255, 255, 0.6);
}
:root[data-theme='dark'] .btn.danger:not(.ghost) { color: var(--bad); }
/* A logo outside any panel (sign-in side column) still gets its white surface. */
:root[data-theme='dark'] .logo-plate {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 6px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
:root[data-theme='dark'] .glass .logo-plate,
:root[data-theme='dark'] .modal .logo-plate,
:root[data-theme='dark'] .side .logo-plate { background: none; box-shadow: none; padding: 0; border-radius: 0; }

/* Appearance popover */
.theme-pop { position: fixed; z-index: 120; width: 260px; padding: 14px; background: var(--glass-strong); box-shadow: var(--shadow-lg); animation: fadeUp 0.18s ease both; }
.theme-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.theme-opts button { display: flex; align-items: center; gap: 8px; font: 600 13px var(--font); color: var(--text); background: var(--glass-soft); border: 1px solid var(--stroke-soft); border-radius: 12px; padding: 9px 10px; cursor: pointer; }
.theme-opts button svg { width: 16px; height: 16px; color: var(--muted); }
.theme-opts button.on { border-color: var(--blue); background: var(--tint); color: var(--blue); }
.theme-opts button.on svg { color: var(--blue); }
.theme-sched { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.theme-sched label { margin: 0; font-size: 12px; }
.theme-sched input { margin-top: 4px; padding: 8px; font-size: 14px; }
.theme-note { margin-top: 10px; }

/* Motion */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.view-enter > * { animation: fadeUp 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.view-enter > *:nth-child(2) { animation-delay: 40ms; } .view-enter > *:nth-child(3) { animation-delay: 80ms; }
.view-enter > *:nth-child(4) { animation-delay: 120ms; } .view-enter > *:nth-child(n + 5) { animation-delay: 160ms; }
.glass.card, .glass.kpi, .tpl { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), var(--highlight); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .view-enter > * { animation: none; }
  .lift:hover { transform: none; }
}
.grid > *, .row > * { min-width: 0; }

/* ================= Liquid glass layer =================
   A soft top sheen and a bright rim make every panel read as glass. */
.glass { position: relative; isolation: isolate; }
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 38%),
    radial-gradient(120% 60% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 60%);
  opacity: 0.55;
}
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.15) 40%, rgba(30, 136, 255, 0.18) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Glass tile for logos and icons, with an optional brand-coloured glow. */
.glass-tile {
  --glow: rgba(30, 136, 255, 0.25);
  position: relative;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(150deg, #ffffff 0%, rgba(255, 255, 255, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 #fff, inset 0 -6px 12px rgba(30, 60, 140, 0.05), 0 6px 16px var(--glow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Bright accent colours for key numbers. */
.pop { font-weight: 800; letter-spacing: -0.02em; }
.pop-blue { color: #1e88ff; } .pop-green { color: #16b364; } .pop-violet { color: #7b6cff; }
.pop-pink { color: #f0457e; } .pop-amber { color: #f59e0b; } .pop-cyan { color: #06b6d4; }
.pop-grad { background: linear-gradient(90deg, #1e88ff, #7b6cff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Score ring */
.ring { --v: 0; --c: #1e88ff; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), rgba(13, 21, 48, 0.08) 0);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 30%, transparent); }
.ring > span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--input); font-weight: 800; font-size: 14px; color: var(--c); }

/* Flow diagram built from glass blocks */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; }
.flow-node { position: relative; padding: 16px; border-radius: 18px; text-align: left;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(244, 247, 252, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(16, 40, 120, 0.07); margin: 0 14px; }
.flow-node:first-child { margin-left: 0; } .flow-node:last-child { margin-right: 0; }
.flow-node .glass-tile { width: 36px; height: 36px; margin-bottom: 10px; }
.flow-node .glass-tile svg { width: 18px; height: 18px; }
.flow-node .big-num { font-size: 28px; line-height: 1.1; }
.flow-node + .flow-node::before { content: ''; position: absolute; left: -28px; top: 34px; width: 28px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--blue) 0 6px, transparent 6px 11px); background-size: 22px 2px; animation: flowdash 1.2s linear infinite; }
.flow-node + .flow-node::after { content: ''; position: absolute; left: -6px; top: 30px; border: 5px solid transparent; border-left-color: var(--blue); }
@keyframes flowdash { to { background-position: 22px 0; } }
@media (prefers-reduced-motion: reduce) { .flow-node + .flow-node::before { animation: none; } }
@media (max-width: 900px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .flow-node { margin: 0; }
  .flow-node + .flow-node::before { left: 32px; top: -22px; width: 2px; height: 22px; background: repeating-linear-gradient(180deg, var(--blue) 0 6px, transparent 6px 11px); animation: none; }
  .flow-node + .flow-node::after { left: 28px; top: -8px; border-left-color: transparent; border-top-color: var(--blue); }
}
.cap-bar { height: 8px; border-radius: 999px; background: rgba(13, 21, 48, 0.07); overflow: hidden; margin-top: 8px; }
.cap-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #16b364, #22d3ee); }

/* Dark mode: panels stay white glass; rim catches more light. */
:root[data-theme='dark'] .glass::before { opacity: 0.8; }
:root[data-theme='dark'] .glass::after { background: linear-gradient(160deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.25) 45%, rgba(79, 195, 255, 0.35) 100%); }

/* Keep floating glass elements floating (the glass layer above sets position: relative). */
.theme-pop { position: fixed; }

/* Desktop-only: no phone layout. Narrow windows scroll instead of reflowing. */
html { min-width: 1200px; }
