/* components.css — SpinWatch.pro — Scale Growth Visualizer + mini preview */

.js-only{display:none}

.viz-intro{
  display:flex;gap:20px;flex-wrap:wrap;margin:20px 0 28px;
}
.viz-step{
  flex:1;min-width:180px;background:#fff;border:1px solid #e3ded4;border-radius:6px;padding:16px;
}
.viz-step .step-num{
  font-family:var(--font-mono);color:var(--color-accent);font-weight:700;font-size:var(--fs-18);
}

.viz-disclaimer{
  background:var(--color-surface-dark);color:var(--color-text-dark);
  border-left:4px solid var(--color-warning);
  padding:12px 16px;border-radius:4px;font-size:var(--fs-14);margin-bottom:20px;
}
.viz-disclaimer a{color:var(--color-accent-light)}

.metric-filter{
  display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px;
}
.metric-filter button{
  font-family:var(--font-body);font-weight:600;font-size:var(--fs-14);
  padding:8px 14px;border-radius:20px;border:1px solid var(--color-accent);
  background:transparent;color:var(--color-text-light);cursor:pointer;
}
.metric-filter button[aria-pressed="true"]{
  background:var(--color-accent);color:#fff;
}
.metric-filter button:hover{background:var(--color-accent-light);color:#fff;border-color:var(--color-accent-light)}

.chart-wrap{
  background:var(--color-bg-dark);color:var(--color-text-dark);
  border-radius:8px;padding:28px 20px 12px;
}
.chart-legend{
  display:flex;gap:20px;flex-wrap:wrap;margin-bottom:20px;font-size:var(--fs-12);color:#cfcbc4;
}
.chart-legend .legend-swatch{
  display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:middle;border:1px solid var(--color-accent);
}
.legend-swatch.pat-area{background:repeating-linear-gradient(45deg,var(--color-accent),var(--color-accent) 2px,transparent 2px,transparent 4px)}
.legend-swatch.pat-salas{background:var(--color-accent)}
.legend-swatch.pat-hotel{background:repeating-linear-gradient(90deg,var(--color-accent),var(--color-accent) 1px,transparent 1px,transparent 3px)}

.epochs-row{
  display:flex;gap:24px;align-items:flex-end;justify-content:space-around;
}
@media (max-width:480px){
  .epochs-row{flex-direction:column;align-items:stretch;gap:20px}
}

.epoch-group{
  display:flex;flex-direction:column;align-items:center;flex:1;
  background:transparent;border:none;color:inherit;cursor:pointer;padding:8px;border-radius:6px;
  font-family:var(--font-body);
}
.epoch-group:hover,.epoch-group:focus-visible{background:var(--color-surface-dark)}
.epoch-group[aria-expanded="true"]{background:var(--color-surface-dark)}

.bars-cluster{
  display:flex;gap:8px;align-items:flex-end;height:220px;margin-bottom:10px;
}
@media (max-width:480px){
  .bars-cluster{
    flex-direction:column;justify-content:center;height:auto;width:100%;gap:10px;
  }
}

.bar-col{display:flex;flex-direction:column;align-items:center;width:46px}
@media (max-width:480px){
  .bar-col{
    flex-direction:row;width:100%;justify-content:flex-start;gap:8px;
  }
}

.bar-value{
  font-family:var(--font-mono);font-size:var(--fs-12);font-variant-numeric:tabular-nums;
  margin-bottom:4px;white-space:nowrap;
}
@media (max-width:480px){.bar-value{margin-bottom:0;width:90px}}

.bar{
  --ratio:0;
  width:28px;background:var(--color-accent);
  height:calc(var(--ratio) * 200px);
  min-height:2px;
  transition:height .7s ease-out;
  border:1px solid var(--color-accent-light);
}
@media (prefers-reduced-motion: reduce){
  .bar{transition:none}
}
.bar.pat-area{background-image:repeating-linear-gradient(45deg,rgba(0,0,0,.25),rgba(0,0,0,.25) 2px,transparent 2px,transparent 5px)}
.bar.pat-hotel{background-image:repeating-linear-gradient(90deg,rgba(0,0,0,.3),rgba(0,0,0,.3) 1px,transparent 1px,transparent 4px)}

@media (max-width:480px){
  .bar{
    width:calc(var(--ratio) * 100%);
    min-width:6px;
    height:14px!important;
    transition:width .7s ease-out;
  }
  @media (prefers-reduced-motion: reduce){
    .bar{transition:none}
  }
}

.epoch-group.metric-dim .bar{opacity:.35}
.epoch-group .bar.metric-active{opacity:1}

.bar-unit{font-size:10px;color:#b7b2ab}
.epoch-label{font-family:var(--font-head);font-weight:600;font-size:var(--fs-14);margin-top:6px;text-align:center}
.epoch-years{font-size:var(--fs-12);color:#b7b2ab}

.epoch-cards{margin-top:20px}
.epoch-card{
  background:var(--color-surface-dark);color:var(--color-text-dark);
  border-radius:6px;padding:18px 20px;margin:0 0 16px;
  border-left:4px solid var(--color-accent);
}
.epoch-card h3{color:var(--color-text-dark);margin-bottom:.4em}
.epoch-card .card-note{color:var(--color-accent-light);font-size:var(--fs-12);margin-top:10px}

.view-as-table-link{
  display:inline-block;margin:10px 0 20px;font-size:var(--fs-14);
}

/* mini static preview (no interactivity), used on other pages */
.mini-preview{
  background:var(--color-bg-dark);border-radius:8px;padding:24px 20px;
  display:flex;gap:16px;justify-content:space-around;align-items:flex-end;margin:20px 0;
}
.mini-preview .mp-bar{
  width:24px;background:var(--color-accent);border-radius:1px 1px 0 0;
}
.mini-preview .mp-col{display:flex;flex-direction:column;align-items:center;color:var(--color-text-dark);font-size:var(--fs-12)}

.methodology{
  background:#fff;border:1px dashed var(--color-warning);border-radius:6px;padding:18px 20px;margin:24px 0;
}
