/* A continuous journey from the colourful wafer down to one transistor. */
.wafer-scroll-track{display:contents}
.wafer-stage-readout{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.wafer-stage-readout [data-scene-stage]{font-size:12px;line-height:1.5;letter-spacing:.035em;color:#e6d8f6}
.wafer-stage-readout [data-scene-depth]{font-size:10px;line-height:1.5;letter-spacing:.03em;color:#b6cddd;text-align:right}
#home .silicon-viewport{background:radial-gradient(ellipse at 28% 38%,#9754d014,transparent 55%),radial-gradient(ellipse at 75% 66%,#48d4bd13,transparent 55%)}
#home .silicon-part-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin:8px 0 10px;padding:4px 0;border-color:#68718a50}
#home .silicon-part-tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:50px;padding:5px 2px;text-align:center;font-size:11px;line-height:1.3;border-radius:6px 6px 0 0;color:#adc1d1}
#home .silicon-part-tabs button span{display:block;margin:0;font-size:9px;line-height:1.25;color:#91a5ba}
#home .silicon-part-tabs button.selected{color:#f0ddff;background:#a778d818;border-bottom-color:#ca9ffa}
#home .silicon-part-tabs button:nth-child(2).selected{color:#fcddb2;background:#d5975117;border-bottom-color:#f0bd7c}
#home .silicon-part-tabs button:nth-child(3).selected{color:#bbeff9;background:#51c9dc17;border-bottom-color:#7ee7ed}
#home .silicon-part-tabs button:nth-child(4).selected{color:#beeed2;background:#57c77e17;border-bottom-color:#91e8ad}
#home .silicon-part-tabs button:nth-child(5).selected{color:#f3c0eb;background:#d469bb17;border-bottom-color:#eda2de}
#home .silicon-hint{color:#bbcad8}
#home.scroll-story-enabled{height:365svh;min-height:2300px}
#home.scroll-story-enabled .silicon-viewport{height:clamp(250px,calc(100svh - 405px),650px);min-height:0}
#home.scroll-story-enabled .scene-manual-controls{margin-top:8px}
#home.scroll-story-enabled .scene-manual-panel{bottom:48px;max-height:calc(100svh - 210px)}
#home .story-steps{font-size:9px}
#home .story-steps span.is-current{color:#d3b3f4}
#home .story-progress-fill{background:linear-gradient(90deg,#caa0f8,#e2a971 28%,#64d8e5 52%,#8ce3af 76%,#e39cd9)}

@media(max-width:760px){
  #home.silicon-scroll-story,#home.silicon-scroll-story.scroll-story-enabled{height:auto;min-height:0}
  #home .wafer-scroll-track{display:block;position:relative;min-width:0;width:100%;align-self:start}
  #home .wafer-stage-readout{gap:10px;padding:0 0 10px;margin:0;min-height:48px;box-sizing:border-box;grid-template-columns:minmax(0,1fr) minmax(0,125px)}
  #home .wafer-stage-readout [data-scene-stage]{font-size:12px;letter-spacing:0;line-height:1.6}
  #home .wafer-stage-readout [data-scene-depth]{font-size:10px;letter-spacing:0;line-height:1.5;max-width:125px;justify-self:end}
  #home .silicon-viewport{height:clamp(180px,calc(var(--wafer-available-height,460px) - 216px),350px);min-height:0}
  #home .silicon-hint{font-size:11px;line-height:1.55;margin:7px 2px 8px;min-height:3.1em}
  #home .silicon-part-tabs{grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;margin:4px 0 8px;padding:3px 0;flex-direction:row}
  #home .silicon-part-tabs button{min-height:50px;padding:5px 1px;font-size:11px;line-height:1.3;border-bottom-width:2px;flex:auto}
  #home .silicon-part-tabs button span{font-size:9px;margin:0;line-height:1.25}
  #home .scene-manual-controls>summary{min-height:44px;font-size:12px;line-height:1.5;padding:10px 13px}
  #home .silicon-concept{font-size:8px;line-height:1.4;bottom:7px}
  #home.wafer-phone-guided .wafer-scroll-track{height:calc(var(--wafer-stage-height,400px) + var(--wafer-screen-height,700px)*2.2)}
  #home.wafer-phone-guided #silicon-stage{position:sticky;top:var(--wafer-sticky-top,80px);align-self:start;margin-top:0;background:radial-gradient(ellipse at 55% 30%,#18202c80,transparent 75%),#0b0d10;border-radius:12px}
  #home.wafer-phone-guided .scene-manual-panel{position:absolute;inset:auto 0 53px;width:auto;max-height:calc(var(--wafer-available-height,440px) - 63px);overflow:auto;overscroll-behavior:auto;padding:17px;margin:0;background:#101923fa;border-color:#6b7c91;box-shadow:0 -16px 50px #0007;z-index:10;-webkit-overflow-scrolling:touch}
  #home.wafer-phone-guided .scene-manual-controls{position:relative;z-index:5}
  #home.wafer-phone-guided .scene-manual-controls>summary{position:relative;z-index:11;background:#13202cf5}
  #home.wafer-phone-guided .scene-manual-panel .silicon-part-info{padding-top:5px}
}
@media(max-width:360px){
  #home .wafer-stage-readout [data-scene-stage]{font-size:11px}
  #home .wafer-stage-readout [data-scene-depth]{font-size:9px;max-width:105px}
  #home .silicon-part-tabs button{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
  #home.scroll-story-enabled{height:auto;min-height:0}
  #home.wafer-phone-guided .wafer-scroll-track{height:auto}
  #home.wafer-phone-guided #silicon-stage{position:relative;top:auto}
}
