/* BenStrukt public website — interactive 3D tower controls (Visual Refinement02 · Interactive Structural Explorer01 · Interaction Refinement03).
   Uses the site's tokens: --bg #111314, --white #f0f0eb, --line #303334, --green #b5c3a7, SF Mono labels. */
.t3d-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;outline:none;touch-action:pan-y;cursor:grab;opacity:0;transition:opacity .8s ease}
.t3d-ready .t3d-canvas,.analysis-visual.t3d-ready .t3d-canvas{opacity:1}
/* Soft edges: the canvas is transparent, but the floor light and the analytical grid would otherwise stop on a hard line. */
.structure-visual .t3d-canvas{-webkit-mask-image:linear-gradient(90deg,transparent,#000 9%,#000 95%,transparent),linear-gradient(180deg,transparent,#000 4%,#000 92%,transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent,#000 9%,#000 95%,transparent),linear-gradient(180deg,transparent,#000 4%,#000 92%,transparent);mask-composite:intersect}
.analysis-visual .t3d-canvas{-webkit-mask-image:linear-gradient(180deg,#000 82%,transparent);mask-image:linear-gradient(180deg,#000 82%,transparent)}
.t3d-grabbing .t3d-canvas{cursor:grabbing}
.analysis-visual .t3d-canvas{cursor:default}
.t3d-canvas:focus-visible{box-shadow:inset 0 0 0 2px var(--green)}
.structure::before{content:"";position:absolute;inset:-10% -20% 0;pointer-events:none;background:radial-gradient(ellipse at 52% 48%,#0f1b2899 0%,#0b121a55 38%,transparent 66%);opacity:0;transition:opacity 1.2s ease}
.structure[data-variant="B"]::before{opacity:1}
.t3d-bar,.t3d-note{opacity:0;transition:opacity .6s ease .2s}
.t3d-ready .t3d-bar,.t3d-ready .t3d-note{opacity:1}
.t3d-bar{position:absolute;z-index:3;left:52px;right:0;top:38px;display:flex;justify-content:space-between;align-items:center;gap:12px;pointer-events:none}
.t3d-bar>*{pointer-events:auto}
.t3d-switch{position:relative;display:inline-grid;grid-template-columns:1fr 1fr;border:1px solid #3b3e3d;background:#111314b3;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.t3d-switch button{position:relative;z-index:1;height:34px;min-width:104px;padding:0 14px;border:0;background:none;color:#bfc3c1;font:inherit;font-size:11px;letter-spacing:.2px;cursor:pointer;transition:color .35s}
.t3d-switch button[aria-checked="true"]{color:#131615}
.t3d-thumb{position:absolute;z-index:0;top:0;bottom:0;left:0;width:50%;height:auto;border-radius:0;display:block;background:#eceee7;transition:transform .6s cubic-bezier(.7,0,.2,1),background-color .6s}
[data-variant="B"] .t3d-thumb{transform:translateX(100%);background:#d8b46a}
[dir="rtl"] [data-variant="B"] .t3d-thumb{transform:translateX(-100%)}
[dir="rtl"] .t3d-thumb{left:auto;right:0}
.t3d-tools{display:flex;gap:6px}
.t3d-btn{height:34px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border:1px solid #ffffff24;background:#111314b3;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#d7dad7;font:inherit;font-size:11px;cursor:pointer;transition:border-color .2s,background .2s}
.t3d-btn:hover{border-color:#ffffff5c;background:#181b1c}
.t3d-btn[aria-pressed="true"]{border-color:var(--green);color:#fff}
.t3d-btn svg{width:13px;height:13px;fill:currentColor;flex-shrink:0}
.t3d-btn[data-icon="pause"] .i-play,.t3d-btn[data-icon="play"] .i-pause{display:none}
.t3d-switch button:focus-visible,.t3d-btn:focus-visible,.t3d-split:focus-visible{outline:2px solid var(--green);outline-offset:3px}
/* Footer band: sits just above the existing figure caption row (EXTERIOR / STRUCTURE). Line 1 holds the
   interaction hint in Cinematic and the legend in Analytical (same cell, no reflow); line 2 the disclosure. */
.t3d-note{position:absolute;z-index:2;left:22px;right:0;bottom:84px;margin:0;display:grid;gap:5px;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:9.5px;letter-spacing:.3px;line-height:1.45;color:#9aa39e;pointer-events:none}
.t3d-row{display:grid;align-items:end}
.t3d-row>*{grid-area:1/1;transition:opacity .5s ease}
.t3d-hint{color:#a7b0ab}
.t3d-disc{color:#8f9893}
.t3d-legend{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:16px;row-gap:3px;align-items:center;color:#b4bcc1;opacity:0}
[data-variant="B"] .t3d-legend{opacity:1}
[data-variant="B"] .t3d-hint{opacity:0}
.t3d-comparing .t3d-legend{opacity:0!important}
.t3d-comparing .t3d-hint{opacity:1!important}
.t3d-legend li{display:flex;align-items:center;gap:7px;white-space:nowrap}
.t3d-legend .sw{display:inline-block;width:16px;height:2px;flex-shrink:0;border-radius:0}
.sw-blue{background:#4ea3ff}.sw-ivory{background:#b4b6b1}.sw-gold{background:#d8b46a}
.t3d-legend .sw-node{width:7px;height:7px;border-radius:50%;background:#e6e8e3;box-shadow:0 0 0 1.5px #d8b46a;margin:0 4.5px}
.t3d-legend .sw-ghost{height:9px;border:1px solid #7f97ab88;background:#7f97ab1a}
.t3d-ready .axis{transition:none}
.t3d-split{position:absolute;top:0;bottom:0;width:34px;margin-left:-17px;z-index:3;cursor:ew-resize;touch-action:none}
.t3d-split span{position:absolute;left:16px;top:6%;bottom:6%;width:1px;background:#f0f0ebaa}
.t3d-split span::after{content:"‹ ›";position:absolute;top:50%;left:-16px;width:32px;height:32px;margin-top:-16px;border-radius:50%;background:#111314;border:1px solid #f0f0eb99;display:grid;place-items:center;font-size:12px;color:#f0f0eb;letter-spacing:2px}
.t3d-tags{position:absolute;z-index:2;left:8%;right:8%;top:18%;display:none;justify-content:space-between;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:9px;letter-spacing:1.2px;text-transform:uppercase;pointer-events:none}
.t3d-tags span:first-child{color:#e6e8e3}.t3d-tags span:last-child{color:#d8b46a}
.t3d-comparing .t3d-tags{display:flex}
.t3d-tip{position:absolute;left:0;top:0;z-index:4;pointer-events:none;padding:6px 9px;background:#0b0f13ee;border:1px solid #4ea3ff;color:#cfe3f5;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:10px;letter-spacing:1px}
.t3d-tip{white-space:nowrap;border-color:#b5c3a780;color:#dfe5d9;background:#0f1213f2;transition:opacity .15s ease}
.analysis-visual .t3d-tip{white-space:normal;max-width:240px}
/* Interaction03: two zones. Outside the projected structure the hero shows grab (drag rotates); over the structure,
   including facade and pedestal, the normal arrow (hover and selection win). An active rotation keeps grabbing
   until release, wherever the pointer goes. The transformation stage has no rotation: arrow everywhere. */
.t3d-canvas.t3d-over,.t3d-canvas.t3d-pointing{cursor:default}
.t3d-grabbing .t3d-canvas.t3d-canvas{cursor:grabbing}
/* Explorer01 — contextual information panel. One per stage; a bottom sheet on phones. */
.t3d-panel{position:absolute;z-index:4;inset-inline-end:0;top:86px;width:222px;max-height:calc(100% - 196px);overflow:auto;box-sizing:border-box;margin:0;padding:13px 14px 11px;border:1px solid #ffffff24;border-top-color:#b5c3a766;background:#101213eb;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#d7dad7;font-size:11px;line-height:1.5;text-align:start;opacity:0;visibility:hidden;transform:translateY(6px);transition:opacity .26s ease,transform .26s ease,visibility 0s linear .26s}
.t3d-panel.is-open{opacity:1;visibility:visible;transform:none;transition:opacity .26s ease,transform .26s ease,visibility 0s}
.analysis-visual .t3d-panel{top:14px;inset-inline-end:0;max-height:calc(100% - 120px)}
.t3d-panel header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin:0 0 10px}
.t3d-p-kind{display:flex;align-items:center;gap:7px;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:9px;letter-spacing:1.1px;text-transform:uppercase;color:#a7b0ab}
.t3d-p-kind::before{content:"";width:14px;height:2px;background:#b4b6b1;flex-shrink:0}
[data-cat="column"] .t3d-p-kind::before{background:#4ea3ff}[data-cat="brace"] .t3d-p-kind::before,[data-cat="support"] .t3d-p-kind::before{background:#d8b46a}
[data-cat="node"] .t3d-p-kind::before{width:6px;height:6px;border-radius:50%;background:#e6e8e3;box-shadow:0 0 0 1.5px #d8b46a;margin:0 4px}
.t3d-p-id{display:block;margin-top:3px;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:16px;font-weight:400;letter-spacing:.6px;color:#f4f3ea}
.t3d-p-x,.t3d-p-step{width:26px;height:26px;flex-shrink:0;display:grid;place-items:center;padding:0;border:1px solid #ffffff24;background:none;color:#d7dad7;font:inherit;font-size:15px;line-height:1;cursor:pointer;transition:border-color .2s,background .2s}
.t3d-p-x:hover,.t3d-p-step:hover,.t3d-p-chip:hover{border-color:#b5c3a7;background:#181b1c}
.t3d-p-rows{margin:0;padding:9px 0 2px;border-top:1px solid #ffffff1a;display:grid;gap:2px}
.t3d-p-rows dt{margin-top:6px;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:8.5px;letter-spacing:.9px;text-transform:uppercase;color:#8f9893}
.t3d-p-rows dt:first-child{margin-top:0}
.t3d-p-rows dd{margin:0;display:flex;flex-wrap:wrap;gap:4px 5px;align-items:center;color:#dfe2de}
.t3d-p-rows small{flex-basis:100%;font-size:9.5px;color:#8f9893}
.t3d-p-chip{height:22px;padding:0 7px;border:1px solid #3b3e3d;background:#15181966;color:#dfe5d9;font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:9.5px;letter-spacing:.4px;cursor:pointer;transition:border-color .2s,background .2s}
.t3d-p-occ{margin:9px 0 0;padding:8px 9px;border:1px solid #d8b46a55;color:#d9cfb6;font-size:10.5px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.t3d-p-nav{display:flex;align-items:center;gap:8px;margin-top:11px}
.t3d-p-count{font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:9.5px;letter-spacing:.6px;color:#a7b0ab;min-width:58px;text-align:center}
[dir="rtl"] .t3d-p-step{transform:scaleX(-1)}
.t3d-p-note{margin:10px 0 0;padding-top:8px;border-top:1px solid #ffffff1a;font-size:9.5px;line-height:1.5;color:#8f9893}
/* Arabic script must stay joined: no tracking, no monospace for words (identifiers keep the mono face). */
[dir="rtl"] .t3d-p-kind,[dir="rtl"] .t3d-p-rows dt{letter-spacing:0;font-family:inherit;font-size:10px}
[dir="rtl"] .t3d-tip,[dir="rtl"] .t3d-hint,[dir="rtl"] .t3d-disc,[dir="rtl"] .t3d-legend{letter-spacing:0}
.t3d-p-rows dd{column-gap:5px}
.t3d-p-x:focus-visible,.t3d-p-step:focus-visible,.t3d-p-chip:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.analysis-visual .t3d-canvas:focus-visible{box-shadow:inset 0 0 0 2px var(--green)}
.t3d-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.t3d-metrics{position:absolute;z-index:5;right:0;top:86px;margin:0;padding:10px 12px;background:#07090ae6;border:1px solid #ffffff1f;font-family:"SFMono-Regular",Consolas,monospace;font-size:9.5px;line-height:1.55;color:#b8c0bc;white-space:pre;max-height:70%;overflow:auto}
[hidden]{display:none!important}
@media (min-width:761px) and (max-width:1150px){
  .t3d-note{left:20px}
}
@media (max-width:1100px){
  .t3d-switch button{min-width:0}
  .t3d-btn{padding:0 10px}
  .t3d-btn span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}
@media (min-width:901px) and (max-width:1100px){
  .t3d-panel{width:196px;padding:11px 12px 10px}
}
/* Phones and portrait tablets: the figure is too narrow to share with a side panel, so the panel becomes a
   bottom sheet and the tower keeps its full size. */
@media (max-width:900px){
  .t3d-panel,.analysis-visual .t3d-panel{position:fixed;z-index:30;inset-inline:10px;top:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));width:auto;max-width:520px;margin-inline:auto;max-height:46vh;padding:12px 14px 10px;background:#0f1112f5;box-shadow:0 -12px 40px #000a;transform:translateY(14px)}
  .t3d-panel.is-open{transform:none}
  .t3d-p-rows{grid-template-columns:auto 1fr;column-gap:14px;row-gap:5px;align-items:baseline}
  .t3d-p-rows dt{margin-top:0}
  .t3d-p-x,.t3d-p-step{width:34px;height:34px}
  .t3d-p-chip{height:28px;padding:0 9px;font-size:10.5px}
}
@media (max-width:760px){
  .hero .structure{height:560px}
  .t3d-bar{left:0;right:0;top:40px;flex-wrap:wrap}
  .t3d-switch button{height:38px;padding:0 12px}
  .t3d-btn{height:38px;padding:0 10px}
  .t3d-note{left:0;bottom:78px;font-size:9px}
  .t3d-legend{column-gap:11px;font-size:8.5px}
}
@media (max-width:350px){
  .hero .structure{height:520px}
  .t3d-note{bottom:86px}
  .t3d-switch button{padding:0 9px}
}
@media (prefers-reduced-motion:reduce){.t3d-canvas,.t3d-bar,.t3d-legend,.t3d-note,.t3d-row>*,.t3d-thumb,.structure::before,.t3d-panel,.t3d-panel.is-open,.t3d-tip{transition:none}}
