/* 中文排版与首页布局；颜色、导航和交互继承 Relearn 浅色主题。 */
:root {
  --MAIN-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --MAIN-font-weight: 400;
  --MAIN-TITLES-font: var(--MAIN-font);
  --MAIN-TITLES-H1-font-weight: 500;
  --MAIN-TITLES-H2-font-weight: 500;
  --MAIN-TITLES-H3-font-weight: 500;
  --MAIN-TITLES-H1-letter-spacing: 0;
  --MAIN-TITLES-H2-letter-spacing: 0;
  --MAIN-TITLES-H3-letter-spacing: 0;
  --MAIN-MAX-width: 70rem;
  --MENU-S-width: 17rem;
  --MENU-M-width: 17rem;
  --MENU-L-width: 19rem;
  --PRINT-MAIN-font: var(--MAIN-font);
}
body { line-height: 1.85; }
#R-header { padding-block: 1.2rem 1rem; }
#R-logo { display: block; text-align: left; }
#R-logo .brand-name { display: block; font-size: 1.6rem; font-weight: 600; line-height: 1.5; letter-spacing: .06em; }
#R-logo .brand-caption { display: block; margin-top: .4rem; font-size: .8rem; font-weight: 400; letter-spacing: .08em; opacity: .8; }
#R-body h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); text-transform: none; line-height: 1.5; margin-bottom: 1.5rem; }
#R-body h2 { font-size: 1.5rem; line-height: 1.6; margin-top: 2.4rem; }
#R-body h3 { font-size: 1.2rem; line-height: 1.6; }
#R-body p { margin-block: 1.1rem; }
.home-lead { text-align: center; color: #526047; font-size: 1.15rem; margin-bottom: 2rem !important; }
.topic-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 1.5rem 0 2rem; }
#R-body .topic-link { display: flex; flex-direction: column; gap: .9rem; padding: 1.5rem; border: 1px solid #e1e5dc; border-top: 3px solid #7dc903; border-radius: 3px; color: #282d24; text-decoration: none; background: #fafbf8; transition: background .15s, border-color .15s; }
#R-body .topic-link:hover { background: #f1f6e9; border-color: #91ab6c; }
.topic-name { display: flex; align-items: center; justify-content: space-between; font-size: 1.35rem; font-weight: 500; }
.topic-name > span { color: #68745e; font-size: 1.1rem; }
.topic-description { color: #596251; font-size: .95rem; }
.topic-action { margin-top: auto; padding-top: .5rem; color: #496b23; font-size: .9rem; }
.site-footer { font-size: .8rem; color: #bbb; }
.error-page { margin: 0; background: #fff; color: #282d24; font-family: var(--MAIN-font); }
.error-page main { max-width: 36rem; margin: 15vh auto; padding: 2rem; }
.error-code { margin: 0; color: #496b23; font-size: 4rem; }
.error-page a { color: #496b23; }
#R-body table { font-size: .95rem; }
#R-body pre { line-height: 1.65; }
#R-body mjx-container[display="true"] { overflow-x: auto; overflow-y: hidden; padding-block: .5rem; max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #659a21; outline-offset: 3px; }
@media (max-width: 47.999rem) {
  .topic-links { grid-template-columns: 1fr; gap: 1rem; }
  #R-body h1 { font-size: 1.8rem !important; }
  .home-lead { font-size: 1rem; }
  #R-body .topic-link { padding: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  .topic-links { display: block; }
  #R-body .topic-link { break-inside: avoid; margin-bottom: 1rem; }
}
