table.tt tr.sum > * { font-weight: 600; border-top: 1px solid rgba(255, 255, 255, 0.24); }
table.tt tr.sum + tr.sum > * { border-top: 0; font-weight: normal; }
/* The tables with a column a level: the levels share the width evenly. */
table.lv { table-layout: fixed; }
table.lv th:first-child { width: 31%; }
table.lv.by th:first-child { width: 18%; }   /* a number of refinements, or the first row's label on one line */
/* What the buildings need, in the first row: set apart from the rows of refinements per week. */
table.tt tr.need > * { color: var(--mute); border-bottom-color: rgba(255, 255, 255, 0.24); }
table.tt tr.need > th { white-space: nowrap; }
/* A building's row on Costs: its picture, then its name. */
table.tt .b { display: flex; align-items: center; gap: 8px; }
table.tt .b img { width: 36px; height: 36px; flex: none; }
/* The site's phone sizes, kept here up to 640 px: with six columns, a table at the full size ran past its columns
   between 481 and about 600 px (seen 17 Nov in a 480 px pane: "TTG required", 147–152, 20,324). */
@media (max-width: 640px) {
  table.tt th, table.tt td { padding: 5px 4px; font-size: 0.8125rem; }
  table.by caption { padding: 0 4px 3px; }
  table.tt .b { gap: 5px; }
  table.tt .b img { width: 26px; height: 26px; }
  table.lv th:first-child { width: 29%; }   /* five figures fit a level's column */
  table.lv.by { table-layout: auto; }       /* each column as wide as its own numbers: 288–295 beside 19–21 */
  table.tt tr.need > th { white-space: normal; }   /* "TTG required" beside five ranges runs 17 px past a phone */
}
/* A Costs heading: each item's icon before its name. */
h2 .res { white-space: nowrap; }
h2 .res img { width: 28px; height: 28px; margin-right: 7px; vertical-align: -6px; }
/* The switch over the Refining tab's by-level tables: every level from TG5, or each level by itself. Both tables
   are on the page, and the chosen one shows. No script. A browser without :has() shows the page as it was before
   the switch: the tables from TG5, and no switch (Fable's review, 17 Nov). */
fieldset.switch { display: flex; margin: 12px 0 4px; padding: 0; border: 0; }
fieldset.switch label { padding: 5px 13px; background: var(--card); border: 1px solid var(--edge-hi); cursor: pointer;
                        font-size: 0.9375rem; font-weight: 600; }
fieldset.switch label:first-of-type { border-radius: 6px 0 0 6px; }
fieldset.switch label:last-of-type { margin-left: -1px; border-radius: 0 6px 6px 0; }
fieldset.switch input:checked + label { position: relative; background: var(--card-hi); border-color: var(--link);
                                        color: var(--link); }
fieldset.switch input:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; }
table.by caption { padding: 0 9px 3px; text-align: left; color: var(--mute); font-size: 0.8125rem; }
table.by.each { display: none; }
main:has(#span-each:checked) table.by.each { display: table; }
main:has(#span-each:checked) table.by.from { display: none; }
@supports not selector(:has(*)) { fieldset.switch { display: none; } }
table.odds td:empty::after { content: "–"; color: var(--line); }
ul.rules { margin: 8px 0; padding-left: 20px; }
ul.rules li + li { margin-top: 4px; }
