/* ──────────────────────────────────────────────────────────────────────────
   Hubs (content/hubs/*, served at the site root, e.g. /linkedin-automation/).
   Loaded only on hub routes, after content-pages.css (see inc/content-pages.php).
   Reuses the theme tokens, so dark and light come for free.
   ────────────────────────────────────────────────────────────────────────── */

/* One reading column for the whole hub: wider than the legal column, narrow enough for prose. */
.hub-wrap { max-width: 880px; }

.content-page[data-collection="hubs"] .page-hero { padding-bottom: clamp(12px, 2vw, 22px); }
.content-page[data-collection="hubs"] .page-hero-sub { max-width: 700px; }

/* ── A topic: eyebrow, H2, the answer, then the pages that go deeper ─────── */
.section-hub { padding: clamp(28px, 4.5vw, 52px) 0; scroll-margin-top: 80px; }
.section-hub + .section-hub { border-top: 1px solid var(--border); }
.hub-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0 0 10px; }
.hub-title { font: 800 clamp(25px, 3.2vw, 35px)/1.15 var(--sans); letter-spacing: -.02em; margin: 0 0 18px; color: var(--text); }
.hub-body > :last-child { margin-bottom: 0; }
.hub-body ul { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 12px; }
.hub-body li { position: relative; padding-left: 28px; line-height: 1.6; }
.hub-body li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 5px; background: var(--accent-glow); box-shadow: inset 0 0 0 2px var(--accent); }
.hub-body li strong { color: var(--text); }

/* The answer-first opener under the hero: larger, no rule above it. */
.section-hub--lead { padding-top: clamp(8px, 1.5vw, 16px); }
.section-hub--lead .hub-body { font-size: clamp(18px, 1.8vw, 20px); line-height: 1.65; color: var(--text); }

/* ── Tables inside a topic ───────────────────────────────────────────────── */
.hub-table { width: 100%; border-collapse: collapse; margin: 8px 0 22px; font-size: 15px; line-height: 1.5; background: var(--panel); border: 1px solid var(--border-solid); border-radius: var(--radius); overflow: hidden; }
.hub-table th, .hub-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border-solid); }
.hub-table thead th { font-family: var(--mono); font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--bg-2); }
.hub-table tbody th { color: var(--text); font-weight: 700; }
.hub-table tbody tr:first-child th, .hub-table tbody tr:first-child td { background: var(--accent-glow-2); }
.hub-table tbody tr:last-child th, .hub-table tbody tr:last-child td { border-bottom: none; }
/* A name that must not break at its hyphen (gtm-api.com in a narrow column). */
.hub-nowrap { white-space: nowrap; }
@media (max-width: 760px) {
  /* main.css already turns a post-content table into a scroller; give the columns room to scroll. */
  .hub-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hub-table th, .hub-table td { min-width: 150px; }
}

/* ── The code panel (the showcase frame, set in the reading column) ─────── */
.hub-code { margin: 24px 0 0; }
.hub-code figcaption { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }

/* ── Cards: the pages a topic hands over to ──────────────────────────────── */
.hub-links { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub-link { display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box; padding: 15px 18px; border: 1px solid var(--border-solid); border-radius: var(--radius); background: var(--panel); color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.hub-link:hover, .hub-link:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.hub-link-title { font: 700 15.5px/1.35 var(--sans); color: var(--text); }
.hub-link-title::after { content: " \2192"; color: var(--accent); }
.hub-link-text { font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 640px) { .hub-links { grid-template-columns: minmax(0, 1fr); } }

/* ── In-page nav ─────────────────────────────────────────────────────────── */
.section-jump { padding: 4px 0 clamp(20px, 3vw, 32px); }
.jump-label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.jump-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border-solid); border-radius: 999px; background: var(--bg-2); color: var(--text-2); font-size: 13.5px; line-height: 1.3; text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.jump-list a:hover, .jump-list a:focus-visible { border-color: var(--accent); color: var(--accent); }

/* ── FAQ: the questions are h3 headings, set in the summary's own type ──── */
.content-page[data-collection="hubs"] .section-faq { scroll-margin-top: 80px; border-top: 1px solid var(--border); }
.content-page[data-collection="hubs"] .section-faq + .section-hub { border-top: 1px solid var(--border); }
.section-faq summary h3 { display: inline; margin: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; }
.content-page[data-collection="hubs"] .section-faq .container-narrow { max-width: 880px; }
.content-page[data-collection="hubs"] .section-faq .section-title { font: 800 clamp(25px, 3.2vw, 35px)/1.15 var(--sans); letter-spacing: -.02em; margin: 0 0 18px; }

/* ── Sources ─────────────────────────────────────────────────────────────── */
.hub-body .hub-sources { gap: 8px; font-size: 14.5px; }
.hub-body .hub-sources li { padding-left: 18px; color: var(--muted); }
.hub-body .hub-sources li::before { top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); box-shadow: none; }
