/* Jake Ruth Setup Wizard — InstallShield-style chrome, ambient
   Rubik's cubes behind it, two picker steps followed by a brief
   loading dwell that hands off to the cross-page cube transition. */

:root {
  --w-blue:   #0A246A;   /* InstallShield deep blue: titlebar, progress */
  --w-border: #a4a7ad;   /* hairline borders on buttons, step indicator */
  --w-violet: #6a5af9;   /* picker accent / card select state */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Tahoma, "MS Sans Serif", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  color: #1a1a1a;
}

body {
  overflow: hidden;
  background:
    radial-gradient(1600px 1000px at 40% 20%, #fbfcfd 0%, #eef1f6 55%, #d9dee8 100%);
}

/* ---- Ambient WebGL canvas ---- */
#ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
}

/* Build stamp, top-right. Very subtle. */
.stamp {
  position: fixed;
  top: 10px;
  right: 14px;
  z-index: 3;
  font-family: "SF Mono", "JetBrains Mono", "Consolas", monospace;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: rgba(30, 35, 55, 0.45);
  user-select: none;
  pointer-events: none;
}

/* ---- Wizard window ----
   Sizing is continuous, not bucketed: cap at 780x540 (the InstallShield
   native size) and shrink to fit when the viewport can't accommodate
   it. dvh tracks the visible viewport on iOS Safari (URL bar shows/
   hides); the vh line is the fallback for Safari < 15.4. */
.window {
  position: relative;
  z-index: 2;
  width: min(780px, calc(100vw - 16px));
  height: min(540px, calc(100vh - 16px));
  height: min(540px, calc(100dvh - 16px));
  margin: clamp(28px, 6vh, 64px) auto 0;
  background: #f3f4f6;
  border: 2px solid #1a1b1f;
  box-shadow:
    inset -2px -2px 0 #b9bcc2,
    inset 2px 2px 0 #ffffff,
    0 1px 0 rgba(255,255,255,0.6),
    0 34px 90px -20px rgba(20, 30, 60, 0.4),
    0 14px 30px -10px rgba(20, 30, 60, 0.22);
  display: flex;
  flex-direction: column;
  font-size: 12px;
  border-radius: 2px;
}

/* ---- Title bar ---- */
.titlebar {
  height: 30px;
  padding: 3px 4px 3px 8px;
  background: linear-gradient(to bottom, var(--w-blue) 0%, #1a3a9a 55%, #2f56c4 100%);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-weight: 600;
  font-size: 12px;
  user-select: none;
  letter-spacing: 0.2px;
  border-bottom: 1px solid #000;
}
.titlebar.plain {
  background: linear-gradient(to bottom, var(--w-blue), #3b5fbb);
  height: 26px;
}
.title-icon {
  width: 16px; height: 16px;
  background:
    linear-gradient(135deg, #ff3b3b 0 50%, transparent 50% 100%) top left / 50% 50% no-repeat,
    linear-gradient(135deg, #3bbf3b 0 50%, transparent 50% 100%) top right / 50% 50% no-repeat,
    linear-gradient(135deg, #3b7bff 0 50%, transparent 50% 100%) bottom left / 50% 50% no-repeat,
    linear-gradient(135deg, #ffce3b 0 50%, transparent 50% 100%) bottom right / 50% 50% no-repeat;
  border-radius: 2px;
  flex: 0 0 16px;
}
.title-text { flex: 1; letter-spacing: 0.2px; }
.title-buttons { display: flex; gap: 3px; }
.tb-btn {
  width: 22px; height: 20px;
  background: #ECECEC;
  border: 1px solid #1f1f1f;
  box-shadow: inset -1px -1px 0 #8c8f95, inset 1px 1px 0 #fff;
  font-size: 11px;
  line-height: 11px;
  padding: 0;
  cursor: default;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  color: #000;
}
.tb-btn.close { background: #e1a5a5; }
.tb-btn:active {
  box-shadow: inset 1px 1px 0 #8c8f95, inset -1px -1px 0 #fff;
}

/* ---- Menu bar (Win9x flat-gray flavor) ---- */
.menubar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: #d4d0c8;
  border-bottom: 1px solid var(--w-border);
  box-shadow: inset 0 1px 0 #ffffff;
  color: #1a1a1a;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 11.5px;
  height: 22px;
  user-select: none;
  position: relative;
  z-index: 5;
}
.menu-group { position: relative; }
.menu-item {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: default;
  line-height: 14px;
}
.menu-item:hover { background: #e7e4d8; }
.menu-item.is-open {
  background: var(--w-blue);
  color: #ffffff;
  border-color: var(--w-blue);
}
.menu-item u { text-decoration: underline; }

/* Dropdown panel — classic 9x: white bg, hard outset border, navy hover. */
.menu-panel {
  position: absolute;
  top: 100%;
  left: -1px;
  margin: 0;
  padding: 2px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #1f1f1f;
  box-shadow:
    inset -1px -1px 0 #8c8f95,
    inset 1px 1px 0 #ffffff,
    2px 2px 4px rgba(0, 0, 0, 0.32);
  min-width: 200px;
  z-index: 6;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 11.5px;
  color: #1a1a1a;
}
.menu-panel[hidden] { display: none; }
.menu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 4px 14px 4px 22px;
  white-space: nowrap;
  cursor: default;
}
.menu-row:hover { background: var(--w-blue); color: #ffffff; }
.menu-row .row-accel { color: #5a5d64; font-size: 10.5px; }
.menu-row:hover .row-accel { color: #cdd; }
.menu-sep {
  height: 0;
  margin: 3px 2px;
  border-top: 1px solid #c0c0c0;
  border-bottom: 1px solid #ffffff;
  list-style: none;
}

/* ---- Stage ---- */
.stage {
  flex: 1;
  background: #f3f4f6;
  overflow: hidden;
  position: relative;
}

/* ---- Buttons ---- */
.btn {
  min-width: 88px;
  height: 30px;
  padding: 0 14px;
  background: #d4d0c8;
  border: 1px solid #1f1f1f;
  box-shadow:
    inset -2px -2px 0 #808080,
    inset 2px 2px 0 #ffffff;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 12px;
  color: #111;
  cursor: default;
  border-radius: 0;
}
.btn:hover:not(:disabled) { background: #dcd9d2; }
.btn:active:not(:disabled) {
  box-shadow: inset 2px 2px 0 #808080, inset -2px -2px 0 #ffffff;
}
.btn:disabled {
  color: #9a9da3;
  text-shadow: 1px 1px 0 #fff;
  cursor: not-allowed;
}
.btn.primary {
  font-weight: 600;
  outline: 1px dotted #000;
  outline-offset: -4px;
}
.btn[hidden] { display: none !important; }
.btn.primary:disabled { outline-color: #b8bcc4; color: #8b8e95; }
.btn-gap { display: inline-block; width: 12px; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid #ffffff;
  box-shadow: 0 -1px 0 var(--w-border);
  background: #f3f4f6;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.footer-left { color: #555; display: flex; align-items: center; }
.footer-center {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  justify-content: center;
}
.footer-right {
  display: flex;
  align-items: center;
  justify-self: end;
}

.footer-dots {
  height: 8px;
  flex: 1;
  max-width: 160px;
  background-image: radial-gradient(#c8cbd1 1px, transparent 1px);
  background-size: 6px 6px;
  background-position: 0 2px;
  opacity: 0.75;
}

.step-indicator {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 11px;
  color: #333;
  letter-spacing: 0.5px;
  padding: 2px 10px;
  border: 1px solid var(--w-border);
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #d5d8de;
  background: #fbfbfd;
  border-radius: 10px;
  white-space: nowrap;
}

.dim { color: #56595f; }

/* Step 1 — Welcome. Two-column: sideart banner + main content. */
.welcome {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 230px 1fr;
}

.welcome .sideart {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(140% 80% at 30% 10%, rgba(255,255,255,0.18), transparent 55%),
    linear-gradient(180deg, #2a4fa3 0%, #14265a 65%, var(--w-blue) 100%);
  border-right: 1px solid #9398a1;
  box-shadow: inset -1px 0 0 rgba(0,0,0,0.25);
  color: #ffffff;
}

/* Faint starfield. */
.welcome .sideart::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1px 1px at 18% 12%, #fff, transparent 60%),
    radial-gradient(1px 1px at 72% 8%, #fff, transparent 60%),
    radial-gradient(1px 1px at 86% 92%, #fff, transparent 60%),
    radial-gradient(1px 1px at 22% 96%, #fff, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}
/* Vertical perforation at the inside edge. */
.welcome .sideart::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 4px;
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.15) 0 2px,
      transparent 2px 6px
    );
  background-size: 100% 6px;
  pointer-events: none;
  z-index: 2;
}

.sideart-variant {
  position: absolute;
  inset: 0;
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* ---- Sideart content column ---- */
.sideart-col {
  position: absolute;
  inset: 0;
  padding: 16px 16px 30px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "SF Mono", "Consolas", "JetBrains Mono", monospace;
  font-size: 10.5px;
  line-height: 1.45;
  color: #f5f6fb;
  letter-spacing: 0.15px;
}
.sideart-wordmark {
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.6px;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.sideart-wordmark .wm-v {
  color: #F2D16B;
  margin-left: 2px;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.3px;
}
.sideart-rule-h {
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.35) 20%,
    rgba(255,255,255,0.15) 80%,
    rgba(255,255,255,0) 100%
  );
  margin: 2px 0 4px;
}
.sideart-heading {
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #F2D16B;
  letter-spacing: 0.3px;
  margin: 4px 0 2px;
}
.sideart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sideart-list li {
  padding-left: 10px;
  position: relative;
  color: #eef0fb;
}
.sideart-list li::before {
  content: "\00b7";
  position: absolute;
  left: 2px;
  color: #F2D16B;
  font-weight: 700;
}
.sideart-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  color: rgba(255,255,255,0.68);
}
.sideart-stamp {
  font-family: "SF Mono", "Consolas", monospace;
  letter-spacing: 0.5px;
}

/* ---- Welcome main (right-hand content) ---- */
.welcome-main {
  padding: 42px 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}
.welcome-mark {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 4px;
  overflow: hidden;
}
/* logo.gif inked bbox is 486×828 inside a 1080×864 canvas. Scale image so the
   tall JR mark fits the container height; crop the surrounding whitespace. */
.welcome-mark img {
  position: absolute;
  width: 125px;
  height: 100px;
  left: -14px;
  top: -2px;
  display: block;
}

.welcome-main h1 {
  margin: 0;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #0d1020;
}
.welcome-sub {
  margin: 0;
  font-size: 14px;
  color: #2a2c31;
  line-height: 1.45;
  max-width: 440px;
}
.welcome-body {
  margin: 0;
  font-size: 12.5px;
  color: #5a5d64;
  line-height: 1.5;
  max-width: 440px;
}

/* =========================================================
   Step 2 — Picker cards
   ========================================================= */
.picker {
  position: absolute;
  inset: 0;
  padding: 24px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.picker-head h2 {
  margin: 0 0 4px;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: #0d1020;
}
.picker-head p { margin: 0; font-size: 12.5px; }

.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.exp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--w-border);
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #d5d8de,
              0 1px 2px rgba(20, 30, 60, 0.06);
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 80ms ease, background 80ms ease;
}
.exp-card:hover {
  border-color: #5c7cc9;
  box-shadow: 0 6px 18px -6px rgba(20, 40, 100, 0.3),
              inset 1px 1px 0 #ffffff, inset -1px -1px 0 #d5d8de;
  transform: translateY(-1px);
}
.exp-card.focused {
  border-color: var(--w-blue);
  outline: 2px dotted var(--w-blue);
  outline-offset: -5px;
}
.exp-card.selected {
  border-color: var(--w-blue);
  background: linear-gradient(180deg, #f4f7ff 0%, #e6ecff 100%);
  box-shadow:
    0 0 0 2px var(--w-blue) inset,
    0 6px 18px -6px rgba(20, 40, 100, 0.35);
}
.exp-card.selected.focused { outline-color: var(--w-blue); }
.exp-card:active { transform: translateY(0); }

.sel-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--w-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 120ms ease, transform 120ms ease;
  pointer-events: none;
}
.exp-card.selected .sel-badge {
  opacity: 1;
  transform: scale(1);
}

.exp-mockup {
  flex: 1;
  min-height: 160px;
  position: relative;
  overflow: hidden;
  background: #eef0f4;
  border: 1px solid #c8cbd1;
  border-radius: 2px;
}
.exp-label {
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0d1020;
  margin-top: 4px;
}
.exp-desc {
  font-size: 11.5px;
  color: #5c6068;
  line-height: 1.35;
}

.picker-foot { margin: 0; font-size: 11px; }

/* ---- Mockup: Old-school OS ---- */
.mockup { position: absolute; inset: 0; }
.mockup-xp .xp-desktop {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #3a84dd 0%, #5aa3e9 40%, #8dc63f 100%);
}
.mockup-xp .xp-icon {
  position: absolute; top: 10px; left: 10px;
  width: 22px; height: 22px;
  background: linear-gradient(180deg, #e8e8e8, #b4b4b4);
  border: 1px solid #555;
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.mockup-xp .xp-icon::after {
  content: "";
  position: absolute; left: 3px; right: 3px; bottom: 2px; top: 12px;
  background: #5a5a5a;
  border-top: 1px solid #2a2a2a;
}
.mockup-xp .xp-window {
  position: absolute;
  top: 38px; left: 38px;
  width: 58%;
  background: #ece9d8;
  border: 1px solid #0a246a;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  border-radius: 3px 3px 2px 2px;
  overflow: hidden;
}
.mockup-xp .xp-titlebar {
  background: linear-gradient(180deg, #0a52c1, #2a72d6 50%, #0a52c1);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  letter-spacing: 0.2px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}
.mockup-xp .xp-body {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #ffffff;
  min-height: 42px;
}
.mockup-xp .xp-row {
  height: 5px;
  background: #dfe4ea;
  border-radius: 1px;
}
.mockup-xp .xp-row.short { width: 60%; }
.mockup-xp .xp-taskbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  background: linear-gradient(180deg, #245edb 0%, #1941a5 100%);
  border-top: 1px solid #0a3cc0;
  display: flex;
  align-items: center;
  padding-left: 2px;
}
.mockup-xp .xp-start {
  height: 13px;
  padding: 0 8px 0 6px;
  background: linear-gradient(180deg, #3db83d 0%, #1d8a1d 60%, #0f6010 100%);
  border: 1px solid #0a4c0a;
  border-radius: 0 8px 8px 0;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-style: italic;
  display: flex;
  align-items: center;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.35);
}

/* ---- Mockup: Code repo ---- */
.mockup-repo { background: #ffffff; }
.mockup-repo .gh-header {
  position: absolute; top: 0; left: 0; right: 0; height: 18px;
  background: #24292f;
  border-bottom: 1px solid #1b1f24;
}
.mockup-repo .gh-header::before {
  content: "";
  position: absolute; top: 5px; left: 8px;
  width: 40px; height: 8px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
}
.mockup-repo .gh-header::after {
  content: "";
  position: absolute; top: 5px; right: 8px;
  width: 20px; height: 8px;
  background: #2ea043;
  border-radius: 2px;
}
.mockup-repo .gh-split {
  position: absolute;
  top: 18px; left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: 42% 1fr;
  background: #fff;
}
.mockup-repo .gh-tree {
  padding: 8px 6px 8px 10px;
  border-right: 1px solid #d0d7de;
  background: #f6f8fa;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mockup-repo .gh-file {
  height: 7px;
  background: #d0d7de;
  border-radius: 1px;
  width: 82%;
  position: relative;
}
.mockup-repo .gh-file.sub { margin-left: 14px; width: 64%; }
.mockup-repo .gh-file::before {
  content: "";
  position: absolute;
  left: -7px; top: 1px;
  width: 5px; height: 5px;
  background: #57606a;
  border-radius: 1px;
}
.mockup-repo .gh-log {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.mockup-repo .gh-log::before {
  content: "";
  position: absolute;
  top: 10px; bottom: 10px;
  left: 14px;
  width: 1.5px;
  background: #57606a;
}
.mockup-repo .gh-commit {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 4px;
}
.mockup-repo .gh-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2ea043;
  border: 1.5px solid #0a5826;
  flex: 0 0 8px;
  margin-left: 6px;
  z-index: 1;
}
.mockup-repo .gh-dot.branch { background: #8250df; border-color: #4a0fa0; }
.mockup-repo .gh-line {
  height: 6px;
  background: #d0d7de;
  border-radius: 1px;
  flex: 1;
}
.mockup-repo .gh-line.short { max-width: 60%; }

/* ---- Mockup: SaaS product ---- */
.mockup-saas {
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  padding: 8px;
}
.mockup-saas .saas-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7ec;
  margin-bottom: 8px;
}
.mockup-saas .saas-logo {
  width: 28px; height: 10px;
  background: linear-gradient(90deg, var(--w-violet), #33b5ff);
  border-radius: 2px;
}
.mockup-saas .saas-navitems { display: flex; gap: 5px; }
.mockup-saas .saas-navitems i {
  display: inline-block;
  width: 18px; height: 6px;
  background: #c9ced9;
  border-radius: 2px;
}
.mockup-saas .saas-card {
  background: #ffffff;
  border: 1px solid #e5e7ec;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 8px;
  position: relative;
  height: 46px;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.04);
}
.mockup-saas .saas-kpi {
  width: 40%;
  height: 10px;
  background: #2a2c31;
  border-radius: 2px;
  margin-bottom: 6px;
}
.mockup-saas .saas-spark {
  position: absolute;
  left: 8px; right: 8px; bottom: 6px;
  height: 20px;
  width: calc(100% - 16px);
  stroke: var(--w-violet);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mockup-saas .saas-pricing {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.mockup-saas .saas-tier {
  height: 34px;
  background: #ffffff;
  border: 1px solid #e5e7ec;
  border-radius: 3px;
  position: relative;
}
.mockup-saas .saas-tier.accent {
  border-color: var(--w-violet);
  background: linear-gradient(180deg, #ffffff 0%, #eef0ff 100%);
  box-shadow: 0 0 0 1px var(--w-violet) inset;
}
.mockup-saas .saas-tier::before {
  content: "";
  position: absolute; top: 6px; left: 6px; right: 6px;
  height: 4px; background: #c9ced9; border-radius: 1px;
}
.mockup-saas .saas-tier::after {
  content: "";
  position: absolute; top: 14px; left: 6px;
  width: 50%; height: 6px;
  background: #2a2c31; border-radius: 1px;
}
.mockup-saas .saas-tier.accent::after { background: var(--w-violet); }

/* =========================================================
   Cancel modal
   ========================================================= */
.modal {
  position: fixed; inset: 0;
  background: rgba(20, 28, 50, 0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  backdrop-filter: blur(1px);
}
.modal[hidden] { display: none !important; }
.modal-window { margin: 0; width: 440px; height: auto; }
.modal-body { padding: 18px; }
.modal-row { display: flex; gap: 12px; align-items: flex-start; }
.modal-row p { margin: 0 0 6px; }

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 820px) {
  .welcome { grid-template-columns: 120px 1fr; }
  .welcome-main { padding: 28px 22px; }
  .welcome-main h1 { font-size: 22px; }
  .exp-grid { grid-template-columns: 1fr; }
  .exp-mockup { min-height: 120px; }
  .stamp { display: none; }
  .menubar { padding: 2px 4px; font-size: 11px; height: 20px; }
  .menu-item { padding: 2px 6px; }
  .footer { grid-template-columns: auto auto auto; }
  .footer-dots { display: none; }
  .footer-left { font-size: 11px; }
  .sideart-col { padding: 10px; font-size: 9.5px; }
  .sideart-heading { font-size: 10px; }
  .sideart-list li { padding-left: 8px; }
  /* The picker step's three cards stack vertically and overflow the
     stage on phone-height viewports; allow the stage to scroll so all
     three are reachable. Also hide the keyboard-only "double-click /
     arrow keys" hint since touch users don't get it anyway. */
  .stage { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .picker-foot { display: none; }
}

/* Very narrow phones (older Androids, iPhone SE 1st-gen): tighten
   footer button paddings so the step indicator "1 / 3" doesn't get
   clipped by the Back/Next/Cancel trio. */
/* On phones the wizard footer Back / Next / Cancel buttons are
   the user's first touch interaction. Bump them above the 44 px
   tap-target floor (Apple HIG / WCAG 2.5.5). */
@media (max-width: 720px) {
  .btn { min-height: 44px; height: auto; padding: 0 14px; touch-action: manipulation; }
}
@media (max-width: 360px) {
  .btn { min-width: 64px; padding: 0 8px; }
  .btn-gap { width: 6px; }
  .footer { padding: 8px 8px; gap: 6px; }
  .step-indicator { padding: 2px 6px; }
}

/* Tighten sideart density whenever its column is space-constrained,
   whether by narrow width (always a 120px column) or short height
   (e.g. landscape phones where 2-line-wrapped items + stamp overflow). */
@media (max-width: 360px), (max-height: 560px) {
  .sideart-col { font-size: 8.5px; padding: 8px; }
  .sideart-heading { font-size: 9px; }
  .sideart-wordmark { font-size: 12px; }
}

/* When the sideart column is narrow (mobile grid: 120px) AND the
   viewport is short, two sections of wrapped list items + the
   setup.exe stamp don't fit. Trim the second section so the stamp
   (.sideart-footer's margin-top:auto) snaps back into view. At
   wider widths the sideart is 230px and both sections fit fine. */
@media (max-width: 820px) and (max-height: 560px) {
  .sideart-list ~ .sideart-heading,
  .sideart-list ~ .sideart-list { display: none; }
}

/* =========================================================
   Step 3 — Loading screen (re-added per Jake's clarification:
   keep the loading moment, drop the "switch from top" message,
   let the cube transition play out of it)
   ========================================================= */
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.loading-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 480px;
}
.loading-stack h2 {
  margin: 0;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: #0d1020;
}
.loading-dest { margin: 8px 0 0; font-size: 11px; }
.loading-dest code {
  font-family: "SF Mono", "Consolas", monospace;
  background: #eef0f4;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid #d8dbe2;
  color: #2a2c31;
}
.loading-spinner { display: flex; gap: 8px; margin-bottom: 4px; }
.loading-spinner span {
  width: 10px; height: 10px;
  background: var(--w-blue);
  border-radius: 50%;
  opacity: 0.35;
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.loading-spinner span:nth-child(2) { animation-delay: 0.18s; }
.loading-spinner span:nth-child(3) { animation-delay: 0.36s; }
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}
.progress-wrap {
  width: 320px;
  border: 1px solid var(--w-border);
  box-shadow: inset 1px 1px 0 #6b6d72, inset -1px -1px 0 #fff;
  background: #fff;
  height: 14px;
  padding: 2px;
  margin-top: 6px;
  border-radius: 2px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background:
    repeating-linear-gradient(
      90deg,
      #1e6fd8 0 10px,
      #2f82ee 10px 12px
    );
  transition: width 120ms linear;
}

/* =========================================================
   Wizard toast (menubar feedback) + About-dialog mark
   ========================================================= */
.wiz-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 12;
  padding: 8px 14px;
  background: #fffced;
  border: 1px solid #c9a23a;
  box-shadow: 0 6px 18px rgba(20, 30, 60, 0.22);
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 11.5px;
  color: #3a2a06;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  user-select: none;
}
.wiz-toast[hidden] { display: none; }
.wiz-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.about-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.about-mark .wm-sq {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(10, 36, 106, 0.85);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
}
.about-mark .wm-a { top: 0; left: 0; transform: rotate(-6deg); background: rgba(10, 36, 106, 0.10); }
.about-mark .wm-b { top: 9px; left: 12px; transform: rotate(4deg); background: rgba(45, 100, 180, 0.12); }
.about-mark .wm-c { top: 18px; left: 20px; transform: rotate(-2deg); background: rgba(255, 255, 255, 0.85); }

/* =========================================================
   Wizard: centered + draggable. Modals reuse .window so we
   only override #wizard so the cancel/about modals stay put.
   ========================================================= */
#wizard.window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
#wizard .titlebar { cursor: move; }
#wizard .titlebar .tb-btn { cursor: default; }
#wizard.is-dragging .titlebar { cursor: grabbing; }
#wizard.is-quitting {
  transition: opacity 220ms ease;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   Quit gag: "hey, you can't quit starting me, i'll restart
   you!" with a 3/2/1 countdown.
   ========================================================= */
.quit-banner {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 36, 106, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 280ms ease;
}
.quit-banner[hidden] { display: none; }
.quit-banner.is-visible { opacity: 1; }

.quit-card {
  background: #f3f4f6;
  border: 2px solid #1a1b1f;
  box-shadow:
    inset -2px -2px 0 #b9bcc2,
    inset 2px 2px 0 #ffffff,
    0 18px 48px rgba(0, 0, 0, 0.42);
  padding: 28px 36px 24px;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  text-align: center;
  width: 380px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.quit-icon {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
}
.quit-icon .wm-sq {
  position: absolute;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(10, 36, 106, 0.85);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
}
.quit-icon .wm-a { top: 0;  left: 0;  transform: rotate(-6deg); background: rgba(10, 36, 106, 0.10); }
.quit-icon .wm-b { top: 10px; left: 12px; transform: rotate(4deg); background: rgba(45, 100, 180, 0.12); }
.quit-icon .wm-c { top: 20px; left: 22px; transform: rotate(-2deg); background: rgba(255, 255, 255, 0.85); }

.quit-msg {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #0d1020;
  line-height: 1.45;
  letter-spacing: 0.1px;
}
.quit-msg em { color: var(--w-blue); font-style: italic; }
.quit-counter {
  font-family: "SF Mono", "JetBrains Mono", "Consolas", monospace;
  font-size: 56px;
  font-weight: 700;
  color: var(--w-blue);
  line-height: 1;
  margin: 6px 0 2px;
  /* gentle one-shot pop on each tick — re-applied via JS class flick */
  transition: transform 120ms ease;
}
.quit-counter.is-tick {
  transform: scale(1.18);
}
.quit-sub { margin: 0; font-size: 11px; }
