html.calculator-embed {
  --embed-bg: #e8f2ee;
  --bg-color: transparent;
  --input-bg-color: rgba(255, 255, 255, 0.76);
  --text-color: #3f5550;
  --pre-bg-color: rgba(14, 114, 95, 0.12);
  --title-color: #0e725f;
  --strong-border-color: rgba(14, 114, 95, 0.34);
  background: var(--embed-bg);
}

html.calculator-embed,
html.calculator-embed body {
  min-width: 0;
  background: var(--embed-bg) !important;
  color: var(--text-color);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.calculator-embed body {
  overflow-x: auto;
  padding: clamp(12px, 3vw, 30px);
  font-size: 16px;
}

html.calculator-embed #fb-root,
html.calculator-embed #topbar,
html.calculator-embed #bodyheader,
html.calculator-embed #socialheader,
html.calculator-embed #footer {
  display: none !important;
}

html.calculator-embed #body {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  color: var(--text-color);
  line-height: 1.6;
}

html.calculator-embed #body > p {
  max-width: 860px;
  padding-top: 0.8em;
  color: var(--text-color);
}

html.calculator-embed #body > p:first-of-type {
  margin-top: 0;
  padding-top: 0;
}

html.calculator-embed a::before {
  content: none;
}

html.calculator-embed fieldset,
html.calculator-embed .fincalc,
html.calculator-embed .s2s,
html.calculator-embed table.book,
html.calculator-embed table.spread,
html.calculator-embed table.covered,
html.calculator-embed table.tblborder {
  border-color: rgba(14, 114, 95, 0.28);
}

html.calculator-embed fieldset,
html.calculator-embed .fincalc,
html.calculator-embed .s2s {
  padding: clamp(14px, 2.5vw, 24px);
  border: 1px solid rgba(14, 114, 95, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 34px rgba(29, 42, 38, 0.07);
}

html.calculator-embed input,
html.calculator-embed textarea,
html.calculator-embed select {
  border: 1px solid rgba(14, 114, 95, 0.34);
  border-radius: 5px;
  background: var(--input-bg-color);
  color: #17352e;
}

html.calculator-embed button {
  border-color: #0e725f;
  background: #0e725f;
  color: #f4fffb;
  box-shadow: none;
  font-weight: 750;
}

html.calculator-embed legend {
  border: 0;
  border-radius: 999px;
  background: #0e725f;
  color: #f4fffb;
  font-weight: 750;
}

html.calculator-embed table.tblborder,
html.calculator-embed table.book,
html.calculator-embed table.spread,
html.calculator-embed table.covered,
html.calculator-embed table.dataout {
  background: rgba(255, 255, 255, 0.5);
}

html.calculator-embed[data-theme="dark"] {
  --embed-bg: #102f28;
  --input-bg-color: rgba(7, 48, 40, 0.9);
  --text-color: #d8f4eb;
  --pre-bg-color: rgba(82, 189, 168, 0.18);
  --title-color: #6de1c9;
  --strong-border-color: rgba(109, 225, 201, 0.34);
}

html.calculator-embed[data-theme="dark"] fieldset,
html.calculator-embed[data-theme="dark"] .fincalc,
html.calculator-embed[data-theme="dark"] .s2s,
html.calculator-embed[data-theme="dark"] table.tblborder,
html.calculator-embed[data-theme="dark"] table.book,
html.calculator-embed[data-theme="dark"] table.spread,
html.calculator-embed[data-theme="dark"] table.covered,
html.calculator-embed[data-theme="dark"] table.dataout {
  border-color: rgba(109, 225, 201, 0.24);
  background: rgba(8, 45, 38, 0.52);
}

html.calculator-embed[data-theme="dark"] input,
html.calculator-embed[data-theme="dark"] textarea,
html.calculator-embed[data-theme="dark"] select {
  color: #f4fffb;
}

@media (max-width: 680px) {
  html.calculator-embed body {
    padding: 8px;
    font-size: 14px;
  }

  html.calculator-embed .fincalc,
  html.calculator-embed .s2s,
  html.calculator-embed fieldset {
    padding: 10px;
  }

  html.calculator-embed .s2s {
    width: max-content;
    min-width: 100%;
  }
}
