/* brain3d.css: frame, controls and labels for the 3-D models (see brain3d.js). */
figure.b3d { margin: 28px 0; padding: 0; }
.b3d-frame {
  --b3d-ink: #0F2A26; --b3d-teal: #0B7B6B; --b3d-teal-dark: #065C50; --b3d-line: #D5E3E0; --b3d-panel: #F4F8F7;
  border: 1px solid var(--b3d-line); border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: 0 6px 24px rgba(4, 42, 37, 0.10); font-family: inherit;
}
.b3d-frame:fullscreen { display: flex; flex-direction: column; border-radius: 0; background: #04140F; }
.b3d-frame:fullscreen .b3d-viewport { flex: 1 1 auto; aspect-ratio: auto; max-height: none; }
.b3d-frame:fullscreen .b3d-desc, .b3d-frame:fullscreen .b3d-credit { display: none; }
.b3d-viewport {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 72vh; min-height: 280px;
  background: radial-gradient(circle at 50% 43%, #0F3D35 0%, #04140F 75%); overflow: hidden; user-select: none;
}
@media (max-width: 600px) { .b3d-viewport { aspect-ratio: 1 / 1; max-height: 78vh; } }
.b3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; outline: none; }
.b3d-canvas:focus-visible { box-shadow: inset 0 0 0 3px #6BB5A6; }
.b3d-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.b3d-label {
  position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12.5px; line-height: 1.2; font-weight: 600;
  color: #F2FBF9; background: rgba(4, 30, 26, 0.72); border: 1px solid rgba(160, 220, 208, 0.45);
  padding: 3px 8px; border-radius: 999px; transform-origin: 0 0; margin: -11px 0 0 10px;
  transition: opacity 0.25s; backdrop-filter: blur(2px);
}
.b3d-label::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: #F2FBF9; box-shadow: 0 0 6px rgba(255,255,255,0.8);
}
.b3d-label.b3d-label-plain::before { display: none; }
.b3d-label.b3d-label-strong { background: rgba(204, 0, 51, 0.88); border-color: rgba(255,255,255,0.7); }
@media (max-width: 600px) { .b3d-label { font-size: 11px; padding: 2px 6px; } }
.b3d-status {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; color: #CFE8E2; font-size: 15px; z-index: 3;
}
.b3d-status.b3d-error { color: #FDEAEF; }
.b3d-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  color: #DDEFEA; font-size: 12.5px; background: rgba(4, 30, 26, 0.6); padding: 4px 12px; border-radius: 999px;
  transition: opacity 0.6s; white-space: nowrap;
}
.b3d-hint.b3d-hide { opacity: 0; }
.b3d-gate {
  position: absolute; right: 12px; bottom: 12px; z-index: 4; border: 0; border-radius: 999px; padding: 9px 16px;
  background: #CC0033; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,0.35); cursor: pointer;
}
.b3d-gate.b3d-gate-on { background: #fff; color: #0F2A26; }
.b3d-gate ~ .b3d-hint { bottom: 60px; }
.b3d-legend {
  position: absolute; left: 12px; top: 12px; z-index: 3; display: none; max-width: min(46%, 260px);
  background: rgba(4, 30, 26, 0.74); color: #EAF6F3; border: 1px solid rgba(160, 220, 208, 0.35);
  border-radius: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.35;
}
.b3d-legend-title { font-weight: 700; margin-bottom: 5px; font-size: 12.5px; }
.b3d-legend-item { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.b3d-sw { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.b3d-sw-line { width: 18px; height: 4px; border-radius: 2px; }
.b3d-sw-ring { background: transparent; border: 2px solid var(--c); }
.b3d-grad { height: 10px; border-radius: 5px; margin: 4px 0 3px; min-width: 150px; }
.b3d-grad-ends { display: flex; justify-content: space-between; font-size: 11px; opacity: 0.9; }
.b3d-legend-note { margin-top: 5px; font-size: 11px; opacity: 0.85; }
@media (max-width: 600px) { .b3d-legend { font-size: 11px; padding: 6px 8px; max-width: 58%; } }
.b3d-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--b3d-panel); border-top: 1px solid var(--b3d-line);
}
.b3d-toggles, .b3d-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.b3d-btn {
  font: inherit; font-size: 13.5px; font-weight: 600; border-radius: 999px; padding: 6px 13px; cursor: pointer;
  border: 1.5px solid var(--b3d-teal); background: #fff; color: var(--b3d-teal-dark); line-height: 1.2;
}
.b3d-btn:hover { background: #E6F3F0; }
.b3d-btn:focus-visible { outline: 3px solid #6BB5A6; outline-offset: 2px; }
.b3d-btn:disabled { opacity: 0.4; cursor: default; }
.b3d-toggle[aria-pressed="true"] { background: var(--b3d-teal); color: #fff; }
.b3d-toggle[aria-pressed="true"]::before { content: "\2713\00a0"; }
.b3d-steps { padding: 14px 18px 12px; border-top: 1px solid var(--b3d-line); background: #fff; }
.b3d-steps.b3d-single .b3d-step-nav, .b3d-steps.b3d-single .b3d-step-count { display: none; }
.b3d-step-count { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #5B7C76; font-weight: 700; }
.b3d-step-title { font-size: 17px; font-weight: 700; color: var(--b3d-ink); margin: 3px 0 6px; }
.b3d-step-text { font-size: 15.5px; line-height: 1.6; color: #2D3436; min-height: 3.2em; }
.b3d-step-text p { margin: 0 0 8px; }
.b3d-step-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.b3d-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.b3d-dot { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 1.5px solid var(--b3d-teal); background: #fff; cursor: pointer; }
.b3d-dot[aria-current="step"] { background: var(--b3d-teal); }
.b3d-desc { padding: 8px 18px; border-top: 1px solid var(--b3d-line); background: var(--b3d-panel); font-size: 14.5px; }
.b3d-desc summary { cursor: pointer; font-weight: 600; color: var(--b3d-teal-dark); }
.b3d-desc-body p { margin: 8px 0; line-height: 1.6; }
.b3d-credit { padding: 6px 18px 10px; font-size: 12px; color: #5B6B68; background: var(--b3d-panel); line-height: 1.45; }
.b3d-credit:empty { display: none; }
.b3d-credit a { color: var(--b3d-teal-dark); }
@media (max-width: 600px) {
  .b3d-steps { padding: 12px 12px 10px; }
  .b3d-step-text { font-size: 15px; }
  .b3d-btn { font-size: 13px; padding: 6px 11px; }
  .b3d-bar { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .b3d-label, .b3d-hint { transition: none; } }
figure.b3d > .fig-caption { margin: 10px 6px 0; }
figure.b3d > .fig-caption b { white-space: nowrap; }
@media (max-width: 600px) {
  .b3d-step-nav { flex-wrap: wrap; row-gap: 8px; }
  .b3d-dots { order: -1; flex: 1 0 100%; }
}
.b3d-ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: #065C50; }
.b3d-select { font: inherit; font-size: 13.5px; border: 1.5px solid #0B7B6B; border-radius: 999px; padding: 5px 10px; background: #fff; color: #065C50; max-width: 230px; }
.b3d-range { accent-color: #0B7B6B; width: 140px; }
.b3d-ctl-value { min-width: 3.5em; font-variant-numeric: tabular-nums; }
.b3d-info {
  position: absolute; right: 12px; top: 12px; z-index: 3; display: none; max-width: min(48%, 300px);
  background: rgba(255, 255, 255, 0.95); color: #2D3436; border-radius: 10px; padding: 10px 30px 10px 12px;
  font-size: 13.5px; line-height: 1.45; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.b3d-info b, .b3d-info strong { color: #065C50; }
.b3d-info-close { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 20px; cursor: pointer; color: #555; }
@media (max-width: 600px) { .b3d-info { max-width: 62%; font-size: 12.5px; } .b3d-range { width: 110px; } }
