/* Percentage Calculator. Only this tool's own pieces; everything else is the shared tool frame.
   Colours come from the site's variables only (tests/catalogue.test.mjs checks there are no hex values here). */

/* The five questions: all visible at once, in a grid that wraps (two across on phones, the last across both), so none
   is hidden off to the side (David, 25 Nov 2026). */
.pc-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pc-modes .option:last-child { grid-column: 1 / -1; }
.pc-modes .option__box { height: 100%; padding: 10px 12px; }
.pc-modes .option__title { font-size: 15px; line-height: 1.25; }
.pc-modes .option__sub { font-size: 13px; }

/* A question: its direction chips, then the sentence with its boxes, wrapping onto new lines as it needs to. */
.pc-dirs { margin-bottom: 10px; }
.pc-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 18px; line-height: 1.3; }
.pc-w { white-space: nowrap; }
.pc-w:empty { display: none; }
.pc-in { flex: 1 1 6.5em; min-width: 6.5em; max-width: 11em; font-size: 18px; font-variant-numeric: tabular-nums; }
.pc-swap { min-width: 44px; min-height: 44px; padding: 0; font-size: 20px; line-height: 1; }
.pc-echo { margin: 12px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-echo:empty { display: none; }

/* The sheet: the answer large, then the sentence, then the change or difference. */
.pc-empty { margin: 0; padding: 26px 0 14px; font-size: 15px; color: var(--steel); }
.pc-result { padding: 4px 0 6px; }
.pc-big { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-line { margin: 8px 0 0; font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pc-sub { margin: 4px 0 0; font-size: 15px; color: var(--slate); font-variant-numeric: tabular-nums; }
.pc-about { margin: 14px 0 0; font-size: 13.5px; color: var(--slate); }
.pc-link { margin: 18px 0 0; font-size: 15px; }
.pc-link a { display: inline-flex; align-items: center; gap: 6px; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pc-link svg { width: 16px; height: 16px; }
@media (max-width: 360px) {
  .pc-in { flex-basis: 100%; max-width: none; }
}
