/* earn-calc.css: the earnings calculator on commission-paid job pages (Abhi, 2026-10-04).
   Loaded only by pages build-jobs.py renders with earnings.calculator, so the shared
   site.css is not bumped for one block. Sits inside .prose on the ivory page. */

.earn-calc { margin: 1.6rem 0 1.4rem; padding: clamp(1.1rem, 3vw, 1.6rem); background: var(--white);
  border: 1px solid var(--line-light); border-radius: var(--radius); color: var(--t-on-paper); }
.prose .earn-calc h3 { margin-top: 0; }
.earn-calc .ec-intro { margin: 0 0 1.1rem; color: var(--t-on-paper-mut); }

/* align-items: end keeps the boxes level when one label wraps to two lines on a phone */
.ec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.1rem; align-items: end; }
.ec-f { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; font-weight: 600; }
.ec-f input { width: 100%; padding: .65rem .75rem; font: inherit; font-size: 1.05rem; font-weight: 500;
  color: var(--t-on-paper); background: var(--paper); border: 1px solid var(--line-light);
  border-radius: var(--radius); }
.ec-f input:focus-visible { outline: 2px solid var(--brass-ink); outline-offset: 1px; border-color: var(--brass-ink); }

.ec-out { margin-top: 1.2rem; border-top: 1px solid var(--line-light); }
.ec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--line-light); }
.ec-row span { color: var(--t-on-paper-mut); }
.ec-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ec-row.ec-total { padding: .85rem .75rem; margin-top: .5rem; border: 0; border-radius: var(--radius);
  background: var(--paper-2); }
.ec-row.ec-total span { color: var(--t-on-paper); font-weight: 600; }
.ec-row.ec-total b { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); }
.ec-inr { margin: .45rem .75rem 0; font-size: .88rem; color: var(--t-on-paper-mut); }
.ec-inr:empty { display: none; }

.ec-target { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--line-light);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .9rem 1.1rem; align-items: end; }
.ec-target p { margin: 0; }
.earn-calc .ec-note { margin: 1.1rem 0 0; font-size: .86rem; line-height: 1.55; color: var(--t-on-paper-mut); }

/* The four inputs are short numbers, so they stay two across on a phone; the target row
   stacks, because its sentence needs the width. */
@media (max-width: 560px) { .ec-target { grid-template-columns: 1fr; } }
@media (max-width: 340px) { .ec-grid { grid-template-columns: 1fr; } }
