.pdlc {
    --pdlc-ink: #162437;
    --pdlc-muted: #5f6d7d;
    --pdlc-line: #dbe3ea;
    --pdlc-soft: #f7f9fb;
    --pdlc-accent: #1f5f8b;
    --pdlc-accent-dark: #174767;
    --pdlc-ok: #18794e;
    --pdlc-risk: #a33b20;
    color: var(--pdlc-ink);
    font-family: inherit;
}

.pdlc * { box-sizing: border-box; }

.pdlc-shell {
    max-width: 980px;
    margin: 0 auto;
    border: 1px solid var(--pdlc-line);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

.pdlc-hero {
    padding: 30px 34px 24px;
    border-bottom: 1px solid var(--pdlc-line);
    background: #fbfcfd;
}

.pdlc-badge,
.pdlc-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pdlc-accent-dark);
}

.pdlc-hero h2 {
    margin: 7px 0 9px;
    font-size: clamp(28px, 4.2vw, 42px);
    line-height: 1.12;
}

.pdlc-hero p,
.pdlc-guidance,
.pdlc-explain p,
.pdlc-disclaimer p,
.pdlc-formula p,
.pdlc-scenario p {
    line-height: 1.62;
}

.pdlc-hero p { margin: 0; color: var(--pdlc-muted); max-width: 760px; }

.pdlc-guidance {
    margin: 22px 34px 0;
    padding: 15px 17px;
    border: 1px solid #cfe0ec;
    border-radius: 12px;
    background: #f3f8fb;
}

.pdlc-guidance strong,
.pdlc-guidance span { display: block; }
.pdlc-guidance span { margin-top: 4px; color: var(--pdlc-muted); }

.pdlc-form { padding: 26px 34px 12px; }

.pdlc-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.pdlc-input-card {
    padding: 18px;
    border: 1px solid var(--pdlc-line);
    border-radius: 14px;
    background: #fff;
}

.pdlc-input-card label {
    display: block;
    margin-bottom: 9px;
    font-weight: 800;
    line-height: 1.35;
}

.pdlc-input-card label b { color: #b42318; }

.pdlc-money {
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid #b9c6d2;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.pdlc-money > span {
    padding: 0 13px;
    border-right: 1px solid var(--pdlc-line);
    color: #4d5e70;
    font-weight: 800;
}

.pdlc input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 13px 14px;
    background: transparent;
    color: var(--pdlc-ink);
    font: inherit;
    font-size: 16px;
}

.pdlc-money:focus-within {
    border-color: var(--pdlc-accent);
    box-shadow: 0 0 0 3px rgba(31, 95, 139, .12);
}

.pdlc-input-card small {
    display: block;
    margin-top: 8px;
    color: var(--pdlc-muted);
    line-height: 1.45;
}

.pdlc-error {
    display: block;
    min-height: 17px;
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.pdlc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.pdlc-chips button,
.pdlc-secondary {
    appearance: none;
    border: 1px solid #bac6d1;
    border-radius: 9px;
    background: #fff;
    color: var(--pdlc-ink);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.pdlc-chips button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.pdlc-actions {
    display: flex;
    gap: 10px;
    padding-top: 17px;
}

.pdlc-primary,
.pdlc-secondary {
    min-height: 48px;
    padding: 0 18px;
}

.pdlc-primary {
    flex: 1;
    border: 0;
    border-radius: 10px;
    background: var(--pdlc-accent);
    color: #fff;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.pdlc-primary:hover { background: var(--pdlc-accent-dark); }
.pdlc-secondary:hover, .pdlc-chips button:hover { background: var(--pdlc-soft); }

.pdlc-results {
    margin: 15px 34px 28px;
    padding: 24px;
    border: 1px solid #d5e1e9;
    border-radius: 16px;
    background: #fbfcfd;
}

.pdlc-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.pdlc-result-head h3 {
    margin: 5px 0 7px;
    font-size: clamp(34px, 6vw, 50px);
    line-height: 1;
    color: var(--pdlc-ok);
}

.pdlc-result-head p {
    margin: 0;
    color: var(--pdlc-muted);
    line-height: 1.5;
}

.pdlc-status-risk { color: var(--pdlc-risk) !important; font-weight: 700; }
.pdlc-status-ok { color: var(--pdlc-ok) !important; font-weight: 700; }

.pdlc-result-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pdlc-small { min-height: 38px; padding: 0 12px; font-size: 13px; }

.pdlc-meter-wrap {
    margin: 22px 0;
    padding: 16px;
    border: 1px solid var(--pdlc-line);
    border-radius: 13px;
    background: #fff;
}

.pdlc-meter-labels,
.pdlc-meter-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.pdlc-meter-labels span,
.pdlc-meter-foot { color: var(--pdlc-muted); font-size: 13px; }
.pdlc-meter-labels strong { font-size: 15px; }

.pdlc-meter {
    height: 16px;
    margin: 10px 0 8px;
    border-radius: 999px;
    background: #e8edf1;
    overflow: hidden;
}

.pdlc-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--pdlc-accent);
    transition: width .3s ease;
}

.pdlc-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pdlc-metric {
    padding: 15px;
    border: 1px solid var(--pdlc-line);
    border-radius: 12px;
    background: #fff;
}

.pdlc-metric span {
    display: block;
    min-height: 34px;
    color: var(--pdlc-muted);
    font-size: 12px;
    line-height: 1.35;
}

.pdlc-metric strong {
    display: block;
    margin-top: 5px;
    font-size: 18px;
    word-break: break-word;
}

.pdlc-risk-metric strong { color: var(--pdlc-risk); }

.pdlc-scenario,
.pdlc-formula {
    margin-top: 16px;
    padding: 16px 17px;
    border-radius: 12px;
}

.pdlc-scenario { border: 1px solid var(--pdlc-line); background: #fff; }
.pdlc-scenario-ok { border-color: #cbe3d7; background: #f7fbf9; }
.pdlc-scenario-risk { border-color: #efcfc6; background: #fff8f5; }
.pdlc-scenario p, .pdlc-formula p { margin: 5px 0 0; color: var(--pdlc-muted); }

.pdlc-formula { background: #edf4f8; }

.pdlc-explain {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 34px 26px;
}

.pdlc-explain > div {
    padding: 17px;
    border: 1px solid var(--pdlc-line);
    border-radius: 13px;
}

.pdlc-explain strong { display: block; margin-bottom: 6px; }
.pdlc-explain p { margin: 0; color: var(--pdlc-muted); font-size: 14px; }

.pdlc-disclaimer {
    margin: 0 34px 34px;
    padding: 18px;
    border: 1px solid #ead7bd;
    border-radius: 14px;
    background: #fffaf2;
}

.pdlc-disclaimer strong { display: block; margin-bottom: 6px; color: #72420a; }
.pdlc-disclaimer p { margin: 0; color: #5f4b33; font-size: 13px; }

@media (max-width: 760px) {
    .pdlc-shell { border-radius: 15px; }
    .pdlc-hero { padding: 24px 18px 20px; }
    .pdlc-guidance { margin: 18px 18px 0; }
    .pdlc-form { padding: 20px 18px 10px; }
    .pdlc-input-grid { grid-template-columns: 1fr; }
    .pdlc-actions { flex-direction: column; }
    .pdlc-primary, .pdlc-secondary { width: 100%; }
    .pdlc-results { margin: 14px 18px 22px; padding: 18px; }
    .pdlc-result-head { flex-direction: column; }
    .pdlc-result-actions { width: 100%; }
    .pdlc-result-actions .pdlc-secondary { width: auto; flex: 1; }
    .pdlc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pdlc-explain { grid-template-columns: 1fr; padding: 0 18px 22px; }
    .pdlc-disclaimer { margin: 0 18px 22px; }
}

@media (max-width: 480px) {
    .pdlc-metrics { grid-template-columns: 1fr; }
    .pdlc-result-actions { flex-direction: column; }
    .pdlc-result-actions .pdlc-secondary { width: 100%; }
    .pdlc-meter-labels, .pdlc-meter-foot { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .pdlc-meter span { transition: none; }
}

@media print {
    .pdlc-form,
    .pdlc-actions,
    .pdlc-result-actions,
    .pdlc-explain,
    .pdlc-disclaimer,
    .pdlc-guidance { display: none !important; }
    .pdlc-shell, .pdlc-results { border: 0; margin: 0; padding: 0; }
    .pdlc-results[hidden] { display: none !important; }
}
