/* ============================================================
   GRAND EXPLORER'S SOCIETY
   Species Archive — Visual Foundation
   ============================================================ */
/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --paper: #f2eee4;
    --paper-light: #faf8f2;
    --paper-dark: #e7e0d1;
    --white: #fffdf8;
    --ink: #292722;
    --ink-soft: #5d584e;
    --ink-faint: #7b7468;
    --brown: #5a4635;
    --brown-dark: #403326;
    --brown-light: #806b55;
    --line: #c9c0b1;
    --line-dark: #9e9382;
    --error: #713b32;
    --error-background: #eee2dd;
    --success: #485b45;
    --success-background: #e5e9df;
    --focus: #665039;
    --content-width: 1120px;
    --reading-width: 900px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;
}
/* ============================================================
   RESET
   ============================================================ */
* {
    box-sizing: border-box;
}
html {
    min-height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-size: 16px;
}
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    line-height: 1.5;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a {
    -webkit-tap-highlight-color: transparent;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: default;
}
a {
    color: inherit;
}
img,
svg {
    display: block;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
/* ============================================================
   APPLICATION SHELL
   ============================================================ */
.application {
    min-height: 100vh;
}
.hidden {
    display: none !important;
}
/* ============================================================
   INITIAL APPLICATION LOADING
   ============================================================ */
.application-loading {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    text-align: center;
    background: var(--paper);
}
.loading-mark {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    border: 1px solid var(--brown);
    color: var(--brown);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 15px;
    letter-spacing: 0.12em;
}
.loading-title {
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.55rem;
    font-weight: normal;
    letter-spacing: 0.01em;
}
.loading-subtitle {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.loading-message {
    margin-top: var(--space-7);
    color: var(--ink-faint);
    font-size: 0.84rem;
}
/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    width: min(
        calc(100% - 40px),
        var(--content-width)
    );
    margin: 0 auto;
    padding-top: var(--space-7);
}
.site-header-main {
    min-height: 76px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--line-dark);
}
.site-identity {
    display: flex;
    align-items: center;
    min-width: 0;
}
.society-mark {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-4);
    border: 1px solid var(--brown);
    color: var(--brown);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-decoration: none;
}
.society-mark:hover {
    background: var(--paper-dark);
}
.site-identity-text {
    min-width: 0;
}
.site-title {
    display: inline-block;
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.45rem;
    font-weight: normal;
    line-height: 1.2;
    text-decoration: none;
}
.site-title:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.site-subtitle {
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.site-establishment {
    padding-top: 5px;
    color: var(--ink-faint);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.82rem;
    white-space: nowrap;
}
/* ============================================================
   PRIMARY NAVIGATION
   ============================================================ */
.site-navigation {
    min-height: 42px;
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
}
.navigation-link {
    position: relative;
    display: flex;
    align-items: center;
    padding:
        0
        var(--space-5);
    border-right: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.79rem;
    text-decoration: none;
    transition:
        background-color 120ms ease,
        color 120ms ease;
}
.navigation-link:first-child {
    border-left: 1px solid var(--line);
}
.navigation-link:hover {
    background: var(--paper-dark);
    color: var(--brown-dark);
}
.navigation-link-current {
    background: var(--paper-light);
    color: var(--brown-dark);
    font-weight: bold;
}
.navigation-link-current::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--brown);
}
/* ============================================================
   MAIN CONTENT
   ============================================================ */
.site-main {
    width: min(
        calc(100% - 40px),
        var(--content-width)
    );
    margin: 0 auto;
}
.catalogue-view {
    padding-top: var(--space-9);
    padding-bottom: var(--space-10);
}
/* ============================================================
   CATALOGUE HEADING
   ============================================================ */
.catalogue-header {
    max-width: var(--reading-width);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--line);
}
.catalogue-kicker {
    margin-bottom: var(--space-2);
    color: var(--brown-light);
    font-size: 0.73rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.catalogue-title {
    margin-bottom: var(--space-3);
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: clamp(
        2rem,
        4vw,
        2.65rem
    );
    font-weight: normal;
    line-height: 1.12;
}
.catalogue-description {
    max-width: 720px;
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.65;
}
/* ============================================================
   SEARCH AREA
   ============================================================ */
.catalogue-search {
    max-width: 900px;
    padding:
        var(--space-6)
        0
        var(--space-5);
}
.search-label {
    margin-bottom: var(--space-2);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.search-form {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: var(--space-2);
}
.search-control {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: var(--ink-faint);
    pointer-events: none;
}
.search-icon svg {
    width: 16px;
    height: 16px;
}
.search-input {
    width: 100%;
    height: 40px;
    padding:
        7px
        11px
        7px
        34px;
    border: 1px solid var(--line-dark);
    border-radius: 0;
    background: var(--white);
    color: var(--ink);
    font-size: 0.88rem;
    outline: none;
    appearance: none;
}
.search-input::placeholder {
    color: var(--ink-faint);
    opacity: 1;
}
.search-input:hover {
    border-color: #857967;
}
.search-input:focus {
    border-color: var(--brown);
    box-shadow: inset 0 0 0 1px var(--brown);
}
.search-input::-webkit-search-cancel-button {
    cursor: pointer;
}
.button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding:
        7px
        16px;
    border: 1px solid var(--brown);
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: bold;
    line-height: 1;
    transition:
        background-color 120ms ease,
        border-color 120ms ease,
        color 120ms ease;
}
.button-primary {
    flex: 0 0 auto;
    min-width: 94px;
    background: var(--brown);
    color: var(--white);
}
.button-primary:hover {
    background: var(--brown-dark);
    border-color: var(--brown-dark);
}
.button-primary:active {
    background: #30261e;
    border-color: #30261e;
}
.button-secondary {
    border-color: var(--line-dark);
    background: var(--paper-light);
    color: var(--brown-dark);
}
.button-secondary:hover:not(:disabled) {
    background: var(--paper-dark);
    border-color: var(--brown-light);
}
.button:disabled {
    opacity: 0.45;
}
/* ============================================================
   CATALOGUE STATUS
   ============================================================ */
.catalogue-status {
    min-height: 24px;
    margin-bottom: var(--space-2);
    color: var(--ink-faint);
    font-size: 0.78rem;
}
.catalogue-status.has-results {
    color: var(--ink-soft);
}
.catalogue-status.is-error {
    color: var(--error);
}
/* ============================================================
   CATALOGUE CONTENT
   ============================================================ */
.catalogue-content {
    border-top: 2px solid var(--brown);
}
.species-row {
    width: 100%;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        430px
        96px
        auto;
    align-items: stretch;
    min-height: 72px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
    transition:
        background-color 100ms ease;
}
.species-row:hover {
    background: var(--white);
}
.species-row-identity {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding:
        13px
        18px;
}
.species-row-name {
    margin: 0;
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1rem;
    font-weight: normal;
    line-height: 1.3;
}
.species-row-name em {
    font-style: italic;
}
.species-row-authorship {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 0.73rem;
}
/* ------------------------------------------------------------
   ROW METADATA
   Rank, Kingdom and Taxonomic status share one cell and are
   set as a single scannable line: quiet uppercase labels,
   darker values, and a hairline interpunct between pairs.
   ------------------------------------------------------------ */
.species-row-classification {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    align-content: center;
    gap:
        4px
        16px;
    padding:
        13px
        16px;
    border-left: 1px solid var(--line);
}
.species-metadata-item {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
}
.species-metadata-item:not(:last-child)::after {
    content: "·";
    position: absolute;
    right: -10px;
    color: var(--line-dark);
}
.species-metadata-label {
    color: var(--ink-faint);
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.species-metadata-value {
    color: var(--brown-dark);
    font-size: 0.75rem;
}
.species-row-status {
    display: flex;
    align-items: center;
    min-width: 0;
    padding:
        13px
        14px;
    border-left: 1px solid var(--line);
}
.species-status-label {
    color: var(--ink-faint);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.species-row-action {
    display: flex;
    align-items: center;
    padding:
        13px
        16px;
    border-left: 1px solid var(--line);
}
/* ------------------------------------------------------------
   ROW BUTTONS
   ------------------------------------------------------------ */
.text-button {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--brown);
    font-size: 0.76rem;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.text-button:hover {
    color: var(--brown-dark);
}
.species-examine-button {
    min-height: 32px;
    padding:
        6px
        12px;
    border: 1px solid var(--line-dark);
    border-radius: 0;
    background: var(--white);
    color: var(--brown-dark);
    font-size: 0.72rem;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}
.species-examine-button:hover {
    border-color: var(--brown);
    background: var(--paper-dark);
}
/* ============================================================
   CATALOGUE EMPTY / ERROR / GENERAL MESSAGES
   ============================================================ */
.catalogue-message,
.application-message {
    padding:
        var(--space-7)
        var(--space-6);
    border:
        1px solid var(--line);
    background: var(--paper-light);
}
.catalogue-message {
    border-top: 0;
}
.message-title {
    margin-bottom: var(--space-2);
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.1rem;
}
.message-text {
    max-width: 650px;
    margin-bottom: var(--space-5);
    color: var(--ink-soft);
    font-size: 0.86rem;
    line-height: 1.65;
}
.message-text:last-child {
    margin-bottom: 0;
}
.message-error {
    border-color: #cdb8b0;
    background: var(--error-background);
}
.message-error .message-title {
    color: var(--error);
}
/* ============================================================
   PAGINATION
   ============================================================ */
.catalogue-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    border-bottom: 1px solid var(--line);
}
.pagination-status {
    padding:
        0
        var(--space-4);
    color: var(--ink-soft);
    font-size: 0.76rem;
    text-align: center;
}
/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    width: min(
        calc(100% - 40px),
        var(--content-width)
    );
    margin: 0 auto;
    padding-bottom: var(--space-7);
}
.footer-rule {
    height: 1px;
    background: var(--line-dark);
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-4);
    color: var(--ink-faint);
    font-size: 0.7rem;
}
/* ============================================================
   CONNECTION NOTICE
   ============================================================ */
.connection-notice {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 100;
    max-width: calc(100% - 32px);
    padding:
        9px
        14px;
    transform: translateX(-50%);
    border: 1px solid var(--line-dark);
    background: var(--brown-dark);
    color: var(--white);
    font-size: 0.75rem;
    box-shadow:
        0 2px 8px rgba(40, 30, 20, 0.16);
}
/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* ============================================================
   TABLET
   ============================================================ */
@media (max-width: 800px) {
    .site-header,
    .site-main,
    .site-footer {
        width: min(
            calc(100% - 28px),
            var(--content-width)
        );
    }
    .site-header {
        padding-top: var(--space-6);
    }
    .site-establishment {
        display: none;
    }
    .species-row {
        grid-template-columns:
            minmax(0, 1fr)
            105px
            auto;
    }
    .species-row-action {
        padding-left: 12px;
        padding-right: 12px;
    }
    .catalogue-view {
        padding-top: var(--space-7);
    }
}
/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 620px) {
    .site-header,
    .site-main,
    .site-footer {
        width: calc(100% - 24px);
    }
    .site-header {
        padding-top: var(--space-4);
    }
    .site-header-main {
        min-height: 64px;
        padding-bottom: var(--space-4);
    }
    .society-mark {
        width: 46px;
        height: 46px;
        margin-right: var(--space-3);
    }
    .site-title {
        font-size: 1.12rem;
    }
    .site-subtitle {
        font-size: 0.67rem;
    }
    .site-navigation {
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .navigation-link {
        flex: 0 0 auto;
        padding:
            0
            13px;
        font-size: 0.72rem;
    }
    .catalogue-view {
        padding-top: var(--space-6);
        padding-bottom: var(--space-8);
    }
    .catalogue-title {
        font-size: 1.9rem;
    }
    .catalogue-description {
        font-size: 0.86rem;
    }
    .catalogue-search {
        padding-top: var(--space-5);
    }
    .search-form {
        flex-direction: column;
        gap: var(--space-2);
    }
    .search-input {
        height: 42px;
    }
    .button-primary {
        width: 100%;
        height: 40px;
    }
    .species-row {
        display: block;
        min-height: 0;
    }
    .species-row-identity {
        padding: 14px 14px 10px;
    }
    .species-row-authorship {
        margin-top: 4px;
    }
    .species-row-classification,
    .species-row-status {
        display: flex;
        min-width: 0;
        padding: 8px 14px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .species-row-action {
        display: flex;
        padding: 8px 14px 14px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .species-examine-button {
        min-height: 34px;
    }
    .catalogue-pagination {
        gap: var(--space-2);
    }
    .pagination-status {
        flex: 1;
        padding:
            0
            var(--space-1);
        font-size: 0.69rem;
    }
    .catalogue-pagination .button {
        padding-left: 10px;
        padding-right: 10px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }
}
/* ============================================================
   VERY SMALL SCREENS
   ============================================================ */
@media (max-width: 390px) {
    .site-title {
        font-size: 1rem;
    }
    .catalogue-title {
        font-size: 1.7rem;
    }
    .navigation-link {
        padding-left: 11px;
        padding-right: 11px;
    }
}
/* ============================================================
   SPECIES DETAIL
   ============================================================ */
.species-detail-view {
    max-width: var(--reading-width);
    padding-top: var(--space-7);
    padding-bottom: var(--space-10);
}
/* ============================================================
   DETAIL NAVIGATION
   ============================================================ */
.detail-navigation {
    margin-bottom: var(--space-6);
}
.back-button {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brown);
    font-size: 0.76rem;
    font-weight: bold;
    text-decoration: none;
}
.back-button:hover {
    color: var(--brown-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.back-arrow {
    margin-right: 7px;
    font-size: 1rem;
    font-weight: normal;
}
/* ============================================================
   SPECIES RECORD HEADER
   ============================================================ */
.species-record-header {
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--brown);
}
.species-record-kicker {
    margin-bottom: var(--space-2);
    color: var(--brown-light);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.species-record-name {
    margin:
        0
        0
        var(--space-2);
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: clamp(
        2rem,
        5vw,
        3rem
    );
    font-weight: normal;
    line-height: 1.08;
}
.species-record-name em {
    font-style: italic;
}
.species-record-authorship {
    margin-bottom: var(--space-4);
    color: var(--ink-soft);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.84rem;
}
.species-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap:
        5px
        18px;
    color: var(--ink-soft);
    font-size: 0.73rem;
}
.species-record-meta-item {
    position: relative;
}
.species-record-meta-item:not(:last-child)::after {
    content: "·";
    position: absolute;
    right: -11px;
    color: var(--line-dark);
}
.species-record-meta-label {
    color: var(--ink-faint);
    margin-right: 4px;
}
.species-record-meta-value {
    color: var(--brown-dark);
}
/* ============================================================
   RECORD BODY
   ============================================================ */
.species-record-body {
    padding-top: var(--space-7);
}
.record-section {
    margin-bottom: var(--space-8);
}
.record-section:last-child {
    margin-bottom: 0;
}
.record-section-heading {
    margin:
        0
        0
        var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--line);
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.32rem;
    font-weight: normal;
    line-height: 1.3;
}
.record-section-body {
    color: var(--ink);
    font-size: 0.88rem;
    line-height: 1.7;
}
/* ============================================================
   IDENTITY
   ============================================================ */
.identity-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper-light);
    font-size: 0.82rem;
}
.identity-row {
    border-bottom: 1px solid var(--line);
}
.identity-row:last-child {
    border-bottom: 0;
}
.identity-label {
    width: 190px;
    padding:
        9px
        12px;
    background: var(--paper-dark);
    border-right: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    vertical-align: top;
}
.identity-value {
    padding:
        9px
        12px;
    color: var(--ink);
    vertical-align: top;
}
.identity-value.scientific {
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.95rem;
}
.identity-value.scientific em {
    font-style: italic;
}
/* ============================================================
   ABOUT
   ============================================================ */
.about-description {
    max-width: 820px;
    margin-bottom: var(--space-5);
    color: var(--ink);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.98rem;
    line-height: 1.8;
}
.about-facts {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}
.about-fact {
    padding:
        12px
        14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
}
.about-fact-label {
    margin-bottom: 3px;
    color: var(--ink-faint);
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.about-fact-value {
    color: var(--ink);
    font-size: 0.83rem;
}
/* ============================================================
   BIOLOGY
   ============================================================ */
.biology-introduction {
    max-width: 780px;
    margin-bottom: var(--space-6);
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.65;
}
/*
    A biological category is deliberately treated as an
    information group rather than a database table.
*/
.trait-category {
    margin-bottom: var(--space-6);
    border-top: 2px solid var(--brown);
}
.trait-category:last-child {
    margin-bottom: 0;
}
.trait-category-heading {
    margin: 0;
    padding:
        8px
        10px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-dark);
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1rem;
    font-weight: normal;
}
/*
    Each observation remains separate.
    This is important because two observations of the same
    trait may have different sources, contexts, or samples.
*/
.trait-observation {
    padding:
        13px
        10px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
}
.trait-observation-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-5);
}
.trait-name {
    min-width: 0;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: bold;
}
.trait-value {
    flex: 0 1 auto;
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.95rem;
    text-align: right;
}
.trait-value-empty {
    color: var(--ink-faint);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    font-size: 0.78rem;
}
/* ============================================================
   BIOLOGY PROVENANCE
   ============================================================ */
.trait-provenance {
    display: flex;
    flex-wrap: wrap;
    gap:
        4px
        14px;
    margin-top: 6px;
    color: var(--ink-faint);
    font-size: 0.68rem;
    line-height: 1.5;
}
.trait-provenance-item {
    position: relative;
}
.trait-provenance-item:not(:last-child)::after {
    content: "·";
    position: absolute;
    right: -9px;
    color: var(--line-dark);
}
.trait-provenance-label {
    margin-right: 3px;
    color: var(--ink-faint);
}
.trait-provenance-value {
    color: var(--ink-soft);
}
.trait-context {
    flex-basis: 100%;
}
.trait-notes {
    flex-basis: 100%;
    color: var(--ink-faint);
    font-style: italic;
}
/* ============================================================
   COLLAPSIBLE SECTIONS
   ============================================================ */
.collapsible-section {
    margin-bottom: var(--space-5);
    border-top: 2px solid var(--brown);
}
.collapsible-section:last-child {
    margin-bottom: 0;
}
.section-toggle {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding:
        7px
        10px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: var(--paper-dark);
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1rem;
    font-weight: normal;
    text-align: left;
    transition:
        background-color 100ms ease;
}
.section-toggle:hover {
    background: #ddd5c5;
}
.section-toggle-label {
    display: block;
}
.section-toggle-symbol {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--space-4);
    border: 1px solid var(--line-dark);
    background: var(--paper-light);
    color: var(--brown);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    font-size: 0.86rem;
    line-height: 1;
}
.section-content {
    padding:
        var(--space-5)
        10px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
}
/* ============================================================
   CLASSIFICATION
   ============================================================ */
.classification-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.classification-row {
    border-bottom: 1px solid var(--line);
}
.classification-row:last-child {
    border-bottom: 0;
}
.classification-rank {
    width: 150px;
    padding:
        8px
        10px;
    color: var(--ink-faint);
    font-size: 0.67rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: top;
}
.classification-name {
    padding:
        8px
        10px;
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.88rem;
    vertical-align: top;
}
.classification-name em {
    font-style: italic;
}
/* ============================================================
   VERNACULAR NAMES
   ============================================================ */
.names-introduction {
    margin-bottom: var(--space-4);
    color: var(--ink-soft);
    font-size: 0.8rem;
}
.names-table-wrapper {
    width: 100%;
    overflow-x: auto;
}
.names-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.78rem;
}
.names-table th {
    padding:
        8px
        10px;
    border-bottom: 2px solid var(--line-dark);
    background: var(--paper-dark);
    color: var(--ink-soft);
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}
.names-table td {
    padding:
        8px
        10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.names-table tbody tr:nth-child(even) {
    background: #f5f1e8;
}
.names-table-name {
    color: var(--ink);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 0.86rem;
}
.names-table-language {
    color: var(--ink-soft);
    text-transform: uppercase;
}
.names-table-merged {
    color: var(--ink-faint);
}
/* ============================================================
   EMPTY DETAIL SECTIONS
   ============================================================ */
.detail-empty {
    padding:
        var(--space-4)
        0;
    color: var(--ink-faint);
    font-size: 0.8rem;
    font-style: italic;
}
/* ============================================================
   DETAIL LOADING SKELETON
   ============================================================ */
.species-detail-loading {
    padding-bottom: var(--space-8);
}
.detail-skeleton-heading {
    width: min(70%, 540px);
    height: 46px;
    margin-bottom: 12px;
    background: #dcd7cd;
}
.detail-skeleton-meta {
    width: min(45%, 300px);
    height: 15px;
    margin-bottom: var(--space-7);
    background: #dcd7cd;
}
.detail-skeleton-section {
    margin-bottom: var(--space-6);
}
.detail-skeleton-section-title {
    width: 160px;
    height: 25px;
    margin-bottom: var(--space-4);
    background: #dcd7cd;
}
.detail-skeleton-line {
    width: 100%;
    height: 15px;
    margin-bottom: 9px;
    background: #e0dbd1;
}
.detail-skeleton-line.short {
    width: 65%;
}
/* ============================================================
   DETAIL ERROR STATE
   ============================================================ */
.species-detail-view > .application-message {
    max-width: 760px;
}
.species-detail-view > .application-message .button {
    margin-top: var(--space-2);
}
/* ============================================================
   DETAIL TABLET
   ============================================================ */
@media (max-width: 800px) {
    .species-detail-view {
        padding-top: var(--space-6);
    }
    .species-record-name {
        font-size: 2.35rem;
    }
    .identity-label {
        width: 160px;
    }
    .classification-rank {
        width: 125px;
    }
}
/* ============================================================
   DETAIL MOBILE
   ============================================================ */
@media (max-width: 620px) {
    .species-detail-view {
        padding-top: var(--space-5);
        padding-bottom: var(--space-8);
    }
    .detail-navigation {
        margin-bottom: var(--space-5);
    }
    .species-record-header {
        padding-bottom: var(--space-5);
    }
    .species-record-name {
        font-size: 1.95rem;
        line-height: 1.12;
    }
    .species-record-authorship {
        font-size: 0.77rem;
    }
    .species-record-meta {
        display: block;
    }
    .species-record-meta-item {
        display: inline;
    }
    .species-record-meta-item:not(:last-child)::after {
        position: static;
        margin:
            0
            7px;
    }
    .species-record-body {
        padding-top: var(--space-6);
    }
    .record-section {
        margin-bottom: var(--space-7);
    }
    .record-section-heading {
        font-size: 1.18rem;
    }
    .identity-table,
    .identity-table tbody,
    .identity-table tr,
    .identity-table td {
        display: block;
        width: 100%;
    }
    .identity-row {
        border-bottom: 0;
    }
    .identity-label {
        width: 100%;
        padding:
            7px
            10px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .identity-value {
        padding:
            8px
            10px
            12px;
        border-bottom: 1px solid var(--line);
    }
    .about-facts {
        grid-template-columns: 1fr;
    }
    .trait-observation-main {
        display: block;
    }
    .trait-name {
        display: block;
        margin-bottom: 3px;
    }
    .trait-value {
        display: block;
        text-align: left;
    }
    .trait-provenance {
        display: block;
    }
    .trait-provenance-item {
        display: inline;
    }
    .trait-provenance-item:not(:last-child)::after {
        position: static;
        margin:
            0
            5px;
    }
    .trait-context,
    .trait-notes {
        display: block;
        margin-top: 3px;
    }
    .classification-table,
    .classification-table tbody,
    .classification-table tr,
    .classification-table td {
        display: block;
        width: 100%;
    }
    .classification-row {
        padding:
            8px
            0;
    }
    .classification-rank {
        width: 100%;
        padding:
            0
            0
            2px;
    }
    .classification-name {
        padding:
            0;
    }
    .section-content {
        padding:
            var(--space-4)
            8px;
    }
    .detail-skeleton-heading {
        width: 85%;
        height: 36px;
    }
    .detail-skeleton-meta {
        width: 60%;
    }
}
/* ============================================================
   CATALOGUE SKELETONS
   ============================================================ */
.catalogue-skeleton-list {
    border-top: 0;
}
.skeleton-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        120px
        130px
        auto;
    align-items: center;
    min-height: 72px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
}
.skeleton-main {
    padding:
        13px
        18px;
}
.skeleton-line {
    height: 12px;
    background: #dcd7cd;
}
.skeleton-line-wide {
    width: min(65%, 360px);
}
.skeleton-line-medium {
    width: 95px;
}
.skeleton-line-small {
    width: 60px;
}
.skeleton-main .skeleton-line + .skeleton-line {
    margin-top: 8px;
}
.skeleton-meta {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding:
        13px
        12px;
    border-left: 1px solid var(--line);
}
.skeleton-action {
    min-height: 72px;
    display: flex;
    align-items: center;
    padding:
        13px
        16px;
    border-left: 1px solid var(--line);
}
.skeleton-button {
    width: 70px;
    height: 32px;
    background: #dcd7cd;
}
/* ============================================================
   SKELETON MOTION
   ============================================================ */
@keyframes skeleton-pulse {
    0% {
        opacity: 0.55;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.55;
    }
}
.skeleton-line,
.skeleton-button,
.detail-skeleton-heading,
.detail-skeleton-meta,
.detail-skeleton-section-title,
.detail-skeleton-line {
    animation:
        skeleton-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .skeleton-line,
    .skeleton-button,
    .detail-skeleton-heading,
    .detail-skeleton-meta,
    .detail-skeleton-section-title,
    .detail-skeleton-line {
        animation: none;
    }
}
/* ============================================================
   CATALOGUE EMPTY STATE
   ============================================================ */
.catalogue-empty {
    padding:
        34px
        24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
}
.catalogue-empty-title {
    margin-bottom: 6px;
    color: var(--brown-dark);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.15rem;
    font-weight: normal;
}
.catalogue-empty-text {
    max-width: 620px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.65;
}
/* ============================================================
   CATALOGUE ERROR
   ============================================================ */
.catalogue-error {
    border-top: 0;
    border-color: #cdb8b0;
    background: var(--error-background);
}
.catalogue-error .catalogue-empty-title {
    color: var(--error);
}
.catalogue-error .catalogue-empty-text {
    margin-bottom: var(--space-5);
}
/* ============================================================
   INLINE LOADING STATE
   ============================================================ */
.search-progress {
    display: none;
    width: 100%;
    height: 3px;
    margin-top: 10px;
    overflow: hidden;
    background: var(--border-color, #dedbd5);
}
.search-progress.is-active {
    display: block;
}
.search-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--brown);
    transition: width 100ms linear;
}
@media (prefers-reduced-motion: reduce) {
    .search-progress-fill {
        transition: none;
    }
}
/* ============================================================
   OFFLINE STATE
   ============================================================ */
.application-offline .site-header {
    border-color: var(--line-dark);
}
.application-offline .catalogue-status {
    color: var(--ink-faint);
}
.offline-record-notice {
    margin-bottom: var(--space-5);
    padding:
        9px
        12px;
    border:
        1px solid var(--line);
    background: var(--paper-dark);
    color: var(--ink-soft);
    font-size: 0.73rem;
}
.offline-record-notice strong {
    color: var(--brown-dark);
}
/* ============================================================
   DETAIL CONTENT STATES
   ============================================================ */
.species-detail-content {
    width: 100%;
}
.species-detail-content > *:first-child {
    margin-top: 0;
}
/* ============================================================
   DETAIL SECTION SEPARATION
   ============================================================ */
.species-detail-content .record-section + .collapsible-section {
    margin-top: var(--space-2);
}
.species-detail-content .collapsible-section + .collapsible-section {
    margin-top: var(--space-5);
}
/* ============================================================
   FINE TYPOGRAPHIC DETAILS
   ============================================================ */
.scientific-name {
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-style: italic;
}
.muted {
    color: var(--ink-faint);
}
.secondary {
    color: var(--ink-soft);
}
/* ============================================================
   BUTTON / LINK STATES
   ============================================================ */
button,
a,
input {
    -webkit-user-select: none;
}
input {
    -webkit-user-select: text;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline:
        2px solid var(--focus);
    outline-offset: 2px;
}
/* ============================================================
   PRINT
   ============================================================ */
@media print {
    :root {
        --paper: #ffffff;
        --paper-light: #ffffff;
        --paper-dark: #eeeeee;
        --ink: #000000;
        --ink-soft: #333333;
        --ink-faint: #555555;
        --brown: #333333;
        --brown-dark: #000000;
        --line: #aaaaaa;
        --line-dark: #777777;
    }
    body {
        background: #ffffff;
    }
    .site-header,
    .site-footer,
    .catalogue-search,
    .catalogue-pagination,
    .detail-navigation,
    .connection-notice,
    .button {
        display: none !important;
    }
    .site-main {
        width: 100%;
    }
    .species-detail-view {
        max-width: none;
        padding:
            0
            0
            20px;
    }
    .species-detail-content {
        display: block !important;
    }
    .collapsible-section {
        break-inside: avoid;
    }
    .section-content {
        display: block !important;
    }
}
/* ============================================================
   TABLET SKELETONS
   ============================================================ */
@media (max-width: 800px) {
    .skeleton-row {
        grid-template-columns:
            minmax(0, 1fr)
            105px
            auto;
    }
    .skeleton-row .skeleton-meta:nth-of-type(3) {
        display: none;
    }
    .skeleton-action {
        padding-left: 12px;
        padding-right: 12px;
    }
}
/* ============================================================
   MOBILE SKELETONS
   ============================================================ */
@media (max-width: 620px) {
    .skeleton-row {
        display: block;
        min-height: 0;
    }
    .skeleton-main {
        padding:
            14px
            14px
            10px;
    }
    .skeleton-meta {
        display: inline-flex;
        width: auto;
        min-width: 90px;
        min-height: 0;
        padding:
            8px
            14px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .skeleton-action {
        display: inline-flex;
        min-height: 0;
        padding:
            8px
            14px
            14px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
    .skeleton-line-wide {
        width: 82%;
    }
}
/* ============================================================
   WIDTH SAFETY
   ============================================================ */
@media (max-width: 340px) {
    .site-header,
    .site-main,
    .site-footer {
        width: calc(100% - 18px);
    }
    .society-mark {
        width: 42px;
        height: 42px;
        margin-right: 9px;
        font-size: 12px;
    }
    .site-title {
        font-size: 0.92rem;
    }
    .site-subtitle {
        font-size: 0.6rem;
    }
    .catalogue-title {
        font-size: 1.55rem;
    }
    .search-input {
        font-size: 0.82rem;
    }
}
/* ============================================================
   SPECIES DETAIL — CONSISTENT ACCORDIONS AND OBSERVATIONS
   ============================================================ */
.detail-section {
    margin: 0 0 var(--space-5);
    border-top: 1px solid var(--line-dark);
}
.detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 48px;
    border-bottom: 1px solid var(--line);
}
.detail-section-title {
    margin: 0;
    padding: 10px 0;
    color: var(--brown-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: normal;
    line-height: 1.3;
}
.detail-section[data-expandable="true"] > .detail-section-header > .detail-section-title {
    cursor: pointer;
    flex: 1;
}
.detail-section-title:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
.detail-section-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--paper-light);
    color: var(--brown-dark);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
.detail-section-toggle:hover,
.names-show-more:hover {
    background: var(--paper-dark);
}
.detail-section-content {
    min-width: 0;
    padding: var(--space-4) 0;
}
.section-collapsed {
    display: none !important;
}
.identity-content .record-scientific-name {
    margin: 0 0 5px;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-style: italic;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.identity-content .record-authorship {
    margin: 0 0 var(--space-4);
    color: var(--ink-soft);
    font-size: 0.82rem;
}
.biology-content {
    padding-top: var(--space-2);
}
.trait-category {
    margin: 0 0 var(--space-3);
    border: 1px solid var(--line);
    border-top: 2px solid var(--brown);
    background: var(--paper-light);
}
.trait-category > .detail-section-header {
    min-height: 42px;
    padding: 0 12px;
    border-bottom: 0;
    background: var(--paper-dark);
}
.trait-category .detail-section-title {
    padding: 9px 0;
    font-size: 1.05rem;
}
.trait-category .detail-section-toggle {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    border-color: transparent;
    background: transparent;
}
.trait-category-content {
    padding: 0;
}
.trait-observation-list {
    display: block;
}
.trait-observation-card {
    padding: 13px 12px;
    border-top: 1px solid var(--line);
    background: var(--paper-light);
}
.trait-observation-card:first-child {
    border-top: 0;
}
.trait-observation-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
}
.trait-observation-main .trait-name {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 600;
}
.trait-observation-main .trait-value {
    margin: 0;
    color: var(--brown-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    text-align: right;
    overflow-wrap: anywhere;
}
.trait-provenance-details {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.76rem;
}
.trait-provenance-details summary {
    width: fit-content;
    color: var(--brown);
    cursor: pointer;
}
.trait-provenance-list {
    display: grid;
    grid-template-columns: minmax(95px, 0.28fr) minmax(0, 1fr);
    gap: 5px 12px;
    margin: 10px 0 0;
    padding: 10px 12px;
    border-left: 2px solid var(--line);
    background: #f4f0e7;
}
.trait-provenance-list dt {
    color: var(--ink-faint);
}
.trait-provenance-list dd {
    min-width: 0;
    margin: 0;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}
.names-summary {
    margin: 0 0 var(--space-3);
    color: var(--ink-soft);
    font-size: 0.8rem;
}
.vernacular-name-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}
.vernacular-name-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}
.vernacular-name {
    min-width: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.vernacular-language {
    color: var(--ink-faint);
    font-size: 0.7rem;
    text-align: right;
}
.vernacular-merged {
    grid-column: 1 / -1;
    color: var(--ink-faint);
    font-size: 0.68rem;
}
.name-item-hidden {
    display: none !important;
}
.names-show-more {
    margin-top: var(--space-4);
    padding: 8px 12px;
    border: 1px solid var(--line-dark);
    border-radius: 2px;
    background: var(--paper);
    color: var(--brown-dark);
    font-size: 0.78rem;
    cursor: pointer;
}
@media (max-width: 620px) {
    .detail-section-title { font-size: 1.12rem; }
    .trait-observation-main { display: block; }
    .trait-observation-main .trait-value { margin-top: 4px; text-align: left; }
    .trait-provenance-list { grid-template-columns: 1fr; gap: 2px; }
    .trait-provenance-list dd { margin-bottom: 7px; }
    .vernacular-name-list { grid-template-columns: 1fr; }
}
@media print {
    .section-collapsed,
    .name-item-hidden { display: block !important; }
    .detail-section-toggle,
    .names-show-more { display: none !important; }
    .detail-section { break-inside: avoid; }
    .trait-category-content { display: block !important; }
    .trait-provenance-details > * { display: block; }
}
/* ============================================================
   CURRENT APP.JS CONTRACT ALIGNMENT
   These rules target the classes emitted by the current renderer.
   ============================================================ */
/* Keep long scientific names, identifiers, and API-provided values
   from forcing the page wider than the viewport. */
.species-row,
.species-row > *,
.detail-section,
.detail-section-content,
.record-metadata,
.record-metadata > *,
.trait-observation-card,
.vernacular-name-item {
    min-width: 0;
}
.species-row-name,
.species-row-authorship,
.species-metadata-value,
.record-metadata dd,
.record-description,
.classification-table th,
.classification-table td,
.trait-value,
.vernacular-name {
    overflow-wrap: anywhere;
}
/* The renderer emits empty-state and error-state, rather than the
   older catalogue-empty/catalogue-error names. */
.empty-state,
.error-state {
    padding: 34px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-light);
}
.empty-state h2,
.error-state h2 {
    margin: 0 0 6px;
    color: var(--brown-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-weight: normal;
}
.empty-state p,
.error-state p {
    max-width: 620px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.82rem;
    line-height: 1.65;
}
.error-state,
.species-detail-error {
    border-color: #cdb8b0;
    background: var(--error-background);
}
.error-state h2,
.species-detail-error h2 {
    color: var(--error);
}
.error-state .button,
.species-detail-error .button {
    margin-top: var(--space-3);
}
/* Skeletons generated by app.js use .species-row-skeleton and
   .skeleton-block rather than the older .skeleton-row structure. */
.species-row-skeleton {
    pointer-events: none;
}
.species-row-skeleton:hover {
    background: var(--paper-light);
}
.skeleton-block {
    display: block;
    max-width: 100%;
    background: #dcd7cd;
    animation: skeleton-pulse 1.6s ease-in-out infinite;
}
.skeleton-name {
    width: min(65%, 360px);
    height: 15px;
    margin-bottom: 9px;
}
.skeleton-authorship {
    width: min(38%, 210px);
    height: 10px;
}
.skeleton-metadata {
    width: 76px;
    height: 10px;
}
.skeleton-status {
    width: 62px;
    height: 10px;
}
.skeleton-action {
    width: 70px;
    height: 32px;
}
.species-row-skeleton .species-row-identity,
.species-row-skeleton .species-row-classification,
.species-row-skeleton .species-row-status,
.species-row-skeleton .species-row-action {
    align-self: stretch;
}
@media (prefers-reduced-motion: reduce) {
    .skeleton-block {
        animation: none;
    }
}
/* Catalogue message classes used by the current renderer. */
.catalogue-content > .empty-state,
.catalogue-content > .error-state {
    border-top: 0;
}
.catalogue-content > .error-state {
    border-color: #cdb8b0;
}
/* Current detail renderer: Identity and About use definition lists,
   not the legacy identity-table/about-facts markup. */
.identity-content,
.about-content,
.biology-content,
.classification-content,
.names-content {
    min-width: 0;
}
.record-metadata {
    display: grid;
    grid-template-columns: minmax(145px, 0.32fr) minmax(0, 1fr);
    margin: 0;
    border-top: 1px solid var(--line);
    background: var(--paper-light);
}
.record-metadata dt,
.record-metadata dd {
    min-width: 0;
    margin: 0;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
}
.record-metadata dt {
    background: var(--paper-dark);
    border-right: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.69rem;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.record-metadata dd {
    color: var(--ink);
    font-size: 0.84rem;
}
.record-description {
    max-width: 820px;
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.98rem;
    line-height: 1.8;
    white-space: normal;
}
.identity-content .record-metadata {
    margin-top: var(--space-4);
}
.about-content .record-metadata {
    margin-top: var(--space-5);
}
/* Classification rows are created with semantic table cells. */
.classification-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--paper-light);
}
.classification-table caption {
    padding: 0 0 var(--space-2);
    color: var(--ink-faint);
    font-size: 0.75rem;
    text-align: left;
}
.classification-table th,
.classification-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.classification-table th {
    width: 30%;
    color: var(--ink-faint);
    font-size: 0.68rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.classification-table td {
    color: var(--brown-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.88rem;
}
.classification-table tr:last-child th,
.classification-table tr:last-child td {
    border-bottom: 0;
}
/* Keep expandable section controls visibly interactive and readable. */
.detail-section-header {
    min-width: 0;
}
.detail-section[data-expandable="true"] .detail-section-toggle {
    flex: 0 0 34px;
}
.detail-section-toggle:focus-visible,
.names-show-more:focus-visible,
.back-button:focus-visible,
.species-examine-button:focus-visible,
.button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
.trait-provenance-details summary:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
/* At tablet widths, use two clear rows so all four current catalogue
   row regions remain visible without squeezing metadata into columns. */
@media (max-width: 800px) {
    .species-row:not(.species-row-skeleton) {
        grid-template-areas:
            "identity action"
            "classification status";
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .species-row-identity {
        grid-area: identity;
    }
    .species-row-classification {
        grid-area: classification;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .species-row-status {
        grid-area: status;
        border-left: 1px solid var(--line);
        border-top: 1px solid var(--line);
        padding: 8px 12px;
    }
    .species-row-action {
        grid-area: action;
        justify-content: flex-end;
        border-left: 1px solid var(--line);
    }
    .species-row-skeleton {
        grid-template-columns: minmax(0, 1fr) 105px auto;
    }
    .species-row-skeleton .species-row-identity,
    .species-row-skeleton .species-row-classification,
    .species-row-skeleton .species-row-status,
    .species-row-skeleton .species-row-action {
        grid-area: auto;
    }
    .species-row-skeleton .species-row-status {
        display: none;
    }
}
@media (max-width: 620px) {
    .empty-state,
    .error-state {
        padding: 26px 16px;
    }
    .species-row:not(.species-row-skeleton) {
        display: grid;
        grid-template-areas:
            "identity"
            "classification"
            "status"
            "action";
        grid-template-columns: minmax(0, 1fr);
    }
    .species-row-identity {
        grid-area: identity;
    }
    .species-row-classification {
        grid-area: classification;
        flex-wrap: wrap;
        gap: 5px 14px;
    }
    .species-row-status {
        grid-area: status;
        border-left: 0;
    }
    .species-row-action {
        grid-area: action;
        justify-content: flex-start;
        border-left: 0;
    }
    .species-row-skeleton {
        display: block;
    }
    .species-row-skeleton .species-row-identity {
        padding: 14px;
    }
    .species-row-skeleton .species-row-classification,
    .species-row-skeleton .species-row-status,
    .species-row-skeleton .species-row-action {
        display: none;
    }
    .record-metadata {
        grid-template-columns: minmax(0, 1fr);
    }
    .record-metadata dt {
        padding-bottom: 4px;
        border-right: 0;
        border-bottom: 0;
    }
    .record-metadata dd {
        padding-top: 4px;
    }
    .classification-table,
    .classification-table tbody,
    .classification-table tr,
    .classification-table th,
    .classification-table td {
        display: block;
        width: 100%;
    }
    .classification-table tr {
        padding: 8px 0;
        border-bottom: 1px solid var(--line);
    }
    .classification-table th,
    .classification-table td {
        padding: 2px 0;
        border: 0;
    }
    .classification-table th {
        font-size: 0.65rem;
    }
    .classification-table td {
        font-size: 0.9rem;
    }
}
@media print {
    .section-collapsed {
        display: block !important;
    }
    .detail-section-toggle,
    .names-show-more {
        display: none !important;
    }
    .name-item-hidden {
        display: list-item !important;
    }
    .trait-provenance-details {
        display: block;
    }
    .trait-provenance-details > * {
        display: block;
    }
}
/* ============================================================
   GRAND EXPLORER'S SOCIETY
   Informational Pages — Sources, About and Legal
   ============================================================ */

.information-page {
    width: 100%;
    min-width: 0;
}

.information-page-header {
    margin-bottom: var(--space-5);
}

.information-page-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.information-page-section {
    min-width: 0;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--line);
}

.information-page-section:first-child {
    padding-top: 0;
}

.information-page-section:last-of-type {
    border-bottom: none;
}

.information-page-section > .detail-section-title {
    margin-top: 0;
    margin-bottom: var(--space-3);
}

.information-page-section > p {
    max-width: 78ch;
    line-height: 1.75;
}

.information-page-section > p:last-child {
    margin-bottom: 0;
}

.information-page-effective-date {
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.8rem;
    line-height: 1.6;
}

/* Keep informational content comfortable on narrow screens. */
@media (max-width: 640px) {
    .information-page-header {
        margin-bottom: var(--space-4);
    }

    .information-page-section {
        padding: var(--space-3) 0;
    }

    .information-page-section > p {
        max-width: none;
    }
}
/* ============================================================
   CONSISTENT PAGE SPACING BELOW PRIMARY NAVIGATION
   ============================================================ */

/*
   Keep informational pages aligned with the existing catalogue
   and species-detail views without overriding their own padding.
*/
.site-main > .information-page {
    padding-top: var(--space-9);
    padding-bottom: var(--space-10);
}

/* Keep the information-page heading aligned with its content. */
.site-main > .information-page > .information-page-header {
    margin-top: 0;
}

/* Match the existing tablet spacing of the main views. */
@media (max-width: 800px) {
    .site-main > .information-page {
        padding-top: var(--space-7);
    }
}

/* Match the existing mobile spacing of the main views. */
@media (max-width: 620px) {
    .site-main > .information-page {
        padding-top: var(--space-6);
        padding-bottom: var(--space-8);
    }
}


.section-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0;
}

.section-chevron::before {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 160ms ease;
}

.section-chevron.is-expanded::before {
    transform: translateY(2px) rotate(225deg);
}