:root {
    color-scheme: dark;
    --bg: #090913;
    --panel: #141426;
    --panel-2: #1b1b31;
    --border: #292943;
    --text: #f5f5fb;
    --muted: #aaaabe;
    --primary: #7c72ff;
    --accent: #62d9ff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(
            circle at top,
            #1b1743 0,
            var(--bg) 42%
        );
    color: var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    width: min(1120px, calc(100% - 32px));
    margin: auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(9, 9, 19, .82);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-weight: 800;
    font-size: 19px;
    background:
        linear-gradient(
            90deg,
            #9c94ff,
            var(--accent)
        );
    -webkit-background-clip: text;
    color: transparent;
}

nav {
    display: flex;
    gap: 20px;
    color: var(--muted);
}

.hero {
    padding: 86px 0 48px;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: #bdb8ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

h1 {
    max-width: 900px;
    margin: 24px auto 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -.04em;
}

.lead {
    max-width: 760px;
    margin: auto;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.7;
}

.search-card {
    max-width: 760px;
    margin: 42px auto 0;
    padding: 24px;
    background: rgba(20, 20, 38, .92);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 9px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #363652;
    border-radius: 12px;
    background: #0f0f1e;
    color: white;
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: var(--primary);
}

button {
    width: 100%;
    min-height: 52px;
    margin-top: 14px;
    border: 0;
    border-radius: 12px;
    background:
        linear-gradient(
            90deg,
            var(--primary),
            #675cff
        );
    color: white;
    font-size: 16px;
    font-weight: 800;
    opacity: .8;
}

.small {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.section {
    padding: 44px 0 80px;
}

.section h2 {
    font-size: clamp(30px, 4vw, 44px);
    margin-bottom: 26px;
}

.grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card {
    min-height: 170px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
}

.card h3 {
    margin-top: 0;
    font-size: 18px;
}

.card p {
    color: var(--muted);
    line-height: 1.65;
}

footer {
    padding: 28px 0 40px;
    border-top: 1px solid var(--border);
    color: #77778c;
    text-align: center;
}

@media (max-width: 640px) {
    .hero {
        padding-top: 58px;
    }

    nav {
        display: none;
    }

    .search-card {
        padding: 18px;
    }
}

.field {
    margin-bottom: 16px;
}

.optional {
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.status {
    min-height: 22px;
    margin-top: 14px;
    color: var(--muted);
    text-align: center;
}

.results-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.results-head h2 {
    margin-bottom: 6px;
}

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

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.secondary-btn {
    width: auto;
    min-height: 42px;
    margin: 0;
    padding: 0 16px;
    background: var(--panel-2);
    border: 1px solid var(--border);
}

.summary-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    padding: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 14px;
}

.summary-card strong {
    display: block;
    font-size: 26px;
}

.summary-card span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    background: var(--panel);
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
}

th {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.question-cell {
    min-width: 320px;
}

.pill {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    font-size: 12px;
}

.content-box {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(20,20,38,.72);
}

.content-box > h2 {
    margin-top: 0;
}

.content-box > p {
    color: var(--muted);
    line-height: 1.7;
}

.recent-list {
    display: grid;
    gap: 10px;
}

.recent-item {
    width: 100%;
    margin: 0;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--border);
    background: var(--panel);
}

.recent-item strong,
.recent-item span {
    display: block;
}

.recent-item span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 760px) {
    .two-col {
        grid-template-columns: 1fr;
    }

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

    .results-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.tool-hero {
    padding: 64px 0 30px;
}

.tool-hero h1 {
    margin: 22px 0 16px;
    max-width: 900px;
    text-align: left;
    font-size: clamp(38px, 6vw, 68px);
}

.tool-hero .lead {
    margin: 0;
    max-width: 850px;
    text-align: left;
}

.tool-form {
    margin: 34px 0 0;
    max-width: 900px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs a:hover {
    color: var(--text);
}

textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 15px 16px;
    border: 1px solid #363652;
    border-radius: 12px;
    background: #0f0f1e;
    color: white;
    font: inherit;
    line-height: 1.55;
    outline: none;
}

textarea:focus {
    border-color: var(--primary);
}

.result-group {
    margin-bottom: 34px;
}

.result-group > h3 {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 22px;
}

.result-group > h3 span {
    display: inline-flex;
    min-width: 30px;
    min-height: 30px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.cluster-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 16px;
    margin-bottom: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
}

.cluster-number {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--panel-2);
    font-weight: 800;
}

.cluster-card h3 {
    margin: 3px 0 8px;
}

.cluster-card ul {
    margin-bottom: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.8;
}

.risk-card {
    border-color: #473d68;
}

.related-card {
    display: block;
    transition:
        transform .15s ease,
        border-color .15s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: #514a81;
}

@media (max-width: 640px) {
    .tool-hero {
        padding-top: 42px;
    }

    .cluster-card {
        grid-template-columns: 1fr;
    }
}

.brief-box h3 {
    margin-top: 28px;
}

.brief-box h3:first-child {
    margin-top: 0;
}

.brief-section {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

.brief-section h4 {
    margin: 0 0 10px;
}

.brief-section ul,
.faq-code-box ul,
.card ul {
    color: var(--muted);
    line-height: 1.7;
}

.faq-code-box {
    margin-top: 24px;
}

.table-wrap a {
    color: #aaa4ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
