
/* =========================================
   FIND MY DOG — SCOPED STYLES
   ========================================= */

.fmd-page {
    --fmd-green: #263E32;
    --fmd-cream: #F7F5EF;
    --fmd-sand: #D9C9AD;
    --fmd-text: #34332F;
    color: var(--fmd-text);
    background: #FFFFFF;
}

.fmd-page *,
.fmd-page *::before,
.fmd-page *::after {
    box-sizing: border-box;
}

.fmd-page [hidden] {
    display: none !important;
}

.fmd-container {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

.fmd-eyebrow {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.5;
    text-transform: uppercase;
}

/* HERO */

.fmd-hero {
    padding: 90px 0;
    background: var(--fmd-green);
    color: #FFFFFF;
    text-align: center;
}

.fmd-hero .fmd-container {
    max-width: 800px;
}

.fmd-hero .fmd-eyebrow {
    color: var(--fmd-sand);
}

.fmd-hero h1 {
    margin: 0 0 22px;
    font-family: Georgia, serif;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.12;
    letter-spacing: -1px;
}

.fmd-hero h1 em {
    color: var(--fmd-sand);
    font-weight: 400;
}

.fmd-hero p:not(.fmd-eyebrow) {
    max-width: 610px;
    margin: 0 auto 28px;
    font-size: 16px;
    line-height: 1.8;
}

.fmd-hero-link {
    display: inline-flex;
    padding: 13px 24px;
    background: #FFFFFF;
    border-radius: 7px;
    color: var(--fmd-green);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

/* QUIZ AREA */

.fmd-section {
    padding: 75px 0 90px;
    background: var(--fmd-cream);
}

.fmd-quiz {
    width: min(760px, 100%);
    min-width: 0;
    margin: 0 auto;
    padding: 38px;
    background: #FFFFFF;
    border: 1px solid #E9E3D8;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(38,62,50,.06);
}

.fmd-quiz-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 13px;
    color: var(--fmd-green);
    font-size: 12px;
    font-weight: 700;
}

.fmd-progress {
    height: 7px;
    margin-bottom: 38px;
    overflow: hidden;
    border-radius: 999px;
    background: #E9ECE6;
}

.fmd-progress-fill {
    width: 11%;
    height: 100%;
    border-radius: inherit;
    background: var(--fmd-green);
    transition: width .2s ease;
}

/* QUESTION */

.fmd-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.fmd-question {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    font-family: Georgia, serif;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    color: var(--fmd-green);
}

.fmd-help {
    margin: 0 0 30px;
    font-size: 15px;
    line-height: 1.7;
    color: #66645D;
}

.fmd-options {
    display: grid;
    gap: 13px;
}

.fmd-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    min-height: 62px;
    padding: 17px 19px;
    border: 1px solid #E3E2DB;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--fmd-text);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.fmd-option:hover {
    border-color: var(--fmd-green);
    background: #F9FAF7;
}

.fmd-option:has(input:checked) {
    border-color: var(--fmd-green);
    background: #EDF3EC;
}

.fmd-option:focus-within {
    outline: 2px solid var(--fmd-green);
    outline-offset: 3px;
}

.fmd-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.fmd-option-marker {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid #B4B9AF;
    border-radius: 50%;
    background: #FFFFFF;
}

.fmd-option input:checked + .fmd-option-marker {
    border: 6px solid var(--fmd-green);
}

.fmd-option-text {
    min-width: 0;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.fmd-error {
    margin: 16px 0 0;
    color: #A12828;
    font-size: 14px;
}

/* NAVIGATION */

.fmd-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
}

.fmd-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 21px;
    border: 1px solid var(--fmd-green);
    border-radius: 7px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.fmd-button-back {
    background: #FFFFFF;
    color: var(--fmd-green);
}

.fmd-button-next,
.fmd-button-restart {
    background: var(--fmd-green);
    color: #FFFFFF;
}

.fmd-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.fmd-button:not(:disabled):hover {
    filter: brightness(1.12);
}

/* RESULTS */

.fmd-results {
    outline: none;
}

.fmd-results > .fmd-eyebrow {
    color: var(--fmd-green);
}

.fmd-results h2 {
    margin: 0 0 16px;
    font-family: Georgia, serif;
    font-size: clamp(29px, 4vw, 40px);
    line-height: 1.2;
    color: var(--fmd-green);
}

.fmd-results-intro {
    margin: 0 0 29px;
    font-size: 15px;
    line-height: 1.75;
}

.fmd-results-grid {
    display: grid;
    gap: 16px;
}

.fmd-result-card {
    min-width: 0;
    padding: 25px;
    border: 1px solid #E2E6DF;
    border-radius: 12px;
    background: #F9FAF7;
}

.fmd-result-label {
    display: inline-block;
    margin-bottom: 13px;
    padding: 7px 10px;
    border-radius: 5px;
    background: #E8EFE5;
    color: var(--fmd-green);
    font-size: 11px;
    font-weight: 700;
}

.fmd-result-card h3 {
    margin: 0 0 11px;
    font-family: Georgia, serif;
    font-size: 25px;
    line-height: 1.25;
    color: var(--fmd-green);
}

.fmd-result-card h4 {
    margin: 18px 0 8px;
    font-size: 14px;
    color: var(--fmd-green);
}

.fmd-result-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

.fmd-result-tradeoff {
    color: #55564F;
}

.fmd-personal-note {
    margin: 20px 0 0;
    padding: 18px;
    border-left: 4px solid var(--fmd-green);
    background: var(--fmd-cream);
    font-size: 14px;
    line-height: 1.7;
}

.fmd-results-note {
    margin: 30px 0;
    padding: 22px;
    border-radius: 10px;
    background: var(--fmd-cream);
}

.fmd-results-note h3 {
    margin: 0 0 10px;
    font-family: Georgia, serif;
    font-size: 22px;
    color: var(--fmd-green);
}

.fmd-results-note p {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
}

/* BOTTOM SECTION */

.fmd-bottom {
    padding: 80px 0;
    text-align: center;
}

.fmd-bottom .fmd-container {
    max-width: 740px;
}

.fmd-bottom .fmd-eyebrow {
    color: var(--fmd-green);
}

.fmd-bottom h2 {
    margin: 0 0 18px;
    font-family: Georgia, serif;
    font-size: clamp(29px, 4vw, 43px);
    line-height: 1.2;
    color: var(--fmd-green);
}

.fmd-bottom p:not(.fmd-eyebrow) {
    margin: 0 0 26px;
    font-size: 16px;
    line-height: 1.75;
}

.fmd-bottom-link {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    padding: 12px 22px;
    border-radius: 7px;
    background: var(--fmd-green);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

/* MOBILE */

@media (max-width: 600px) {
    .fmd-container {
        width: calc(100% - 32px);
    }

    .fmd-hero {
        padding: 62px 0;
    }

    .fmd-hero h1 {
        font-size: 37px;
    }

    .fmd-hero p:not(.fmd-eyebrow) {
        font-size: 15px;
    }

    .fmd-section {
        padding: 35px 0 55px;
    }

    .fmd-quiz {
        padding: 25px 18px;
        border-radius: 12px;
    }

    .fmd-progress {
        margin-bottom: 29px;
    }

    .fmd-question {
        font-size: 25px;
    }

    .fmd-help {
        margin-bottom: 23px;
        font-size: 14px;
    }

    .fmd-option {
        padding: 15px 13px;
        gap: 12px;
    }

    .fmd-option-text {
        font-size: 14px;
    }

    .fmd-navigation {
        gap: 10px;
    }

    .fmd-button {
        padding: 12px 14px;
        font-size: 13px;
    }

    .fmd-result-card {
        padding: 19px;
    }

    .fmd-result-card h3 {
        font-size: 22px;
    }

    .fmd-bottom {
        padding: 55px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fmd-progress-fill {
        transition: none;
    }
}


/* FIND MY DOG — ENHANCED RESULTS */

.fmd-result-facts {
    display: grid;
    gap: 10px;
    margin: 19px 0;
    padding: 17px;
    background: #FFFFFF;
    border: 1px solid #E5E9E2;
    border-radius: 9px;
}

.fmd-result-facts .fmd-fact-row {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.fmd-fact-row strong {
    color: #263E32;
}

.fmd-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 44px;
    margin-top: 23px;
    padding: 12px 17px;

    background: #263E32;
    border-radius: 7px;

    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    text-align: center;

    transition: background-color .2s ease;
}

.fmd-external-link:hover,
.fmd-external-link:focus-visible {
    background: #365645;
    color: #FFFFFF;
}

.fmd-external-link:focus-visible {
    outline: 2px solid #263E32;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .fmd-result-facts {
        padding: 14px;
    }

    .fmd-external-link {
        width: 100%;
    }
}



/* =========================================
   FIND MY DOG — EDITORIAL RESULT CARDS
   ========================================= */

/* Desktop result layout */

@media (min-width: 768px) {

    .fmd-results-grid {
        gap: 20px;
    }

    .fmd-result-card {
        display: grid;
        grid-template-columns: minmax(0, 195px) minmax(0, 1fr);
        column-gap: 22px;
        align-items: start;
        padding: 20px;
    }

    /* Image stays on the left */

    .fmd-breed-image {
        grid-column: 1;
        grid-row: 1 / span 8;

        display: block;
        width: 100%;
        height: 260px;
        margin: 0;

        object-fit: cover;
        object-position: center;
        border-radius: 10px;
        background: #F7F5EF;
    }

    /* Information stays on the right */

    .fmd-result-card > :not(.fmd-breed-image) {
        grid-column: 2;
        min-width: 0;
    }

    .fmd-result-label {
        justify-self: start;
        margin-bottom: 8px;
    }

    .fmd-result-card h3 {
        margin-bottom: 8px;
        font-size: 22px;
    }

    .fmd-result-facts {
        margin: 13px 0;
        padding: 13px;
    }

    .fmd-result-card h4 {
        margin: 10px 0 6px;
    }

    .fmd-external-link {
        justify-self: start;
        margin-top: 15px;
    }
}

/* Mobile — image above information */

@media (max-width: 767px) {

    .fmd-result-card {
        display: block;
        padding: 19px;
    }

    .fmd-breed-image {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: center;

        margin: 0 0 17px;
        border-radius: 10px;
        background: #F7F5EF;
    }

    .fmd-result-card h3 {
        font-size: 22px;
    }

    .fmd-result-facts {
        margin: 15px 0;
    }
}


/* Breed matching explanations */

.fmd-result-why {
    margin: 0 0 14px !important;
    color: #34332F;
    font-size: 14px;
    line-height: 1.7;
}

.fmd-result-caution {
    margin: 0 0 14px !important;
    padding: 12px;
    background: #F7F5EF;
    border-radius: 7px;
    color: #34332F;
    font-size: 13px;
    line-height: 1.7;
}


/* =========================================
   FIND MY DOG — CARE PLANNING NOTICE
   ========================================= */

.fmd-page .fmd-care-notice {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid #D9C9AD;
    border-left: 5px solid #263E32;
    border-radius: 10px;
    background: #F7F5EF;
}

.fmd-care-notice strong {
    display: block;
    margin-bottom: 10px;
    color: #263E32;
    font-size: 16px;
    line-height: 1.4;
}

.fmd-care-notice p {
    margin: 0;
    color: #34332F;
    font-size: 14px;
    line-height: 1.75;
}

@media (max-width: 600px) {
    .fmd-page .fmd-care-notice {
        padding: 17px;
        margin-bottom: 18px;
    }

    .fmd-care-notice strong {
        font-size: 15px;
    }
}

