:root {
  --pop-bg: #f5f9fc;
  --pop-surface: #fff;
  --pop-border: #d7dfee;
  --pop-text: #000;
  --pop-label: #3d4a77;
  --pop-navy: #002092;
  --pop-action: #ffb21b;
  --pop-positive: #089981;
  --pop-negative: #cb2e3b;
  --pop-badge: #c3d4ff;
  --pop-muted: #647083;
  --pop-card-radius: 12px;
  --pop-button-radius: 9px;
  --pop-card-shadow: 0 5px 18px rgba(15,23,42,.035);
  --pop-button-shadow: 0 2px 7px rgba(0,0,0,.12);
  --sans: "Inter Tight", sans-serif;
  --label: "Inter", "Inter Tight", sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: auto; }
body { margin: 0; display: flow-root; color: var(--pop-text); background: var(--pop-bg); font-family: var(--sans); }
button, input, select { font: inherit; }
button, input, label { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--pop-navy); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.layout { display: block; width: min(1152px, calc(100% - 64px)); margin: 0 auto 64px; }
.money-input { position: relative; display: flex; align-items: stretch; min-width: 0; overflow: visible; border: 1px solid var(--pop-border); border-radius: 12px; background: var(--pop-bg); cursor: text; }
.money-input input { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 50px; border: 0; border-radius: inherit; outline: 0; color: var(--pop-text); background: transparent; font-weight: 600; }
.money-input b { display: flex; align-items: center; flex: 0 0 auto; padding: 0 14px; color: var(--pop-muted); font: 600 16px/1 var(--sans); }
.money-input:focus-within { outline: 3px solid var(--pop-navy); outline-offset: 3px; }
.money-input input:focus-visible { outline: none; }
.term-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.term-part { min-width: 0; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0; border: 0; }
.mode-switch button { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 44px; padding: 9px 10px; border: 1px solid var(--pop-border); border-radius: var(--pop-button-radius); color: var(--pop-text); background: var(--pop-bg); font: 600 12px/1.4 var(--sans); cursor: pointer; }
.mode-switch button[aria-checked="true"] { border-color: var(--pop-action); background: var(--pop-action); }
.mode-switch button:focus-visible { outline: 3px solid var(--pop-navy); outline-offset: 3px; }
.legal { margin-top: 32px; padding: 24px; border: 1px solid var(--pop-border); border-radius: var(--pop-card-radius); background: var(--pop-surface); }
.legal h2 { margin: 0 0 12px; font: 600 16px/1.4 var(--sans); }
.legal p { max-width: 90ch; margin: 0 0 12px; color: var(--pop-muted); font: 400 13px/1.55 var(--sans); }
.legal p:last-child { margin-bottom: 0; }
.result-card[data-state="invalid"] #card-result, .porownanie[data-state="invalid"] { opacity: .45; }
.result-card[data-state="invalid"] #card-message { margin-bottom: 16px; padding: 12px; border: 1px solid var(--pop-border); border-radius: 9px; background: var(--pop-bg); }
body[data-embedded] .mobile-result { display: none !important; }
@media (max-width: 760px) {
  .layout { width: calc(100% - 32px); margin-bottom: 32px; }
  .term-inputs { gap: 8px; }
  .legal { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
