@font-face {
    font-family: 'Cairo';
    src: url('../assets/fonts/cairo/Cairo.ttf') format('truetype');
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
}
/* :lang inherits the language, including individual Arabic names in FR/EN. */
:lang(ar) { font-family: 'Cairo', sans-serif !important; letter-spacing: normal !important; }
html:lang(ar) { --font-heading: 'Cairo', sans-serif; --font-body: 'Cairo', sans-serif; }
html:lang(ar) .title { line-height: 1.35; }
.card-arabic { line-height: 1.8; }
.species-share { min-height: 44px; padding: 8px 16px; border: 1px solid currentColor; border-radius: 24px; background: transparent; color: inherit; cursor: pointer; font: 13px var(--font-body); }
.share-feedback { position: fixed; bottom: 85px; left: 50%; transform: translateX(-50%); z-index: 1000; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 8px; background: var(--nav-bg); color: var(--nav-ink); border: 1px solid currentColor; font: 13px var(--font-body); }
.share-feedback:empty { display: none; }
.species-share { margin-bottom: 20px; }

/* New editorial sections use the existing dossier rhythm. */
.species-sources { border-top: 1px solid var(--border-color, var(--border, #b7b4a9)); margin-top: 24px; padding-top: 20px; font: 13px/1.7 var(--font-body); }
.species-sources h4 { font: 23px/1.3 var(--font-heading); margin: 0 0 12px; }
.species-sources p { margin: 8px 0; }
.species-sources ul { padding-inline-start: 18px; }
.species-sources a { color: inherit; text-underline-offset: 3px; overflow-wrap: anywhere; }
.share-feedback { border-radius: 2px; background: var(--nav-bg); color: var(--nav-ink); box-shadow: 0 5px 24px rgb(0 0 0 / 8%); }

[hidden] { display: none !important; }

/* Keep the botanical reference readable after removing unsupported counters. */
.dossier-grid:has(> [hidden]) { grid-template-columns: 1fr; }
.species-picker-list button:focus-visible { outline-offset: -3px; }

/* Compact companion list: the original chips, with references below. */
.companion-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
a.companion-name { color: inherit; text-decoration: none; }
a.companion-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.companion-scientific { opacity: 1; color: var(--ink-muted, var(--text-color)); line-height: 1.5; }
.companion-context-label { display: block; margin-top: 3px; font: 11px/1.4 var(--font-body); color: var(--ink-muted, var(--text-color)); }
.ecosystem-context { margin-top: 2px; font: 12px/1.6 var(--font-body); }
.ecosystem-context summary { min-height: 44px; padding-block: 12px; cursor: pointer; color: inherit; }
.ecosystem-context ul { padding: 0; margin: 0; list-style: none; }
.ecosystem-context li { margin: 0 0 10px; }
.ecosystem-context strong { font-weight: 500; }
.companion-note { font: 12px/1.6 var(--font-body); margin: 3px 0 0; color: inherit; }
.companion-source { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 3px; margin-inline: -3px; font: 11px/1.5 var(--font-body); color: inherit; text-underline-offset: 3px; }
.companion-name:focus-visible, .companion-source:focus-visible, .ecosystem-context summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Reference layout: small icons and two lines of text, without boxed cards. */
.companion-chip, .companion-chip:hover { padding: 0; background: transparent; border: 0; border-radius: 0; gap: 8px; }
.companion-icon { width: 20px; font-size: 16px; }
.assessment-source { display: flex; align-items: center; min-height: 44px; color: inherit; font-size: 11px; text-underline-offset: 3px; }
