/* ==========================================================================
   BundleTec · Kumaş Kompansatör Canlı Kesit  (homepage section #kompansator-3d)
   Scoped port of the designer export (bundletec-kompansator.html).
   Every selector is scoped under .bk3d and uses bk- prefixed classes so the
   site-wide stylesheet and this component cannot leak into each other.
   ========================================================================== */
.bk3d {
  --bk-bg: #09131d;
  --bk-panel: #0e1b27;
  --bk-line: #243643;
  --bk-text: #eaf0f3;
  --bk-muted: #8fa6b5;
  --bk-cyan: #6ae0df;
  --bk-orange: #ffad68;
  --bk-ok: #73dbb0;
  --bk-warn: #f4c85e;
  --bk-bad: #ff987d;
  --bk-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --bk-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 84px;
  color: var(--bk-text);
  font-family: var(--bk-font);
  font-size: 14px;
  /* High-contrast architectural steel-blue blueprint surface against #kurumsal (#041f42) above */
  background:
    radial-gradient(900px 480px at 10% 6%, rgba(234, 88, 12, 0.08), transparent 60%),
    radial-gradient(900px 520px at 90% 28%, rgba(2, 132, 199, 0.09), transparent 62%),
    linear-gradient(180deg, #e2ecf7 0%, #eef4fb 50%, #dfeaf6 100%);
  border-top: 3px solid #38bdf8;
  border-bottom: 1px solid rgba(4, 31, 66, 0.14);
}
.section.bk3d { padding: 7rem 0 6rem; }
.bk3d::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(4, 31, 66, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(4, 31, 66, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
}
.bk3d > .container { position: relative; z-index: 1; }
.bk3d *, .bk3d *::before, .bk3d *::after { box-sizing: border-box; }
.bk3d p { margin: 0; font-size: inherit; font-weight: 400; color: inherit; line-height: 1.6; }
.bk3d a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.bk3d button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--bk-line);
  background: #132330;
  border-radius: 7px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.bk3d button:hover { border-color: #7293a8; background: #1c3242; }
.bk3d button:focus-visible,
.bk3d a:focus-visible,
.bk3d input:focus-visible,
.bk3d summary:focus-visible,
.bk3d .bk-stage:focus-visible { outline: 2px solid var(--bk-cyan); outline-offset: 3px; }
.bk3d svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- headline ---------- */
.bk3d .bk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 3rem; margin-bottom: 2.5rem; }
.bk3d .bk-head-copy { max-width: 820px; }
.bk3d .bk-kicker { color: #075985; font-size: 0.9rem; font-weight: 700; }
.bk3d .bk-title {
  color: #041f42;
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 1rem 0 1.25rem;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.bk3d .bk-title span { display: block; }
.bk3d .bk-hot, .bk3d .bk-cool { -webkit-background-clip: text; background-clip: text; color: transparent; }
.bk3d .bk-hot { background-image: linear-gradient(90deg, #9a3412 0%, #c2410c 45%, #ea580c 100%); }
.bk3d .bk-cool { background-image: linear-gradient(90deg, #041f42 0%, #075985 52%, #0284c7 100%); }
.bk3d .bk-lead { color: #243b53; font-size: 1.1rem; line-height: 1.75; max-width: 780px; }
.bk3d .bk-head-side { display: flex; flex-direction: column; gap: 0.6rem; flex-shrink: 0; max-width: 100%; }
.bk3d .bk-engine {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  min-width: 280px;
  max-width: 100%;
  padding: 0.75rem 1.05rem;
  border: 1px solid rgba(4, 31, 66, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(4, 31, 66, 0.07);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font: 600 12.5px var(--bk-font);
  letter-spacing: 0.01em;
  color: #041f42;
}
.bk3d .bk-engine small { margin-left: auto; padding-left: 0.75rem; font: 500 11px var(--bk-mono); letter-spacing: 0.01em; color: #475569; white-space: nowrap; }
.bk3d .bk-engine-dot { width: 7px; height: 7px; border-radius: 50%; background: #ea580c; box-shadow: 0 0 8px rgba(234, 88, 12, 0.45); flex-shrink: 0; }
.bk3d .bk-engine-dot--cyan { background: #0284c7; box-shadow: 0 0 8px rgba(2, 132, 199, 0.45); }

/* ---------- stage + controls ---------- */
.bk3d .bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; }
.bk3d .bk-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  overflow: clip;
  border: 1px solid #1e3344;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 43%, #1b3040 0, #101f2d 43%, #0a1722 85%);
  box-shadow: 0 18px 40px -12px rgba(4, 31, 66, 0.24), 0 4px 12px rgba(4, 31, 66, 0.08);
  display: flex;
  flex-direction: column;
}
.bk3d .bk-stage { position: relative; flex: 1 1 auto; min-height: 575px; overflow: clip; isolation: isolate; }
.bk3d .bk-renderer { position: absolute; inset: 0; }
.bk3d .bk-layer-strip { flex: 0 0 auto; }
.bk3d .bk-stage canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.bk3d .bk-stage:fullscreen { width: 100vw; height: 100vh; min-height: 0; background: radial-gradient(ellipse, #1b3040, #09131d); }
.bk3d .bk-stage-top { position: absolute; top: 16px; left: 20px; right: 20px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; }
.bk3d .bk-model-label { min-width: 0; font: 10px var(--bk-mono); letter-spacing: 1.2px; line-height: 1.8; color: #bad0dd; }
.bk3d .bk-model-label b { display: block; font: 600 14px var(--bk-font); letter-spacing: 0.2px; color: #edf5f8; }
.bk3d .bk-live-dot { display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: #73dbb0; box-shadow: 0 0 9px #73dbb070; }
.bk3d .bk-stage-actions { display: flex; gap: 6px; pointer-events: auto; }
.bk3d .bk-icon-button { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: #0d1b27ce; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.bk3d .bk-icon-button svg { width: 16px; height: 16px; }
.bk3d .bk-view-tabs { position: absolute; left: 22px; top: 86px; z-index: 3; display: flex; gap: 2px; padding: 4px; background: #07131bd9; border: 1px solid #29404f; border-radius: 8px; }
.bk3d .bk-view-tabs button { padding: 8px 12px; border: 0; border-radius: 4px; background: transparent; font-size: 11px; color: var(--bk-muted); }
.bk3d .bk-view-tabs button.active { color: #0b252b; background: var(--bk-cyan); }
.bk3d .bk-tag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 8px 11px;
  border: 1px solid #496370;
  border-radius: 5px;
  background: #0b1b26de;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 10px;
  color: #b7cbd7;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.2s;
}
.bk3d .bk-tag b { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: #fff; }
.bk3d .bk-tag::after { content: ""; position: absolute; left: 50%; top: 100%; display: block; width: 1px; height: 18px; background: #496370; }
.bk3d .bk-tag--hot { border-color: #e49454; }
.bk3d .bk-tag--hot::after { background: #e49454; }
.bk3d .bk-tag--hot b { color: #ffbb82; }
.bk3d .bk-tag--layer { border-color: #79d2cb; }
.bk3d .bk-tag--layer::after { background: #79d2cb; }
.bk3d .bk-tag--layer b { color: #a9eeeb; }
.bk3d .bk-scene-bottom { position: absolute; bottom: 18px; left: 22px; right: 22px; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; pointer-events: none; }
.bk3d .bk-scene-bottom button { pointer-events: auto; }
.bk3d .bk-telemetry { display: flex; gap: 23px; }
.bk3d .bk-telemetry span { display: block; margin-bottom: 6px; font-size: 9px; letter-spacing: 1px; color: #7e9aad; }
.bk3d .bk-telemetry strong { font: 500 17px var(--bk-mono); color: #d6e9f3; }
.bk3d .bk-telemetry em { font-size: 10px; font-style: normal; color: #8ca7b7; }
.bk3d .bk-scene-legend { position: absolute; bottom: 88px; left: 22px; z-index: 2; display: none; width: 180px; }
.bk3d .bk-scene-legend .bk-ramp { height: 5px; margin: 8px 0; border-radius: 3px; background: linear-gradient(90deg, #4385d0, #6de1ca, #e8e868, #ff8f40, #f23827); }
.bk3d .bk-scene-legend .bk-endpoints { display: flex; justify-content: space-between; font: 10px var(--bk-mono); color: #adc5d5; }
.bk3d .bk-legend-label { font-size: 9px; letter-spacing: 1px; color: #a2b7c3; }
.bk3d .bk-camera-hint { position: absolute; bottom: 21px; left: 50%; z-index: 2; transform: translateX(-50%); font-size: 10px; color: #9db5c7; white-space: nowrap; pointer-events: none; }
.bk3d .bk-round-play { display: grid; place-items: center; width: 39px; height: 39px; padding: 0; border-radius: 50%; background: #112936; border-color: #4e727d; }
.bk3d .bk-round-play svg { width: 15px; height: 15px; }
.bk3d .bk-bottom-actions { display: flex; align-items: center; justify-content: flex-end; flex: 1 1 auto; gap: 8px; }
.bk3d .bk-camera-btn { padding: 9px 11px; font-size: 10px; background: #102330c9; }
.bk3d .bk-loader { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 12px; background: #0e1d29; font-size: 12px; color: #abc7d7; }
.bk3d .bk-loader.hidden { display: none; }
.bk3d .bk-spinner { width: 15px; height: 15px; border: 1px solid #2d4c5e; border-top-color: var(--bk-cyan); border-radius: 50%; animation: bk3d-spin 1s linear infinite; }
@keyframes bk3d-spin { to { transform: rotate(360deg); } }
.bk3d .bk-fallback { position: absolute; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 40px; background: #10212f; text-align: center; line-height: 1.8; }

.bk3d .bk-layer-strip { padding: 17px 20px 18px; border-top: 1px solid var(--bk-line); background: #0b1822; min-height: 172px; }
.bk3d .bk-strip-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 10px; letter-spacing: 1px; color: #8cabbc; }
.bk3d .bk-strip-heading span:last-child { font-size: 9px; letter-spacing: 0; color: #6d8a9d; }
.bk3d .bk-layer-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; min-height: 105px; }
.bk3d .bk-layer-item { position: relative; min-width: 0; padding: 11px 9px 9px; text-align: left; border: 1px solid #253b4c; border-radius: 6px; background: #0e202d; }
.bk3d .bk-layer-item.active { background: #17323e; border-color: #63c5c4; }
.bk3d .bk-layer-item small { display: flex; align-items: center; gap: 6px; font: 9px var(--bk-mono); color: #7397ad; }
.bk3d .bk-layer-item.active small { color: #93b7cc; }
.bk3d .bk-swatch { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color); }
.bk3d .bk-layer-item b { display: block; min-height: 33px; margin: 6px 0; font-size: 11px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.bk3d .bk-temp { font: 11px var(--bk-mono); color: #a9c1d0; }

.bk3d .bk-controls { display: flex; flex-direction: column; gap: 23px; padding: 21px; border: 1px solid #1e3344; border-radius: 12px; background: var(--bk-panel); box-shadow: 0 18px 40px -12px rgba(4, 31, 66, 0.22), 0 4px 12px rgba(4, 31, 66, 0.08); }
.bk3d .bk-control-title { display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 550; letter-spacing: 1.2px; color: #9bb4c5; }
.bk3d .bk-control-title svg { width: 16px; height: 16px; color: #6dbdbd; }
.bk3d .bk-control-section + .bk-control-section { padding-top: 20px; border-top: 1px solid var(--bk-line); }
.bk3d .bk-motion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; }
.bk3d .bk-motion-btn { display: flex; align-items: center; gap: 9px; padding: 12px 8px; text-align: left; font-size: 11px; background: #112331; }
.bk3d .bk-motion-btn svg { width: 20px; height: 20px; flex-shrink: 0; color: #658ca6; }
.bk3d .bk-motion-btn.active { background: #15333e; border-color: #60b8bb; color: #bdf4ee; }
.bk3d .bk-motion-btn.active svg { color: var(--bk-cyan); }
.bk3d .bk-range-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 16px 0 9px; font-size: 11px; color: #adc1cf; }
.bk3d .bk-range-heading output { font: 12px var(--bk-mono); color: #edf5f8; white-space: nowrap; }
.bk3d .bk-range-heading output.warm { color: var(--bk-orange); }
.bk3d input[type=range] {
  display: block;
  width: 100%;
  height: 24px;
  margin: 5px 0 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  accent-color: var(--bk-cyan);
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  background-image: linear-gradient(to right, var(--bk-cyan) var(--fill, 50%), #2b4354 var(--fill, 50%));
  background-size: 100% 4px;
  background-repeat: no-repeat;
  background-position: center;
}
.bk3d input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border: 3px solid #bddfdf; border-radius: 50%; background: #18353c; box-shadow: 0 0 0 3px #0e1b27; }
.bk3d input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid #bddfdf; border-radius: 50%; background: #18353c; }
.bk3d input.bk-heat-range { background-image: linear-gradient(90deg, #276d90, #ddbb66, #ec7950); }
.bk3d .bk-range-limits { display: flex; justify-content: space-between; font: 9px var(--bk-mono); color: #8fa6b5; }
.bk3d .bk-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 13px; font-size: 11px; color: #b8cad5; }
.bk3d .bk-toggle { position: relative; flex-shrink: 0; width: 44px; height: 24px; min-width: 44px; min-height: 24px; padding: 0; border: 1px solid #3e5969; border-radius: 14px; background: #233e50; }
.bk3d .bk-toggle::after { content: ""; position: absolute; top: 4px; left: 4px; width: 14px; height: 14px; border-radius: 50%; background: #92abb9; transition: transform 0.2s; }
.bk3d .bk-toggle.on { background: #346a6e; border-color: #5cbcbc; }
.bk3d .bk-toggle.on::after { background: #c6fbf3; transform: translateX(20px); }
.bk3d .bk-temp-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; padding: 12px; border-left: 2px solid #6bd1c4; border-radius: 3px; background: #0a1721; }
.bk3d .bk-temp-card > span { font-size: 10px; line-height: 1.6; color: #9eb6c5; }
.bk3d .bk-temp-card strong { font: 17px var(--bk-mono); color: #b8e3db; white-space: nowrap; }
.bk3d .bk-warmup { width: 100%; margin-top: 12px; padding: 9px; font-size: 10px; color: #a6c7d5; background: transparent; }
.bk3d .bk-warmup.running { color: var(--bk-orange); border-color: #af7748; }
.bk3d .bk-model-note { margin-top: auto; padding-top: 4px; font-size: 10px; line-height: 1.7; color: #6f90a5; }

/* ---------- thermal band ---------- */
.bk3d .bk-thermal-band { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; margin-top: 16px; }
.bk3d .bk-thermal-profile { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 20px; min-width: 0; padding: 19px 22px; border: 1px solid #1e3344; border-radius: 10px; background: #0e1b27; box-shadow: 0 14px 32px -12px rgba(4, 31, 66, 0.20), 0 3px 10px rgba(4, 31, 66, 0.07); }
.bk3d .bk-eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 1.2px; color: #8fabbc; }
.bk3d h3.bk-profile-title { margin: 8px 0; font-size: 17px !important; font-weight: 500; letter-spacing: 0; color: var(--bk-text); }
.bk3d .bk-profile-copy p { font-size: 10px; line-height: 1.6; color: #7798ad; min-height: 4.8em; }
.bk3d .bk-chart-wrap { position: relative; height: 105px; min-width: 0; direction: ltr; }
.bk3d .bk-chart-wrap svg { width: 100%; height: 100%; max-width: none; overflow: visible; direction: ltr; }
.bk3d .bk-chart-wrap svg text[font-family="Arial"] { font-family: var(--bk-font); }
.bk3d .bk-detail-panel { padding: 18px 21px; border: 1px solid #1e3344; border-radius: 10px; background: #10232f; box-shadow: 0 14px 32px -12px rgba(4, 31, 66, 0.20), 0 3px 10px rgba(4, 31, 66, 0.07); min-height: 248px; }
.bk3d .bk-detail-panel .bk-eyebrow { color: var(--bk-cyan); }
.bk3d h3.bk-detail-title { margin: 9px 0; font-size: 14px !important; font-weight: 500; letter-spacing: 0; color: var(--bk-text); }
.bk3d .bk-detail-panel p { font-size: 11px; line-height: 1.65; color: #91b0c3; }
.bk3d .bk-detail-panel p.bk-detail-meta { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #26404f; font: 10px/1.6 var(--bk-mono); color: #9fd8d3; min-height: 43px; }
.bk3d .bk-detail-panel p.bk-detail-meta:empty { visibility: hidden; }

/* ---------- BundleTec engineering summary + conversion bridge ---------- */
.bk3d .bk-kpi-band { margin-top: 16px; padding: 20px 22px 22px; border: 1px solid #1e3344; border-radius: 12px; background: linear-gradient(180deg, #0e1b27, #0b1822); box-shadow: 0 18px 40px -12px rgba(4, 31, 66, 0.22), 0 4px 12px rgba(4, 31, 66, 0.08); }
.bk3d .bk-kpi-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.bk3d .bk-kpi-head .bk-eyebrow { color: var(--bk-cyan); }
.bk3d .bk-kpi-trust { font: 500 11px var(--bk-font); color: #8cabbc; letter-spacing: 0.01em; }
.bk3d .bk-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bk3d .bk-kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 176px; padding: 14px 15px; border: 1px solid #1f3443; border-radius: 9px; background: #0a1721; }
.bk3d .bk-kpi-label { font-size: 10px; font-weight: 600; letter-spacing: 0.9px; text-transform: uppercase; color: #8fabbc; }
.bk3d .bk-kpi-value { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-height: 29px; }
.bk3d .bk-kpi-value strong { font: 500 24px var(--bk-mono); color: #e9f4f8; white-space: nowrap; }
.bk3d .bk-kpi-value em { font-size: 11px; font-style: normal; color: #8ca7b7; }
.bk3d .bk-kpi-sub { font-size: 11px; line-height: 1.5; color: #7f9cae; min-height: 3em; }
.bk3d .bk-kpi-sub[data-state="ok"] { color: var(--bk-ok); }
.bk3d .bk-kpi-sub[data-state="bad"] { color: var(--bk-bad); }
.bk3d .bk-badge { display: inline-block; width: fit-content; max-width: 100%; min-height: 23px; padding: 3px 8px; border: 1px solid currentColor; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.4; color: var(--bk-muted); }
.bk3d .bk-badge[data-state="SAFE"] { color: var(--bk-ok); }
.bk3d .bk-badge[data-state="WARNING"] { color: var(--bk-warn); }
.bk3d .bk-badge[data-state="EXCEEDED"] { color: var(--bk-bad); }
.bk3d .bk-kpi[data-state="EXCEEDED"] { border-color: #5a2f2a; }
.bk3d .bk-cmr-track { position: relative; height: 6px; margin: 6px 0 2px; border-radius: 4px; background: linear-gradient(90deg, #1d4740 0 60%, #4a4424 60% 80%, #4d2a26 80% 100%); direction: ltr; }
.bk3d .bk-cmr-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: var(--bk-ok); transition: width 0.12s linear; }
.bk3d .bk-cmr-bar[data-state="WARNING"] { background: var(--bk-warn); }
.bk3d .bk-cmr-bar[data-state="EXCEEDED"] { background: var(--bk-bad); }
.bk3d .bk-cmr-tick { position: absolute; top: -3px; bottom: -3px; width: 1px; background: #5b7385; }
.bk3d .bk-cmr-tick--a { left: 60%; }
.bk3d .bk-cmr-tick--b { left: 80%; }
.bk3d .bk-cmr-marker { position: absolute; top: -5px; left: 0; width: 2px; height: 16px; border-radius: 1px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); transform: translateX(-1px); transition: left 0.25s ease; }

.bk3d .bk-bridge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid #264253;
  border-radius: 10px;
  background:
    radial-gradient(520px 180px at 95% 50%, rgba(106, 224, 223, 0.09), transparent 70%),
    linear-gradient(90deg, rgba(16, 35, 49, 0.85), rgba(12, 26, 38, 0.95));
}
.bk3d .bk-bridge-copy { max-width: 760px; min-width: 0; }
.bk3d .bk-bridge-title { display: block; margin-bottom: 5px; font-size: 14.5px; font-weight: 700; color: #f2f8fa; letter-spacing: -0.01em; }
.bk3d .bk-bridge-copy p { font-size: 12px; line-height: 1.65; color: #9eb8c7; }
.bk3d .bk-bridge-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.bk3d .bk-kpi-cta { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 8px; background: var(--bk-cyan); font-size: 12.5px; font-weight: 700; color: #062027; transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap; }
.bk3d .bk-kpi-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(106, 224, 223, 0.25); }
.bk3d .bk-kpi-cta svg { width: 15px; height: 15px; stroke-width: 2.2; flex-shrink: 0; }
.bk3d .bk-kpi-quote { display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; border: 1px solid #3c5d70; border-radius: 8px; background: rgba(19, 38, 52, 0.85); font-size: 12.5px; font-weight: 600; color: #e2eff5; transition: border-color 0.2s, background 0.2s, transform 0.2s; white-space: nowrap; }
.bk3d .bk-kpi-quote:hover { border-color: var(--bk-cyan); background: #183446; transform: translateY(-1px); }

/* ---------- method / sources ---------- */
.bk3d .bk-info { margin-top: 20px; font-size: 11px; line-height: 1.8; color: #334e68; }
.bk3d .bk-info summary { display: inline-block; padding-bottom: 2px; border-bottom: 1px solid rgba(4, 31, 66, 0.32); color: #041f42; font-weight: 600; cursor: pointer; list-style: none; }
.bk3d .bk-info summary:focus-visible,
.bk3d .bk-info a:focus-visible { outline-color: #0284c7; }
.bk3d .bk-info summary::-webkit-details-marker { display: none; }
.bk3d .bk-info summary::before { content: "+ "; color: #0284c7; font-weight: 700; }
.bk3d .bk-info[open] summary::before { content: "− "; }
.bk3d .bk-info[open] summary { margin-bottom: 12px; }
.bk3d .bk-info p { max-width: 1040px; margin: 6px 0; }
.bk3d .bk-info a { color: #075985; font-weight: 600; border-bottom: 1px solid rgba(7, 89, 133, 0.4); }
.bk3d .bk-toast { position: fixed; bottom: 24px; left: 50%; z-index: 1000; display: none; padding: 12px 20px; border: 1px solid #579a9f; border-radius: 7px; background: #224856; color: #dcf9f2; font-size: 12px; transform: translateX(-50%); }

/* ---------- responsive ---------- */
@media (min-width: 1550px) { .bk3d .bk-stage { min-height: 640px; } }
@media (max-width: 1100px) {
  .bk3d .bk-layout, .bk3d .bk-thermal-band { grid-template-columns: minmax(0, 1fr) 280px; }
  .bk3d .bk-controls { padding: 17px; }
  .bk3d .bk-stage { min-height: 560px; }
  .bk3d .bk-layer-strip { min-height: 168px; }
  .bk3d .bk-layer-list { gap: 4px; min-height: 103px; }
  .bk3d .bk-layer-item { padding: 9px 6px; }
  .bk3d .bk-layer-item b { font-size: 10px; }
  .bk3d .bk-telemetry { gap: 13px; }
  .bk3d .bk-camera-hint { display: none; }
  .bk3d .bk-thermal-profile { grid-template-columns: 170px 1fr; gap: 10px; }
  .bk3d .bk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk3d .bk-bridge { flex-direction: column; align-items: flex-start; gap: 14px; }
  .bk3d .bk-head { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .bk3d .bk-head-side { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .section.bk3d { padding: 4.5rem 0 4rem; }
  .bk3d > .container { padding: 0 1rem; }
  .bk3d .bk-lead { font-size: 1rem; }
  .bk3d .bk-engine { min-width: 0; }
  .bk3d .bk-layout { grid-template-columns: 1fr; gap: 12px; }
  .bk3d .bk-stage { min-height: 490px; }
  .bk3d .bk-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 19px; }
  .bk3d .bk-control-section + .bk-control-section { padding-top: 0; padding-left: 18px; border-top: 0; border-left: 1px solid var(--bk-line); }
  .bk3d .bk-controls .bk-control-section--toggles { grid-column: 1 / -1; padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--bk-line); }
  .bk3d .bk-controls .bk-control-section--toggles .bk-toggle-row { display: inline-flex; gap: 15px; margin-right: 24px; }
  .bk3d .bk-model-note { grid-column: 1 / -1; margin-top: -6px; }
  .bk3d .bk-thermal-band { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .bk3d .bk-thermal-profile { grid-template-columns: 180px 1fr; }
  .bk3d .bk-detail-panel { min-height: 212px; }
  .bk3d .bk-view-tabs { top: 88px; }
  .bk3d .bk-tag { font-size: 9px; }
  .bk3d .bk-tag b { font-size: 11px; }
}
@media (max-width: 520px) {
  .bk3d .bk-head-side { width: 100%; flex-direction: column; }
  .bk3d .bk-engine { width: 100%; padding: 0.65rem 0.9rem; }
  .bk3d .bk-engine small { width: 100%; margin-left: 0; padding-left: calc(7px + 0.65rem); white-space: normal; }
  .bk3d .bk-stage { min-height: 455px; }
  .bk3d .bk-stage-top { left: 12px; right: 12px; top: 12px; gap: 6px; }
  .bk3d .bk-view-tabs { left: 14px; top: 94px; }
  .bk3d .bk-view-tabs button { padding: 8px 9px; }
  .bk3d .bk-model-label { font-size: 8.5px; line-height: 1.45; }
  .bk3d .bk-model-label b { font-size: 11.5px; line-height: 1.3; margin-bottom: 3px; }
  .bk3d .bk-scene-bottom { left: 14px; right: 14px; }
  .bk3d .bk-telemetry { gap: 12px; }
  .bk3d .bk-telemetry strong { font-size: 13px; }
  .bk3d .bk-telemetry span, .bk3d .bk-telemetry em { font-size: 8px; }
  .bk3d .bk-camera-btn { display: none; }
  .bk3d .bk-tag { padding: 6px 8px; }
  .bk3d .bk-tag b { font-size: 10px; }
  .bk3d .bk-layer-strip { padding: 13px 12px; min-height: 304px; }
  .bk3d .bk-strip-heading { font-size: 9px; }
  .bk3d .bk-strip-heading span:last-child { display: none; }
  .bk3d .bk-layer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-height: 250px; }
  .bk3d .bk-layer-item { padding: 8px 10px; }
  .bk3d .bk-layer-item:last-child { grid-column: 1 / -1; }
  .bk3d .bk-layer-item b { min-height: 0; margin: 4px 0; font-size: 10.5px; line-height: 1.35; overflow-wrap: break-word; }
  .bk3d .bk-layer-item .bk-temp, .bk3d .bk-layer-item small { font-size: 9.5px; }
  .bk3d .bk-thermal-profile { grid-template-columns: 1fr; gap: 11px; padding: 18px; }
  .bk3d .bk-profile-copy p { min-height: 3.2em; }
  .bk3d .bk-detail-panel { min-height: 232px; }
  .bk3d .bk-controls { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .bk3d .bk-control-section + .bk-control-section { padding-left: 0; padding-top: 14px; border-left: 0; border-top: 1px solid var(--bk-line); }
  .bk3d .bk-controls .bk-control-section--toggles .bk-toggle-row { display: flex; width: 100%; justify-content: space-between; margin-right: 0; margin-left: 0; }
  .bk3d .bk-motion-btn { gap: 6px; padding: 10px 6px; font-size: 10px; }
  .bk3d .bk-scene-legend { bottom: 76px; left: 14px; width: min(176px, calc(100% - 28px)); }
  .bk3d .bk-round-play { width: 34px; height: 34px; }
  .bk3d .bk-kpis { grid-template-columns: 1fr; }
  .bk3d .bk-kpi { min-height: 118px; }
  .bk3d .bk-kpi:has(.bk-cmr-track) { min-height: 168px; }
  .bk3d .bk-kpi-value strong { font-size: 21px; }
  .bk3d .bk-bridge-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .bk3d .bk-kpi-cta, .bk3d .bk-kpi-quote { justify-content: center; width: 100%; white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bk3d .bk-spinner { animation: none; }
  .bk3d .bk-tag,
  .bk3d .bk-toggle::after,
  .bk3d .bk-cmr-bar,
  .bk3d .bk-cmr-marker,
  .bk3d .bk-kpi-cta,
  .bk3d .bk-kpi-quote { transition: none; }
  .bk3d .bk-kpi-cta:hover,
  .bk3d .bk-kpi-quote:hover { transform: none; }
}

/* ---------- Arabic RTL layout & typography ---------- */
[dir="rtl"] .bk3d,
html[lang="ar"] .bk3d {
  --bk-font: "IBM Plex Sans Arabic", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --bk-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "IBM Plex Sans Arabic", sans-serif;
}
[dir="rtl"] .bk3d .bk-engine small,
[dir="rtl"] .bk3d .bk-model-label,
[dir="rtl"] .bk3d .bk-detail-panel p.bk-detail-meta {
  font-family: var(--bk-font);
  font-variant-numeric: tabular-nums;
}
[dir="rtl"] .bk3d .bk-title,
html[lang="ar"] .bk3d .bk-title {
  letter-spacing: 0;
  line-height: 1.24;
}
[dir="rtl"] .bk3d .bk-hot,
html[lang="ar"] .bk3d .bk-hot {
  background-image: linear-gradient(270deg, #9a3412 0%, #c2410c 45%, #ea580c 100%);
}
[dir="rtl"] .bk3d .bk-cool,
html[lang="ar"] .bk3d .bk-cool {
  background-image: linear-gradient(270deg, #041f42 0%, #075985 52%, #0284c7 100%);
}
[dir="rtl"] .bk3d .bk-kicker,
[dir="rtl"] .bk3d .bk-engine,
[dir="rtl"] .bk3d .bk-model-label,
[dir="rtl"] .bk3d .bk-model-label b,
[dir="rtl"] .bk3d .bk-telemetry span,
[dir="rtl"] .bk3d .bk-legend-label,
[dir="rtl"] .bk3d .bk-strip-heading,
[dir="rtl"] .bk3d .bk-control-title,
[dir="rtl"] .bk3d .bk-eyebrow,
[dir="rtl"] .bk3d .bk-kpi-trust,
[dir="rtl"] .bk3d .bk-kpi-label,
[dir="rtl"] .bk3d .bk-badge,
[dir="rtl"] .bk3d .bk-bridge-title {
  letter-spacing: 0;
}
[dir="rtl"] .bk3d .bk-engine small {
  margin-left: 0;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0.75rem;
}
[dir="rtl"] .bk3d .bk-live-dot {
  margin-right: 0;
  margin-left: 7px;
}
[dir="rtl"] .bk3d .bk-view-tabs {
  left: auto;
  right: 22px;
}
[dir="rtl"] .bk3d .bk-scene-legend {
  left: auto;
  right: 22px;
}
[dir="rtl"] .bk3d .bk-layer-strip {
  min-height: 172px;
}
[dir="rtl"] .bk3d .bk-layer-list {
  min-height: 105px;
}
[dir="rtl"] .bk3d .bk-layer-item,
[dir="rtl"] .bk3d .bk-motion-btn {
  text-align: right;
}
[dir="rtl"] .bk3d .bk-temp-card {
  border-left: 0;
  border-right: 2px solid #6bd1c4;
}
[dir="rtl"] .bk3d input[type=range] {
  background-image: linear-gradient(to left, var(--bk-cyan) var(--fill, 50%), #2b4354 var(--fill, 50%));
}
[dir="rtl"] .bk3d input.bk-heat-range {
  background-image: linear-gradient(270deg, #276d90, #ddbb66, #ec7950);
}
[dir="rtl"] .bk3d .bk-toggle::after {
  left: auto;
  right: 4px;
}
[dir="rtl"] .bk3d .bk-toggle.on::after {
  transform: translateX(-20px);
}
[dir="rtl"] .bk3d .bk-kpi-cta svg {
  transform: scaleX(-1);
}
[dir="rtl"] .bk3d .bk-telemetry strong,
[dir="rtl"] .bk3d .bk-telemetry em,
[dir="rtl"] .bk3d .bk-range-heading output,
[dir="rtl"] .bk3d .bk-range-limits span,
[dir="rtl"] .bk3d .bk-temp,
[dir="rtl"] .bk3d .bk-temp-card strong,
[dir="rtl"] .bk3d .bk-kpi-value strong,
[dir="rtl"] .bk3d .bk-kpi-value em,
[dir="rtl"] .bk3d #bk3d-gasTagValue,
[dir="rtl"] .bk3d .bk-endpoints {
  direction: ltr;
  unicode-bidi: isolate;
}
@media (max-width: 820px) {
  [dir="rtl"] .bk3d .bk-control-section + .bk-control-section {
    padding-left: 0;
    padding-right: 18px;
    border-left: 0;
    border-right: 1px solid var(--bk-line);
  }
  [dir="rtl"] .bk3d .bk-controls .bk-control-section--toggles {
    padding-right: 0;
    border-right: 0;
  }
  [dir="rtl"] .bk3d .bk-controls .bk-control-section--toggles .bk-toggle-row {
    margin-right: 0;
    margin-left: 24px;
  }
}
@media (max-width: 520px) {
  [dir="rtl"] .bk3d .bk-layer-strip {
    min-height: 304px;
  }
  [dir="rtl"] .bk3d .bk-layer-list {
    min-height: 250px;
  }
  [dir="rtl"] .bk3d .bk-detail-panel {
    min-height: 232px;
  }
  [dir="rtl"] .bk3d .bk-engine small {
    margin-right: 0;
    padding-right: calc(7px + 0.65rem);
  }
  [dir="rtl"] .bk3d .bk-view-tabs {
    left: auto;
    right: 14px;
  }
  [dir="rtl"] .bk3d .bk-scene-legend {
    left: auto;
    right: 14px;
  }
  [dir="rtl"] .bk3d .bk-control-section + .bk-control-section {
    padding-right: 0;
    border-right: 0;
  }
  [dir="rtl"] .bk3d .bk-controls .bk-control-section--toggles .bk-toggle-row {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---------- Enriched 3D Viewport Controls (Pan/Drag, Presets, X-Ray, Ortho, Triad) ---------- */
.bk3d .bk-stage canvas { cursor: grab; }
.bk3d .bk-stage canvas:active { cursor: grabbing; }
.bk3d .bk-stage.bk-stage--engaged canvas,
.bk3d .bk-stage:fullscreen canvas { touch-action: none; }
.bk3d .bk-stage.bk-pan-mode canvas { cursor: move !important; touch-action: none !important; }
.bk3d .bk-stage-top.bk-stage-top--enhanced {
  top: 16px;
  left: 20px;
  right: 20px;
  z-index: 3;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.bk3d .bk-stage-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 12px;
  width: 100%;
  pointer-events: none;
}
.bk3d .bk-stage-head-row .bk-model-label {
  flex: 1 1 210px;
  min-width: 0;
}
.bk3d .bk-stage-actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
  gap: 5px;
  pointer-events: auto;
}
.bk3d .bk-stage-sub-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}
.bk3d .bk-stage-sub-row .bk-view-tabs {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  pointer-events: auto;
  flex-wrap: wrap;
  max-width: 100%;
}
.bk3d .bk-icon-button { width: 32px; height: 32px; }
.bk3d .bk-icon-button svg { width: 15px; height: 15px; }
.bk3d .bk-icon-button.active { border-color: var(--bk-cyan); background: #143642; color: var(--bk-cyan); box-shadow: 0 0 0 1px rgba(106, 224, 223, 0.28); }
.bk3d .bk-tool-btn { width: auto; padding: 0 8px; gap: 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.bk3d .bk-tool-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.bk3d .bk-camera-hint {
  bottom: 6px;
  max-width: calc(100% - 44px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk3d .bk-scene-bottom { bottom: 28px; }
.bk3d .bk-scene-legend { bottom: 96px; }
.bk3d .bk-bottom-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bk3d .bk-camera-btn { padding: 8px 10px; font-size: 10px; }
.bk3d .bk-camera-btn.active { border-color: var(--bk-cyan); background: #153642; color: var(--bk-cyan); }
.bk3d .bk-axis-triad {
  position: absolute;
  bottom: 80px;
  right: 22px;
  z-index: 3;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(7, 19, 27, 0.84);
  border: 1px solid #2b4759;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  user-select: none;
  direction: ltr;
}
.bk3d .bk-axis-triad .bk-triad-hit { cursor: pointer; }
.bk3d .bk-axis-triad .bk-triad-hit:hover circle { filter: brightness(1.18); }
.bk3d .bk-panned-chip {
  position: absolute;
  top: 132px;
  left: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid #72e6e5;
  border-radius: 6px;
  background: rgba(106, 224, 223, 0.92);
  color: #062128;
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
}
.bk3d .bk-stage-sub-row .bk-panned-chip {
  position: static;
  top: auto;
  left: auto;
  right: auto;
}
.bk3d .bk-panned-chip:hover { background: #8ef0ef; color: #051c22; border-color: #ffffff; }
[dir="rtl"] .bk3d .bk-axis-triad { right: auto; left: 22px; }
[dir="rtl"] .bk3d .bk-panned-chip { left: auto; right: 22px; }
[dir="rtl"] .bk3d .bk-stage-sub-row .bk-panned-chip,
[dir="rtl"] .bk3d .bk-stage-sub-row .bk-view-tabs { left: auto; right: auto; }
@media (max-width: 1240px) {
  .bk3d .bk-tool-btn span { display: none; }
  .bk3d .bk-tool-btn { width: 32px; padding: 0; }
}
@media (max-width: 1100px) {
  .bk3d .bk-scene-bottom { bottom: 16px; }
  .bk3d .bk-axis-triad { bottom: 68px; }
  .bk3d .bk-scene-legend { bottom: 84px; }
}
@media (max-width: 680px) {
  .bk3d .bk-stage-actions { max-width: 100%; gap: 4px; }
  .bk3d .bk-icon-button,
  .bk3d .bk-tool-btn { width: 30px; height: 30px; }
  .bk3d .bk-icon-button svg { width: 14px; height: 14px; }
  .bk3d .bk-axis-triad { display: none; }
  .bk3d .bk-cam-preset { padding: 7px 8px; font-size: 9.5px; }
  .bk3d .bk-panned-chip { font-size: 10px; padding: 4px 8px; }
}
@media (max-width: 520px) {
  .bk3d .bk-stage-top.bk-stage-top--enhanced { top: 12px; left: 12px; right: 12px; gap: 6px; }
  .bk3d .bk-stage-head-row { gap: 6px; }
  .bk3d .bk-stage-head-row .bk-model-label { flex: 1 1 100%; }
  .bk3d .bk-stage-head-row .bk-stage-actions { justify-content: flex-start; gap: 4px; }
  .bk3d .bk-icon-button,
  .bk3d .bk-tool-btn { width: 28px; height: 28px; }
  .bk3d .bk-stage-sub-row { gap: 6px; }
  .bk3d .bk-stage-sub-row .bk-view-tabs button { padding: 6px 8px; font-size: 10.5px; }
  .bk3d .bk-scene-legend { bottom: 72px; }
}
