/* Wholesaler Savings Calculator — editorial-market look, matching the login
 * page's paper/ink/forest-green study. Self-contained tokens so the page
 * renders correctly even if the shared sheets evolve. */

.sv-body {
  --sv-paper: #faf7f2;
  --sv-paper-warm: #f2ede2;
  --sv-ink: #1a2b24;
  --sv-ink-soft: #34443d;
  /* [CODEX PR#18 #7] WCAG AA. #7d8680 on the #faf7f2 paper measured
     3.51:1 — below the 4.5:1 floor — and it carries the privacy,
     optional, disclaimer and footer copy, which is exactly the text a
     visitor needs to read before trusting the page with payroll
     figures. #656e69 measures 4.93:1 on the same paper. */
  --sv-muted: #656e69;
  --sv-rule: #d2dbd2;
  /* [CODEX PR#18 pass-2 #3] NON-TEXT CONTRAST. `--sv-rule` at #d2dbd2 measures
     1.42:1 against white and the input fill 1.07:1 — these are the only visual
     boundaries a form control has, and WCAG requires 3:1 for them. A separate
     token so decorative rules keep their soft weight while the controls a
     visitor must find get a real edge: #849184 measures 3.30:1 on white. */
  --sv-field-rule: #849184;
  --sv-brand: #2d6a4f;
  --sv-brand-deep: #1b4332;
  --sv-brand-soft: rgba(45, 106, 79, 0.12);
  background: var(--sv-paper);
  color: var(--sv-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  line-height: 1.5;
}

.sv-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.sv-header .sv-brand {
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sv-brand);
  margin: 0 0 0.6rem;
}

.sv-header h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.sv-sub {
  color: var(--sv-ink-soft);
  font-size: 1.02rem;
  margin: 0 0 0.4rem;
}

.sv-privacy {
  color: var(--sv-muted);
  font-size: 0.85rem;
  margin: 0 0 1.6rem;
}

/* ── form ─────────────────────────────────────────────────────────────── */
.sv-form {
  background: #fff;
  border: 1px solid var(--sv-rule);
  border-radius: 10px;
  padding: 1.4rem 1.4rem 1.2rem;
}

.sv-field {
  margin-bottom: 1.1rem;
}

.sv-field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.sv-optional {
  font-weight: 400;
  color: var(--sv-muted);
  font-size: 0.85rem;
}

.sv-field input,
.sv-field select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--sv-field-rule);
  border-radius: 7px;
  background: var(--sv-paper);
  color: var(--sv-ink);
  width: 100%;
  max-width: 220px;
  box-sizing: border-box;
}

.sv-field input:focus-visible,
.sv-field select:focus-visible,
.sv-submit:focus-visible,
.sv-back:focus-visible,
.sv-cta:focus-visible,
.sv-results-heading:focus-visible {
  outline: 2px solid var(--sv-brand);
  outline-offset: 2px;
}

.sv-money-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sv-currency {
  color: var(--sv-muted);
  font-weight: 600;
}

.sv-money-row input {
  flex: 1 1 140px;
}

.sv-money-row select {
  flex: 0 0 auto;
  width: auto;
}

.sv-err {
  color: #a33a2a;
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
  min-height: 1em;
}

.sv-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.sv-submit {
  font: inherit;
  font-weight: 600;
  background: var(--sv-brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  cursor: pointer;
}

.sv-submit:hover {
  background: var(--sv-brand-deep);
}

.sv-back {
  color: var(--sv-ink-soft);
  font-size: 0.92rem;
}

/* ── results ──────────────────────────────────────────────────────────── */
.sv-results-heading {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  margin: 2rem 0 0.4rem;
}

.sv-section {
  border-top: 1px solid var(--sv-rule);
  padding: 1.1rem 0 0.4rem;
  margin-top: 1.1rem;
}

.sv-section h3 {
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  color: var(--sv-brand-deep);
}

.sv-lead {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.sv-note {
  color: var(--sv-ink-soft);
  font-size: 0.9rem;
  margin: 0.3rem 0 0.6rem;
}

.sv-facts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  margin: 0.4rem 0 0.6rem;
}

.sv-facts dt {
  color: var(--sv-ink-soft);
  font-size: 0.92rem;
}

.sv-facts dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.9rem;
  margin-top: 0.8rem;
}

.sv-card {
  background: #fff;
  border: 1px solid var(--sv-rule);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.sv-card h4 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.sv-card .sv-facts {
  grid-template-columns: 1fr;
  gap: 0.1rem;
}

.sv-card .sv-facts dd {
  text-align: left;
  margin-bottom: 0.45rem;
}

.sv-includes {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.2rem;
}

.sv-includes li {
  margin-bottom: 0.25rem;
  font-size: 0.93rem;
}

.sv-cta-wrap {
  margin: 1.8rem 0 0.6rem;
  text-align: center;
}

.sv-cta {
  display: inline-block;
  background: var(--sv-brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.85rem 1.6rem;
}

.sv-cta:hover {
  background: var(--sv-brand-deep);
}

.sv-disclaimer {
  color: var(--sv-muted);
  font-size: 0.82rem;
  text-align: center;
  margin: 0.5rem 0 0;
}

.sv-footer {
  border-top: 1px solid var(--sv-rule);
  margin-top: 2.4rem;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--sv-muted);
}

.sv-footer a {
  color: inherit;
}

.sv-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .sv-form {
    padding: 1rem;
  }

  .sv-field input,
  .sv-field select {
    max-width: 100%;
  }

  .sv-facts {
    grid-template-columns: 1fr;
  }

  .sv-facts dd {
    text-align: left;
    margin-bottom: 0.4rem;
  }
}
