/* NDXBL reading layout: The Signal articles and glossary terms.
   One column at every width. Measure ~40rem for text; the trace and section
   map run a little wider so the article's shape reads at a glance. */

.ndx-post { --line: rgba(21, 22, 26, .10); --line2: rgba(21, 22, 26, .18); --bg: var(--paper); --bg2: var(--paper2);
  max-width: 48rem; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.ndx-post > :is(.ndx-body, .ndx-toc, .ndx-post-cta, .ndx-related, .ndx-pn) { max-width: 42rem; }

/* ── Head ───────────────────────────────────────────────────────────────── */
.ndx-post-head { padding: clamp(28px, 5vw, 56px) 0 0; }
.ndx-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 12px var(--mo); letter-spacing: .06em; color: var(--ink3); }
.ndx-crumbs a { color: var(--ink2); text-decoration: none; }
.ndx-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.ndx-post-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 22px 0 0; font: 500 12px var(--mo); color: var(--ink3); }
.ndx-post-meta a.ndx-kick { text-decoration: none; }
.ndx-post-meta a.ndx-kick:hover { text-decoration: underline; text-underline-offset: .2em; }
.ndx-post-head h1 { margin: 12px 0 0; font: 400 clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem)/1.02 var(--fd); letter-spacing: -.012em; text-wrap: balance; }
.ndx-post-lede { margin: 18px 0 0; max-width: 40rem; font-size: clamp(1.08rem, 1rem + .4vw, 1.28rem); line-height: 1.55; color: var(--ink2); }
.ndx-def { margin: 22px 0 0; padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent); background: color-mix(in srgb, var(--ac) 5%, #fff); border-radius: 12px; font: 400 clamp(1.2rem, 1.05rem + .6vw, 1.5rem)/1.4 var(--fd); color: var(--ink); max-width: 42rem; }

/* ── Signal trace ───────────────────────────────────────────────────────── */
.ndx-post-trace { margin-top: clamp(24px, 3.4vw, 36px); }
.ndx-post .gn-trace { margin: 0; border: 1px solid var(--line2); border-radius: 14px; background: #fff; overflow: hidden; }
.ndx-post .gn-tr-read { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 16px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--line); font: 500 11px/1.35 var(--mo); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.ndx-post .gn-tr-name { color: var(--ink); }
.ndx-post .gn-tr-stats { font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ndx-post .gn-tr-stats.is-section { color: var(--ac); text-transform: none; letter-spacing: 0; font: 600 12.5px/1.35 var(--f); }
.ndx-post .gn-tr-plot { position: relative; height: clamp(112px, 16vw, 168px); background: linear-gradient(180deg, #fff 0%, var(--paper) 100%); }
.ndx-post .gn-tr-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ndx-post .gn-trace :is(.gn-tr-grid, .gn-tr-tick, .gn-tr-lead, .gn-tr-wave, .gn-tr-dot, .gn-tr-dot-in) { vector-effect: non-scaling-stroke; fill: none; }
.ndx-post .gn-tr-grid { stroke: var(--line); stroke-width: 1; }
.ndx-post .gn-tr-tick { stroke: var(--line2); stroke-width: 1; }
.ndx-post .gn-tr-env { fill: color-mix(in srgb, var(--ac) 7%, transparent); transition: fill .2s ease; }
.ndx-post .gn-tr-env.is-on { fill: color-mix(in srgb, var(--ac) 18%, transparent); }
.ndx-post .gn-tr-wave { stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.ndx-post .gn-tr-wave-on { stroke: var(--ac); stroke-width: 2.2; opacity: 1; }
.ndx-post .gn-tr-lead { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 2 3; }
.ndx-post .gn-tr-dot { stroke: var(--ink); stroke-width: 8; stroke-linecap: round; }
.ndx-post .gn-tr-dot-in { stroke: #fff; stroke-width: 3.5; stroke-linecap: round; }
.ndx-post .gn-tr-labels, .ndx-post .gn-tr-hits { position: absolute; inset: 0; }
.ndx-post .gn-tr-labels { pointer-events: none; }
.ndx-post .gn-tr-label { position: absolute; top: 6px; transform: translateX(-50%); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border: 1px solid var(--line2); border-radius: 999px; background: #fff; font: 600 11.5px/1.4 var(--f); color: var(--ink); }
.ndx-post .gn-tr-hit { position: absolute; top: 0; bottom: 0; }
.ndx-post a.gn-tr-hit { cursor: pointer; }
@media (max-width: 640px) {
  .ndx-post .gn-tr-label:nth-child(n+2), .ndx-post .gn-tr-leads > :nth-child(n+2) { display: none; }
  .ndx-post .gn-tr-label { max-width: 60%; }
}

/* ── Section map: sticks under the header, fills as you read ────────────── */
.ndx-map { position: sticky; top: 64px; z-index: 20; display: flex; gap: 3px; margin: 10px 0 0; padding: 10px 0; background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ndx-map-seg { --p: 0; position: relative; flex-basis: 0; min-width: 6px; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.ndx-map-seg::after { content: ""; position: absolute; inset: 0; background: var(--ac); transform: scaleX(var(--p)); transform-origin: left; }
.ndx-map-seg.is-active { outline: 1px solid var(--ac); outline-offset: 2px; }
.ndx-map-seg:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; }

/* ── On this page ───────────────────────────────────────────────────────── */
.ndx-toc { margin: 18px 0 0; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.ndx-toc summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 600; }
.ndx-toc summary::-webkit-details-marker { display: none; }
.ndx-toc summary span { font: 500 12px var(--mo); color: var(--ink3); align-self: center; }
.ndx-toc summary span::after { content: " +"; }
.ndx-toc[open] summary span::after { content: " −"; }
.ndx-toc summary:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 12px; }
.ndx-toc ol { margin: 0; padding: 0 18px 16px 40px; display: grid; gap: 6px; }
.ndx-toc a { color: var(--ink2); text-decoration: none; }
.ndx-toc a:hover, .ndx-toc a.is-active { color: var(--ac); text-decoration: underline; text-underline-offset: .18em; }

/* ── Body ───────────────────────────────────────────────────────────────── */
.ndx-body { margin-top: clamp(20px, 3vw, 32px); font-size: 1.1rem; line-height: 1.72; color: var(--ink); overflow-wrap: break-word; }
.ndx-body > :first-child { margin-top: 0; }
.ndx-body :is(h2, h3, h4) { scroll-margin-top: 96px; }
.ndx-body h2 { margin: 2.1em 0 .5em; font: 400 clamp(1.7rem, 1.4rem + 1vw, 2.2rem)/1.12 var(--fd); letter-spacing: -.005em; }
.ndx-body h3 { margin: 1.7em 0 .4em; font: 600 1.18rem/1.3 var(--f); }
.ndx-body h4 { margin: 1.4em 0 .3em; font: 600 1.02rem/1.3 var(--f); }
.ndx-body p { margin: 0 0 1.1em; }
.ndx-body :is(ul, ol) { margin: 0 0 1.2em; padding-left: 1.3em; }
.ndx-body li { margin: .35em 0; }
.ndx-body li::marker { color: var(--ac); }
.ndx-body a { color: var(--ac); text-decoration-thickness: 1px; text-underline-offset: .18em; }
.ndx-body a:hover { text-decoration-thickness: 2px; }
.ndx-body strong { font-weight: 600; }
.ndx-body code { font: 500 .88em var(--mo); background: var(--paper2); padding: .1em .35em; border-radius: 4px; }
.ndx-body img { max-width: 100%; height: auto; border-radius: 10px; }
.ndx-body section { display: contents; }

/* callouts */
.ndx-body .callout { margin: 1.6em 0; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; font-size: 1.02rem; }
.ndx-body .callout.insight { border-color: color-mix(in srgb, var(--ac) 30%, transparent); background: color-mix(in srgb, var(--ac) 5%, #fff); }
.ndx-body .callout.warning { border-color: rgba(161, 92, 7, .32); background: #FFF9F0; }
.ndx-body .callout > :last-child { margin-bottom: 0; }
.ndx-body .callout-label { margin-bottom: 6px; font: 500 11px var(--mo); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.ndx-body .callout.insight .callout-label { color: var(--ac); }
.ndx-body .callout.warning .callout-label { color: #8A4B00; }
.ndx-body .pull-quote { margin: 1.8em 0; padding: 18px 0; border-block: 1px solid var(--rule); font: italic 400 1.6rem/1.3 var(--fd); color: var(--ink); }

/* tables */
.ndx-body .table-scroll { margin: 1.6em 0; overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.ndx-body table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.ndx-body :is(th, td) { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.ndx-body th { font: 500 11.5px var(--mo); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); background: var(--paper); }
.ndx-body tr:last-child td { border-bottom: 0; }

/* stat / comparison / priority blocks carried over from older articles */
.ndx-body :is(.stats-block, .comparison-grid, .comparison) { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin: 1.6em 0; }
.ndx-body :is(.stat-item, .stat-card, .comparison-card, .before, .after, .priority-item) { padding: 16px 18px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.ndx-body :is(.stat-num, .stat-number) { display: block; font: 400 2rem/1 var(--fd); color: var(--ac); }
.ndx-body .stat-label { display: block; margin-top: 6px; font-size: .92rem; color: var(--ink2); }
.ndx-body .comparison-header { grid-column: 1 / -1; font-weight: 600; }
.ndx-body .priority-box { margin: 1.6em 0; display: grid; gap: 10px; }
.ndx-body .priority-item { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.ndx-body .priority-num { font: 400 1.6rem/1 var(--fd); color: var(--ac); }
.ndx-body .checklist { list-style: none; padding-left: 0; }
.ndx-body .checklist li::before { content: "✓ "; color: var(--ac); font-weight: 600; }

/* inline calls to action inside older articles */
.ndx-body .btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.ndx-body .btn:hover { background: var(--ac); }

/* ── End matter ─────────────────────────────────────────────────────────── */
.ndx-post-cta { margin: clamp(36px, 5vw, 56px) 0 0; padding: clamp(22px, 3vw, 30px); border-radius: 16px; background: var(--ink); color: var(--paper); }
.ndx-post-cta h2 { margin: 0; font: 400 clamp(1.6rem, 1.3rem + 1vw, 2.1rem)/1.1 var(--fd); }
.ndx-post-cta p { margin: 10px 0 18px; color: #D6D4CC; line-height: 1.6; }
.ndx-post-cta a:not(.ndx-btn) { color: #fff; }
.ndx-post-cta a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ndx-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none; }
.ndx-btn:hover { background: #fff; }
.ndx-related { margin-top: clamp(36px, 5vw, 56px); }
.ndx-related > h2 { display: block; margin: 0 0 12px; }
.ndx-related .ndx-list a { padding: 14px 0; }
.ndx-related .ndx-list a strong { font-size: 1.2rem; }
.ndx-terms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ndx-terms a { display: inline-block; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 15px; }
.ndx-terms a:hover { border-color: var(--ac); color: var(--ac); }
.ndx-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: clamp(36px, 5vw, 56px); }
.ndx-pn a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; font: 400 1.1rem/1.25 var(--fd); }
.ndx-pn a[rel="next"] { text-align: right; }
.ndx-pn a span { font: 500 11px var(--mo); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.ndx-pn a:hover { border-color: var(--ac); }
@media (max-width: 560px) { .ndx-pn { grid-template-columns: 1fr; } .ndx-pn a[rel="next"] { text-align: left; } }
.ndx-post a:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .ndx-post * { transition: none !important; } }
