.diet-votes-tool { max-width: 46rem; min-width: 0; margin-inline: auto; font-size: 1.0625rem; overflow-wrap: anywhere; }
.diet-votes-tool .article-header p { margin-bottom: .5rem; }
.diet-settings { min-width: 0; margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--rule); border-radius: 8px; }
.diet-settings legend, .diet-fields label { font-weight: 650; }
.diet-settings legend { padding-inline: .4em; }
.diet-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10em), 1fr)); gap: .8em; }
.diet-fields input { display: block; width: 100%; min-height: 44px; margin-top: .25em; padding: .35em .6em; border: 1px solid #717b87; border-radius: 5px; color: var(--ink); background: var(--surface); font: inherit; }
.diet-fields input[aria-invalid="true"] { border-color: #8b3124; }
.diet-settings p { margin: .65em 0 0; }
.diet-error { color: #8b3124; }
.diet-settings .diet-error:empty, .diet-thresholds p:empty { margin: 0; }
.diet-votes-result { margin-block: 1.25rem; padding: 1em 1.15em; border-radius: 8px; background: var(--act-weak); }
.diet-votes-tool h2 { margin: 0 0 .4em; font-size: 1.25em; }
.diet-votes-result p, .diet-reading p { margin: .35em 0; }
.diet-votes-result .diet-amount { margin: 0; color: var(--ink); font-size: 1.4em; font-weight: 700; font-variant-numeric: tabular-nums; }
#diet-thresholds { margin-top: 1.25em; }
.diet-thresholds { margin: 0; }
@media screen {
  .diet-thresholds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.75em), 1fr)); gap: 0 1em; }
}
.diet-thresholds > div { padding: .75em 0; border-top: 1px solid #aab8ca; }
.diet-thresholds dt { font-weight: 650; }
.diet-thresholds dd { margin: .15em 0 0; }
.diet-comparison { font-weight: 650; }
.diet-reading { margin-block: 2rem; }
.diet-sources { margin-top: .65em; color: var(--ink2); }
.diet-sources summary { min-height: 44px; padding-block: .5em; cursor: pointer; }
@media print {
  .diet-votes-tool { max-width: none; font-size: 10pt; line-height: 1.45; }
  .diet-settings, .diet-votes-tool noscript { display: none; }
  .diet-votes-tool h1 { font-size: 18pt; margin: 0 0 2mm; }
  .diet-votes-tool h2 { font-size: 13pt; }
  .diet-votes-result { padding: 3mm; margin: 3mm 0; border: 1px solid #777; background: white; }
  .diet-thresholds > div { break-inside: avoid; padding: 1.5mm 0; }
  #diet-thresholds { margin-top: 2mm; }
  .diet-reading { margin-block: 3mm; }
}

@media print {
  .diet-sources summary { min-height: 0; padding-block: 1mm; }
  .diet-sources .source-records { padding: 0; margin: 1mm 0 0; }
  .diet-sources .source-record { margin: 0; padding: 1mm 0; break-inside: avoid; }
  .diet-sources .source-url { margin: 0; }
}

@media print and (min-width: 170mm) {
  .diet-thresholds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3mm; }
  .diet-thresholds dd { overflow-wrap: anywhere; }
}

@media print {
  .calculator-print-button { display: none; }
  html:has(:is(.power-tool, .unit-price-tool, .basket-tool, .diet-votes-tool, .allocation-tool, .exchange-tool)) { font-size: 16px; }
  main:has(:is(.power-tool, .unit-price-tool, .basket-tool, .diet-votes-tool, .allocation-tool, .exchange-tool)) { min-height: 0; }
  :is(.power-tool, .unit-price-tool) { max-width: none; font-size: 11pt; line-height: 1.5; }
  :is(.power-tool, .unit-price-tool) .article-header { margin: 0 0 3mm; }
  :is(.power-tool, .unit-price-tool) h1 { font-size: 19pt; line-height: 1.35; margin: 0 0 2mm; }
  :is(.power-tool, .unit-price-tool) h2 { font-size: 13pt; line-height: 1.4; margin: 0 0 2mm; }
  :is(.power-tool, .unit-price-tool) .section { margin: 5mm 0 0; }
  :is(.power-tool, .unit-price-tool) p { margin: 1.5mm 0; }
  :is(.power-tool, .unit-price-tool) fieldset { padding: 2mm 3mm; }
  :is(.power-result, .unit-price-result) { margin: 4mm 0; padding: 2mm 3mm; }
  .power-mode { margin: 1mm 0; }
  .power-mode label { min-height: 0; }
  .unit-price-inputs, .power-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .unit-price-result dl { margin-block: 1mm; }
  .power-result table :is(th, td), .turnout-differences div { padding-block: 1mm; }
  .calculator-print-value { font-weight: 600; overflow-wrap: anywhere; }
  :is(input, select):has(+ .calculator-print-value) { display: none !important; }
}
@media screen { .calculator-print-value { display: none; } }

.calculator-paper-link { display: none; }
@media print {
  .calculator-paper-link {
    display: block;
    float: right;
    margin: 0 0 2mm 4mm;
    break-inside: avoid;
    font: 9pt/1.25 sans-serif;
    text-align: center;
  }
  .calculator-paper-link a { display: block; color: #000; }
  .calculator-paper-link img { display: block; height: auto; margin: 0 auto 1mm; image-rendering: pixelated; }
  .exchange-tool[data-print-example-scene="payment"] #business,
  .exchange-tool[data-print-example-scene="business"] #payment { display: none; }
}
