/* Layout shared by every style. Colours and type live in themes.css. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0 12px; }
.page { max-width: 760px; margin: 0 auto; padding: 16px 0 32px; }
.site-name { margin: 0; font-weight: normal; line-height: 1.2; }
.site-name a { color: inherit; text-decoration: none; }
.tagline { margin: 2px 0 8px; }
nav.main, .styles { margin: 4px 0; line-height: 1.6; }
nav.main a { white-space: nowrap; }

main { margin-top: 16px; }
main h1, h2 { margin: 18px 0 8px; }
main h1 { font-size: 1.3em; }
p { line-height: 1.5; }
form.calc { margin: 12px 0; }
.row { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.row > label:first-child, .row > span:first-child { min-width: 7.5em; }
input[type=text], input[type=number], select { font: inherit; line-height: 1.25; padding: 4px 6px; max-width: 100%; }
select { height: auto; min-height: 2em; padding-right: 22px; }
input[type=text] { width: 8em; }
input[type=number] { width: 6em; }
button { font: inherit; line-height: 1.25; padding: 4px 14px; cursor: pointer; }
.error { margin: 0 0 0 4px; }
details { margin: 10px 0; }
summary { cursor: pointer; }
.table-wrap { overflow-x: auto; margin: 10px 0; }
table.results { border-collapse: collapse; width: 100%; }
table.results th, table.results td { padding: 3px 8px; text-align: right; white-space: nowrap; }
table.results th:first-child, table.results td:first-child { text-align: left; }
.summary { margin: 8px 0; }
.ad-slot { margin: 20px 0; min-height: 90px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
footer { margin-top: 28px; padding-top: 8px; font-size: 14px; }
pre.eq { white-space: pre-wrap; padding: 8px 10px; overflow-x: auto; }
[hidden] { display: none !important; }
@media (max-width: 480px) { table.results th, table.results td { padding: 3px 5px; } }
main a, footer a { overflow-wrap: anywhere; }
fieldset.row { border: 0; padding: 0; margin: 8px 0; min-width: 0; }
fieldset.row legend { float: left; padding: 0; min-width: 7.5em; margin-right: 10px; }
table.results { max-width: 560px; }
table.results tr.yours td { font-weight: bold; }
.rail { display: none; }
@media (min-width: 1100px) {
  .page { max-width: 1100px; }
  .layout { display: grid; grid-template-columns: minmax(0, 760px) 300px; gap: 40px; }
  .rail { display: block; }
  .rail .ad-tall { position: sticky; top: 16px; width: 300px; min-height: 600px; margin-top: 0; }
}
@media print {
  header, footer, .rail, .ad-slot, form, .no-print, main > p, main > h2 { display: none !important; }
  #spl-out { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
  table.results { max-width: none; }
  table.results tr td { background: none !important; }
  .page { max-width: none; padding: 0; }
}
.print-only { display: none; }
@media print { .print-only { display: block !important; font-size: 12px; margin-top: 8px; } }
main p, main li { max-width: 68ch; }
table.results, .summary { font-variant-numeric: tabular-nums lining-nums; }
strong, b, th { font-weight: 600; }
.row button + button { margin-left: 4px; }
.row.pt, .row.pt-head { flex-wrap: nowrap; align-items: center; gap: 8px; }
.row.pt > span.pt-n, .row.pt-head > span.pt-n { min-width: 1.6em; width: 1.6em; }
.row.pt input[type=number], .row.pt-head .pt-col:nth-of-type(2) { width: 5.5em; flex: none; }
.row.pt input[type=text], .row.pt-head .pt-col:nth-of-type(3) { width: 6.5em; flex: none; }
.row.pt-head { margin-bottom: 0; font-size: 0.9em; }
.row.pt .pt-x { padding: 2px 9px; }
label.inline { min-width: 0 !important; margin-left: 10px; }
tr.total td { border-top: 1px solid currentColor; font-weight: 600; }
