.strain-profile{container:strain-profile / inline-size;overflow-wrap:anywhere}
.strain-profile .crumb{margin-block:-8px 4px}
.strain-profile .crumb a{flex:none}

.profile-head{
  --cover-ground:var(--soft);--cover-accent:var(--voice);
  display:grid;gap:8px 24px;min-width:0;
  border:1px solid var(--cover-accent);border-radius:var(--round);
  padding:clamp(.8125rem,.63rem + .8vw,1.375rem);
  color:var(--ink);background:var(--cover-ground);
}
.profile-head.vibe-other{
  --cover-ground:light-dark(oklch(97% .023 86),oklch(24% .023 79));
  --cover-accent:var(--ink);border-color:var(--control-rule);
}
.profile-name,.profile-spec{min-width:0}
.profile-head h1{font-size:clamp(1.743rem,1.42rem + 1.35vw,2.75rem);color:var(--cover-accent);text-wrap:balance}
.profile-long h1{font-size:clamp(1.46rem,1.349rem + .474vw,1.93rem)}
.profile-head :is(.alias,.profile-aliases){color:inherit;font-size:.93rem;font-weight:800;margin-top:4px}
.profile-stamp{display:flex;align-items:center;flex-wrap:wrap;gap:3px 12px}
.profile-stamp .badge,.profile-measure{font-size:.86rem}
.profile-measure{font-variant-numeric:tabular-nums}
.profile-spec .split{margin-top:5px;max-width:22rem}
.profile-spec .split-track{height:6px}
.profile-spec .split-labels{margin-bottom:3px;flex-wrap:wrap}
.profile-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:3px}
.profile-actions .button{border-color:var(--cover-accent);font-size:.89rem;white-space:normal;text-align:center;max-width:100%}
.profile-actions a.button{color:var(--cover-ground);background:var(--cover-accent)}
.profile-actions button.button{color:var(--ink);background:none}
.profile-actions .button:hover,.profile-actions .button:active{text-decoration:underline}
.profile-actions .button:focus-visible{outline-color:var(--ink)}

.profile-facts{margin-top:12px;background:var(--panel);border:1px solid var(--rule);border-radius:var(--round);display:grid;grid-template-columns:minmax(0,1fr)}
.profile-facts .subsection{min-width:0;padding:clamp(.75rem,.61rem + .65vw,1.25rem);border:0}
.profile-facts .subsection+.subsection{border-block-start:1px solid var(--rule)}
.profile-facts h3,.profile-family .trail-intro h3,.profile-family .reading h3{font:800 clamp(1rem,.965rem + .16vw,1.125rem)/1.24 var(--display);letter-spacing:-.025em;margin:0 0 8px}
.profile-facts .section-line h3,.profile-family .section-line h3{margin:0}
.profile-facts .compounds .section-line{margin-bottom:3px}
.profile-facts .family .section-line{margin-bottom:7px}
.profile-facts .parents{gap:8px}
.profile-facts .parent{background:var(--soft);max-width:100%;border-color:var(--control-rule)}
.profile-facts .parent:hover{border-color:var(--ink);text-decoration:underline}
.profile-facts .chip,.profile-origin .chip{border-color:var(--control-rule);max-width:100%}
.profile-facts .inline-jump{max-width:100%;text-wrap:pretty}
.profile-origin{margin-top:clamp(1.625rem,1.1rem + 2vw,2.5rem)}
.profile-origin .origin-history{padding-top:0}
.profile-origin .chips{margin-top:12px}
.profile-family,.strain-profile #shared-terpene-profiles{margin-top:clamp(1.75rem,1.2rem + 2.4vw,3.25rem)}
.profile-family{border-top:1px solid var(--rule);padding-top:clamp(1rem,.65rem + 1.4vw,1.75rem)}
.profile-family .family-trail{margin-top:12px}
.profile-family .trail-group h4{margin:0 0 8px;font-size:.94rem;line-height:1.23}
.profile-family :is(.trail-controls button,.section-line .chip){max-width:100%;white-space:normal}
.strain-profile #shared-terpene-profiles{scroll-margin-block-start:16px}

@container strain-profile (min-width:46rem){
  .profile-head{grid-template-columns:minmax(0,1.618fr) minmax(0,1fr);align-items:end}
  .profile-head h1{text-wrap:wrap}
  .profile-name{grid-column:1;grid-row:1;align-self:center}
  .profile-spec{grid-column:1;grid-row:2}
  .profile-actions{grid-column:2;grid-row:1/3;justify-content:flex-end;align-self:center;margin-top:0}
  .profile-facts{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:16px}
  .profile-facts .subsection:nth-of-type(2){border-block-start:0}
  .profile-facts .subsection:nth-of-type(even){border-inline-start:1px solid var(--rule)}
}
