.subject-tool {
    padding: 48px 0 80px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
}

.subject-tool__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px 40px;
}

.hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.8) 0%, rgba(220, 252, 231, 0.6) 100%);
    padding: 36px 48px;
    border-radius: 28px;
    margin-bottom: 44px;
}

.hero__content h1 {
    font-size: 2.7rem;
    margin-bottom: 12px;
    color: #0f172a;
}

.hero__subtitle {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 14px;
}

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    color: #2563eb;
    margin-bottom: 10px;
}

.hero__badges span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
    margin-right: 8px;
}

.rating-snippet {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    align-items: baseline;
    color: #334155;
}

.rating-snippet strong {
    font-size: 1.4rem;
    color: #0f172a;
}

.hero__blurb {
    margin-top: 18px;
    color: #475569;
    line-height: 1.6;
    max-width: 620px;
}

.hero__art img {
    max-width: 320px;
    width: 100%;
}

.layout {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
}

.layout__form {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
    max-height: 80vh;
    overflow-y: auto;
}

.layout__form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}

.btn-default {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.btn[disabled] {
    opacity: 0.5;
    pointer-events: none;
}

.btn.btn-xs {
    padding: 6px 12px;
    font-size: 0.75rem;
}

.form-section {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px 22px;
    display: grid;
    gap: 12px;
}

.form-section h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1f2937;
    margin: 0;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1f2937;
}

.field span {
    color: #dc2626;
    margin-left: 4px;
}

.field input,
.field select {
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    transition: border 0.2s ease;
}

.field input:focus,
.field select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.field small {
    font-size: 0.75rem;
    color: #64748b;
}

.field--inline {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    align-items: end;
}

.field--toggle {
    grid-template-columns: auto auto;
    align-items: center;
}

.layout__results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.results-guidance {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 14px 18px;
    color: #475569;
    font-size: 0.9rem;
}

.results-tabs {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 26px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-button {
    border: none;
    background: #f1f5f9;
    color: #475569;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-button:hover {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.tab-button.is-active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.tabs-body {
    display: grid;
    gap: 12px;
}

.subject-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.subject-chip__text {
    flex: 1;
    font-weight: 600;
    color: #1e293b;
}

.subject-chip__meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

.subject-chip__meta span + span {
    border-left: 1px solid rgba(148, 163, 184, 0.4);
    padding-left: 12px;
}

.subject-chip__actions {
    display: flex;
    gap: 8px;
}

.results-empty {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #475569;
}

.sticky-cta {
    position: sticky;
    bottom: 16px;
    background: #2563eb;
    padding: 18px;
    border-radius: 16px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.25);
}

.sticky-cta__actions {
    display: flex;
    gap: 10px;
}

.sticky-cta .btn-default {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.subject-tool-faq {
    margin-top: 72px;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    border-radius: 28px;
    padding: 40px 48px;
}

.subject-tool-faq h2 {
    font-size: 1.6rem;
    color: #0f172a;
    margin-bottom: 12px;
}

.faq-intro {
    color: #475569;
    margin-bottom: 24px;
    max-width: 720px;
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    background: #fff;
    border-radius: 16px;
    padding: 18px 22px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.faq-item summary {
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    position: relative;
    padding-right: 24px;
    list-style: none;
}

.faq-item summary::marker,
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-weight: 700;
    color: #2563eb;
}

.faq-item[open] summary::after {
    content: '–';
}

.faq-item p {
    margin: 12px 0 0;
    color: #475569;
}

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

    .layout__form {
        max-height: none;
    }

    .results-actions {
        justify-content: center;
    }

    .sticky-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .sticky-cta__actions {
        justify-content: space-between;
    }

    .subject-tool-faq {
        padding: 32px 24px;
    }
}
