.vg-calc,
.vg-calc *,
.vg-calc *::before,
.vg-calc *::after { box-sizing: border-box; }

.vg-calc {
  --vgc-ink: #0b1420;
  --vgc-navy: #101c2b;
  --vgc-paper: #f5f6f3;
  --vgc-white: #fff;
  --vgc-line: #dfe3e5;
  --vgc-muted: #5d6874;
  --vgc-yellow: var(--vg-yellow, #f4bf16);
  --vgc-glow: rgba(244, 191, 22, .38);
  --vgc-glow: color-mix(in srgb, var(--vgc-yellow) 38%, transparent);
  container-type: inline-size;
  max-width: 1040px;
  margin: clamp(32px, 6vw, 72px) auto;
  color: var(--vgc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.vg-calc h2,
.vg-calc h3,
.vg-calc p,
.vg-calc ul,
.vg-calc dl,
.vg-calc fieldset { margin-top: 0; }

.vg-calc__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.vg-calc__intro {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 26px 26px 0 0;
  background: linear-gradient(135deg, #07101a, #14263a);
  color: var(--vgc-white);
}

.vg-calc__intro::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -160px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(244, 191, 22, .18);
  filter: blur(20px);
}

.vg-calc__eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: #b8c4cf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.vg-calc__eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--vgc-yellow); box-shadow: 0 0 0 5px var(--vgc-glow); }
.vg-calc__intro h2 { position: relative; z-index: 1; max-width: 760px; margin-bottom: 20px; overflow-wrap: anywhere; color: #fff; font-size: clamp(32px, 5vw, 55px); line-height: 1.02; letter-spacing: -.05em; hyphens: auto; }
.vg-calc__intro > p:not(.vg-calc__eyebrow) { position: relative; z-index: 1; max-width: 720px; margin-bottom: 26px; color: #c2ccd5; font-size: 17px; line-height: 1.7; }
.vg-calc__intro ul { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 0; padding: 0; list-style: none; }
.vg-calc__intro li { padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(255, 255, 255, .05); color: #dce4eb; font-size: 12px; }

.vg-calc__profile {
  padding: 18px clamp(20px, 4vw, 36px);
  border: 1px solid var(--vgc-line);
  border-top: 0;
  background: #f3f5f4;
}

.vg-calc__profile strong { display: block; margin-bottom: 3px; color: #263545; font-size: 12px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.vg-calc__profile p { margin-bottom: 0; color: #475563; font-size: 13px; line-height: 1.6; }

.vg-calc__safety {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 20px clamp(20px, 4vw, 36px);
  border: 1px solid #e1b315;
  border-top: 0;
  background: #fff8dc;
}

.vg-calc__safety-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--vgc-yellow); color: var(--vgc-ink); font-weight: 900; }
.vg-calc__safety strong { display: block; margin: 1px 0 3px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.vg-calc__safety p { margin-bottom: 0; color: #354252; font-size: 13px; line-height: 1.6; }
.vg-calc__safety details { margin-top: 8px; color: #354252; font-size: 13px; }
.vg-calc__safety summary { display: inline-flex; min-height: 44px; align-items: center; width: fit-content; cursor: pointer; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.vg-calc__safety details p { margin-top: 8px; }

.vg-calc__layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); border-right: 1px solid var(--vgc-line); border-left: 1px solid var(--vgc-line); background: var(--vgc-white); }
.vg-calc__form { padding: clamp(24px, 4vw, 38px); border-right: 1px solid var(--vgc-line); }
.vg-calc__form-head,
.vg-calc__result-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
.vg-calc__form-head > span,
.vg-calc__result-head > span { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--vgc-ink); color: var(--vgc-yellow); font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.vg-calc__form-head h3,
.vg-calc__result-head h3 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.vg-calc__form-head p,
.vg-calc__result-head p { margin: 3px 0 0; color: var(--vgc-muted); font-size: 12px; }

.vg-calc__errors { margin-bottom: 22px; padding: 15px 17px; border: 1px solid #a92f2f; border-radius: 12px; background: #fff2f1; color: #6e1717; font-size: 13px; }
.vg-calc__errors strong { display: block; margin-bottom: 5px; }
.vg-calc__errors ul { margin-bottom: 0; padding-left: 20px; }

.vg-calc__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.vg-calc__field { min-width: 0; margin-bottom: 0; padding: 0; border: 0; }
.vg-calc__field--full { grid-column: 1 / -1; }
.vg-calc__field > label,
.vg-calc__field > legend { display: block; width: 100%; margin-bottom: 8px; padding: 0; color: #223040; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.vg-calc__field > small { display: block; margin-top: 7px; color: var(--vgc-muted); font-size: 12px; line-height: 1.5; }
.vg-calc__field-error { color: #8d2020 !important; font-weight: 700; }

.vg-calc__control { display: flex; align-items: stretch; min-height: 50px; overflow: hidden; border: 1px solid #cfd5da; border-radius: 12px; background: #fff; }
.vg-calc__control:focus-within { border-color: var(--vgc-ink); box-shadow: 0 0 0 3px var(--vgc-glow); }
.vg-calc__control input,
.vg-calc__control select { min-width: 0; width: 100%; min-height: 48px; margin: 0; padding: 0 13px; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--vgc-ink); font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; }
.vg-calc__control select { cursor: pointer; }
.vg-calc__control input:disabled { background: #f3f5f4; color: #7a858f; cursor: not-allowed; }
.vg-calc__control > span { display: flex; flex: 0 0 auto; align-items: center; min-width: 45px; padding: 0 11px; border-left: 1px solid #dfe3e5; background: #f3f5f4; color: #465361; font-size: 11px; font-weight: 800; }
.vg-calc__control--wide select { padding-right: 34px; }
.vg-calc__field.has-error .vg-calc__control { border-color: #a92f2f; }

.vg-calc__option { display: flex !important; align-items: flex-start; gap: 11px; margin: 1px 0 0 !important; padding: 14px 15px !important; border: 1px solid #cfd5da; border-radius: 12px; background: #fff; cursor: pointer; }
.vg-calc__option input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--vgc-yellow); }
.vg-calc__option span { display: block; }
.vg-calc__option strong { display: block; color: #223040; font-size: 13px; }
.vg-calc__option small { display: block; margin-top: 3px; color: var(--vgc-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
.vg-calc__option:has(input:focus-visible) { outline: 3px solid var(--vgc-ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--vgc-yellow); }
.vg-calc__option input:focus-visible { outline: 2px solid var(--vgc-ink); outline-offset: 2px; }

.vg-calc__submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 54px; margin-top: 24px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--vgc-yellow); color: var(--vgc-ink); font-family: inherit; font-size: 14px; font-weight: 850; line-height: 1; cursor: pointer; transition: transform .18s ease, filter .18s ease; }
.vg-calc__submit:hover { filter: brightness(1.04); transform: translateY(-1px); }
.vg-calc__submit:focus-visible { outline: 3px solid var(--vgc-ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--vgc-yellow); }
.vg-calc__submit span { font-size: 20px; }

.vg-calc__output { min-width: 0; padding: clamp(24px, 4vw, 38px); background: var(--vgc-paper); }
.vg-calc__empty { display: grid; min-height: 100%; place-content: center; text-align: center; }
.vg-calc__empty > span { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px; border-radius: 17px; background: var(--vgc-yellow); color: var(--vgc-ink); font-size: 28px; font-weight: 900; }
.vg-calc__empty h3 { margin-bottom: 8px; font-size: 24px; letter-spacing: -.03em; }
.vg-calc__empty p { max-width: 410px; margin-bottom: 0; color: var(--vgc-muted); font-size: 13px; }

.vg-calc__result-head > span { background: var(--vgc-yellow); color: var(--vgc-ink); }
.vg-calc__result-grid { display: grid; gap: 11px; }
.vg-calc__metric { padding: 19px; border: 1px solid var(--vgc-line); border-radius: 15px; background: #fff; }
.vg-calc__metric--primary { border-color: #172536; background: var(--vgc-navy); color: #fff; }
.vg-calc__metric > small { display: block; margin-bottom: 7px; color: var(--vgc-muted); font-size: 11px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.vg-calc__metric--primary > small { color: #aebbc7; }
.vg-calc__metric strong { display: flex; align-items: baseline; gap: 7px; font-size: clamp(29px, 4vw, 40px); line-height: 1; letter-spacing: -.045em; }
.vg-calc__metric strong span { color: var(--vgc-muted); font-size: 13px; letter-spacing: 0; }
.vg-calc__metric--primary strong span { color: var(--vgc-yellow); }
.vg-calc__metric p { margin: 8px 0 0; color: var(--vgc-muted); font-size: 12px; }
.vg-calc__metric--primary p { color: #aebbc7; }
.vg-calc__assumptions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 16px 0 0; overflow: hidden; border: 1px solid var(--vgc-line); border-radius: 13px; background: #fff; }
.vg-calc__assumptions > div { padding: 12px 14px; border-bottom: 1px solid var(--vgc-line); }
.vg-calc__assumptions > div:nth-child(odd) { border-right: 1px solid var(--vgc-line); }
.vg-calc__assumptions > div:nth-last-child(-n+2) { border-bottom: 0; }
.vg-calc__assumptions dt { color: var(--vgc-muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vg-calc__assumptions dd { margin: 3px 0 0; font-size: 13px; font-weight: 750; }
.vg-calc__result-note { margin: 15px 0 0; color: #4d5b68; font-size: 13px; line-height: 1.6; }
.vg-calc__result-note a { color: #263545; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.vg-calc__footer { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 25px clamp(24px, 4vw, 38px); border: 1px solid var(--vgc-line); border-top: 0; border-radius: 0 0 26px 26px; background: #fff; }
.vg-calc__footer strong { display: block; margin-bottom: 4px; font-size: 13px; }
.vg-calc__footer p { max-width: 600px; margin-bottom: 0; color: var(--vgc-muted); font-size: 13px; line-height: 1.65; }
.vg-calc__footer p a { color: #263545; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.vg-calc__footer nav { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.vg-calc__footer nav a { display: flex; min-height: 44px; align-items: center; gap: 6px; color: #263545; font-size: 13px; font-weight: 800; text-decoration: none; }
.vg-calc__footer a:hover { color: #000; text-decoration: underline; text-underline-offset: 3px; }
.vg-calc__footer a span { color: #8a6800; }
.vg-calc a:focus-visible,
.vg-calc summary:focus-visible { outline: 3px solid var(--vgc-ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--vgc-yellow); }
.vg-calc__errors:target,
.vg-calc__result:target { outline: 3px solid var(--vgc-yellow); outline-offset: 4px; }
.vg-calc__errors,
.vg-calc__result { scroll-margin-top: 132px; }
.admin-bar .vg-calc__errors,
.admin-bar .vg-calc__result { scroll-margin-top: 164px; }

@media (max-width: 800px) {
  .vg-calc__layout { grid-template-columns: 1fr; }
  .vg-calc__form { border-right: 0; border-bottom: 1px solid var(--vgc-line); }
  .vg-calc__empty { min-height: 270px; }
  .vg-calc__footer { grid-template-columns: 1fr; }
  .vg-calc__footer nav { align-items: flex-start; }
}

@media (max-width: 520px) {
  .vg-calc { margin-right: -2px; margin-left: -2px; }
  .vg-calc__intro { border-radius: 20px 20px 0 0; }
  .vg-calc__intro > p:not(.vg-calc__eyebrow) { font-size: 15px; }
  .vg-calc__safety { grid-template-columns: 1fr; }
  .vg-calc__fields { grid-template-columns: 1fr; }
  .vg-calc__field--full { grid-column: auto; }
  .vg-calc__assumptions { grid-template-columns: 1fr; }
  .vg-calc__assumptions > div,
  .vg-calc__assumptions > div:nth-child(odd),
  .vg-calc__assumptions > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--vgc-line); }
  .vg-calc__assumptions > div:last-child { border-bottom: 0; }
  .vg-calc__footer { border-radius: 0 0 20px 20px; }
}

@container (max-width: 800px) {
  .vg-calc__layout { grid-template-columns: 1fr; }
  .vg-calc__form { border-right: 0; border-bottom: 1px solid var(--vgc-line); }
  .vg-calc__empty { min-height: 270px; }
  .vg-calc__footer { grid-template-columns: 1fr; }
  .vg-calc__footer nav { align-items: flex-start; }
}

@container (max-width: 520px) {
  .vg-calc__intro { padding: 27px 22px; border-radius: 20px 20px 0 0; }
  .vg-calc__intro h2 { font-size: 30px; }
  .vg-calc__intro > p:not(.vg-calc__eyebrow) { font-size: 15px; }
  .vg-calc__safety { grid-template-columns: 1fr; }
  .vg-calc__fields { grid-template-columns: 1fr; }
  .vg-calc__field--full { grid-column: auto; }
  .vg-calc__assumptions { grid-template-columns: 1fr; }
  .vg-calc__assumptions > div,
  .vg-calc__assumptions > div:nth-child(odd),
  .vg-calc__assumptions > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--vgc-line); }
  .vg-calc__assumptions > div:last-child { border-bottom: 0; }
  .vg-calc__footer { border-radius: 0 0 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .vg-calc *, .vg-calc *::before, .vg-calc *::after { transition-duration: .01ms !important; }
}
