/* «Расширение территории»: the calculator and the step tables above the archive frames.
   Panels, fields and tables come from site.css (.zg-bonus, .zg-profit-*). */
.zg-terr h2:not(:first-child) { margin-top: 30px; }
.zg-terr h3 { margin: 24px 0 8px; font: bold 20px/1.3 Georgia, "Times New Roman", serif; }
.zg-terr-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.zg-terr-form[hidden] { display: none; }
.zg-site .zg-terr-result { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--zg-line); border-radius: 10px; background: #fffef9; }
.zg-site .zg-terr-result:empty { display: none; }
.zg-terr-result p { margin: 0 0 8px; }
.zg-terr-result p:last-child { margin-bottom: 0; }
.zg-site .zg-terr-answer { font: bold 20px/1.3 Georgia, "Times New Roman", serif; }
.zg-site .zg-terr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.zg-terr-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #eadfbe; border-radius: 8px; background: var(--zg-paper); }
.zg-terr-list strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.zg-site .zg-terr-gap { color: #8a4b12; }
.zg-terr .zg-profit-scroll { margin-top: 8px; }
.zg-profit-table.zg-terr-table { min-width: 0; }
.zg-terr-table td { text-align: right; font-variant-numeric: tabular-nums; }
.zg-terr-table tbody th { min-width: 0; }
.zg-terr-table td.zg-terr-none { color: var(--zg-muted); text-align: left; white-space: normal; }
.zg-terr-table tfoot :is(th, td) { border-top: 2px solid #d9c690; font-weight: 700; }
.zg-terr-table tr.zg-terr-picked :is(th, td) { background: #f6edc9; }

@media (max-width: 760px) {
  .zg-terr-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .zg-site .zg-terr-result { padding: 12px; }
  .zg-terr-table th, .zg-terr-table td { padding-inline: 6px; font-size: 13px; }
}
