.article-page { min-height: 100svh; background: #eef0ef; color: #26312d; color-scheme: light; }
.article-page .site-header { color: var(--ink); }
.article-main { width: min(calc(100% - 48px), 900px); margin: 0 auto; }
.reader-toolbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: #435a50; }
.reader-toolbar a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 4px; line-height: 1.5; }
.reader-toolbar a:hover { color: #106149; }
.reader-back-icon { font-size: 20px; }
.reader-original>span { font-family: var(--display); font-size: 16px; }

/* Give the sandboxed document the available viewport and its own scroll surface. */
.article-page.reader-frame-mode { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100svh; height: 100dvh; overflow: hidden; }
.reader-frame-mode .article-main { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.article-frame { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #fff; box-shadow: 0 0 0 1px #dbe2dd; }
.reader-status { padding: 56px 24px; text-align: center; color: #4c6358; font-size: 16px; line-height: 1.75; background: #fff; }
.reader-frame-mode .reader-status { position: absolute; grid-area: 2 / 1 / 3 / 2; inset: 0; z-index: 1; display: grid; place-content: center; padding: 16px; }
.reader-frame-mode .reader-footer { display: none; }

.reader-preview { max-width: 760px; margin: 0 auto; padding: 44px 48px 52px; background: #fff; }
.reader-byline { margin: 0 0 20px; color: #50675b; font-size: 14px; line-height: 1.75; }
.reader-preview h2 { margin: 0 0 28px; font-size: clamp(23px, 3vw, 32px); font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.reader-cover { width: 100%; height: auto; max-height: 720px; object-fit: contain; margin-bottom: 28px; }
.reader-digest { white-space: pre-wrap; overflow-wrap: anywhere; color: #4e6256; font-size: 16px; line-height: 1.95; }
.reader-note { margin-top: 26px; color: #536c60; font-size: 14px; line-height: 1.75; }
.reader-note a { text-decoration: underline; }
.reader-continue { display: inline-flex; align-items: center; gap: 24px; min-height: 48px; margin-top: 10px; padding: 12px 18px; background: #1c4135; color: #e1f4e9; font-size: 14px; }
.reader-continue:hover { background: #245745; }
.reader-footer { width: min(calc(100% - 48px), 900px); margin: 16px auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; color: #50675b; line-height: 1.75; }
.reader-footer>a { display: inline-flex; align-items: center; min-height: 44px; }
.reader-footer>span { font-family: var(--display); }
.article-page :focus-visible { outline-color: #1d8067; }
@media (max-width: 600px) {
  .article-main { width: 100%; }
  .reader-toolbar { min-height: 56px; padding-inline: 14px; gap: 8px; font-size: 13px; }
  .article-frame { box-shadow: none; }
  .reader-preview { padding: 24px 18px 32px; }
  .reader-preview h2 { margin-bottom: 20px; }
  .reader-cover { margin-bottom: 20px; }
  .reader-footer { width: calc(100% - 36px); margin-block: 12px; }
}
@media (max-height: 500px) {
  .reader-frame-mode .reader-toolbar { min-height: 48px; }
}
