.article-page { background: var(--white); }
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 30; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }

.a-head { background: var(--navy); color: #b4bdd3; margin-top: -84px; padding: 136px 0 56px; }
.a-narrow { max-width: 880px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #8f9bb8; margin-bottom: 22px; }
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] { color: #c3cbe0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.a-head h1 { color: #fff; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 15px; }
.byline img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.by-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue-ink); color: #fff; font-size: 14px; font-weight: 700; }
.byline b { display: block; color: #fff; font-weight: 700; }
.byline span:not(.by-av) { color: #9aa5c0; }

.a-grid.no-toc { grid-template-columns: minmax(0, 720px); }
.a-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); justify-content: center; gap: 64px; padding-block: 56px 88px; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 14px; }
.toc-title { margin: 0 0 12px; font-weight: 700; color: var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; }
.toc li.l3 a { padding-left: 26px; font-size: 13px; }
.toc li a:hover { color: var(--ink); }
.toc li a.on { color: var(--link); border-left-color: var(--blue); font-weight: 700; }

.tldr { background: var(--tint-blue); border-radius: 18px; padding: 22px 26px; margin-bottom: 36px; }
.tldr-label { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--link); letter-spacing: .02em; }
.tldr p:last-child { margin: 0; color: var(--ink); font-weight: 600; font-size: 18px; line-height: 1.6; }

.prose { font-size: 18px; line-height: 1.8; color: var(--text); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
:where(.prose p) { margin: 0; }
.prose h2 { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin-top: 2.2em; scroll-margin-top: 96px; }
.prose h3 { font-weight: 700; font-size: 22px; line-height: 1.3; color: var(--ink); margin-top: 1.8em; scroll-margin-top: 96px; }
.prose a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(27,111,174,.3); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--blue); }
.prose img { max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-in; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--soft); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.faq { margin-top: 1.2em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; color: var(--ink); font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--link); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 0 20px; }
.faq .ans > * + * { margin-top: .8em; }

.help { margin-top: 56px; padding: 32px; border-radius: 22px; background: var(--navy); color: #b4bdd3; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.help h2 { margin: 0 !important; color: #fff; font-size: 24px; }
.help p { margin: 6px 0 0; font-size: 16px; }
.prose .help a.pill { text-decoration: none; color: #fff; }

.rels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rel { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--radius); background: var(--soft); transition: transform .2s; }
.rel:hover { transform: translateY(-3px); }
.rel .cat { font-size: 13px; font-weight: 700; color: var(--link); }
.rel h3 { font-size: 20px; line-height: 1.3; }
.rel p { margin: 0; font-size: 15px; color: var(--muted); }

.zoom { padding: 0; border: 0; background: transparent; max-width: 92vw; max-height: 90vh; }
.zoom::backdrop { background: rgba(10,22,54,.82); }
.zoom img { display: block; max-width: 92vw; max-height: 90vh; border-radius: 12px; cursor: zoom-out; }

/* Comments */
.comments { margin-top: 3em; }
.comments h2 small { font-size: 18px; color: var(--muted); font-weight: 600; }
.comments ol { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 1em; }
.cm { padding: 18px 20px; border-radius: 18px; background: var(--soft); }
.cm.reply { margin-left: 32px; position: relative; }
.cm.reply::before { content: ""; position: absolute; left: -20px; top: -12px; width: 14px; height: 34px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 10px; }
.cm.staff { background: var(--tint-blue); }
.cm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cm-head .av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #c9d3e6; color: var(--ink); font-size: 13px; font-weight: 700; }
.cm.staff .av { background: var(--blue-ink); color: #fff; }
.cm-head b { color: var(--ink); font-size: 15px; }
.cm-head small { display: block; color: var(--muted); font-size: 13px; }
.cm-badge { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 2px; }
.cm-body { font-size: 16px; line-height: 1.65; }
.cm-body > * + * { margin-top: .6em; }

@media (max-width: 1000px) {
  .a-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 32px 64px; }
  .toc { position: static; max-height: none; margin-bottom: 28px; padding: 18px 20px; border-radius: 16px; background: var(--soft); }
  .toc ol { border: 0; }
  .toc li a { border: 0; padding-left: 0; margin: 0; }
  .toc li.l3 { display: none; }
  .rels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .a-head { padding: 112px 0 40px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
  .help { grid-template-columns: minmax(0, 1fr); padding: 26px; }
  .crumbs [aria-current], .crumbs span:has(+ [aria-current]) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .progress { display: none; } }

/* Long code, addresses and wide tables must not widen the page on phones */
.prose { overflow-wrap: break-word; }
.prose pre, .prose table { display: block; max-width: 100%; overflow-x: auto; }
.prose pre { padding: 16px 18px; border-radius: 14px; background: #0f1b3d; color: #dbe7ff; font-size: 14px; line-height: 1.6; }
.prose code { overflow-wrap: anywhere; }
.prose table { border-collapse: collapse; font-size: 16px; }
.prose td, .prose th { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }

/* YouTube preview: the player loads only when asked */
.yt-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; background: #0a1636 center / cover no-repeat; }
.yt-play span { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; border-radius: 14px; background: rgba(10,22,54,.85); transition: background .15s; }
.yt-play span::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt-play:hover span, .yt-play:focus-visible span { background: #e62117; }

/* Notes on facts that changed after a post was written */
.stale { margin-bottom: 28px; padding: 18px 22px; border-radius: 16px; background: #fff8e8; border: 1px solid #f3dfa8; font-size: 16px; }
.stale-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: #7a4a06; }
.stale p { margin: 0; color: #4d3a12; }
.stale ul { margin: 8px 0 0; padding-left: 1.2em; color: #4d3a12; }
.stale li + li { margin-top: .3em; }

.up-link { margin-top: 2.4em !important; padding: 16px 20px; border-radius: 16px; background: var(--soft); font-size: 16px; }
