/* Planim site: the comparisons index (/vs) and the comparison page
   (/vs/<slug>). Loaded after site.css. Colours come only from tokens.css. */

/* ---------- shared header ---------- */
.vs-head h1{font-size:clamp(34px,2.4vw + 16px,64px);overflow-wrap:break-word}
.vs-head .lead{max-width:62ch}

/* ---------- index: cards in 1 / 2 / 3 columns ---------- */
.vs-cards{
  margin:0;padding:0 0 clamp(8px,2vw,32px);list-style:none;
  display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(14px,1.6vw,24px);
}
.vs-cards>li{display:flex}
a.vs-card{display:flex;flex-direction:column;width:100%}
a.vs-card:hover{transform:translateY(-2px)}
.vs-card h2{font-size:clamp(21px,.9vw + 15px,28px);line-height:1.15}
.vs-summary{margin-top:12px;font-size:15.5px;line-height:1.6;color:var(--text-secondary)}
.vs-checked{margin-top:auto;padding-top:20px;font-family:var(--mono);font-size:12.5px;letter-spacing:.02em;color:var(--text-muted)}
@media (min-width:700px){.vs-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1200px){.vs-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ---------- page: article + side panel ---------- */
.vs-grid{
  display:grid;grid-template-columns:minmax(0,var(--measure));justify-content:center;font-size:var(--fs);
  gap:clamp(32px,4vw,56px);padding-bottom:clamp(8px,2vw,32px);
}
.vs-article{min-width:0}
.vs-article>*+*{margin-top:clamp(32px,4vw,56px)}
.vs-article>.vs-head{margin-top:0}
.vs-meta{font-family:var(--mono);font-size:12.5px;letter-spacing:.02em;color:var(--text-muted)}
.vs-verdict{font-size:clamp(17px,.5vw + 14px,21px);line-height:1.6;color:var(--text-secondary)}

/* the scorecard: a glass table that is as wide as the text column */
.scorecard{
  width:calc(100% + 2 * var(--bleed));margin-inline:calc(var(--bleed) * -1);
  border-collapse:separate;border-spacing:0;overflow:clip;
  border-radius:var(--r-card);background:var(--glass);
  -webkit-backdrop-filter:blur(24px) saturate(180%);backdrop-filter:blur(24px) saturate(180%);
  box-shadow:var(--shadow),inset 0 0 0 1px var(--line);
  font-size:15px;line-height:1.55;
}
.scorecard th,.scorecard td{padding:clamp(12px,1.2vw,18px) clamp(12px,1.4vw,22px);text-align:left;vertical-align:top;overflow-wrap:anywhere}
.scorecard thead th{
  position:sticky;top:var(--nav-h);z-index:2;background:var(--glass-solid);
  font-family:var(--mono);font-size:12.5px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;
  color:var(--text-muted);box-shadow:inset 0 -1px 0 var(--line);
}
.scorecard thead th:nth-child(2){color:var(--accent)}
.scorecard tbody th{width:22%;font-weight:600;color:var(--text)}
.scorecard tbody td{color:var(--text-secondary)}
.scorecard tbody td:nth-child(2){background:color-mix(in srgb,var(--accent) 6%,transparent)}
.scorecard tbody tr+tr>*{border-top:1px solid var(--line-2)}

/* on a phone each row is a heading and two short columns, the head row stays */
@media (max-width:699px){
  .scorecard,.scorecard thead,.scorecard tbody{display:block}
  .scorecard thead tr,.scorecard tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .scorecard thead th:first-child{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);padding:0}
  .scorecard thead{position:sticky;top:var(--nav-h);z-index:2}
  .scorecard thead th{position:static}
  .scorecard tbody th{width:auto;grid-column:1/-1;padding-bottom:0}
  .scorecard tbody td{padding-top:6px}
  .scorecard tbody tr+tr>th{border-top:1px solid var(--line-2)}
  .scorecard tbody tr+tr>td{border-top:0}
}

/* who should choose what */
.choose{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(14px,1.6vw,24px)}
.choose h2{margin-bottom:18px;font-size:clamp(19px,.5vw + 15px,23px);line-height:1.2}
.choose .checks li{font-size:15.5px;line-height:1.55}
@media (min-width:700px){.choose{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* the body text sits flush with the column */
.vs-article .prose>:first-child{margin-top:0}

/* questions */
.vs-faq h2{font-size:calc(var(--fs) * 1.65);line-height:1.15;margin-bottom:.6em}
.vs-faq details{border-bottom:1px solid var(--line-2)}
.vs-faq details:first-child{border-top:1px solid var(--line-2)}
.vs-faq summary{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:18px 0;list-style:none;cursor:pointer;
  font-size:calc(var(--fs) * 1.05);font-weight:500;line-height:1.35;color:var(--text);
}
.vs-faq summary::-webkit-details-marker{display:none}
.vs-faq summary:hover{color:var(--accent)}
.vs-pm{position:relative;flex:none;width:14px;height:14px}
.vs-pm::before,.vs-pm::after{
  content:"";position:absolute;left:0;right:0;top:50%;height:2px;margin-top:-1px;
  border-radius:1px;background:currentColor;transition:transform .25s var(--ease);
}
.vs-pm::after{transform:rotate(90deg)}
.vs-faq details[open] .vs-pm::after{transform:rotate(0)}
.vs-a{padding:0 0 20px;max-width:64ch;font-size:var(--fs);line-height:1.7;color:var(--text-secondary)}

/* ---------- side panel ---------- */
.vs-rail{min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(14px,1.6vw,24px);align-content:start}
.vs-ea h2,.vs-others h2{font-size:clamp(19px,.5vw + 15px,22px);line-height:1.2}
.vs-ea p:not(.ea-note){margin-top:10px;font-size:15px;line-height:1.55;color:var(--text-secondary)}
.vs-ea .ea{flex-direction:column;max-width:none;margin-top:18px}
.vs-ea .ea .btn{width:100%}
.vs-ea .ea-note{max-width:none;margin-top:10px}
.vs-others ul{margin:14px 0 0;padding:0;list-style:none}
.vs-others li+li{border-top:1px solid var(--line-2)}
.vs-others a{display:block;padding:11px 0;font-size:15px;font-weight:500;color:var(--text-secondary);transition:color .15s}
.vs-others a:hover{color:var(--text)}

@media (min-width:700px) and (max-width:1023px){
  .vs-rail{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
}
@media (min-width:1024px){
  .vs-grid{grid-template-columns:minmax(0,var(--measure)) 300px}
  .vs-rail{position:sticky;top:calc(var(--nav-h) + 24px);align-self:start;margin-top:clamp(40px,5vw,88px)}
}
/* wide screens: the scorecard reaches into the gaps beside the column */
@media (min-width:2000px){
  .vs-grid{grid-template-columns:minmax(0,var(--measure)) 360px;gap:120px}
  .vs-article{--bleed:40px}
}
