/* Shenlun is deliberately scoped: the existing politics and law presentations
   keep their own layout and review behavior. */
body.shenlun-space {
  --sl-green: #345c4c;
  --sl-green-soft: #e0e9de;
  --sl-ink: #26332e;
  --sl-muted: #737b72;
  --sl-line: #e1e4da;
  --sl-paper: #fbfaf5;
  color: var(--sl-ink);
  background: #f2f3ed;
}
.shenlun-space .app-shell { grid-template-rows: 68px 46px minmax(0, 1fr) 32px; }
.shenlun-space .topbar { grid-template-columns: 270px minmax(220px, 600px) 1fr; background: #fafaf3; }
.shenlun-space .brand-mark { border-color: var(--sl-green); color: var(--sl-green); border-radius: 10px 2px 10px 2px; }
.shenlun-space .brand-title { font-weight: 700; }
.shenlun-space .brand-sub { letter-spacing: .12em; }
.shenlun-space .space-switch button.active { background: var(--sl-green); color: #fff; border-color: var(--sl-green); }
.shenlun-space #focusToggle, .shenlun-space #sourceToggle, .shenlun-space #pinBtn, .shenlun-space #searchResults { display: none !important; }
.shenlun-space .search-wrap { border-color: #d3d8c8; background: #fffef9; }
.shenlun-space .modebar { background: #fafaf3; }
.shenlun-space .view-tab { font-size: 13px; }
.shenlun-space .view-tab.active:after { background: var(--sl-green); }
.shenlun-space .workspace { grid-template-columns: 188px minmax(0, 1fr); gap: 22px; padding: 20px 24px 12px; }
.shenlun-space .panel { border-color: var(--sl-line); background: var(--sl-paper); border-radius: 14px; box-shadow: 0 4px 20px #33422a04; }
.shenlun-space .stage-head { min-height: 70px; height: auto; flex-shrink: 0; padding: 7px 2px 19px; gap: 10px; border: 0; }
.shenlun-space .stage-head h1 { margin-top: 5px; font-size: 27px; color: #2c4236; }
.shenlun-space .eyebrow { font-size: 10px; letter-spacing: .16em; color: var(--sl-green); }
.shenlun-space .stage-content { padding: 5px 2px 20px; scrollbar-gutter: stable; }
.shenlun-space .panel-head { height: 49px; flex-shrink: 0; color: var(--sl-green); letter-spacing: .06em; border-color: var(--sl-line); }
.shenlun-space .nav-tree { padding: 10px 8px; }
.shenlun-space .coverage-card { padding: 12px 10px; background: transparent; border: 0; }
.shenlun-space .detail { position: relative; width: auto; top: auto; bottom: auto; right: auto; margin: 0; z-index: auto; }
.shenlun-space .detail-content { padding: 28px 34px; scrollbar-gutter: stable; }
.shenlun-space .detail-close-btn { display: none; }
.shenlun-space :is(button, a, input, textarea, select, summary):focus-visible { outline: 3px solid #86a58a; outline-offset: 3px; }
.shenlun-space :is(input, textarea, select) { font: inherit; accent-color: var(--sl-green); }
.shenlun-space button { touch-action: manipulation; }
.sl-button { border: 1px solid #d3d9ca; border-radius: 8px; padding: 9px 13px; background: #fffef9; font-size: 12px; font-weight: 500; line-height: 1.4; }
.sl-button:hover { background: #edf1e7; border-color: #a8b7a2; }
.sl-button.sl-primary { background: var(--sl-green); border-color: var(--sl-green); color: #fff; }
.sl-button.sl-primary:hover { background: #284b3d; }
.sl-button.active { background: var(--sl-green-soft); border-color: #a4b9a0; color: #274b37; }
.sl-button:disabled { cursor: wait; opacity: .6; }
.sl-text-button { background: none; border: 0; color: var(--sl-green); padding: 5px 3px; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.sl-kicker { font-size: 10px; color: var(--sl-green); letter-spacing: .08em; font-weight: 600; }
.sl-caption { color: var(--sl-muted); font-size: 11px; line-height: 1.8; }
.sl-nav-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: none; color: #5c675c; padding: 10px 9px 10px calc(10px + var(--sl-depth, 0) * 12px); margin: 2px 0; border-radius: 7px; text-align: left; font-size: 12px; line-height: 1.5; }
.sl-nav-item:hover { background: #f0f2e9; }
.sl-nav-item.active { background: var(--sl-green-soft); color: #284b3d; font-weight: 700; }
.sl-nav-item small { margin-top: 1px; opacity: .7; font-size: 10px; }
.sl-side-note p { color: #747d70; font-size: 11px; line-height: 1.9; margin: 10px 0 0; }
.sl-intro { margin-bottom: 24px; }
.sl-intro p { font-size: 14px; line-height: 1.8; margin: 0 0 6px; }
.sl-intro > span { font-size: 11px; color: var(--sl-muted); }
.sl-results-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 10px; font-size: 11px; color: var(--sl-muted); margin-bottom: 12px; }
.sl-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sl-entry-card { text-align: left; border: 1px solid var(--sl-line); padding: 18px; border-radius: 11px; background: #fffef9; display: flex; flex-direction: column; min-width: 0; color: var(--sl-ink); transition: border-color .15s, box-shadow .15s; }
.sl-entry-card:hover, .sl-entry-card.selected { border-color: #829c7f; box-shadow: 0 4px 16px #385c3510; }
.sl-entry-card.selected { background: #f2f6ed; }
.sl-card-index { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; color: #7b8874; letter-spacing: .04em; }
.sl-card-index > span { color: #7a8373; text-align: right; letter-spacing: 0; }
.sl-entry-card h2 { font-family: Georgia, 'Songti SC', 'SimSun', serif; font-size: 24px; margin: 15px 0 10px; font-weight: 500; }
.sl-entry-card > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 1.85; color: #687060; margin: 0 0 20px; }
.sl-card-bottom { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1px solid #edeee5; color: #7c8674; font-size: 10px; line-height: 1.6; }
.sl-card-bottom > span:last-child { font-size: 15px; }
.sl-mobile-filter { display: none; }
.sl-empty { padding: 45px 20px; text-align: center; line-height: 1.8; color: var(--sl-muted); font-size: 13px; }
.sl-detail-empty { padding: 90px 8px 0; text-align: center; color: #87917e; }
.sl-detail-empty > span { font-family: 'Songti SC', serif; font-size: 26px; letter-spacing: .1em; color: #acb6a3; }
.sl-detail-empty h2 { font-size: 16px; font-weight: 500; margin: 24px 0 10px; }
.sl-detail-empty p { font-size: 12px; line-height: 1.9; }
.sl-detail-top { display: flex; align-items: center; justify-content: space-between; }
.sl-detail-title { font-family: Georgia, 'Songti SC', serif; font-size: 38px; font-weight: 500; line-height: 1.4; margin: 14px 0; outline: none; overflow-wrap: anywhere; }
.sl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.sl-tags > span { background: #edf1e7; color: #617657; border-radius: 5px; font-size: 10px; padding: 4px 7px; }
.sl-tags > span.sl-role { background: #f0eadb; color: #8b7650; }
.sl-alias { font-size: 11px; color: #828474; line-height: 1.8; }
.sl-detail-section { margin: 22px 0 0; border-top: 1px solid var(--sl-line); padding-top: 16px; }
.sl-detail-section h3 { font-size: 11px; color: var(--sl-green); font-weight: 700; margin: 0 0 9px; }
.sl-detail-section p { font-size: 12px; line-height: 1.95; margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sl-boundary { background: #f5f0e2; border: 0; border-radius: 8px; padding: 13px; }
.sl-boundary h3 { color: #8a754b; }
.sl-boundary p { color: #756850; }
.sl-example-answer { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--sl-line); border-radius: 7px; font-size: 12px; }
.sl-example-answer summary { color: var(--sl-green); cursor: pointer; line-height: 1.8; }
.sl-example-answer b { display: block; margin-top: 12px; line-height: 1.8; }
.sl-relation { padding: 11px 0; border-bottom: 1px dashed var(--sl-line); }
.sl-relation > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sl-relation-term { color: var(--sl-green); background: #eaf0e4; border: 0; border-radius: 5px; padding: 4px 6px; font-size: 11px; }
.sl-relation-arrow { font-size: 10px; color: #8b876f; }
.sl-relation > p { margin: 8px 0 0; font-size: 11px; color: #7c7d70; }
.sl-source { margin: 12px 0 0; padding: 12px; border-radius: 7px; background: #f0f0e8; }
.sl-source figcaption { color: #7a7d70; font-size: 10px; line-height: 1.7; }
.sl-source blockquote { margin: 9px 0 0; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.sl-context-note { margin-top: 18px; padding: 12px; border-left: 3px solid #c7b684; color: #847455; background: #f4f0e3; font-size: 11px; line-height: 1.9; }
.sl-id-note { color: #919387; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.sl-footer { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 7px 16px; font-size: 10px; line-height: 1.7; color: #89907f; }
.sl-footer button { background: none; border: 0; padding: 0; color: #65795a; font-size: inherit; flex-shrink: 0; }
.shenlun-space[data-sl-view='practice'] .workspace { grid-template-columns: minmax(0, 1fr); max-width: 1040px; width: 100%; margin: 0 auto; }
.shenlun-space[data-sl-view='practice'] .sidebar, .shenlun-space[data-sl-view='practice'] .detail, .shenlun-space[data-sl-view='practice'] .search-wrap { display: none !important; }
.shenlun-space[data-sl-view='practice'] .topbar { grid-template-columns: 1fr auto; }
.sl-practice-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; color: #7c8373; font-size: 11px; }
.sl-progress { height: 4px; background: #e8ecdf; border-radius: 4px; margin: 11px 0 20px; overflow: hidden; }
.sl-progress > span { display: block; background: #77926a; height: 100%; }
.sl-practice-card { background: #fffef9; padding: 30px 36px; border: 1px solid var(--sl-line); border-radius: 12px; max-width: 780px; margin: 0 auto; }
.sl-practice-card > h2 { font-size: 14px; font-weight: 500; line-height: 1.8; color: #839078; margin-top: 15px; }
.sl-question { font-family: Georgia, 'Songti SC', serif; font-size: 22px; line-height: 1.95; margin: 23px 0 30px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sl-your-answer { display: block; color: #88907f; font-size: 11px; margin-bottom: 8px; }
#slYourAnswer { width: 100%; border: 1px solid #d9ddcf; border-radius: 8px; padding: 12px; color: var(--sl-ink); resize: vertical; background: #fafbf5; line-height: 1.8; font-size: 14px; }
.sl-reveal { display: block; margin: 24px auto 0; min-height: 44px; padding: 12px 25px; }
.sl-practice-answer { margin-top: 24px; border-top: 1px solid var(--sl-line); padding-top: 24px; }
.sl-practice-answer h3 { font-family: Georgia, 'Songti SC', serif; font-size: 25px; margin: 12px 0; line-height: 1.6; }
.sl-practice-answer p { font-size: 13px; line-height: 1.9; }
.sl-answer-boundary { background: #f4f0e2; padding: 14px; border-radius: 8px; margin: 20px 0; color: #7d704f; }
.sl-answer-boundary b { font-size: 11px; }
.sl-answer-boundary p { font-size: 12px; margin: 6px 0 0; }
.sl-grade-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.sl-grade-buttons button { min-height: 47px; }
.sl-grade-again { background: #f8ede6; color: #9a6c57; border-color: #e7d3c5; }
.sl-grade-fuzzy { background: #f7f1df; color: #928048; border-color: #e7dcb8; }
.sl-study-finish { padding: 35px 15px; text-align: center; }
.sl-finish-mark { display: grid; place-items: center; margin: 0 auto 22px; width: 60px; height: 60px; border-radius: 50%; background: #e2ecda; color: #557b49; font-size: 28px; }
.sl-study-finish h2 { font-family: 'Songti SC', serif; font-size: 29px; font-weight: 500; }
.sl-study-finish > p { font-size: 13px; color: var(--sl-muted); line-height: 1.9; }
.sl-study-finish .sl-actions { justify-content: center; }
.sl-grade-summary { display: flex; justify-content: center; gap: 20px; margin: 28px 0; font-size: 12px; color: #858d7b; }
.sl-grade-summary b { display: block; font-size: 24px; margin-top: 8px; color: #496342; font-weight: 500; }
.sl-manage-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.sl-manage-tabs button { font-size: 11px; padding: 8px 11px; }
.sl-manage-intro { margin: 0 0 20px; font-size: 12px; color: #737d68; line-height: 1.9; }
.sl-manage-intro p { margin: 0 0 6px; }
.sl-manage-intro > span { font-size: 11px; }
.sl-manage-intro > button { margin-top: 8px; }
.sl-edit-list { display: flex; flex-direction: column; border: 1px solid var(--sl-line); border-radius: 9px; background: #fffef9; overflow: hidden; }
.sl-edit-list > div { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 14px; border-bottom: 1px solid #e8eadf; }
.sl-edit-list > div:last-child { border-bottom: 0; }
.sl-edit-list b { display: block; font-weight: 500; font-size: 13px; line-height: 1.8; }
.sl-edit-list b > em { font-style: normal; font-size: 10px; color: #889078; }
.sl-edit-list small { display: block; color: #8a8e80; font-size: 10px; line-height: 1.8; margin-top: 4px; }
.sl-edit-list button { flex-shrink: 0; }
.sl-row-actions { display: flex; flex-shrink: 0; gap: 7px; align-items: center; }
.sl-issue-list article { border: 1px solid #e2ddcc; background: #faf7ed; padding: 18px; border-radius: 9px; margin-bottom: 12px; }
.sl-issue-list blockquote { margin: 14px 0 9px; font-size: 17px; font-family: 'Songti SC', serif; line-height: 1.8; }
.sl-issue-list p { color: #8a7e5e; font-size: 12px; line-height: 1.9; margin-bottom: 0; }
.sl-backup-intro h2 { font-family: 'Songti SC', serif; font-size: 23px; font-weight: 500; }
.sl-backup-intro p { color: #76806c; font-size: 12px; line-height: 2; }
.sl-backup-grid { display: grid; gap: 15px; margin-top: 23px; }
.sl-backup-grid article { border: 1px solid var(--sl-line); padding: 20px; border-radius: 10px; background: #fffef9; }
.sl-backup-grid h3 { font-size: 17px; font-weight: 500; margin: 10px 0; }
.sl-backup-grid p { font-size: 12px; color: #808775; line-height: 1.9; }
.sl-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.sl-dialog { width: min(660px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #d0d7c7; border-radius: 14px; background: #fafaf3; color: var(--sl-ink); box-shadow: 0 20px 90px #23342140; }
.sl-dialog::backdrop { background: #1e2c266b; backdrop-filter: blur(3px); }
.sl-dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 44px); }
.sl-dialog header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px 23px; border-bottom: 1px solid var(--sl-line); flex-shrink: 0; }
.sl-dialog h2 { font-size: 18px; margin: 0; font-weight: 600; }
.sl-dialog-close { border: 0; background: none; font-size: 25px; color: #87927b; padding: 0 4px; }
.sl-dialog-body { padding: 23px; overflow: auto; min-height: 0; font-size: 13px; line-height: 1.9; }
.sl-dialog footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 23px; border-top: 1px solid var(--sl-line); flex-shrink: 0; }
.sl-form-field { display: block; margin-bottom: 19px; }
.sl-form-field > span { display: block; font-size: 12px; font-weight: 600; color: #617558; margin-bottom: 7px; }
.sl-form-field :is(input, textarea, select) { display: block; width: 100%; padding: 10px 12px; border: 1px solid #d0d7c7; background: #fffef9; border-radius: 7px; font-size: 13px; line-height: 1.7; color: var(--sl-ink); }
.sl-form-field textarea { resize: vertical; }
.sl-form-field small { display: block; font-size: 10px; color: #89927f; line-height: 1.9; margin-top: 6px; }
.sl-category-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 1px solid var(--sl-line); padding: 13px; border-radius: 8px; margin: 0 0 20px; min-width: 0; }
.sl-category-checks legend { font-size: 12px; color: #617558; font-weight: 600; padding: 0 5px; }
.sl-category-checks label { display: flex; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.8; }
.sl-category-checks input { flex-shrink: 0; margin-top: 4px; }
.sl-form-divider { border-top: 1px solid var(--sl-line); padding-top: 17px; margin: 24px 0 18px; font-size: 12px; color: #718465; font-weight: 600; }
.sl-form-error { padding: 12px; background: #f9e7dd; color: #9e553b; border-radius: 7px; font-size: 12px; margin-top: 12px; overflow-wrap: anywhere; }
.sl-notice { position: fixed; left: 50%; bottom: 48px; transform: translateX(-50%); width: max-content; max-width: min(600px, calc(100vw - 24px)); padding: 13px 18px; border: 1px solid #c3d2b8; background: #f5faee; color: #48673b; box-shadow: 0 6px 30px #26362020; z-index: 150; border-radius: 10px; font-size: 12px; line-height: 1.8; }
.sl-notice[hidden], .sl-form-error[hidden] { display: none; }
.sl-notice.is-error { background: #fff4e8; border-color: #dfc6ad; color: #936542; }
.sl-storage-warning { padding: 12px 18px; background: #f7ead3; color: #8b642f; font-size: 12px; line-height: 1.8; flex-shrink: 0; }
.sl-import-stats { display: flex; gap: 40px; padding: 15px 0; }
.sl-import-stats dt { font-size: 11px; color: #8a927e; }
.sl-import-stats dd { margin: 5px 0 0; font-size: 23px; }
.sl-import-file { overflow-wrap: anywhere; }
@media (min-width: 1500px) {
  .shenlun-space .workspace { grid-template-columns: 210px minmax(0, 1fr); max-width: 1920px; width: 100%; margin: 0 auto; }
  .sl-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .shenlun-space .workspace { grid-template-columns: 176px minmax(0, 1fr); }
  .shenlun-space .topbar { grid-template-columns: 230px minmax(200px, 1fr) auto; gap: 15px; }
  .shenlun-space .detail { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); border-radius: 15px 0 0 15px; background: #fbfaf5; transform: translateX(105%); visibility: hidden; pointer-events: none; transition: transform .2s ease; box-shadow: -10px 0 60px #24322325; }
  .shenlun-space .detail.sl-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
  .shenlun-space .detail-close-btn { display: block; }
  .shenlun-space .detail-backdrop { display: block; position: fixed; inset: 0; z-index: 79; background: #2434214a; opacity: 0; pointer-events: none; }
  .shenlun-space .detail-backdrop.open { opacity: 1; pointer-events: auto; }
  .shenlun-space.sl-detail-open { overflow: hidden; }
}
@media (max-width: 760px) {
  body.shenlun-space { overflow: auto; overflow-x: hidden; }
  .shenlun-space .app-shell { height: auto; min-height: 100dvh; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .shenlun-space .topbar { position: relative; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 7px; padding: 14px; }
  .shenlun-space .brand-title { font-size: 17px; }
  .shenlun-space .brand-mark { width: 35px; height: 35px; }
  .shenlun-space .brand-wrap { gap: 8px; min-width: 0; }
  .shenlun-space .brand-sub { display: none; }
  .shenlun-space .top-actions { grid-column: 2; grid-row: 1; }
  .shenlun-space .space-switch { gap: 0; }
  .shenlun-space .space-switch button { font-size: 11px; padding: 7px 9px; }
  .shenlun-space .search-wrap { grid-column: 1 / 3; grid-row: 2; min-width: 0; height: 40px; }
  .shenlun-space .search-wrap input { font-size: 12px; }
  .shenlun-space .search-kbd { display: none; }
  .shenlun-space .modebar { position: sticky; top: 0; min-height: 47px; z-index: 20; padding: 0 10px; overflow: visible; }
  .shenlun-space .view-tabs { width: 100%; min-width: 0; }
  .shenlun-space .view-tab { flex: 1; min-width: 0; padding: 0 4px; font-size: 12px; height: 47px; white-space: normal; }
  .shenlun-space .modebar-right { display: none; }
  .shenlun-space .workspace { display: block; padding: 8px; width: 100%; max-width: 100vw; }
  .shenlun-space .sidebar { display: none; }
  .shenlun-space .stage { min-height: calc(100dvh - 240px); overflow: visible; }
  .shenlun-space .stage-head { min-height: 86px; padding: 15px; }
  .shenlun-space .stage-head h1 { font-size: 22px; }
  .shenlun-space .stage-tools { flex-shrink: 0; }
  .shenlun-space .stage-tools .sl-button { font-size: 11px; padding: 8px 10px; }
  .shenlun-space .stage-content { padding: 16px 14px 20px; overflow: visible; min-width: 0; }
  .sl-intro { margin-bottom: 18px; }
  .sl-intro p { font-size: 13px; }
  .sl-intro > span { font-size: 10px; }
  .sl-mobile-filter { display: flex; align-items: center; gap: 10px; margin: 0 0 17px; font-size: 12px; color: #738267; }
  .sl-mobile-filter select { flex: 1; min-width: 0; padding: 10px; border: 1px solid var(--sl-line); border-radius: 7px; background: #fffef9; color: #52654a; font-size: 12px; }
  .sl-results-line { font-size: 10px; line-height: 1.8; }
  .sl-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .sl-entry-card { padding: 13px; border-radius: 9px; }
  .sl-entry-card h2 { font-size: 20px; margin-top: 17px; line-height: 1.5; }
  .sl-entry-card > p { font-size: 11px; line-height: 1.85; margin-bottom: 15px; }
  .sl-card-index { font-size: 9px; }
  .sl-card-bottom { font-size: 9px; }
  .shenlun-space .detail { top: 0 !important; bottom: 0 !important; right: 0 !important; left: auto !important; width: 100vw !important; height: 100dvh !important; max-height: 100dvh !important; margin: 0 !important; border-radius: 14px 0 0 14px !important; min-height: 0 !important; transform: translateX(105%) !important; visibility: hidden !important; pointer-events: none; }
  .shenlun-space .detail.sl-open { transform: translateX(0) !important; visibility: visible !important; pointer-events: auto; }
  .shenlun-space .detail-content { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)) !important; }
  .shenlun-space .detail .panel-head { min-height: 53px; }
  .sl-footer { display: block; text-align: center; font-size: 9px; padding: 10px 17px 18px; }
  .sl-footer button { display: block; margin: 5px auto 0; }
  .sl-practice-meta { font-size: 10px; }
  .sl-practice-card { padding: 22px 17px; }
  .sl-practice-card > h2 { font-size: 12px; }
  .sl-question { font-size: 21px; line-height: 1.9; margin: 20px 0 25px; }
  .sl-practice-answer h3 { font-size: 23px; }
  .sl-grade-buttons { gap: 6px; }
  .sl-grade-buttons button { font-size: 11px; padding: 12px 6px; }
  .sl-grade-summary { gap: 25px; }
  .sl-manage-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .sl-manage-tabs button { flex-shrink: 0; }
  .sl-edit-list > div { padding: 12px; gap: 9px; }
  .sl-edit-list b { font-size: 12px; }
  .sl-edit-list .sl-button { padding: 7px 10px; font-size: 11px; }
  .sl-row-actions { gap: 6px; flex-direction: column; }
  .sl-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 20px); border-radius: 11px; }
  .sl-dialog form { max-height: calc(100dvh - 24px); }
  .sl-dialog header { padding: 16px; }
  .sl-dialog h2 { font-size: 17px; }
  .sl-dialog-body { padding: 17px; }
  .sl-dialog footer { padding: 13px 17px; }
  .sl-category-checks { grid-template-columns: 1fr; }
  .sl-form-field :is(input, textarea, select) { font-size: 16px; }
  .sl-notice { bottom: 20px; font-size: 11px; padding: 12px 15px; }
}
@media (max-width: 560px) {
  .sl-card-grid { grid-template-columns: 1fr; }
  .sl-entry-card { padding: 17px; }
  .sl-entry-card > p { font-size: 12px; }
}
@media (max-width: 360px) {
  .sl-card-grid { grid-template-columns: 1fr; }
  .shenlun-space .brand-title { font-size: 15px; }
  .shenlun-space .space-switch button { padding: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .shenlun-space *, .shenlun-space *::before, .shenlun-space *::after { transition: none !important; scroll-behavior: auto !important; }
}
.sl-source figcaption a { color: var(--accent, #1d776a); overflow-wrap: anywhere; }
.sl-source figcaption small { display: block; margin-top: 6px; line-height: 1.6; }
.sl-source-match { font-size: 12px; line-height: 1.8; }
/* Reading edition: the quote is the primary evidence; editorial detail is optional. */
.shenlun-space .stage, .shenlun-space .sidebar { border: 0; box-shadow: none; background: transparent; }
.shenlun-space .sidebar .panel-head { padding-left: 9px; border: 0; }
.shenlun-space .detail { box-shadow: 0 7px 30px #213d2410; }
.sl-entry-card { border-color: #dfe4d8; background: #fffef9; }
.sl-nav-item { font-size: 13px; }
.sl-tags .sl-alias { background: none; padding-left: 0; }
.sl-source { background: #f3f3e9; border: 0; border-radius: 3px 12px 12px 3px; border-left: 3px solid #9fb19a; padding: 21px 24px 17px; margin-top: 23px; }
.sl-quote-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center; font-size: 11px; color: #617055; letter-spacing: .06em; }
.sl-context-badge { font-size: 11px; color: #617055; }
.sl-source-scope { font-size: 12px; line-height: 1.8; color: #4f6248; overflow-wrap: anywhere; }
.sl-source blockquote { font: 19px/1.95 Georgia, 'Songti SC', 'SimSun', serif; color: #304337; margin: 14px 0 20px; }
.sl-source mark { color: inherit; background: linear-gradient(transparent 55%, #e5dca5 55%); padding: 0 1px; }
.sl-source figcaption { font-size: 11px; line-height: 1.8; }
.sl-source-publisher { display: block; color: #617055; margin-bottom: 4px; }
.sl-source figcaption a { color: #617555; text-decoration: none; }
.sl-source figcaption a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sl-source-notes { font-size: 11px; color: #617055; margin-top: 14px; line-height: 1.85; }
.sl-source-notes summary { cursor: pointer; width: fit-content; }
.sl-source-notes p { margin: 10px 0 0; font-size: 11px; }
.sl-source-verified { color: #617055; }
.sl-detail-section { border: 0; margin-top: 24px; padding-top: 0; }
.sl-detail-section h3 { font-size: 12px; margin-bottom: 8px; color: #6a7a62; }
.sl-detail-section p { font-size: 14px; line-height: 1.95; }
.sl-boundary { border-left: 2px solid #cfc29b; border-radius: 0; padding: 0 0 0 14px; background: none; }
.sl-boundary p { font-size: 13px; color: #77725f; }
.sl-extra { border-top: 1px solid var(--sl-line); margin-top: 22px; padding-top: 17px; font-size: 12px; color: #536849; }
.sl-extra > summary { cursor: pointer; font-weight: 500; }
.sl-extra > summary span { color: #969d8f; margin-left: 6px; font-weight: 400; }
.sl-extra-body { padding: 9px 0 3px; color: var(--sl-ink); line-height: 1.95; }
.sl-extra-body h4 { color: #809273; font-size: 11px; margin: 13px 0 7px; font-weight: 500; }
.sl-extra-body p { font-size: 13px; margin: 8px 0; overflow-wrap: anywhere; }
.sl-record { margin-top: 26px; color: #9b9f92; }
.sl-footer { gap: 18px; font-size: 10px; }
@media (min-width: 1181px) {
  .shenlun-space:not(.sl-has-selection) .detail { display: none; }
  .shenlun-space.sl-has-selection .workspace { grid-template-columns: 176px minmax(320px, .82fr) minmax(500px, 1.18fr); gap: 20px; }
  .shenlun-space.sl-has-selection .sl-card-grid { grid-template-columns: 1fr; }
  .shenlun-space.sl-has-selection .stage-head { flex-wrap: wrap; padding-bottom: 13px; }
  .shenlun-space.sl-has-selection .stage-head h1 { font-size: 23px; }
  .shenlun-space .detail > .panel-head { height: 40px; min-height: 40px; background: transparent; border: 0; font-size: 10px; color: #96a08d; }
  .shenlun-space .detail-close-btn { display: block; }
}
@media (min-width: 1700px) {
  .shenlun-space.sl-has-selection .workspace { grid-template-columns: 210px minmax(380px, .9fr) minmax(620px, 1.1fr); }
  .shenlun-space.sl-has-selection .sl-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shenlun-space .stage-head { min-height: 72px; padding: 10px 7px 15px; }
  .shenlun-space .stage-content { padding: 10px 7px 20px; }
  .shenlun-space .detail-content { padding: 17px 23px calc(24px + env(safe-area-inset-bottom)) !important; }
  .shenlun-space .detail { border-radius: 0 !important; }
  .sl-detail-title { font-size: 32px; margin: 11px 0 15px; }
  .sl-source { padding: 17px 19px; margin-top: 21px; }
  .sl-source blockquote { font-size: 19px; line-height: 1.95; margin-bottom: 18px; }
  .sl-detail-section p { font-size: 14px; }
  .sl-footer { display: flex; font-size: 10px; padding: 14px; }
  .sl-footer button { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .shenlun-space * { transition: none !important; } }
