
/* =============== the comparison table, aligned (tables.py) ============= */
/* THE SAME LABEL AS EVERY OTHER TABLE ON THE SITE: aqua, 15px, 500,
   one line. 232px = the widest .ctable label (172px) plus its 48px of
   padding. The grey tint comes off: the row striping already separates
   the label from its values, and no other table on the site tints it. */
/* A COMPARISON TABLE IS NOT PROSE, SO IT DOES NOT TAKE THE PROSE WIDTH.
   Three columns inside the 720px reading column leaves 196px for a value,
   which is 26 characters, so "Often internal, protected by the machine"
   ran to two lines however the label column was sized. The article column
   is actually 1010px wide at 1440 and 814px at 1200: the text stays at
   720 for the sake of the line length, and the table alone takes the whole
   column. Fluid, so it is still right at every width in between.
   :has() keeps it to the articles that have a comparison table on them,
   and a browser without :has() simply gets today's 720px table. */
.guidewrap > .prose:has(table.ctable){max-width:none;}
.guidewrap > .prose:has(table.ctable) > *{max-width:720px;}
.guidewrap > .prose:has(table.ctable) > table.ctable{max-width:none;}

/* every selector here is written against table.ctable rather than .ctable,
   so it beats the component's own rules on specificity rather than on
   where extract_css happens to put the shared block in the head */
table.ctable tbody th{width:232px;font-weight:500;font-size:var(--fs-6);
  color:var(--aqua-dk);background:none;vertical-align:top;}
table.ctable th,table.ctable td{padding:var(--cell);}
/* and the value reads like a value, not like prose: the same colour and
   weight .spec td has, which is what makes the two tables look like one
   component rather than two */
table.ctable tbody td{color:var(--head);font-weight:500;}
table.ctable tbody tr:nth-child(odd) th,
table.ctable tbody tr:nth-child(odd) td{background:var(--paper);}
table.ctable tbody tr:nth-child(even) td{background:none;}

/* THREE COLUMNS CANNOT STACK LIKE TWO. A bare "Yes" under a label means
   nothing without the column it came from, so each value carries its own
   column name and the row reads as a label with its options under it.
   Below 640px these tables were clipped, not scrolled: 560px of table in
   a 342px column with overflow:hidden on it for the corners. */
@media (max-width:640px){
  table.ctable, table.ctable tbody, table.ctable tbody tr,
  table.ctable tbody th, table.ctable tbody td{display:block; width:auto;}
  table.ctable thead{display:none;}
  table.ctable tbody th{padding:16px 24px 2px;}
  table.ctable tbody td{padding:0 24px 4px;}
  table.ctable tbody td:last-child{padding-bottom:16px;}
  table.ctable tbody td::before{
    content:attr(data-col) ": ";color:var(--muted);}
}
