/**
 * Quiz Builder - Frontend Styles
 * Modern, responsive design for quiz interface
 */

/* Quiz Container */
.fmm-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

.quiz-description {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
    color: #666;
}

/* Progress Bar */
.quiz-progress-container {
    margin-bottom: 40px;
}

.quiz-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.quiz-progress-text {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

/* Quiz Question */
.quiz-question {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-header {
    margin-bottom: 30px;
}

.question-text {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.question-text .required {
    color: #f44336;
    margin-left: 5px;
}

.question-body {
    margin-bottom: 30px;
}

/* Error Message */
.quiz-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ef9a9a;
    animation: shake 0.5s ease-in-out;
}

.quiz-error .material-icons {
    color: #c62828;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Answer Options */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.answer-option:hover {
    border-color: #4CAF50;
    background: #f1f8f4;
    transform: translateX(5px);
}

.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.answer-option input[type="radio"]:checked~.option-text,
.answer-option input[type="checkbox"]:checked~.option-text {
    font-weight: 600;
    color: #4CAF50;
}

.option-text {
    font-size: 1.1em;
    color: #333;
    flex: 1;
}

/* Slider */
.answer-slider {
    padding: 20px 0;
}

.slider-input {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-value {
    text-align: center;
    margin-top: 15px;
}

.value-display {
    font-size: 1.5em;
    font-weight: 600;
    color: #4CAF50;
}

/* Text Input */
.answer-text input {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.answer-text input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Navigation Buttons */
.question-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.question-navigation .btn {
    padding: 12px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #4CAF50;
    color: #fff;
    margin-left: auto;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #757575;
    color: #fff;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: #fff;
    margin-left: auto;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

/* Loading Overlay */
.quiz-loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.quiz-loading p {
    font-size: 1.2em;
    color: #666;
}

.fmm-quiz-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-intro {
    font-size: 1.2em;
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.products-comparison {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.product-card-featured {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
    min-width: 500px;
}

.match-score {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.score-value {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
}

.score-label {
    display: block;
    font-size: 0.8em;
    opacity: 0.9;
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 10px;
}

.product-name a {
    color: #333;
    text-decoration: none;
}

.product-name a:hover {
    color: #4CAF50;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.match-breakdown {
    margin: 15px 0;
}

.toggle-breakdown {
    background: none;
    border: none;
    color: #4CAF50;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
    font-size: 0.9em;
}

.breakdown-details {
    margin-top: 10px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.breakdown-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breakdown-details li {
    padding: 5px 0;
    font-size: 0.9em;
}

.product-price {
    font-size: 1.5em;
    font-weight: 700;
    color: #4CAF50;
    margin: 15px 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
    padding-top: 15px;
}

.product-actions .btn {
    flex: 1 1 auto;
    padding: 10px 5px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: normal;
    line-height: 1.2;
}

.results-actions {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Comparison Table */
.comparison-table-container {
    margin-top: 40px;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
    .quiz-question {
        padding: 25px 20px;
    }

    .question-text {
        font-size: 1.2em;
    }

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

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
        flex: none;
        white-space: normal;
        font-size: 0.9em;
        padding: 10px;
    }

    .results-actions {
        flex-direction: column;
    }

    .match-score {
        padding: 5px 10px;
        top: 10px;
        right: 10px;
    }

    .score-value {
        font-size: 1.2em;
    }

    .score-label {
        font-size: 0.7em;
    }
}

@media (max-width: 480px) {
    .match-score {
        padding: 4px 8px;
    }

    .score-value {
        font-size: 1em;
    }
}

/* NDCG preset quizzes ----------------------------------------------------- */
.ndcg-quiz-shell,
.ndcg-result-shell {
    --ndcg-ink: #111827;
    --ndcg-deep: #002b5b;
    --ndcg-green: #169bd5;
    --ndcg-lime: #169bd5;
    --ndcg-cream: #f3f8fc;
    --ndcg-soft: #f7fafc;
    --ndcg-line: #e5e7eb;
    --ndcg-muted: #4b5563;
    max-width: 1160px;
    margin: 18px auto 64px;
    color: var(--ndcg-ink);
    font-family: inherit;
}

.ndcg-quiz-shell [hidden],
.ndcg-result-shell [hidden],
.ndcg-guide-modal[hidden] {
    display: none !important;
}

.ndcg-quiz-intro {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, .75fr);
    gap: 48px;
    min-height: 560px;
    padding: 64px;
    overflow: hidden;
    border: 1px solid rgba(0, 43, 91, .08);
    border-radius: 28px;
    background:
        radial-gradient(circle at 84% 16%, rgba(22, 155, 213, .16), transparent 30%),
        linear-gradient(135deg, #fff 0%, #f3f8fc 100%);
    box-shadow: 0 24px 70px rgba(0, 43, 91, .1);
}

.ndcg-intro-copy {
    position: relative;
    z-index: 2;
    align-self: center;
}

.ndcg-eyebrow,
.ndcg-question-kicker,
.ndcg-result-code {
    margin-bottom: 14px;
    color: var(--ndcg-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ndcg-quiz-intro h1,
.ndcg-result-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--ndcg-deep);
    font-size: clamp(38px, 5.2vw, 68px);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.ndcg-intro-text {
    max-width: 700px;
    margin: 25px 0 0;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.65;
}

.ndcg-intro-points {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.ndcg-intro-points li {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    color: #111827;
    font-size: 15px;
    line-height: 1.45;
}

.ndcg-check {
    display: inline-grid;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--ndcg-green);
    color: #fff;
    font-size: 13px;
}

.ndcg-intro-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 34px;
}

.ndcg-intro-meta {
    color: var(--ndcg-muted);
    font-size: 13px;
}

.ndcg-intro-visual {
    position: relative;
    min-height: 380px;
    align-self: center;
}

.ndcg-orbit {
    position: absolute;
    border: 1px solid rgba(22, 155, 213, .25);
    border-radius: 50%;
}

.ndcg-orbit-one {
    inset: 10% -24% 4% -5%;
}

.ndcg-orbit-two {
    inset: 24% -6% 18% 8%;
}

.ndcg-visual-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 154px;
    height: 154px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 10px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: var(--ndcg-deep);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 78px;
    box-shadow: 0 28px 55px rgba(0, 43, 91, .22);
}

.ndcg-visual-label {
    position: absolute;
    right: 2%;
    bottom: 14%;
    padding: 12px 16px;
    border-radius: 13px;
    background: var(--ndcg-lime);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.25;
    text-transform: uppercase;
    transform: rotate(-4deg);
}

.ndcg-btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ndcg-btn:hover {
    transform: translateY(-1px);
}

.ndcg-btn-primary {
    border-color: var(--ndcg-green);
    background: var(--ndcg-green);
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(22, 155, 213, .2);
}

.ndcg-btn-primary:hover {
    border-color: #0f7fb5;
    background: #0f7fb5;
    box-shadow: 0 14px 28px rgba(15, 127, 181, .24);
}

.ndcg-btn-secondary {
    border-color: var(--ndcg-deep);
    background: transparent;
    color: var(--ndcg-deep) !important;
}

.ndcg-btn-secondary:hover,
.ndcg-btn-back:hover {
    background: #f3f8fc;
}

.ndcg-btn-back {
    border-color: var(--ndcg-line);
    background: #fff;
    color: var(--ndcg-ink) !important;
}

.ndcg-quiz-flow {
    max-width: 920px;
    margin: 0 auto;
}

.ndcg-progress-row {
    margin-bottom: 18px;
}

.ndcg-progress-label {
    margin-bottom: 10px;
    color: var(--ndcg-muted);
    font-size: 13px;
}

.ndcg-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 99px;
    background: #e5e7eb;
}

.ndcg-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ndcg-deep), var(--ndcg-lime));
    transition: width .3s ease;
}

.ndcg-question {
    padding: 50px;
    border: 1px solid rgba(0, 43, 91, .09);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 58px rgba(0, 43, 91, .09);
    animation: ndcgFade .25s ease;
}

@keyframes ndcgFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ndcg-question-header {
    max-width: 760px;
    margin-bottom: 30px;
}

.ndcg-question-header h2 {
    margin: 0;
    color: var(--ndcg-deep);
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.ndcg-question-header p {
    margin: 13px 0 0;
    color: var(--ndcg-muted);
    font-size: 14px;
    line-height: 1.55;
}

.ndcg-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ndcg-answer {
    position: relative;
    display: block;
    min-height: 92px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.ndcg-answer input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ndcg-answer-copy {
    display: flex;
    height: 100%;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 42px 18px 18px;
    border: 1.5px solid var(--ndcg-line);
    border-radius: 14px;
    background: #fff;
    color: #111827;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.ndcg-answer:hover .ndcg-answer-copy {
    border-color: #169bd5;
    transform: translateY(-1px);
}

.ndcg-answer-letter {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: var(--ndcg-cream);
    color: var(--ndcg-green);
    font-size: 12px;
    font-weight: 800;
}

.ndcg-answer-text {
    font-size: 15px;
    line-height: 1.45;
}

.ndcg-answer-control {
    position: absolute;
    z-index: 2;
    top: 20px;
    right: 18px;
    width: 20px;
    height: 20px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    background: #fff;
}

.ndcg-answers.is-multiple .ndcg-answer-control {
    border-radius: 6px;
}

.ndcg-answer.is-selected .ndcg-answer-copy,
.ndcg-answer input:checked ~ .ndcg-answer-copy {
    border-color: var(--ndcg-green);
    background: #f3f8fc;
}

.ndcg-answer.is-selected .ndcg-answer-control,
.ndcg-answer input:checked + .ndcg-answer-control {
    border-color: var(--ndcg-green);
    background: var(--ndcg-green);
    box-shadow: inset 0 0 0 4px #fff;
}

.ndcg-guide-link {
    margin-top: 18px;
    padding: 0;
    border: 0;
    border-bottom: 1px dashed currentColor;
    background: transparent;
    color: var(--ndcg-green);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ndcg-question-error {
    margin: 18px 0 0;
    color: #ff2d2d;
    font-size: 14px;
    font-weight: 700;
}

.ndcg-question-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.ndcg-quiz-loading {
    max-width: 760px;
    margin: 0 auto;
    padding: 80px 30px;
    border-radius: 24px;
    background: var(--ndcg-soft);
    text-align: center;
}

.ndcg-loader {
    width: 58px;
    height: 58px;
    margin: 0 auto 22px;
    border: 5px solid #e5e7eb;
    border-top-color: var(--ndcg-green);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.ndcg-quiz-loading h2 {
    margin: 0 0 8px;
    color: var(--ndcg-deep);
}

.ndcg-quiz-loading p,
.ndcg-quiz-disclaimer {
    color: var(--ndcg-muted);
}

.ndcg-quiz-disclaimer {
    max-width: 760px;
    margin: 22px auto 0;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.ndcg-guide-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.ndcg-guide-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 43, 91, .66);
}

.ndcg-guide-card {
    position: relative;
    z-index: 2;
    width: min(620px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 38px;
    border-radius: 22px;
    background: #fff;
    color: #111827;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .26);
}

.ndcg-guide-card h2 {
    margin: 0 0 16px;
    color: var(--ndcg-deep);
    font-size: 30px;
}

.ndcg-guide-card p,
.ndcg-guide-card li {
    font-size: 15px;
    line-height: 1.6;
}

.ndcg-guide-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f3f8fc;
    color: var(--ndcg-deep);
    font-size: 24px;
    cursor: pointer;
}

body.ndcg-modal-open {
    overflow: hidden;
}

/* Results */
.ndcg-result-hero {
    padding: 58px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 90% 0, rgba(22, 155, 213, .28), transparent 32%),
        var(--ndcg-deep);
    color: #fff;
}

.ndcg-result-hero .ndcg-result-code {
    color: #fff;
}

.ndcg-result-hero h1 {
    color: #fff;
}

.ndcg-result-composition {
    max-width: 760px;
    margin: 22px 0 0;
    color: #eaf6fc;
    font-size: 18px;
    line-height: 1.55;
}

.ndcg-result-commercial {
    display: inline-flex;
    margin: 22px 0 0;
    padding: 9px 13px;
    border-radius: 9px;
    background: var(--ndcg-lime);
    color: #fff;
    font-weight: 800;
}

.ndcg-result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    margin-top: 28px;
}

.ndcg-result-explanation,
.ndcg-result-summary {
    padding: 34px;
    border: 1px solid var(--ndcg-line);
    border-radius: 20px;
    background: #fff;
}

.ndcg-result-explanation p {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.7;
}

.ndcg-result-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--ndcg-cream);
}

.ndcg-summary-mark {
    display: grid;
    width: 66px;
    height: 66px;
    margin-bottom: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--ndcg-deep);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 36px;
}

.ndcg-result-summary strong {
    color: var(--ndcg-deep);
    font-size: 20px;
}

.ndcg-result-summary span {
    margin-top: 10px;
    color: var(--ndcg-muted);
    font-size: 14px;
    line-height: 1.55;
}

.ndcg-safety-note {
    display: grid;
    gap: 5px;
    margin: 24px 0;
    padding: 17px 18px;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    background: #fff8e6;
    color: #694e13;
}

.ndcg-safety-note.is-review {
    border-left-color: #169bd5;
    background: #f3f8fc;
    color: #002b5b;
}

.ndcg-safety-note.is-stop {
    border-left-color: #ff2d2d;
    background: #fff0ef;
    color: #77332d;
}

.ndcg-safety-note span {
    font-size: 14px;
    line-height: 1.5;
}

.ndcg-result-notice {
    margin-top: 24px !important;
    padding-top: 18px;
    border-top: 1px solid var(--ndcg-line);
    color: var(--ndcg-muted) !important;
    font-size: 13px !important;
}

.ndcg-result-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 18px;
    margin-top: 28px;
}

.ndcg-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ndcg-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(0, 43, 91, .08);
}

.ndcg-product-badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    padding: 7px 10px;
    border-radius: 8px;
    background: var(--ndcg-lime);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.ndcg-product-image {
    display: block;
    aspect-ratio: 1 / .82;
    overflow: hidden;
    background: var(--ndcg-soft);
}

.ndcg-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

.ndcg-product-card:hover .ndcg-product-image img {
    transform: scale(1.025);
}

.ndcg-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.ndcg-product-body h2 {
    margin: 0;
    color: var(--ndcg-deep);
    font-size: 19px;
    line-height: 1.3;
}

.ndcg-product-body h2 a {
    color: inherit;
    text-decoration: none;
}

.ndcg-product-price {
    margin-top: 16px;
    color: #ff2d2d;
    font-size: 22px;
    font-weight: 800;
}

.ndcg-product-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: auto;
    padding-top: 22px;
}

.ndcg-product-actions .ndcg-btn:only-child {
    grid-column: 1 / -1;
}

.ndcg-secondary-action {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
    padding: 25px 28px;
    border: 1px solid var(--ndcg-line);
    border-radius: 17px;
    background: var(--ndcg-cream);
}

.ndcg-secondary-action div {
    display: grid;
    gap: 4px;
}

.ndcg-secondary-action strong {
    color: var(--ndcg-deep);
    font-size: 18px;
}

.ndcg-secondary-action span {
    color: var(--ndcg-muted);
    font-size: 14px;
}

.ndcg-result-footer {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--ndcg-line);
}

.ndcg-result-footer p {
    max-width: 630px;
    margin: 0;
    color: var(--ndcg-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ndcg-result-footer div {
    display: flex;
    gap: 10px;
}

@media (max-width: 900px) {
    .ndcg-quiz-intro {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 44px;
    }

    .ndcg-intro-visual {
        display: none;
    }

    .ndcg-result-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .ndcg-quiz-shell,
    .ndcg-result-shell {
        margin-top: 0;
    }

    .ndcg-quiz-intro,
    .ndcg-question,
    .ndcg-result-hero {
        padding: 28px 22px;
        border-radius: 18px;
    }

    .ndcg-quiz-intro h1,
    .ndcg-result-hero h1 {
        font-size: 36px;
    }

    .ndcg-intro-text,
    .ndcg-result-composition {
        font-size: 16px;
    }

    .ndcg-intro-actions,
    .ndcg-question-actions,
    .ndcg-result-footer,
    .ndcg-secondary-action {
        align-items: stretch;
        flex-direction: column;
    }

    .ndcg-intro-meta {
        text-align: center;
    }

    .ndcg-answers {
        grid-template-columns: 1fr;
    }

    .ndcg-answer {
        min-height: 76px;
    }

    .ndcg-question-actions .ndcg-btn,
    .ndcg-result-footer .ndcg-btn,
    .ndcg-secondary-action .ndcg-btn {
        width: 100%;
    }

    .ndcg-question-actions .ndcg-btn-primary {
        order: -1;
    }

    .ndcg-result-explanation,
    .ndcg-result-summary,
    .ndcg-guide-card {
        padding: 25px 22px;
    }

    .ndcg-result-footer div {
        flex-direction: column;
        width: 100%;
    }
}

/* Quiz directory */
.ndcg-quiz-directory {
    --ndcg-ink: #111827;
    --ndcg-deep: #002b5b;
    --ndcg-green: #169bd5;
    --ndcg-lime: #169bd5;
    --ndcg-cream: #f3f8fc;
    --ndcg-line: #e5e7eb;
    max-width: 1160px;
    margin: 18px auto 64px;
    color: var(--ndcg-ink);
}

.ndcg-directory-header {
    max-width: 810px;
    margin-bottom: 34px;
}

.ndcg-directory-header h1 {
    margin: 0;
    color: var(--ndcg-deep);
    font-size: clamp(40px, 5vw, 66px);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.03;
}

.ndcg-directory-header p {
    margin: 20px 0 0;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.6;
}

.ndcg-directory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.ndcg-directory-card {
    position: relative;
    display: flex;
    min-height: 390px;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    padding: 38px;
    border: 1px solid var(--ndcg-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(0, 43, 91, .08);
}

.ndcg-directory-card:nth-child(2) {
    background:
        radial-gradient(circle at 100% 0, rgba(22, 155, 213, .16), transparent 35%),
        #f7fafc;
}

.ndcg-directory-number {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
}

.ndcg-directory-icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 28px;
    place-items: center;
    border-radius: 18px;
    background: var(--ndcg-deep);
    color: #fff;
    font-family: Georgia, serif;
    font-size: 28px;
    box-shadow: 0 12px 26px rgba(0, 43, 91, .18);
}

.ndcg-directory-card h2 {
    max-width: 440px;
    margin: 0;
    color: var(--ndcg-deep);
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -.025em;
    line-height: 1.15;
}

.ndcg-directory-card p {
    margin: 16px 0 0;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

.ndcg-directory-meta {
    margin: 24px 0 18px;
    color: var(--ndcg-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ndcg-directory-card .ndcg-btn {
    margin-top: auto;
}

.ndcg-directory-empty {
    padding: 36px;
    border-radius: 18px;
    background: var(--ndcg-cream);
    text-align: center;
}

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

    .ndcg-directory-card {
        min-height: 340px;
        padding: 28px 22px;
        border-radius: 18px;
    }

    .ndcg-directory-header h1 {
        font-size: 38px;
    }
}
