.article-page { max-width: 1008px; padding-block: 28px 16px; }
.article-page [hidden] { display: none !important; }
.article-page > .back-link { display: inline-flex; align-items: center; gap: 10px; max-width: none; margin: 0 0 20px; min-height: 44px; font-size: .875rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 700px) minmax(220px, 260px); gap: 28px 48px; }
.article-layout > * { min-width: 0; }
.article-page .article-heading { grid-column: 1; grid-row: 1; max-width: none; margin: 0; }
.article-page .article-heading h1 { margin: 14px 0; font-size: clamp(2.125rem, calc(3.8vw * var(--text-scale, 1)), 3.125rem); line-height: 1.04; }
.article-page .article-summary { margin: 0 0 18px; font-size: 1.25rem; line-height: 1.4; }
.article-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: .875rem; }
.article-reading-time { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.article-page svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.article-share { position: relative; }
.article-share-trigger { display: inline-flex; align-items: center; gap: 8px; border: 0; border-left: 1px solid var(--line); padding: 0 20px; min-height: 44px; background: transparent; color: var(--muted); cursor: pointer; font-size: .875rem; }
.article-share-trigger:hover { color: var(--accent); }
.article-share-status { font-size: 0.75rem; color: var(--accent); }
.article-share-panel { position: absolute; top: calc(100% + 8px); left: 0; width: 260px; max-width: calc(100vw - 36px); padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 12px 40px #0002; z-index: 4; }
.article-share-panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--ink); font-size: 0.875rem; }
.article-share-close { width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.article-share-options { display: flex; gap: 10px; }
.article-share-options > * { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.article-share-options > *:hover { color: var(--accent); border-color: var(--accent); }
.article-copy-fallback { margin-top: 14px; }
.article-copy-fallback label { display: block; margin-bottom: 6px; }
.article-copy-fallback input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: var(--paper); color: var(--ink); font-size: 1rem; }
.article-figure { grid-column: 1; grid-row: 2; margin: 0; }
.article-page .article-image { aspect-ratio: 2.3; margin: 0; }
.article-figure figcaption { margin-top: 8px; color: var(--muted); font-size: .8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.article-image-source { font-weight: 600; white-space: nowrap; }
.article-toc { grid-column: 2; grid-row: 1 / 4; }
.article-toc details { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; border-left: 1px solid var(--line); padding: 0 0 0 18px; }
.article-toc summary { min-height: 44px; padding-top: 8px; color: var(--muted); font-size: .875rem; cursor: pointer; }
.article-toc summary::marker { color: var(--muted); font-size: 0.625rem; }
.article-toc ol { position: relative; list-style: none; margin: 0; padding: 0; }
.article-toc a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 10px 10px 10px 20px; border-radius: 4px; color: var(--muted); font-size: .875rem; line-height: 1.6; transition: color 180ms ease, background-color 180ms ease; }
.article-toc a:hover, .article-toc a[aria-current="location"] { color: var(--accent); }
.article-toc a:hover { background-color: var(--surface); }
.article-toc a[aria-current="location"] { background: linear-gradient(90deg, var(--surface), transparent); }
.article-toc ol[data-tracking]::before, .article-toc ol[data-tracking]::after { content: ""; position: absolute; top: 0; pointer-events: none; transition: transform 240ms ease; }
.article-toc ol[data-tracking]::before { left: -20px; width: 3px; height: 24px; border-radius: 3px; background: linear-gradient(transparent, var(--accent), transparent); transform: translateY(calc(var(--toc-marker-y) - 12px)); }
.article-toc ol[data-tracking]::after { left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--surface); transform: translateY(calc(var(--toc-marker-y) - 3.5px)); }
.article-toc ol:not([data-tracking]) a[aria-current="location"]::before { content: ""; position: absolute; left: 0; top: 18px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.article-page .article-body { grid-column: 1; grid-row: 3; max-width: min(100%, 68ch); margin: 0; font-size: 1.125rem; line-height: 1.75; }
.article-body section { scroll-margin-top: 24px; }
.article-body section > p { margin: 0 0 18px; }
.article-ai-disclosure { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; line-height: 1.6; }
.article-section { margin-top: 32px; }
.article-section h2 { margin: 0 0 12px; font: 400 1.875rem/1.15 var(--font-display); letter-spacing: -.02em; }
.article-markdown h3 { margin: 0 0 12px; font: 400 1.5rem/1.25 var(--font-display); }
.article-markdown ul, .article-markdown ol { padding-left: 1.5em; margin: 0 0 18px; }
.article-markdown blockquote { margin: 0 0 18px; border-left: 2px solid var(--accent); padding-left: 20px; }
.article-markdown pre { overflow-x: auto; background: var(--surface); padding: 16px; border-radius: 6px; }
.article-markdown code { font-size: .9em; overflow-wrap: anywhere; }
.article-markdown a { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.article-recommendations { grid-column: 1; grid-row: 4; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: min(100%, 68ch); padding-top: 24px; border-top: 1px solid var(--line); font-size: 1.125rem; }
.article-related { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.article-related-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.article-related-heading > * { min-width: 0; }
.article-related-heading h2 { margin: 0; font: 400 1.8125rem/1.3 var(--font-display); }
.article-related-story { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; min-width: 0; }
.article-related-image { display: block; border-radius: 6px; overflow: hidden; }
.article-related-image img { width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; }
.article-related-story .story-meta { margin-bottom: 6px; }
.article-related-story h3 { margin: 0; font: 600 1.125rem/1.4 var(--font-reading); overflow-wrap: break-word; }
.article-discovery { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 24px; min-height: 240px; padding: 32px; border-radius: 8px; background: linear-gradient(90deg, #0c1027eb, #0c1027b3 60%, #0c102740), url('/discovery-earth.webp') center / cover; color: #f1eaf5; }
.article-discovery h2 { max-width: min(100%, 20ch); margin: 0; font: 400 1.875rem/1.15 var(--font-display); letter-spacing: -.02em; }
.article-discovery:hover { color: #f1eaf5; }
.article-discovery:hover .button { filter: brightness(1.12); }
@media (max-width: 1099px) {
  .article-layout { gap: 28px; }
  .article-page .article-heading h1 { font-size: 2.5rem; }
  .article-page .article-summary { font-size: 1.125rem; }
}
@media (max-width: 899px) {
  .article-page { max-width: 748px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .article-toc, .article-recommendations { grid-column: 1; }
  .article-toc { grid-row: 3; }
  .article-page .article-body { grid-row: 4; }
  .article-recommendations { grid-row: 5; }
  .article-toc details { position: static; max-height: none; padding: 4px 16px; border: 1px solid var(--line); border-radius: 6px; }
  .article-toc summary { padding-block: 11px; }
  .article-toc ol { margin-left: 4px; padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .article-toc a, .article-toc ol[data-tracking]::before, .article-toc ol[data-tracking]::after { transition: none; }
}
@media (max-width: 640px) {
  .article-page { padding-top: 18px; }
  .article-page > .back-link { margin-bottom: 16px; }
  .article-page .article-heading h1 { font-size: 2.125rem; line-height: 1.08; }
  .article-page .article-summary { font-size: 1.0625rem; }
  .article-page .article-image { aspect-ratio: 1.65; }
  .article-tools { gap: 4px 16px; }
  .article-tools { position: relative; }
  .article-share { position: static; }
  .article-share-panel { left: 0; right: auto; }
  .article-share-status { width: 100%; }
  .article-section h2 { font-size: 1.6875rem; }
  .article-related-story { grid-template-columns: 88px minmax(0, 1fr); }
  .article-discovery { padding: 24px; background-image: linear-gradient(90deg, #0c1027e6, #0c1027b3), url('/discovery-earth.webp'); }
  .article-discovery h2 { font-size: 1.625rem; }
}
