/* guest-calc.css — styling for the on-page calculators.
 *
 * Uses the tokens the landing pages already define (--bg, --panel, --fg,
 * --muted, --line, --gold, --blue, --ok, --r) so a calculator looks like part
 * of the page rather than an embed. Falls back to literals where a page
 * predates a token, because a missing variable renders as transparent and a
 * transparent result panel is worse than a slightly off colour.
 */
.vx-calc {
  margin: 26px 0 6px;
  padding: 22px;
  background: var(--panel, #0e1114);
  border: 1px solid var(--line-2, #252d34);
  border-radius: var(--r, 14px);
}

.vx-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--fg, #f4f6f7);
}

.vx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.vx-label {
  display: block;
  margin-bottom: 5px;
  font-size: .74rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  /* --faint is #5b646d on #0e1114 — about 3.4:1, under the 4.5:1 AA needs for
     small text. --muted clears it, and a label you cannot read defeats the
     purpose of having labelled the field. */
  color: var(--muted, #98a2ab);
}

.vx-input {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: .95rem;
  color: var(--fg, #f4f6f7);
  background: var(--bg, #08090b);
  border: 1px solid var(--line-2, #252d34);
  border-radius: 8px;
}

.vx-input:focus-visible {
  outline: 2px solid var(--blue, #5b9dff);
  outline-offset: 1px;
  border-color: transparent;
}

.vx-run {
  width: 100%;
  padding: 11px 18px;
  font: inherit;
  font-weight: 650;
  color: var(--blue-ink, #04101f);
  background: var(--blue, #5b9dff);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.vx-run:hover:not(:disabled) { background: var(--blue-2, #8ab8ff); }
.vx-run:disabled { opacity: .6; cursor: default; }
.vx-run:focus-visible { outline: 2px solid var(--fg, #f4f6f7); outline-offset: 2px; }

.vx-result {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line-2, #252d34);
  border-left-width: 3px;
  border-radius: 10px;
  background: var(--bg, #08090b);
}

.vx-pass { border-left-color: var(--ok, #43d6a0); }
.vx-fail { border-left-color: #ff6b6b; }
.vx-warn { border-left-color: var(--gold, #d0a651); }
.vx-err  { border-left-color: #ff6b6b; }

.vx-verdict {
  margin-bottom: 10px;
  font-weight: 700;
  font-size: .95rem;
  color: var(--fg, #f4f6f7);
}

.vx-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-top: 1px solid var(--line, #1a1f24);
  font-size: .9rem;
}

.vx-k { color: var(--muted, #98a2ab); }
.vx-v { color: var(--fg, #f4f6f7); text-align: right; font-variant-numeric: tabular-nums; }

.vx-note {
  margin: 12px 0 0;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--muted, #98a2ab);
}

.vx-cta {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 17px;
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
  color: var(--blue-ink, #04101f);
  background: var(--gold, #d0a651);
  border-radius: 8px;
}

.vx-fine {
  margin: 12px 0 0;
  font-size: .8rem;
  color: var(--muted, #98a2ab);
}

/* The pages are dark-only by design, but a visitor who forces light mode
   should still be able to read the panel rather than getting white on white. */
@media (prefers-color-scheme: light) {
  .vx-calc:not([data-dark]) {
    background: #ffffff;
    border-color: #dfe3e6;
  }
  .vx-calc:not([data-dark]) .vx-title,
  .vx-calc:not([data-dark]) .vx-verdict,
  .vx-calc:not([data-dark]) .vx-v { color: #12161a; }
  .vx-calc:not([data-dark]) .vx-label,
  .vx-calc:not([data-dark]) .vx-k,
  .vx-calc:not([data-dark]) .vx-note,
  .vx-calc:not([data-dark]) .vx-fine { color: #5b646d; }
  .vx-calc:not([data-dark]) .vx-input,
  .vx-calc:not([data-dark]) .vx-result {
    background: #f7f8f9; color: #12161a; border-color: #dfe3e6;
  }
}
