.cpdly-app {
  --cpdly-ink: #12291E;
  --cpdly-muted: #5C7A6B;
  --cpdly-accent: #16A34A;
  --cpdly-accent-dark: #0F7A38;
  --cpdly-bg-card: #FFFFFF;
  --cpdly-bg-tint: #EFFBF3;
  --cpdly-bg-tint-strong: #DCF5E3;
  --cpdly-border: #DCEAE1;
  --cpdly-border-strong: #BFE8CC;
  --cpdly-radius-lg: 16px;
  --cpdly-radius-md: 12px;

  box-sizing: border-box;
  color: var(--cpdly-ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.5;
  max-width: 100%;
}
.cpdly-app *, .cpdly-app *::before, .cpdly-app *::after { box-sizing: border-box; }

.cpdly-intro { color: var(--cpdly-muted); font-size: 14px; line-height: 1.6; max-width: 640px; margin: 0 0 20px; }

.cpdly-topbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.cpdly-topbar-field { flex: 1; min-width: 140px; }
.cpdly-topbar label { display: block; font-size: 11px; font-weight: 600; color: var(--cpdly-muted); text-transform: uppercase; margin-bottom: 4px; }
.cpdly-topbar select {
  width: 100%; background: var(--cpdly-bg-tint); color: var(--cpdly-ink); font-weight: 600;
  border: 1px solid var(--cpdly-border-strong); border-radius: 10px; padding: 9px 10px; font-size: 14px;
}
.cpdly-auto-note { font-size: 11px; color: var(--cpdly-muted); margin: 4px 0 0; }

.cpdly-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
@media (max-width: 780px) { .cpdly-grid { grid-template-columns: 1fr; } }

.cpdly-card {
  background: var(--cpdly-bg-card); border: 1px solid var(--cpdly-border); border-radius: var(--cpdly-radius-lg);
  box-shadow: 0 1px 3px rgba(22,163,74,.08); padding: 20px; margin-bottom: 20px;
}
.cpdly-grid .cpdly-card { margin-bottom: 0; }
.cpdly-card-heading { font-size: 17px; font-weight: 700; margin: 0 0 16px; }
.cpdly-card-heading-lg { font-size: 20px; font-weight: 700; margin: 0 0 10px; }

.cpdly-field { margin-bottom: 16px; }
.cpdly-field label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cpdly-field-value { color: var(--cpdly-accent-dark); font-weight: 700; }
.cpdly-field input[type="range"] { width: 100%; accent-color: var(--cpdly-accent); }

.cpdly-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--cpdly-border); }
.cpdly-toggle-row:first-of-type { border-top: none; margin-top: 4px; }
.cpdly-toggle-row span { font-size: 13px; font-weight: 600; }
.cpdly-toggle { position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--cpdly-border); border: none; cursor: pointer; flex-shrink: 0; padding: 0; }
.cpdly-toggle.is-on { background: var(--cpdly-accent); }
.cpdly-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: transform .15s ease;
}
.cpdly-toggle.is-on::after { transform: translateX(18px); }

.cpdly-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 420px) { .cpdly-stats { grid-template-columns: 1fr; } }
.cpdly-stat { background: var(--cpdly-bg-tint); border: 1px solid var(--cpdly-border); border-radius: var(--cpdly-radius-md); padding: 14px; }
.cpdly-stat-label { font-size: 11px; text-transform: uppercase; color: var(--cpdly-muted); font-weight: 700; letter-spacing: .02em; }
.cpdly-stat-value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.cpdly-stat.is-accent { background: var(--cpdly-bg-tint-strong); border-color: var(--cpdly-border-strong); }
.cpdly-stat.is-accent .cpdly-stat-value { color: var(--cpdly-accent-dark); }

.cpdly-chart-wrap { margin: 16px 0; }
.cpdly-chart-title { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--cpdly-muted); font-weight: 700; margin-bottom: 8px; }
.cpdly-chart-wrap svg { width: 100%; height: auto; display: block; }

.cpdly-note { font-size: 12px; color: var(--cpdly-muted); line-height: 1.6; margin: 8px 0 20px; }
.cpdly-error { background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }

.cpdly-howitworks-intro { color: var(--cpdly-muted); font-size: 14px; max-width: 640px; margin: 0 0 18px; }
.cpdly-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .cpdly-steps { grid-template-columns: 1fr; } }
.cpdly-step { display: flex; gap: 12px; }
.cpdly-step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--cpdly-accent); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cpdly-step-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cpdly-step p { font-size: 13px; color: var(--cpdly-muted); margin: 0; line-height: 1.5; }

.cpdly-faq-item { border-bottom: 1px solid var(--cpdly-border); padding: 12px 0; }
.cpdly-faq-item:last-child { border-bottom: none; }
.cpdly-faq-question { cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; }
.cpdly-faq-question::-webkit-details-marker { display: none; }
.cpdly-faq-question::before { content: '+'; display: inline-block; width: 16px; color: var(--cpdly-accent); font-weight: 700; }
.cpdly-faq-item[open] .cpdly-faq-question::before { content: '\2212'; }
.cpdly-faq-answer { font-size: 14px; color: var(--cpdly-muted); line-height: 1.6; margin: 8px 0 0 16px; }
