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

.licq-wrap {
    --licq-page: #ffffff;
    --licq-soft: #f6f7f9;
    --licq-text: #111827;
    --licq-muted: #667085;
    --licq-line: #d9dee7;
    --licq-strong-line: #1f2937;
    --licq-input: #ffffff;
    --licq-accent: #1f2937;
    --licq-success: #147a45;
    --licq-danger: #b42318;
    --licq-focus: #2563eb;
    width: 100%;
    max-width: 940px;
    margin: 0 auto 28px;
    padding: clamp(14px, 4vw, 34px);
    color: var(--licq-text);
    background: var(--licq-page);
    font-family: inherit;
    overflow-x: hidden;
}

.licq-wrap.licq-dark {
    --licq-page: #0f172a;
    --licq-soft: #111827;
    --licq-text: #f8fafc;
    --licq-muted: #cbd5e1;
    --licq-line: #334155;
    --licq-strong-line: #e2e8f0;
    --licq-input: #1e293b;
    --licq-accent: #e5e7eb;
    --licq-success: #86efac;
    --licq-danger: #fca5a5;
    --licq-focus: #93c5fd;
}

.licq-topbar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 4px solid var(--licq-strong-line);
}

.licq-kicker,
.licq-report-header p {
    margin: 0 0 6px;
    color: var(--licq-muted);
    font-size: clamp(0.78rem, 2.2vw, 0.9rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.licq-topbar h2,
.licq-report-header h3 {
    margin: 0;
    color: var(--licq-text);
    font-size: clamp(1.55rem, 6vw, 2.35rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.licq-intro {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--licq-muted);
    font-size: clamp(0.95rem, 2.8vw, 1.06rem);
    line-height: 1.55;
}

.licq-theme-toggle,
.licq-btn {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--licq-line);
    border-radius: 12px;
    padding: 12px 15px;
    background: var(--licq-input);
    color: var(--licq-text);
    cursor: pointer;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.licq-theme-toggle:hover,
.licq-btn:hover {
    transform: translateY(-1px);
    border-color: var(--licq-strong-line);
}

.licq-theme-toggle:focus-visible,
.licq-btn:focus-visible,
.licq-wrap input:focus-visible,
.licq-wrap select:focus-visible,
.licq-optional summary:focus-visible {
    outline: 3px solid var(--licq-focus);
    outline-offset: 2px;
}

.licq-primary {
    background: var(--licq-accent);
    color: var(--licq-page);
    border-color: var(--licq-accent);
}

.licq-muted {
    color: var(--licq-muted);
}

.licq-form {
    padding: 22px 0 8px;
    border-bottom: 1px solid var(--licq-line);
}

.licq-section-title {
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--licq-line);
    color: var(--licq-text);
    font-size: 1.04rem;
    font-weight: 900;
}

.licq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    min-width: 0;
}

.licq-field {
    min-width: 0;
    margin-bottom: 16px;
}

.licq-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--licq-text);
    font-weight: 850;
    font-size: 0.98rem;
}

.licq-field small,
.licq-optional > small {
    display: block;
    margin-top: 7px;
    color: var(--licq-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.licq-wrap input,
.licq-wrap select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 50px;
    border: 1px solid var(--licq-line);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--licq-input);
    color: var(--licq-text);
    font: inherit;
}

.licq-input-with-prefix,
.licq-input-with-suffix {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--licq-line);
    border-radius: 12px;
    background: var(--licq-input);
    overflow: hidden;
}

.licq-input-with-prefix span,
.licq-input-with-suffix span {
    flex: 0 0 auto;
    padding: 0 14px;
    color: var(--licq-muted);
    font-weight: 900;
}

.licq-input-with-prefix input,
.licq-input-with-suffix input {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.licq-input-with-prefix input {
    padding-left: 0;
}

.licq-input-with-suffix input {
    padding-right: 0;
}

.licq-optional {
    margin: 6px 0 18px;
    padding: 14px 0 0;
    border-top: 1px solid var(--licq-line);
}

.licq-optional summary {
    cursor: pointer;
    color: var(--licq-text);
    font-weight: 900;
}

.licq-optional-grid {
    margin-top: 14px;
}

.licq-errors {
    min-height: 24px;
    margin: 8px 0 12px;
    color: var(--licq-danger);
    font-weight: 800;
    line-height: 1.45;
}

.licq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 6px;
}

.licq-actions .licq-btn {
    flex: 1 1 100%;
}

.licq-result {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow-x: hidden;
}

.licq-report-header {
    padding: 0 0 16px;
    border-bottom: 4px solid var(--licq-strong-line);
}

.licq-result-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--licq-line);
}

.licq-result-row span {
    min-width: 0;
    color: var(--licq-muted);
    font-size: clamp(1rem, 4.6vw, 1.28rem);
    font-weight: 850;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.licq-result-row strong {
    flex: 0 0 auto;
    max-width: 48%;
    color: var(--licq-text);
    font-size: clamp(1.05rem, 4.9vw, 1.45rem);
    font-weight: 950;
    line-height: 1.2;
    text-align: right;
    overflow-wrap: anywhere;
}

.licq-total-row {
    padding: 22px 0;
}

.licq-total-row span {
    color: var(--licq-text);
    font-size: clamp(1.15rem, 5.4vw, 1.65rem);
}

.licq-total-row strong,
.licq-result-row strong[data-licq-interest] {
    color: var(--licq-success);
}

.licq-total-row strong {
    font-size: clamp(1.35rem, 7vw, 2rem);
}

.licq-subreport {
    margin-top: 24px;
    border-top: 4px solid var(--licq-strong-line);
}

.licq-subreport h4 {
    margin: 16px 0 0;
    color: var(--licq-text);
    font-size: clamp(1.15rem, 5vw, 1.5rem);
}

.licq-explanation,
.licq-disclaimer {
    margin: 18px 0 0;
    padding: 0;
    color: var(--licq-muted);
    font-size: 0.96rem;
    line-height: 1.62;
    overflow-wrap: anywhere;
}

.licq-disclaimer {
    padding-top: 14px;
    border-top: 1px solid var(--licq-line);
}

@media (min-width: 620px) {
    .licq-topbar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .licq-theme-toggle {
        width: auto;
        min-width: 130px;
    }

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

    .licq-actions .licq-btn {
        flex: 1 1 160px;
    }
}

@media (max-width: 380px) {
    .licq-result-row {
        gap: 10px;
    }

    .licq-result-row strong {
        max-width: 44%;
        font-size: 1.02rem;
    }
}

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

    .licq-wrap {
        margin: 0;
        padding: 0;
        color: #111827;
        background: #ffffff;
    }

    .licq-result-row strong,
    .licq-result-row span,
    .licq-report-header h3,
    .licq-report-header p {
        color: #111827 !important;
    }
}

/* Clean output adjustment: no instructional note above the result report. */
.licq-form {
    border-bottom: 0;
}
.licq-actions {
    margin-bottom: 26px;
}
.licq-result {
    clear: both;
}
