/* Learn family layout (hub, guides, terpene + cannabinoid glossaries and detail
   pages, editorials, articles list, COA explainers share the sub-nav).
   Loaded after /css/site.css, which owns tokens, header, sub-nav, footer, faq,
   breadcrumb, chips, disclaimer and the keyframes. */

main { max-width: 760px; margin: 0 auto; padding: 40px 20px 24px; }
main.wide { max-width: 1080px; }

h1 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 12px; color: var(--text); }
.lede { font-size: 19px; color: var(--text-secondary); margin: 0 0 16px; }

/* In-page "jump to a section" nav on the Learn hub. A page table-of-contents
   (deliberately a soft card, distinct from the sticky site sub-nav). */
.section-nav { margin: 4px 0 28px; padding: 16px 18px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 16px; }
.section-nav-group + .section-nav-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.section-nav-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); margin: 0 0 10px; }
.section-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.section-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1; }
.section-nav a:hover { border-color: var(--primary-light); color: var(--primary); }
.section-nav-cross a { background: var(--primary-surface); border-color: transparent; color: var(--primary); }
/* Keep anchored section titles clear of the sticky main header. */
.cat-section, .cta-card, section.block { scroll-margin-top: calc(var(--hh) + 16px); }
.byline { font-size: 14px; color: var(--text-tertiary); margin: 0 0 8px; }
.cat-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; padding: 4px 10px; border-radius: 999px; color: #fff; margin-bottom: 16px; }

section.block { margin: 28px 0; }
section.block h2 { font-size: 22px; margin: 0 0 10px; color: var(--text); }
section.block p { font-size: 17px; line-height: 1.7; color: var(--text-secondary); margin: 0 0 14px; }

.terpene-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.terpene-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; border: 1.5px solid currentColor; background: var(--surface); }
.terpene-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

.terp { border-left: 4px solid var(--primary); background: var(--bg-soft); border-radius: 12px; padding: 20px 22px; margin: 18px 0; scroll-margin-top: calc(var(--hh) + 12px); }
.terp h2 { margin: 0 0 4px; font-size: 22px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.terp .aroma { font-size: 14px; color: var(--text-tertiary); margin: 0 0 12px; }
.terp p.desc { font-size: 16px; line-height: 1.6; color: var(--text-secondary); margin: 0 0 12px; }
.effects { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.effect { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; }
.appears { font-size: 14px; color: var(--text-tertiary); margin: 6px 0 0; }
.appears a { color: var(--text-secondary); }

.cat-section { margin: 32px 0; }
.cat-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin: 0 0 14px; }
.cat-title .dot { width: 12px; height: 12px; border-radius: 50%; }
.guide-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.guide-card { display: block; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; text-decoration: none; color: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; }
.guide-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: 0 10px 30px var(--shadow); }
.guide-card h3 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.guide-card p { margin: 0 0 10px; font-size: 15px; color: var(--text-secondary); line-height: 1.5; }
.guide-card .read { font-size: 13px; color: var(--text-tertiary); font-weight: 600; }

.cta-card { text-align: center; background: var(--primary-surface); border-radius: 18px; padding: 32px 20px; margin: 40px 0 8px; }
.cta-card h2 { font-size: 22px; margin: 0 0 8px; color: var(--text); }
.cta-card p { margin: 0 0 18px; color: var(--text-secondary); }

/* Entity detail pages (terpene / cannabinoid) + hubs */
.emoji-h { font-size: 32px; margin-right: 6px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin: 8px 0 26px; }
.facts .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-tertiary); margin-bottom: 2px; }
.facts .v { font-size: 15px; color: var(--text); font-weight: 600; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.entity-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface); transition: transform .2s, border-color .2s, box-shadow .2s; }
.entity-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: 0 10px 30px var(--shadow); }
.entity-card .e { font-size: 26px; }
.entity-card .n { font-weight: 700; font-size: 17px; margin: 6px 0 2px; color: var(--text); }
.entity-card .d { font-size: 13px; color: var(--text-secondary); }
.did-you-know { background: var(--primary-surface); border-radius: 12px; padding: 16px 18px; margin: 22px 0; font-size: 16px; line-height: 1.6; color: var(--text); }
.did-you-know strong { color: var(--primary); }
.sources ul { padding-left: 18px; margin: 8px 0; }
.sources li { font-size: 14px; color: var(--text-secondary); margin: 4px 0; }
.sources a { color: var(--text-secondary); word-break: break-word; }

@media (max-width: 600px) {
  h1 { font-size: 28px; }
  main { padding: 28px 18px 20px; }
}
