.cdc-calculator {
  --cdc-border: rgba(0, 0, 0, 0.18);
  --cdc-border-strong: rgba(0, 0, 0, 0.32);
  --cdc-text: #0b0b0b;
  --cdc-subtext: rgba(0, 0, 0, 0.82);
  --cdc-bg: #e5e7eb;
  --cdc-soft: rgba(0, 0, 0, 0.06);
  --cdc-soft-2: rgba(0, 0, 0, 0.10);
  --cdc-radius: 18px;

  width: 100%;
  max-width: 880px;
  margin: 36px auto;
  background: var(--cdc-bg);
  border: 1px solid var(--cdc-border);
  border-radius: var(--cdc-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  padding: 40px;
  font-family: inherit;
  color: var(--cdc-text);
}

@media (max-width: 480px) {
  .cdc-calculator {
    padding: 28px;
    border-radius: 16px;
  }
}

@media (max-width: 560px) {
  .cdc-title { font-size: 34px; }
  .cdc-subtitle { font-size: 17px; }
}

.cdc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.cdc-title {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
  color: #0b0b0b;
}


.cdc-subtitle {
  margin: 7px 0 0 0;
  font-size: 19px;
  line-height: 1.42;
  color: rgba(0,0,0,0.88);
}

.cdc-subcopy {
  margin-top: 10px;
}

.cdc-subcopy p {
  font-size: 16px;
  color: rgba(0,0,0,0.88);
  margin: 6px 0;
}

.cdc-subcopy ul {
  margin: 6px 0 0 18px;
  font-size: 16px;
  color: rgba(0,0,0,0.88);
}

.cdc-badge {
  font-size: 12.5px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--cdc-border);
  background: var(--cdc-soft);
  color: rgba(0, 0, 0, 0.76);
  white-space: nowrap;
}

/* Top section: results + tool cards (shown above the calculator) */
.cdc-top {
  margin-top: 18px;
}

#cdc_result {
  margin-top: 0;
  margin-bottom: 18px;
}

/* Calculator form wrapper */

.cdc-form {
  margin-top: 18px;
  padding: 32px;
  border: 1px solid var(--cdc-border);
  border-radius: 16px;
  background: #fff;
}

.cdc-form-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.94);
  margin: 0 0 16px 0;
}

.cdc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 0;
}

/* Force every field to its own row */
.cdc-grid.two {
  grid-template-columns: 1fr;
}

.cdc-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cdc-label-row {
  display: block;
}

.cdc-label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0b0b0b;
}

/* Short explanation line; JS updates the copy */
.cdc-hint {
  font-size: 14.5px;
  color: rgba(0,0,0,0.72);
  line-height: 1.35;
  margin-top: 4px;
}


.cdc-input,
.cdc-select {
  width: 100%;
  padding: 15px 14px;
  border-radius: 16px;
  border: 1px solid var(--cdc-border);
  background: #fff;
  font-size: 20px;
  line-height: 1.2;
  color: #0b0b0b;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.cdc-input:focus,
.cdc-select:focus {
  outline: none;
  border-color: var(--cdc-border-strong);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.14);
}

/* Hide placeholders if any remain */
.cdc-input::placeholder {
  color: transparent;
}

/* Visual warning state on inputs */
.cdc-input-warn {
  border-color: rgba(128, 0, 0, 0.34);
  box-shadow: 0 0 0 4px rgba(128, 0, 0, 0.10);
}

.cdc-inline-warning {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #c62828;
  background: #ef5350;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.cdc-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.55) 50%),
    linear-gradient(135deg, rgba(0,0,0,0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.cdc-actions {
  margin-top: 18px;
  display: flex;
}

.cdc-btn {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.14);
  background: #111;
  color: #fff;
  padding: 18px 18px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.cdc-btn:hover {
  opacity: 0.96;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.cdc-btn:active {
  transform: translateY(1px);
}

.cdc-btn[disabled] {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
}

/* Result card: higher contrast background */
.cdc-result-card {
  border: 1px solid rgba(0,0,0,0.60);
  background: #0b101b;
  border-radius: 16px;
  padding: 32px;
  margin-top: 24px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.20);
}

.cdc-result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cdc-result-main {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
  color: #e5e5e7;
}

.cdc-result-sub {
  margin-top: 7px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.cdc-result-pill {
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
}

.cdc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 14px 0;
}

.cdc-warnings {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.92);
}

.cdc-warnings ul,
.cdc-notes ul {
  margin: 8px 0 0 18px;
  color: inherit;
}

.cdc-notes {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.cdc-notes a {
  color: inherit;
  text-decoration: underline;
}

.cdc-notes a:hover {
  color: inherit;
}

.cdc-error {
  border: 1px solid #c62828;
  background: #e53935;
  color: #ffffff;
  border-radius: 14px;
  padding: 18px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

/* Recommended tools section (free embed version) */
.cdc-tools {
  border: 1px solid var(--cdc-border-strong);
  border-radius: 16px;
  background: #1e1e24;
  padding: 32px;
}

.cdc-tools-head {
  margin-bottom: 16px;
}

.cdc-tools-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.cdc-tools-sub {
  margin-top: 5px;
  font-size: 22px;
  color: #ffffff;
  line-height: 1.35;
}

.cdc-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 680px) {
  .cdc-tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cdc-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--cdc-text);
  border: 1px solid var(--cdc-border);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.cdc-tool-card:hover {
  border-color: var(--cdc-border-strong);
  box-shadow: 0 12px 30px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

.cdc-tool-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.94);
  text-align: center;
}

.cdc-tool-desc {
  margin-top: 8px;
  font-size: 17.5px;
  color: rgba(0, 0, 0, 0.74);
  line-height: 1.4;
  text-align: center;
}

.cdc-tool-cta {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 750;
  color: rgba(0, 0, 0, 0.88);
}

.cdc-footer {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.cdc-disclaimer {
  font-size: 13.5px;
  line-height: 1.35;
  color: rgba(0,0,0,0.70);
  text-align: center;
  font-style: italic;
}

.cdc-powered {
  margin-top: 12px;
  text-align: center;
}

.cdc-powered-link {
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.26);
}

.cdc-powered-link:hover {
  color: rgba(0, 0, 0, 0.84);
  border-bottom-color: rgba(0, 0, 0, 0.34);
}

.cdc-tools .cdc-powered-link {
  color: rgba(255,255,255,0.80);
  border-bottom-color: rgba(255,255,255,0.28);
}

.cdc-tools .cdc-powered-link:hover {
  color: rgba(255,255,255,0.92);
  border-bottom-color: rgba(255,255,255,0.40);
}

.cdc-tool-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  border-radius: 12px;
}

@media (min-width: 680px) {
  .cdc-tool-img {
    max-width: 150px;
  }
}