/* xi-zhuang page-specific styles.
   Shared lesson furniture (vplay-group, flow, questions, pull quote) lives in
   shared/lesson.css; this file only adds the layouts unique to this page:
   the comparison table, the fit spectrum and the interactive suit diagram. */

/* ── Comparison table ──────────────────────────── */
.ctable { width: 100%; border-collapse: collapse; font-size: 0.84rem; border-radius: 8px; overflow: hidden; margin-bottom: 2rem; }
.ctable th { background: var(--navy); color: white; padding: 0.65rem 0.9rem; text-align: left; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.04em; }
.ctable td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.ctable tr:last-child td { border-bottom: none; }
.ctable tr:nth-child(even) td { background: var(--cream); }
.ctable .cht { font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.ctable .cpy { font-size: 0.76rem; color: var(--red); display: none; }
body.show-py .ctable .cpy { display: block; }

/* ── Fit spectrum ──────────────────────────────── */
.spectrum-wrap { background: white; border-radius: 12px; padding: 1.75rem; border: 1px solid var(--border); }
.spectrum-track {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  margin: 1.5rem 0 0.5rem;
}
.spec-line {
  position: absolute; top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%);
  background: linear-gradient(to right, #C41E3A 0%, #2C6B3E 34%, #2C6B3E 66%, #C41E3A 100%);
  z-index: 0;
}
.sbtn {
  position: relative; z-index: 1;
  background: white; border: 2px solid var(--border);
  border-radius: 40px; padding: 0.38rem 1rem;
  cursor: pointer; font-size: 1.1rem; font-weight: 700; transition: all 0.18s;
}
.sbtn.neg { border-color: var(--red); color: var(--red); }
.sbtn.pos { border-color: var(--green); color: var(--green); }
.sbtn.on  { transform: scale(1.18); box-shadow: 0 2px 14px rgba(0,0,0,0.14); }
.sbtn.on.neg { background: var(--red); color: white; }
.sbtn.on.pos { background: var(--green); color: white; }
.spec-legs { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-bottom: 1.25rem; }
.fit-panel { padding: 1.1rem 1.2rem; background: var(--cream); border-radius: 8px; border-left: 4px solid var(--navy); }
.fit-panel h4 { font-size: 1.2rem; display: flex; align-items: baseline; gap: 0.45rem; }
.fp2 { font-size: 0.78rem; color: var(--red); font-weight: 400; display: none; }
body.show-py .fp2 { display: inline; }
.fit-panel > p { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.fit-ex { margin-top: 0.7rem; border-top: 1px solid var(--border); padding-top: 0.7rem; font-size: 0.84rem; }
.fit-en { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
details.fitnote { margin-top: 0.5rem; }
details.fitnote > summary { font-size: 0.7rem; color: var(--muted); cursor: pointer; padding: 0.35rem 0; list-style: none; }
details.fitnote > summary::before        { content: '+ note'; }
details.fitnote[open] > summary::before { content: '− note'; }
body.hide-en details.fitnote > summary::before        { content: '+ 注'; }
body.hide-en details.fitnote[open] > summary::before { content: '− 注'; }
.fit-tip { font-size: 0.8rem; color: var(--navy2); font-weight: 500; }

/* ── Suit diagram ──────────────────────────────── */
.suit-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.suit-svg { width: 100%; max-width: 240px; display: block; margin: 0 auto; cursor: default; }
.zone-default {
  background: var(--cream); border: 1px dashed var(--border);
  border-radius: 8px; padding: 2rem 1.5rem;
  text-align: center; color: var(--muted); font-size: 0.85rem;
}
.zpanel { display: none; background: white; border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; }
.zpanel.on { display: block; }
.zpanel h4 { font-size: 1.4rem; }
.zpanel .zpy { font-size: 0.82rem; color: var(--red); display: none; }
body.show-py .zpanel .zpy { display: inline; }
.zdesc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
details.znote { margin-top: 0.5rem; }
details.znote > summary { font-size: 0.7rem; color: var(--muted); cursor: pointer; padding: 0.35rem 0; list-style: none; }
details.znote > summary::before        { content: '+ about this term'; }
details.znote[open] > summary::before { content: '− about this term'; }
body.hide-en details.znote > summary::before        { content: '+ 释义'; }
body.hide-en details.znote[open] > summary::before { content: '− 释义'; }
.zbox { margin-top: 0.75rem; padding: 0.7rem; border-radius: 6px; font-size: 0.84rem; }
.zbox.issue { background: #FFF3F5; border-left: 3px solid var(--red); }
.zbox.fix   { background: #F0FAF4; border-left: 3px solid var(--green); }
.zbox strong { display: block; margin-bottom: 0.2rem; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 620px) {
  .suit-layout { grid-template-columns: 1fr; }
}
