/* =============================================================
   SGLN Resources library (19/10/2026)
   Library, topic pages, weed guide and single resources. Loaded only on those views (inc/resources.php).
   Uses the site tokens from sgln.css; the weed group colours come from each group (as in Kirby's booklet)
   and arrive as the --g custom property.
   ============================================================= */

.res-page { --panel: #f1f1f2; --chem: #fbf6f1; }
.res-ico { width: 24px; height: 24px; flex: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ---------- Breadcrumbs, intro, jump links ---------- */
.res-crumbs { font-size: .85rem; color: var(--text-muted); padding-top: 1rem; padding-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.res-crumbs a:hover { color: var(--green); text-decoration: underline; }
.res-crumbs span[aria-hidden] { color: #aaa; }
.res-intro { padding: .5rem 0 1rem; }
.res-intro .entry-content { max-width: 50rem; font-size: 1.05rem; }
.res-intro .entry-content p { margin-bottom: 1rem; }
.res-intro .entry-content ul { list-style: disc; margin: 0 0 1rem 1.3rem; }
.res-intro .entry-content a { color: var(--green); text-decoration: underline; }
.res-jump { display: flex; flex-wrap: wrap; gap: .45rem; padding-bottom: 1.5rem; }
.res-jump a { font-size: .85rem; font-weight: 500; padding: .35rem .85rem; border: 1.5px solid var(--green); border-radius: 2rem; color: var(--green); transition: background var(--transition), color var(--transition); }
.res-jump a:hover { background: var(--green); color: #fff; }
.res-hero-type { color: rgba(255,255,255,.85); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.res-section { padding: clamp(1.6rem, 3.5vw, 2.6rem) 0; }
.res-section:nth-of-type(even) { background: var(--bg); }
.res-section__title { font-size: clamp(1.25rem, 2.2vw, 1.55rem); font-weight: 700; color: var(--green-dark); margin-bottom: .6rem; scroll-margin-top: 90px; }
.res-section[id] { scroll-margin-top: 80px; }
.res-section__intro { color: var(--text-muted); max-width: 46rem; margin-bottom: 1.2rem; }
.res-section__intro p + p { margin-top: .6rem; }
.res-section--foot { background: transparent !important; text-align: center; }

/* ---------- Buttons ---------- */
.res-btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--green); color: #fff; font-weight: 600; font-size: .95rem; padding: .7rem 1.25rem; border-radius: 2rem; border: 0; cursor: pointer; transition: background var(--transition); }
.res-btn:hover { background: var(--green-dark); }
.res-btn .res-ico { width: 20px; height: 20px; }
.res-btn--ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.res-btn--ghost:hover { background: var(--green); color: #fff; }

/* ---------- Rows (documents, links, templates, newsletters) ---------- */
.res-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.res-row { display: flex; align-items: flex-start; gap: .85rem; background: #fff; border: 1px solid #e3e1da; border-radius: var(--radius-card); padding: .8rem 1rem; transition: border-color var(--transition), box-shadow var(--transition); min-width: 0; }
a.res-row:hover { border-color: var(--green); box-shadow: var(--shadow); }
a.res-row:hover .res-row__title { color: var(--green-dark); text-decoration: underline; }
.res-row__icon { flex: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--sage-mid); color: #fff; }
.res-row__icon[data-type="guide"], .res-row__icon[data-type="map"] { background: var(--slate); }
.res-row__icon[data-type="template"], .res-row__icon[data-type="document"] { background: var(--green); }
.res-row__icon[data-type="newsletter"], .res-row__icon[data-type="audio"] { background: var(--brown-solid); }
.res-row__icon[data-type="link"] { background: #7a8b84; }
.res-row__icon[data-type="video"] { background: #b5523f; }
.res-row__icon .res-ico { width: 22px; height: 22px; }
.res-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.res-row__title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.res-row__desc { font-size: .85rem; color: var(--text-muted); line-height: 1.45; }
.res-row__meta { flex: none; font-size: .75rem; color: var(--text-muted); white-space: nowrap; padding-top: .15rem; }
.res-row--audio audio { width: 100%; max-width: 420px; margin-top: .4rem; height: 36px; }
.res-rows--compact { grid-template-columns: 1fr; gap: .5rem; }
.res-rows--compact .res-row { padding: .6rem .7rem; border-color: #ececec; }
.res-rows--compact .res-row__desc { display: none; }
@media (max-width: 820px) {
    .res-rows { grid-template-columns: 1fr; }
    .res-row__meta { display: none; }
}

/* ---------- Newsletters by year ---------- */
.res-news { display: flex; flex-direction: column; gap: .6rem; }
.res-news__year { background: #fff; border: 1px solid #e3e1da; border-radius: var(--radius-card); }
.res-news__year summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; align-items: center; gap: .6rem; }
.res-news__year summary::-webkit-details-marker { display: none; }
.res-news__year summary::before { content: '+'; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 600; }
.res-news__year[open] summary::before { content: '−'; }
.res-news__year summary span { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.res-news__year .res-rows { padding: 0 1rem 1rem; }

/* ---------- Video cards (play in place) ---------- */
.res-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; margin-bottom: 1.2rem; }
.res-video-grid + .res-rows { margin-top: .4rem; }
.res-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: #2b3a33; }
.res-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.res-video__play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: linear-gradient(135deg, var(--sage-mid), var(--green-dark)); cursor: pointer; }
.res-video__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.res-video__play:hover img { transform: scale(1.03); }
.res-video__btn { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; transition: background var(--transition); }
.res-video__btn svg { width: 26px; height: 26px; margin-left: 3px; }
.res-video__play:hover .res-video__btn, .res-video__play:focus-visible .res-video__btn { background: var(--green); }
.res-video__dur { position: absolute; right: .5rem; bottom: .5rem; background: rgba(0,0,0,.7); color: #fff; font-size: .75rem; font-weight: 600; padding: .1rem .45rem; border-radius: 4px; }
.res-video-card__title { font-size: 1rem; font-weight: 600; line-height: 1.3; margin-top: .6rem; }
.res-video-card__title a:hover { color: var(--green); text-decoration: underline; }
.res-video-card__meta { font-size: .8rem; color: var(--text-muted); margin-top: .15rem; }
@media (max-width: 1024px) { .res-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .res-video-grid { grid-template-columns: 1fr; } }

/* ---------- Weed / pest cards ---------- */
.res-weed-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.res-weed-card { --g: var(--sage-mid); display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-card); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform var(--transition), box-shadow var(--transition); scroll-margin-top: 110px; }
.res-weed-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.res-weed-card.is-target { outline: 3px solid var(--g); outline-offset: 3px; }
.res-weed-card__top { position: relative; height: 66px; background: var(--g); }
.res-weed-card__tag { position: absolute; right: .7rem; top: .55rem; color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; max-width: 55%; text-align: right; line-height: 1.25; }
.res-weed-card__photo { position: absolute; left: .9rem; bottom: -42px; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; background: var(--g); }
.res-weed-card__photo--none { display: grid; place-items: center; color: #fff; }
.res-weed-card__photo--none .res-ico { width: 38px; height: 38px; }
.res-weed-card__body { padding: 3rem 1rem 1rem; display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.res-weed-card__title { font-size: 1.02rem; font-weight: 700; line-height: 1.25; }
.res-weed-card__sci { font-size: .85rem; color: #444; line-height: 1.35; }
.res-weed-card__decl { font-size: .72rem; font-weight: 700; color: var(--brown-solid); letter-spacing: .03em; margin-top: .2rem; }
.res-weed-card__methods { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; padding-top: .6rem; color: #4a4a4a; }
.res-weed-card__methods .res-ico { width: 20px; height: 20px; }
@media (max-width: 1100px) { .res-weed-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .res-weed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; } }
@media (max-width: 420px) {
    .res-weed-card__top { height: 54px; }
    .res-weed-card__photo { width: 72px; height: 72px; bottom: -34px; left: .7rem; border-width: 4px; }
    .res-weed-card__body { padding: 2.5rem .75rem .8rem; }
    .res-weed-card__tag { display: none; }
}

/* ---------- Library ---------- */
.res-library-hero .page-hero-subtitle { max-width: 640px; }
.res-search { display: flex; align-items: center; gap: .5rem; background: #fff; border-radius: 2rem; padding: .3rem .3rem .3rem 1rem; max-width: 620px; margin-top: .8rem; color: var(--text-muted); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.res-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 1rem; padding: .55rem 0; color: var(--text); background: transparent; }
.res-search button { flex: none; border: 0; border-radius: 2rem; background: var(--green); color: #fff; font: inherit; font-weight: 600; padding: .6rem 1.2rem; cursor: pointer; }
.res-search button:hover { background: var(--green-dark); }
.res-search:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.6), 0 2px 10px rgba(0,0,0,.12); }

.res-topic-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.res-topic-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; background: #fff; border-radius: var(--radius-card); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); border-left: 5px solid var(--sage-mid); transition: transform var(--transition); }
.res-topic-tile:hover { transform: translateY(-2px); }
.res-topic-tile .res-ico { grid-row: 1 / 3; width: 36px; height: 36px; color: var(--green); }
.res-topic-tile__name { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.res-topic-tile__count { font-size: .82rem; color: var(--text-muted); }
.res-topic-tile--guide { border-left-color: #83975a; background: #f6f7f0; }
@media (max-width: 1024px) { .res-topic-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .res-topic-tiles { grid-template-columns: 1fr; } }

.res-filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-bottom: 1.1rem; }
.res-filter { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--text-muted); min-width: 0; }
.res-filter select, .res-filter input { font: inherit; font-size: .95rem; font-weight: 400; color: var(--text); background: #fff; border: 1.5px solid #cfd6cf; border-radius: 8px; padding: .5rem .7rem; min-width: 190px; max-width: 100%; }
.res-filter select:focus, .res-filter input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.res-filter--grow { flex: 1 1 260px; }
.res-filter--grow input { width: 100%; }
.res-filters__go { padding: .55rem 1.2rem; }
.js .res-filters__go { display: none; }
.res-count { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.1rem; }
.res-count a { color: var(--green); text-decoration: underline; }
@media (max-width: 580px) {
    .res-filters { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
    .res-filter select { min-width: 0; width: 100%; }
}

.res-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.res-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-card); overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform var(--transition), box-shadow var(--transition); }
.res-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.res-card__media { position: relative; height: 120px; background: var(--sage-mid); color: #fff; display: grid; place-items: center; overflow: hidden; }
.res-card[data-type="guide"] .res-card__media, .res-card[data-type="map"] .res-card__media { background: var(--slate); }
.res-card[data-type="template"] .res-card__media, .res-card[data-type="document"] .res-card__media { background: var(--green); }
.res-card[data-type="newsletter"] .res-card__media, .res-card[data-type="audio"] .res-card__media { background: var(--brown-solid); }
.res-card[data-type="link"] .res-card__media { background: #7a8b84; }
.res-card__media img { width: 100%; height: 100%; object-fit: cover; }
.res-card__icon { width: 44px; height: 44px; opacity: .95; }
.res-card__play { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.res-card__play svg { width: 22px; height: 22px; margin-left: 3px; }
.res-card__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.res-card__type { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--sage-mid); }
.res-card__title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.res-card__desc { font-size: .85rem; color: var(--text-muted); line-height: 1.45; }
.res-card__meta { font-size: .78rem; color: var(--text-muted); margin-top: auto; padding-top: .4rem; }
.res-card-grid .res-weed-card { height: 100%; }
@media (max-width: 1024px) { .res-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .res-card-grid { grid-template-columns: 1fr; } }

/* ---------- Weed guide panel on the Weeds topic page ---------- */
.res-group-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0 1.4rem; }
.res-group-tile { position: relative; display: flex; flex-direction: column; gap: .5rem; background: var(--g); color: #fff; border-radius: var(--radius-card); padding: 1rem; min-height: 120px; transition: transform var(--transition); }
.res-group-tile:hover { transform: translateY(-2px); }
.res-group-tile .res-ico { width: 34px; height: 34px; }
.res-group-tile__name { font-weight: 700; line-height: 1.25; }
.res-group-tile__count { position: absolute; right: .8rem; top: .7rem; font-weight: 800; font-size: 1.2rem; opacity: .9; }
@media (max-width: 1024px) { .res-group-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 580px) { .res-group-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .res-group-tile { min-height: 100px; } }

/* ---------- Weed guide page ---------- */
.res-guide-help { padding-top: 0 !important; background: transparent !important; }
.res-guide-help__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.res-panel { background: var(--panel); border-radius: var(--radius-card); scroll-margin-top: 90px; }
.res-panel summary { cursor: pointer; padding: 1rem 1.2rem; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; }
.res-panel summary::-webkit-details-marker { display: none; }
.res-panel summary h2 { font-size: 1.15rem; color: var(--green-dark); }
.res-panel summary h2::before { content: '+'; display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-right: .5rem; border-radius: 50%; background: #fff; font-size: 1rem; }
.res-panel[open] summary h2::before { content: '−'; }
.res-panel summary span { font-size: .85rem; color: var(--text-muted); }
.res-panel[open] { grid-column: 1 / -1; }
.res-types { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .5rem 1.2rem; padding: 0 1.2rem 1.2rem; }
.res-types dt { font-weight: 600; display: flex; gap: .5rem; align-items: baseline; }
.res-types dt b, .res-decl b { display: inline-block; background: var(--brown-solid); color: #fff; border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; letter-spacing: .03em; }
.res-types dd { color: var(--text-muted); font-size: .92rem; }
.res-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 0 1.2rem 1rem; }
.res-legend h3 { font-size: 1rem; color: var(--sage-mid); margin-bottom: .6rem; }
.res-legend__item { display: flex; gap: .8rem; margin-bottom: .9rem; }
.res-legend__item .res-ico { width: 30px; height: 30px; color: #2b2b2b; }
.res-legend__item p { font-size: .88rem; color: var(--text-muted); line-height: 1.45; margin-top: .1rem; }
.res-panel .res-caution { margin: 0 1.2rem 1.2rem; }
@media (max-width: 820px) {
    .res-guide-help__grid, .res-legend, .res-types { grid-template-columns: 1fr; }
    .res-types dd { margin-bottom: .5rem; }
}

.res-guide-list { background: transparent !important; padding-top: .5rem !important; }
.res-guide-tools { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; background: #fff; position: sticky; top: 72px; z-index: 5; padding: .7rem 0; border-bottom: 1px solid #ececec; }
.res-guide-count { font-size: .9rem; color: var(--text-muted); margin-left: auto; padding-bottom: .5rem; }
.res-group-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 .4rem; }
.res-group-chips a { font-size: .82rem; font-weight: 600; color: #fff; background: var(--g); padding: .35rem .85rem; border-radius: 2rem; }
.res-group-chips a:hover { filter: brightness(1.08); text-decoration: underline; }
.res-guide-group { margin-top: 1.6rem; scroll-margin-top: 150px; }
.res-guide-group__intro { color: var(--text-muted); max-width: 46rem; margin: .8rem 0 1rem; }
.res-guide-group[hidden] { display: none; }
.res-weed-card[hidden] { display: none; }
.res-guide-pests { display: flex; gap: 1rem; align-items: flex-start; text-align: left; background: var(--bg); border-radius: var(--radius-card); padding: 1.2rem 1.4rem; max-width: 760px; }
.res-guide-pests .res-ico { width: 40px; height: 40px; color: #8c5a3c; }
.res-guide-pests h2 { font-size: 1.1rem; margin-bottom: .2rem; }
.res-guide-pests a { color: var(--green); text-decoration: underline; }
@media (max-width: 820px) {
    .res-guide-tools { position: static; }
    .res-guide-tools .res-filter:not(.res-filter--grow) { flex: 1 1 140px; }
    .res-guide-tools .res-filter select { min-width: 0; width: 100%; }
    .res-guide-count { margin-left: 0; width: 100%; padding: 0; }
}

/* ---------- Colour band (booklet section header) ---------- */
.res-band { background: var(--g); color: #fff; }
.res-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 58px; padding-top: .5rem; padding-bottom: .5rem; }
.res-band--group { border-radius: var(--radius-card); }
.res-band--group .res-band__inner { padding: .6rem 1.1rem; }
.res-band__title { display: flex; align-items: center; gap: .7rem; font-weight: 800; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #fff; margin: 0; }
.res-band__title .res-ico { width: 36px; height: 36px; }
.res-band a { color: #fff; font-size: .85rem; white-space: nowrap; }
.res-band a:hover { text-decoration: underline; }
.res-band__count { font-weight: 800; font-size: 1.2rem; opacity: .9; }
@media (max-width: 480px) { .res-band a { display: none; } }

/* ---------- Profile (booklet layout): facts left, close-up circle over a curved habitat photo right ---------- */
.res-profile { background: var(--panel); }
.res-profile__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); padding-right: 0; }
.res-profile__facts { padding: 2.4rem 2rem 2.6rem 0; position: relative; z-index: 2; }
.res-profile__label { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g); margin-bottom: .4rem; filter: brightness(.8); }
.res-profile__title { font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.1; font-weight: 800; color: #2b2b2b; }
.res-profile__sci { font-style: italic; font-size: 1.15rem; margin-top: .25rem; color: #3a3a3a; }
.res-profile__sci + .res-profile__sci { margin-top: 0; }
.res-profile__aka { font-size: .9rem; color: var(--text-muted); margin-top: .25rem; }
.res-facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1.3rem 0 1.2rem; font-size: .98rem; }
.res-facts dt { font-weight: 700; }
.res-decl { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.res-decl a { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid #d9d9d9; border-radius: 999px; padding: .1rem .65rem .1rem .2rem; font-size: .85rem; }
.res-decl a:hover { border-color: var(--green); }
.res-decl__note { font-size: .85rem; color: var(--text-muted); }
.res-instead { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border-left: 4px solid var(--green); border-radius: 0 var(--radius-card) var(--radius-card) 0; padding: .8rem 1rem; margin: 0 0 1.4rem; max-width: 30rem; }
.res-instead .res-ico { width: 34px; height: 34px; color: var(--green); margin-top: .1rem; }
.res-instead small { display: block; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; color: var(--green); }
.res-instead strong { display: block; font-size: 1.05rem; }
.res-instead em { display: block; }
.res-methods__title { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
.res-methods__group { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .5rem; }
.res-methods__kind { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); min-width: 6.5rem; }
.res-methods ul { display: flex; flex-wrap: wrap; gap: .45rem; }
.res-methods li a { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border-radius: 999px; padding: .3rem .75rem .3rem .4rem; font-size: .88rem; border: 1px solid #dcdcdc; }
.res-methods li a:hover { border-color: var(--green); }
.res-methods li a.is-chem { background: var(--chem); border-color: #e4d3c2; }
.res-methods li .res-ico { width: 24px; height: 24px; }
.res-methods__legend { display: inline-block; font-size: .82rem; margin-top: .2rem; text-decoration: underline; }
.res-profile__note { font-style: italic; margin-top: 1.3rem; max-width: 32rem; color: #333; }

.res-profile__photos { position: relative; min-height: 460px; margin: 0; }
.res-profile__habitat { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: ellipse(92% 78% at 100% 50%); }
.res-profile__habitat--none { display: grid; place-items: center; background: var(--g); color: rgba(255,255,255,.85); }
.res-profile__habitat--none .res-ico { width: 96px; height: 96px; transform: translateX(18%); }
.res-profile__closeup { position: absolute; left: -2%; top: 2.2rem; width: clamp(150px, 19vw, 230px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 8px solid var(--panel); z-index: 3; }
.res-profile__photos figcaption { position: absolute; right: .8rem; bottom: .6rem; background: rgba(0,0,0,.55); color: #fff; font-size: .72rem; padding: .15rem .5rem; border-radius: 4px; max-width: 80%; }
@media (max-width: 820px) {
    .res-profile__inner { grid-template-columns: 1fr; padding-right: var(--gutter); }
    .res-profile__photos { order: -1; min-height: 0; aspect-ratio: 4 / 3; margin: 0 calc(var(--gutter) * -1); }
    .res-profile__photos.is-empty { aspect-ratio: 16 / 7; }
    .res-profile__habitat { clip-path: ellipse(120% 88% at 50% 0%); }
    .res-profile__habitat--none .res-ico { width: 64px; height: 64px; transform: none; }
    .res-profile__closeup { left: var(--gutter); top: auto; bottom: -14%; width: 132px; border-width: 6px; }
    .res-profile__facts { padding: 3.4rem 0 2rem; }
    .res-profile__inner:not(:has(.res-profile__closeup)) .res-profile__facts { padding-top: 2rem; }
    .res-methods__kind { min-width: 0; width: 100%; }
}

/* ---------- Profile body + aside ---------- */
.res-profile-body { padding: 2.6rem 0 3rem; }
.res-profile-body__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; }
.res-prose h2 { font-size: 1.35rem; margin: 0 0 .7rem; color: var(--green-dark); }
.res-prose .entry-content { max-width: 46rem; }
.res-prose .entry-content p { margin-bottom: .95rem; }
.res-prose .entry-content h2 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; color: var(--green-dark); }
.res-prose .entry-content h3 { font-size: 1.08rem; margin: 1.4rem 0 .4rem; color: var(--green-dark); }
.res-prose .entry-content ul { list-style: disc; margin: 0 0 1rem 1.3rem; }
.res-prose .entry-content a { color: var(--green); text-decoration: underline; }
.res-caution { display: flex; gap: .9rem; background: #fbf1e6; border-left: 4px solid var(--brown-solid); border-radius: 0 var(--radius-card) var(--radius-card) 0; padding: 1rem 1.2rem; margin: 1.4rem 0; max-width: 46rem; font-size: .93rem; }
.res-caution .res-ico { color: var(--brown-solid); }
.res-caution strong { display: block; margin-bottom: .2rem; }
.res-older { background: #faf8f3; border: 1px solid #ece6d8; border-radius: var(--radius-card); padding: 1rem 1.2rem; margin-top: 1.2rem; max-width: 46rem; }
.res-older summary { cursor: pointer; font-weight: 700; }
.res-older p { margin-top: .7rem; }
.res-source { font-size: .85rem; color: var(--text-muted); border-top: 1px solid #e3e3e3; padding-top: .8rem; margin-top: 1.2rem; max-width: 46rem; }
.res-aside__card { background: #fff; border: 1px solid #e5e5e5; border-radius: var(--radius-card); padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; }
.res-aside__card h2 { font-size: 1rem; margin-bottom: .7rem; }
.res-aside__card p { font-size: .9rem; }
.res-aside__card--soft { background: var(--panel); border: 0; }
.res-links li { padding: .25rem 0; font-size: .9rem; }
.res-links a { color: var(--green); text-decoration: underline; }
@media (max-width: 900px) { .res-profile-body__grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.res-more { background: var(--bg); padding: 2.4rem 0 3rem; }
.res-more h2 { font-size: 1.3rem; margin-bottom: 1.1rem; color: var(--green-dark); }
.res-more__all { margin-top: 1.2rem; }
.res-more__all a { color: var(--green); font-weight: 600; text-decoration: underline; }

/* ---------- Single document / video ---------- */
.res-single { padding: .5rem 0 2.6rem; }
.res-single__inner { max-width: 900px; }
.res-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: #1e2a24; margin-bottom: 1.4rem; }
.res-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.res-single__card { background: #fff; }
.res-single__desc p, .res-single__card .entry-content p { font-size: 1.05rem; margin-bottom: .9rem; max-width: 46rem; }
.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: 1.2rem; }
.res-actions__meta { font-size: .88rem; color: var(--text-muted); }
.res-audio { width: 100%; max-width: 520px; margin-top: .6rem; }

/* ---------- Search results (search.php) ---------- */
.search-result-sci { font-style: italic; color: #444; font-size: .9rem; margin: -.1rem 0 .2rem; }
