/* =========================================================
   TitleWhys Prelim IQ — Results
   ========================================================= */

.titlewhys-prelim-results {
    max-width: 960px;
    margin: 30px auto;
    padding: 30px;
    background: #ffffff;
    color: #243247;
    font-family: inherit;
    line-height: 1.65;
}

.titlewhys-prelim-results-header {
    padding-bottom: 16px;
    margin-bottom: 25px;
    border-bottom: 3px solid #b48a43;
}

.titlewhys-prelim-results-header h2 {
    margin: 0 0 10px;
    color: #17304d;
    font-size: 30px;
    line-height: 1.25;
}

.titlewhys-prelim-results-header p {
    margin: 0;
    color: #17304d;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.titlewhys-prelim-summary {
    padding: 22px;
    margin-bottom: 30px;
    background: #f6f3ed;
    border-left: 4px solid #b48a43;
    border-radius: 8px;
}

.titlewhys-prelim-results h3 {
    margin: 0 0 15px;
    color: #17304d;
    font-size: 22px;
}

.titlewhys-prelim-results h4 {
    margin: 0 0 15px;
    color: #17304d;
    font-size: 19px;
}

.titlewhys-prelim-findings {
    margin-bottom: 30px;
}

.titlewhys-prelim-finding {
    padding: 28px 30px;
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid #e3e7ed;
    border-left: 5px solid #b48a43;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}

.titlewhys-prelim-finding p {
    max-width: 78ch;
    margin: 0 0 14px;
    line-height: 1.7;
}

.titlewhys-prelim-finding p:last-child {
    margin-bottom: 0;
}

.titlewhys-prelim-next-steps,
.titlewhys-prelim-limitations {
    padding: 22px;
    margin-bottom: 25px;
    background: #f8fafc;
    border-radius: 8px;
}

.titlewhys-prelim-results ol,
.titlewhys-prelim-results ul {
    padding-left: 24px;
    margin-bottom: 0;
}

.titlewhys-prelim-results li {
    margin-bottom: 10px;
}

.titlewhys-prelim-disclaimer {
    padding-top: 18px;
    border-top: 1px solid #e3e7ed;
    color: #667085;
    font-size: 13px;
}


/* =========================================================
   Prelim IQ — Privacy Box
   ========================================================= */

.titlewhys-prelim-privacy-box {
    margin: 18px 0;
    padding: 16px 18px;
    background: #f4f8fc;
    border: 1px solid #d6e3ef;
    border-left: 4px solid #2f6f9f;
    border-radius: 8px;
}

.titlewhys-prelim-privacy-box p {
    margin: 0 0 8px;
}

.titlewhys-prelim-privacy-box p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   Prelim IQ — Intro and Workflow Panels
   ========================================================= */

.titlewhys-prelim-intro {
    max-width: 900px;
    margin: 18px 0 8px;
    color: #243247;
    font-size: 18px;
    line-height: 1.6;
}

.titlewhys-prelim-session-status {
    margin: 6px 0 18px;
    color: #667085;
    font-size: 15px;
}

#titlewhys-realtor-verification-section,
#titlewhys-realtor-upload-section {
    margin-top: 16px;
    padding: 26px;
    background: #ffffff;
    border: 1px solid #dfe5ec;
    border-top: 4px solid #b48a43;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(20, 35, 59, 0.07);
}

#titlewhys-realtor-verification-section > p:first-child,
#titlewhys-realtor-upload-section > h3:first-child {
    margin-top: 0;
    color: #17304d;
}

#titlewhys-realtor-verification-section input,
#titlewhys-realtor-upload-section input {
    max-width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   Prelim IQ — Upload Controls
   ========================================================= */

#titlewhys-realtor-pdf {
    width: 100%;
    max-width: 520px;
    padding: 10px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #ffffff;
    color: #243247;
    font-size: 15px;
}

.titlewhys-prelim-upload-help {
    color: #667085;
    font-size: 14px;
}

#titlewhys-realtor-upload-form button[type="submit"] {
    padding: 14px 24px;
    background: #1f3d6d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

#titlewhys-realtor-upload-form button[type="submit"]:hover,
#titlewhys-realtor-upload-form button[type="submit"]:focus {
    background: #b48a43;
    color: #ffffff;
    transform: translateY(-1px);
}


/* =========================================================
   Prelim IQ — Processing State
   ========================================================= */

.titlewhys-prelim-processing {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 18px 20px;
    background: #f2f6fb;
    border: 1px solid #d3dfec;
    border-left: 4px solid #2f80c9;
    border-radius: 7px;
}

.titlewhys-prelim-processing[hidden] {
    display: none;
}

.titlewhys-prelim-spinner {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 4px solid #d7e3ef;
    border-top-color: #17365d;
    border-radius: 50%;
    animation: titlewhys-prelim-spin 0.8s linear infinite;
}

.titlewhys-prelim-processing-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 4px;
    line-height: 1.45;
}

.titlewhys-prelim-processing-text strong {
    color: #17365d;
    font-size: 16px;
}

.titlewhys-prelim-processing-text span {
    color: #4e5d70;
    font-size: 14px;
}

.titlewhys-prelim-tip {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d7e3ef;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.titlewhys-prelim-tip strong {
    display: inline;
    color: #b48a43;
    margin-right: 4px;
}

.titlewhys-prelim-tip span {
    display: inline;
    color: #475569;
}

@keyframes titlewhys-prelim-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   Prelim IQ — Mobile Layout
   ========================================================= */

@media (max-width: 767px) {

    .titlewhys-prelim-intro {
        margin-top: 14px;
        font-size: 16px;
        line-height: 1.55;
    }

    .titlewhys-prelim-session-status {
        margin-bottom: 14px;
    }

    .titlewhys-prelim-privacy-box {
        padding: 14px 15px;
        margin: 16px 0;
    }

    .titlewhys-prelim-processing {
        padding: 15px;
        gap: 12px;
        align-items: flex-start;
    }

    .titlewhys-prelim-spinner {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    #titlewhys-realtor-verification-section,
    #titlewhys-realtor-upload-section {
        padding: 18px 16px;
        margin-top: 12px;
    }

    .titlewhys-prelim-results {
        margin: 15px auto;
        padding: 16px;
    }

    .titlewhys-prelim-results-header h2 {
        font-size: 24px;
    }

    .titlewhys-prelim-results h3 {
        font-size: 20px;
    }

    .titlewhys-prelim-summary,
    .titlewhys-prelim-next-steps,
    .titlewhys-prelim-limitations {
        padding: 16px;
    }

    .titlewhys-prelim-finding {
        padding: 16px 14px;
    }

    .titlewhys-prelim-privacy-box {
        padding: 14px 15px;
        margin: 16px 0;
    }

    .titlewhys-realtor-test {
        font-size: 16px;
        line-height: 1.55;
    }

    #titlewhys-realtor-upload-section h3,
    #titlewhys-realtor-results-section > h3 {
        font-size: 26px;
        line-height: 1.25;
    }

    #titlewhys-realtor-upload-section p,
    #titlewhys-realtor-results-section p {
        font-size: 16px;
        line-height: 1.6;
    }

    .titlewhys-prelim-results h3 {
        font-size: 24px;
        line-height: 1.25;
    }

    .titlewhys-prelim-results h4 {
        font-size: 19px;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    .titlewhys-prelim-finding p,
    .titlewhys-prelim-next-steps li,
    .titlewhys-prelim-limitations li {
        font-size: 16px;
        line-height: 1.6;
    }

    .titlewhys-prelim-results {
        margin: 10px auto;
        padding: 12px;
    }

    .titlewhys-prelim-results-header {
        padding-bottom: 12px;
        margin-bottom: 18px;
    }

    .titlewhys-prelim-summary {
        margin-bottom: 22px;
    }

    .titlewhys-prelim-findings {
        margin-bottom: 22px;
    }
}


/* =========================================================
   Prelim IQ — Finding Classifications
   ========================================================= */

/* Red: Potential issue requiring attention */
.titlewhys-prelim-finding.needs-attention {
    border-left-color: #c74747;
    background: #fffafa;
}

/* Gold: Further review recommended */
.titlewhys-prelim-finding.review-recommended {
    border-left-color: #b48a43;
    background: #fffdf8;
}

/* Green: No issue identified in the reviewed text */
.titlewhys-prelim-finding.no-issue {
    border-left-color: #39865c;
    background: #f8fcf9;
}

/* Gray: Information could not be verified */
.titlewhys-prelim-finding.unable-to-verify {
    border-left-color: #8993a3;
    background: #f8f9fb;
}

/* Classification label styling */
.titlewhys-prelim-finding p:nth-of-type(1) {
    font-size: 14px;
    font-weight: 600;
}


/* =========================================================
   Prelim IQ — Professional Review Handoff
   ========================================================= */

.titlewhys-prelim-handoff {
    margin: 30px 0;
    padding: 28px;
    background: #f7f4ee;
    border: 1px solid #e6dccb;
    border-left: 4px solid #b48a43;
    border-radius: 10px;
    text-align: center;
}

.titlewhys-prelim-handoff h3 {
    margin: 0 0 12px;
    color: #14233b;
    font-size: 22px;
}

.titlewhys-prelim-handoff p {
    margin: 0 0 20px;
    color: #475569;
    line-height: 1.6;
}

.titlewhys-prelim-handoff-button {
    display: inline-block;
    padding: 14px 26px;
    background: #14233b;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    border-radius: 7px;
    transition: background 0.2s ease;
}

.titlewhys-prelim-handoff-button:hover,
.titlewhys-prelim-handoff-button:focus {
    background: #b48a43;
    color: #ffffff !important;
}

@media (max-width: 600px) {

    .titlewhys-prelim-handoff {
        padding: 20px 16px;
    }

    .titlewhys-prelim-handoff-button {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}


/* =========================================================
   Prelim IQ — Standard Title & Escrow Requirements Accordion
   ========================================================= */

.titlewhys-prelim-standard-requirements {
    margin: 24px 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.titlewhys-prelim-standard-requirements summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    color: #14233b;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.titlewhys-prelim-standard-requirements summary::-webkit-details-marker {
    display: none;
}

.titlewhys-prelim-standard-requirements summary::after {
    content: "⌄";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #14233b;
    font-size: 24px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.titlewhys-prelim-standard-requirements[open] summary::after {
    transform: rotate(180deg);
}

.titlewhys-prelim-standard-requirements summary:hover {
    background: #edf2f7;
}

.titlewhys-prelim-standard-requirements summary:focus-visible {
    outline: 3px solid #64748b;
    outline-offset: -3px;
}

.titlewhys-prelim-standard-requirements > p,
.titlewhys-prelim-standard-requirements > ul {
    margin: 16px 20px;
}

.titlewhys-prelim-standard-requirements li {
    margin-bottom: 18px;
    line-height: 1.6;
}

@media (max-width: 600px) {

    .titlewhys-prelim-standard-requirements summary {
        padding: 15px;
        font-size: 15px;
    }
}


/* =========================================================
   Prelim IQ — Action Checklist
   ========================================================= */

.titlewhys-prelim-checklist {
    margin: 32px 0;
}

.titlewhys-checklist-actions {
    display: flex;
    justify-content: flex-end;
    margin: 18px 0;
}

.titlewhys-checklist-print-button {
    padding: 12px 22px;
    background: #456fa8;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.titlewhys-checklist-document {
    padding: 28px;
    background: #ffffff;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
}

.titlewhys-checklist-document h2 {
    margin: 0 0 12px;
    color: #14233b;
    font-size: 26px;
}

.titlewhys-checklist-document h3 {
    margin: 28px 0 16px;
    padding: 12px 16px;
    background: #edf2f7;
    border-left: 4px solid #64748b;
    border-radius: 4px;
    color: #14233b;
    font-size: 18px;
}

.titlewhys-checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.titlewhys-checklist-items li {
    margin: 0 0 16px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.titlewhys-checklist-items label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #14233b;
}

.titlewhys-checklist-items input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #14233b;
}

.titlewhys-checklist-items p {
    margin: 10px 0 10px 32px;
    line-height: 1.6;
    color: #475569;
}

.titlewhys-checklist-items small {
    display: block;
    margin-left: 32px;
    color: #64748b;
    font-size: 13px;
}

.titlewhys-checklist-notice {
    margin-top: 24px;
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 3px solid #94a3b8;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 600px) {

    .titlewhys-checklist-document h2 {
        font-size: 20px;
        line-height: 1.25;
    }

    .titlewhys-checklist-document h3 {
        font-size: 15px;
        line-height: 1.3;
        padding: 10px 12px;
        margin: 22px 0 14px;
    }

    .titlewhys-checklist-items p,
    .titlewhys-checklist-items small {
        margin-left: 0;
    }

    .titlewhys-checklist-actions {
        justify-content: stretch;
    }

    .titlewhys-checklist-print-button {
        width: 100%;
    }

    .titlewhys-checklist-document {
        padding: 14px;
    }

    .titlewhys-checklist-items li {
        padding: 14px 12px;
    }

    .titlewhys-checklist-items label {
        gap: 10px;
    }

    #titlewhys-analyze-another {
        width: 100%;
        box-sizing: border-box;
    }
}


/* =========================================================
   Prelim IQ — Expandable Action Checklist
   ========================================================= */

.titlewhys-prelim-checklist-toggle {
    margin: 24px 0;
    border: 1px solid #d9e1eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.titlewhys-prelim-checklist-toggle > summary {
    display: block;
    position: relative;
    padding: 20px 52px 20px 22px;
    background: #17365d;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.titlewhys-prelim-checklist-toggle > summary::-webkit-details-marker {
    display: none;
}

.titlewhys-prelim-checklist-toggle > summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    font-weight: 400;
    color: #d5ad61;
}

.titlewhys-prelim-checklist-toggle[open] > summary::after {
    content: "−";
}

.titlewhys-prelim-checklist-toggle > .titlewhys-prelim-checklist {
    padding: 22px;
}

.titlewhys-prelim-checklist-toggle > summary:focus-visible {
    outline: 3px solid #d5ad61;
    outline-offset: -3px;
}

@media (max-width: 600px) {

    .titlewhys-prelim-checklist-toggle > summary {
        padding: 15px 44px 15px 16px;
        font-size: 16px;
        line-height: 1.3;
    }

    .titlewhys-prelim-checklist-toggle > summary::after {
        right: 16px;
        font-size: 22px;
    }

    .titlewhys-prelim-checklist-toggle > .titlewhys-prelim-checklist {
        padding: 12px;
    }
}


/* =========================================================
   Prelim IQ — Review Another Prelim
   ========================================================= */

#titlewhys-analyze-another {
    padding: 12px 22px;
    background: #ffffff;
    color: #17304d;
    border: 2px solid #17304d;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

#titlewhys-analyze-another:hover,
#titlewhys-analyze-another:focus {
    background: #17304d;
    color: #ffffff;
}


/* =========================================================
   Prelim IQ — Questions & Next Steps
   ========================================================= */

.titlewhys-prelim-next-steps {
    border-left: 4px solid #b48a43;
}

.titlewhys-prelim-next-steps ol {
    margin: 0;
    padding-left: 26px;
}

.titlewhys-prelim-next-steps li {
    margin-bottom: 14px;
    padding-left: 6px;
    line-height: 1.65;
}

.titlewhys-prelim-next-steps li:last-child {
    margin-bottom: 0;
}

.titlewhys-prelim-next-steps li::marker {
    color: #17304d;
    font-weight: 700;
}


/* =========================================================
   Prelim IQ — Hide Back-to-Top on Mobile
   ========================================================= */

@media (max-width: 767px) {
    #ast-scroll-top {
        display: none !important;
    }
}