/* Standalone reading pages and the homepage's inline reading view. */
#article-route { --article-body-size: 16px; position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.article-route-page { position: absolute; inset: 0; overflow-y: auto; background: #fff; overscroll-behavior: contain; visibility: hidden; pointer-events: none; }
.article-route-page.is-active { visibility: visible; pointer-events: auto; }
.story-page { --reading-width: 720px; --article-body-size: 16px; text-autospace: normal; font-kerning: normal; }
.story-page .site-header { position: relative; }
.story-back { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: .875rem; }
.story-back span { font-size: 1.2rem; }
.story-header { width: min(940px, calc(100% - 2 * var(--gutter))); margin: clamp(60px, 7vw, 108px) auto 56px; }
.story-label { margin: 0 0 22px; color: var(--muted); font-size: .75rem; letter-spacing: .07em; line-height: 1.7; }
.story-header h1 { margin: 0; font-size: clamp(38px, 5.2vw, 72px); line-height: 1.35; font-weight: 450; letter-spacing: -.045em; text-wrap: balance; }
.story-subtitle { margin: 20px 0 0; font-size: 1rem; color: var(--muted); line-height: 1.8; }
.story-image { width: min(1000px, calc(100% - 2 * var(--gutter))); margin: 66px auto; }
.story-image img { display: block; width: 100%; height: auto; }
.story-hero { width: min(1320px, calc(100% - 2 * var(--gutter))); margin-top: 0; margin-bottom: 76px; }
.article-route-target-hidden { opacity: 0; }
.article-transition-ghost { position: fixed; z-index: 1000; overflow: hidden; pointer-events: none; background: #ecebe8; transform-origin: top left; will-change: transform; }
.article-transition-ghost img { display: block; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
@keyframes article-header-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.article-route-page.is-active .story-header { animation: article-header-enter .34s .04s both; }
.story-prose, .story-credit { width: min(var(--reading-width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.story-prose p { margin: 0 0 26px; font-size: var(--article-body-size, 16px); line-height: 2.05; letter-spacing: 0; overflow-wrap: break-word; }
.story-prose p:last-child { margin-bottom: 0; }
.story-prose blockquote { margin: 0 0 44px; padding: 0; color: #858585; }
.story-prose blockquote p { margin-bottom: 12px; font-size: 15px; line-height: 2; letter-spacing: 0; }
.story-prose blockquote p:last-child { margin-bottom: 0; }
.story-prose h2, .story-prose h3, .story-prose h4 { margin: 44px 0 22px; font-weight: 500; line-height: 1.5; }
.story-prose h2 { font-size: 27px; }
.story-prose h3 { font-size: 22px; }
.story-prose a { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.story-prose ul, .story-prose ol { padding-left: 1.5em; margin: 0 0 26px; font-size: 16px; line-height: 2.05; }
.story-prose pre { overflow-x: auto; padding: 20px; background: #f5f5f5; }
.story-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 28px; }
.story-prose th, .story-prose td { padding: 10px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.story-prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.story-details { width: min(940px, calc(100% - 2 * var(--gutter))); margin: -28px auto 68px; padding: 0; }
.story-details-title { margin: 0 0 18px; color: var(--muted); font-size: .6875rem; font-weight: 550; letter-spacing: .06em; }
.story-details-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr); gap: 18px 34px; }
.story-details-grid p { position: relative; min-width: 0; margin: 0; }
.story-details-grid p:hover, .story-details-grid p:focus-within { z-index: 2; }
.story-details-grid strong, .story-details-grid > p > span { display: block; }
.story-details-grid strong { margin-bottom: 4px; color: #999; font-size: .625rem; font-weight: 500; letter-spacing: .04em; }
.story-details-grid .story-details-value { color: #555; font-size: var(--article-body-size, 16px); line-height: 1.7; overflow-wrap: break-word; }
.story-details-grid .story-details-name { position: relative; display: inline-block; }
.story-details-grid .story-details-name:focus-visible { outline: 1px solid #bbb; outline-offset: 3px; }
.story-details-english { color: #777; }
@media (hover: hover) and (pointer: fine) {
  .story-details-grid .story-details-english { display: none; }
  .story-details-grid .story-details-name:hover .story-details-english,
  .story-details-grid .story-details-name:focus .story-details-english { position: absolute; top: calc(100% + 4px); left: 0; z-index: 3; display: block; width: max-content; max-width: min(16rem, calc(100vw - 2 * var(--gutter))); padding: 3px 6px; border: 1px solid #eee; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.045); white-space: normal; }
}
@media (hover: none), (pointer: coarse) {
  .story-details-grid .story-details-name .story-details-english { display: block; margin-top: 2px; }
}
.story-credit { margin-top: 48px; font-size: .6875rem; line-height: 1.8; color: var(--muted); }
.story-credit a:hover, .story-back:hover { text-decoration: underline; text-underline-offset: 5px; }
.story-next { width: min(1000px, calc(100% - 2 * var(--gutter))); margin: 100px auto 0; padding: 36px 0 56px; border-top: 1px solid var(--line); }
.story-next a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 30px; align-items: center; }
.story-next small { grid-column: 1 / -1; color: var(--muted); font-size: .75rem; font-weight: 400; }
.story-next h2 { margin: 0; font-size: clamp(25px, 3.1vw, 42px); font-weight: 450; line-height: 1.5; letter-spacing: -.035em; }
.story-next .next-arrow { font-size: 2rem; }

@media (max-width: 800px) {
  #article-route, .story-page { --article-body-size: 15px; }
  .story-header { margin-top: 48px; margin-bottom: 32px; }
  .story-header h1 { font-size: clamp(30px, 7.8vw, 50px); line-height: 1.45; }
  .story-label { margin-bottom: 16px; font-size: .6875rem; }
  .story-image { margin-block: 42px; }
  .story-hero { margin-top: 0; margin-bottom: 42px; }
  .story-details { margin-top: -14px; margin-bottom: 46px; padding: 0; }
  .story-details-grid { grid-template-columns: 1fr; gap: 14px; }
  .story-prose p { font-size: var(--article-body-size, 15px); line-height: 2; margin-bottom: 23px; }
  .story-prose blockquote { margin-bottom: 36px; padding: 0; }
  .story-prose blockquote p { font-size: 14px; line-height: 2; }
  .story-prose ul, .story-prose ol { font-size: 15px; line-height: 2; }
  .story-next { margin-top: 64px; padding: 28px 0 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .article-route-page.is-active .story-header { animation: none; }
}
