:root {
    --zb-bg: #f3efe6;
    --zb-bg-soft: #faf7f0;
    --zb-surface: rgba(255, 253, 249, 0.95);
    --zb-surface-strong: #fffdf8;
    --zb-ink: #1f3446;
    --zb-ink-soft: #587083;
    --zb-line: #d9d0c1;
    --zb-line-strong: #cabca5;
    --zb-accent: #14665f;
    --zb-accent-deep: #104e49;
    --zb-accent-soft: #e5f0ed;
    --zb-gold: #b58a3e;
    --zb-gold-soft: #f7edd8;
    --zb-danger: #b04035;
    --zb-shadow: 0 18px 44px rgba(31, 52, 70, 0.09);
    --zb-shadow-soft: 0 8px 22px rgba(31, 52, 70, 0.07);
    --zb-radius-lg: 1.5rem;
    --zb-radius-md: 1.05rem;
    --zb-radius-sm: 0.8rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.zb-body {
    min-height: 100vh;
    margin: 0;
    color: var(--zb-ink);
    background:
        radial-gradient(circle at 10% 5%, rgba(20, 102, 95, 0.09), transparent 26rem),
        radial-gradient(circle at 90% 10%, rgba(181, 138, 62, 0.12), transparent 24rem),
        linear-gradient(180deg, #f8f5ed 0%, var(--zb-bg) 42%, #eee8dc 100%);
}

.zb-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.zb-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 252, 246, 0.92);
    border-bottom: 1px solid rgba(202, 188, 165, 0.65);
    backdrop-filter: blur(16px);
}

.zb-header-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.zb-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    color: var(--zb-ink);
    text-decoration: none;
}

.zb-brand-mark {
    width: 2.8rem;
    height: 2.8rem;
    flex: 0 0 auto;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fffaf0;
    background: linear-gradient(145deg, var(--zb-accent), #2c827a);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 24px rgba(20, 102, 95, 0.22);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.zb-brand-copy {
    min-width: 0;
}

.zb-eyebrow {
    display: block;
    color: var(--zb-accent);
    text-transform: uppercase;
    letter-spacing: 0.19em;
    font-size: 0.67rem;
    line-height: 1.1;
    font-weight: 700;
    white-space: nowrap;
}

.zb-brand-title {
    display: block;
    margin-top: 0.15rem;
    color: var(--zb-ink);
    font-size: clamp(1.1rem, 1.8vw, 1.42rem);
    line-height: 1.15;
    font-weight: 680;
    white-space: nowrap;
}

.zb-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.zb-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.62rem 0.95rem;
    border-radius: 999px;
    color: var(--zb-ink);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 620;
    transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.zb-nav-link:hover {
    color: var(--zb-accent-deep);
    background: rgba(20, 102, 95, 0.08);
    transform: translateY(-1px);
}

.zb-nav-link.is-active {
    color: #fffaf3;
    background: linear-gradient(135deg, var(--zb-accent), #1c7770);
    box-shadow: 0 12px 24px rgba(20, 102, 95, 0.2);
}

.zb-main {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 1.35rem 1.5rem 2rem;
    flex: 1;
}

.zb-shell {
    position: relative;
    overflow: hidden;
    padding: 1.35rem 1.55rem 1.55rem;
    border-radius: var(--zb-radius-lg);
    border: 1px solid rgba(202, 188, 165, 0.72);
    background: var(--zb-surface);
    box-shadow: var(--zb-shadow);
}

.zb-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 0.28rem;
    background: linear-gradient(90deg, var(--zb-accent), var(--zb-gold), #7f6240);
}

.zb-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.95rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(202, 188, 165, 0.65);
}

.zb-page-title {
    margin: 0;
    color: var(--zb-ink);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.2;
    font-weight: 675;
    letter-spacing: -0.02em;
}

.zb-content {
    color: var(--zb-ink);
    font-size: 0.98rem;
    line-height: 1.5;
}

.zb-section {
    margin-top: 1.25rem;
}

.zb-section:first-child {
    margin-top: 0;
}

.zb-section-title {
    margin: 0 0 0.8rem;
    color: var(--zb-ink);
    font-size: 1.15rem;
    line-height: 1.25;
    font-weight: 655;
    letter-spacing: -0.01em;
}

.zb-muted {
    color: var(--zb-ink-soft);
}

.zb-panel,
.zb-card {
    border: 1px solid rgba(202, 188, 165, 0.72);
    background: rgba(255, 253, 249, 0.92);
    border-radius: var(--zb-radius-md);
    box-shadow: var(--zb-shadow-soft);
}

.zb-panel {
    padding: 1rem 1.1rem;
}

.zb-card {
    padding: 1rem;
}

.zb-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.zb-copy-lead {
    margin: 0;
    color: var(--zb-ink);
    font-size: 1.03rem;
    line-height: 1.7;
}

.zb-volume-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zb-volume-list li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.55rem 0.65rem;
    border-radius: 0.85rem;
    background: rgba(247, 237, 216, 0.72);
    border: 1px solid rgba(181, 138, 62, 0.16);
}

.zb-volume-list li::before {
    content: "•";
    color: var(--zb-gold);
    font-weight: 700;
    line-height: 1.3;
}

.zb-image-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.zb-image-strip figure {
    margin: 0;
    padding: 0.45rem;
    border-radius: 1rem;
    border: 1px solid rgba(202, 188, 165, 0.72);
    background: rgba(255, 253, 249, 0.96);
    box-shadow: var(--zb-shadow-soft);
}

.zb-image-strip img {
    display: block;
    width: 100%;
    height: 9.5rem;
    object-fit: contain;
    object-position: center;
    padding: 0.18rem;
    border-radius: 0.72rem;
    background: rgba(248, 243, 232, 0.72);
}

.zb-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
}

.zb-form-row.zb-form-centered {
    justify-content: center;
}

.zb-field,
.zb-select,
.zb-textarea {
    width: 100%;
    min-height: 2.7rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(185, 171, 148, 0.92);
    background: rgba(255, 254, 251, 0.98);
    color: var(--zb-ink);
    padding: 0.68rem 0.85rem;
    font-size: 0.96rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.zb-field:focus,
.zb-select:focus,
.zb-textarea:focus {
    border-color: rgba(20, 102, 95, 0.72);
    box-shadow: 0 0 0 4px rgba(20, 102, 95, 0.12);
    background: #fffefb;
}

.zb-field-short {
    width: 10rem;
}

.zb-field-medium {
    width: min(100%, 28rem);
}

.zb-select-wrap {
    width: min(100%, 22rem);
}

.zb-button,
.zb-button-secondary,
.zb-chip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    border-radius: 999px;
    padding: 0.7rem 1.08rem;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 650;
    border: 1px solid transparent;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.zb-button {
    color: #fffaf3;
    background: linear-gradient(135deg, var(--zb-accent), #1a7770);
    box-shadow: 0 12px 26px rgba(20, 102, 95, 0.18);
}

.zb-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(20, 102, 95, 0.24);
}

.zb-button-secondary {
    color: var(--zb-accent-deep);
    border-color: rgba(20, 102, 95, 0.34);
    background: rgba(229, 240, 237, 0.92);
}

.zb-button-secondary:hover,
.zb-chip-button:hover {
    background: rgba(20, 102, 95, 0.13);
    border-color: rgba(20, 102, 95, 0.46);
    transform: translateY(-1px);
}

.zb-chip-button {
    min-height: 2.15rem;
    padding: 0.45rem 0.82rem;
    color: var(--zb-accent-deep);
    border-color: rgba(20, 102, 95, 0.24);
    background: rgba(255, 253, 249, 0.92);
    font-size: 0.9rem;
}

.zb-chip-button.is-active {
    color: #fffaf3;
    background: linear-gradient(135deg, var(--zb-accent), #1a7770);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(20, 102, 95, 0.18);
}

.zb-link,
.zb-content a:not(.zb-nav-link):not(.zb-button):not(.zb-button-secondary):not(.zb-chip-button),
.zb-prose a {
    color: var(--zb-accent-deep);
    text-decoration: none;
    font-weight: 610;
    border-bottom: 0;
    transition: color 160ms ease, background-color 160ms ease;
}

.zb-link:hover,
.zb-content a:not(.zb-nav-link):not(.zb-button):not(.zb-button-secondary):not(.zb-chip-button):hover,
.zb-prose a:hover {
    color: var(--zb-accent);
    background: rgba(20, 102, 95, 0.06);
}

.zb-result-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 1rem;
}

.zb-result-item {
    padding: 0.72rem 0.85rem;
    border-radius: 0.92rem;
    border: 1px solid rgba(202, 188, 165, 0.68);
    background: rgba(255, 253, 249, 0.92);
}

.zb-empty,
.zb-alert {
    padding: 0.85rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(202, 188, 165, 0.72);
    background: rgba(255, 253, 249, 0.88);
    color: var(--zb-ink-soft);
}

.zb-alert-error {
    color: var(--zb-danger);
    border-color: rgba(176, 64, 53, 0.28);
    background: rgba(255, 243, 241, 0.95);
}

.zb-table-wrap {
    overflow-x: auto;
    border-radius: 1.1rem;
    border: 1px solid rgba(202, 188, 165, 0.78);
    background: rgba(255, 253, 249, 0.98);
    box-shadow: var(--zb-shadow-soft);
}

.zb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--zb-ink);
    font-size: 0.93rem;
}

.zb-table thead th {
    color: #fffaf3;
    background: linear-gradient(135deg, #183f51, #1b5a5a);
    padding: 0.72rem 0.78rem;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
}

.zb-table thead th:first-child {
    border-top-left-radius: 1rem;
}

.zb-table thead th:last-child {
    border-top-right-radius: 1rem;
}

.zb-table tbody td {
    padding: 0.62rem 0.78rem;
    border-top: 1px solid rgba(217, 208, 193, 0.72);
    vertical-align: top;
}

.zb-table tbody tr:nth-child(even) td {
    background: rgba(247, 243, 234, 0.58);
}

.zb-table tbody tr:hover td {
    background: rgba(229, 240, 237, 0.62);
}

.zb-table .zb-row-accent td,
.zb-table tr.bg-amber-50 td {
    background: rgba(247, 237, 216, 0.88) !important;
}

.zb-info-grid {
    display: grid;
    grid-template-columns: minmax(320px, 690px);
    gap: 1rem;
}

.zb-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 1.1rem;
    border: 1px solid rgba(202, 188, 165, 0.78);
    box-shadow: var(--zb-shadow-soft);
    background: rgba(255, 253, 249, 0.98);
}

.zb-detail-table td {
    padding: 0.62rem 0.82rem;
    border-top: 1px solid rgba(217, 208, 193, 0.72);
}

.zb-detail-table tr:first-child td {
    border-top: 0;
}

.zb-detail-label {
    width: 28%;
    color: var(--zb-ink);
    background: rgba(229, 240, 237, 0.78);
    font-weight: 650;
    white-space: nowrap;
}

.zb-pedigree-wrap {
    overflow-x: auto;
    border-radius: 1.1rem;
    border: 1px solid rgba(202, 188, 165, 0.78);
    background: rgba(255, 253, 249, 0.98);
    box-shadow: var(--zb-shadow-soft);
}

.zb-pedigree {
    width: 100%;
    border-collapse: collapse;
    min-width: 840px;
    table-layout: fixed;
    text-align: center;
    font-size: 0.92rem;
}

.zb-pedigree td {
    border: 1px solid rgba(217, 208, 193, 0.82);
    padding: 0.42rem 0.55rem;
    background: rgba(255, 253, 249, 0.86);
}

.zb-pedigree tr:nth-child(odd) td {
    background: rgba(250, 246, 237, 0.86);
}

.zb-pedigree-cell {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zb-alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.zb-year-picker {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.zb-year-picker .zb-select {
    max-width: 22rem;
}

.zb-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.zb-content nav[role="navigation"] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
}

.zb-content nav[role="navigation"] span,
.zb-content nav[role="navigation"] a {
    border-radius: 999px !important;
}

.zb-prose {
    color: var(--zb-ink);
    font-size: 1rem;
    line-height: 1.68;
}

.zb-prose h1,
.zb-prose h2,
.zb-prose h3 {
    color: var(--zb-ink);
    font-weight: 675;
    letter-spacing: -0.015em;
}

.zb-prose h2 {
    margin-top: 1.35rem;
    margin-bottom: 0.45rem;
    font-size: 1.35rem;
}

.zb-prose p {
    margin-top: 0.45rem;
    margin-bottom: 0.65rem;
}

.zb-prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.8rem;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(202, 188, 165, 0.78);
    box-shadow: var(--zb-shadow-soft);
}

.zb-prose th,
.zb-prose td {
    padding: 0.58rem 0.7rem;
    border-top: 1px solid rgba(217, 208, 193, 0.72);
    vertical-align: top;
}

.zb-prose thead th {
    color: #fffaf3;
    background: linear-gradient(135deg, #183f51, #1b5a5a);
    border-top: 0;
}

.zb-back-row {
    margin-top: 1.2rem;
}

.zb-form-grid {
    display: grid;
    gap: 0.9rem;
}

.zb-form-grid label,
.zb-label {
    display: block;
    margin-bottom: 0.34rem;
    color: var(--zb-ink);
    font-size: 0.9rem;
    font-weight: 650;
}

.zb-help {
    color: var(--zb-ink-soft);
    font-size: 0.82rem;
    margin-top: 0.34rem;
}

.zb-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.zb-inline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.zb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.zb-footer {
    margin-top: auto;
    color: rgba(255, 250, 243, 0.92);
    background: linear-gradient(135deg, #173a4e, #185b57);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.zb-footer-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.92rem;
}

.zb-footer a {
    color: #fffaf3;
    border-bottom: 1px solid rgba(255, 250, 243, 0.38);
    text-decoration: none;
}

.zb-footer a:hover {
    border-bottom-color: rgba(255, 250, 243, 0.84);
}

@media (max-width: 1080px) {
    .zb-header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .zb-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .zb-intro-grid {
        grid-template-columns: 1fr;
    }

    .zb-inline-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .zb-main {
        padding: 1rem 0.75rem 1.35rem;
    }

    .zb-shell {
        padding: 1.1rem 0.9rem 1.15rem;
        border-radius: 1.2rem;
    }

    .zb-page-head {
        margin-bottom: 0.9rem;
        padding-bottom: 0.8rem;
    }

    .zb-brand-title {
        white-space: normal;
    }

    .zb-image-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zb-image-strip img {
        height: 7.6rem;
    }

    .zb-field-short,
    .zb-field-medium,
    .zb-select-wrap {
        width: 100%;
    }

    .zb-detail-label {
        width: 38%;
        white-space: normal;
    }
}


/* Home page studbook image gallery — larger previews, preserving natural proportions */
.zb-studbook-gallery .zb-studbook-cover {
    min-height: 225px;
    padding: 10px;
}

.zb-studbook-gallery .zb-studbook-cover img {
    max-height: 205px;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* Home page studbook image gallery — enlarged previews */
.zb-image-strip figure {
    padding: 0.5rem;
}

.zb-image-strip img {
    height: 14rem;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 900px) {
    .zb-image-strip img {
        height: 10.5rem;
    }
}
