/* Closer's Stool interactive visual — preview only */

.stool-interactive{
  display:grid;
  grid-template-columns:minmax(220px,.9fr) 1.1fr;
  gap:36px 40px;
  align-items:center;
  margin-top:32px;
}
.stool-interactive .stool-legs{
  grid-template-columns:1fr;
  margin-top:0;
}
.stool-interactive .stool-seat{
  margin-top:0;
  border-color:#2a2820;
}

.stool-visual{
  position:sticky;
  top:24px;
  display:flex;
  justify-content:center;
  align-items:center;
  background:var(--bg);
  margin:0;
  padding:0;
}
.stool-stage{
  width:100%;
  max-width:420px;
  aspect-ratio:320 / 385;
  flex:0 0 auto;
}
.stool-svg{
  width:100%;
  height:100%;
  display:block;
  overflow:visible;
  transform-origin:50% 94%;
}
.stool-stage.is-wobbling .stool-svg{
  animation:stool-wobble 2.8s ease-in-out infinite;
}
.stool-stage.is-settling .stool-svg{
  animation:stool-settle .7s ease-out both;
}

@keyframes stool-wobble{
  0%,100%{transform:rotate(-0.9deg)}
  50%{transform:rotate(0.9deg)}
}
@keyframes stool-settle{
  0%{transform:rotate(0.9deg)}
  40%{transform:rotate(-0.25deg)}
  100%{transform:rotate(0deg)}
}

.stool-floor{
  fill:none;
  stroke:var(--gold);
  stroke-width:1.25;
  stroke-opacity:.22;
}
.stool-svg .seat-occluder{
  fill:var(--bg);
  stroke:none;
}
.stool-svg .part{
  stroke:var(--gold);
  stroke-opacity:.62;
  fill:none;
  transition:stroke-opacity .4s ease,filter .4s ease;
  filter:none;
}
.stool-svg .leg-stroke{
  stroke-width:5;
  stroke-linecap:butt;
  stroke-linejoin:miter;
}
.stool-svg .leg-foot{
  stroke-width:5;
  stroke-linecap:butt;
}
.stool-svg .seat-top,
.stool-svg .seat-apron,
.stool-svg .seat-inner{
  stroke-width:3.25;
  stroke-linejoin:miter;
  stroke-linecap:miter;
  fill:#c8b896;
  fill-opacity:0;
  transition:fill-opacity .45s ease,stroke-opacity .4s ease,filter .4s ease;
}
.stool-svg .seat-inner{stroke-width:2.25}

/* Hover / focus / tap: each leg lights only itself. The seat stays dim. */
.stool-interactive[data-active] .stool-svg .part{stroke-opacity:.18;filter:none}
.stool-interactive[data-active="energy"] .stool-svg .part-energy,
.stool-interactive[data-active="fuel"] .stool-svg .part-fuel,
.stool-interactive[data-active="structure"] .stool-svg .part-structure{
  stroke-opacity:1;
  filter:drop-shadow(0 0 7px rgba(200,184,150,.7));
}

/* Congruency lights the full stool: all three legs plus the seat. */
.stool-interactive[data-active="congruency"] .stool-svg .part-energy,
.stool-interactive[data-active="congruency"] .stool-svg .part-fuel,
.stool-interactive[data-active="congruency"] .stool-svg .part-structure,
.stool-interactive[data-active="congruency"] .stool-svg .part-seat{
  stroke-opacity:1;
  filter:drop-shadow(0 0 7px rgba(200,184,150,.7));
}
.stool-interactive[data-active="congruency"] .stool-svg .part-seat .seat-top,
.stool-interactive[data-active="congruency"] .stool-svg .part-seat .seat-apron{
  fill-opacity:.32;
}
.stool-interactive[data-active="congruency"] .stool-svg .part-seat .seat-inner{fill-opacity:.08}

/* is-complete only settles the wobble. It must not light or fill the seat. */

/* Matching text blocks */
.stool-interactive .card[data-stool-part]{
  cursor:pointer;
  outline:none;
  transition:border-color .3s ease,box-shadow .3s ease;
}
.stool-interactive .card[data-stool-part]:hover,
.stool-interactive .card[data-stool-part]:focus-visible,
.stool-interactive[data-active="energy"] .card[data-stool-part="energy"],
.stool-interactive[data-active="fuel"] .card[data-stool-part="fuel"],
.stool-interactive[data-active="structure"] .card[data-stool-part="structure"],
.stool-interactive[data-active="congruency"] .card[data-stool-part="congruency"]{
  border-color:var(--gold);
  box-shadow:0 0 0 1px var(--gold);
}
.stool-interactive .card[data-stool-part]:focus-visible{
  box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--gold);
}

@media(max-width:700px){
  .stool-interactive{
    grid-template-columns:1fr;
    gap:8px;
    align-items:start;
  }
  .stool-visual{
    top:0;
    z-index:2;
    padding:4px 0 8px;
    margin:0 -24px;
    width:calc(100% + 48px);
  }
  .stool-stage{max-width:176px}
}

@media(prefers-reduced-motion:reduce){
  .stool-stage.is-wobbling .stool-svg,
  .stool-stage.is-settling .stool-svg{animation:none}
  .stool-svg .part,
  .stool-svg .seat-top,
  .stool-svg .seat-apron,
  .stool-svg .seat-inner,
  .stool-interactive .card[data-stool-part]{transition:none}
}
