/* Homepage enhancements only. Keep the shared identity, original layout and visible content. */
.home-scene{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.home-scene canvas{display:block;width:100%;height:100%;opacity:.36}
html[data-theme=dark][data-view=home] .home-scene canvas{opacity:.34}
html[data-view=home] :is(main,.site-footer){position:relative;z-index:1}

/* Presentation frames disappear; headings, spacing, controls and table separators stay intact. */
[data-view=home] .discovery :is(.hero,.band,.hero-studio,.studio-canvas,.studio-top,.studio-steps,.studio-controls,.focus-label,.section-inset,.result-inset,.module-explorer,.explorer-tabs,.explorer-panel,.explorer-visual,.explorer-visual-foot,.explorer-code-note,.explorer-facts,.engineering-journey,.journey-step,.journey-detail,.result-workbench,.workbench-table,.panel-head,.workbench-note,.member-inspector,.inspection-drawing,.inspection-data,.check-context,.check-cards,.check-card,.check-reference){background:transparent;border:0;border-radius:0;box-shadow:none}
[data-view=home] .hero::after,[data-view=home] .studio-canvas::before,[data-view=home] .explorer-visual::before{display:none}
[data-view=home] :is(.explorer-tabs,.engineering-journey){gap:12px}
[data-view=home] .explorer-panel{gap:24px}
[data-view=home] .result-workbench{gap:28px}
[data-view=home] .check-cards{gap:24px}
[data-view=home] .check-card{padding-inline:0}
[data-view=home] .code-grid article{border:0}
[data-view=home] :is(.explorer-tab,.drawing-controls button){border-color:transparent;box-shadow:none;background:transparent}
[data-view=home] :is(.explorer-tab[aria-selected=true],.journey-step[aria-pressed=true],.drawing-controls button[aria-pressed=true]){background:color-mix(in srgb,var(--tint) 65%,transparent);color:var(--link)}

/* Frameless foreground hero inherits the same tokens as every other page. */
[data-view=home] .hero-studio{color:var(--ink);--art-line:var(--text-muted);--art-fill:var(--brand-blue);--rebar:var(--action)}
[data-view=home] .hero-studio :is(.studio-top,.studio-controls,.studio-steps button,.section-inset>span,.result-inset p,.studio-coordinates){color:var(--text-muted)}
[data-view=home] .hero-studio :is(.focus-label,.studio-steps button[aria-pressed=true]){color:var(--ink)}
[data-view=home] .hero-studio :is(.studio-button,.focus-label bdi){color:var(--link);background:transparent;border:0;border-radius:0;min-height:36px}
[data-view=home] .hero-studio .studio-button:hover{background:var(--tint)}
[data-view=home] .hero-studio button:focus-visible{outline-color:var(--focus)}
[data-view=home] .hero-studio .section-graphic{--section-ink:var(--text-muted);--section-fill:transparent;--section-rebar:var(--action)}
[data-view=home] .hero-studio .result-inset .tag{color:var(--link);background:transparent}
[data-view=home] .hero-studio .result-ratio span:last-child{color:var(--success)}
[data-view=home] .hero-studio .studio-disclaimer{color:var(--text-muted)}
[data-view=home] .hero-studio .model-datums{color:var(--text-muted)}
[data-view=home] .hero-studio .model-datums :is(path,circle){fill:var(--surface)}
[data-view=home] .hero-studio .axis-triad path{stroke:var(--text-muted)}
[data-view=home] .hero-studio .axis-triad text{fill:var(--text-muted)}
[data-view=home] .hero-studio :is(.focus-axis,.target-ring,.trace,.hero-connection){stroke:var(--action)}
[data-view=home] .hero-studio .focus-solid .concrete{fill:var(--brand-blue);stroke:var(--action)}
[data-view=home] .hero-studio .section-inset{transform:translateY(18px) scale(.96)}
[data-view=home] .hero-studio[data-stage="2"] .section-inset{transform:none}
.home-motion-control{display:flex;justify-content:flex-end;padding-bottom:12px;position:relative;z-index:1}
#home-motion{background:transparent;color:var(--link);border:0;font:inherit;font-size:12px;min-height:44px;padding:8px 0;cursor:pointer}
@media(max-width:800px){.home-scene canvas{opacity:.44}[data-view=home] .explorer-panel{gap:12px}[data-view=home] .result-workbench{gap:16px}}


/* Final homepage polish: use the existing identity, without changing page structure. */
[data-view=home] .discovery{--muted:color-mix(in srgb,var(--text-muted) 56%,var(--ink));--home-space:clamp(3.5rem,5vw,6rem)}
[data-view=home] .discovery .section{padding-block:var(--home-space)}
[data-view=home] .discovery .section-head{margin-bottom:clamp(1.75rem,3vw,3rem);align-items:start}
[data-view=home] .discovery :is(h1,h2,h3){text-wrap:balance}
[data-view=home] .discovery p{text-wrap:pretty}
[dir=rtl][data-view=home] .discovery :is(h1,h2,h3){letter-spacing:0}
[data-view=home] .discovery bdi{font-variant-numeric:tabular-nums}
[data-view=home] .hero-studio .structural-art .frame{stroke-opacity:.9}
[data-view=home] .hero-studio :is(.studio-top,.studio-controls,.studio-coordinates,.studio-disclaimer){color:var(--muted)}
[data-view=home] .studio-steps button[aria-pressed=true] bdi{color:var(--link)}
[data-view=home] .studio-steps i{background:var(--brand-cyan)}
[data-view=home] .explorer-visual{--art-line:var(--text-muted);--art-fill:var(--brand-blue);--rebar:var(--action)}
[data-view=home] .explorer-art .section-graphic{--section-ink:var(--text-muted);--section-fill:transparent;--section-rebar:var(--action)}
[data-view=home] .explorer-art .additional{stroke:var(--action)}
/* Finish the outgoing inset before revealing the next; no superimposed copy. */
[data-view=home] .hero-studio :is(.section-inset,.result-inset){
  visibility:hidden;pointer-events:none;
  transition:opacity 180ms ease,transform 400ms var(--ease),visibility 0s 180ms;
}
[data-view=home] .hero-studio[data-stage="2"] .section-inset,
[data-view=home] .hero-studio[data-stage="3"] .result-inset{
  visibility:visible;transition:opacity 380ms ease 180ms,transform 600ms var(--ease) 180ms,visibility 0s 180ms;
}
/* All panels size the same grid row; only the selected panel is visible/focusable.
   Without JavaScript the original sequential, fully readable fallback remains. */
.design-enhanced[data-view=home] .module-explorer{display:grid;grid-template-columns:minmax(0,1fr)}
.design-enhanced[data-view=home] .explorer-tabs{grid-row:1;grid-column:1}
.design-enhanced[data-view=home] .explorer-panel{grid-row:2;grid-column:1;align-self:stretch}
.design-enhanced[data-view=home] .explorer-panel[hidden]{display:grid!important;visibility:hidden;pointer-events:none}
.design-enhanced[data-view=home] .explorer-panel[hidden] *{animation:none!important;transition:none!important}
.design-enhanced[data-view=home] .explorer-code-note{grid-row:3;grid-column:1}
[data-view=home] .explorer-tab[aria-selected=true]>span{font-weight:600;color:var(--ink)}
[data-view=home] .explorer-tab[aria-selected=true]:after{background:var(--action)}
[data-view=home] .explorer-tab:hover .xb-feature__glyph{transform:translateY(-2px)}
[data-view=home] .explorer-panel:not([hidden]) :is(.explorer-art,.explorer-info){animation:home-panel-in 420ms var(--ease) both}
@keyframes home-panel-in{from{opacity:.65;transform:translateY(6px)}to{opacity:1;transform:none}}
[data-view=home] .discovery .closing{padding-block:var(--home-space)}
[data-view=home] .closing .container{align-items:center}
[data-view=home] .closing .actions{flex-shrink:0;gap:1.5rem}
[data-view=home] .closing .closing__link{color:#d8edff;text-underline-offset:.3em;text-decoration-thickness:1px}
[data-view=home] .closing .closing__link:hover{color:#fff}
[data-view=home] .closing-draft{opacity:.08}
@media(max-width:800px){[data-view=home] .closing .container{align-items:start}}
[data-view=home][data-motion=reduce] .explorer-tab:hover .xb-feature__glyph{transform:none}
@media(prefers-reduced-motion:reduce){[data-view=home] .explorer-tab:hover .xb-feature__glyph{transform:none}}



/* Approved transparent composition: separation follows the glyphs, never an opaque panel. */
[data-view=home] .discovery{--reading-edge:color-mix(in srgb,var(--surface) 90%,transparent)}
[data-view=home] .discovery :is(.hero-copy,.section-head,.explorer-info,.explorer-code-note,.journey-step,.journey-detail,.workbench-table,.workbench-note,.inspection-data,.check-context,.check-card,.check-reference,.code-grid){
  text-shadow:-.7px 0 var(--reading-edge),.7px 0 var(--reading-edge),0 -.7px var(--reading-edge),0 .7px var(--reading-edge);
}
[data-view=home] .discovery .xb-btn{text-shadow:none}
[data-view=home] .discovery .journey-step[aria-pressed=true]{background:transparent}
[data-view=home] .discovery :is(.hero-copy .lead,.explorer-lead,.section-head>p,.journey-description){font-weight:500}
[data-view=home] .discovery .journey-step>strong{font-weight:600}
@media(max-width:800px){
  html[data-theme=dark][data-view=home] .home-scene canvas{opacity:.40}
  [data-view=home] .discovery .section-head{row-gap:22px}
}
