:root {
    color-scheme: light;
    --color-sand: #dad7cd;
    --color-sage: #a3b18a;
    --color-fern: #588157;
    --color-hunter: #3a5a40;
    --color-pine: #344e41;

    --text: var(--color-pine);
    --text-light: #5a6a5d;
    --bg: var(--color-sand);
    --bg-light: #f3efe3;
    --surface: #fefcf7;
    --surface-alt: #f5f1e6;
    --accent: var(--color-fern);
    --accent-dark: var(--color-hunter);
    --accent-light: #e3e8d9;
    --muted: var(--color-hunter);
    --border: rgba(52, 74, 65, 0.18);
    --shadow: 0 10px 25px -18px rgba(52, 74, 65, 0.5);
    --shadow-lg: 0 30px 60px -32px rgba(52, 74, 65, 0.4);
    --highlight: rgba(163, 177, 138, 0.22);
    --info: #7da187;
    --warning: #d7b26d;
    --danger: #c1625c;
    --success: var(--color-fern);
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
a {
    color: var(--accent);
    text-decoration: none;
}
a:hover,
a:focus {
    text-decoration: underline;
}
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}
.container {
    width: min(1080px, 90vw);
    margin: 0 auto;
}
.container-fluid {
    width: min(1200px, 94vw);
    margin: 0 auto;
}
.top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
}
.brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.brand a {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
}
.brand span {
    font-size: 0.9rem;
    color: var(--muted);
}
.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 0.75rem;
    padding: 0.45rem;
    cursor: pointer;
    color: var(--text);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}
.menu-toggle svg {
    width: 1.35rem;
    height: 1.35rem;
}
.menu-toggle:hover,
.menu-toggle:focus {
    border-color: var(--accent);
    box-shadow: 0 14px 24px -18px rgba(52, 74, 65, 0.36);
}
.header-search {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    background: #fff;
    box-shadow: var(--shadow);
    flex: 1 1 280px;
    max-width: 380px;
}
.header-search input {
    flex: 1;
    border: none;
    font-size: 0.95rem;
    color: var(--text);
}
.header-search input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}
.header-search input:focus {
    outline: none;
}
.header-search button {
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 0.6rem;
    color: var(--muted);
    cursor: pointer;
}
.header-search button:hover,
.header-search button:focus {
    color: var(--accent);
}
.header-search svg {
    width: 1.1rem;
    height: 1.1rem;
}
nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 500;
}
nav a {
    color: var(--text);
    transition: color 0.2s ease;
}
nav a:hover,
nav a:focus {
    color: var(--accent);
}
.primary-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}
.primary-nav ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 500;
}
.primary-nav a {
    color: var(--text);
    transition: color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav a:focus {
    color: var(--accent);
}
.hero {
    text-align: center;
    padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 3.5rem;
    background: linear-gradient(135deg, rgba(88, 129, 87, 0.32) 0%, rgba(52, 74, 65, 0.54) 100%), url('../images/bernedoodle_meadow.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero h1,
.hero p {
    text-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="3" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="2" fill="white" opacity="0.1"/><circle cx="90" cy="70" r="2.5" fill="white" opacity="0.1"/></svg>');
    background-size: 200px 200px;
    opacity: 0.35;
}
.hero .container {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: clamp(2.25rem, 6vw, 3.35rem);
    margin-bottom: 0.9rem;
    font-weight: 700;
}
.hero p {
    font-size: 1.15rem;
    max-width: 60ch;
    margin: 0 auto 2rem;
    opacity: 0.95;
}
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.85rem;
    border-radius: 0.8rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn-primary {
    background: #fff;
    color: var(--accent);
    box-shadow: var(--shadow-lg);
}
.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(52, 74, 65, 0.28);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.8);
}
.btn-secondary:hover,
.btn-secondary:focus {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px);
}
.section {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}

.section h2 {
    text-align: center;
    font-size: clamp(1.9rem, 4vw, 2.4rem);
    margin-bottom: 2rem;
    color: var(--text);
}

.featured-breeds {
    background: var(--surface);
    padding: clamp(3rem, 6vw, 4rem) 0;
}

.featured-breeds h2 {
    margin-bottom: 3rem;
}

.breed-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.breed-photo-card {
    --card-bg: var(--surface);
    --photo-bg: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --title-color: var(--accent);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    backdrop-filter: hue-rotate(0deg);
}

.skip-to-content {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--primary);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    transition: left 0.2s ease;
    z-index: 1000;
}

.skip-to-content:focus {
    left: 1rem;
}

.breed-photo-card:hover,
.breed-photo-card:focus {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.breed-photo {
    width: 100%;
    height: 220px;
    position: relative;
    background: var(--photo-bg);
    overflow: hidden;
}

.breed-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.breed-photo::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
}

.breed-photo-info {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.86);
}

.breed-photo-info h3 {
    color: var(--title-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.breed-photo-info p {
    color: var(--muted);
    font-size: 0.95rem;
}

.breed-photo-card[data-theme="sunshine"] {
    --card-bg: linear-gradient(135deg, #fdf5dd 0%, #f7e2ae 100%);
    --photo-bg: linear-gradient(135deg, #fff4c7 0%, #f3c366 100%);
    --title-color: #b88616;
}

.breed-photo-card[data-theme="amber"] {
    --card-bg: linear-gradient(135deg, #fde8d1 0%, #f9c89a 100%);
    --photo-bg: linear-gradient(135deg, #fdd8b5 0%, #f79d62 100%);
    --title-color: #b5621f;
}

.breed-photo-card[data-theme="forest"] {
    --card-bg: linear-gradient(135deg, rgba(163, 177, 138, 0.55) 0%, rgba(88, 129, 87, 0.65) 100%);
    --photo-bg: linear-gradient(135deg, rgba(52, 74, 65, 0.28) 0%, rgba(163, 177, 138, 0.48) 100%), url('../images/bernedoodle_meadow.webp');
    --title-color: #2f4f31;
}

.breed-photo-card[data-theme="forest"] .breed-photo {
    background-size: cover;
    background-position: center;
}

.breed-photo-card[data-theme="rose"] {
    --card-bg: linear-gradient(135deg, #fde3ed 0%, #f9b4d0 100%);
    --photo-bg: linear-gradient(135deg, #fcd4e8 0%, #f38cb8 100%);
    --title-color: #b24578;
}

.breed-photo-card[data-theme="sky"] {
    --card-bg: linear-gradient(135deg, #e1f1fb 0%, #b9dff5 100%);
    --photo-bg: linear-gradient(135deg, #d1e7f9 0%, #6fb0dd 100%);
    --title-color: #3a6fa3;
}

.breed-photo-card[data-theme="copper"] {
    --card-bg: linear-gradient(135deg, #ffe5d6 0%, #ffc6a8 100%);
    --photo-bg: linear-gradient(135deg, #ffd8be 0%, #ff9f6e 100%);
    --title-color: #bb5a2a;
}

.search-card {
    margin: 3rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(230, 236, 223, 0.96) 100%);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: clamp(1.75rem, 3vw, 2.85rem);
    box-shadow: 0 26px 52px -32px rgba(52, 74, 65, 0.22);
}
.search-card h2 {
    margin-top: 0;
    font-size: 1.75rem;
}
.search-controls {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.search-controls input,
.search-controls select {
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 0.85rem 1.15rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--surface-alt);
}
.search-controls input:focus,
.search-controls select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 129, 87, 0.28);
}
.search-results {
    display: grid;
    gap: 1.5rem;
}
.characteristics-table {
    margin: 3rem 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(232, 236, 223, 0.97) 100%);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: 0 22px 50px -34px rgba(52, 74, 65, 0.2);
    padding: clamp(1.75rem, 3vw, 2.75rem);
}
.table-scroll {
    overflow-x: auto;
}
.characteristics-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 960px;
}
.characteristics-table th,
.characteristics-table td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(58, 90, 64, 0.18);
    font-size: 0.95rem;
}
.characteristics-table thead th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    background: rgba(227, 232, 220, 0.6);
}
.characteristics-table tbody tr:last-child td {
    border-bottom: none;
}
.table-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.table-subtext {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
}
.characteristics-table .pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(163, 177, 138, 0.25);
    border: 1px solid rgba(88, 129, 87, 0.25);
    font-size: 0.8rem;
    color: var(--accent);
    margin: 0.15rem 0.35rem 0.15rem 0;
}
.quiz-card,
.comparison-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(234, 238, 226, 0.97) 100%);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-lg);
}
.quiz-question {
    margin-bottom: 1.75rem;
}
.quiz-question h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}
.quiz-options {
    display: grid;
    gap: 0.85rem;
}
.quiz-option {
    padding: 1rem 1.15rem;
    border-radius: 0.85rem;
    border: 2px solid var(--border);
    background: var(--surface-alt);
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}
.quiz-option:hover,
.quiz-option:focus {
    border-color: var(--accent);
    background: rgba(163, 177, 138, 0.22);
}
.quiz-option.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}
.quiz-results {
    background: var(--surface-alt);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
}
.quiz-results h3 {
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.recommended-breed {
    background: #fff;
    border-radius: 0.85rem;
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    box-shadow: 0 18px 32px -24px rgba(52, 74, 65, 0.2);
    margin-bottom: 1.25rem;
}
.comparison-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}
.comparison-selector label {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease;
}
.comparison-selector input[type="checkbox"] {
    accent-color: var(--accent);
}
.comparison-selector label:hover {
    border-color: var(--accent);
    background: rgba(163, 177, 138, 0.22);
}
.comparison-table {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: #fff;
}
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}
.comparison-table th,
.comparison-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.comparison-table th {
    background: var(--surface-alt);
    font-weight: 700;
}
.comparison-table tbody tr:last-child td {
    border-bottom: none;
}
.hidden {
    display: none !important;
}
.breed-card {
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(244, 246, 238, 0.95) 100%);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.25rem;
    padding: 1.25rem 2rem 1.25rem 0.25rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--card-bg);
    box-shadow: 0 18px 40px -28px rgba(52, 74, 65, 0.35);
    align-items: start;
}
.breed-card:nth-of-type(4n + 1) {
    --card-bg: linear-gradient(135deg, rgba(253, 245, 221, 0.9) 0%, rgba(248, 225, 188, 0.95) 100%);
}
.breed-card:nth-of-type(4n + 2) {
    --card-bg: linear-gradient(135deg, rgba(226, 241, 227, 0.92) 0%, rgba(198, 220, 200, 0.98) 100%);
}
.breed-card:nth-of-type(4n + 3) {
    --card-bg: linear-gradient(135deg, rgba(229, 240, 248, 0.9) 0%, rgba(190, 216, 237, 0.95) 100%);
}
.breed-card:nth-of-type(4n) {
    --card-bg: linear-gradient(135deg, rgba(247, 225, 233, 0.92) 0%, rgba(232, 193, 206, 0.96) 100%);
}
.breed-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0.9rem;
    overflow: hidden;
    background: rgba(163, 177, 138, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(52, 74, 65, 0.08);
}
.breed-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.breed-card__content {
    display: grid;
    gap: 0.65rem;
    margin-left: 1.25rem;
}
.breed-card h3 {
    margin: 0;
    color: var(--accent);
}
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(88, 129, 87, 0.28);
    background: rgba(163, 177, 138, 0.25);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.quick-facts {
    padding: 3rem 0;
}
.quick-facts h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}
.fact-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.fact {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(227, 232, 220, 0.96) 100%);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    padding: 1.25rem;
}
.fact h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}
.intro-section {
    padding: 2rem 0 3rem;
}
.intro-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}
.intro-grid article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}
footer {
    background: var(--text);
    color: #fff;
    padding: 2.5rem 0;
    margin-top: 4rem;
}
footer nav {
    margin-bottom: 1rem;
}
footer nav ul {
    justify-content: center;
    gap: 1.5rem;
}
footer nav a {
    color: #fff;
    font-weight: 500;
}
footer nav a:hover,
footer nav a:focus {
    color: var(--accent-light);
}
footer p {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    margin: 0.75rem 0 0;
}
@media (max-width: 640px) {
    .menu-toggle {
        display: inline-flex;
        order: 2;
    }
    .header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
    }
    .primary-nav {
        order: 4;
        width: 100%;
        display: none;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
        padding-top: 0.75rem;
    }
    .primary-nav.is-open {
        display: block;
    }
    .primary-nav ul {
        flex-direction: column;
        gap: 0.65rem;
        font-size: 0.95rem;
    }
    .primary-nav a {
        display: block;
        padding: 0.35rem 0;
    }
    .search-card {
        padding: 1.5rem;
    }
    .breed-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }
    .breed-card__media {
        max-width: 320px;
        margin: 0 auto;
        aspect-ratio: 16 / 9;
    }
    .breed-card__content {
        margin-left: 0;
    }
    .characteristics-table table {
        min-width: 720px;
    }
    .breed-card__content {
        margin-left: 0;
    }
    .breed-modal {
        padding: 1rem;
        align-items: flex-start;
    }
    .breed-modal__content {
        width: 100%;
        max-height: 90vh;
        border-radius: 1rem;
    }
    .breed-modal__body {
        padding: 1.5rem;
    }
}

@media (max-width: 720px) {
    .top-bar {
        align-items: flex-start;
        padding: 1rem 0 1.25rem;
        gap: 0.75rem;
    }
    .hero {
        padding: 3rem 0 2.25rem;
    }
    .search-card {
        margin: 2.25rem 0;
    }
    .breed-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .search-controls {
        gap: 0.75rem;
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: clamp(1.9rem, 7vw, 2.35rem);
    }
    .hero p {
        font-size: 1rem;
    }
    .section-card {
        padding: 1.5rem;
    }
    .lead {
        font-size: 1.05rem;
    }
}

@media (max-width: 600px) {
    .table-data {
        display: block;
    }
    .table-data tbody {
        display: block;
    }
    .table-data tr {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(94, 107, 123, 0.2);
    }
    .table-data tr:last-child {
        border-bottom: none;
    }
    .table-data th,
    .table-data td {
        display: block;
        width: 100%;
        padding: 0.25rem 0;
        border-bottom: none;
    }
    .table-data th {
        color: var(--text);
        font-size: 0.95rem;
    }
    .table-data td {
        padding-top: 0.1rem;
    }
}

/* Breed page extras */
.breadcrumb {
    margin: 1rem 0 2rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.breadcrumb a {
    color: var(--muted);
}
.lead {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 2rem;
}
.breed-hero {
    margin: 2.5rem 0;
    border-radius: 1.25rem;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}
.breed-hero img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.breed-hero figcaption {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    color: var(--muted);
    background: var(--surface);
}
.grid-two {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.75rem;
}
.section-card h2 {
    margin-top: 0;
    font-size: 1.4rem;
}
.key-points {
    list-style: none;
    padding: 0;
    margin: 0;
}
.key-points li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(94, 107, 123, 0.25);
}
.key-points li:last-child {
    border-bottom: none;
}
.table-data {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 0;
}
.table-data th,
.table-data td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(94, 107, 123, 0.25);
}
.table-data th {
    width: 40%;
    font-weight: 600;
    color: var(--muted);
}
.callout {
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    background: var(--accent-light);
    border-radius: 0.65rem;
}
.related-breeds {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(94, 107, 123, 0.4);
}
.related-breeds ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.related-breeds a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(88, 129, 87, 0.28);
    background: rgba(163, 177, 138, 0.25);
    font-size: 0.95rem;
}

/* Enhanced breed layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 7.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.18);
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.sidebar a {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 0.65rem;
    color: var(--text);
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.sidebar a:hover,
.sidebar a:focus {
    background: var(--accent-light);
    color: var(--accent);
    border-color: rgba(88, 129, 87, 0.35);
}

.sidebar a.active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

.main-content {
    min-width: 0;
}

.personality-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.05rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--accent);
    color: #fff;
}

.badge.secondary {
    background: var(--highlight);
    color: var(--text);
}

.badge.info {
    background: var(--info);
    color: #fff;
}

.did-you-know {
    border-radius: 1rem;
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    margin-bottom: 2.5rem;
    box-shadow: 0 26px 48px -28px rgba(52, 74, 65, 0.4);
}

.did-you-know h3 {
    margin: 0 0 0.75rem;
    font-size: 1.3rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin: 2.5rem 0;
}

.stat-card {
    background: var(--surface);
    border-radius: 0.85rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: 0 18px 35px -28px rgba(15, 23, 42, 0.2);
}

.stat-card .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    padding: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 2.25rem;
    box-shadow: 0 24px 48px -36px rgba(15, 23, 42, 0.18);
}

.section-card h2 {
    color: var(--accent);
}

.activity-panel {
    background: var(--surface-alt);
    border-radius: 0.85rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-top: 1.25rem;
}

.activity-panel h3 {
    margin: 0 0 1rem;
    color: var(--accent);
}

.grooming-calculator {
    background: var(--surface-alt);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 1.75rem;
    border: 1px solid var(--border);
}

.calculator-inputs {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calculator-inputs label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
}

.calculator-inputs input,
.calculator-inputs select {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    background: #fff;
}

.calculate-btn,
.print-btn,
.checklist-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.35rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 22px 36px -22px rgba(52, 74, 65, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculate-btn:hover,
.print-btn:hover,
.checklist-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 44px -28px rgba(52, 74, 65, 0.36);
}

.calculator-result {
    background: #fff;
    border-radius: 0.85rem;
    border-left: 4px solid var(--success);
    padding: 1.5rem;
    box-shadow: 0 22px 45px -32px rgba(15, 23, 42, 0.2);
    margin-top: 1.25rem;
}

.health-callout {
    background: #f3e5d1;
    border-radius: 0.85rem;
    border-left: 4px solid var(--warning);
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.highlight-box {
    background: var(--surface-alt);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.highlight-box.success {
    background: #e8f2ea;
    border-left: 3px solid var(--success);
}

.highlight-box.warning {
    background: #f7eddd;
    border-left: 3px solid var(--warning);
}

.highlight-box.info {
    background: #e1ebe4;
    border-left: 3px solid var(--info);
}

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

.living-card {
    background: var(--surface-alt);
    border-radius: 0.85rem;
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
}

.timeline {
    position: relative;
    margin-top: 2rem;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--warning) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.25rem;
    padding-left: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -0.45rem;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    box-shadow: 0 0 0 4px #fff;
}

.timeline-marker--info {
    background: var(--info);
}

.timeline-marker--warning {
    background: var(--warning);
    color: var(--text);
}

.timeline-marker--success {
    background: var(--success);
}

.timeline-card {
    background: #fff;
    border-radius: 1rem;
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    box-shadow: 0 22px 45px -32px rgba(15, 23, 42, 0.2);
}

.timeline-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    color: var(--accent);
}

.timeline-card--info {
    border-left-color: var(--info);
}

.timeline-card--info h3 {
    color: var(--info);
}

.timeline-card--warning {
    border-left-color: var(--warning);
}

.timeline-card--warning h3 {
    color: var(--warning);
}

.timeline-card--success {
    border-left-color: var(--success);
}

.timeline-card--success h3 {
    color: var(--success);
}

.timeline-card ul {
    margin: 0;
    padding-left: 1.5rem;
    display: grid;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.shopping-section {
    background: var(--surface-alt);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.shopping-category {
    margin-bottom: 1.25rem;
}

.shopping-category h4 {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.45rem;
}

.checklist-items {
    display: grid;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid transparent;
    transition: border 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.checklist-item:hover {
    border-color: rgba(88, 129, 87, 0.42);
    background: var(--accent-light);
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.2rem;
    cursor: pointer;
}

.checklist-item.checked {
    opacity: 0.65;
    background: var(--surface-alt);
}

.checklist-item.checked span:first-of-type {
    text-decoration: line-through;
}

.price-tag {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.progress-shell {
    background: var(--surface-alt);
    border-radius: 999px;
    overflow: hidden;
    height: 22px;
}

#progress-bar {
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.climate-grid {
    display: grid;
    gap: 1.25rem;
}

.climate-grid--spaced {
    margin-top: 1.5rem;
}

.climate-card {
    border-radius: 0.85rem;
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    background: var(--surface);
    border: 1px solid var(--border);
}

.climate-card.cold {
    border-left-color: var(--accent);
}

.climate-card.moderate {
    border-left-color: var(--warning);
}

.climate-card.hot {
    border-left-color: var(--danger);
    background: #f6e4e3;
}

.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 22px 40px -22px rgba(52, 74, 65, 0.34);
    font-size: 1.35rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 50;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 52px -26px rgba(52, 74, 65, 0.36);
}

.breed-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 900;
}

.breed-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.breed-modal__overlay {
    position: absolute;
    inset: 0;
}

.breed-modal__content {
    position: relative;
    max-width: 540px;
    width: min(540px, 94vw);
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 40px 70px -30px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s ease;
    max-height: min(90vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.breed-modal.is-visible .breed-modal__content {
    transform: translateY(0) scale(1);
}

.breed-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.breed-modal__close:hover,
.breed-modal__close:focus {
    color: var(--accent);
}

.breed-modal__media {
    height: clamp(180px, 32vh, 240px);
    background: var(--surface-alt);
    overflow: hidden;
}

.breed-modal__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breed-modal__body {
    padding: 1.75rem;
    display: grid;
    gap: 1rem;
}

.breed-modal__title {
    margin: 0;
    font-size: 1.65rem;
    color: var(--text);
}

.breed-modal__subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0;
}

.breed-modal__summary {
    font-size: 0.98rem;
    color: var(--text);
    margin: 0.5rem 0 0;
}

.breed-modal__stats {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.breed-modal__stat {
    background: var(--surface-alt);
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
}

.breed-modal__stat dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.breed-modal__stat dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.breed-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.breed-modal__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 18px 32px -20px rgba(52, 74, 65, 0.32);
}

.breed-modal__link:hover,
.breed-modal__link:focus {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px -24px rgba(52, 74, 65, 0.36);
}

.breed-modal__dismiss {
    background: transparent;
    border: none;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    padding: 0.75rem 1rem;
}

.breed-modal__dismiss:hover,
.breed-modal__dismiss:focus {
    color: var(--accent);
}

@media (max-width: 960px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
        max-height: none;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .sidebar a {
        padding: 0.4rem 0.75rem;
    }
    .timeline::before {
        left: 0.75rem;
    }
    .timeline-marker {
        left: -0.6rem;
    }
}

@media (max-width: 540px) {
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.9rem;
    }
    .timeline {
        padding-left: 2rem;
    }
    .timeline-marker {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    .timeline-card h3 {
        font-size: 1.1rem;
    }
}
.breed-photo-card[data-theme="sunshine"] .breed-photo-info {
    background: rgba(255, 248, 229, 0.9);
}
.breed-photo-card[data-theme="amber"] .breed-photo-info {
    background: rgba(255, 235, 214, 0.9);
}
.breed-photo-card[data-theme="forest"] .breed-photo-info {
    background: rgba(244, 247, 239, 0.9);
}
.breed-photo-card[data-theme="rose"] .breed-photo-info {
    background: rgba(253, 236, 246, 0.9);
}
.breed-photo-card[data-theme="sky"] .breed-photo-info {
    background: rgba(232, 244, 252, 0.9);
}
.breed-photo-card[data-theme="copper"] .breed-photo-info {
    background: rgba(255, 233, 222, 0.9);
}
