/* MycoIlm: warm paper, charcoal, botanical ink and restrained brass.
   Semantic tokens are shared by MycoVault, species profiles and Academy. */
:root {
  --color-bg-primary: #f5f2e9;
  --color-bg-secondary: #eae6db;
  --color-surface: #fffdf7;
  --color-surface-elevated: #ffffff;
  --color-text-primary: #272d28;
  --color-text-secondary: #515b53;
  --color-text-muted: #5d665e;
  --color-border: #d6d6c9;
  --color-border-strong: #899287;
  --color-myco: #355748;
  --color-myco-hover: #284437;
  --color-ilm: #786239;
  --color-accent: var(--color-myco);
  --color-selected: #e4eadf;
  --color-hover: #eeeee4;
  --color-focus: #786239;
  --color-danger: #913d36;
  --color-warning: #786239;
  --color-success: #355748;
  --color-stage: #242724;
  --color-stage-surface: #2c302b;
  --color-stage-light: #454941;
  --color-stage-middle: #30352f;
  --color-stage-text: #f3f0e5;
  --color-stage-muted: #c3c8bc;
  --color-stage-border: #596153;
  --color-stage-accent: #d1b77f;
  --font-editorial: Georgia, "Palatino Linotype", serif;
  --font-interface: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-annotation: ui-monospace, Consolas, monospace;
  --type-title: clamp(2.35rem, 4.2vw, 3.7rem);
  --type-section: clamp(1.65rem, 2.6vw, 2.3rem);
  --type-body: 1rem;
  --type-small: .875rem;
  --type-caption: .875rem;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --radius-control: 4px;
  --radius-panel: 6px;
  --shadow-panel: 0 8px 24px #272d2808;
  --motion-feedback: 160ms;
  --motion-panel: 240ms;
  /* Compatibility aliases for existing application components. */
  --ink: var(--color-text-primary);
  --muted: var(--color-text-muted);
  --paper: var(--color-bg-primary);
  --line: var(--color-border);
  --copper: var(--color-ilm);
  --myco-forest: var(--color-myco);
  --myco-moss: var(--color-myco);
  --myco-amber: var(--color-ilm);
  --myco-border: var(--color-border);
  --myco-shadow: var(--shadow-panel);
  --myco-card: var(--color-surface);
  --bs-success-rgb: 53, 87, 72;
}
html{font-size:16px;scroll-behavior:smooth;scroll-padding-top:110px}
body{background:var(--paper);color:var(--ink);font-family:var(--font-interface);font-size:16px;line-height:1.65}
h1,h2,h3{font-weight:400;letter-spacing:-.035em;line-height:1.15}
h1{font-size:clamp(2.5rem,5vw,4.3rem)}
h2{font-size:clamp(1.8rem,3vw,2.65rem)}
h3{font-size:1.45rem}
a{color:var(--ink);text-underline-offset:4px}
a:hover{color:var(--copper)}
button,input,select,textarea{font:inherit}
img{height:auto}
*:focus-visible{outline:3px solid var(--color-focus);outline-offset:4px}
.btn:focus-visible,.form-control:focus-visible,.form-select:focus-visible,.navbar-toggler:focus-visible{outline:3px solid var(--color-focus);outline-offset:4px;box-shadow:none}
main:focus{outline:0}
.text-secondary,.text-muted{color:var(--muted)!important}
.container-xl{max-width:1320px;padding-left:max(32px,env(safe-area-inset-left));padding-right:max(32px,env(safe-area-inset-right))}
.page-shell{padding-top:32px}
.site-header{background:var(--color-bg-primary);border-bottom:1px solid var(--line);}
.site-header .navbar{min-height:88px;padding-top:14px;padding-bottom:14px}
.brand-name{font-size:2.2rem;letter-spacing:-.07em;line-height:1;display:block;text-decoration:none}
.brand-name-myco{color:var(--color-myco);font-weight:700}
.brand-name-ilm{font-style:italic;color:var(--copper);font-weight:400}
.brand-dot{color:var(--copper)}
.brand-kicker{font-size:.59rem;letter-spacing:.21em;margin-top:8px;display:block;color:var(--muted)}
.navbar .nav-link{font-size:.85rem;font-weight:500;color:var(--ink)}
.nav-link[aria-current=page]{box-shadow:0 2px var(--copper)}
.nav-label{font:10px ui-monospace,monospace;padding:3px;border:1px solid var(--line);margin-left:3px}
.navbar-toggler{font-size:.85rem;min-height:44px;border:1px solid var(--line)}
.btn{border-radius:4px;padding:.7rem 1.15rem;font-size:.87rem;font-weight:600;letter-spacing:.01em;min-height:44px;box-shadow:none}
.btn-success,.btn-dark{background:var(--color-myco);border-color:var(--color-myco);color:var(--color-surface)}
.btn-success:hover,.btn-dark:hover,.btn-success:focus-visible,.btn-dark:focus-visible{background:var(--color-myco-hover);border-color:var(--color-myco-hover);color:var(--color-surface)}
.btn-outline-success{color:var(--color-myco);border-color:var(--color-border-strong)}
.btn-outline-success:hover,.btn-outline-success:focus-visible{background:var(--color-myco);border-color:var(--color-myco);color:var(--color-surface)}
.btn-light{background:var(--color-bg-primary);color:var(--color-myco);border-color:var(--color-bg-primary)}
.form-control,.form-select{border-color:#cbd3c8;border-radius:4px;min-height:46px;background-color:var(--color-surface)}
.form-label{font-size:.84rem;font-weight:600}
.form-text{line-height:1.6}
.alert{border-radius:4px;box-shadow:none}
.eyebrow{font-family:ui-monospace,Consolas,monospace;letter-spacing:.13em;font-size:.69rem;font-weight:500;text-transform:uppercase}
.skip-link{position:fixed;top:-100px;left:20px;z-index:9999;padding:10px 20px;background:var(--color-surface)}
.skip-link:focus{top:12px}
.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#cccf91;margin-right:7px}
.heading-dot{color:var(--copper)}
.collection-hero{display:grid;grid-template-columns:1.15fr 1fr;background:var(--color-stage);min-height:570px;color:var(--color-stage-text);overflow:hidden;border-radius:5px}
.collection-hero-copy{padding:65px 55px 38px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.collection-hero h1{font-size:clamp(3.2rem,5.6vw,5.4rem);line-height:1.03;margin:15px 0 25px;letter-spacing:-.045em;color:var(--color-stage-text)}
.collection-hero h1 em{font-weight:400;color:var(--color-stage-accent)}
.collection-hero-copy>p:not(.eyebrow){max-width:470px;color:var(--color-stage-muted);font-size:1rem;line-height:1.8;margin-bottom:30px}
.collection-hero .eyebrow{color:var(--color-stage-accent)}
.hero-text-link{color:#f4f1d8!important;padding:.7rem 0;font-size:.85rem}
.hero-index{display:flex;gap:32px;border-top:1px solid #70917e55;width:100%;margin-top:50px;padding-top:23px}
.hero-index span{font-size:.67rem;color:#bdcbbd}
.hero-index strong{display:block;font-family:Georgia,serif;font-size:1.65rem;font-weight:400;color:#eeeecf}
.hero-specimen{margin:0;position:relative;min-height:100%;background:#263b22}
.hero-specimen>img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;filter:brightness(.83)}
.hero-specimen:after{content:"";position:absolute;inset:50% 0 0;background:linear-gradient(transparent,#0b211bda)}
.hero-specimen figcaption{position:absolute;bottom:35px;left:35px;z-index:1;display:grid;gap:3px;color:#fff}
.hero-specimen figcaption span{font-size:.72rem;letter-spacing:.03em}
.hero-specimen figcaption strong{font-family:Georgia,serif;font-size:1.8rem;font-weight:400}
.specimen-corner{position:absolute;top:25px;right:25px;font:11px ui-monospace,monospace;letter-spacing:.1em;color:white}
.collection-pathways{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--line);padding:27px 0;gap:35px}
.collection-pathways a{text-decoration:none;border-right:1px solid var(--line);display:grid;gap:8px}
.collection-pathways a:last-child{border:0}
.collection-pathways span{font:10px ui-monospace,monospace;letter-spacing:.13em;color:var(--muted)}
.collection-pathways strong{font-size:.9rem;font-weight:500}
.collection-section{padding-top:60px}
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:30px}
.section-heading p{font-size:.86rem;color:var(--muted);margin-bottom:5px}
.section-heading .eyebrow{font-size:.67rem}
.section-heading h2{margin:0}
.catalog-search{background:var(--color-bg-secondary);padding:22px;border:1px solid #dedfd2;border-radius:5px}
.search-primary{display:flex;align-items:center;gap:18px;padding-bottom:20px;border-bottom:1px solid #d5d9cc}
.search-primary label{font-size:.85rem;min-width:100px}
.search-primary input{flex:1;min-width:0;border:0;background:var(--color-surface);border-radius:3px;padding:12px 16px}
.catalog-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto auto;gap:16px;align-items:end;padding-top:15px}
.catalog-filters label{display:block;font-size:.69rem;text-transform:uppercase;letter-spacing:.07em;margin-bottom:7px;color:#56685d}
.catalog-filters .form-select{font-size:.8rem;background-color:var(--color-bg-primary);min-height:43px}
.filter-reset{padding:9px 0;font-size:.8rem}
.collection-toolbar{display:flex;align-items:center;gap:22px;justify-content:space-between;padding:22px 0;font-size:.75rem;color:var(--muted)}
.collection-toolbar a:first-of-type{margin-left:auto}
.specimen-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
.specimen-card{border:1px solid var(--line);background:var(--color-surface);display:flex;flex-direction:column;border-radius:4px;overflow:hidden;transition:border-color .18s,transform .18s}
.specimen-card:hover{border-color:var(--color-border-strong)}
.specimen-image-link{display:block;position:relative;aspect-ratio:4/3;background:#e8ecdf;overflow:hidden}
.specimen-image-link img{height:100%;width:100%;object-fit:cover;transition:transform .3s}
.specimen-card:hover img{transform:scale(1.01)}
.specimen-image-link.is-illustration img{object-fit:contain;padding:30px;opacity:.8}
.specimen-number,.specimen-media-type{position:absolute;font:10px ui-monospace,monospace;background:#f9f9edec;padding:5px 9px;color:#284634}
.specimen-number{top:14px;left:14px;letter-spacing:.07em}
.specimen-media-type{bottom:12px;left:14px;font-size:9px}
.specimen-card-copy{padding:24px;display:flex;flex-direction:column;flex:1}
.specimen-classification{display:flex;justify-content:space-between;font:9px ui-monospace,monospace;letter-spacing:.065em;text-transform:uppercase;color:#6b7869;margin-bottom:13px}
.specimen-card h3{font-size:1.6rem;margin-bottom:8px}
.specimen-card h3 a{text-decoration:none}
.scientific-name{font:italic 1.1rem Georgia,serif;color:var(--color-text-muted)}
.specimen-description{font-size:.82rem;color:var(--color-text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:14px}
.specimen-card-footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e8ebdf;margin-top:auto;padding-top:16px;font-size:.75rem}
.specimen-card-footer a{text-decoration:none}
.catalog-pagination{display:flex;justify-content:center;align-items:center;gap:30px;padding:42px 0 10px;font:12px ui-monospace,monospace}
.profile-trail{display:flex;gap:15px;font-size:.75rem;margin:12px 0 35px;color:var(--muted);flex-wrap:wrap}
.profile-trail a{text-decoration:none}
.profile-heading{display:flex;justify-content:space-between;gap:25px;align-items:center;margin-bottom:38px}
.profile-heading .scientific-name{font-size:1.55rem}
.profile-grid{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:60px}
.profile-figure{margin:0 0 30px;border:1px solid var(--line);background:#e6e9dd}
.profile-figure img{width:100%;aspect-ratio:1;object-fit:cover}
.profile-figure figcaption{font-size:.7rem;padding:16px;display:grid;gap:5px;background:var(--color-surface)}
.profile-vault{background:var(--color-stage);padding:32px;color:var(--color-stage-text);border-radius:4px}
.profile-vault h2{font-size:2rem}
.profile-vault p{font-size:.84rem;color:var(--color-stage-muted)}
.profile-actions{display:flex;gap:20px;flex-wrap:wrap;padding:25px 0;font-size:.77rem}
.profile-content>section{padding:32px 0;border-bottom:1px solid var(--line)}
.profile-content h2{font-size:2rem;margin-bottom:20px}
.profile-content h3{font:600 .9rem "Segoe UI",sans-serif;letter-spacing:0}
.profile-content h3 small{font-weight:400;color:var(--muted)}
.profile-content p{color:var(--color-text-secondary);font-size:.94rem}
.evidence-note{border-left:2px solid var(--color-ilm);background:var(--color-bg-secondary);padding:17px 22px}
.evidence-note strong{font-size:.86rem}
.evidence-note p{font-size:.8rem;margin:7px 0 0}
.taxonomy-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:0}
.taxonomy-grid dt{font-size:.67rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:500}
.taxonomy-grid dd{font-size:.92rem;margin:5px 0 0}
.profile-safety{background:var(--color-bg-secondary);padding:25px!important;margin-top:24px;border-radius:4px}
.profile-safety p:last-child{margin-bottom:0}
.profile-source a{font-size:.85rem}
.detail-tag-cloud{margin-top:25px}
.species-tag-chip{border-radius:3px;font-size:.7rem;box-shadow:none}
.hero-panel,.surface-panel,.detail-panel,.form-panel,.delete-panel,.empty-state{border-radius:5px;box-shadow:none}
.hero-panel::before{height:3px;background:#9ea988}
.hero-panel .hero-body{padding:40px}
.hero-panel .display-5{font-size:clamp(2.4rem,4vw,3.6rem);max-width:850px}
.hero-panel .lead{font-size:1.04rem;max-width:840px}
.form-section-callout{border-radius:4px;box-shadow:none}
.stat-chip{border-radius:4px;box-shadow:none}
.observation-card,.pasture-card,.observation-map-panel{border-radius:4px;box-shadow:none}
.empty-state{padding:55px 30px;border:1px dashed #b8c2ad;background:var(--color-bg-secondary)}
.site-footer{border-top:1px solid var(--line);padding:45px 0;margin-top:30px;color:var(--muted);background:var(--color-bg-secondary)}
.footer-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:50px}
.site-footer p{font-size:.78rem;margin-top:15px}
.footer-links{display:flex;flex-direction:column;gap:8px;font-size:.73rem}
.footer-links span{margin-top:10px}
.footer-note{max-width:380px}
@media(min-width:1600px){.container-xl{max-width:1440px}
.collection-hero{min-height:625px}
}
@media(max-width:1199px){.collection-hero-copy{padding:42px 34px}
.hero-index{gap:23px}
.navbar .nav-link{font-size:.76rem}
.catalog-filters{grid-template-columns:repeat(4,1fr)}
.catalog-filters .btn{grid-column:1/3}
.catalog-filters .filter-reset{grid-column:3/5;text-align:center}
.profile-grid{gap:35px}
}
@media(max-width:991px){.site-header .navbar{min-height:84px}
.navbar-nav{padding:20px 0;gap:5px}
.navbar-nav .btn{margin-top:12px}
.navbar .nav-link{font-size:1rem;padding:10px}
.collection-hero{grid-template-columns:1.1fr .9fr;min-height:530px}
.collection-hero h1{font-size:3.55rem}
.hero-index{gap:16px;margin-top:35px}
.collection-pathways{gap:15px}
.specimen-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.profile-grid{grid-template-columns:1fr 1fr;gap:30px}
.footer-grid{gap:25px}
.hero-specimen figcaption{left:22px;bottom:25px}
.hero-specimen figcaption strong{font-size:1.5rem}
}
@media(max-width:767px){.container-xl{padding-left:20px;padding-right:20px}
.page-shell{padding-top:20px}
.brand-name{font-size:1.9rem}
.brand-kicker{font-size:.55rem}
.collection-hero{grid-template-columns:1fr}
.collection-hero-copy{padding:34px 28px}
.collection-hero h1{font-size:3.8rem}
.collection-hero-copy>p:not(.eyebrow){font-size:.93rem}
.hero-index{margin-top:35px;gap:33px}
.hero-specimen{min-height:300px}
.hero-specimen>img{object-position:center 48%}
.collection-pathways{grid-template-columns:1fr;padding:22px 0;gap:18px}
.collection-pathways a{border-right:0;grid-template-columns:135px 1fr;gap:12px;align-items:baseline}
.collection-pathways strong{font-size:.81rem}
.collection-pathways span{font-size:9px}
.collection-section{padding-top:35px}
.section-heading{align-items:flex-start;flex-direction:column;gap:15px}
.section-heading h2{font-size:2rem}
.catalog-search{padding:16px}
.search-primary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.search-primary label{grid-column:1/-1}
.search-primary input{width:100%;font-size:.85rem;padding-left:10px}
.catalog-filters{grid-template-columns:1fr 1fr;gap:12px}
.catalog-filters .btn,.catalog-filters .filter-reset{grid-column:auto}
.collection-toolbar{flex-wrap:wrap;gap:10px 20px;font-size:.69rem}
.collection-toolbar span{width:100%}
.collection-toolbar a:first-of-type{margin-left:0}
.specimen-grid{gap:18px}
.specimen-card-copy{padding:18px}
.specimen-card h3{font-size:1.4rem}
.specimen-classification{flex-wrap:wrap;gap:6px;font-size:8px}
.specimen-number{font-size:8px;top:10px;left:10px}
.specimen-media-type{font-size:8px;left:10px;bottom:10px}
.profile-grid{grid-template-columns:1fr}
.profile-heading{align-items:flex-start;flex-direction:column}
.profile-heading h1{font-size:2.6rem}
.profile-figure img{aspect-ratio:4/3}
.profile-content h2{font-size:1.9rem}
.profile-trail{margin-bottom:25px}
.hero-panel .hero-body{padding:28px}
.footer-grid{grid-template-columns:1fr 1fr;gap:25px}
.footer-note{grid-column:1/-1;grid-row:2}
.footer-links{align-items:flex-end}
.site-footer{padding:30px 0}
.hero-panel .display-5{font-size:2.5rem}
.lead{font-size:1.1rem}
.table-responsive{border-radius:4px}
}
@media(max-width:479px){.specimen-grid{grid-template-columns:1fr}
.collection-hero h1{font-size:3.2rem}
.collection-hero-copy{padding:32px 24px}
.hero-index{gap:25px}
.hero-index strong{font-size:1.5rem}
.specimen-card h3{font-size:1.7rem}
.specimen-classification{font-size:9px}
.collection-pathways a{grid-template-columns:110px 1fr}
.collection-pathways strong{font-size:.77rem}
.hero-specimen{min-height:260px}
.container-xl{padding-left:16px;padding-right:16px}
.hero-panel .hero-body{padding:24px}
}
@media(prefers-reduced-motion:reduce){html{font-size:16px;scroll-behavior:auto}
*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
.specimen-card:hover,.specimen-card:hover img{transform:none}
}

/* Shared semantic states and profile-to-study connection. */
.btn { transition: background var(--motion-feedback), border-color var(--motion-feedback), color var(--motion-feedback); }
.btn-outline-light { color:var(--color-stage-text); border-color:var(--color-stage-muted); }
.btn-outline-light:hover,.btn-outline-light:focus-visible { background:var(--color-stage-text); border-color:var(--color-stage-text); color:var(--color-stage); }
.profile-vault .btn { width:100%; text-align:left; line-height:1.6; }
.profile-vault .eyebrow { color:var(--color-stage-accent); }
.profile-related { display:flex; flex-wrap:wrap; gap:.75rem 1.5rem; margin-top:1rem; }
.profile-related a { min-height:44px; display:inline-flex; align-items:center; font-size:var(--type-small); }
body.body-academy { background:var(--color-bg-primary); }
@media(prefers-reduced-motion:reduce) { :root { --motion-feedback:0ms; --motion-panel:0ms; } }
