/* Standard structure for the politics review courses. Content stays course-owned;
   this file supplies the shared dashboard, reading index and self-tests. */
/* The politics template uses a warm reading rail: the global top bar remains
   dark for navigation, while the course directory stays light and calm. */
body.matt-course-shell .sidebar {
  color: #5c5a54; background: linear-gradient(180deg, rgba(255,253,247,.96), rgba(250,246,235,.94));
  border-right: 1px solid rgba(185, 151, 73, .22); box-shadow: 8px 0 28px rgba(125, 99, 39, .08);
}
body.matt-course-shell .sidebar-header { border-bottom-color: rgba(185, 151, 73, .2); }
body.matt-course-shell .matt-politics-sidebar .sidebar-header { padding: 18px 16px; }
body.matt-course-shell .sidebar-header h1 { color: #5b4c2d; font-size: .98rem; line-height: 1.4; }
body.matt-course-shell .sidebar-header .subtitle { color: #907c55; }
body.matt-course-shell .sidebar-search { position: relative; padding: 10px 16px; border-bottom-color: rgba(185, 151, 73, .2); }
body.matt-course-shell .matt-politics-sidebar .sidebar-search::before { content: '🔍'; position: absolute; left: 27px; top: 50%; transform: translateY(-50%); color: #b18935; font-size: .78rem; pointer-events: none; }
body.matt-course-shell .sidebar-search input { color: #4d4a42; background: rgba(255,255,255,.78); border-color: rgba(178, 145, 71, .3); }
body.matt-course-shell .sidebar-search #sb { width: 100% !important; padding: .58rem .65rem .58rem 2.1rem; border-radius: 10px; font-size: .78rem; }
body.matt-course-shell .sidebar-search input::placeholder { color: #a99c7d; }
body.matt-course-shell .sidebar-search input:focus { border-color: #c49b3d; box-shadow: 0 0 0 3px rgba(196, 155, 61, .14); }
body.matt-course-shell .sidebar-nav .chapter { border-bottom-color: rgba(185, 151, 73, .12); }
body.matt-course-shell .sidebar-nav .chapter-btn { color: #625d50; }
body.matt-course-shell .sidebar-nav .chapter-btn:hover { color: #493e28; background: rgba(244, 215, 133, .24); }
body.matt-course-shell .sidebar-nav .chapter-btn .ch-num { color: #b4872a; }
body.matt-course-shell .sidebar-nav .sections a { color: #776e5e; }
body.matt-course-shell .sidebar-nav .sections a:hover,
body.matt-course-shell .sidebar-nav .sections a.active { color: #6c5018; border-left-color: #c49535; background: rgba(244, 215, 133, .3); }
body.matt-course-shell .matt-politics-sidebar .sidebar-footer { padding: 10px 12px; border-top-color: rgba(185, 151, 73, .2); }
body.matt-course-shell .sidebar-footer button { color: #746548; border-color: rgba(178, 145, 71, .32); background: rgba(255,255,255,.56); }
body.matt-course-shell .sidebar-footer button:hover { color: #574319; background: rgba(244, 215, 133, .3); }
body.matt-course-shell .matt-politics-sidebar {
  position: fixed !important; top: 58px !important; bottom: 0 !important; left: 0 !important; z-index: 1200;
  width: 278px; min-width: 278px; height: calc(100vh - 58px) !important; overflow: hidden;
  display: flex; flex-direction: column; border-radius: 0 18px 0 0;
}
body.matt-course-shell .matt-politics-sidebar .sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0 16px; }
body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item {
  display: flex; align-items: center; gap: 8px; margin: 2px 10px; padding: 9px 12px;
  border-left: 3px solid transparent; border-radius: 9px; color: #756a58; font-size: .8rem; text-decoration: none;
}
body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item:hover,
body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item.active {
  color: #6c5018; border-left-color: #c49535; background: rgba(244, 215, 133, .3);
}
body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item .sifa-nav-num { min-width: 26px; color: #b4872a; font-weight: 800; }
body.matt-course-shell .matt-politics-sidebar .sidebar-footer { flex-wrap: wrap; }
body.matt-course-shell .matt-politics-sidebar .sidebar-footer button { min-width: calc(50% - 3px); }
body.matt-course-shell .matt-politics-sidebar .sidebar-footer .sifa-footer-wide { flex-basis: 100%; }
body.matt-course-shell .matt-politics-sidebar .sidebar-search input { width: 100%; }
body.matt-course-shell .matt-politics-main { max-width: none; margin: 0 0 0 300px; padding-right: 28px; }
.sifa-menu { display: none; position: fixed; top: 70px; left: 12px; z-index: 1300; border: 1px solid #c49b3d; border-radius: 999px; padding: .42rem .65rem; color: #6c5018; background: rgba(255,253,247,.94); cursor: pointer; box-shadow: 0 8px 22px rgba(125,99,39,.12); }
html[data-theme="dark"] body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item { color: #c2b9a5; }
html[data-theme="dark"] body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item:hover,
html[data-theme="dark"] body.matt-course-shell .matt-politics-sidebar .sidebar-nav a.sifa-nav-item.active { color: #fff0bf; border-left-color: #e0bb5f; background: rgba(224,187,95,.18); }
html[data-theme="dark"] .sifa-menu { color: #fff0bf; background: rgba(39,38,34,.96); border-color: #e0bb5f; }
@media (max-width: 900px) {
  body.matt-course-shell .matt-politics-sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  body.matt-course-shell.sifa-sidebar-open .matt-politics-sidebar { transform: translateX(0); }
  body.matt-course-shell .matt-politics-main { margin-left: 0; padding-right: 12px; }
  .sifa-menu { display: block; }
}
html[data-theme="dark"] body.matt-course-shell .sidebar {
  color: #d8d0bd; background: linear-gradient(180deg, rgba(39, 38, 34, .98), rgba(29, 30, 29, .98));
  border-right-color: rgba(224, 187, 95, .22); box-shadow: 8px 0 28px rgba(0,0,0,.22);
}
html[data-theme="dark"] body.matt-course-shell .sidebar-header { border-bottom-color: rgba(224, 187, 95, .2); }
html[data-theme="dark"] body.matt-course-shell .matt-politics-sidebar .sidebar-header { padding: 18px 16px; }
html[data-theme="dark"] body.matt-course-shell .sidebar-header h1 { color: #f3e5bd; }
html[data-theme="dark"] body.matt-course-shell .sidebar-header .subtitle { color: #c5b88f; }
html[data-theme="dark"] body.matt-course-shell .sidebar-search { position: relative; padding: 10px 16px; border-bottom-color: rgba(224, 187, 95, .2); }
html[data-theme="dark"] body.matt-course-shell .matt-politics-sidebar .sidebar-search::before { color: #e0bb5f; }
html[data-theme="dark"] body.matt-course-shell .sidebar-search input { color: #eee7d5; background: rgba(255,255,255,.08); border-color: rgba(224, 187, 95, .34); }
html[data-theme="dark"] body.matt-course-shell .sidebar-search #sb { width: 100% !important; }
html[data-theme="dark"] body.matt-course-shell .sidebar-search #sb { padding: .58rem .65rem .58rem 2.1rem; }
html[data-theme="dark"] body.matt-course-shell .sidebar-search input::placeholder { color: #aaa083; }
html[data-theme="dark"] body.matt-course-shell .sidebar-nav .chapter { border-bottom-color: rgba(224, 187, 95, .12); }
html[data-theme="dark"] body.matt-course-shell .sidebar-nav .chapter-btn { color: #d8d0bd; }
html[data-theme="dark"] body.matt-course-shell .sidebar-nav .chapter-btn:hover { color: #fff5d8; background: rgba(224, 187, 95, .15); }
html[data-theme="dark"] body.matt-course-shell .sidebar-nav .sections a { color: #c2b9a5; }
html[data-theme="dark"] body.matt-course-shell .sidebar-nav .sections a:hover,
html[data-theme="dark"] body.matt-course-shell .sidebar-nav .sections a.active { color: #fff0bf; border-left-color: #e0bb5f; background: rgba(224, 187, 95, .18); }
html[data-theme="dark"] body.matt-course-shell .matt-politics-sidebar .sidebar-footer { padding: 10px 12px; border-top-color: rgba(224, 187, 95, .2); }
html[data-theme="dark"] body.matt-course-shell .sidebar-footer button { color: #dfd4b8; border-color: rgba(224, 187, 95, .32); background: rgba(255,255,255,.07); }
.matt-politics-dashboard {
  display: grid; grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(110px, .65fr)); gap: 12px;
  margin: 0 0 26px; scroll-margin-top: 78px;
}
.matt-politics-lead, .matt-politics-stat, .matt-politics-tools, .matt-politics-card, .matt-politics-test {
  border: 1px solid rgba(84, 145, 182, .24); border-radius: 16px; background: rgba(255,255,255,.72);
  box-shadow: 0 10px 28px rgba(23, 57, 87, .08); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.matt-politics-lead { grid-column: span 1; padding: 20px 22px; background: linear-gradient(135deg, rgba(239,249,255,.94), rgba(255,255,255,.76)); }
.matt-politics-kicker { margin-bottom: 6px; color: #277caf; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.matt-politics-lead h3 { margin: 0 0 6px; color: #174c70; font-size: 1.28rem; line-height: 1.35; }
.matt-politics-lead p { margin: 0; color: #557086; font-size: .84rem; line-height: 1.7; }
.matt-politics-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.matt-politics-actions button, .matt-politics-actions a { border: 1px solid #9bcce6; border-radius: 999px; padding: .42rem .7rem; color: #155b84; background: rgba(237,249,255,.9); cursor: pointer; font: inherit; font-size: .78rem; text-decoration: none; }
.matt-politics-actions button:hover, .matt-politics-actions a:hover { color: #fff; background: #247fae; }
.matt-politics-stat { display: flex; min-height: 126px; align-items: center; justify-content: center; flex-direction: column; padding: 12px; text-align: center; }
.matt-politics-stat strong { color: #155d86; font-size: 1.75rem; line-height: 1.1; }
.matt-politics-stat span { margin-top: 6px; color: #667e91; font-size: .76rem; }
.matt-politics-tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.matt-politics-tools-title { color: #1d5e83; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.matt-politics-tools-track { height: 8px; flex: 1; overflow: hidden; border-radius: 999px; background: rgba(95, 158, 193, .16); }
.matt-politics-tools-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4db6e9, #7a8cff); transition: width .25s ease; }
.matt-politics-tools-meta { color: #667e91; font-size: .76rem; white-space: nowrap; }
.matt-politics-chapters { margin: 0 0 28px; }
.matt-politics-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; color: #174c70; font-size: 1.05rem; }
.matt-politics-section-title small { color: #71879a; font-size: .76rem; font-weight: 400; }
.matt-politics-chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.matt-politics-card { display: block; padding: 14px 16px; color: inherit; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.matt-politics-card:hover, .matt-politics-card:focus-visible { outline: 0; transform: translateY(-2px); border-color: #66b9df; box-shadow: 0 14px 30px rgba(22, 90, 130, .14); }
.matt-politics-card-head { display: flex; align-items: center; gap: 8px; }
.matt-politics-card-num { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 9px; color: #fff; background: #277eaa; font-size: .72rem; font-weight: 800; }
.matt-politics-card h4 { flex: 1; margin: 0; color: #214e6b; font-size: .9rem; }
.matt-politics-card p { margin: 8px 0 0; color: #60788d; font-size: .76rem; line-height: 1.6; }
.matt-politics-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.matt-politics-card-tags span { border-radius: 999px; padding: 2px 7px; color: #296887; background: #edf8fd; font-size: .67rem; }
.matt-politics-test { margin: 22px 0 34px; padding: 16px 18px; border-left: 4px solid #4c9cc7; scroll-margin-top: 78px; }
.matt-politics-test-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.matt-politics-test h4 { margin: 0; color: #1d5f83; font-size: .95rem; }
.matt-politics-test-score { color: #6f8392; font-size: .74rem; white-space: nowrap; }
.matt-politics-question { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(72, 129, 163, .24); }
.matt-politics-question:first-of-type { border-top: 0; }
.matt-politics-question-title { margin-bottom: 8px; color: #274d66; font-size: .82rem; font-weight: 700; line-height: 1.6; }
.matt-politics-options { display: grid; gap: 6px; }
.matt-politics-option { width: 100%; border: 1px solid rgba(114, 166, 194, .3); border-radius: 9px; padding: 7px 10px; color: #47667a; background: rgba(247,252,255,.82); cursor: pointer; font: inherit; font-size: .78rem; text-align: left; }
.matt-politics-option:hover:not([disabled]) { border-color: #5daed5; background: #eef9ff; }
.matt-politics-option.correct { border-color: #41a56a; color: #176235; background: #effaf2; }
.matt-politics-option.wrong { border-color: #d96b6b; color: #8e2b2b; background: #fff1f1; }
.matt-politics-explain { display: none; margin-top: 8px; color: #5c7486; font-size: .76rem; line-height: 1.65; }
.matt-politics-explain.show { display: block; }
html[data-theme="dark"] .matt-politics-lead, html[data-theme="dark"] .matt-politics-stat, html[data-theme="dark"] .matt-politics-tools, html[data-theme="dark"] .matt-politics-card, html[data-theme="dark"] .matt-politics-test { border-color: rgba(132, 193, 226, .24); background: rgba(20, 42, 63, .8); box-shadow: 0 12px 32px rgba(0,0,0,.18); }
html[data-theme="dark"] .matt-politics-lead { background: linear-gradient(135deg, rgba(23, 63, 91, .9), rgba(18, 39, 59, .82)); }
html[data-theme="dark"] .matt-politics-lead h3, html[data-theme="dark"] .matt-politics-section-title, html[data-theme="dark"] .matt-politics-card h4, html[data-theme="dark"] .matt-politics-test h4 { color: #b9e4fa; }
html[data-theme="dark"] .matt-politics-lead p, html[data-theme="dark"] .matt-politics-card p, html[data-theme="dark"] .matt-politics-tools-meta, html[data-theme="dark"] .matt-politics-explain { color: #a2bacc; }
html[data-theme="dark"] .matt-politics-stat strong { color: #9edcff; }
html[data-theme="dark"] .matt-politics-stat span, html[data-theme="dark"] .matt-politics-section-title small { color: #9bb4c8; }
html[data-theme="dark"] .matt-politics-card-tags span { color: #b1ddf2; background: rgba(73, 145, 187, .2); }
html[data-theme="dark"] .matt-politics-option { border-color: rgba(132, 193, 226, .28); color: #c1d6e4; background: rgba(12, 30, 47, .66); }
html[data-theme="dark"] .matt-politics-option:hover:not([disabled]) { background: rgba(62, 142, 190, .22); }
@media (max-width: 760px) {
  .matt-politics-dashboard { grid-template-columns: 1fr 1fr; }
  .matt-politics-lead, .matt-politics-tools { grid-column: 1 / -1; }
  .matt-politics-chapter-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   Mao / Xi common reading shell
   -------------------------------------------------------------------------
   Their cards and modal data remain course-owned. These rules only provide a
   common frame so both pages read as part of the same review library. */
body.matt-politics-course {
  --politics-rail: 278px;
  --politics-gap: 28px;
  overflow-x: hidden;
}
body.matt-politics-course > .matt-coursebar { z-index: 2147483000; }
body.matt-politics-course > .matt-politics-legacy-header { display: none !important; }

body.matt-politics-course .matt-politics-directory {
  position: fixed !important;
  top: 58px !important; right: auto !important; bottom: 0 !important; left: 0 !important;
  width: var(--politics-rail) !important; max-width: none !important; height: calc(100vh - 58px) !important;
  z-index: 1200 !important; transform: translateX(0) !important; transition: none !important;
  border-right: 1px solid rgba(184, 151, 76, .24); border-radius: 0 18px 0 0;
  background: linear-gradient(180deg, rgba(255,253,247,.97), rgba(249,245,234,.95));
  box-shadow: 8px 0 28px rgba(114, 91, 43, .10);
}
body.matt-politics-course .matt-politics-directory .drawer-head {
  min-height: 58px; padding: 14px 16px; border-bottom-color: rgba(184, 151, 76, .2);
}
body.matt-politics-course .matt-politics-directory .drawer-head-title {
  color: #6b5425; font: 700 .82rem/1.35 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .matt-politics-directory .drawer-close { display: none; }
body.matt-politics-course .matt-politics-directory .drawer-nav {
  min-height: 0; padding: 8px 8px 14px; overflow-y: auto;
}
body.matt-politics-course .matt-politics-directory .drawer-nav::-webkit-scrollbar { width: 7px; }
body.matt-politics-course .matt-politics-directory .drawer-nav::-webkit-scrollbar-thumb { background: #d3b866; border-radius: 999px; }
body.matt-politics-course .matt-politics-directory .drawer-link {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 2px 0; padding: 9px 10px;
  border: 1px solid transparent; border-radius: 10px; color: #6f6758; background: transparent;
  font: 600 .78rem/1.45 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .matt-politics-directory .drawer-link:hover,
body.matt-politics-course .matt-politics-directory .drawer-link:focus-visible {
  outline: 0; color: #5d471b; border-color: rgba(201, 165, 75, .28); background: rgba(246, 222, 150, .26);
}
body.matt-politics-course .matt-politics-directory .drawer-num {
  width: 26px; height: 26px; flex: 0 0 26px; color: #a9822c; background: rgba(235, 214, 151, .3);
  font-size: .7rem;
}
body.matt-politics-course .matt-politics-directory .drawer-link:hover .drawer-num,
body.matt-politics-course .matt-politics-directory .drawer-link:focus-visible .drawer-num {
  color: #fff; background: var(--primary, #277eaa);
}
body.matt-politics-course .matt-politics-directory .drawer-badge { margin-left: auto; }
body.matt-politics-course .matt-politics-directory .drawer-footer {
  padding: 11px 14px; border-top-color: rgba(184, 151, 76, .2); color: #8b7b5a;
  font: 600 .7rem/1.35 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .matt-politics-directory .drawer-footer strong { color: var(--primary, #277eaa); }
body.matt-politics-course .matt-politics-overlay { display: none; }

body.matt-politics-course > .hero,
body.matt-politics-course > .chapter-strip-wrap,
body.matt-politics-course > .main,
body.matt-politics-course > .footer {
  margin-left: var(--politics-rail) !important;
  width: calc(100% - var(--politics-rail)) !important;
}
body.matt-politics-course > .hero {
  padding-left: clamp(24px, 5vw, 72px); padding-right: clamp(24px, 5vw, 72px);
}
body.matt-politics-course > .chapter-strip-wrap { top: 58px; }
body.matt-politics-course > .chapter-strip-wrap .chapter-strip { max-width: none; padding-left: clamp(20px, 3vw, 52px); padding-right: clamp(20px, 3vw, 52px); }
body.matt-politics-course > .main {
  max-width: none !important; margin-right: 0 !important; padding: 32px clamp(20px, 4vw, 56px) 64px;
}
body.matt-politics-course > .main > .card-grid { max-width: 1180px; margin: 0 auto; }
body.matt-politics-course > .footer { padding-left: 28px; padding-right: 28px; }

/* Continuous reading mode for courses whose source is chapter prose rather
   than a dashboard of independent cards. The old card/modal markup remains
   available to the page scripts, but the visible reading surface is now one
   coherent flow. */
body.matt-politics-course .card-grid { display: block; }
body.matt-politics-course .politics-reading-section {
  position: relative; margin: 0 0 30px; padding: 24px 26px 28px; scroll-margin-top: 132px;
  border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.74);
  box-shadow: 0 10px 30px rgba(29, 54, 74, .06);
}
body.matt-politics-course .politics-reading-section::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  border-radius: 18px 0 0 18px; background: var(--primary);
}
body.matt-politics-course .politics-reading-section.is-target {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent), 0 14px 34px rgba(29, 54, 74, .1);
}
body.matt-politics-course .politics-reading-head {
  display: flex; align-items: flex-start; gap: 14px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
body.matt-politics-course .politics-reading-num {
  display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center;
  border-radius: 12px; color: #fff; background: var(--primary); font: 800 1rem/1 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .politics-reading-section.intro-reading .politics-reading-num { background: var(--accent); }
body.matt-politics-course .politics-reading-head-main { min-width: 0; flex: 1; }
body.matt-politics-course .politics-reading-label {
  margin-bottom: 2px; color: var(--primary); font: 700 .72rem/1.4 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .politics-reading-section.intro-reading .politics-reading-label { color: var(--accent-dark); }
body.matt-politics-course .politics-reading-head h2 {
  margin: 0; color: var(--text); font-size: 1.35rem; line-height: 1.4; letter-spacing: .02em;
}
body.matt-politics-course .politics-reading-meta { margin-left: auto; color: var(--text-muted); font: 600 .72rem/1.4 system-ui, -apple-system, "Microsoft YaHei", sans-serif; white-space: nowrap; }
body.matt-politics-course .politics-reading-framework {
  margin: 16px 0 12px; padding: 8px 12px; border-radius: 10px; color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary-light) 75%, transparent); font: 700 .75rem/1.5 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .politics-reading-kicker {
  margin: 16px 0 10px; color: var(--text-muted); font: 700 .74rem/1.4 system-ui, -apple-system, "Microsoft YaHei", sans-serif; letter-spacing: .08em;
}
body.matt-politics-course .politics-reading-stack { display: grid; gap: 10px; }
body.matt-politics-course .politics-reading-section .q-card { margin: 0; }
body.matt-politics-course .politics-reading-section .q-card-desc { max-height: none; opacity: 1; }
body.matt-politics-course .politics-reading-section .q-card.expanded .q-card-arrow { transform: rotate(180deg); }
body.matt-politics-course .politics-reading-section .modal-section { margin-top: 16px; }
body.matt-politics-course .politics-reading-section .modal-section:first-child { margin-top: 0; }
body.matt-politics-course .politics-reading-section .modal-section-head { margin-bottom: 10px; }
body.matt-politics-course .politics-reading-section .modal-note { margin-top: 16px; }
body.matt-politics-course .politics-reading-section .card-tags-row { margin: 10px 0 0; }

html[data-theme="dark"] body.matt-politics-course .politics-reading-section {
  border-color: #31475a; background: rgba(23, 38, 55, .88); box-shadow: 0 12px 32px rgba(0,0,0,.16);
}
html[data-theme="dark"] body.matt-politics-course .politics-reading-section.is-target { border-color: #6caed0; }
html[data-theme="dark"] body.matt-politics-course .politics-reading-head { border-bottom-color: #31475a; }
html[data-theme="dark"] body.matt-politics-course .politics-reading-label { color: #a8d8ee; }
html[data-theme="dark"] body.matt-politics-course .politics-reading-section.intro-reading .politics-reading-label { color: #f0d185; }
html[data-theme="dark"] body.matt-politics-course .politics-reading-head h2 { color: #e8f0f7; }
html[data-theme="dark"] body.matt-politics-course .politics-reading-framework { color: #b9e4fa; background: rgba(61, 129, 167, .18); }

@media (max-width: 650px) {
  body.matt-politics-course .politics-reading-section { margin-bottom: 20px; padding: 18px 16px 20px; border-radius: 14px; scroll-margin-top: 118px; }
  body.matt-politics-course .politics-reading-section::before { border-radius: 14px 0 0 14px; }
  body.matt-politics-course .politics-reading-head { gap: 10px; }
  body.matt-politics-course .politics-reading-num { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: .82rem; }
  body.matt-politics-course .politics-reading-head h2 { font-size: 1.1rem; }
  body.matt-politics-course .politics-reading-meta { display: none; }
  body.matt-politics-course .politics-reading-framework { margin: 12px 0 10px; font-size: .7rem; }
}

.matt-coursebar__button--search { min-width: 74px; text-align: center; }
.matt-coursebar__button--directory { display: none; min-width: 74px; text-align: center; }

/* Mao/Xi search lives in the reading rail, next to the chapter directory. */
body.matt-politics-course.matt-politics-left-search .matt-coursebar__button--search { display: none !important; }
body.matt-politics-course .matt-politics-drawer-search {
  flex: 0 0 auto; padding: 10px 12px 9px;
  border-bottom: 1px solid rgba(184, 151, 76, .2);
}
body.matt-politics-course .matt-politics-drawer-search .search-panel {
  display: block; position: static; width: 100%; max-width: none; padding: 0;
  overflow: visible; border-radius: 0; background: transparent; box-shadow: none;
  transform: none; transition: none;
}
body.matt-politics-course .matt-politics-drawer-search .search-panel-head {
  display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0;
  border: 1px solid rgba(178, 145, 71, .3); border-radius: 10px;
  background: rgba(255, 255, 255, .82);
}
body.matt-politics-course .matt-politics-drawer-search .search-panel-icon { flex: 0 0 auto; margin-left: 9px; font-size: 14px; }
body.matt-politics-course .matt-politics-drawer-search .search-panel-input {
  min-width: 0; width: 100%; padding: 9px 7px; color: #5c5342; background: transparent;
  border: 0; outline: 0; font: 500 13px/1.4 system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
body.matt-politics-course .matt-politics-drawer-search .search-panel-input::placeholder { color: #a99c7d; }
body.matt-politics-course .matt-politics-drawer-search .search-panel-input:focus { box-shadow: none; }
body.matt-politics-course .matt-politics-drawer-search .search-panel-hint { display: none; }
body.matt-politics-course .matt-politics-drawer-search .search-panel-body {
  max-height: min(42vh, 360px); overflow-y: auto; margin-top: 8px; padding: 0;
  border-radius: 10px; background: rgba(255, 255, 255, .72);
}
body.matt-politics-course.matt-politics-left-search .matt-politics-search-relocated { display: none !important; }
html[data-theme="dark"] body.matt-politics-course .matt-politics-drawer-search { border-bottom-color: rgba(143, 197, 225, .2); }
html[data-theme="dark"] body.matt-politics-course .matt-politics-drawer-search .search-panel-head {
  border-color: rgba(143, 197, 225, .3); background: rgba(255, 255, 255, .08);
}
html[data-theme="dark"] body.matt-politics-course .matt-politics-drawer-search .search-panel-input { color: #e8f0f7; }
html[data-theme="dark"] body.matt-politics-course .matt-politics-drawer-search .search-panel-input::placeholder { color: #9ab0c0; }
html[data-theme="dark"] body.matt-politics-course .matt-politics-drawer-search .search-panel-body { background: rgba(23, 38, 55, .75); }

/* Keep the two course identities in their own primary/accent variables while
   sharing the same legible dark surface and controls. */
html[data-theme="dark"] body.matt-politics-course {
  --bg: #101a27; --bg-card: #172637; --bg-warm: #1b2c3e; --text: #e8f0f7; --text-soft: #c1d0dd;
  --text-muted: #9ab0c0; --border: #31475a; --border-strong: #456075;
  background: #101a27; color: #e8f0f7;
}
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory {
  border-right-color: rgba(143, 197, 225, .24);
  background: linear-gradient(180deg, rgba(22, 39, 55, .98), rgba(16, 30, 44, .98));
  box-shadow: 8px 0 28px rgba(0,0,0,.25);
}
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-head { border-bottom-color: rgba(143, 197, 225, .2); }
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-head-title { color: #bfe0f1; }
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-link { color: #bdcbd5; }
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-link:hover,
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-link:focus-visible { color: #eff9ff; border-color: rgba(127, 194, 229, .28); background: rgba(81, 155, 197, .18); }
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-num { color: #b9dff1; background: rgba(84, 150, 188, .22); }
html[data-theme="dark"] body.matt-politics-course .matt-politics-directory .drawer-footer { border-top-color: rgba(143, 197, 225, .2); color: #9cb6c6; }
html[data-theme="dark"] body.matt-politics-course > .hero { background: linear-gradient(160deg, #162e42 0%, #101a27 48%, #26313b 100%); }
html[data-theme="dark"] body.matt-politics-course > .chapter-strip-wrap { background: rgba(20, 36, 50, .9); border-bottom-color: #31475a; }
html[data-theme="dark"] body.matt-politics-course .strip-pill { background: #172637; border-color: #3a556b; color: #9ab7c8; }
html[data-theme="dark"] body.matt-politics-course .strip-pill:hover { background: rgba(79, 145, 188, .22); color: #d8f3ff; }
html[data-theme="dark"] body.matt-politics-course .chapter-card { background: rgba(23, 38, 55, .94); border-color: #31475a; color: var(--text); }
html[data-theme="dark"] body.matt-politics-course .footer { background: #142232; border-top-color: #31475a; }

@media (max-width: 900px) {
  body.matt-politics-course .matt-politics-directory {
    width: min(320px, 88vw) !important; height: calc(100vh - 58px) !important;
    transform: translateX(-105%) !important; transition: none !important;
    box-shadow: 18px 0 38px rgba(23, 55, 78, .2);
  }
  body.matt-politics-course .matt-politics-directory.open { transform: translateX(0) !important; }
  body.matt-politics-course .matt-politics-overlay { display: block; top: 58px; z-index: 1199; }
  body.matt-politics-course .matt-politics-overlay.open { display: block; }
  body.matt-politics-course > .hero,
  body.matt-politics-course > .chapter-strip-wrap,
  body.matt-politics-course > .main,
  body.matt-politics-course > .footer { margin-left: 0 !important; width: 100% !important; }
  body.matt-politics-course > .main { padding: 24px 16px 52px; }
  body.matt-politics-course > .hero { padding-left: 18px; padding-right: 18px; }
  .matt-coursebar__button--directory { display: inline-flex; }
}

@media (max-width: 650px) {
  .matt-coursebar__button--search { min-width: 64px; }
  .matt-coursebar__button--directory { min-width: 64px; }
}

/* -------------------------------------------------------------------------
   思想道德与法治 continuous reading layout
   -------------------------------------------------------------------------
   The source page is data-driven and historically rendered every chapter as
   a grid of cards plus collapsed accordion cards. Keep that data and all
   controls, but make the default surface read like a compact textbook:
   chapter index rows, open subsections, and restrained inline callouts.
*/
body.matt-sifa-reading {
  --sifa-reading-line: rgba(181, 52, 58, .18);
  --sifa-reading-ink: #3d2b1f;
  --sifa-reading-muted: #77685d;
}
body.matt-sifa-reading .ct {
  max-width: none; margin-left: 300px; margin-right: 0; padding: 30px clamp(24px, 4vw, 60px) 64px;
}
body.matt-sifa-reading .hero { max-width: 980px; margin: 0 auto; padding: 10px 0 12px; }
body.matt-sifa-reading .ll,
body.matt-sifa-reading .sr,
body.matt-sifa-reading .lf,
body.matt-sifa-reading .ps { max-width: 980px; margin-left: auto; margin-right: auto; }
body.matt-sifa-reading .ll { justify-content: flex-start; padding: 8px 0 12px; border: 0; border-bottom: 1px dashed var(--sifa-reading-line); border-radius: 0; background: transparent; box-shadow: none; }
body.matt-sifa-reading .sr { justify-content: flex-start; gap: 0; margin-top: 18px; }
body.matt-sifa-reading .sc { min-width: 112px; padding: 6px 18px; border: 0; border-left: 1px solid var(--sifa-reading-line); border-radius: 0; background: transparent; box-shadow: none; }
body.matt-sifa-reading .sc:first-child { border-left: 0; padding-left: 0; }
body.matt-sifa-reading .lf { justify-content: flex-start; gap: 8px; margin-top: 18px; }
body.matt-sifa-reading .lf button { border-width: 1px; padding: .3rem .75rem; }
body.matt-sifa-reading .ps { padding: 10px 0 14px; border: 0; border-bottom: 1px solid var(--sifa-reading-line); border-radius: 0; background: transparent; box-shadow: none; }
body.matt-sifa-reading .ps h3 { margin-bottom: 7px; }
body.matt-sifa-reading .st { max-width: 980px; margin: 34px auto 14px; padding-bottom: 9px; border-bottom: 1px solid var(--sifa-reading-line); }

/* Chapter overview becomes a reading index rather than a card grid. */
body.matt-sifa-reading .cg {
  max-width: 980px; margin: 0 auto 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px;
}
body.matt-sifa-reading .cc {
  min-height: 68px; padding: 10px 0 10px 42px; border: 0; border-bottom: 1px solid var(--sifa-reading-line); border-radius: 0;
  background: transparent; box-shadow: none; cursor: pointer;
}
body.matt-sifa-reading .cc:hover { transform: none; border-color: var(--sifa-reading-line); box-shadow: none; }
body.matt-sifa-reading .cc .cn {
  top: 13px; right: auto; left: 0; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(196, 148, 58, .35); border-radius: 50%; color: var(--g); opacity: 1; font: 700 .75rem/1 var(--f);
}
body.matt-sifa-reading .cc h3 { margin: 0 0 5px; color: var(--a); font-size: .86rem; line-height: 1.45; }
body.matt-sifa-reading .cc .cl { margin: 0; gap: 4px; }
body.matt-sifa-reading .cc .tg { display: none; }
body.matt-sifa-reading .cc .rb {
  top: 9px; right: 0; left: auto; display: none; align-items: center; gap: 3px; padding: 3px 7px;
  border: 1px solid rgba(66, 156, 105, .32); border-radius: 999px; color: #2f8058; background: rgba(235, 250, 240, .88);
  box-shadow: 0 3px 10px rgba(54, 125, 83, .1); font-size: .6rem; font-weight: 700;
}
body.matt-sifa-reading .cc.ok .rb { display: inline-flex; }
body.matt-sifa-reading .cc .rb .review-mark {
  display: inline-flex; width: 14px; height: 14px; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: #4aa873; font-size: .58rem; line-height: 1;
}

/* Open the full chapter prose and flatten accordion cards into headings and
   inline knowledge-point callouts. */
body.matt-sifa-reading #ds { max-width: 980px; margin: 0 auto; }
body.matt-sifa-reading .ds {
  margin: 0 0 54px; padding: 0 0 38px; border-bottom: 1px solid var(--sifa-reading-line); scroll-margin-top: 76px;
}
body.matt-sifa-reading .ds:last-child { border-bottom: 0; }
body.matt-sifa-reading .ds .sh {
  margin: 0 0 18px; padding: 0 0 11px 14px; border: 0; border-left: 4px solid var(--a); border-bottom: 2px solid var(--a);
  border-radius: 0; background: transparent; box-shadow: none; cursor: pointer; color: var(--a); font-size: 1.2rem;
}
body.matt-sifa-reading .ds .sh:hover { background: transparent; }
body.matt-sifa-reading .ds .sh .ar { color: var(--g); }
body.matt-sifa-reading .ds .sc2 { display: block; padding: 0; }
body.matt-sifa-reading .ds .ai { margin: 0 0 28px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
body.matt-sifa-reading .ds .ai .ah {
  padding: 0 0 8px; border-bottom: 1px solid var(--sifa-reading-line); color: var(--sifa-reading-ink); background: transparent;
  font: 700 1rem/1.5 var(--f); cursor: pointer;
}
body.matt-sifa-reading .ds .ai .ah:hover { background: transparent; color: var(--a); }
body.matt-sifa-reading .ds .ai .ab { display: block; padding: 9px 0 0; }
body.matt-sifa-reading .ds .kp {
  margin: 0 0 10px; padding: 5px 0 5px 14px; border: 0; border-left: 3px solid var(--b); border-radius: 0; background: transparent; font-size: .88rem; line-height: 1.8;
}
body.matt-sifa-reading .ds .kp.m { border-left-color: var(--lmbd); background: transparent; }
body.matt-sifa-reading .ds .kp.f { border-left-color: var(--lfbd); background: transparent; }
body.matt-sifa-reading .ds .kp.u { border-left-color: var(--lubd); background: transparent; }
body.matt-sifa-reading .ds .kp .kb { margin-top: .22rem; }
body.matt-sifa-reading .ds .rbw { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--sifa-reading-line); }

/* The legacy footer inherited native button bevels. Use the same quiet glass
   treatment as the rest of the reading rail, with clear review-state colors. */
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 11px 12px 13px;
  border-top: 1px solid rgba(185, 151, 73, .2); background: rgba(255, 253, 247, .66);
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button {
  width: 100%; min-width: 0 !important; min-height: 34px; margin: 0; padding: 6px 7px;
  appearance: none; -webkit-appearance: none; box-sizing: border-box; border: 1px solid rgba(178, 145, 71, .28) !important; border-style: solid !important; border-radius: 10px;
  color: #75664e !important; background: rgba(255, 255, 255, .72) !important; box-shadow: 0 3px 10px rgba(125, 99, 39, .08);
  cursor: pointer; font: 600 .72rem/1.2 system-ui, -apple-system, "Microsoft YaHei", sans-serif; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer .footer-icon {
  display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; margin-right: 2px;
  color: currentColor; font-size: .92rem; font-weight: 500; line-height: 1; vertical-align: -2px;
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button:last-child { grid-column: 2; }
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button:hover,
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button:focus-visible {
  outline: 0; color: #65491b !important; border-color: rgba(196, 155, 61, .55) !important; background: rgba(255, 249, 224, .94) !important;
  box-shadow: 0 6px 14px rgba(125, 99, 39, .13); transform: translateY(-1px);
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button:active { transform: translateY(0); }
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ma {
  color: #2f8058 !important; border-color: rgba(66, 156, 105, .3) !important; background: rgba(235, 250, 240, .86) !important;
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ma:hover,
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ma:focus-visible {
  color: #216943 !important; border-color: rgba(66, 156, 105, .52) !important; background: rgba(220, 246, 229, .98) !important;
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ua {
  color: #a06a22 !important; border-color: rgba(208, 157, 62, .32) !important; background: rgba(255, 248, 225, .86) !important;
}
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ua:hover,
body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ua:focus-visible {
  color: #825218 !important; border-color: rgba(208, 157, 62, .54) !important; background: rgba(255, 240, 192, .98) !important;
}
body.matt-sifa-reading .rbb {
  appearance: none; -webkit-appearance: none; border: 1px solid rgba(196, 148, 58, .42); border-radius: 999px; padding: 5px 10px;
  color: #94651f; background: rgba(255, 249, 229, .72); box-shadow: none; font-size: .7rem; font-weight: 650;
}
body.matt-sifa-reading .rbb::before { content: '○'; display: inline-block; margin-right: 4px; font-size: .78rem; line-height: 1; vertical-align: -1px; }
body.matt-sifa-reading .rbb:hover,
body.matt-sifa-reading .rbb:focus-visible { outline: 0; color: #704713; border-color: rgba(196, 148, 58, .7); background: rgba(255, 243, 201, .95); }
body.matt-sifa-reading .rbb.done {
  color: #2f8058; border-color: rgba(66, 156, 105, .36); background: rgba(235, 250, 240, .88); box-shadow: none;
}
body.matt-sifa-reading .rbb.done::before { content: '✓'; }

/* Practice tools remain available, but use flat reading surfaces rather than
   another wall of rounded cards. */
body.matt-sifa-reading .fcc { max-width: 980px; margin: 0 auto 34px; }
body.matt-sifa-reading .fc { max-width: 720px; }
body.matt-sifa-reading .fcf,
body.matt-sifa-reading .fcb { min-height: 150px; border-radius: 0 12px 12px 0; box-shadow: none; }
body.matt-sifa-reading .fcf { border: 0; border-left: 4px solid var(--g); background: transparent; justify-content: flex-start; color: var(--a); }
body.matt-sifa-reading .fcb { background: color-mix(in srgb, var(--a) 88%, #000); }
body.matt-sifa-reading .qcard { margin-bottom: 22px; padding: 12px 0 16px 14px; border: 0; border-left: 3px solid var(--a); border-radius: 0; background: transparent; box-shadow: none; }
body.matt-sifa-reading .qcard .exp { background: transparent; padding-left: 0; }

html[data-theme="dark"] body.matt-sifa-reading {
  --sifa-reading-line: rgba(224, 184, 96, .24); --sifa-reading-ink: #e8dcc8; --sifa-reading-muted: #b8a890;
}
html[data-theme="dark"] body.matt-sifa-reading .cc,
html[data-theme="dark"] body.matt-sifa-reading .cc:hover { border-bottom-color: var(--sifa-reading-line); background: transparent; }
html[data-theme="dark"] body.matt-sifa-reading .ds .sh { border-bottom-color: #d47060; }
html[data-theme="dark"] body.matt-sifa-reading .ds .ai .ah { border-bottom-color: var(--sifa-reading-line); color: var(--sifa-reading-ink); }
html[data-theme="dark"] body.matt-sifa-reading .ds .kp.m,
html[data-theme="dark"] body.matt-sifa-reading .ds .kp.f,
html[data-theme="dark"] body.matt-sifa-reading .ds .kp.u { background: transparent; }
html[data-theme="dark"] body.matt-sifa-reading .cc .rb {
  color: #a7e0bc; border-color: rgba(116, 205, 145, .34); background: rgba(35, 91, 59, .36); box-shadow: none;
}
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer { border-top-color: rgba(224, 187, 95, .2); background: rgba(25, 40, 54, .62); }
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button {
  color: #d8cdb9 !important; border-color: rgba(143, 197, 225, .28) !important; background: rgba(255, 255, 255, .07) !important; box-shadow: none;
}
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer .footer-icon { color: currentColor; }
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button:hover,
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer button:focus-visible {
  color: #eff9ff !important; border-color: rgba(143, 197, 225, .54) !important; background: rgba(81, 155, 197, .2) !important;
}
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ma { color: #a7e0bc !important; border-color: rgba(116, 205, 145, .34) !important; background: rgba(35, 91, 59, .36) !important; }
html[data-theme="dark"] body.matt-sifa-reading .matt-politics-sidebar .sidebar-footer #ua { color: #f2d28c !important; border-color: rgba(224, 187, 95, .34) !important; background: rgba(105, 76, 26, .34) !important; }
html[data-theme="dark"] body.matt-sifa-reading .rbb { color: #f0d185; border-color: rgba(224, 187, 95, .4); background: rgba(105, 76, 26, .24); }
html[data-theme="dark"] body.matt-sifa-reading .rbb.done { color: #a7e0bc; border-color: rgba(116, 205, 145, .4); background: rgba(35, 91, 59, .36); }

@media (max-width: 900px) {
  body.matt-sifa-reading .ct { margin-left: 0; padding: 24px 16px 52px; }
  body.matt-sifa-reading .cg { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 650px) {
  body.matt-sifa-reading .hero { padding-top: 2px; }
  body.matt-sifa-reading .sr { overflow-x: auto; }
  body.matt-sifa-reading .sc { min-width: 84px; padding: 5px 10px; }
  body.matt-sifa-reading .st { margin-top: 28px; font-size: 1.1rem; }
  body.matt-sifa-reading .ds .sh { font-size: 1.05rem; }
  body.matt-sifa-reading .ds .kp { padding-left: 10px; font-size: .84rem; }
}

/* -------------------------------------------------------------------------
   Marxism continuous reading layout
   -------------------------------------------------------------------------
   Marxism is a framework-heavy course: the useful unit is a flowing argument
   (concept -> principle -> method -> example), not a grid of clickable cards.
   Keep the existing data, search, progress and quizzes, but turn the visible
   surface into a reading column with restrained dividers and inline callouts.
*/
body.matt-marx-reading {
  --marx-reading-ink: #243b53;
  --marx-reading-muted: #64748b;
  --marx-reading-line: rgba(53, 102, 133, .18);
  --marx-reading-accent: #b84a3d;
}
body.matt-marx-reading .main {
  width: 100%; max-width: 1180px; padding: 32px clamp(24px, 4vw, 60px) 72px;
}
body.matt-marx-reading .main-header { max-width: 980px; margin: 0 auto 28px; }
body.matt-marx-reading .matt-politics-dashboard {
  max-width: 980px; margin: 0 auto 34px; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(88px, .58fr));
  gap: 0; padding: 0 0 16px; border-bottom: 1px solid var(--marx-reading-line);
}
body.matt-marx-reading .matt-politics-dashboard > .matt-politics-lead,
body.matt-marx-reading .matt-politics-dashboard > .matt-politics-stat,
body.matt-marx-reading .matt-politics-dashboard > .matt-politics-tools {
  border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
body.matt-marx-reading .matt-politics-lead {
  padding: 4px 24px 4px 0; border-left: 4px solid #3b91bf !important; padding-left: 18px;
}
body.matt-marx-reading .matt-politics-lead h3 { font-size: 1.35rem; }
body.matt-marx-reading .matt-politics-stat { min-height: 92px; padding: 8px 14px; border-left: 1px solid var(--marx-reading-line) !important; }
body.matt-marx-reading .matt-politics-stat strong { font-size: 1.55rem; }
body.matt-marx-reading .matt-politics-tools { border-top: 1px solid var(--marx-reading-line) !important; margin-top: 16px; padding: 13px 0 0; }
body.matt-marx-reading .matt-politics-chapters { max-width: 980px; margin: 0 auto 44px; }
body.matt-marx-reading .matt-politics-section-title { padding-bottom: 10px; border-bottom: 1px solid var(--marx-reading-line); }
body.matt-marx-reading .matt-politics-reading-index {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px; margin: 0; padding: 0; list-style: none;
}
body.matt-marx-reading .matt-politics-reading-entry { border-bottom: 1px solid var(--marx-reading-line); }
body.matt-marx-reading .matt-politics-reading-link {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 68px;
  padding: 10px 0; color: var(--marx-reading-ink); text-decoration: none;
}
body.matt-marx-reading .matt-politics-reading-link:hover,
body.matt-marx-reading .matt-politics-reading-link:focus-visible { color: #0f6f9f; outline: 0; }
body.matt-marx-reading .matt-politics-reading-num {
  display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%;
  color: #236987; background: rgba(81, 160, 201, .12); font-size: .72rem; font-weight: 800;
}
body.matt-marx-reading .matt-politics-reading-copy { min-width: 0; }
body.matt-marx-reading .matt-politics-reading-copy strong { display: block; font-size: .86rem; line-height: 1.45; }
body.matt-marx-reading .matt-politics-reading-copy small { display: block; overflow: hidden; color: var(--marx-reading-muted); font-size: .7rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
body.matt-marx-reading .matt-politics-reading-meta { display: flex; align-items: center; gap: 5px; color: #71879a; font-size: .64rem; white-space: nowrap; }
body.matt-marx-reading .matt-politics-reading-meta span { padding: 2px 5px; border-radius: 999px; background: rgba(83, 151, 186, .09); }
body.matt-marx-reading .matt-politics-reading-meta b { color: #2f9a67; font-size: .85rem; }
body.matt-marx-reading #contentRoot { max-width: 980px; margin: 0 auto; }
body.matt-marx-reading .chapter-section {
  margin: 0 0 62px; padding: 0 0 44px; border-bottom: 1px solid var(--marx-reading-line); scroll-margin-top: 78px;
}
body.matt-marx-reading .chapter-section:last-child { border-bottom: 0; }
body.matt-marx-reading .chapter-title {
  margin: 0 0 12px; padding: 0 0 13px; border-bottom: 2px solid var(--marx-reading-accent); color: var(--marx-reading-ink); font-size: 1.4rem;
}
body.matt-marx-reading .chapter-title .num {
  width: 38px; height: 38px; border-radius: 50%; color: var(--marx-reading-accent); background: transparent; border: 2px solid currentColor; font-size: .82rem;
}
body.matt-marx-reading .objective-box {
  margin: 14px 0 24px; padding: 12px 16px; border: 0; border-left: 4px solid #c38b32; border-radius: 0 10px 10px 0;
  background: rgba(255, 249, 224, .72);
}
body.matt-marx-reading .syllabus-summary { gap: 22px; margin: 0 0 30px; padding: 0 0 12px; border-bottom: 1px dashed var(--marx-reading-line); }
body.matt-marx-reading .syllabus-summary .tag-group {
  min-width: 0; padding: 4px 0 4px 14px; border: 0; border-left: 3px solid; border-radius: 0; background: transparent;
}
body.matt-marx-reading .subsection { margin: 0 0 38px; padding-top: 2px; scroll-margin-top: 78px; }
body.matt-marx-reading .subsection h3 {
  margin: 0 0 14px; padding: 0 0 8px; border-left: 0; border-bottom: 1px solid var(--marx-reading-line); color: var(--marx-reading-ink); font-size: 1.12rem;
}
body.matt-marx-reading #contentRoot .card {
  margin: 16px 0; padding: 3px 0 3px 16px; border: 0; border-left: 3px solid rgba(73, 139, 172, .62); border-radius: 0;
  background: transparent; box-shadow: none;
}
body.matt-marx-reading #contentRoot .card:hover { box-shadow: none; }
body.matt-marx-reading #contentRoot .key-box,
body.matt-marx-reading #contentRoot .highlight-box,
body.matt-marx-reading #contentRoot .concept-box,
body.matt-marx-reading #contentRoot .mechanism-box {
  border-radius: 0 10px 10px 0; box-shadow: none;
}
body.matt-marx-reading #contentRoot .key-box { background: transparent; padding: 9px 0 9px 16px; }
body.matt-marx-reading #contentRoot .highlight-box,
body.matt-marx-reading #contentRoot .concept-box,
body.matt-marx-reading #contentRoot .mechanism-box { background: transparent; padding: 10px 0 10px 16px; }
body.matt-marx-reading #contentRoot table { box-shadow: none; }
body.matt-marx-reading .matt-politics-test { box-shadow: none; border-radius: 0 12px 12px 0; background: rgba(255,255,255,.48); }
body.matt-marx-reading footer { max-width: 980px; margin: 0 auto; }

html[data-theme="dark"] body.matt-marx-reading {
  --marx-reading-ink: #e5eef5; --marx-reading-muted: #9db3c2; --marx-reading-line: rgba(143, 197, 225, .2); --marx-reading-accent: #ef947f;
}
html[data-theme="dark"] body.matt-marx-reading .matt-politics-reading-link { color: var(--marx-reading-ink); }
html[data-theme="dark"] body.matt-marx-reading .matt-politics-reading-link:hover,
html[data-theme="dark"] body.matt-marx-reading .matt-politics-reading-link:focus-visible { color: #bde8fb; }
html[data-theme="dark"] body.matt-marx-reading .matt-politics-reading-num { color: #b8e4f8; background: rgba(91, 163, 203, .2); }
html[data-theme="dark"] body.matt-marx-reading .matt-politics-reading-meta span { background: rgba(91, 163, 203, .16); }
html[data-theme="dark"] body.matt-marx-reading .objective-box { background: rgba(111, 84, 27, .2); }
html[data-theme="dark"] body.matt-marx-reading #contentRoot .card,
html[data-theme="dark"] body.matt-marx-reading #contentRoot .key-box,
html[data-theme="dark"] body.matt-marx-reading #contentRoot .highlight-box,
html[data-theme="dark"] body.matt-marx-reading #contentRoot .concept-box,
html[data-theme="dark"] body.matt-marx-reading #contentRoot .mechanism-box { background: transparent; }
html[data-theme="dark"] body.matt-marx-reading .matt-politics-test { background: rgba(23, 44, 63, .48); }

@media (max-width: 760px) {
  body.matt-marx-reading .main { padding: 24px 18px 56px; }
  body.matt-marx-reading .matt-politics-dashboard { display: block; }
  body.matt-marx-reading .matt-politics-lead { padding-right: 0; }
  body.matt-marx-reading .matt-politics-stat { display: inline-flex; width: 32%; min-height: 76px; margin-top: 16px; padding: 6px 8px; }
  body.matt-marx-reading .matt-politics-tools { margin-top: 12px; }
  body.matt-marx-reading .matt-politics-reading-index { display: block; }
  body.matt-marx-reading .matt-politics-reading-link { grid-template-columns: 30px minmax(0, 1fr); }
  body.matt-marx-reading .matt-politics-reading-meta { grid-column: 2; }
  body.matt-marx-reading .chapter-title { font-size: 1.2rem; }
}
