.ccddc-wrap,
.ccddc-wrap * {
    box-sizing: border-box;
}

.ccddc-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    color: #111827;
    font-family: inherit;
    overflow-x: hidden;
    background: transparent;
}

.ccddc-shell {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 32px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.ccddc-wrap.is-dark .ccddc-shell {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.ccddc-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.ccddc-kicker {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.ccddc-header h2 {
    margin: 0;
    color: inherit;
    font-size: clamp(1.55rem, 5vw, 2.35rem);
    line-height: 1.12;
}

.ccddc-intro {
    margin: 10px 0 0;
    max-width: 780px;
    color: #5b6677;
    font-size: clamp(0.96rem, 2.5vw, 1.08rem);
    line-height: 1.55;
}

.ccddc-wrap.is-dark .ccddc-kicker,
.ccddc-wrap.is-dark .ccddc-intro,
.ccddc-wrap.is-dark .ccddc-field small,
.ccddc-wrap.is-dark .ccddc-explain,
.ccddc-wrap.is-dark .ccddc-disclaimer {
    color: #cbd5e1;
}

.ccddc-theme-toggle,
.ccddc-btn {
    appearance: none;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 800;
    line-height: 1.15;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ccddc-theme-toggle {
    align-self: flex-start;
    background: #e5e7eb;
    color: #111827;
}

.ccddc-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}

.ccddc-field {
    min-width: 0;
}

.ccddc-field label {
    display: block;
    margin: 0 0 7px;
    font-weight: 850;
    color: inherit;
}

.ccddc-field input,
.ccddc-field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #111827;
    font: inherit;
    outline: none;
}

.ccddc-wrap.is-dark .ccddc-field input,
.ccddc-wrap.is-dark .ccddc-field select {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

.ccddc-field input:focus,
.ccddc-field select:focus,
.ccddc-btn:focus,
.ccddc-theme-toggle:focus {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 2px;
    border-color: #2563eb;
}

.ccddc-field small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.42;
}

.ccddc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    min-width: 0;
}

.ccddc-btn {
    flex: 1 1 145px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.16);
}

.ccddc-btn-muted,
.ccddc-theme-toggle {
    background: #e5e7eb;
    color: #111827;
    box-shadow: none;
}

.ccddc-btn:hover,
.ccddc-theme-toggle:hover {
    transform: translateY(-1px);
}

.ccddc-wrap.is-dark .ccddc-btn {
    background: #e5e7eb;
    color: #0f172a;
}

.ccddc-wrap.is-dark .ccddc-btn-muted,
.ccddc-wrap.is-dark .ccddc-theme-toggle {
    background: #334155;
    color: #f8fafc;
}

.ccddc-errors {
    margin-top: 16px;
    color: #b91c1c;
    font-weight: 750;
    line-height: 1.45;
}

.ccddc-wrap.is-dark .ccddc-errors {
    color: #fca5a5;
}

.ccddc-report {
    width: 100%;
    max-width: 100%;
    margin-top: clamp(22px, 5vw, 34px);
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    overflow: visible;
}

.ccddc-report-topline {
    width: 100%;
    height: 3px;
    background: #111827;
    margin: 0 0 12px;
}

.ccddc-wrap.is-dark .ccddc-report-topline {
    background: #e5e7eb;
}

.ccddc-report h3,
.ccddc-report h4 {
    margin: 0 0 16px;
    color: inherit;
    font-size: clamp(1.45rem, 5vw, 2rem);
    line-height: 1.15;
}

.ccddc-report h4 {
    font-size: clamp(1.2rem, 4vw, 1.55rem);
}

.ccddc-result-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 17px 0;
    border-bottom: 1px solid #d6dbe3;
}

.ccddc-result-row span {
    color: #667085;
    font-size: clamp(1rem, 3.8vw, 1.35rem);
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ccddc-result-row strong {
    color: #111827;
    font-size: clamp(1.18rem, 5vw, 1.75rem);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ccddc-result-main strong {
    color: #166534;
    font-size: clamp(1.45rem, 6.4vw, 2.25rem);
}

.ccddc-wrap.is-dark .ccddc-result-row {
    border-bottom-color: #334155;
}

.ccddc-wrap.is-dark .ccddc-result-row span {
    color: #cbd5e1;
}

.ccddc-wrap.is-dark .ccddc-result-row strong {
    color: #f8fafc;
}

.ccddc-wrap.is-dark .ccddc-result-main strong {
    color: #86efac;
}

.ccddc-report-gap {
    margin-top: 22px;
}

.ccddc-explain,
.ccddc-disclaimer {
    margin: 0;
    color: #475569;
    font-size: clamp(0.95rem, 2.6vw, 1rem);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.ccddc-disclaimer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d6dbe3;
    font-size: 0.92rem;
}

.ccddc-wrap.is-dark .ccddc-disclaimer {
    border-top-color: #334155;
}

@media (min-width: 680px) {
    .ccddc-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .ccddc-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ccddc-actions {
        grid-column: 1 / -1;
    }

    .ccddc-result-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 18px;
    }

    .ccddc-result-row strong {
        text-align: right;
    }
}

@media (max-width: 430px) {
    .ccddc-shell {
        padding: 15px;
        border-radius: 12px;
    }

    .ccddc-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ccddc-btn,
    .ccddc-theme-toggle {
        width: 100%;
    }
}

@media print {
    .ccddc-theme-toggle,
    .ccddc-actions,
    .ccddc-form,
    .ccddc-errors {
        display: none !important;
    }

    .ccddc-shell {
        box-shadow: none;
        border: 0;
        padding: 0;
    }

    .ccddc-report {
        margin-top: 0;
    }
}

/* Removed previous helper note under the result heading. */
.ccddc-output-note,
.ccddc-result-note,
.ccddc-mobile-note,
.ccddc-readable-note {
    display: none !important;
}
