.bsh-topic .gt-nav,
.bsh-topic-layout .gt-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bsh-lab {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.bsh-select-label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.bsh-select-label select {
  min-height: 40px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 12px;
  padding: 0 10px;
  color: #0f172a;
  font-weight: 900;
  background: #fff;
}

.bsh-model-visual,
.bsh-exp-visual {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(0deg, rgba(20, 184, 166, 0.055) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(245, 158, 11, 0.055) 0 1px, transparent 1px 30px);
  overflow: hidden;
}

.bsh-case-grid {
  grid-template-columns: repeat(3, minmax(270px, 1fr));
}

.bsh-case {
  display: grid;
  gap: 12px;
  min-height: 535px;
  padding: 14px;
  border: 1px solid rgba(190, 202, 222, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.05);
}

.bsh-case-head {
  display: grid;
  gap: 4px;
}

.bsh-case-head span {
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 950;
}

.bsh-case-head strong {
  color: #0f172a;
  font-size: 1.14rem;
  line-height: 1.2;
}

.bsh-case p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.bsh-case-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bsh-case-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-weight: 900;
}

.bsh-case-controls input {
  width: 100%;
}

.bsh-case-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 205px;
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(248, 250, 252, 0.94), rgba(236, 253, 245, 0.92)),
    linear-gradient(90deg, transparent 0 48%, rgba(15, 23, 42, 0.06) 48% 52%, transparent 52%);
  overflow: hidden;
}

.bsh-case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bsh-case-metrics span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 12px;
  color: #64748b;
  background: #f8fafc;
  font-size: 0.74rem;
  font-weight: 900;
}

.bsh-case-metrics b {
  color: #0f172a;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.bsh-case-result {
  min-height: 72px;
  padding: 12px;
  border-radius: 14px;
  color: #254155;
  background: rgba(255, 251, 235, 0.9);
  font-weight: 850;
  line-height: 1.45;
}

.bsh-object {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 250px);
  min-height: 170px;
}

.bsh-object > span {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  width: max-content;
  max-width: 90%;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  font-size: 0.76rem;
  font-weight: 950;
  text-align: center;
  transform: translateX(-50%);
}

.bsh-roof-wall {
  position: absolute;
  bottom: 24px;
  width: calc(var(--w) * 0.78);
  height: 72px;
  border: 5px solid #9a3412;
  border-radius: 8px 8px 2px 2px;
  background:
    linear-gradient(90deg, transparent 0 45%, rgba(154, 52, 18, 0.4) 45% 55%, transparent 55%),
    #fed7aa;
}

.bsh-roof-top {
  position: absolute;
  bottom: 88px;
  width: var(--w);
  height: var(--h);
  background: #ef4444;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 -10px rgba(127, 29, 29, 0.22);
}

.bsh-sign i {
  width: min(var(--w), 150px);
  height: min(var(--w), 150px);
  background: #facc15;
  clip-path: polygon(50% 0, 100% 90%, 0 90%);
  filter: drop-shadow(0 12px 18px rgba(146, 64, 14, 0.2));
}

.bsh-sign i::after {
  content: "";
  position: absolute;
}

.bsh-sign b {
  position: absolute;
  top: 48px;
  color: #7c2d12;
  font-size: 3rem;
  font-weight: 950;
}

.bsh-mast {
  position: absolute;
  bottom: 28px;
  left: 72px;
  width: 8px;
  height: calc(var(--h) + 42px);
  border-radius: 999px;
  background: #475569;
}

.bsh-sail-cloth {
  position: absolute;
  bottom: 34px;
  left: 80px;
  width: var(--w);
  height: var(--h);
  background: linear-gradient(145deg, #bae6fd, #38bdf8);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  box-shadow: inset -16px -10px rgba(3, 105, 161, 0.2);
}

.bsh-bridge {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  width: min(100%, calc(var(--w) + 60px));
}

.bsh-bridge::after {
  content: "";
  position: absolute;
  bottom: 46px;
  left: 22px;
  right: 22px;
  height: 9px;
  border-radius: 999px;
  background: #475569;
}

.bsh-bridge i {
  position: relative;
  width: 30px;
  height: calc(var(--h) * 0.82);
  border-left: 5px solid #2563eb;
  border-right: 5px solid #2563eb;
}

.bsh-bridge i::before {
  content: "";
  position: absolute;
  inset: 12px -2px auto;
  height: 5px;
  background: #2563eb;
  transform: skewY(-35deg);
  transform-origin: left center;
}

.bsh-frame i {
  width: var(--w);
  height: var(--h);
  border: 14px solid #92400e;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.28), transparent 52%),
    #fff7ed;
  box-shadow: inset 0 0 0 5px #fbbf24;
}

.bsh-tile {
  display: grid;
  grid-template-columns: repeat(6, 24px);
  justify-content: center;
  align-content: center;
  gap: 3px;
  width: min(210px, calc(var(--w) + 50px));
  padding: 22px;
  border-radius: 10px;
  background: #e0f2fe;
  box-shadow: inset 0 0 0 6px #38bdf8;
}

.bsh-tile i {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(14, 116, 144, 0.5);
  border-radius: 4px;
  background: #f8fafc;
}

.bsh-notebook i:first-child {
  width: var(--w);
  height: var(--h);
  border: 5px solid #2563eb;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(37, 99, 235, 0.2) 17px 19px),
    #dbeafe;
  transform: skewX(-12deg);
}

.bsh-notebook i:nth-child(2) {
  position: absolute;
  left: calc(50% - 34px);
  width: 8px;
  height: var(--h);
  border-radius: 999px;
  background: #1d4ed8;
  transform: skewX(-12deg);
}

.bsh-kite i {
  width: calc(var(--w) * 0.72);
  height: calc(var(--h) * 0.94);
  background:
    linear-gradient(135deg, #fb7185 0 50%, transparent 50%),
    linear-gradient(45deg, #38bdf8 0 50%, #facc15 50%);
  clip-path: polygon(50% 0, 100% 42%, 50% 100%, 0 42%);
  filter: drop-shadow(0 14px 18px rgba(15, 23, 42, 0.16));
}

.bsh-kite::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 2px;
  height: 42px;
  background: #64748b;
}

.bsh-wheel,
.bsh-clock,
.bsh-table,
.bsh-coin {
  width: calc(var(--r) * 2 + 44px);
  height: calc(var(--r) * 2 + 44px);
}

.bsh-wheel::before,
.bsh-clock::before,
.bsh-table::before,
.bsh-coin::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 999px;
  background: #fff;
}

.bsh-wheel::before {
  border: 10px solid #334155;
  box-shadow: inset 0 0 0 8px #cbd5e1;
}

.bsh-wheel i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--r);
  height: 3px;
  border-radius: 999px;
  background: #64748b;
  transform: rotate(var(--rot)) translateX(0);
  transform-origin: left center;
}

.bsh-wheel::after,
.bsh-clock::after,
.bsh-table::after,
.bsh-coin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  transform: translate(-50%, -50%);
}

.bsh-clock::before {
  border: 8px solid #0f172a;
  background:
    radial-gradient(circle, #fff 0 58%, transparent 59%),
    conic-gradient(#0f172a 0 2deg, transparent 2deg 30deg, #0f172a 30deg 32deg, transparent 32deg 60deg, #0f172a 60deg 62deg, transparent 62deg 90deg, #0f172a 90deg 92deg, transparent 92deg);
}

.bsh-clock .hand-hour,
.bsh-clock .hand-min {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--r) * 0.7);
  height: 5px;
  border-radius: 999px;
  background: #0f172a;
  transform: rotate(var(--rot)) translateX(0);
  transform-origin: left center;
}

.bsh-clock .hand-min {
  width: var(--r);
  height: 3px;
  background: #ef4444;
  transform: rotate(90deg);
}

.bsh-table::before {
  border: 8px solid #0f766e;
  background: #ccfbf1;
}

.bsh-table i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f97316;
  transform: rotate(var(--rot)) translateX(calc(var(--r) + 24px));
  transform-origin: center;
}

.bsh-coin::before {
  border: 9px solid #b45309;
  background:
    radial-gradient(circle at 50% 50%, #fef3c7 0 42%, transparent 43%),
    #facc15;
}

.bsh-coin i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: #92400e;
  transform: rotate(var(--rot)) translateY(calc(-1 * var(--r)));
  transform-origin: center calc(var(--r));
}

.bsh-model-shape {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 320px);
  height: 260px;
}

.bsh-model-shape i {
  display: block;
  filter: drop-shadow(0 16px 20px rgba(15, 23, 42, 0.13));
}

.bsh-model-triangle i {
  width: var(--w);
  height: var(--h);
  background: linear-gradient(145deg, #fde68a, #f59e0b);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.bsh-model-quad i {
  width: var(--w);
  height: var(--h);
  border: 6px solid #2563eb;
  border-radius: 9px;
  background: #dbeafe;
  transform: skewX(-10deg);
}

.bsh-model-circle i {
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  border: 8px solid #0f766e;
  border-radius: 999px;
  background: #ccfbf1;
}

.bsh-model-shape b {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: #fff;
  background: #0f172a;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
  font-size: 1.05rem;
  font-weight: 950;
}

.bsh-model-shape span {
  position: absolute;
  bottom: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 950;
}

.bsh-exp-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.bsh-experiment,
.bsh-exp-board {
  display: grid;
  gap: 18px;
}

.bsh-experiment .control-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(190, 202, 222, 0.82);
  border-radius: 14px;
  color: #334155;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.bsh-experiment .control-card > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bsh-experiment .control-card strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  white-space: normal;
}

.bsh-experiment .control-card input {
  grid-column: 1 / -1;
  width: 100%;
}

.bsh-exp-story {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(20, 184, 166, 0.22);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #ecfdf5);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.08);
}

.bsh-exp-story > span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(20, 184, 166, 0.13);
  font-size: 0.78rem;
  font-weight: 950;
}

.bsh-exp-story > strong {
  color: #102033;
  font-size: 1.08rem;
  line-height: 1.35;
}

.bsh-exp-story p {
  margin: 0;
  color: #536171;
  line-height: 1.65;
}

.bsh-exp-svg {
  width: min(100%, 520px);
  min-height: 280px;
}

.bsh-exp-svg .shape-fill {
  fill: rgba(245, 158, 11, 0.3);
  stroke: rgba(245, 158, 11, 0.25);
  stroke-width: 2;
}

.bsh-exp-svg .shape-fill.quad {
  fill: rgba(37, 99, 235, 0.18);
}

.bsh-exp-svg .shape-fill.circle {
  fill: rgba(20, 184, 166, 0.18);
  stroke: #0f766e;
  stroke-width: 6;
}

.bsh-exp-svg .shape-edge,
.bsh-exp-svg .shape-radius {
  fill: none;
  stroke: #334155;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.52;
}

.bsh-exp-svg .shape-edge.is-on,
.bsh-exp-svg .shape-radius.is-on {
  stroke: #2563eb;
  opacity: 1;
}

.bsh-exp-svg .diameter {
  stroke: #f97316;
}

.bsh-exp-svg .shape-point,
.bsh-exp-svg .shape-center {
  fill: #94a3b8;
}

.bsh-exp-svg .shape-point.is-on,
.bsh-exp-svg .shape-center {
  fill: #ef4444;
}

.bsh-exp-svg text {
  fill: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.bsh-exp-svg .shape-caption {
  text-anchor: middle;
  fill: #334155;
  font-size: 16px;
}

html[lang="en"] .bsh-case-head strong,
html[lang="en"] .bsh-case-result,
html[lang="en"] .bsh-case-metrics b,
html[lang="en"] .bsh-exp-story > strong,
html[lang="en"] .bsh-exp-story p,
html[lang="en"] .bsh-model-shape span {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

html[lang="en"] .bsh-case-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

html[lang="en"] .bsh-case {
  min-height: 570px;
}

@media (max-width: 980px) {
  .bsh-lab,
  .bsh-exp-workbench {
    grid-template-columns: 1fr;
  }

  .bsh-case-grid {
    grid-template-columns: 1fr;
  }

  .bsh-case-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .bsh-topic .gt-nav,
  .bsh-topic-layout .gt-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bsh-case-controls {
    grid-template-columns: 1fr;
  }
}
