* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #f0f6fc;
  color: #0a2540;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  height: 100vh; width: 100vw;
  user-select: none;
}

/* ── Header ────────────────────────────────────────── */
#header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 28px 60px;
  background: linear-gradient(to bottom, rgba(240,246,252,0) 40%, transparent);
  pointer-events: none;
}
#header h2 {
  font-size: 20px; font-weight: 300; letter-spacing: 4px;
  text-transform: uppercase; color: #002a5c;
  text-shadow: 0 2px 12px rgba(0,42,92,0.12);
}
#header .sub {
  font-size: 13px; color: #8aa0b5; letter-spacing: 2px;
  margin-top: 5px; text-transform: uppercase;
}

/* ── Part selector ─────────────────────────────────── */
#part-selector {
  position: fixed; top: 18px; right: 28px; z-index: 200;
  display: flex; gap: 8px; align-items: center;
}
.part-btn {
  padding: 7px 16px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(1,147,206,0.35);
  color: #003f72; font-size: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; border-radius: 20px; transition: all 0.25s;
}
.part-btn:hover, .part-btn.active {
  background: rgba(1,147,206,0.1);
  border-color: rgba(1,147,206,0.7);
  color: #0193ce;
  box-shadow: 0 2px 12px rgba(1,147,206,0.18);
}

/* ── Stats bar ─────────────────────────────────────── */
#stats {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 190px 32px 20px;
  background: linear-gradient(to top, rgba(240,246,252,1) 55%, transparent);
  display: flex; gap: 0; align-items: flex-end; pointer-events: none;
}
.stat { flex: 1; text-align: center; }
.stat-val {
  font-size: 36px; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #002a5c, #0193ce);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-lbl {
  font-size: 12px; letter-spacing: 2px; color: #8aa0b5;
  text-transform: uppercase; margin-top: 5px;
}

/* ── Legend ────────────────────────────────────────── */
#legend {
  position: fixed; top: 80px; left: 24px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}
.leg { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #3a5a7a; }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Top-right buttons ─────────────────────────────── */
#btn-replay {
  position: fixed; top: 80px; right: 28px; z-index: 200;
  padding: 8px 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(1,147,206,0.35);
  color: #003f72; font-size: 12px;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; border-radius: 20px; transition: all 0.25s;
}
#btn-replay:hover { background: rgba(1,147,206,0.08); border-color: rgba(1,147,206,0.6); }

#btn-risk {
  position: fixed; top: 116px; right: 28px; z-index: 200;
  padding: 8px 18px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(1,147,206,0.35);
  color: #003f72; font-size: 12px;
  letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; border-radius: 20px; transition: all 0.25s;
}
#btn-risk:hover, #btn-risk.active {
  background: rgba(255,80,80,0.15);
  border-color: rgba(255,100,100,0.5);
  color: #ff9090;
}

/* ── Disruption scenario cards ─────────────────────── */
#disruption-bar {
  position: fixed; bottom: 96px; left: 0; right: 0; z-index: 150;
  display: flex; justify-content: center; gap: 7px; padding: 0 16px;
}
.dis-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 13px 9px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(1,147,206,0.2);
  border-radius: 12px; cursor: pointer;
  transition: all 0.22s; min-width: 105px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,42,92,0.08);
}
.dis-card:hover {
  background: rgba(255,255,255,1);
  border-color: rgba(1,147,206,0.5);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,42,92,0.14);
}
.dis-card.active { transform: translateY(-4px); }
.dis-icon { font-size: 18px; margin-bottom: 5px; line-height: 1; }
.dis-name {
  font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase;
  color: #003f72; text-align: center; line-height: 1.3; font-weight: 500;
}
.dis-tag { font-size: 11px; color: #8aa0b5; margin-top: 3px; text-align: center; }

/* ── Disruption side panel ─────────────────────────── */
#dis-info {
  position: fixed; right: 0; top: 158px; bottom: 98px;
  width: 300px; z-index: 150;
  background: rgba(255,255,255,0.98);
  border-left: 1px solid rgba(1,147,206,0.25);
  overflow-y: auto; padding: 20px 18px 16px;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -6px 0 24px rgba(0,42,92,0.1);
}
#dis-info.show { transform: translateX(0); }
#dis-info-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 10px;
}
#dis-info-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
#dis-close {
  background: none; border: none; color: #8aa0b5; font-size: 16px;
  cursor: pointer; padding: 0 0 0 10px; line-height: 1; flex-shrink: 0;
  transition: color 0.2s;
}
#dis-close:hover { color: #0193ce; }
#dis-info-desc {
  font-size: 13px; color: #5a7a9a; line-height: 1.7; margin-bottom: 12px;
}
#dis-info-impact {
  font-size: 12px; padding: 8px 11px; border-radius: 7px;
  margin-bottom: 14px; border-left: 3px solid; line-height: 1.5;
}
.di-row { display: flex; gap: 8px; }
.di-stat {
  flex: 1; text-align: center; padding: 9px 6px;
  border-radius: 8px; background: rgba(1,147,206,0.06);
  border: 1px solid rgba(1,147,206,0.2);
}
.di-val { font-size: 24px; font-weight: 700; line-height: 1; }
.di-lbl {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: #8aa0b5; margin-top: 4px;
}

/* ── Tooltip ───────────────────────────────────────── */
#tip {
  position: fixed; z-index: 300; pointer-events: none;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(1,147,206,0.3);
  border-radius: 10px; padding: 13px 16px;
  max-width: 240px; opacity: 0;
  transition: opacity 0.18s;
  box-shadow: 0 6px 24px rgba(0,42,92,0.12);
}
#tip.show { opacity: 1; }
#tip .tip-name { font-size: 14px; font-weight: 600; color: #002a5c; margin-bottom: 4px; }
#tip .tip-type { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: #8aa0b5; margin-bottom: 8px; }
#tip .tip-body { font-size: 13px; color: #3a5a7a; line-height: 1.55; }
#tip .tip-risk {
  display: inline-block; margin-top: 8px; font-size: 11px;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 10px;
}
#tip .tip-risk.high  { background: rgba(200,30,30,0.1); color: #b01010; border: 1px solid rgba(200,30,30,0.25); }
#tip .tip-risk.medium{ background: rgba(180,100,0,0.1); color: #9a5500; border: 1px solid rgba(180,100,0,0.25); }
#tip .tip-risk.low   { background: rgba(0,140,70,0.1); color: #006030; border: 1px solid rgba(0,140,70,0.2); }

/* ── D3 SVG ────────────────────────────────────────── */
#chart { width: 100vw; height: 100vh;
  background: radial-gradient(ellipse at center, #ffffff 0%, #e8f2fa 75%); }

.link { fill: none; stroke: rgba(1,147,206,0.22); stroke-width: 1.2; }
.node { cursor: pointer; }
.node circle { transition: r 0.3s, fill 0.5s, filter 0.5s; }
.node text { font-size: 12px; fill: #3a5a7a; pointer-events: none; transition: fill 0.5s, opacity 0.2s; opacity: 0; }
.node.oem text { fill: #002a5c; font-size: 14px; font-weight: 600; letter-spacing: 1px; opacity: 1; }

/* ── Phase navigation bar ──────────────────────────── */
#phase-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(245,249,254,0.97); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(1,147,206,0.15);
}
.phase-tab {
  padding: 0 22px; height: 44px; display: flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: #8aa0b5; cursor: pointer; background: none; border: none;
  border-bottom: 2px solid transparent; position: relative; top: 1px;
  transition: all 0.2s; font-family: inherit;
}
.phase-tab.active { color: #002a5c; border-bottom-color: #0193ce; }
.phase-tab:hover:not(.disabled) { color: #0193ce; }


/* ── Phase visibility ───────────────────────────────── */
body:not(.asm) #assembly-view { display: none !important; }
body.asm #btn-replay, body.asm #btn-risk,
body.asm #legend, body.asm #disruption-bar, body.asm #dis-info,
body.asm #chart, body.asm #stats { display: none !important; }

/* ── Push all SC elements down 44px for nav bar ─────── */
#header        { top: 44px  !important; }
#part-selector { top: 50px  !important; }
#btn-replay    { top: 124px !important; }
#btn-risk      { top: 160px !important; }
#legend        { top: 148px !important; }
#dis-info      { top: 202px !important; }

/* ── Assembly view shell ────────────────────────────── */
#assembly-view {
  position: fixed; top: 44px; left: 0; right: 0; bottom: 0; overflow: hidden;
}
#asm-chart { width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, #ffffff 0%, #e8f2fa 75%);
  transform: translateY(40px); }


/* ── Assembly stats bar ─────────────────────────────── */
#asm-stats {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  padding: 70px 32px 20px;
  background: linear-gradient(to top, rgba(240,246,252,1) 50%, transparent);
  display: flex; align-items: flex-end; pointer-events: none;
}

/* ── Assembly disruption bar ────────────────────────── */
#asm-disruption-bar {
  position: fixed; bottom: 96px; left: 0; right: 0; z-index: 150;
  display: flex; justify-content: center; gap: 7px; padding: 0 16px;
}

/* ── Assembly side panel ────────────────────────────── */
#asm-dis-info {
  position: fixed; right: 0; top: 88px; bottom: 98px;
  width: 300px; z-index: 150;
  background: rgba(255,255,255,0.98);
  border-left: 1px solid rgba(1,147,206,0.25);
  overflow-y: auto; padding: 20px 18px 16px;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -6px 0 24px rgba(0,42,92,0.1);
}
#asm-dis-info.show { transform: translateX(0); }
#asm-dis-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 10px;
}
#asm-dis-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
#asm-dis-close {
  background: none; border: none; color: #8aa0b5; font-size: 16px;
  cursor: pointer; padding: 0 0 0 10px; line-height: 1; flex-shrink: 0;
  transition: color 0.2s;
}
#asm-dis-close:hover { color: #0193ce; }
#asm-dis-desc { font-size: 13px; color: #5a7a9a; line-height: 1.7; margin-bottom: 12px; }
#asm-dis-impact {
  font-size: 12px; padding: 8px 11px; border-radius: 7px;
  margin-bottom: 14px; border-left: 3px solid; line-height: 1.5;
}

/* ── CADDi resolution panel ─────────────────────────── */
.caddi-section {
  margin-top: 16px;
  border-top: 1px solid rgba(1,147,206,0.15);
  padding-top: 14px;
}
.caddi-btn {
  width: 100%; padding: 10px 14px; border-radius: 9px;
  background: linear-gradient(135deg, #0193ce 0%, #005fa3 100%);
  color: #fff; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700; cursor: pointer; border: none; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.22s; box-shadow: 0 3px 12px rgba(1,147,206,0.28);
}
.caddi-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #01a8e8 0%, #0073c2 100%);
  transform: translateY(-1px); box-shadow: 0 5px 18px rgba(1,147,206,0.42);
}
.caddi-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.caddi-btn .caddi-logo { font-size: 15px; }
.caddi-log { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.caddi-step {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px; border-radius: 8px;
  background: rgba(1,147,206,0.06); border: 1px solid rgba(1,147,206,0.18);
  opacity: 0; animation: caddi-slide 0.36s ease forwards;
}
@keyframes caddi-slide {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.caddi-step-icon { font-size: 14px; line-height: 1.45; flex-shrink: 0; }
.caddi-step-text { font-size: 12px; color: #0055a5; line-height: 1.5; font-weight: 500; }
.caddi-resolved {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px; padding: 9px 14px; border-radius: 9px;
  background: rgba(0,168,80,0.09); border: 1.5px solid rgba(0,168,80,0.35);
  color: #005c28; font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; animation: caddi-slide 0.36s ease forwards; opacity: 0;
}

/* ── Part selector: 6 items ─────────────────────────── */
#part-selector { flex-wrap: wrap; max-width: 1000px; justify-content: flex-end; }
.part-btn { padding: 6px 12px; font-size: 11px; letter-spacing: 1px; }

/* ── Intro / landing page ───────────────────────────── */
#intro-view {
  position: fixed; inset: 0; z-index: 500;
  background: linear-gradient(160deg, #f5f9fe 0%, #e6f1fb 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 24px 32px; overflow-y: auto;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
#intro-view.exiting { opacity: 0; transform: translateY(-20px); pointer-events: none; }

#intro-inner { max-width: 920px; width: 100%; text-align: center; }

#intro-eyebrow {
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  color: #0193ce; font-weight: 700; margin-bottom: 12px;
}
#intro-title {
  font-size: 30px; font-weight: 300; letter-spacing: 3px; text-transform: uppercase;
  color: #002a5c; margin-bottom: 20px; line-height: 1.2;
}
#intro-para {
  font-size: 15px; line-height: 1.78; color: #3a5a7a;
  max-width: 660px; margin: 0 auto 36px;
}
#intro-divider {
  border: none; border-top: 1px solid rgba(1,147,206,0.15);
  margin: 0 auto 30px; max-width: 600px;
}

/* Journey steps */
#intro-journey {
  display: flex; align-items: stretch; justify-content: center;
  gap: 0; margin-bottom: 36px; flex-wrap: wrap;
}
.j-step {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 22px 12px; border-radius: 10px;
  border: 1px solid rgba(1,147,206,0.2);
  background: rgba(255,255,255,0.8); min-width: 155px;
  transition: all 0.2s;
}
.j-step.active { background: #002a5c; border-color: #002a5c; }
.j-step.future { opacity: 0.5; }
.j-num {
  font-size: 10px; letter-spacing: 2.5px; font-weight: 700;
  color: #0193ce; margin-bottom: 5px;
}
.j-step.active .j-num { color: #30c3ff; }
.j-label {
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: #5a7a9a; line-height: 1.4; text-align: center;
}
.j-step.active .j-label { color: #fff; }
.j-arr { color: rgba(1,147,206,0.35); font-size: 20px; align-self: center; padding: 0 6px; }

/* Part cards */
#intro-parts-lbl {
  font-size: 10px; letter-spacing: 3.5px; text-transform: uppercase;
  color: #8aa0b5; margin-bottom: 16px;
}
#intro-parts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; max-width: 840px; margin: 0 auto;
}
.ipc {
  background: rgba(255,255,255,0.92); border: 1px solid rgba(1,147,206,0.2);
  border-radius: 14px; padding: 22px 16px 18px; cursor: pointer;
  transition: all 0.22s; text-align: center;
  box-shadow: 0 2px 8px rgba(0,42,92,0.06);
}
.ipc:hover {
  transform: translateY(-5px); border-color: rgba(1,147,206,0.55);
  box-shadow: 0 10px 28px rgba(0,42,92,0.13); background: #fff;
}
.ipc-icon { font-size: 30px; margin-bottom: 10px; line-height: 1; }
.ipc-name {
  font-size: 14px; font-weight: 600; color: #002a5c;
  letter-spacing: 0.4px; margin-bottom: 7px;
}
.ipc-desc { font-size: 12px; color: #5a7a9a; line-height: 1.55; margin-bottom: 12px; }
.ipc-badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.ipc-badge {
  font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 6px; font-weight: 500;
}
.ipc-badge.high   { background: rgba(180,20,20,0.09); color: #9a1010; }
.ipc-badge.medium { background: rgba(160,90,0,0.09);  color: #8a4800; }
.ipc-badge.low    { background: rgba(0,130,60,0.09);  color: #005830; }

/* ── Tutorial overlay ───────────────────────────────── */
#tut-overlay {
  position: fixed; inset: 0; z-index: 980;
  display: none; pointer-events: none;
}
#tut-overlay.active { display: block; }

#tut-spotlight {
  position: fixed; z-index: 981;
  box-shadow: 0 0 0 9999px rgba(2,14,36,0.80);
  border-radius: 12px; pointer-events: none;
  transition: left .38s cubic-bezier(.4,0,.2,1), top .38s cubic-bezier(.4,0,.2,1),
              width .38s cubic-bezier(.4,0,.2,1), height .38s cubic-bezier(.4,0,.2,1);
}
#tut-card {
  position: fixed; z-index: 982;
  background: #fff; border-radius: 14px;
  padding: 18px 20px 16px; width: 300px;
  box-shadow: 0 14px 50px rgba(0,20,50,.32), 0 2px 8px rgba(0,20,50,.12);
  pointer-events: all;
  animation: tut-pop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes tut-pop {
  from { opacity:0; transform: scale(.92) translateY(8px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.tut-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.tut-dots { display: flex; gap: 5px; align-items: center; }
.tut-dot {
  width: 6px; height: 6px; border-radius: 3px;
  background: rgba(1,147,206,.2);
  transition: all .28s cubic-bezier(.4,0,.2,1);
}
.tut-dot.active { width: 20px; background: #0193ce; }
#tut-skip {
  background: none; border: none; color: #a0b8cc;
  font-size: 11px; letter-spacing: .5px; cursor: pointer;
  padding: 0; font-family: inherit; transition: color .2s;
}
#tut-skip:hover { color: #5a88a8; }
#tut-title {
  font-size: 15px; font-weight: 700; color: #002a5c;
  margin-bottom: 8px; line-height: 1.3;
}
#tut-body {
  font-size: 13px; color: #4a6880; line-height: 1.65; margin-bottom: 16px;
}
#tut-next {
  width: 100%; padding: 10px 16px; border-radius: 9px;
  background: linear-gradient(135deg, #0193ce 0%, #005fa3 100%);
  color: #fff; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700; cursor: pointer; border: none; font-family: inherit;
  transition: all .22s; box-shadow: 0 3px 12px rgba(1,147,206,.3);
}
#tut-next:hover {
  background: linear-gradient(135deg, #01a8e8 0%, #0073c2 100%);
  transform: translateY(-1px); box-shadow: 0 5px 18px rgba(1,147,206,.42);
}
/* arrow tips */
#tut-card.arr-down::after, #tut-card.arr-up::after, #tut-card.arr-right::after {
  content:""; position:absolute; border: 9px solid transparent;
}
#tut-card.arr-down::after  { bottom:-18px; left:50%; transform:translateX(-50%); border-top-color:#fff; }
#tut-card.arr-up::after    { top:-18px;    left:50%; transform:translateX(-50%); border-bottom-color:#fff; }
#tut-card.arr-right::after { right:-18px;  top:50%;  transform:translateY(-50%); border-left-color:#fff; }
/* assembly-tab pulse ring during demo step */
.tut-ring {
  outline: 2px solid rgba(1,147,206,.7) !important;
  outline-offset: 3px !important;
  animation: tut-ring 1.5s ease-in-out infinite !important;
}
@keyframes tut-ring {
  0%,100% { outline-color: rgba(1,147,206,.7); }
  50%      { outline-color: rgba(1,147,206,.1); }
}

/* ── Demo CTA button ────────────────────────────────── */
#demo-cta {
  position: fixed; bottom: 158px; left: 50%;
  transform: translateX(-50%); z-index: 160;
  display: none; pointer-events: all;
}
#demo-cta.show {
  display: block;
  animation: demo-rise .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes demo-rise {
  from { opacity:0; transform:translateX(-50%) translateY(20px) scale(.92); }
  to   { opacity:1; transform:translateX(-50%) translateY(0)     scale(1); }
}
#demo-btn {
  padding: 13px 32px; border-radius: 30px;
  background: linear-gradient(135deg, #ff6b00 0%, #c83200 100%);
  color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: .6px; cursor: pointer; border: none;
  font-family: inherit; white-space: nowrap;
  box-shadow: 0 6px 28px rgba(200,60,0,.45); transition: all .25s;
}
#demo-btn:hover {
  background: linear-gradient(135deg, #ff8c33 0%, #de4400 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 36px rgba(200,60,0,.55);
}
body.asm #demo-cta.show { bottom: 228px; }

/* ── Cost Calculator Overlay ─────────────────────────── */
#calc-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: linear-gradient(150deg, #eef5fc 0%, #e2eef8 100%);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px 20px;
  overflow-y: auto;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
#calc-overlay.exiting { opacity: 0; transform: scale(0.97); pointer-events: none; }
#calc-overlay.gone    { display: none; }

#calc-progress {
  position: absolute; top: 88px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0;
}
.calc-prog-step {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(1,147,206,0.1); color: #9ab0c4;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
}
.calc-prog-step.active { background: #0193ce; color: #fff; }
.calc-prog-step.done   { background: #00a860; color: #fff; font-size: 14px; }
.calc-prog-line { width: 44px; height: 2px; background: rgba(1,147,206,0.12); }

#calc-steps { width: 780px; max-width: calc(100vw - 40px); }

.calc-step { display: none; flex-direction: column; align-items: center; width: 100%; position: relative; }
.calc-step.active { display: flex; animation: calcSlideIn 0.32s ease; }
@keyframes calcSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.calc-eyebrow {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: #0193ce; font-weight: 700; margin-bottom: 8px;
}
.calc-title {
  font-size: 26px; font-weight: 300; color: #002a5c; letter-spacing: -0.3px;
  text-align: center; margin-bottom: 6px; line-height: 1.25;
}
.calc-sub {
  font-size: 14px; color: #7a9ab5; text-align: center;
  margin-bottom: 28px; line-height: 1.55; max-width: 520px;
}
.calc-section-lbl {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase;
  color: #9ab0c4; margin-bottom: 10px; align-self: flex-start;
}

#calc-parts {
  display: grid; grid-template-columns: repeat(6,1fr);
  gap: 8px; width: 100%; margin-bottom: 24px;
}
.calc-part {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px 12px; background: rgba(255,255,255,0.82);
  border-radius: 12px; border: 1.5px solid rgba(1,147,206,0.14);
  cursor: pointer; transition: all 0.2s;
}
.calc-part:hover { border-color: rgba(1,147,206,0.45); background: #fff; }
.calc-part.selected {
  border-color: #0193ce; background: rgba(1,147,206,0.07);
  box-shadow: 0 0 0 3px rgba(1,147,206,0.12);
}
.calc-part-icon { font-size: 24px; line-height: 1; }
.calc-part-name { font-size: 10px; letter-spacing: 0.3px; text-align: center; color: #002a5c; font-weight: 600; line-height: 1.3; }

#calc-sizes { display: flex; gap: 8px; width: 100%; margin-bottom: 28px; flex-wrap: wrap; }
.calc-size {
  flex: 1; min-width: 130px; padding: 10px 12px; border-radius: 10px; text-align: center;
  background: rgba(255,255,255,0.82); border: 1.5px solid rgba(1,147,206,0.14);
  cursor: pointer; transition: all 0.2s;
}
.calc-size:hover { border-color: rgba(1,147,206,0.45); background: #fff; }
.calc-size.selected {
  border-color: #0193ce; background: rgba(1,147,206,0.07);
  box-shadow: 0 0 0 3px rgba(1,147,206,0.12);
}
.calc-size-name { font-size: 12px; font-weight: 700; color: #002a5c; }
.calc-size-sub  { font-size: 10px; color: #9ab0c4; margin-top: 2px; }

#calc-tabs { display: flex; gap: 16px; width: 100%; }
.calc-tab-card {
  flex: 1; padding: 28px 24px; border-radius: 16px; cursor: pointer;
  background: rgba(255,255,255,0.9); border: 1.5px solid rgba(1,147,206,0.14);
  transition: all 0.22s; display: flex; flex-direction: column; gap: 10px;
}
.calc-tab-card:hover {
  border-color: rgba(1,147,206,0.5); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(1,147,206,0.1);
}
.calc-tab-icon { font-size: 30px; }
.calc-tab-name { font-size: 17px; font-weight: 700; color: #002a5c; }
.calc-tab-desc { font-size: 13px; color: #5a7a9a; line-height: 1.6; }
.calc-tab-cta  { font-size: 12px; color: #0193ce; font-weight: 600; letter-spacing: 0.3px; margin-top: 8px; }

#calc-disruptors { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; }
.calc-dis-card {
  padding: 16px 14px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.9); border: 1.5px solid rgba(1,147,206,0.14);
  transition: all 0.2s; display: flex; flex-direction: column; gap: 5px;
}
.calc-dis-card:hover {
  border-color: rgba(1,147,206,0.5); transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(1,147,206,0.12);
}
.calc-dis-icon  { font-size: 20px; }
.calc-dis-label { font-size: 12px; font-weight: 700; color: #002a5c; line-height: 1.3; }
.calc-dis-tag   { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #9ab0c4; }

.calc-result-range {
  font-size: 52px; font-weight: 700; letter-spacing: -2px; text-align: center;
  background: linear-gradient(135deg, #002a5c 0%, #0193ce 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1; margin: 10px 0 5px;
}
.calc-result-ctx { font-size: 12px; color: #9ab0c4; margin-bottom: 22px; text-align: center; }
.calc-breakdown {
  width: 100%; background: rgba(255,255,255,0.88);
  border-radius: 14px; border: 1px solid rgba(1,147,206,0.12);
  padding: 18px 20px; margin-bottom: 14px;
}
.calc-bd-title { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: #9ab0c4; margin-bottom: 14px; }
.calc-bd-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.calc-bd-label { font-size: 12px; color: #3a5a7a; min-width: 175px; }
.calc-bd-track { flex: 1; height: 6px; background: rgba(1,147,206,0.08); border-radius: 3px; overflow: hidden; }
.calc-bd-bar   { height: 100%; border-radius: 3px; background: linear-gradient(90deg,#0193ce,#005fa3); }
.calc-bd-val   { font-size: 12px; color: #002a5c; font-weight: 600; white-space: nowrap; min-width: 136px; text-align: right; }
.calc-caddi-note {
  width: 100%; padding: 13px 16px; border-radius: 10px; margin-bottom: 18px;
  background: rgba(0,168,80,0.06); border: 1px solid rgba(0,168,80,0.2);
  font-size: 13px; color: #005c28; line-height: 1.55;
}
.calc-actions { display: flex; gap: 10px; width: 100%; }
.calc-primary {
  flex: 1.5; padding: 13px 20px; border-radius: 10px;
  background: linear-gradient(135deg, #0193ce, #005fa3);
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.3px;
  border: none; cursor: pointer; font-family: inherit; transition: all 0.22s;
}
.calc-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(1,147,206,0.38); }
.calc-secondary {
  flex: 1; padding: 13px 20px; border-radius: 10px; background: transparent;
  border: 1.5px solid rgba(1,147,206,0.3); color: #002a5c;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.22s;
}
.calc-secondary:hover { border-color: #0193ce; color: #0193ce; }
.calc-continue {
  padding: 12px 36px; border-radius: 26px; background: #0193ce; color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  border: none; cursor: pointer; font-family: inherit; transition: all 0.22s; margin-top: 4px;
}
.calc-continue:disabled { opacity: 0.28; cursor: not-allowed; }
.calc-continue:not(:disabled):hover { background: #01a8e8; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(1,147,206,0.35); }
.calc-back-btn {
  position: absolute; top: 0; left: 0; background: none; border: none;
  font-size: 13px; color: #9ab0c4; cursor: pointer; padding: 0; font-family: inherit;
  display: flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.calc-back-btn:hover { color: #0193ce; }