/* ============================================================
   HIVEMIND — content-cluster layer
   Article typography, breadcrumbs, TOC, FAQ, data tables and
   cross-links for the guide / faq / about pages. Built on the
   same tokens as styles.css; loaded on every page for parity.
   ============================================================ */

/* ---- the honeycomb-filled keyword, usable outside the hero -- */
.comb {
  background-image: var(--hex-textfill), linear-gradient(180deg, var(--amber), var(--honey));
  background-size: 1.2em auto, 100% 100%;
  background-position: 0 center, 0 0;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---- breadcrumbs ----------------------------------------- */
.crumbs {
  padding-top: clamp(1.6rem, 4vw, 2.4rem);
  font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .04em;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5em; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: .5em; color: var(--ash-dim); }
.crumbs a { color: var(--ash); transition: color .2s ease; }
.crumbs a:hover { color: var(--amber); }
.crumbs li + li::before { content: "⁄"; color: var(--line); }
.crumbs [aria-current="page"] { color: var(--honey); }

/* ---- article header (subpage hero-lite) ------------------ */
.subhero { padding-top: clamp(1.4rem, 3vw, 2rem); padding-bottom: 0; }
.subhero .kicker { margin-bottom: 1rem; }
.subhero h1 {
  font-family: var(--ff-display); font-weight: 600;
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem);
  line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance;
}
.subhero .lead { margin-top: 1.2rem; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.28rem); max-width: 62ch; }
.byline {
  margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem;
  font-family: var(--ff-mono); font-size: .74rem; color: var(--ash-dim); letter-spacing: .03em;
}
.byline .who { color: var(--ash); }
.byline .who a { color: var(--honey); }
.byline .who a:hover { color: var(--amber); }
.byline time { color: var(--pollen); }
.byline .sep { width: 6px; height: 6px; background: var(--honey); clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); }

/* ---- table of contents ----------------------------------- */
.toc { padding: 1.4rem 1.5rem; margin-top: clamp(2rem, 4vw, 2.8rem); }
.toc h2 { font-family: var(--ff-mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim); margin-bottom: .9rem; }
.toc ol { list-style: none; padding: 0; display: grid; gap: .55rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: inline-flex; gap: .7em; color: var(--ash); font-size: .94rem; transition: color .2s ease; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--ff-mono); font-size: .78rem; color: var(--honey); }
.toc a:hover { color: var(--wax); }

/* ---- prose (article body) -------------------------------- */
.prose { max-width: 72ch; margin-top: clamp(2.6rem, 5vw, 3.6rem); }
.prose > section { padding-block: 0; margin-top: clamp(2.6rem, 5vw, 3.4rem); scroll-margin-top: 90px; }
.prose > section:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin-bottom: .9rem; letter-spacing: -0.005em; }
.prose h3 { font-size: 1.12rem; margin: 1.8rem 0 .6rem; color: var(--wax); }
.prose p { color: var(--ash); margin-bottom: 1.05rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--wax); }
.prose em { color: var(--pollen); }
.prose a:not(.btn) {
  color: var(--pollen); text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 3px; transition: text-decoration-color .2s ease, color .2s ease;
}
.prose a:not(.btn):hover { color: var(--amber); text-decoration-color: var(--amber); }
.prose ul, .prose ol { color: var(--ash); margin: 0 0 1.05rem 1.2rem; display: grid; gap: .5rem; }
.prose li { padding-left: .3rem; }
.prose li::marker { color: var(--honey); }
.prose code {
  font-family: var(--ff-mono); font-size: .88em; color: var(--pollen);
  background: var(--carbon-2); padding: .12em .4em; box-shadow: inset 0 0 0 1px var(--line-soft);
}

/* links inside a lead paragraph (used on the pillar's answer-first intro) */
.lead a:not(.btn) {
  color: var(--pollen); text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 3px; transition: text-decoration-color .2s ease, color .2s ease;
}
.lead a:not(.btn):hover { color: var(--amber); text-decoration-color: var(--amber); }

/* the direct, liftable opening answer of a section */
.answer {
  font-size: 1.08rem; color: var(--wax); line-height: 1.65;
  border-left: 2px solid var(--honey); padding-left: 1.1rem; margin-bottom: 1.2rem;
}

/* callout / note */
.callout { padding: 1.2rem 1.4rem; margin: 1.4rem 0; }
.callout p { margin: 0; color: var(--ash); font-size: .94rem; }
.callout strong { color: var(--honey); }

/* blockquote */
.prose blockquote { border-left: 2px solid var(--line); padding-left: 1.1rem; margin: 1.2rem 0; color: var(--ash); font-style: italic; }

/* ---- data table (tools, trust stages) -------------------- */
.dtable-wrap { overflow-x: auto; margin: 1.2rem 0; }
.dtable { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 30rem; }
.dtable caption { text-align: left; font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ash-dim); margin-bottom: .7rem; }
.dtable th, .dtable td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.dtable thead th { font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--honey); font-weight: 500; border-bottom-color: var(--line); }
.dtable td { color: var(--ash); }
.dtable td:first-child, .dtable th:first-child { color: var(--amber); font-family: var(--ff-mono); font-size: .86rem; white-space: nowrap; }
.dtable tbody tr:hover td { background: rgba(212,170,0,.04); }
.dtable .role { font-family: var(--ff-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ash-dim); }
.dtable .role--open { color: var(--honey); }

/* ---- FAQ list -------------------------------------------- */
.faqlist { margin-top: clamp(2.4rem, 5vw, 3.2rem); display: grid; gap: 1rem; }
.faqitem { padding: 1.5rem 1.6rem; scroll-margin-top: 90px; }
.faqitem h2 { font-size: 1.2rem; font-family: var(--ff-display); font-weight: 600; margin-bottom: .7rem; letter-spacing: 0; }
.faqitem p { color: var(--ash); margin-bottom: .8rem; }
.faqitem p:last-child { margin-bottom: 0; }
.faqitem p:first-of-type { color: var(--wax); }
.faqitem a:not(.btn) { color: var(--pollen); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.faqitem a:not(.btn):hover { color: var(--amber); text-decoration-color: var(--amber); }
.faqitem code { font-family: var(--ff-mono); font-size: .88em; color: var(--pollen); background: var(--carbon-2); padding: .12em .4em; box-shadow: inset 0 0 0 1px var(--line-soft); }

.faqjump { padding: 1.4rem 1.5rem; margin-top: clamp(2rem, 4vw, 2.8rem); }
.faqjump h2 { font-family: var(--ff-mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim); margin-bottom: .9rem; }
.faqjump ul { list-style: none; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(2, 1fr); }
.faqjump a { color: var(--ash); font-size: .9rem; transition: color .2s ease; }
.faqjump a:hover { color: var(--amber); }

/* ---- cross-link "next" cards ----------------------------- */
.next { margin-top: clamp(3rem, 6vw, 4.5rem); }
.next h2 { font-family: var(--ff-mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ash-dim); margin-bottom: 1.1rem; }
.next__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.nextcard { display: block; padding: 1.4rem 1.5rem; transition: transform .22s ease; }
.nextcard:hover { transform: translateY(-4px); }
.nextcard .k { font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--honey); }
.nextcard h3 { margin: .6rem 0 .4rem; }
.nextcard p { color: var(--ash); font-size: .88rem; }
.nextcard .go { display: inline-flex; margin-top: .8rem; font-family: var(--ff-mono); font-size: .74rem; color: var(--amber); }

/* ---- footer: 4-column cluster nav (parity on every page) -- */
.foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.foot__base { justify-content: space-between; }

/* ---- responsive ------------------------------------------ */
@media (max-width: 900px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
  .next__grid { grid-template-columns: 1fr; }
  .faqjump ul { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .foot__grid { grid-template-columns: 1fr; }
  /* let the label column wrap instead of forcing the table wide (and the data
     columns cramped) on the longest nowrap label */
  .dtable td:first-child, .dtable th:first-child { white-space: normal; }
}
