:root {
    --navy: #1e3a5f;
    --teal: #4a9cb8;
    --orange: #e67e22;
    --green: #27ae60;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --bg: #0f172a;
    --surface: #111827;
    --surface-alt: #0b1220;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at top, #111827 0%, #0f172a 45%, #0b1220 100%);
    color: var(--text);
    line-height: 1.6;
}

.tool-header {
    background: rgba(10, 16, 30, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.tool-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
}

.brand-sub {
    font-size: 12px;
    color: var(--muted);
}

.build-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    color: #94a3b8;
    border: 1px solid #1f2a3d;
    border-radius: 4px;
    padding: 2px 8px;
    background: rgba(15, 23, 42, 0.6);
}

.header-cta {
    text-decoration: none;
    background: #2563eb;
    color: var(--white);
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.tool-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.intro h1 {
    font-size: 32px;
    color: #f8fafc;
    margin-bottom: 12px;
}

.intro p {
    max-width: 720px;
    color: var(--muted);
}

.progress {
    margin: 32px 0 24px;
}

.progress-track {
    height: 6px;
    background: #1f2937;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--teal);
    transition: width 0.2s ease;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.progress-step.active {
    color: #e2e8f0;
    font-weight: 600;
}

.form-card,
.results {
    background: var(--surface);
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 28px;
    box-shadow: 0 12px 30px rgba(5, 10, 20, 0.45);
}

.form-card + .form-card {
    margin-top: 24px;
}

.form-card h2,
.results h2 {
    color: #f8fafc;
    font-size: 20px;
    margin-bottom: 12px;
}

.helper-text {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 16px;
}

label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--muted);
    gap: 8px;
}

input,
select,
textarea {
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #263245;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #0f172a;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #0b1220;
    border: 1px solid #1f2a3d;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text);
}

.checkbox-item.inline {
    background: none;
    border: none;
    padding: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.btn {
    border: none;
    border-radius: 4px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn.primary {
    background: #2563eb;
    color: var(--white);
}

.btn.ghost {
    background: transparent;
    border: 1px solid #2a3a52;
    color: #cbd5f5;
}

.results {
    margin-top: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.results-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 18px;
    background: var(--surface-alt);
    margin-bottom: 16px;
}

.results-card h3 {
    color: #e2e8f0;
    margin-bottom: 12px;
    font-size: 16px;
}

.profile-box {
    background: #0b1220;
    border-left: 4px solid var(--teal);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.profile-box h3 {
    color: #cbd5f5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    font-size: 13px;
    color: #cbd5f5;
}

.profile-grid strong {
    color: #e2e8f0;
}

.framework-list {
    list-style: none;
}

.framework-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid #1f2a3d;
    font-size: 13px;
}

.framework-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--teal);
    border-radius: 3px;
    background: #0b2230;
}

.framework-list li.checked::before {
    background: var(--teal);
}

.framework-list li.checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    width: 10px;
    height: 5px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(-45deg);
}

.framework-list small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
}

.checklist-item {
    padding: 12px 0 12px 32px;
    border-bottom: 1px solid #1f2a3d;
    position: relative;
}

.checklist-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 20px;
    height: 20px;
    border: 2px solid #334155;
    border-radius: 3px;
}

.checklist-item.gap {
    background: #2a1b12;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 48px;
    padding-right: 16px;
    border-left: 3px solid var(--orange);
}

.checklist-item.gap::before {
    left: 16px;
    border-color: var(--orange);
}

.checklist-item h4 {
    font-size: 14px;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.checklist-item p {
    font-size: 12px;
    color: var(--muted);
}

.gap-indicator {
    display: inline-block;
    background: var(--orange);
    color: var(--white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 600;
}

.penalty {
    font-size: 11px;
    color: #f87171;
    margin-top: 4px;
}

.source {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.turnstile-widget {
    margin: 16px 0;
}

.message {
    display: none;
    padding: 10px 12px;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 13px;
}

.message.success {
    display: block;
    background: #0f2f20;
    color: #6ee7b7;
    border: 1px solid #1f5f3f;
}

.message.error {
    display: block;
    background: #3a1212;
    color: #fca5a5;
    border: 1px solid #7f1d1d;
}

.disclaimer {
    margin-top: 24px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 720px) {
    .tool-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-header {
        align-items: flex-start;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
