/* Article navigation: visible breadcrumbs, table of contents, related reading, topic hubs. */
.ea-nav-crumbs { font: 14px/1.4 Inter, system-ui, sans-serif; color: var(--ea-muted, #5b6377); margin: 0 0 18px; }
.ea-nav-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.ea-nav-crumbs li { display: inline-flex; align-items: center; }
.ea-nav-crumbs li:not(:last-child)::after { content: "/"; margin: 0 8px; opacity: .55; }
.ea-nav-crumbs a { color: var(--ea-muted, #5b6377); text-decoration: none; }
.ea-nav-crumbs a:hover { color: var(--ea-ink, #1d2232); text-decoration: underline; }
.ea-nav-crumbs [aria-current="page"] { color: var(--ea-ink, #1d2232); }
.ea-nav-crumbs a:focus-visible, .ea-toc a:focus-visible, .ea-related a:focus-visible { outline: 3px solid var(--ea-gold, #c9a227); outline-offset: 2px; border-radius: 4px; }
.uicore-single-header .ea-nav-crumbs { margin-bottom: 16px; }

.ea-toc { margin: 0 0 28px; padding: 20px 22px; background: var(--ea-surface, #f5f6f9); border: 1px solid var(--ea-line, #e3e6ee); border-radius: 16px; }
.ea-toc-title { margin: 0 0 10px; font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--ea-navy, #445272); }
.ea-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: min(420px, 60vh); overflow: auto; }
.ea-toc a { display: block; color: var(--ea-ink, #1d2232); text-decoration: none; font: 500 15px/1.4 Inter, system-ui, sans-serif; padding: 4px 0; }
.ea-toc a:hover { color: var(--ea-navy, #2f3a56); text-decoration: underline; }
.ea-toc-h3 { padding-left: 16px; font-weight: 400; color: var(--ea-text, #3d4456); font-size: 14.5px; }

.ea-related { margin: 48px 0 16px; padding-top: 32px; border-top: 1px solid var(--ea-line, #e3e6ee); }
.ea-related h2 { margin: 0 0 8px; font-family: var(--ea-head, Inter, sans-serif); font-size: 28px; line-height: 1.2; color: var(--ea-ink, #1d2232); }
.ea-related-lead { margin: 0 0 20px; color: var(--ea-muted, #5b6377); font-size: 16px; }
.ea-related-list { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.ea-related-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--ea-line, #e3e6ee); border-radius: 14px; background: #fff; text-decoration: none !important; color: inherit; }
.ea-related-card:hover { border-color: var(--ea-navy, #2f3a56); box-shadow: var(--ea-shadow, 0 12px 32px -12px rgba(29,34,50,.14)); }
.ea-related-card .ea-ls-badge { width: max-content; }
.ea-related-card strong { font-family: var(--ea-head, Inter, sans-serif); font-size: 18px; line-height: 1.3; color: var(--ea-ink, #1d2232); font-weight: 600; }
.ea-related-card span { font-size: 14.5px; line-height: 1.45; color: var(--ea-muted, #5b6377); }
.single-post .ui-post-nav { display: none !important; }

/* Topic hubs */
.ea-hubpage { font-family: var(--ea-body, Inter, system-ui, sans-serif); color: var(--ea-text, #3d4456); }
.ea-hubpage .ea-hub-hero { padding: clamp(48px, 7vw, 88px) 0 24px; }
.ea-hubpage .ea-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ea-navy, #445272); margin-bottom: 16px; }
.ea-hubpage .ea-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--ea-gold, #c9a227); border-radius: 2px; }
.ea-hubpage h1 { font-family: var(--ea-head, Inter, sans-serif); color: var(--ea-ink, #1d2232); font-weight: 600; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; margin: 0 0 16px; }
.ea-hubpage .ea-lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ea-muted, #5b6377); max-width: 720px; margin: 0 0 16px; }
.ea-hubpage .ea-hub-copy { max-width: 720px; font-size: 17px; line-height: 1.65; }
.ea-hubpage .ea-hub-copy p { margin: 0 0 1em; }
.ea-hub-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin: 32px 0; }
.ea-hub-grid--topics { grid-template-columns: repeat(2, 1fr); }
.ea-hub-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--ea-line, #e3e6ee); border-radius: 16px; background: #fff; text-decoration: none !important; color: inherit; }
.ea-hub-card:hover { border-color: var(--ea-navy, #2f3a56); box-shadow: var(--ea-shadow, 0 12px 32px -12px rgba(29,34,50,.14)); }
.ea-hub-card strong { font-family: var(--ea-head, Inter, sans-serif); font-size: 22px; color: var(--ea-ink, #1d2232); }
.ea-hub-card p { margin: 0; color: var(--ea-muted, #5b6377); font-size: 15px; line-height: 1.5; }
.ea-hub-card em { font-style: normal; color: var(--ea-navy, #445272); font-size: 13px; font-weight: 600; }
.ea-hub-list { display: grid; gap: 10px; margin: 12px 0 40px; }
.ea-hub-item { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--ea-line, #e3e6ee); border-radius: 14px; background: #fff; text-decoration: none !important; color: inherit; }
.ea-hub-item:hover { border-color: var(--ea-navy, #2f3a56); }
.ea-hub-item strong { font-family: var(--ea-head, Inter, sans-serif); font-size: 20px; color: var(--ea-ink, #1d2232); font-weight: 600; }
.ea-hub-item p { margin: 0; color: var(--ea-muted, #5b6377); font-size: 15px; line-height: 1.5; }
.ea-hub-cta { margin: 12px 0 48px; }

@media (max-width: 800px) {
  .ea-related-list, .ea-hub-grid, .ea-hub-grid--topics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ea-related-card, .ea-hub-card, .ea-hub-item { transition: none; }
}

/* Scotty variants */
[data-ls-theme="scotty"] .ea-toc { background: var(--srd-paper2, #efeae2); border-color: var(--srd-line, #e4ded4); border-radius: 14px; }
[data-ls-theme="scotty"] .ea-toc-title { color: var(--srd-bronze-d, #7f5f38); font-family: var(--srd-sans, Inter, sans-serif); }
[data-ls-theme="scotty"] .ea-toc a, [data-ls-theme="scotty"] .ea-related h2, [data-ls-theme="scotty"] .ea-related-card strong { font-family: var(--srd-serif, Newsreader, Georgia, serif); font-weight: 500; color: var(--srd-ink, #14161b); }
[data-ls-theme="scotty"] .ea-nav-crumbs { font-family: var(--srd-sans, Inter, sans-serif); }
.srd-article-body .ea-toc { margin: 0 auto 32px; max-width: 720px; }
.srd-article-body .ea-related { max-width: 1100px; margin-left: auto; margin-right: auto; }
body.single-post .srd-pager { display: none !important; }

#content > .ea-nav-crumbs { max-width: 1200px; margin: 28px auto 0; padding: 0 24px }
.uicore-single-header .ea-nav-crumbs { margin: 0 0 18px; padding: 0 }
.ea-hubpage .ea-nav-crumbs { margin: 0 0 22px; padding: 0 }
.uicore-single-header { padding-top: 8px }

/* Article TOC: the design-system .ea-toc { position: sticky } rule is for
   legal-page sidebars. In the article column it covers body text while scrolling.
   Stay inline and static unless JS moves the nav into a wide enough gutter rail. */
nav.ea-toc[aria-label="On this page"] { position: static; }
.ea-toc-rail { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 3; }
.ea-toc-rail .ea-toc { pointer-events: auto; }
nav.ea-toc.ea-toc--rail {
  position: sticky;
  box-sizing: border-box;
  margin: 0;
  max-width: none;
  max-height: calc(100vh - 160px);
  overflow: auto;
  z-index: 4;
}
.srd-article-body nav.ea-toc.ea-toc--rail { margin: 0; max-width: none; }
