/* Comparison table as cards on narrow screens. Loaded only on pages that set `compareCss: true` (see base.njk),
   so style.css and its hashed URL on every other page stay unchanged. Columns: name, best for, key spec, [price band], button. */
@media(max-width:620px){
  .table-wrap{overflow-x:visible}
  .compare,.compare tbody,.compare tr,.compare td{display:block;width:100%}
  .compare thead{display:none}
  .compare tr{padding:14px 0;border-bottom:1px solid var(--line)}
  .compare tr:last-child{border-bottom:0}
  .compare th,.compare td{border-bottom:0;padding:3px 0}
  .compare td:nth-child(3){display:block}
  .compare td:first-child{font-size:1rem;padding-bottom:6px}
  .compare td:nth-child(2)::before{content:"Best for: ";font-weight:700}
  .compare td:nth-child(3)::before{content:"Key spec: ";font-weight:700}
  .compare.has-band td:nth-child(4)::before{content:"Price band: ";font-weight:700}
  .compare td:last-child{padding-top:10px}
  .compare td:last-child:empty{display:none}
  .compare .btn{display:inline-block;max-width:100%;white-space:normal;text-align:center}
  /* Plain Markdown tables in the post body (e.g. the head-up height table): keep them inside the column so the page never widens. */
  .post table:not(.compare){display:block;max-width:100%;overflow-x:auto;font-size:.85rem}
  .post table:not(.compare) th,.post table:not(.compare) td{padding:6px 5px;overflow-wrap:anywhere}
}
