:root {
    --bg: #f3fbf3;
    --surface: #ffffff;
    --primary: #0a8f3d;
    --primary-dark: #06692c;
    --primary-soft: #b9e1c1;
    --text: #12231a;
    --muted: #4f665a;
    --border: #d9eadc;
}

* {
    box-sizing: border-box;
}

body.app-shell {
    margin: 0;
    font-family: "Inter", "Segoe UI", "Roboto", "Arial", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #e4f7e8 0%, var(--bg) 45%, #eef7f0 100%);
    min-height: 100vh;
}

.app-main {
    min-height: 100vh;
}

.page-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(8, 61, 24, 0.08);
}

.hero-card {
    padding: 2.5rem;
}

.kicker {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    font-size: 0.82rem;
}

.hero-title {
    margin-top: 0.5rem;
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    line-height: 1.2;
    font-weight: 800;
}

.hero-subtitle {
    margin-top: 0.9rem;
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 720px;
}

.cta-row {
    margin-top: 1.35rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-primary-soft {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.7rem 1.15rem;
    font-weight: 700;
}

.btn-primary-soft:hover,
.btn-primary-soft:focus {
    color: #fff;
    background: var(--primary-dark);
}

.btn-outline-soft {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary-soft);
    border-radius: 12px;
    padding: 0.7rem 1.15rem;
    font-weight: 700;
}

.steps-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
}

.step-box {
    padding: 1rem;
    border-radius: 16px;
    background: #f8fff9;
    border: 1px solid var(--border);
}

.step-number {
    font-weight: 800;
    color: var(--primary);
}

.app-form-card {
    padding: 1.25rem;
}

.form-header h1 {
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    margin-bottom: 0.2rem;
}

.form-header p {
    color: var(--muted);
}

.question-shell {
    background: linear-gradient(145deg, #cae8cf 0%, #b3d8ba 100%);
    border-radius: 28px;
    padding: 1.4rem;
    border: 1px solid #9dcaab;
}

.test-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.test-side-panel {
    position: sticky;
    top: 1rem;
}

.progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.progress-top .counter {
    font-size: 1.55rem;
    font-weight: 800;
}

.progress {
    height: 10px;
    border-radius: 999px;
    background: #deecdf;
}

.progress-bar {
    background: var(--primary);
}

.question-card {
    background: transparent;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.question-text {
    text-align: center;
    font-size: clamp(1.15rem, 2.3vw, 2.35rem);
    line-height: 1.2;
    font-weight: 800;
    margin-top: 0.4rem;
    margin-bottom: 2rem;
}

.answer-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}

.answer-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.answer-btn .face {
    width: 100%;
    max-width: 90px;
    margin: 0 auto;
    background: #0a8f3d;
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    height: auto;
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.answer-btn .label {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.92rem;
    color: #0f2e1d;
    min-height: 2.6em;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.answer-btn:hover .face {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.answer-btn.active .face {
    background: #055c24;
    outline: 4px solid rgba(255, 255, 255, 0.55);
}

.answer-btn.active .label {
    font-weight: 700;
}

.question-nav {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.question-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 0.45rem;
}

.question-map-btn {
    width: 100%;
    border: 1px solid #cfe2d3;
    background: #ffffff;
    color: #1c3b2a;
    border-radius: 10px;
    padding: 0.35rem 0.2rem;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1;
}

.question-map-btn:hover {
    background: #f0fbf2;
}

.question-map-btn.current {
    border-color: #0a8f3d;
    box-shadow: 0 0 0 2px rgba(10, 143, 61, 0.15);
}

.question-map-btn.answered {
    background: #e6f7ea;
    border-color: #9fd3ac;
    color: #0d5b2b;
}

.question-map-btn.unanswered {
    background: #fff8e9;
    border-color: #f0d59b;
    color: #7e5710;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.8rem;
}

.interest-pill {
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    background: #f7fbf7;
    border: 1px solid var(--border);
}

.score-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}

.score-item {
    display: grid;
    gap: 0.2rem;
}

.score-item-head {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.score-track {
    width: 100%;
    height: 10px;
    background: #e5efe6;
    border-radius: 999px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #0c8f3e, #14b957);
}

.career-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.career-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.85rem;
    background: #fcfffc;
}

.career-card.recommendation-top {
    border-color: #7dc48f;
    background: linear-gradient(180deg, #f4fff6 0%, #ecfbef 100%);
    box-shadow: 0 10px 24px rgba(10, 143, 61, 0.08);
}

.career-card.recommendation-good {
    border-color: #b8ddc1;
    background: linear-gradient(180deg, #fbfffb 0%, #f4fbf5 100%);
}

.career-card.recommendation-alt {
    border-color: #d7deaa;
    background: linear-gradient(180deg, #fffef7 0%, #fbf8e8 100%);
}

.badge-zone {
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    background: #e6f5e8;
    color: var(--primary-dark);
}

.badge-tier {
    border-radius: 999px;
    padding: 0.38rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    line-height: 1;
}

.badge-tier-top {
    background: #0a8f3d;
    color: #fff;
}

.badge-tier-good {
    background: #e6f5e8;
    color: #0b5e29;
    border-color: #b9e1c1;
}

.badge-tier-alt {
    background: #f3f1cf;
    color: #5c6b11;
    border-color: #dde4b2;
}

.keyword-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
    background: #f3faf4;
    border: 1px solid var(--border);
    color: #1f5330;
}

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

.stats-scroll {
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.chart-stack {
    display: grid;
    gap: 0.7rem;
}

.chart-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 56px;
    gap: 0.6rem;
    align-items: center;
}

.chart-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e3b2b;
}

.chart-track {
    height: 12px;
    background: #e7f0e8;
    border-radius: 999px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #0a8f3d, #18bc58);
}

.chart-value {
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0d5b2b;
}

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

    .test-side-panel {
        position: static;
    }

    .answer-scale {
        grid-template-columns: repeat(3, minmax(100px, 1fr));
    }
}

@media (max-width: 680px) {
    .hero-card {
        padding: 1.2rem;
    }

    .question-shell {
        border-radius: 18px;
        padding: 1rem;
    }

    .answer-scale {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .question-text {
        font-size: 1.65rem;
    }
}
