/* ============================================================================
   JeansTailor · layout B — guided wizard
   Every selector is scoped under .iex-tool-shell so Lobo's
   `.single-post .post-body h3/p/img` rules (specificity 0-2-1) can never win.
   Grid: 8pt spacing scale · touch targets >= 44px · type scale 11/13/15/20/28
   ========================================================================= */

.iex-tool-shell .jd-b {
  --jd-bg: #0b0c10;
  --jd-panel: #121419;
  --jd-card: #191c22;
  --jd-card-2: #1f232b;
  --jd-line: rgba(255, 255, 255, .08);
  --jd-line-2: rgba(255, 255, 255, .16);
  --jd-ink: #eef1f6;
  --jd-ink-2: #b9bfca;
  --jd-muted: #8a919e;
  --jd-blue: #1f80ff;
  --jd-blue-solid: #0f62d8;
  --jd-ok: #34c759;

  position: relative;
  background: var(--jd-bg);
  border-radius: 16px;
  color: var(--jd-ink);
  font-family: inherit;          /* Lobo's Open Sans — no font override */
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 60px rgba(0, 0, 0, .35);
}

.iex-tool-shell .jd-b *,
.iex-tool-shell .jd-b *::before,
.iex-tool-shell .jd-b *::after { box-sizing: border-box; }

.iex-tool-shell .jd-b img { max-width: 100%; height: auto; margin: 0; }

/* app.js still writes to the old layout's nodes — keep them out of sight */
.iex-tool-shell .jd-hidden-runtime,
.jd-hidden-runtime { display: none !important; }

/* ---------- head ---------- */
.iex-tool-shell .jd-b-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--jd-line);
  background: linear-gradient(180deg, #14161c 0%, #0e1015 100%);
}
.iex-tool-shell .jd-b-brand { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-width: 0; }
.iex-tool-shell .jd-b-brand b { font-size: 14px; font-weight: 700; letter-spacing: .01em; color: #fff; }
.iex-tool-shell .jd-b-brand .sep { color: #5b6270; }
.iex-tool-shell .jd-b-brand em {
  font-style: normal; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--jd-muted); margin-left: 8px;
}
.iex-tool-shell .jd-b-lang { margin-left: auto; display: flex; gap: 4px; background: #0b0d11; border: 1px solid var(--jd-line); border-radius: 9px; padding: 3px; }
.iex-tool-shell .jd-seg {
  border: 0; background: transparent; color: var(--jd-muted);
  font: inherit; font-size: 11px; font-weight: 600; padding: 6px 12px;
  min-height: 28px; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s;
}
.iex-tool-shell .jd-seg:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.iex-tool-shell .jd-seg.active { background: var(--jd-blue-solid); color: #fff; }

/* ---------- body ---------- */
.iex-tool-shell .jd-b-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  min-height: 0;
}

/* ---------- stage ---------- */
.iex-tool-shell .jd-b-stage {
  position: relative;
  min-height: 620px;
  height: min(calc(100vh - 300px), 760px);
  background:
    radial-gradient(120% 90% at 50% 30%, #1b1f27 0%, #101319 45%, #08090c 100%);
  overflow: hidden;
}
.iex-tool-shell .jd-b-grid {
  position: absolute; inset: -40% -10% -10%;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  transform: perspective(700px) rotateX(52deg) translateZ(-60px);
  transform-origin: 50% 62%;
  opacity: .55;
  pointer-events: none;
}
.iex-tool-shell .jd-b-glow {
  position: absolute; left: 50%; top: 34%; width: 460px; height: 460px;
  margin: -230px 0 0 -230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 128, 255, .18) 0%, rgba(31, 128, 255, 0) 66%);
  filter: blur(6px); pointer-events: none;
}
.iex-tool-shell #mold-viewer { width: 100%; height: 100%; display: block; background: transparent; position: relative; z-index: 2; }

.iex-tool-shell .jd-b-stage .model-credit {
  position: absolute; left: 16px; top: 14px; right: 16px; max-width: 330px; margin: 0; z-index: 6;
  font-size: 9px; line-height: 1.5; color: #79818f;
  background: rgba(8, 9, 12, .6); padding: 6px 9px; border-radius: 8px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.iex-tool-shell .jd-b-stage .model-credit b { color: #a7aeba; font-weight: 600; }

/* v2.1.0 · credit collapsed by default on ALL viewports (unified): one light
   line "ⓘ 3D asset © …", tap to expand the full statement, tap again to close */
.iex-tool-shell .jd-b-stage .model-credit {
  max-height: 24px !important; overflow: hidden !important;
  white-space: nowrap !important; text-overflow: ellipsis !important;
  cursor: pointer; transition: max-height .25s ease;
}
.iex-tool-shell .jd-b-stage .model-credit.open {
  max-height: 240px !important; overflow: auto !important;
  white-space: normal !important; text-overflow: clip !important;
}

/* dock: view mode + camera + orbit */
.iex-tool-shell .jd-b-dock {
  position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%);
  z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 8px;
  max-width: calc(100% - 24px);
}
.iex-tool-shell .jd-viewmode,
.iex-tool-shell .jd-views,
.iex-tool-shell .jd-orbit {
  display: flex; gap: 3px; padding: 4px; border-radius: 11px;
  background: rgba(16, 18, 23, .82); border: 1px solid var(--jd-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  position: static; left: auto; transform: none; bottom: auto;
}
.iex-tool-shell .jd-viewmode button,
.iex-tool-shell .jd-views button,
.iex-tool-shell .jd-orbit button {
  border: 0; background: transparent; color: #c3c9d4; font: inherit;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  padding: 7px 11px; min-height: 30px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; transition: background .14s, color .14s, transform .1s;
}
.iex-tool-shell .jd-viewmode button:hover,
.iex-tool-shell .jd-views button:hover,
.iex-tool-shell .jd-orbit button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.iex-tool-shell .jd-viewmode button.active,
.iex-tool-shell .jd-views button.active,
.iex-tool-shell .jd-orbit button.active { background: var(--jd-blue-solid); color: #fff; }
.iex-tool-shell .jd-views button.jd-spin.active { background: var(--jd-ok); color: #06210c; }

.iex-tool-shell .jd-orbit {
  position: absolute; right: 14px; bottom: 14px; z-index: 6;
}
.iex-tool-shell .jd-hint {
  position: absolute; right: 16px; top: 16px; margin: 0; z-index: 5;
  font-size: 9.5px; color: #5f6672; text-align: right;
}

/* technical flat */
.iex-tool-shell .jd-b-stage .jd-tech {
  position: absolute; inset: 0; display: none; padding: 52px 26px 96px;
  background-color: #eef1f5;
  background-image:
    linear-gradient(#e3e8ef 1px, transparent 1px),
    linear-gradient(90deg, #e3e8ef 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  z-index: 4;
}
.iex-tool-shell .jd-b-stage .jd-tech.on { display: flex; align-items: center; justify-content: center; }
.iex-tool-shell .jd-b-stage .jd-tech img {
  width: auto; height: auto; max-width: 100%; max-height: 100%;
  margin: 0; display: block; object-fit: contain; background: #fff;
  border-radius: 3px; box-shadow: 0 10px 30px rgba(16, 18, 22, .12);
}
.iex-tool-shell .jd-b-stage .jd-tech-meta {
  position: absolute; left: 16px; bottom: 12px; margin: 0;
  font-size: 9.5px; letter-spacing: .06em; color: #7c8492; text-transform: uppercase;
}

/* ---------- panel ---------- */
.iex-tool-shell .jd-b-panel {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--jd-panel);
  border-left: 1px solid var(--jd-line);
  /* v2.0.2: height auto — the old min(calc(100vh-300px),760px) clipped the
   * panel content once the inner scroll was removed (viewport flows). */
  height: auto;
  min-height: 620px;
}

/* stepper */
.iex-tool-shell .jd-b-steps {
  display: flex; align-items: center; gap: 0;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--jd-line);
}
.iex-tool-shell .jd-st {
  display: flex; align-items: center; gap: 7px; border: 0; background: transparent;
  padding: 0; cursor: pointer; color: var(--jd-muted); font: inherit;
  min-height: 24px; flex: 0 0 auto;
}
.iex-tool-shell .jd-st .n {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; background: #22262e; color: #8d94a2;
  border: 1px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.iex-tool-shell .jd-st .t { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.iex-tool-shell .jd-st:hover .n { background: #2b3038; color: #d5dae2; }
.iex-tool-shell .jd-st.done .n { background: rgba(31, 128, 255, .16); color: #7bb4ff; }
.iex-tool-shell .jd-st.active .n { background: var(--jd-blue-solid); color: #fff; transform: scale(1.06); }
.iex-tool-shell .jd-st.active .t { color: var(--jd-ink); }
.iex-tool-shell .jd-b-steps .bar { flex: 1 1 auto; min-width: 8px; height: 1px; background: var(--jd-line-2); margin: 0 8px; }

/* viewport + steps */
.iex-tool-shell .jd-b-viewport {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 20px 20px 8px;
}
/* ---------- scrollbars: thin, dark, no arrows (native ones ruin the dark UI) ---------- */
.iex-tool-shell .jd-b-viewport { scrollbar-width: thin; scrollbar-color: #333a45 transparent; scrollbar-gutter: stable; }
.iex-tool-shell .jd-b-viewport::-webkit-scrollbar { width: 12px; height: 12px; }
.iex-tool-shell .jd-b-viewport::-webkit-scrollbar-track { background: transparent; }
.iex-tool-shell .jd-b-viewport::-webkit-scrollbar-thumb {
  background: #2c323c; border-radius: 999px;
  border: 4px solid transparent; background-clip: content-box;
  transition: background .15s;
}
.iex-tool-shell .jd-b-viewport::-webkit-scrollbar-thumb:hover { background: #3d4450; background-clip: content-box; }
.iex-tool-shell .jd-b-viewport::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.iex-tool-shell .jd-b-viewport::-webkit-scrollbar-corner { background: transparent; }


.iex-tool-shell .jd-b-step { display: none; }
.iex-tool-shell .jd-b-step.is-active { display: block; }

.iex-tool-shell .jd-b-title { margin: 0 0 18px; }
.iex-tool-shell .jd-b-title .eyebrow {
  display: block; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--jd-blue); font-weight: 700; margin-bottom: 6px;
}
.iex-tool-shell .jd-b-title h2 {
  margin: 0 0 6px; font-size: 21px; line-height: 1.2; font-weight: 700; color: #fff;
  letter-spacing: -.01em;
}
.iex-tool-shell .jd-b-title p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--jd-muted); }

/* --- controls inside the panel (app.js markup) --- */
.iex-tool-shell .jd-b .opt-group { margin-bottom: 16px; }
.iex-tool-shell .jd-b .opt-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--jd-muted); margin: 14px 0 7px;
}
.iex-tool-shell .jd-b .opt-btns {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
}
.iex-tool-shell .jd-b .opt-btn {
  display: block; text-align: left; font: inherit; font-size: 12px; font-weight: 500;
  padding: 10px 12px; min-height: 40px; border-radius: 10px; cursor: pointer;
  background: var(--jd-card); color: var(--jd-ink); border: 1px solid var(--jd-line);
  transition: background .14s, border-color .14s, transform .1s, color .14s;
}
.iex-tool-shell .jd-b .opt-btn:hover { background: var(--jd-card-2); border-color: var(--jd-line-2); }
.iex-tool-shell .jd-b .opt-btn:active { transform: scale(.99); }
.iex-tool-shell .jd-b .opt-btn.active {
  background: rgba(31, 128, 255, .14); border-color: var(--jd-blue); color: #fff;
  box-shadow: 0 0 0 1px rgba(31, 128, 255, .35) inset;
}

/* fabric */
.iex-tool-shell .jd-b .fabric-group h4 {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--jd-muted); margin: 16px 0 8px;
}
.iex-tool-shell .jd-b .fabric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.iex-tool-shell .jd-b .fabric-card {
  position: relative; border-radius: 10px; overflow: hidden; cursor: pointer;
  background: var(--jd-card); border: 1px solid var(--jd-line);
  transition: border-color .16s, transform .12s, box-shadow .16s;
}
.iex-tool-shell .jd-b .fabric-card:hover { border-color: var(--jd-line-2); transform: translateY(-1px); }
.iex-tool-shell .jd-b .fabric-card.active {
  border-color: var(--jd-blue); box-shadow: 0 0 0 2px rgba(31, 128, 255, .28);
}
.iex-tool-shell .jd-b .fabric-card.active::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--jd-blue-solid) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/11px no-repeat;
}
.iex-tool-shell .jd-b .fabric-photo,
.iex-tool-shell .jd-b .fabric-swatch {
  width: 100%; height: 64px; display: block; object-fit: cover; margin: 0;
}
.iex-tool-shell .jd-b .fabric-name { font-size: 11px; line-height: 1.3; padding: 7px 9px 8px; color: var(--jd-ink-2); }
.iex-tool-shell .jd-b .fabric-card.active .fabric-name { color: #fff; }
.iex-tool-shell .jd-b .fabric-meta { display: none; }

/* extras */
.iex-tool-shell .jd-b .extra-row { display: grid; grid-template-columns: 1fr; gap: 7px; margin-bottom: 12px; }
.iex-tool-shell .jd-b .extra-name { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--jd-muted); font-weight: 700; }
.iex-tool-shell .jd-b .extra-row select,
.iex-tool-shell .jd-b .extra-row input[type="text"] {
  font: inherit; font-size: 12.5px; padding: 10px 11px; min-height: 42px;
  background: var(--jd-card); color: var(--jd-ink);
  border: 1px solid var(--jd-line-2); border-radius: 10px; width: 100%;
}
.iex-tool-shell .jd-b .color-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.iex-tool-shell .jd-b .color-btn { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.iex-tool-shell .jd-b .color-btn.active { border-color: #fff; box-shadow: 0 0 0 2px var(--jd-blue); }

/* measurements */
.iex-tool-shell .jd-b .measure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iex-tool-shell .jd-b .measure-field { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--jd-muted); font-weight: 700; }
.iex-tool-shell .jd-b .measure-field input {
  width: 100%; font: inherit; font-size: 13px; padding: 10px 11px; min-height: 42px; margin-top: 6px;
  background: var(--jd-card); color: var(--jd-ink); border: 1px solid var(--jd-line-2); border-radius: 10px;
}
.iex-tool-shell .jd-b .measure-field input::placeholder { color: #5c636f; }
.iex-tool-shell .jd-b .measure-diagram-wrap { margin-top: 14px; opacity: .9; }
.iex-tool-shell .jd-b #measure-diagram { max-width: 190px; }

/* summary table */
.iex-tool-shell .jd-b .summary-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.iex-tool-shell .jd-b .summary-table th,
.iex-tool-shell .jd-b .summary-table td { padding: 7px 4px; border-bottom: 1px solid var(--jd-line); text-align: left; vertical-align: top; }
.iex-tool-shell .jd-b .summary-table th { width: 42%; color: var(--jd-muted); font-weight: 600; }
.iex-tool-shell .jd-b .summary-table td { color: var(--jd-ink); }

/* tip */
.iex-tool-shell .jd-b .tip {
  font-size: 11.5px; line-height: 1.6; color: var(--jd-ink-2);
  background: rgba(31, 128, 255, .08); border-left: 2px solid var(--jd-blue);
  padding: 10px 12px; border-radius: 0 8px 8px 0; margin: 4px 0 14px;
}

/* action buttons inside step 5 */
.iex-tool-shell .jd-b-actions { display: flex; flex-direction: column; gap: 8px; }
.iex-tool-shell .jd-b-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.iex-tool-shell .jd-b .btn {
  font: inherit; font-size: 12px; font-weight: 600; padding: 11px 14px; min-height: 42px;
  border-radius: 10px; cursor: pointer; border: 1px solid var(--jd-line-2);
  background: var(--jd-card); color: var(--jd-ink); transition: background .14s, border-color .14s;
}
.iex-tool-shell .jd-b .btn:hover { background: var(--jd-card-2); }
.iex-tool-shell .jd-b .btn-gold { background: var(--jd-blue-solid); border-color: var(--jd-blue-solid); color: #fff; }
.iex-tool-shell .jd-b .btn-gold:hover { background: #0b56c0; }
.iex-tool-shell .jd-b .btn-sm { font-size: 11px; min-height: 36px; padding: 8px 10px; }
.iex-tool-shell .jd-b .status { font-size: 11.5px; padding: 9px 11px; border-radius: 8px; background: rgba(52, 199, 89, .12); color: #9be3ae; }

/* ---------- v2.0.2 · generate feedback ---------- */
/* sending state: blue pill + spinner (matches CRM/ERP "generating…" pattern) */
.iex-tool-shell .jd-b .status.sending {
  background: rgba(31, 128, 255, .12); color: #9cc4ff;
  position: relative; padding-left: 30px;
}
.iex-tool-shell .jd-b .status.sending::before {
  content: ''; position: absolute; left: 11px; top: 50%; width: 12px; height: 12px;
  margin-top: -6px; border-radius: 50%;
  border: 2px solid rgba(156, 196, 255, .30); border-top-color: #1f80ff;
  animation: iex-spin .8s linear infinite;
}
@keyframes iex-spin { to { transform: rotate(360deg); } }
/* required-field nudge: red inner flash x3 on the empty name/email inputs */
.iex-tool-shell input.iex-blink {
  animation: iex-blink .45s ease-in-out 0s 3;
  border-color: #ff5d5d !important; box-shadow: 0 0 0 2px rgba(255, 93, 93, .25);
}
@keyframes iex-blink {
  0%, 100% { background-color: rgba(255, 93, 93, .30); }
  50% { background-color: rgba(255, 93, 93, .05); }
}

/* ---------- v2.0.2 · generating overlay (Trip-planner style) ---------- */
.jd-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 6, 8, .66);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.jd-overlay.hidden { display: none; }
.jd-overlay-card {
  width: min(430px, 86vw); background: #12151a;
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 16px;
  padding: 36px 28px 20px; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.jd-overlay-ring {
  width: 46px; height: 46px; margin: 0 auto 20px; border-radius: 50%;
  border: 3.5px solid rgba(31, 128, 255, .18); border-top-color: #1f80ff;
  animation: iex-spin 1s linear infinite;
}
.jd-overlay-title { font-size: 16px; font-weight: 800; color: #fff; }
.jd-overlay-sub { font-size: 12px; color: #c8cdd6; margin-top: 5px; }
.jd-overlay-note { font-size: 11.5px; color: #8a919e; margin-top: 12px; }
.jd-overlay-warn {
  margin: 14px auto 0; max-width: 330px;
  border: 1px solid rgba(240, 180, 60, .55); background: rgba(240, 180, 60, .08);
  color: #f3d489; font-size: 10.5px; line-height: 1.55; border-radius: 8px; padding: 7px 10px;
}
.jd-overlay-timer {
  margin-top: 12px; font-size: 10px; letter-spacing: .18em;
  color: #6d7482; font-variant-numeric: tabular-nums;
}

/* ---------- panel nav ---------- */
.iex-tool-shell .jd-b-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--jd-line);
  background: #0e1015;
}
.iex-tool-shell .jd-b-btn {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .01em;
  padding: 11px 18px; min-height: 44px; border-radius: 11px; cursor: pointer;
  border: 1px solid transparent; transition: background .16s, transform .1s, opacity .16s;
}
.iex-tool-shell .jd-b-btn:active { transform: scale(.985); }
.iex-tool-shell .jd-b-btn-ghost { background: transparent; border-color: var(--jd-line-2); color: var(--jd-ink-2); }
.iex-tool-shell .jd-b-btn-ghost:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.iex-tool-shell .jd-b-btn-primary { margin-left: auto; background: var(--jd-blue-solid); color: #fff; }
.iex-tool-shell .jd-b-btn-primary:hover { background: #0b56c0; }
.iex-tool-shell .jd-b-btn[disabled] { opacity: .38; cursor: not-allowed; }
.iex-tool-shell .jd-b-count { font-size: 11px; color: var(--jd-muted); font-variant-numeric: tabular-nums; }

/* ---------- spec ribbon ---------- */
.iex-tool-shell .jd-b-ribbon {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-top: 1px solid var(--jd-line);
  background: #0e1015; /* v2.0.2: solid — the translucent bar read as "content cut off" while sticky */
}
.iex-tool-shell .jd-b-spec { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.iex-tool-shell .jd-b-spec .chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 230px; min-width: 0;
  font-size: 11px; color: var(--jd-ink-2);
  background: #171a20; border: 1px solid var(--jd-line); border-radius: 8px;
  padding: 5px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.iex-tool-shell .jd-b-spec .chip b {
  color: #fff; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iex-tool-shell .jd-b-spec .chip span { color: var(--jd-muted); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; }
.iex-tool-shell .jd-b-empty { font-size: 11px; color: var(--jd-muted); }

.iex-tool-shell .jd-b-cta {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-height: 48px; padding: 8px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--jd-blue-solid); color: #fff; position: relative; overflow: hidden;
  transition: background .16s, box-shadow .16s, transform .1s;
}
.iex-tool-shell .jd-b-cta span { font-size: 10px; letter-spacing: .1em; font-weight: 700; }
.iex-tool-shell .jd-b-cta em { font-style: normal; font-size: 11px; opacity: .92; }
.iex-tool-shell .jd-b-cta:hover { background: #0b56c0; box-shadow: 0 8px 24px rgba(15, 98, 216, .38); }
.iex-tool-shell .jd-b-cta:active { transform: scale(.99); }

/* click spark (React Bits pattern, plain DOM) */
.iex-tool-shell .jd-spark {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; pointer-events: none; opacity: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .iex-tool-shell .jd-b-body { grid-template-columns: minmax(0, 1fr) 380px; }
}

@media (max-width: 1024px) {
  .iex-tool-shell .jd-b-body { grid-template-columns: 1fr; }
  .iex-tool-shell .jd-b-stage { height: 46vh; min-height: 320px; border-radius: 0; }
  .iex-tool-shell .jd-b-panel {
    height: auto; min-height: 0; border-left: 0; border-top: 1px solid var(--jd-line);
  }
  .iex-tool-shell .jd-b-viewport { overflow: visible; max-height: none; padding-bottom: 16px; }
  .iex-tool-shell .jd-b-ribbon { position: sticky; bottom: 0; z-index: 30; }
  .iex-tool-shell .jd-b-steps { overflow-x: auto; }
  .iex-tool-shell .jd-st .t { display: none; }
  .iex-tool-shell .jd-st.active .t { display: inline; }
}

@media (max-width: 560px) {
  .iex-tool-shell .jd-b-head { padding: 12px 14px; }
  .iex-tool-shell .jd-b-brand em { display: none; }
  .iex-tool-shell .jd-b-steps { padding: 12px 14px; }
  .iex-tool-shell .jd-b-viewport { padding: 16px 14px 8px; }
  .iex-tool-shell .jd-b-nav { padding: 10px 14px; }
  .iex-tool-shell .jd-b-ribbon { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .iex-tool-shell .jd-b-spec { order: 2; width: 100%; }
  .iex-tool-shell .jd-b-cta { order: 1; width: 100%; }
  .iex-tool-shell .jd-b .opt-btns { grid-template-columns: 1fr; }
  .iex-tool-shell .jd-b .fabric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iex-tool-shell .jd-b-stage { height: 42vh; min-height: 280px; }
  .iex-tool-shell .jd-b-dock { bottom: 46px; }
  .iex-tool-shell .jd-orbit { position: static; margin: 0 auto 8px; }
  .iex-tool-shell .jd-hint { display: none; }
}

/* reduced motion: no transforms, no sparks */
@media (prefers-reduced-motion: reduce) {
  .iex-tool-shell .jd-b *,
  .iex-tool-shell .jd-b *::before,
  .iex-tool-shell .jd-b *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- contact form (app.js emits .form-grid > label > span + input) ---------- */
.iex-tool-shell .jd-b .form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.iex-tool-shell .jd-b .form-grid label {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--jd-muted); margin: 0;
}
.iex-tool-shell .jd-b .form-grid label.full { grid-column: 1 / -1; }
.iex-tool-shell .jd-b .form-grid label > span { display: block; }
.iex-tool-shell .jd-b .form-grid input,
.iex-tool-shell .jd-b .form-grid textarea {
  width: 100%; font: inherit; font-size: 12.5px; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--jd-ink);
  background: var(--jd-card); border: 1px solid var(--jd-line-2); border-radius: 10px;
  padding: 10px 11px; min-height: 42px; margin: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.iex-tool-shell .jd-b .form-grid textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.iex-tool-shell .jd-b .form-grid input:focus,
.iex-tool-shell .jd-b .form-grid textarea:focus {
  outline: 0; border-color: var(--jd-blue); background: #1b1f27;
  box-shadow: 0 0 0 3px rgba(31, 128, 255, .18);
}
.iex-tool-shell .jd-b .form-grid input::placeholder,
.iex-tool-shell .jd-b .form-grid textarea::placeholder { color: #5c636f; }

/* summary table: kill the theme's white borders */
.iex-tool-shell .jd-b #summary-body { border: 1px solid var(--jd-line); border-radius: 10px; overflow: hidden; }
.iex-tool-shell .jd-b .summary-table { border: 0; }
.iex-tool-shell .jd-b .summary-table tr:last-child th,
.iex-tool-shell .jd-b .summary-table tr:last-child td { border-bottom: 0; }
.iex-tool-shell .jd-b .summary-table th,
.iex-tool-shell .jd-b .summary-table td { padding: 8px 11px; border-left: 0; border-right: 0; }
.iex-tool-shell .jd-b .summary-table tr:nth-child(odd) { background: rgba(255, 255, 255, .015); }

@media (max-width: 560px) {
  .iex-tool-shell .jd-b .form-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   v2.0.1 · Trade Tools width contract
   Same reset the other tools ship as page-local CSS. Lobo gives `.four-fifth`
   width:67.2% + float:left + margin-right:4%, and below the tablet breakpoint
   pads it 11% a side (84px at 768px, 42.9px at 390px), which squeezed the tool
   to 599px / 304px. All five properties are reset — width alone is not enough.
   Scoped to body.iex-jd-page so no other page is touched.
   ========================================================================= */
.iex-jd-page .hentry.four-fifth {
  max-width: 100% !important;
  width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.iex-jd-page .four-fifth,
.iex-jd-page .three-fourth,
.iex-jd-page .one-half,
.iex-jd-page .one-third,
.iex-jd-page .one-fourth,
.iex-jd-page .one-fifth,
.iex-jd-page .two-thirds,
.iex-jd-page .span_12,
.iex-jd-page .span_9,
.iex-jd-page .span_8,
.iex-jd-page .span_6,
.iex-jd-page .span_4,
.iex-jd-page .span_3 {
  width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.iex-jd-page .container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.iex-jd-page .post-body,
.iex-jd-page .post-excerpt {
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.iex-jd-page .iex-tool-shell { width: 100% !important; }

/* ============================================================================
   v2.0.1 · phones
   The stage gets more height and the viewer is inset above the dock so no
   control row ever sits on top of the jeans.
   ========================================================================= */
/* fallback if the body class filter is not active (cached page, other host) */
@supports selector(:has(*)) {
  @media (max-width: 900px) {
    article.hentry:has(.jd-b),
    .post-body:has(.jd-b) { padding-left: 0 !important; padding-right: 0 !important; }
  }
}
