/* Missed-call calculator (calculator.js). Shared by every page that shows it. Uses each page's own colour
   variables, with the light-palette values as fallbacks. Square corners, no shadows, one blue. */
.mc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.mc-in { background: var(--card, #fff); color: var(--ink, #0d0f12); border: 1px solid var(--line, #d3d7de); padding: 28px; display: grid; gap: 26px; align-content: start; }
.mc-field { display: grid; gap: 8px; min-width: 0; }
.mc-field label, .mc-in legend { font-weight: 700; font-size: 18px; line-height: 1.3; }
.mc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mc-noscript { margin: 0 0 16px; font-size: 16px; font-weight: 500; line-height: 1.45; }
.mc-field output { flex: none; font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--accent, #1740d0); }
.mc-help { margin: 0; color: var(--muted, #3f4550); font-size: 15px; line-height: 1.45; }
.mc-in fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 18px; }
.mc-in legend { padding: 0; margin-bottom: 14px; }
.mc-guess { border-top: 1px solid var(--line, #d3d7de) !important; padding-top: 22px !important; }

/* number boxes: the stepper for calls, the dollar box for the average job */
.mc-step, .mc-money { display: flex; align-items: stretch; max-width: 280px; }
.mc-num { flex: 1 1 auto; min-width: 0; height: 50px; margin: 0; padding: 0 12px; border: 1.5px solid #7d8591; border-radius: 0; background: var(--bg, #fff); color: var(--ink, #0d0f12);
  font: inherit; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.mc-num::-webkit-outer-spin-button, .mc-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mc-money .mc-num { text-align: left; border-left: 0; }
.mc-money span { display: grid; place-items: center; width: 40px; flex: none; border: 1.5px solid #7d8591; border-right: 0; background: var(--bg, #fff); font-size: 22px; font-weight: 700; color: var(--muted, #3f4550); }
.mc-btn { flex: none; width: 50px; height: 50px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; background: var(--blue, #1740d0); color: var(--on-blue, #fff); cursor: pointer; transition: background-color 120ms ease-out; }
.mc-btn[hidden] { display: none; }
.mc-btn:hover { background: var(--blue-deep, #0f2fa3); }
.mc-btn svg { width: 18px; height: 18px; fill: currentColor; }
.mc-num:focus-visible, .mc-btn:focus-visible { position: relative; z-index: 1; }

.mc-field input[type=range] { width: 100%; height: 32px; margin: 0; accent-color: var(--mark, var(--blue, #1740d0)); cursor: pointer; }

/* plan picker: three square tiles; the chosen one is filled blue */
.mc-plan-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.mc-plan { position: relative; display: block; cursor: pointer; }
.mc-plan input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mc-plan span { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 50px; height: 100%; padding: 8px 14px; border: 1.5px solid #7d8591; font-size: 18px; font-weight: 500; line-height: 1.2; transition: background-color 120ms ease-out; }
.mc-plan b { font-weight: 700; font-variant-numeric: tabular-nums; }
.mc-plan:hover span { border-color: var(--accent, #1740d0); }
.mc-plan input:checked + span { background: var(--blue, #1740d0); border-color: var(--blue, #1740d0); color: var(--on-blue, #fff); }
/* A tick on the chosen plan, so the choice does not rest on colour alone. */
.mc-plan input:checked + span::after { content: ""; position: absolute; right: 9px; top: 6px; width: 5px; height: 10px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(45deg); }
@media (forced-colors: active) { .mc-plan input:checked + span { border-color: Highlight; outline: 3px solid Highlight; outline-offset: -5px; } }
.mc-plan input:focus-visible + span { outline: 3px solid var(--ring, #1740d0); outline-offset: 3px; }

/* the answer */
.mc-out { background: var(--blue, #1740d0); color: var(--on-blue, #fff); padding: 32px; display: grid; gap: 14px; align-content: start; }
.mc-out p, .mc-out ul { margin: 0; }
.mc-lead { font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; color: #fff; }
.mc-cover { font-size: 22px; line-height: 1.3; color: #fff; }
.mc-lead strong, .mc-cover strong { font-weight: 700; color: #fff; }
.mc-work { font-size: 18px; color: var(--blue-soft, #dbe3ff); }
.mc-warn { padding: 14px 16px; border: 2px solid #fff; font-size: 18px; line-height: 1.45; font-weight: 500; color: #fff; }
.mc-many { font-size: 17px; font-weight: 500; color: #fff; }
.mc-lines { list-style: none; padding: 14px 0 0 !important; border-top: 1px solid rgba(255,255,255,.28); display: grid; gap: 8px; font-size: 16px; line-height: 1.45; color: var(--blue-soft, #dbe3ff); }
.mc-lines li[data-calc-say="minutes"] { color: #fff; font-weight: 500; }
.mc-promise { margin-top: 4px !important; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.28); font-size: 15px; line-height: 1.45; color: var(--blue-soft, #dbe3ff); }
.mc-out [hidden] { display: none; }
.mc-out :focus-visible { outline-color: #fff; }

/* how we got this, under the calculator */
.mc-note { margin-top: 18px; display: grid; gap: 8px; max-width: 75ch; color: var(--muted, #3f4550); font-size: 15px; line-height: 1.5; }
.mc-note p { margin: 0; }
.mc-note a { color: var(--accent, #1740d0); text-underline-offset: 3px; }
.mc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 920px) { .mc { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .mc { gap: 16px; }
  .mc-in { padding: 20px 16px; }
  .mc-out { padding: 24px 16px; }
  .mc-step, .mc-money { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .mc-btn, .mc-plan span { transition: none; } }
