/* Reading pages only. Load after the shared skin and page navigation. */
body.site-shell.blog-article,
body.site-shell.tech-news-page .news-detail {
  --reading-text: #c4d2df;
  --reading-heading: #edf5fb;
  --reading-muted: #9fb5c8;
  --reading-link: #a4e5ee;
  --reading-line: #324b60;
}

body.site-shell.blog-article .article-hero,
body.site-shell.blog-article .article-cover,
body.site-shell.blog-article .cover-caption {
  max-width: 984px;
}
body.site-shell.blog-article .article-hero { padding-block: 52px 32px; }
body.site-shell.blog-article .article-hero h1 {
  max-width: 900px;
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1.4;
  letter-spacing: -.035em;
  text-wrap: balance;
}
body.site-shell.blog-article .article-deck { max-width: 760px; font-size: 17px; }
body.site-shell.blog-article .author-line {
  align-items: center;
  gap: 12px 20px;
  font-size: 13px;
  line-height: 1.7;
}
body.site-shell.blog-article .article-layout {
  width: min(100%, 984px);
  grid-template-columns: 196px minmax(0, 744px);
  gap: 44px;
  margin-inline: auto;
  margin-bottom: 80px;
}
body.site-shell.blog-article .toc {
  top: calc(var(--site-header-height, 88px) + 24px);
  max-height: calc(100vh - var(--site-header-height, 88px) - 48px);
  max-height: calc(100dvh - var(--site-header-height, 88px) - 48px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  padding: 10px 12px 10px 16px;
  border-color: var(--reading-line);
  font-size: 14px;
}
body.site-shell.blog-article .toc strong {
  margin-bottom: 12px;
  color: var(--reading-heading);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .02em;
}
body.site-shell.blog-article .toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 9px;
  margin: 0;
  border-radius: 5px;
  color: var(--reading-muted);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body.site-shell.blog-article .toc a:hover { color: var(--reading-heading); background: #142838; }
body.site-shell.blog-article .toc a[aria-current="location"] {
  color: #c4f0e1;
  background: #173a3c;
  box-shadow: inset 2px 0 #a3e6ce;
}

body.site-shell.tech-news-page .news-detail-header,
body.site-shell.tech-news-page .news-detail-cover {
  max-width: 1044px;
  margin-inline: auto;
}
body.site-shell.tech-news-page .news-detail-header .news-deck { max-width: 760px; font-size: 17px; }
body.site-shell.tech-news-page .news-detail-grid {
  width: min(100%, 1044px);
  grid-template-columns: minmax(0, 760px) 240px;
  gap: 44px;
  margin-inline: auto;
}
body.site-shell.tech-news-page .news-detail-grid .news-sidebar {
  position: sticky;
  top: calc(var(--site-header-height, 88px) + 24px);
  max-height: calc(100vh - var(--site-header-height, 88px) - 48px);
  max-height: calc(100dvh - var(--site-header-height, 88px) - 48px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}
body.site-shell.tech-news-page .news-detail .news-side-card { padding: 21px 19px; }
body.site-shell.tech-news-page .news-detail .news-side-card p,
body.site-shell.tech-news-page .news-detail .news-side-card li { font-size: 13px; line-height: 1.85; }
body.site-shell.tech-news-page .news-detail .news-side-card li a {
  display: block;
  padding-block: 4px;
}

/* One quiet text scale for engineering notes and technology briefs. */
body.site-shell.blog-article .prose,
body.site-shell.tech-news-page .news-detail .news-prose {
  min-width: 0;
  color: var(--reading-text);
  font-size: 17px;
  line-height: 1.95;
  overflow-wrap: break-word;
}
body.site-shell.blog-article .prose :is(p, ul, ol, dd),
body.site-shell.tech-news-page .news-detail .news-prose :is(p, ul, ol, dd) { color: var(--reading-text); }
body.site-shell.blog-article .prose p,
body.site-shell.tech-news-page .news-detail .news-prose p { margin: 0 0 1.2em; }
body.site-shell.blog-article .prose :is(h2, h3, h4),
body.site-shell.tech-news-page .news-detail .news-prose :is(h2, h3, h4) {
  color: var(--reading-heading);
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.02em;
  text-wrap: balance;
}
body.site-shell.blog-article .prose h2,
body.site-shell.tech-news-page .news-detail .news-prose h2 { margin: 2.5em 0 .8em; font-size: 28px; }
body.site-shell.blog-article .prose h3,
body.site-shell.tech-news-page .news-detail .news-prose h3 { margin: 1.9em 0 .65em; font-size: 22px; }
body.site-shell.blog-article .prose h4,
body.site-shell.tech-news-page .news-detail .news-prose h4 { margin: 1.6em 0 .6em; font-size: 19px; }
body.site-shell.blog-article .prose > h2:first-child,
body.site-shell.tech-news-page .news-detail .news-prose section > h2 { margin-top: 0; }
body.site-shell.blog-article .prose :is(ul, ol),
body.site-shell.tech-news-page .news-detail .news-prose :is(ul, ol) { margin: 0 0 1.4em; padding-left: 1.5em; }
body.site-shell.blog-article .prose li,
body.site-shell.tech-news-page .news-detail .news-prose li { margin: .55em 0; padding-left: .15em; }
body.site-shell.blog-article .prose li::marker,
body.site-shell.tech-news-page .news-detail .news-prose li::marker { color: #91cdbd; }
body.site-shell.blog-article .prose strong,
body.site-shell.tech-news-page .news-detail .news-prose strong { color: var(--reading-heading); font-weight: 650; }
body.site-shell.blog-article .prose a:not(.button),
body.site-shell.tech-news-page .news-detail .news-prose a:not(.news-source-link) {
  color: var(--reading-link);
  text-decoration: underline;
  text-decoration-color: #608b99;
  text-decoration-thickness: 1px;
  text-underline-offset: .23em;
  overflow-wrap: anywhere;
}
body.site-shell.blog-article .prose a:hover,
body.site-shell.tech-news-page .news-detail .news-prose a:hover { text-decoration-color: currentColor; }
body.site-shell.blog-article .prose blockquote {
  margin: 1.7em 0;
  padding: 18px 22px;
  border-left: 3px solid #79bfc6;
  background: #112735;
  color: #c8dfe8;
}
body.site-shell.blog-article .prose blockquote > :last-child { margin-bottom: 0; }
body.site-shell.blog-article .case-breakthroughs dd { font-size: 1em; line-height: 1.95; }
body.site-shell.blog-article .case-callout > p { margin-block: .5em; font-size: 1em; }
body.site-shell.blog-article .prose :is(.case-scope, .article-sources),
body.site-shell.tech-news-page .news-detail .news-prose .news-observation-note { color: var(--reading-muted); font-size: 14px; line-height: 1.9; }
body.site-shell.blog-article .article-end { margin-top: 42px; padding: 22px; }
body.site-shell.blog-article .article-end p { color: var(--reading-muted); font-size: 14px; line-height: 1.9; }
body.site-shell.blog-article .back-link,
body.site-shell.tech-news-page .news-detail .news-back { min-height: 44px; align-items: center; font-size: 14px; }
body.site-shell.tech-news-page .news-detail .news-prose section { margin-bottom: 42px; }

/* Keep original image links and native horizontal scrolling intact. */
body.site-shell.blog-article .cover-caption,
body.site-shell.blog-article .case-figure figcaption,
body.site-shell.tech-news-page .news-detail-cover figcaption {
  color: var(--reading-muted);
  font-size: 12px;
  line-height: 1.85;
}
body.site-shell.blog-article .case-figure { margin-block: 32px; }
body.site-shell.blog-article .prose pre {
  max-width: 100%;
  padding: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  font-size: 14px;
  line-height: 1.85;
  tab-size: 2;
}
body.site-shell.blog-article .prose pre code {
  display: block;
  min-width: max-content;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}
body.site-shell.blog-article .prose :not(pre) > code { font-size: .88em; overflow-wrap: anywhere; }
body.site-shell.blog-article .prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  margin-block: 1.6em;
  font-size: 15px;
  line-height: 1.8;
}
body.site-shell.blog-article .prose :is(th, td) { padding: 12px 14px; vertical-align: top; }

@media (max-width: 1000px) {
  body.site-shell.blog-article .article-layout {
    width: min(100%, 744px);
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  body.site-shell.blog-article .toc {
    position: static;
    max-height: none;
    padding: 17px;
    border: 1px solid var(--reading-line);
    border-radius: 8px;
  }
  body.site-shell.blog-article.has-page-guide .toc { display: none; }
  body.site-shell.tech-news-page .news-detail-grid {
    width: min(100%, 760px);
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  body.site-shell.tech-news-page .news-detail-grid .news-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 28px;
    border-top: 1px solid var(--reading-line);
  }
}
@media (max-width: 760px) {
  body.site-shell.blog-article .article-hero { padding-block: 30px 24px; }
  body.site-shell.blog-article .article-hero h1 { font-size: clamp(29px, 7vw, 36px); line-height: 1.45; }
  body.site-shell.blog-article .article-deck,
  body.site-shell.tech-news-page .news-detail-header .news-deck { font-size: 16px; }
  body.site-shell.blog-article .author-line { gap: 8px 13px; font-size: 12px; }
  body.site-shell.blog-article .prose,
  body.site-shell.tech-news-page .news-detail .news-prose { font-size: 16px; }
  body.site-shell.blog-article .prose h2,
  body.site-shell.tech-news-page .news-detail .news-prose h2 { margin-top: 2em; font-size: 24px; }
  body.site-shell.blog-article .prose h3,
  body.site-shell.tech-news-page .news-detail .news-prose h3 { font-size: 20px; }
  body.site-shell.blog-article .prose h4,
  body.site-shell.tech-news-page .news-detail .news-prose h4 { font-size: 18px; }
  body.site-shell.blog-article .prose > h2:first-child,
  body.site-shell.tech-news-page .news-detail .news-prose section > h2 { margin-top: 0; }
  body.site-shell.blog-article .prose pre { padding: 16px; font-size: 13px; }
  body.site-shell.blog-article .prose table { font-size: 14px; }
  body.site-shell.blog-article .prose blockquote { padding: 16px 18px; }
  body.site-shell.blog-article .article-end { padding: 19px; }
  body.site-shell.blog-article .article-layout { margin-bottom: 48px; }
}
@media (max-width: 1099px), (max-height: 600px) {
  body.site-shell.blog-article .page-guide-link,
  body.site-shell.tech-news-page:has(.news-detail) .page-guide-link { min-height: 44px; }
  body.site-shell.blog-article .page-guide-label,
  body.site-shell.tech-news-page:has(.news-detail) .page-guide-label { font-size: 14px; }
  body.site-shell.blog-article .page-guide-toggle,
  body.site-shell.tech-news-page:has(.news-detail) .page-guide-toggle { min-height: 44px; }
}
@media (max-width: 560px) {
  body.site-shell.tech-news-page .news-detail-grid .news-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  body.site-shell.blog-article :is(.article-cover, .case-figure > a),
  body.site-shell.blog-article :is(.article-cover, .case-figure > a):hover { transform: none; transition: none; }
}
@media (forced-colors: active) {
  body.site-shell.blog-article,
  body.site-shell.tech-news-page .news-detail {
    --reading-text: CanvasText;
    --reading-heading: CanvasText;
    --reading-muted: CanvasText;
    --reading-link: LinkText;
    --reading-line: CanvasText;
  }
  body.site-shell.blog-article .toc a[aria-current="location"] {
    color: HighlightText;
    background: Highlight;
    outline: 1px solid Highlight;
    box-shadow: none;
  }
  body.site-shell.blog-article .prose a:not(.button),
  body.site-shell.tech-news-page .news-detail .news-prose a:not(.news-source-link) { text-decoration-color: LinkText; }
}
@media print {
  body.site-shell.blog-article,
  body.site-shell.tech-news-page .news-detail {
    --reading-text: #17242b;
    --reading-heading: #17242b;
    --reading-muted: #425361;
    --reading-link: #244f65;
    --reading-line: #bfcad0;
  }
  body.site-shell.blog-article { padding-bottom: 0; background: white; color: #17242b; }
  body.site-shell.blog-article :is(.site-header, .site-footer, .toc, .page-guide, .skip, .back-link),
  body.site-shell.tech-news-page .news-detail .news-sidebar { display: none; }
  body.site-shell.blog-article .article-layout,
  body.site-shell.tech-news-page .news-detail-grid { display: block; width: 100%; margin-bottom: 0; }
  body.site-shell.blog-article .prose,
  body.site-shell.tech-news-page .news-detail .news-prose { font-size: 11pt; line-height: 1.7; }
  body.site-shell.blog-article .article-hero { padding-top: 0; }
  body.site-shell.blog-article .article-hero h1 { font-size: 25pt; }
  body.site-shell.blog-article .prose :is(h2, h3, h4),
  body.site-shell.tech-news-page .news-detail .news-prose :is(h2, h3, h4) { break-after: avoid; }
  body.site-shell.blog-article :is(figure, pre, blockquote),
  body.site-shell.tech-news-page .news-detail-cover { break-inside: avoid; }
  body.site-shell.blog-article .article-cover img { max-height: 85mm; object-fit: contain; }
  body.site-shell.blog-article .prose :is(pre, blockquote) { color: #17242b; background: white; border-color: #bfcad0; }
  body.site-shell.blog-article .prose pre { overflow: visible; white-space: pre-wrap; }
  body.site-shell.blog-article .prose pre code { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
  body.site-shell.blog-article .prose table { display: table; overflow: visible; font-size: 10pt; }
}
