html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background:
    radial-gradient(circle at top left, rgba(214, 233, 255, 0.9), transparent 30%),
    linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
  color: #17212f;
}

body.tool-embed-body {
  margin: 0;
  min-height: auto;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.navbar,
.footer {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
}

.calculator-page {
  display: grid;
  gap: 1.5rem;
}

.tool-embed-shell {
  margin: 0 auto;
  max-width: 1200px;
}

.tool-embed-body .tool-embed-shell {
  max-width: none;
}

.hero-card,
.form-section,
.results-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(23, 33, 47, 0.08);
  padding: 1.5rem;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.eyebrow {
  color: #8c4f16;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.lead {
  color: #49576a;
  margin: 0;
  max-width: 62rem;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.section-heading span {
  align-items: center;
  background: #17212f;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.section-heading h2 {
  font-size: 1.2rem;
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-label {
  font-weight: 600;
}

.form-control,
.form-select {
  border-radius: 0.8rem;
  min-height: 3rem;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: linear-gradient(135deg, #173766 0%, #2556a8 100%);
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
}

.option-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.option-tabs span {
  background: #eef4fb;
  border: 1px solid #d8e3f1;
  border-radius: 999px;
  color: #173766;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
}

.result-table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
  min-width: 980px;
}

.result-table th,
.result-table td {
  padding: 0.8rem 0.9rem;
  vertical-align: middle;
}

.result-table thead th {
  background: #17212f;
  color: #fff;
}

.result-table tbody th {
  font-weight: 600;
  min-width: 320px;
}

.section-row th,
.section-row td {
  background: #eef4fb;
  color: #173766;
  font-weight: 700;
}

.embed-test-page {
  display: grid;
  gap: 1.5rem;
}

.iframe-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 33, 47, 0.08);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(23, 33, 47, 0.08);
  overflow: hidden;
}

.iframe-toolbar {
  align-items: center;
  background: #17212f;
  color: #fff;
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.iframe-toolbar code {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  padding: 0.2rem 0.6rem;
}

.iframe-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-preview-frame {
  background: transparent;
  border: 0;
  display: block;
  min-height: 1400px;
  width: 100%;
}

.wbr-kk-page {
  color: #212529;
}

.wbr-kk-panel {
  background-color: #d9f1fa;
  padding: 1rem 1.5rem 2rem;
}

.wbr-kk-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.wbr-print-btn {
  color: darkblue;
  position: relative;
  z-index: 1;
}

.wbr-form-table,
.wbr-note-table,
.wbr-result-table {
  background: transparent;
  margin-bottom: 1rem;
}

.wbr-form-table td,
.wbr-result-table td,
.wbr-result-table th {
  background: transparent;
  border-top: 0;
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
}

.wbr-form-table h4,
.wbr-result-table h4 {
  margin: 0;
}

.wbr-form-table td:first-child,
.wbr-result-table td:first-child,
.wbr-result-table th:first-child {
  width: 38%;
}

.wbr-input-cell {
  text-align: right;
  width: 220px;
}

.wbr-money-field {
  align-items: stretch;
  background: #fff;
  border: 1px solid #ced4da;
  display: inline-flex;
  max-width: 220px;
  min-height: 38px;
  width: 100%;
}

.wbr-money-prefix {
  align-items: center;
  background: #fff;
  color: #212529;
  display: inline-flex;
  padding: 0 0.65rem;
}

.wbr-help-cell {
  width: 32px;
}

.wbr-money-input,
.wbr-rate-select {
  background: #fff;
  border: 0;
  border-radius: 0;
  display: inline-block;
  min-height: 38px;
  text-align: right;
}

.wbr-money-input:focus {
  box-shadow: none;
}

.wbr-rate-select {
  max-width: 220px;
  padding-right: 2rem;
  width: 100%;
}

.wbr-money-input[readonly] {
  background: #fff;
}

.hoverbtn {
  background-color: #08c;
  color: #fff;
  cursor: default;
  display: inline-flex;
  font-size: 1.05em;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-width: 1.6rem;
  padding: 0.2rem 0.45rem;
}

.hoverbtn:hover {
  background-color: #d5e04d;
  color: #fff;
}

.wbr-submit-row {
  padding-top: 0.75rem;
  text-align: right;
}

.wbr-submit-btn {
  background-color: #2e3192;
  border-color: #2e3192;
  border-radius: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

.wbr-note-table td {
  border: 0;
  padding: 0 0.5rem 1rem;
}

.wbr-result-table thead th {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.75rem;
}

.wbr-result-table td:not(:first-child),
.wbr-result-table th:not(:first-child) {
  text-align: right;
}

.wbr-section-row td {
  font-weight: 400;
  padding-top: 0.75rem;
}

.wbr-spacer-row td {
  padding: 0.5rem 0;
}

.wbr-hidden-row {
  display: none;
}

.wbr-border-bottom {
  border-bottom: 1px solid #000 !important;
}

.wbr-math-sign {
  float: right;
  font-size: 24px;
  line-height: 20px;
}

@media print {
  .wbr-kk-panel {
    padding: 0;
  }

  .wbr-print-btn,
  .alert {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .tool-embed-shell {
    padding: 1rem;
  }

  .hero-card,
  .form-section,
  .results-section {
    padding: 1rem;
  }

  .actions {
    justify-content: stretch;
  }

  .actions .btn {
    width: 100%;
  }

  .wbr-kk-panel {
    padding: 0.75rem;
  }

  .wbr-form-table,
  .wbr-result-table {
    display: block;
    overflow-x: auto;
  }

  .wbr-form-table td:first-child,
  .wbr-result-table td:first-child,
  .wbr-result-table th:first-child {
    min-width: 240px;
  }
}
