.hiqfl-wrap {
    --hiqfl-bg: #f6f7f9;
    --hiqfl-panel: #ffffff;
    --hiqfl-panel-2: #f8fafc;
    --hiqfl-text: #17202e;
    --hiqfl-muted: #667085;
    --hiqfl-line: #d7dde7;
    --hiqfl-strong: #111827;
    --hiqfl-soft: #eef1f5;
    --hiqfl-good: #166534;
    --hiqfl-danger: #9f1239;
    --hiqfl-shadow: 0 14px 38px rgba(17, 24, 39, 0.10);
    width: 100%;
    max-width: 1180px;
    margin: 16px auto;
    padding: 8px;
    color: var(--hiqfl-text);
    background: linear-gradient(145deg, #eef1f5, #fbfcfd);
    border-radius: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

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

.hiqfl-wrap[data-theme="dark"] {
    --hiqfl-bg: #0f172a;
    --hiqfl-panel: #111827;
    --hiqfl-panel-2: #1f2937;
    --hiqfl-text: #f8fafc;
    --hiqfl-muted: #cbd5e1;
    --hiqfl-line: #334155;
    --hiqfl-strong: #f9fafb;
    --hiqfl-soft: #1e293b;
    --hiqfl-good: #86efac;
    --hiqfl-danger: #fda4af;
    --hiqfl-shadow: 0 14px 42px rgba(0, 0, 0, 0.34);
    background: linear-gradient(145deg, #111827, #0f172a);
}

.hiqfl-app {
    width: 100%;
    overflow: hidden;
    background: var(--hiqfl-panel);
    border: 1px solid var(--hiqfl-line);
    border-radius: 18px;
    box-shadow: var(--hiqfl-shadow);
}

.hiqfl-hero {
    display: grid;
    gap: 16px;
    padding: 20px;
    background:
        radial-gradient(circle at 100% 0%, rgba(100, 116, 139, 0.20), transparent 38%),
        linear-gradient(180deg, var(--hiqfl-panel), var(--hiqfl-panel-2));
    border-bottom: 1px solid var(--hiqfl-line);
}

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

.hiqfl-hero h2 {
    margin: 0;
    color: var(--hiqfl-strong);
    font-size: clamp(1.45rem, 7vw, 2.45rem);
    line-height: 1.1;
    text-transform: capitalize;
}

.hiqfl-hero p {
    margin: 10px 0 0;
    max-width: 760px;
    color: var(--hiqfl-muted);
    font-size: clamp(0.96rem, 3vw, 1.05rem);
    line-height: 1.65;
}

.hiqfl-theme,
.hiqfl-btn {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--hiqfl-line);
    border-radius: 14px;
    padding: 11px 14px;
    background: var(--hiqfl-panel);
    color: var(--hiqfl-strong);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.hiqfl-theme {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.hiqfl-theme:hover,
.hiqfl-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

.hiqfl-theme:focus-visible,
.hiqfl-btn:focus-visible,
.hiqfl-field input:focus-visible,
.hiqfl-field select:focus-visible,
.hiqfl-check input:focus-visible,
.hiqfl-optional-quote summary:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.38);
    outline-offset: 2px;
}

.hiqfl-form {
    display: grid;
    gap: 16px;
    padding: 14px;
}

.hiqfl-section {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--hiqfl-line);
    border-radius: 18px;
    background: var(--hiqfl-panel);
    padding: 16px;
}

.hiqfl-section-title {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.hiqfl-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--hiqfl-line);
    background: var(--hiqfl-soft);
    color: var(--hiqfl-strong);
    font-weight: 900;
}

.hiqfl-section-title h3 {
    margin: 0;
    color: var(--hiqfl-strong);
    font-size: clamp(1.08rem, 4vw, 1.35rem);
    line-height: 1.25;
}

.hiqfl-section-title p {
    margin: 5px 0 0;
    color: var(--hiqfl-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.hiqfl-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
}

.hiqfl-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.hiqfl-field span,
.hiqfl-check span {
    color: var(--hiqfl-strong);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.35;
}

.hiqfl-field input,
.hiqfl-field select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid var(--hiqfl-line);
    border-radius: 14px;
    background: var(--hiqfl-panel-2);
    color: var(--hiqfl-text);
    padding: 11px 12px;
    font: inherit;
    line-height: 1.2;
}

.hiqfl-check {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 50px;
    padding: 12px;
    border: 1px solid var(--hiqfl-line);
    border-radius: 14px;
    background: var(--hiqfl-panel-2);
}

.hiqfl-check input {
    width: 21px;
    height: 21px;
    accent-color: var(--hiqfl-strong);
}

.hiqfl-optional-quote {
    padding: 0;
    overflow: hidden;
}

.hiqfl-optional-quote summary {
    display: grid;
    gap: 3px;
    padding: 16px;
    cursor: pointer;
    color: var(--hiqfl-strong);
    font-weight: 900;
}

.hiqfl-optional-quote summary small {
    color: var(--hiqfl-muted);
    font-weight: 700;
}

.hiqfl-optional-quote .hiqfl-fields {
    padding: 0 16px 16px;
}

.hiqfl-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.hiqfl-primary {
    background: var(--hiqfl-strong);
    color: var(--hiqfl-panel);
    border-color: var(--hiqfl-strong);
}

/* Output area: flat report style, not card boxes. */
.hiqfl-results {
    width: auto;
    margin: 0 14px 18px;
    padding: 0;
    background: transparent;
    border: 0;
    scroll-margin-top: 18px;
}

.hiqfl-empty {
    min-height: 110px;
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    color: var(--hiqfl-muted);
    border: 1px dashed var(--hiqfl-line);
    border-radius: 16px;
    padding: 18px;
    background: var(--hiqfl-panel-2);
}

.hiqfl-empty span {
    font-size: 1.8rem;
}

.hiqfl-error {
    border: 1px solid rgba(159, 18, 57, 0.34);
    border-radius: 16px;
    padding: 14px;
    background: rgba(159, 18, 57, 0.08);
    color: var(--hiqfl-danger);
    font-weight: 800;
    line-height: 1.45;
}

.hiqfl-report {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 18px;
    padding: 18px 0 4px;
    background: transparent;
}

.hiqfl-report-title {
    display: grid;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--hiqfl-line);
}

.hiqfl-report-title h3 {
    margin: 0;
    color: var(--hiqfl-strong);
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.18;
}

.hiqfl-report-title p {
    margin: 0;
    color: var(--hiqfl-muted);
    line-height: 1.62;
}

.hiqfl-summary-lines,
.hiqfl-quote-notes,
.hiqfl-disclaimer-wrap {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--hiqfl-line);
    border-bottom: 1px solid var(--hiqfl-line);
}

.hiqfl-line-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--hiqfl-line);
}

.hiqfl-line-row:last-child {
    border-bottom: 0;
}

.hiqfl-line-row span {
    min-width: 0;
    max-width: 62%;
    color: var(--hiqfl-muted);
    font-weight: 800;
    line-height: 1.38;
}

.hiqfl-line-row strong {
    min-width: 0;
    color: var(--hiqfl-strong);
    font-size: clamp(1rem, 4vw, 1.18rem);
    line-height: 1.25;
    text-align: right;
    overflow-wrap: anywhere;
}

.hiqfl-money {
    white-space: nowrap;
}

.hiqfl-comparison {
    width: 100%;
    min-width: 0;
    display: grid;
    gap: 0;
    border-top: 2px solid var(--hiqfl-strong);
    border-bottom: 2px solid var(--hiqfl-strong);
}

.hiqfl-comparison-heading {
    padding: 0 0 10px;
    color: var(--hiqfl-strong);
    font-size: clamp(1.1rem, 4vw, 1.35rem);
    font-weight: 900;
}

.hiqfl-compare-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) repeat(var(--hiqfl-cols, 2), minmax(82px, 0.7fr));
    gap: 8px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--hiqfl-line);
}

.hiqfl-compare-row:last-child {
    border-bottom: 0;
}

.hiqfl-compare-row.is-head {
    color: var(--hiqfl-strong);
    font-weight: 900;
    border-bottom: 2px solid var(--hiqfl-line);
}

.hiqfl-compare-row span {
    min-width: 0;
    color: var(--hiqfl-muted);
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.hiqfl-compare-row strong,
.hiqfl-compare-row b {
    min-width: 0;
    color: var(--hiqfl-strong);
    font-size: clamp(0.92rem, 3.5vw, 1.05rem);
    line-height: 1.28;
    text-align: right;
    overflow-wrap: anywhere;
}

.hiqfl-score {
    display: inline-block;
    min-width: 54px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--hiqfl-soft);
    text-align: center;
    white-space: nowrap;
}

.hiqfl-best-text {
    color: var(--hiqfl-good) !important;
    font-weight: 900 !important;
}

.hiqfl-note-group {
    border-bottom: 1px solid var(--hiqfl-line);
    padding: 12px 0;
}

.hiqfl-note-group:last-child {
    border-bottom: 0;
}

.hiqfl-note-group h4 {
    margin: 0 0 7px;
    color: var(--hiqfl-strong);
    font-size: 1rem;
}

.hiqfl-note-group ul {
    margin: 0;
    padding-left: 18px;
    color: var(--hiqfl-muted);
    line-height: 1.55;
}

.hiqfl-note-group li + li {
    margin-top: 5px;
}

.hiqfl-disclaimer {
    margin: 0;
    padding: 13px 0;
    color: var(--hiqfl-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.hiqfl-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 99999;
    width: calc(100% - 32px);
    max-width: 420px;
    border-radius: 999px;
    padding: 12px 16px;
    background: var(--hiqfl-strong);
    color: var(--hiqfl-panel);
    text-align: center;
    font-weight: 900;
    box-shadow: var(--hiqfl-shadow);
}

@media (max-width: 420px) {
    .hiqfl-wrap {
        padding: 0;
        border-radius: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .hiqfl-app {
        border-radius: 0;
    }

    .hiqfl-hero,
    .hiqfl-form {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hiqfl-results {
        margin-left: 12px;
        margin-right: 12px;
    }

    .hiqfl-line-row {
        display: grid;
        gap: 4px;
    }

    .hiqfl-line-row span {
        max-width: 100%;
    }

    .hiqfl-line-row strong {
        text-align: left;
    }

    .hiqfl-compare-row {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 14px 0;
    }

    .hiqfl-compare-row.is-head {
        display: none;
    }

    .hiqfl-compare-row span {
        color: var(--hiqfl-strong);
        font-weight: 900;
    }

    .hiqfl-compare-row strong,
    .hiqfl-compare-row b {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        text-align: right;
        font-weight: 800;
    }

    .hiqfl-compare-row strong::before,
    .hiqfl-compare-row b::before {
        content: attr(data-quote);
        color: var(--hiqfl-muted);
        text-align: left;
        font-weight: 800;
    }
}

@media (min-width: 640px) {
    .hiqfl-wrap {
        padding: 16px;
        margin: 22px auto;
        border-radius: 24px;
    }

    .hiqfl-app {
        border-radius: 22px;
    }

    .hiqfl-hero {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        padding: 26px;
    }

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

    .hiqfl-form {
        padding: 22px;
        gap: 18px;
    }

    .hiqfl-section {
        padding: 20px;
    }

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

    .hiqfl-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hiqfl-results {
        margin: 0 22px 24px;
    }

    .hiqfl-report {
        padding: 22px 0 4px;
        gap: 20px;
    }
}

@media (min-width: 980px) {
    .hiqfl-fields {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hiqfl-quote-fields {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hiqfl-actions {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .hiqfl-wrap,
    .hiqfl-wrap * {
        visibility: visible;
    }

    .hiqfl-wrap {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        background: #ffffff;
        box-shadow: none;
    }

    .hiqfl-actions,
    .hiqfl-theme {
        display: none !important;
    }
}
