/* Compact species rows: only the tallest content in each row determines space. */
.archive-grid{column-gap:25px;row-gap:36px}
.archive-grid .specimen{display:flex;flex-direction:column;min-width:0}
.archive-grid .specimen-caption{display:flex;flex-direction:column;flex:1;padding:17px 1px 0;min-width:0}
.archive-grid .specimen-caption h3{margin:0 0 12px;min-height:2.1em;overflow-wrap:anywhere}
.archive-grid .specimen-status .species-status{margin:0;gap:6px}
.archive-grid .specimen-status .species-status li{padding:4px 8px;font-size:12px;line-height:1.5}
.archive-grid .specimen-more{margin:14px 0 0;padding-top:0;align-self:flex-start}
@supports(grid-template-rows:subgrid){
 .archive-grid{row-gap:0}
 .archive-grid .specimen{display:grid;grid-row:span 4;grid-template-rows:subgrid;row-gap:0;margin-bottom:36px}
 .archive-grid .specimen-image{grid-row:1}
 .archive-grid .specimen-caption{display:grid;grid-row:2 / span 3;grid-template-rows:subgrid;row-gap:0}
 .archive-grid .specimen-caption h3{grid-row:1;min-height:0;align-self:start}
 .archive-grid .specimen-status{grid-row:2;align-self:start}
 .archive-grid .specimen-more{grid-row:3;align-self:start;justify-self:start}
}
.archive-tools{flex-wrap:wrap}
.archive-search{flex:0 1 290px;width:290px;max-width:100%;min-width:0;gap:10px}
.archive-search svg{flex:0 0 16px}
.archive-search input{flex:1 1 0;min-width:0;width:100%;font-size:15px;letter-spacing:normal;padding-inline:0}
.archive-search input::placeholder{font-size:14px;letter-spacing:normal;opacity:1}
@media(max-width:680px){
 .archive-search{flex:0 0 auto;width:100%;max-width:none}
 .archive-search input{font-size:16px}
 .archive-grid .specimen-caption h3{min-height:0}
 .archive-grid .specimen{margin-bottom:0}
 @supports(grid-template-rows:subgrid){.archive-grid .specimen{margin-bottom:28px}}
}

.team-photo-empty{display:grid;place-items:center;aspect-ratio:370/330;background:#e3e2cf;color:#46564a;font-size:14px}
[data-team-list]>.team-section{padding-bottom:65px}
@media(max-width:480px){[data-team-list]>.team-section{padding-bottom:45px}}
/* Clear section hierarchy for board and advisory portraits. */
[data-team-list]>.team-section>h2{
 font-size:clamp(30px,3.2vw,44px);
 line-height:1.2;
 color:#204b39;
 margin:0 0 34px;
}
[data-team-list]>.team-section+.team-section{
 border-top:1px solid #a8b09b;
 padding-top:48px;
}
@media(max-width:480px){
 [data-team-list]>.team-section>h2{font-size:30px;margin-bottom:26px}
 [data-team-list]>.team-section+.team-section{padding-top:32px}
}

/* Compact map entry and larger foliage, behind all readable content. */
.archive-page>.atlas-section{margin-top:0;padding-top:24px;isolation:isolate;overflow:hidden}
.archive-page>.atlas-section::before{clip-path:none;background:#75252a}
.archive-page .atlas-heading h1{margin:0;font-size:clamp(28px,2.65vw,38px);line-height:1.22;color:#fff8ed}
.archive-page .atlas-section>.archive-map-vine{position:absolute;top:0;right:-28px;width:180px;height:auto;max-height:340px;min-height:0;object-fit:contain;object-position:top right;z-index:0;pointer-events:none}
.archive-page .atlas-heading,.archive-page .region-explorer{position:relative;z-index:2}
@media(min-width:981px){.archive-page .atlas-section .atlas-map{margin-top:0}}
@media(max-width:980px){
 .archive-page>.atlas-section{padding-top:20px}
 .archive-page .atlas-heading h1{font-size:30px}
 .archive-page .atlas-section .region-explorer{margin-top:12px}
 .archive-page .atlas-section>.archive-map-vine{width:110px;right:-28px;max-height:240px}
 .archive-page .atlas-heading{padding-right:35px}
}

/* Match the plant's complete right edge to the paper silhouette. */
@media(min-width:1360px){
 .archive-page .atlas-section>.archive-map-vine{right:0;
  -webkit-mask:linear-gradient(#000,#000) left top / calc(100% - 12px) 100% no-repeat,url('../media/desktop-paper-edge.svg') right var(--desktop-edge-phase,0px) / 12px 240px repeat-y;
  mask:linear-gradient(#000,#000) left top / calc(100% - 12px) 100% no-repeat,url('../media/desktop-paper-edge.svg') right var(--desktop-edge-phase,0px) / 12px 240px repeat-y;
 }
 .archive-page .atlas-section>.archive-map-vine[data-desktop-plant-mask]{
  -webkit-mask:var(--desktop-plant-mask) 0 0 / 100% 100% no-repeat;
  mask:var(--desktop-plant-mask) 0 0 / 100% 100% no-repeat;
 }
}

/* Larger atlas thumbnails without introducing fixed row heights. */
.atlas-section .region-thumb{width:64px;height:64px;flex-basis:64px;box-sizing:border-box}
@media(max-width:980px){.atlas-section .region-thumb{width:72px;height:72px;flex-basis:72px}}
@media(max-width:380px){.atlas-section .region-thumb{width:60px;height:60px;flex-basis:60px}}
.atlas-section .region-note-content{position:relative}
.atlas-section .region-species{overflow-y:scroll;scrollbar-gutter:stable}
.atlas-section .region-species.has-scroll-indicator{scrollbar-width:none;padding-right:14px}
.atlas-section .region-species.has-scroll-indicator::-webkit-scrollbar{display:none}
.region-scroll-track{position:absolute;right:0;width:6px;background:#dddcc8;border-radius:4px;pointer-events:none}
.region-scroll-thumb{position:absolute;top:0;left:0;width:100%;background:#81916f;border-radius:4px}

/* Native smooth scrolling for anchors, respecting motion preferences. */
@media(prefers-reduced-motion:no-preference){html:not([data-motion="paused"]){scroll-behavior:smooth}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Geometric clipping avoids full-height alpha masks on desktop backgrounds. */
@media(min-width:1360px){
 body[data-page] [data-desktop-surface-clip="before"]::before,
 body[data-page][data-desktop-surface-clip="before"]::before,
 body[data-page] [data-desktop-surface-clip="after"]::after{
  -webkit-mask:none;mask:none;clip-path:var(--desktop-surface-clip);
 }
}

/* Project fact cards: labels above values, never split words arbitrarily. */
.project-species-sheet dl>div{grid-template-columns:minmax(0,1fr);gap:4px}
.project-species-sheet dt,.project-species-sheet dd{hyphens:none;word-break:normal;overflow-wrap:normal}
/* German dictionary hyphenation in full portraits, with a visible hyphen. */
.species-record .species-facts th,.species-record .species-facts td,
.species-record .record-description{hyphens:none;-webkit-hyphens:none;word-break:normal;overflow-wrap:normal}
.species-record .species-facts tr:first-child td{hyphens:none;-webkit-hyphens:none}
/* Home plants align with the actual desktop paper rather than the viewport. */
@media(min-width:1360px){
 body[data-page="home"] .atlas-section .atlas-fern{right:-24px}
 body[data-page="home"] .specimen-section .botanical-edge::before{left:calc((100% - var(--desktop-page-width))/2 - 12px)}
}

/* Each word moves as a whole; only oversized words wrap within their box. */
.species-record .portrait-word{display:inline-block;max-width:100%;vertical-align:baseline;hyphens:auto;-webkit-hyphens:auto;hyphenate-character:"-";word-break:normal;overflow-wrap:normal}
.species-record .species-facts tr:first-child td .portrait-word{hyphens:none;-webkit-hyphens:none}

/* Exact atlas corner anchoring; the top stem is at the mirrored image's left edge. */
@media(min-width:1360px){
 body[data-page="home"] .specimen-section .botanical-edge::before{
  left:var(--home-vine-x,4px);top:var(--home-vine-y,22px);background-position:left top;
 }
}

/* Alphabetical navigation above the portrait columns. */
.species-navigation{position:relative;z-index:3;display:flex;justify-content:space-between;gap:20px;margin-bottom:24px;font-size:14px;line-height:1.5}
.species-navigation>*{max-width:48%}.species-navigation>:last-child{text-align:right;margin-left:auto}
.species-navigation-disabled{opacity:.5}
