/* Pay Converter — salary <-> hourly. Site-local layer on top of the shared
   Identity B base + the AAA+++ mechanics appended to styles.css.

   Doctrine notes for whoever edits this next:
   - The converter card is the ONE floating object on the page (§3.2). Nothing
     else here gets a shadow. The shared layer already sets .calc-card's shadow
     and radius, so this file must not re-declare either.
   - Every input is a sunken well (§4). The shared rule already covers
     `.calc-card input[type=text]`; the only job left here is to stop the old
     pill styling from overriding it.
   - The working-year assumption is the whole trust argument on this tool
     (see .assume below), so it is furniture, not a footnote. */

.calc-card {
  max-width: 640px;
  margin: 26px auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.calc-top { padding: 24px 24px 22px; }
.mode-row { display: flex; justify-content: center; margin-bottom: 20px; }

.amount-field { position: relative; }
.amount-field .cur {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.05rem; font-weight: 500; color: var(--muted); pointer-events: none;
}
/* The entry figure. Tabular so the field does not reflow while it is typed. */
.calc-card input.amount-input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  font: inherit;
  font-size: clamp(1.7rem, 5.5vw, 2.3rem);
  font-weight: 650;
  letter-spacing: -.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  min-height: 62px;
}
.amount-label {
  display: block;
  font-size: .84rem; font-weight: 500; color: var(--ink-2);
  margin-bottom: 8px;
}

/* ---- the assumption panel (this tool's signature) ---------------------- */
/* Salary to hourly is not a fact, it is a division by an assumption. Two
   readers on the same salary get different honest answers because they work
   different years. Hiding the divisor produces a number the reader cannot
   defend, so both halves of it are labelled, editable, and echoed back in the
   result note and in the method block. */
.assume {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.assume-k {
  display: block;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
}
.assume-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .assume-row { grid-template-columns: 1fr; } }
.assume-row .field { margin: 0; }
.assume-row label {
  display: block;
  font-size: .82rem; color: var(--ink-2); font-weight: 500;
  margin-bottom: 6px;
}
.calc-card input.assume-input {
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.assume-note {
  margin: 10px 0 0;
  font-size: .82rem; color: var(--muted); line-height: 1.5;
}

/* ---- the result -------------------------------------------------------- */
.out {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 22px 24px 24px;
}
.out-main { text-align: center; margin-bottom: 18px; }
.out-main .result-u { display: block; margin-bottom: 4px; }
/* .result-v takes size, weight and tabular numerals from the shared layer. */
.out-main .result-v { display: block; color: var(--accent); }

.out-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .out-grid { grid-template-columns: 1fr; } }
.out-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.out-cell .k {
  font-family: var(--mono);
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.out-cell .v { font-size: 1.06rem; font-weight: 650; font-variant-numeric: tabular-nums lining-nums; }

.out-note { text-align: center; margin-top: 14px; font-size: .86rem; color: var(--ink-2); line-height: 1.55; }
.out-note b { font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }

/* Onward buttons inside the card. Deliberately NOT `.handoff` — that class is
   the shared sticky-loop furniture and `pay` is not a loop origin, so reusing
   it here would dress an ordinary cross-link as a task continuation. */
.calc-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 18px;
}
@media (max-width: 520px) { .calc-actions .btn { width: 100%; justify-content: center; } }

/* ---- the conversion table --------------------------------------------- */
.conv-wrap { margin-top: 8px; overflow-x: auto; }
.conv-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.conv-table caption {
  caption-side: top; text-align: left;
  padding: 0 0 12px;
  color: var(--ink-2); font-size: .92rem; line-height: 1.55;
}
.conv-table th, .conv-table td {
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums lining-nums;
}
.conv-table th {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.conv-table th:first-child, .conv-table td:first-child { text-align: left; }
.conv-table tbody tr:last-child td { border-bottom: 0; }
.conv-table td.hr { font-weight: 650; color: var(--ink); }

/* The vintage chip that dates the table. On a tool that publishes no external
   rate the chip says exactly that, rather than implying a citation it has not
   earned. */
.vintage-chip {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}

.shortcut {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 18px;
}
.shortcut div { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.shortcut .eq { font-size: 1.12rem; font-weight: 650; color: var(--accent); letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; }
.shortcut p { font-size: .87rem; color: var(--muted); margin-top: 6px; }
