/* The revenue per labor hour target calculator page. Loaded after site.css, calculator.css and drive_calculator.css,
   whose card, field, choice, results and printout styles it shares. This adds the input section headers, the key
   figure tiles and the banded result table. */
.target-group { border: 0; margin: 0 0 6px; padding: 0; min-width: 0; }
.target-group legend {
  float: left; width: 100%; padding: 9px 12px; margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; line-height: 1.2;
  background: var(--tint); border-bottom: 1.5px solid var(--ink);
}
.target-group legend + * { clear: both; }
.target-group-note { margin: 0 0 14px; }
/* An empty field shows our example number, white on grey (5:1). Typing in it brings back the usual white field. */
.target-grey-note {
  margin: 0 0 16px; padding: 8px 12px; background: var(--input); color: #fff; border-radius: var(--radius);
  font-weight: 600;
}
.calc-card .target-group input:placeholder-shown { background: var(--input); caret-color: #fff; }
.calc-card .target-group input::placeholder { color: #fff; opacity: 1; }

.target-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; }
.target-tile { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.target-tile-minimum { border-color: var(--ink); }
.target-tile dt { font-weight: 700; font-size: 0.85rem; line-height: 1.3; }
.target-tile dd {
  margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.target-tile dd.target-tile-note { font-size: 0.8rem; font-weight: 400; color: var(--muted); line-height: 1.3; }
@media (max-width: 420px) {
  .target-tiles { grid-template-columns: 1fr; }
  .target-tile { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: baseline; }
  .target-tile dd.target-tile-note { grid-column: 1 / -1; }
}

.target-defaults-note { margin: 10px 0 0; padding: 8px 12px; background: var(--tint); font-weight: 600; }
.target-defaults-note[hidden] { display: none; }
.target-table-title { font-size: 1.1rem; margin: 26px 0 8px; }
.target-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.target-table th, .target-table td {
  padding: 9px 0 9px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: baseline;
  white-space: nowrap;
}
.target-table td { font-weight: 700; }
.target-table th[scope="row"] { text-align: left; font-weight: 400; padding-left: 10px; white-space: normal; }
.target-table thead th {
  font-weight: 700; border-bottom: 1.5px solid var(--ink); line-height: 1.3; vertical-align: bottom;
  white-space: normal;
}
.target-table thead th:first-child { text-align: left; padding-left: 0; }
.target-table .target-band th {
  text-align: left; padding: 10px; background: var(--tint); font-weight: 400; white-space: normal;
}
.target-table .target-band span { color: var(--muted); font-size: 0.85rem; }
.target-table tbody + tbody .target-band th { border-top: 14px solid var(--paper); }
/* The closing lines are ruled with shadows: collapsed borders would lose to the gap before the next band. */
.target-table .target-total th, .target-table .target-total td {
  font-weight: 700; border-bottom: 0; box-shadow: inset 0 1.5px 0 var(--ink), inset 0 -1.5px 0 var(--ink);
}
.target-table .target-total-target th, .target-table .target-total-target td {
  background: var(--marker); font-size: 1rem;
}
.target-table .target-total-target td:last-child { padding-right: 8px; }
.target-note { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.target-bid { margin: 0 0 10px; }
.target-bid .button { min-height: 48px; padding: 11px 18px; }
.prose .target-table-title { margin-top: 1.4em; }
.target-definitions dt { font-weight: 700; margin-top: 0.8em; }
.target-definitions dd { margin: 0; }

@media (prefers-contrast: more) {
  .target-tile, .target-table .target-band th { border: 2px solid var(--ink); }
  .target-table .target-total-target th, .target-table .target-total-target td { outline: 2px solid var(--ink); }
}

/* The printout: one page. The tiles repeat figures the table already shows, so they stay off the paper, and the
   rows are tight so fourteen inputs and the table fit. */
@media print {
  .target-tiles, .target-table-title { display: none; }
  .calc-print-head { margin-bottom: 10pt; }
  .calc-results h2 { margin-bottom: 6pt; }
  .calc-headline { padding: 6pt 12pt; }
  .calc-big { font-size: 24pt; }
  .target-table { font-size: 9pt; line-height: 1.25; margin-top: 6pt; }
  .target-table th, .target-table td { border-bottom: 0.75pt solid #777; padding: 1.5pt 6pt; }
  .target-table .target-band th { padding: 3pt 6pt; }
  .target-table tbody + tbody .target-band th { border-top: 0; }
  .target-table .target-band th, .target-table .target-total-target th, .target-table .target-total-target td {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .target-table .target-total th, .target-table .target-total td {
    box-shadow: none; border-top: 1pt solid #000; border-bottom: 1pt solid #000;
  }
  .target-note { font-size: 9.5pt; margin-top: 4pt; }
  .target-defaults-note { font-size: 9.5pt; margin-top: 4pt; padding: 2pt 6pt; }
  /* What was entered, in two columns. */
  table.target-inputs { display: block; margin-top: 8pt; }
  .target-inputs caption { display: block; }
  .target-inputs tbody {
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(8, auto); grid-auto-flow: column;
    column-gap: 18pt;
  }
  .target-inputs tr { display: flex; justify-content: space-between; gap: 8pt; border-bottom: 0.75pt solid #777; }
  .target-inputs th, .target-inputs td { border-bottom: 0; padding: 1pt 0; font-size: 8.5pt; line-height: 1.3; }
  .target-inputs td { white-space: nowrap; }
  .calc-print-foot { margin-top: 8pt; padding-top: 6pt; font-size: 9.5pt; }
}
