.habitat-form{max-width:900px}.habitat-form fieldset,.habitat-admin fieldset{min-width:0;border:1px solid var(--border,#ccd5c8);border-radius:12px;padding:clamp(1rem,3vw,1.7rem);margin:1rem 0}.habitat-form legend{font-weight:700;padding:0 .5rem}.habitat-form input,.habitat-form select,.habitat-form textarea{max-width:100%;min-width:0}.habitat-photo-fields{padding:.6rem 0;border-bottom:1px solid var(--border,#ccd5c8)}.habitat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:1rem}.habitat-tile{border-radius:12px;overflow:hidden;border:1px solid var(--border,#ccd5c8);background:var(--surface,#fff)}.habitat-tile>a{display:block;color:inherit;text-decoration:none}.habitat-tile img,.habitat-placeholder{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;background:var(--surface-alt,#eaf0e6)}.habitat-placeholder{display:grid;place-items:center}.habitat-tile h3{font-size:1.05rem;margin:0 0 .4rem}.habitat-tile-content{padding:1rem}.habitat-tile p{margin:.3rem 0}.habitat-archive-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:1.5rem}.habitat-filters label{display:grid;gap:.3rem;margin:.7rem 0}.habitat-filters input,.habitat-filters select{width:100%;min-width:0}.habitat-table-region{overflow:auto;max-width:100%;max-height:650px}.habitat-table{border-collapse:separate;border-spacing:0;min-width:750px;width:100%}.habitat-table th,.habitat-table td{padding:.8rem;border-bottom:1px solid var(--border,#ccd5c8);background:var(--surface,#fff)}.habitat-table th{position:sticky;top:0;z-index:2}.habitat-table th:first-child,.habitat-table td:first-child{position:sticky;left:0;z-index:1}.habitat-table th:first-child{z-index:3}.habitat-hero-photo{width:100%;max-height:620px;object-fit:contain;border-radius:16px;background:var(--surface-alt,#eaf0e6)}.habitat-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:1rem}.habitat-gallery img{width:100%;height:140px;object-fit:cover}.habitat-gallery button{padding:0;overflow:hidden}.habitat-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:1rem}.habitat-info>div{padding:1rem;border:1px solid var(--border,#ccd5c8);border-radius:12px}.habitat-info dt{font-weight:700}.habitat-info dd{margin:0 0 1rem;overflow-wrap:anywhere}.habitat-actions{display:flex;flex-wrap:wrap;gap:.7rem;margin:1rem 0}.habitat-admin input[type=checkbox],.habitat-admin input[type=radio]{width:auto}.habitat-admin .checkbox-label{display:flex;gap:.5rem;align-items:baseline}.habitat-admin img{max-width:100%;height:auto}.habitat-admin .habitat-private{border:2px solid #a85b19;padding:1rem}.habitat-admin .habitat-private dd{overflow-wrap:anywhere}.habitat-admin .habitat-photo-review{max-width:650px}.habitat-form :focus-visible,.habitat-admin :focus-visible,.habitat-table-region:focus-visible{outline:2px solid var(--accent,var(--ds-brand));outline-offset:3px}.habitat-map-fallback{max-height:280px;overflow:auto}.habitat-form [role=alert]{scroll-margin-top:120px}
@media(max-width:760px){.habitat-archive-layout{grid-template-columns:1fr}.habitat-form .research-form-pair{grid-template-columns:1fr}.habitat-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.habitat-filters{padding:.5rem}.habitat-info{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.habitat-form *{scroll-behavior:auto}}

.research-explorer .research-tabs a[aria-current=page],.research-explorer .habitat-actions a[aria-current=page]{background:var(--research-tint,var(--surface));color:var(--heading,var(--text));border-bottom:3px solid var(--accent);font-weight:800}.habitat-form .checkbox-label{background:var(--surface,var(--content-bg,#fff));color:var(--text)}html.thp-high-contrast :is(.habitat-tile,.habitat-info>div,.habitat-form fieldset){background:#fff!important;color:#000!important;border:2px solid #000!important}
.habitat-map-fallback a{text-decoration:underline;text-underline-offset:3px}
.research-explorer .leaflet-control-attribution a,.habitat-form .leaflet-control-attribution a{text-decoration:underline}
.habitat-placeholder{background:var(--surface,var(--content-bg,#eaf0e6));color:var(--text,#243323)}.habitat-tile img{height:auto;aspect-ratio:4/3}.habitat-hero-photo{height:auto}
.habitat-archive-layout>*,.habitat-archive-layout>div{min-width:0}.habitat-table-region{width:100%;box-sizing:border-box}
.research-explorer .button.secondary{background:var(--surface,#fff);color:var(--text,#243323);border-color:var(--border,#ccd5c8)}
.habitat-gallery figure{margin:0}.habitat-gallery button{width:100%}
.thp-admin:has(.habitat-admin){--accent:var(--ds-brand);--accent-dark:var(--ds-brand)}.thp-admin:has(.habitat-admin) .eyebrow{color:var(--ds-brand)}
.habitat-admin .inline-form{display:flex;flex-wrap:wrap;align-items:end;gap:1rem}.habitat-admin .inline-form label{min-width:0;max-width:100%;flex:1 1 180px}.habitat-admin .inline-form input,.habitat-admin .inline-form select{width:100%;box-sizing:border-box}.habitat-admin .table-wrap{width:100%;box-sizing:border-box}
.thp-admin:has(.habitat-admin) :focus-visible{outline:2px solid var(--ds-brand);outline-offset:3px}
.thp-admin:has(.habitat-admin) .admin-content :is(p,span)>a{text-decoration:underline;text-underline-offset:3px}
html[data-theme=dark] .thp-admin:has(.habitat-admin){background:#151e18;color:#e9f2e5;--accent:#b7de8d;--accent-dark:#b7de8d;--text:#e9f2e5;--surface:#1b2920;--border:#66816a}
html[data-theme=dark] .thp-admin:has(.habitat-admin) :is(.admin-topbar,input,textarea,select,td,th){background:#1b2920;color:#e9f2e5;border-color:#66816a}
html[data-theme=dark] .thp-admin:has(.habitat-admin) :is(h1,h2,h3,legend,label,.eyebrow,a){color:#e9f2e5}
html[data-theme=dark] .thp-admin:has(.habitat-admin) :is(button,.button){background:#b7de8d;color:#152115}
html[data-theme=dark] .thp-admin:has(.habitat-admin) :is(.notice,.checkbox-label){background:#1b2920;color:#e9f2e5;border-color:#66816a}
@media(prefers-color-scheme:dark){.thp-admin .habitat-admin .checkbox-label{background:#1b2920;color:#e9f2e5}}
@media(prefers-color-scheme:dark){.habitat-admin{background:#1b2920;color:#e9f2e5;--text:#e9f2e5;--surface:#1b2920;--border:#66816a}.thp-admin .habitat-admin :is(h2,h3,a,label,legend){color:#e9f2e5}.thp-admin .habitat-admin :is(input,textarea,select,td,th){background:#152115;color:#e9f2e5}.thp-admin .habitat-admin button{background:#b7de8d;color:#152115}}

.habitat-map-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-block:16px}.habitat-map-filters label{min-width:min(100%,240px);flex:1}.habitat-map-filters select{width:100%}

.habitat-form .notice.error{background:var(--surface,#fff);color:var(--text,#24332b)}.habitat-form .notice.error h2,.habitat-form .notice.error a{color:inherit}.habitat-form .notice.error a{text-decoration:underline}
