:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #172b4d;
    --muted: #64748b;
    --background: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    padding: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 800;
    color: var(--text);
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 24px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hero {
    max-width: 850px;
    margin: 100px auto 70px;
    padding: 0 24px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero p {
    color: var(--muted);
    font-size: 18px;
}

.search-panel {
    margin-top: 36px;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
}

.search-input {
    display: block;
    width: 100%;
    padding: 18px;
    border: none;
    outline: none;
    font: inherit;
    font-size: 17px;
    resize: vertical;
    min-height: 95px;
}

.button {
    display: inline-block;
    padding: 13px 24px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-actions {
    display: flex;
    justify-content: flex-end;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1050px;
    margin: 60px auto;
    padding: 0 24px;
}

.feature-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.feature-card h3 {
    margin-top: 0;
}

.feature-card p {
    color: var(--muted);
}

.site-footer {
    margin-top: 100px;
    padding: 30px 24px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 700px) {
    .site-header {
        padding: 18px;
    }

    .site-nav {
        gap: 12px;
        font-size: 14px;
    }

    .hero {
        margin-top: 65px;
    }

    .features {
        grid-template-columns: 1fr;
    }
}

/* CIScope assessment results */

.assessment-result {
    margin-top: 28px;
    padding: 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-align: left;
    color: #172b4d;
}

.assessment-result[hidden],
.assessment-result [hidden] {
    display: none !important;
}

.assessment-result h2 {
    font-size: 23px;
    line-height: 1.3;
    margin: 0 0 16px;
    color: #172b4d;
}

#result-status {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 16px;
}

#result-explanation {
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 20px;
}

#result-review-warning {
    background: #fffbeb;
    border-left: 4px solid #d97706;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 20px 0;
    color: #92400e;
}

#result-review-warning strong {
    display: block;
    font-size: 15px;
    margin-bottom: 8px;
}

#result-review-warning p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

#result-sources {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    margin-top: 24px;
}

#result-sources h3 {
    font-size: 16px;
    margin: 0 0 14px;
    color: #172b4d;
}

#result-sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#result-sources-list li {
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
    font-size: 13px;
    line-height: 1.6;
}

#result-sources-list li::before {
    content: "↗";
    position: absolute;
    left: 0;
    color: #2563eb;
}

#result-sources-list a {
    color: #2563eb;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#result-sources-list a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .assessment-result {
        padding: 20px 16px;
        margin-top: 20px;
    }

    .assessment-result h2 {
        font-size: 20px;
    }
}

/* CIScope mobile refinements */

@media (max-width: 600px) {

    .site-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        padding: 16px;
    }

    .site-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
    }

    .hero h1 {
        line-height: 1.2;
    }

    .search-panel {
        width: 100%;
    }

    .search-actions {
        display: flex;
        width: 100%;
    }

    .search-actions .button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .assessment-result {
        padding: 20px 16px;
    }

    #result-status,
    #result-explanation {
        line-height: 1.75;
    }

    #result-sources-list li {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 14px;
    }

    #result-sources-list a {
        display: inline-block;
        padding: 3px 0;
    }
}
