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

.fcdfc-wrap {
    --fcdfc-bg: #f6f7f9;
    --fcdfc-panel: #ffffff;
    --fcdfc-text: #111827;
    --fcdfc-strong: #0f172a;
    --fcdfc-muted: #647085;
    --fcdfc-border: #d9dee7;
    --fcdfc-soft: #eef1f5;
    --fcdfc-line: #d7dce4;
    --fcdfc-accent: #1f3f6d;
    --fcdfc-good: #167047;
    --fcdfc-danger: #9b1c1c;
    --fcdfc-danger-bg: #fff1f1;
    width: min(100%, 980px);
    max-width: 100%;
    margin: 24px auto;
    padding: clamp(14px, 4vw, 28px);
    color: var(--fcdfc-text);
    background: var(--fcdfc-bg);
    border: 1px solid var(--fcdfc-border);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(22, 33, 55, 0.08);
    overflow-wrap: anywhere;
}

.fcdfc-wrap.is-dark {
    --fcdfc-bg: #111827;
    --fcdfc-panel: #1f2937;
    --fcdfc-text: #f3f4f6;
    --fcdfc-strong: #ffffff;
    --fcdfc-muted: #c5cedd;
    --fcdfc-border: #394459;
    --fcdfc-soft: #273243;
    --fcdfc-line: #424e63;
    --fcdfc-accent: #c9d8ff;
    --fcdfc-good: #77d6a0;
    --fcdfc-danger: #fecaca;
    --fcdfc-danger-bg: #421d1d;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
}

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

.fcdfc-eyebrow {
    margin: 0 0 8px;
    color: var(--fcdfc-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fcdfc-header h2,
.fcdfc-result h3,
.fcdfc-section-title {
    margin: 0;
    color: var(--fcdfc-strong);
    line-height: 1.18;
}

.fcdfc-header h2 {
    font-size: clamp(1.55rem, 5vw, 2.35rem);
}

.fcdfc-intro {
    max-width: 780px;
    margin: 10px 0 0;
    color: var(--fcdfc-muted);
    font-size: clamp(0.96rem, 2.4vw, 1.06rem);
    line-height: 1.6;
}

.fcdfc-theme-toggle,
.fcdfc-btn {
    border: 1px solid var(--fcdfc-border);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.fcdfc-theme-toggle {
    width: 100%;
    min-height: 46px;
    padding: 11px 16px;
    color: var(--fcdfc-text);
    background: var(--fcdfc-panel);
}

.fcdfc-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    min-width: 0;
    padding: clamp(16px, 4vw, 24px);
    background: var(--fcdfc-panel);
    border: 1px solid var(--fcdfc-border);
    border-radius: 16px;
}

.fcdfc-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
}

.fcdfc-span-all {
    grid-column: 1 / -1;
}

.fcdfc-field label,
.fcdfc-advanced summary {
    color: var(--fcdfc-strong);
    font-size: 0.96rem;
    font-weight: 800;
}

.fcdfc-field input,
.fcdfc-field select,
.fcdfc-field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--fcdfc-text);
    background: var(--fcdfc-bg);
    border: 1px solid var(--fcdfc-border);
    border-radius: 12px;
    font: inherit;
    outline: none;
}

.fcdfc-field textarea {
    min-height: 112px;
    resize: vertical;
}

.fcdfc-field input:focus,
.fcdfc-field select:focus,
.fcdfc-field textarea:focus,
.fcdfc-theme-toggle:focus,
.fcdfc-btn:focus {
    border-color: var(--fcdfc-accent);
    box-shadow: 0 0 0 3px rgba(63, 95, 147, 0.22);
    outline: 2px solid transparent;
}

.fcdfc-help {
    color: var(--fcdfc-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.fcdfc-advanced {
    width: 100%;
    grid-column: 1 / -1;
    padding: 14px;
    background: var(--fcdfc-bg);
    border: 1px solid var(--fcdfc-border);
    border-radius: 14px;
}

.fcdfc-advanced summary {
    cursor: pointer;
    list-style-position: inside;
}

.fcdfc-advanced[open] summary {
    margin-bottom: 16px;
}

.fcdfc-check-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.fcdfc-check-field input[type="checkbox"] {
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    margin: 0;
}

.fcdfc-check-field label {
    margin: 0;
}

.fcdfc-message {
    grid-column: 1 / -1;
    padding: 12px 14px;
    color: var(--fcdfc-danger);
    background: var(--fcdfc-danger-bg);
    border: 1px solid rgba(155, 28, 28, 0.26);
    border-radius: 12px;
    font-weight: 800;
}

.fcdfc-actions {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    gap: 10px;
    width: 100%;
}

.fcdfc-btn {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    color: var(--fcdfc-text);
    background: var(--fcdfc-soft);
}

.fcdfc-btn-primary {
    color: #ffffff;
    background: #1f3f6d;
    border-color: #1f3f6d;
}

.fcdfc-wrap.is-dark .fcdfc-btn-primary {
    color: #0f172a;
    background: #c9d8ff;
    border-color: #c9d8ff;
}

.fcdfc-btn-muted {
    background: transparent;
}

.fcdfc-theme-toggle:hover,
.fcdfc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(22, 33, 55, 0.12);
}

/* Result report: intentionally flat, full width, and not boxed. */
.fcdfc-result {
    width: 100%;
    min-width: 0;
    margin-top: clamp(24px, 5vw, 34px);
    padding: 0;
    color: var(--fcdfc-text);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.fcdfc-result h3 {
    padding-top: 18px;
    border-top: 4px solid var(--fcdfc-strong);
    font-size: clamp(1.34rem, 5vw, 1.85rem);
}

.fcdfc-placeholder {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 18px 0;
    color: var(--fcdfc-muted);
    border-top: 1px solid var(--fcdfc-line);
    border-bottom: 1px solid var(--fcdfc-line);
    line-height: 1.6;
}

.fcdfc-result-main {
    width: 100%;
    padding: 22px 0;
    border-bottom: 1px solid var(--fcdfc-line);
}

.fcdfc-result-label {
    display: block;
    margin-bottom: 8px;
    color: var(--fcdfc-muted);
    font-size: clamp(1rem, 3.2vw, 1.18rem);
    font-weight: 900;
    line-height: 1.25;
}

.fcdfc-result-date {
    display: block;
    color: var(--fcdfc-strong);
    font-size: clamp(1.55rem, 7vw, 2.55rem);
    font-weight: 950;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.fcdfc-section {
    width: 100%;
    padding: 22px 0 0;
}

.fcdfc-section-title {
    margin-bottom: 12px;
    font-size: clamp(1.1rem, 4.6vw, 1.5rem);
    font-weight: 950;
}

.fcdfc-report-list {
    width: 100%;
    margin: 0;
    border-top: 1px solid var(--fcdfc-line);
}

.fcdfc-report-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    align-items: start;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 15px 0;
    border-bottom: 1px solid var(--fcdfc-line);
}

.fcdfc-report-key {
    min-width: 0;
    color: var(--fcdfc-muted);
    font-size: clamp(0.98rem, 4.1vw, 1.18rem);
    font-weight: 900;
    line-height: 1.25;
}

.fcdfc-report-value {
    min-width: 0;
    max-width: 100%;
    color: var(--fcdfc-strong);
    font-size: clamp(0.98rem, 4.1vw, 1.16rem);
    font-weight: 950;
    line-height: 1.25;
    text-align: right;
    overflow-wrap: anywhere;
}

.fcdfc-report-value.is-positive {
    color: var(--fcdfc-good);
}

.fcdfc-long-row {
    grid-template-columns: 1fr;
    gap: 8px;
}

.fcdfc-long-row .fcdfc-report-value {
    text-align: left;
}

.fcdfc-summary-text {
    margin: 18px 0 0;
    color: var(--fcdfc-text);
    line-height: 1.65;
}

.fcdfc-explain {
    margin: 14px 0 0;
    padding-left: 20px;
    color: var(--fcdfc-text);
    line-height: 1.65;
}

.fcdfc-explain li + li {
    margin-top: 6px;
}

.fcdfc-disclaimer {
    margin: 18px 0 0;
    padding: 14px 0 0;
    color: var(--fcdfc-muted);
    border-top: 1px solid var(--fcdfc-line);
    font-size: 0.92rem;
    line-height: 1.6;
}

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

    .fcdfc-theme-toggle {
        width: auto;
        white-space: nowrap;
    }

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

    .fcdfc-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .fcdfc-btn {
        width: auto;
        min-width: 144px;
    }

    .fcdfc-report-row {
        grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
    }
}

@media (max-width: 420px) {
    .fcdfc-report-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .fcdfc-report-value {
        text-align: left;
    }
}

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

    .fcdfc-wrap,
    .fcdfc-result {
        border: 0;
        box-shadow: none;
        padding: 0;
        margin: 0;
        background: transparent;
    }
}
