/* 沿用 INDEX 学堂的平面卡片与文档排版，作用域仅限公开学堂。 */
.portal-academy [hidden] { display: none !important; }
.portal-academy .academy-article-card { display: flex; flex-direction: column; min-width: 0; }
.portal-academy .academy-card-cover { aspect-ratio: 1.92 / 1; border: 1px solid #e5e7eb; background: #f3f4f6; overflow: hidden; }
.portal-academy .academy-card-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.portal-academy .academy-card-cover-empty { height: 100%; display: grid; place-items: center; color: #6b7280; font-size: 14px; }
.portal-academy .academy-card-title { margin: 18px 0 8px; font-size: 22px; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.portal-academy .academy-card-summary { margin: 0; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.portal-academy .academy-read-link { align-self: flex-start; margin-top: 18px; padding: 8px 0 3px; border: 0; border-bottom: 1px solid currentColor; background: none; color: #111827; font: inherit; font-weight: 600; cursor: pointer; }
.portal-academy .academy-card-footer { margin-top: 26px; padding-top: 12px; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.portal-academy .academy-card-footer span + span::before { content: " · "; }
.portal-academy-status { margin: 0 0 24px; color: #6b7280; font-size: 16px; line-height: 1.8; }
.portal-academy-status:empty { display: none; }
.portal-academy-retry { margin-left: 12px; border: 0; border-bottom: 1px solid currentColor; padding: 6px 0; background: none; color: #168457; font: inherit; cursor: pointer; }
html.portal-academy-reading { overflow: hidden; }
.portal-academy-reader { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #f8fafc; color: #111827; overflow-y: auto; font-family: var(--font); }
.portal-academy-reader::backdrop { background: #f8fafc; }
.portal-reader-toolbar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 16px 24px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; z-index: 1; }
.portal-reader-toolbar button { min-height: 40px; padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; font: inherit; font-size: 14px; cursor: pointer; }
.portal-academy-doc { width: min(100%, 820px); margin: 0 auto; padding: 40px 30px 100px; overflow-wrap: anywhere; }
.portal-academy-doc h1 { margin: 18px 0 24px; font-size: 42px; line-height: 1.35; letter-spacing: normal; font-weight: 700; }
.portal-academy-doc-meta { color: #6b7280; font-size: 14px; line-height: 1.8; }
.portal-academy-doc-summary { margin: 0 0 32px; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; font-size: 18px; line-height: 1.9; color: #4b5563; }
.portal-academy-doc-body { font-size: 18px; line-height: 1.9; }
.portal-academy-doc-body p { margin: 0 0 20px; }
.portal-academy-doc-body h2, .portal-academy-doc-body h3, .portal-academy-doc-body h4 { margin: 32px 0 16px; line-height: 1.5; font-weight: 700; }
.portal-academy-doc-body h2 { font-size: 26px; }
.portal-academy-doc-body h3 { font-size: 22px; }
.portal-academy-doc-body h4 { font-size: 20px; }
.portal-academy-doc-body ul, .portal-academy-doc-body ol { padding-left: 1.5em; margin: 0 0 20px; }
.portal-academy-doc-body hr { margin: 28px 0; border: 0; border-top: 1px solid #d1d5db; }
.portal-academy button:focus-visible, .portal-academy-reader button:focus-visible { outline: 2px solid #168457; outline-offset: 4px; }
@media (min-width: 761px) and (max-width: 1050px) {
  .portal-academy .academy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .portal-academy .academy-grid { grid-template-columns: 1fr; }
  .portal-academy .academy-card-title { font-size: 22px; }
  .portal-reader-toolbar { padding: 12px 20px; }
  .portal-academy-doc { padding: 24px 20px 64px; }
  .portal-academy-doc h1 { font-size: 28px; }
  .portal-academy-doc-summary, .portal-academy-doc-body { font-size: 17px; }
}
