/* =========================================================
   NatureGuard Species Page V2
   Isolated production layer; loaded only on species pages.
   ========================================================= */

.ngsp2-body {
    --ngsp2-green-950: #0d2f1c;
    --ngsp2-green-900: #123b24;
    --ngsp2-green-800: #17542f;
    --ngsp2-green-700: #1c6b3b;
    --ngsp2-green-600: #23834a;
    --ngsp2-green-100: #e8f4ec;
    --ngsp2-green-50: #f4faf6;
    --ngsp2-ink: #173226;
    --ngsp2-muted: #62766a;
    --ngsp2-line: rgba(18, 62, 37, 0.12);
    --ngsp2-card: rgba(255, 255, 255, 0.98);
    --ngsp2-page: #f2f7f3;
    --ngsp2-shadow: 0 18px 50px rgba(17, 57, 34, 0.09);
    --ngsp2-shadow-soft: 0 8px 26px rgba(17, 57, 34, 0.07);
    --ngsp2-radius-xl: 28px;
    --ngsp2-radius-lg: 22px;
    --ngsp2-radius-md: 16px;
    background: var(--ngsp2-page) !important;
    color: var(--ngsp2-ink) !important;
}

.ngsp2-body > header {
    padding: 15px clamp(20px, 3vw, 44px);
}

.ngsp2-body > header h1 {
    font-size: clamp(22px, 2vw, 30px);
}

.ngsp2-body > nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 4px;
    padding: 9px clamp(20px, 3vw, 44px);
}

.ngsp2-body > nav a {
    margin-right: 12px;
}

.ngsp2-body > main {
    padding: 0 0 80px !important;
}

.ngsp2-page {
    width: 100%;
}

.ngsp2-hero-section,
.ngsp2-tabs,
.ngsp2-main {
    width: min(1440px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Hero */

.ngsp2-hero-section {
    margin-top: 32px;
}

.ngsp2-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: var(--ngsp2-radius-xl);
    background: #173126;
    box-shadow: var(--ngsp2-shadow);
}

.ngsp2-hero-image,
.ngsp2-hero-placeholder {
    display: block;
    width: 100%;
    height: 520px;
    object-fit: cover;
}

.ngsp2-hero-image {
    cursor: zoom-in;
}

.ngsp2-hero-placeholder {
    display: grid;
    place-items: center;
    font-size: 86px;
    background: linear-gradient(135deg, #dfeee4, #bfd8c8);
}

.ngsp2-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 25, 15, 0.70) 0%, rgba(8, 25, 15, 0.22) 58%, rgba(8, 25, 15, 0.07) 100%),
        linear-gradient(0deg, rgba(8, 25, 15, 0.62) 0%, transparent 48%);
    pointer-events: none;
}

.ngsp2-hero-content {
    position: absolute;
    z-index: 2;
    left: clamp(28px, 5vw, 72px);
    right: clamp(28px, 5vw, 72px);
    bottom: clamp(54px, 8vw, 88px);
    max-width: 820px;
    color: white;
}

.ngsp2-category-pill,
.ngsp2-trust-pill,
.ngsp2-source-chip,
.ngsp2-language-badge,
.ngsp2-section-status,
.ngsp2-season-chip,
.ngsp2-media-role {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.ngsp2-category-pill {
    padding: 7px 12px;
    background: rgba(10, 34, 20, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 13px;
}

.ngsp2-hero-content h1 {
    margin: 12px 0 4px;
    font-size: clamp(44px, 5vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.ngsp2-secondary-name {
    margin-top: 10px;
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 650;
    opacity: 0.95;
}

.ngsp2-latin-name {
    margin-top: 5px;
    font-size: clamp(16px, 1.6vw, 21px);
    opacity: 0.86;
}

.ngsp2-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.ngsp2-trust-pill {
    padding: 8px 12px;
    background: rgba(8, 29, 17, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
    font-size: 12px;
}

.ngsp2-photo-credit {
    position: absolute;
    z-index: 2;
    left: 18px;
    bottom: 14px;
    max-width: calc(100% - 36px);
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(6, 20, 12, 0.66);
    color: rgba(255, 255, 255, 0.90);
    font-size: 11px;
}

.ngsp2-fact-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.ngsp2-fact {
    min-height: 82px;
    padding: 16px 18px;
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-md);
    background: var(--ngsp2-card);
    box-shadow: var(--ngsp2-shadow-soft);
}

.ngsp2-fact span {
    display: block;
    margin-bottom: 7px;
    color: var(--ngsp2-muted);
    font-size: 12px;
    font-weight: 750;
}

.ngsp2-fact strong {
    display: block;
    font-size: clamp(18px, 1.7vw, 24px);
    line-height: 1.15;
    color: var(--ngsp2-green-950);
}

/* Sticky section navigation */

.ngsp2-tabs {
    position: sticky;
    top: 10px;
    z-index: 50;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
    overflow-x: auto;
    border: 1px solid var(--ngsp2-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--ngsp2-shadow-soft);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
}

.ngsp2-tabs::-webkit-scrollbar {
    display: none;
}

.ngsp2-tabs a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--ngsp2-green-900) !important;
    background: var(--ngsp2-green-50);
    border: 1px solid var(--ngsp2-line);
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.ngsp2-tabs a:hover,
.ngsp2-tabs a.is-active {
    color: white !important;
    background: var(--ngsp2-green-700);
    border-color: var(--ngsp2-green-700);
}

/* Main content and section rhythm */

.ngsp2-main {
    margin-top: 24px;
}

.ngsp2-section {
    scroll-margin-top: 92px;
    margin: 0 0 24px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-xl);
    background: var(--ngsp2-card);
    box-shadow: var(--ngsp2-shadow);
}

.ngsp2-section-heading,
.ngsp2-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.ngsp2-section-heading {
    margin-bottom: 24px;
}

.ngsp2-section-heading h2,
.ngsp2-card-heading h2 {
    margin: 4px 0 0;
    color: var(--ngsp2-green-950);
    letter-spacing: -0.035em;
}

.ngsp2-section-heading h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.ngsp2-card-heading h2 {
    font-size: clamp(24px, 2.3vw, 32px);
}

.ngsp2-section-heading p {
    max-width: 820px;
    margin: 8px 0 0;
    color: var(--ngsp2-muted);
    font-size: 15px;
    line-height: 1.55;
}

.ngsp2-kicker {
    color: var(--ngsp2-green-600);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.ngsp2-section-status,
.ngsp2-source-chip {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: var(--ngsp2-green-800);
    background: var(--ngsp2-green-100);
    border: 1px solid rgba(35, 131, 74, 0.16);
    font-size: 12px;
}

/* Distribution map */

.ngsp2-range-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.75fr);
    gap: 22px;
}

.ngsp2-map-card,
.ngsp2-range-summary,
.ngsp2-profile-card,
.ngsp2-science-card,
.ngsp2-encyclopedia-card,
.ngsp2-sources-card,
.ngsp2-table-wrap {
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-lg);
    background: #fbfdfb;
}

.ngsp2-map-card {
    position: relative;
    padding: 14px;
    min-width: 0;
}

.ngsp2-map-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin: 0 0 10px;
}

.ngsp2-map-toolbar button {
    padding: 7px 11px;
    border: 1px solid var(--ngsp2-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ngsp2-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.ngsp2-map-toolbar button:hover,
.ngsp2-map-toolbar button:focus-visible,
.ngsp2-map-toolbar button.is-active {
    outline: none;
    border-color: rgba(35, 131, 74, 0.35);
    background: var(--ngsp2-green-100);
    color: var(--ngsp2-green-800);
}

.ngsp2-map-toolbar button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.ngsp2-range-map {
    position: relative;
    min-height: 440px;
    overflow: hidden;
    border: 1px solid rgba(44, 94, 68, 0.14);
    border-radius: 16px;
    background: #dceef2;
    isolation: isolate;
}

.ngsp2-map-svg {
    display: block;
    width: 100%;
    height: 440px;
    transition: viewBox 280ms ease;
}

.ngsp2-map-ocean {
    fill: #dceef2;
}

.ngsp2-map-country {
    fill: #eff4f0;
    stroke: #aabbb0;
    stroke-width: 0.75;
    vector-effect: non-scaling-stroke;
    transition: fill 160ms ease, opacity 160ms ease, stroke-width 160ms ease;
}

.ngsp2-map-country:hover,
.ngsp2-map-country:focus-visible {
    outline: none;
    fill: #dce8df;
    stroke: #6f8c79;
    stroke-width: 1.6;
}

.ngsp2-map-country.is-range {
    fill: var(--range-color);
    fill-opacity: 0.62;
    stroke: var(--range-color);
    stroke-width: 1.25;
    cursor: help;
}

.ngsp2-map-country.is-range:hover,
.ngsp2-map-country.is-range:focus-visible {
    fill-opacity: 0.82;
    stroke-width: 2.2;
}

.ngsp2-map-country.is-qualified {
    fill-opacity: 0.24;
    stroke-dasharray: 6 5;
    stroke-width: 2;
}

.ngsp2-map-loading,
.ngsp2-map-fallback,
.ngsp2-map-no-countries {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    color: var(--ngsp2-muted);
    font-weight: 750;
}

.ngsp2-map-no-countries {
    inset: auto 18px 18px;
    z-index: 3;
    border: 1px solid rgba(44, 94, 68, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--ngsp2-shadow-soft);
    font-size: 12px;
}

.ngsp2-map-tooltip {
    position: absolute;
    z-index: 12;
    width: min(220px, calc(100% - 24px));
    padding: 10px 12px;
    border: 1px solid var(--ngsp2-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--ngsp2-ink);
    box-shadow: var(--ngsp2-shadow-soft);
    pointer-events: none;
    font-size: 12px;
}

.ngsp2-map-tooltip strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ngsp2-green-950);
}

.ngsp2-map-tooltip ul {
    margin: 0;
    padding-left: 16px;
}

.ngsp2-map-tooltip small {
    display: block;
    color: var(--ngsp2-muted);
}

.ngsp2-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
    color: var(--ngsp2-muted);
    font-size: 12px;
    font-weight: 750;
}

.ngsp2-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ngsp2-legend {
    width: 11px;
    height: 11px;
    border-radius: 3px;
}

.ngsp2-legend.resident { background: #2f9e5b; }
.ngsp2-legend.breeding { background: #f59e0b; }
.ngsp2-legend.wintering { background: #3182ce; }
.ngsp2-legend.passage { background: #eab308; }
.ngsp2-legend.qualified {
    background: repeating-linear-gradient(135deg, #2f9e5b 0 3px, transparent 3px 6px);
    border: 1px solid #2f9e5b;
}

.ngsp2-range-summary {
    padding: 18px;
}

.ngsp2-range-status-grid {
    display: grid;
    gap: 10px;
}

.ngsp2-range-status-grid article {
    padding: 14px;
    border-radius: 14px;
    background: white;
    border: 1px solid var(--ngsp2-line);
}

.ngsp2-range-status-grid span {
    display: block;
    margin-bottom: 5px;
    color: var(--ngsp2-muted);
    font-size: 11px;
    font-weight: 800;
}

.ngsp2-range-status-grid strong {
    font-size: 15px;
}

.ngsp2-area-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 10px;
}

.ngsp2-area-heading h3 {
    margin: 0;
    font-size: 18px;
}

.ngsp2-area-heading span {
    color: var(--ngsp2-muted);
    font-size: 12px;
}

.ngsp2-area-list {
    display: grid;
    gap: 8px;
    max-height: 330px;
    overflow: auto;
    padding-right: 3px;
}

.ngsp2-area-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--ngsp2-line);
    border-radius: 13px;
    background: white;
}

.ngsp2-area-row strong,
.ngsp2-area-row > div > span {
    display: block;
}

.ngsp2-area-row strong {
    font-size: 13px;
}

.ngsp2-area-row > div > span {
    margin-top: 3px;
    color: var(--ngsp2-muted);
    font-size: 11px;
}

.ngsp2-season-chip {
    padding: 6px 8px;
    color: var(--ngsp2-green-900);
    background: var(--ngsp2-green-100);
    font-size: 10px;
    text-align: center;
}

/* Profile */

.ngsp2-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.ngsp2-profile-card {
    padding: 20px;
}

.ngsp2-profile-card header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.ngsp2-profile-card header > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--ngsp2-green-100);
}

.ngsp2-profile-card h3 {
    margin: 0;
    font-size: 19px;
}

.ngsp2-profile-card dl,
.ngsp2-sex-grid dl {
    margin: 0;
}

.ngsp2-profile-card dl > div,
.ngsp2-sex-grid dl > div {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.25fr);
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--ngsp2-line);
}

.ngsp2-profile-card dt,
.ngsp2-sex-grid dt {
    color: var(--ngsp2-muted);
    font-size: 12px;
}

.ngsp2-profile-card dd,
.ngsp2-sex-grid dd {
    margin: 0;
    text-align: right;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

/* Science cards */

.ngsp2-science {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.ngsp2-science-card {
    scroll-margin-top: 92px;
    padding: clamp(20px, 2.6vw, 30px);
    box-shadow: var(--ngsp2-shadow-soft);
}

.ngsp2-ecology-card {
    grid-column: 1 / -1;
}

.ngsp2-stat-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.ngsp2-stat-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-md);
    background: white;
}

.ngsp2-stat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--ngsp2-green-100);
    font-size: 22px;
}

.ngsp2-stat-row div > span,
.ngsp2-stat-row div > strong {
    display: block;
}

.ngsp2-stat-row div > span {
    color: var(--ngsp2-muted);
    font-size: 12px;
}

.ngsp2-stat-row div > strong {
    margin-top: 4px;
    font-size: 24px;
}

.ngsp2-note {
    margin: 18px 0 0;
    padding: 13px 15px;
    border-radius: 13px;
    color: var(--ngsp2-muted);
    background: var(--ngsp2-green-50);
    font-size: 12px;
    line-height: 1.55;
}

.ngsp2-sex-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.ngsp2-sex-grid > article {
    padding: 16px;
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-md);
    background: white;
}

.ngsp2-sex-grid h3 {
    margin: 0 0 10px;
}

.ngsp2-ecology-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.ngsp2-ecology-panel {
    padding: 20px;
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-lg);
    background: white;
}

.ngsp2-ecology-panel h3 {
    margin: 0;
    font-size: 20px;
}

.ngsp2-ecology-panel > p {
    color: var(--ngsp2-muted);
    font-size: 13px;
    line-height: 1.55;
}

.ngsp2-vector-row {
    margin-top: 14px;
}

.ngsp2-vector-row > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 13px;
}

.ngsp2-vector-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9f0eb;
}

.ngsp2-vector-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--ngsp2-green-600), #72b788);
}

.ngsp2-evidence-details {
    margin-top: 16px;
    color: var(--ngsp2-muted);
    font-size: 12px;
}

.ngsp2-evidence-details summary {
    cursor: pointer;
    color: var(--ngsp2-green-800);
    font-weight: 800;
}

/* Encyclopedia */

.ngsp2-encyclopedia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}

.ngsp2-encyclopedia-card {
    padding: 22px;
}

.ngsp2-encyclopedia-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ngsp2-encyclopedia-card h3 {
    margin: 0;
    font-size: 21px;
}

.ngsp2-language-badge {
    padding: 6px 8px;
    color: #80580d;
    background: #fff7dd;
    border: 1px solid #f1d991;
    font-size: 10px;
}

.ngsp2-translation-note {
    margin: 12px 0 0;
    color: #80580d;
    font-size: 11px;
}

.ngsp2-encyclopedia-copy {
    margin: 14px 0 0;
    color: #284234;
    font-size: 16px;
    line-height: 1.72;
    white-space: pre-line;
}

/* Gallery */

.ngsp2-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(210px, auto);
    gap: 14px;
}

.ngsp2-gallery-item {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--ngsp2-line);
    border-radius: var(--ngsp2-radius-lg);
    background: white;
}

.ngsp2-gallery-featured {
    grid-column: span 2;
    grid-row: span 2;
}

.ngsp2-gallery-button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 230px;
    padding: 0;
    border: 0;
    background: #e8f0ea;
    cursor: zoom-in;
}

.ngsp2-gallery-featured .ngsp2-gallery-button {
    min-height: 480px;
}

.ngsp2-gallery-button img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.ngsp2-media-role {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 9px;
    color: white;
    background: rgba(10, 34, 20, 0.72);
    font-size: 10px;
}

.ngsp2-gallery-item figcaption {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
}

.ngsp2-gallery-item figcaption strong {
    font-size: 13px;
}

.ngsp2-gallery-item figcaption span {
    color: var(--ngsp2-muted);
    font-size: 10px;
}

.ngsp2-gallery-more {
    margin: 14px 0 0;
    color: var(--ngsp2-muted);
    text-align: right;
    font-size: 12px;
}

/* Sources / tables */

.ngsp2-sources-card,
.ngsp2-table-wrap {
    padding: 20px;
}

.ngsp2-sources-card ul {
    margin: 0;
    padding-left: 22px;
}

.ngsp2-sources-card li + li {
    margin-top: 9px;
}

.ngsp2-table-wrap {
    overflow-x: auto;
}

.ngsp2-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.ngsp2-table th,
.ngsp2-table td {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--ngsp2-line);
}

.ngsp2-table th {
    color: var(--ngsp2-green-900);
    background: var(--ngsp2-green-50);
}

/* Lightbox */

.ngsp2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(4, 14, 8, 0.92);
}

.ngsp2-lightbox.is-open {
    display: flex;
}

.ngsp2-lightbox img {
    display: block;
    max-width: min(94vw, 1600px);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 14px;
}

.ngsp2-lightbox-close {
    position: absolute;
    right: 22px;
    top: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    font-size: 28px;
    cursor: pointer;
}

.ngsp2-lightbox-caption {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 14px;
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-size: 13px;
}

.ngsp2-no-scroll {
    overflow: hidden;
}

/* Responsive */

@media (max-width: 1050px) {
    .ngsp2-range-layout {
        grid-template-columns: 1fr;
    }

    .ngsp2-area-list {
        max-height: 260px;
    }

    .ngsp2-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .ngsp2-hero-section,
    .ngsp2-tabs,
    .ngsp2-main {
        width: min(100% - 24px, 1440px);
    }

    .ngsp2-hero,
    .ngsp2-hero-image,
    .ngsp2-hero-placeholder {
        height: 450px;
        min-height: 450px;
    }

    .ngsp2-hero-content {
        left: 24px;
        right: 24px;
        bottom: 62px;
    }

    .ngsp2-science,
    .ngsp2-ecology-grid {
        grid-template-columns: 1fr;
    }

    .ngsp2-ecology-card {
        grid-column: auto;
    }

    .ngsp2-range-map,
    .ngsp2-map-svg {
        min-height: 360px;
        height: 360px;
    }

    .ngsp2-encyclopedia-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .ngsp2-body > nav .top-search {
        order: 10;
        width: 100%;
        margin: 4px 0 0;
    }

    .ngsp2-hero-section {
        margin-top: 14px;
    }

    .ngsp2-hero,
    .ngsp2-hero-image,
    .ngsp2-hero-placeholder {
        height: 390px;
        min-height: 390px;
        border-radius: 20px;
    }

    .ngsp2-hero-content h1 {
        font-size: 39px;
    }

    .ngsp2-secondary-name {
        font-size: 17px;
    }

    .ngsp2-trust-row {
        gap: 5px;
    }

    .ngsp2-trust-pill {
        padding: 6px 8px;
        font-size: 10px;
    }

    .ngsp2-photo-credit {
        font-size: 9px;
    }

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

    .ngsp2-fact {
        min-height: 70px;
        padding: 13px;
    }

    .ngsp2-tabs {
        top: 4px;
        margin-top: 12px;
    }

    .ngsp2-section {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .ngsp2-section-heading,
    .ngsp2-card-heading {
        display: block;
    }

    .ngsp2-section-status,
    .ngsp2-source-chip {
        margin-top: 10px;
    }

    .ngsp2-range-map,
    .ngsp2-map-svg {
        min-height: 300px;
        height: 300px;
    }

    .ngsp2-profile-grid,
    .ngsp2-sex-grid,
    .ngsp2-gallery-grid {
        grid-template-columns: 1fr;
    }

    .ngsp2-gallery-featured {
        grid-column: auto;
        grid-row: auto;
    }

    .ngsp2-gallery-featured .ngsp2-gallery-button,
    .ngsp2-gallery-button {
        min-height: 280px;
    }

    .ngsp2-profile-card dl > div,
    .ngsp2-sex-grid dl > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ngsp2-profile-card dd,
    .ngsp2-sex-grid dd {
        text-align: left;
    }
}
