:root {
  --rm-primary: #0064ff;
  --rm-primary-dark: #0050cc;
  --rm-primary-soft: #e6f0ff;
  --rm-green: #0caf60;
  --rm-green-soft: #e6f8ef;
  --rm-bg: #f5f5f7;
  --rm-surface: #ffffff;
  --rm-surface-muted: #fafafb;
  --rm-text: #0f1419;
  --rm-text-secondary: #525866;
  --rm-text-tertiary: #8e96a3;
  --rm-border: #e4e6ea;
  --rm-border-strong: #cdd0d5;
  --rm-code-bg: #f3f5f8;
  --rm-shadow: 0 8px 24px rgba(15, 20, 25, 0.06);
  --rm-shadow-soft: 0 2px 8px rgba(15, 20, 25, 0.04);
  --rm-shadow-card: 0 10px 28px rgba(15, 20, 25, 0.055);
  --rm-shadow-card-hover: 0 14px 34px rgba(15, 20, 25, 0.075);
  --rm-media-ink: #111827;
  --rm-media-paper: #ffffff;
  --rm-radius: 8px;
  --rm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --rm-mono: "JetBrains Mono", "Source Code Pro", Consolas, Monaco, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#container {
  min-height: 100%;
  height: auto;
}

body {
  background: var(--rm-bg);
  color: var(--rm-text);
  font-family: var(--rm-font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  overflow-x: hidden;
}

a {
  color: var(--rm-primary);
}

#wrap {
  position: relative;
  min-height: 100vh;
  background: var(--rm-bg);
}

.outer {
  max-width: 1180px;
  padding: 0 24px;
  box-sizing: border-box;
}

#wrap > .outer::before,
#wrap > .outer::after,
.site-nav::before,
.site-nav::after,
.site-hero::before,
.site-hero::after {
  display: none !important;
  content: none !important;
}

#wrap > .outer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-top: 32px;
}

#main,
#sidebar {
  display: block !important;
  float: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
}

@media screen and (min-width: 980px) {
  .is-home-page #wrap > .outer,
  .is-list-page #wrap > .outer {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
  }
}

.is-post-page #wrap > .outer {
  max-width: 1180px;
}

.is-post-page #sidebar {
  display: none;
}

.site-header {
  height: auto !important;
  border-bottom: 1px solid var(--rm-border);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.25) 100%),
    url("/images/brand/reasonofmoon-og.png") center center / cover no-repeat;
  color: #fff;
}

.site-header::before,
.site-header::after,
#banner {
  display: none !important;
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 40;
  overflow: visible;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  color: var(--rm-text);
  text-decoration: none;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.site-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-brand-text {
  display: grid;
  gap: 2px;
}

.site-brand-text strong {
  font-size: 16px;
  line-height: 1.2;
}

.site-brand-text small {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  line-height: 1.3;
}

.obsidian-callout {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--rm-border);
  border-left-width: 4px;
  border-radius: var(--rm-radius);
  background: #f8fbff;
  overflow-wrap: anywhere;
}

.obsidian-callout__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--rm-text);
  font-size: 15px;
  line-height: 1.4;
}

.obsidian-callout__icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(0, 100, 255, 0.12);
  color: var(--rm-primary-dark);
}

.obsidian-callout__body > :first-child {
  margin-top: 0;
}

.obsidian-callout__body > :last-child {
  margin-bottom: 0;
}

.obsidian-callout__body p,
.obsidian-callout__body li,
.obsidian-callout__body blockquote {
  overflow-wrap: anywhere;
}

.obsidian-callout--quote {
  border-left-color: #245bdb;
  background: #eef4ff;
}

.obsidian-callout--quote .obsidian-callout__icon {
  background: rgba(36, 91, 219, 0.14);
  color: #1f4fbf;
}

.obsidian-callout--note {
  border-left-color: #0f766e;
  background: #edfdf8;
}

.obsidian-callout--note .obsidian-callout__icon {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.obsidian-callout--tip {
  border-left-color: #a16207;
  background: #fffbeb;
}

.obsidian-callout--tip .obsidian-callout__icon {
  background: rgba(161, 98, 7, 0.14);
  color: #a16207;
}

.obsidian-footnote-ref {
  margin-left: 2px;
  vertical-align: super;
  font-size: 0.78em;
  line-height: 1;
}

.obsidian-footnote-ref a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  height: 1.35em;
  padding: 0 0.28em;
  border-radius: 999px;
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
  text-decoration: none;
  font-weight: 700;
}

.obsidian-footnotes {
  margin: 26px 0 8px;
  padding-top: 8px;
}

.obsidian-footnotes__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.obsidian-footnotes__item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
}

.obsidian-footnotes__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.obsidian-footnotes__body {
  min-width: 0;
  color: var(--rm-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.obsidian-footnotes__body > :first-child {
  margin-top: 0;
}

.obsidian-footnotes__body > :last-child {
  margin-bottom: 0;
}

.obsidian-footnotes__body p,
.obsidian-footnotes__body strong,
.obsidian-footnotes__body a,
.obsidian-footnotes__body code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.obsidian-footnote-backref {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: var(--rm-primary-dark);
  font-size: 0.95em;
  text-decoration: none;
}

#main-nav,
#sub-nav,
.site-menu,
.site-actions {
  float: none;
  margin: 0;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: nowrap;
  min-width: 0;
  position: relative;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav-link,
.nav-icon {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--rm-radius);
  color: var(--rm-text-secondary);
  opacity: 1;
  text-shadow: none;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-group {
  position: relative;
  flex: 0 0 auto;
  z-index: 60;
}

.nav-group-trigger {
  border: 0;
  background: transparent;
  cursor: pointer;
  gap: 6px;
  font-family: inherit;
}

.nav-group-trigger .fa {
  font-size: 12px;
  transition: transform 0.15s ease;
}

.nav-group.is-open .nav-group-trigger .fa,
.nav-group:hover .nav-group-trigger .fa,
.nav-group:focus-within .nav-group-trigger .fa {
  transform: rotate(180deg);
}

.nav-group-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  display: none;
  width: 248px;
  padding: 10px;
  border: 1px solid var(--rm-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.nav-group.is-open .nav-group-menu,
.nav-group:hover .nav-group-menu,
.nav-group:focus-within .nav-group-menu {
  display: grid;
  gap: 6px;
}

.nav-group-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-top: 1px solid var(--rm-border);
  border-left: 1px solid var(--rm-border);
  background: rgba(255, 255, 255, 0.98);
  transform: rotate(45deg);
}

.nav-group-menu-head {
  display: grid;
  gap: 2px;
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--rm-border);
  margin-bottom: 2px;
}

.nav-group-menu-head strong {
  color: var(--rm-text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.nav-group-menu-head span {
  color: var(--rm-text-tertiary);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.nav-group-link {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--rm-text-secondary);
  line-height: 1.25;
  text-decoration: none;
}

.nav-group-link-label {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-group-link-desc {
  color: var(--rm-text-tertiary);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

#mobile-nav .mobile-nav-heading {
  display: block;
  padding: 16px 20px 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

#mobile-nav .mobile-nav-child {
  padding-left: 32px;
}

#mobile-nav {
  display: none;
}

.main-nav-link:hover,
.main-nav-link:focus-visible,
.main-nav-link.is-active,
.main-nav-link[aria-current="page"],
.nav-icon:hover,
.nav-group-link:hover,
.nav-group-link:focus-visible,
.nav-group-link.is-active,
.nav-group-link[aria-current="page"] {
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
  text-decoration: none;
}

.nav-group-link:hover .nav-group-link-desc,
.nav-group-link:focus-visible .nav-group-link-desc,
.nav-group-link.is-active .nav-group-link-desc,
.nav-group-link[aria-current="page"] .nav-group-link-desc {
  color: var(--rm-primary-dark);
}

#main-nav-toggle {
  display: none;
}

#search-form-wrap {
  top: 18px;
  right: 24px;
  width: 280px;
  height: 38px;
  z-index: 5;
}

.search-form {
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow);
  border: 1px solid var(--rm-border);
}

.site-hero {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 54px;
  padding-bottom: 64px;
}

.site-kicker {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 6px 10px;
  border-radius: var(--rm-radius);
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.site-hero h1 {
  max-width: 650px;
  margin: 0;
  color: #fff;
  font-size: 42px;
  line-height: 1.2;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.38);
}

.site-description {
  max-width: 600px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
}

.site-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.site-topic-row a,
.article-tag-list-link,
.category-list-link,
.tag-list-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--rm-surface-muted);
  color: var(--rm-text-secondary);
  border: 1px solid var(--rm-border);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.site-topic-row a:hover,
.site-topic-row a:focus-visible {
  transform: translateY(-1px);
}

.site-hero .site-topic-row a {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.site-topic-row a.is-active,
.site-topic-row a[aria-current="page"] {
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
  border-color: transparent;
}

.site-hero .site-topic-row a.is-active,
.site-hero .site-topic-row a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  border-color: rgba(255, 255, 255, 0.92);
}

.topic-page {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.topic-header,
.topic-intro,
.topic-post-card,
.topic-empty {
  min-width: 0;
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow);
}

.topic-header {
  padding: 34px 36px;
}

.topic-kicker {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.topic-header h1 {
  margin: 0;
  color: var(--rm-text);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 850;
}

.topic-header p:last-child {
  margin: 12px 0 0;
  color: var(--rm-text-secondary);
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.topic-intro {
  padding: 24px 32px;
  max-width: none;
}

.topic-intro.article-entry {
  max-width: none;
  padding: 24px 32px;
}

.topic-intro p {
  margin: 0;
  overflow-wrap: anywhere;
}

.topic-intro.article-entry p {
  margin: 0;
  overflow-wrap: anywhere;
}

.topic-posts {
  display: grid;
  gap: 14px;
}

.topic-post-card {
  padding: 24px 28px;
}

.topic-post-card h2 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.topic-post-card h2 a {
  color: var(--rm-text);
  text-decoration: none;
}

.topic-post-card h2 a:hover {
  color: var(--rm-primary);
}

.topic-post-card p {
  margin: 0 0 16px;
  color: var(--rm-text-secondary);
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.topic-empty {
  padding: 24px 28px;
  color: var(--rm-text-secondary);
}

.topic-empty strong {
  display: block;
  color: var(--rm-text);
  margin-bottom: 8px;
}

.book-library-page {
  gap: 22px;
}

.book-library-header {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.96)),
    radial-gradient(circle at 88% 16%, rgba(0, 100, 255, 0.13), transparent 32%);
}

.book-library-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.book-library-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  background: var(--rm-surface);
  color: var(--rm-text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.book-library-stats strong {
  color: var(--rm-primary-dark);
  font-size: 15px;
}

.book-library-intro code {
  white-space: normal;
}

.book-category-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  box-shadow: var(--rm-shadow);
}

.book-category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--rm-border);
  border-radius: 7px;
  background: var(--rm-surface-muted);
  color: var(--rm-text-secondary);
  text-decoration: none;
}

.book-category-chip:hover {
  border-color: var(--rm-primary);
  color: var(--rm-text);
  text-decoration: none;
}

.book-category-chip span {
  min-width: 0;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.book-category-chip strong {
  flex: 0 0 auto;
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 850;
}

.book-category-chip.has-books {
  background: var(--rm-primary-soft);
  border-color: rgba(0, 100, 255, 0.18);
  color: var(--rm-primary-dark);
}

.book-category-chip.has-books strong {
  color: var(--rm-primary-dark);
}

.book-shelf-stack {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.book-shelf-block {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
  box-shadow: var(--rm-shadow);
}

.book-shelf-block--empty {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
}

.book-shelf-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--rm-border);
}

.book-shelf-heading p {
  margin: 0 0 4px;
  color: var(--rm-primary-dark);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.book-shelf-heading h2 {
  margin: 0;
  color: var(--rm-text);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.book-shelf-heading em {
  display: block;
  margin-top: 7px;
  color: var(--rm-text-secondary);
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.book-shelf-heading span {
  flex: 0 0 auto;
  color: var(--rm-text-tertiary);
  font-size: 13px;
  font-weight: 800;
}

.book-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  min-width: 0;
}

.book-empty-shelf {
  padding: 18px;
  border: 1px dashed var(--rm-border-strong);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
  color: var(--rm-text-secondary);
}

.book-empty-shelf strong {
  display: block;
  margin-bottom: 5px;
  color: var(--rm-text);
  font-size: 15px;
  line-height: 1.35;
}

.book-empty-shelf p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.book-volume-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  box-shadow: 0 2px 10px rgba(15, 20, 25, 0.04);
}

.book-volume-cover {
  position: relative;
  align-self: start;
  aspect-ratio: 3 / 4.35;
  min-height: 166px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--rm-text);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(15, 20, 25, 0.12) 0 12px, transparent 12px),
    linear-gradient(145deg, #eff6ff, #ffffff);
  box-shadow: 7px 7px 0 rgba(15, 20, 25, 0.16);
}

.book-volume-cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 14px;
  width: 1px;
  background: rgba(15, 20, 25, 0.22);
}

.book-volume-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-volume-cover span {
  padding: 8px;
  color: var(--rm-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.book-volume-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.book-volume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.book-volume-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  background: var(--rm-surface-muted);
  color: var(--rm-text-secondary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.book-volume-body h2 {
  margin: 0;
  color: var(--rm-text);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.book-volume-original,
.book-volume-author {
  margin: 8px 0 0;
  color: var(--rm-text-secondary);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.book-volume-original {
  color: var(--rm-text-tertiary);
  font-family: var(--rm-mono);
}

.book-progress {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.book-progress div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--rm-text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.book-progress strong {
  color: var(--rm-primary-dark);
  font-size: 16px;
}

.book-progress i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rm-code-bg);
}

.book-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rm-primary), var(--rm-green));
}

.book-latest-note {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 3px 10px;
  align-items: start;
  min-width: 0;
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(0, 100, 255, 0.22);
  border-radius: 8px;
  background: #f7fbff;
  color: var(--rm-text);
  text-decoration: none;
}

.book-latest-note:hover {
  border-color: var(--rm-primary);
  color: var(--rm-text);
  text-decoration: none;
}

.book-latest-note span {
  grid-row: span 2;
  color: var(--rm-primary-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
}

.book-latest-note strong {
  min-width: 0;
  color: var(--rm-text);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 850;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.book-latest-note em {
  color: var(--rm-text-tertiary);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.book-volume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.book-volume-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--rm-text-secondary);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.book-volume-actions a:first-child {
  border-color: rgba(0, 100, 255, 0.26);
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
}

.book-volume-actions a:hover {
  border-color: var(--rm-primary);
  color: var(--rm-primary-dark);
  text-decoration: none;
}

.book-note-drawer {
  margin-top: auto;
  border: 1px solid var(--rm-border);
  border-radius: 8px;
  background: var(--rm-surface-muted);
}

.book-note-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  color: var(--rm-text);
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.book-note-drawer summary::-webkit-details-marker {
  display: none;
}

.book-note-drawer summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: var(--rm-text-tertiary);
  font-size: 14px;
  line-height: 1;
}

.book-note-drawer[open] summary::after {
  content: "-";
}

.book-note-drawer summary strong {
  margin-left: auto;
  color: var(--rm-text-tertiary);
  font-size: 12px;
}

.book-note-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  list-style: none;
}

.book-note-list li {
  margin: 0;
}

.book-note-list a {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 5px 10px;
  align-items: start;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--rm-border);
  border-radius: 6px;
  background: var(--rm-surface-muted);
  color: var(--rm-text);
  text-decoration: none;
}

.book-note-list a:hover {
  border-color: var(--rm-primary);
  background: #f7fbff;
  color: var(--rm-text);
  text-decoration: none;
}

.book-note-list span {
  grid-row: span 2;
  color: var(--rm-primary-dark);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
  white-space: nowrap;
}

.book-note-list strong {
  min-width: 0;
  color: var(--rm-text);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.book-note-list em {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  color: var(--rm-text-tertiary);
  font-style: normal;
}

.book-note-list b {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--rm-text-secondary);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.article {
  margin: 0 0 24px;
}

.post-card,
.article-inner,
.related-posts,
#page-nav {
  background: var(--rm-surface);
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  box-shadow: var(--rm-shadow-card);
}

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(208px, 236px) minmax(0, 1fr);
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card:hover {
  border-color: #d8dde6;
  box-shadow: var(--rm-shadow-card-hover);
}

.post-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 0;
  margin: 18px 12px 18px 18px;
  padding: 7px;
  background: var(--rm-media-paper);
  color: var(--rm-media-ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: 6px solid var(--rm-media-ink);
  border-radius: 0;
  box-shadow: 8px 8px 0 var(--rm-media-ink);
  box-sizing: border-box;
  transform: rotate(-0.35deg);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.post-card-media:hover,
.post-card-media:focus-visible {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 11px 11px 0 var(--rm-media-ink);
}

.post-card-media::after {
  content: "";
  position: absolute;
  inset: -11px;
  pointer-events: none;
  border: 2px solid var(--rm-media-ink);
  transform: translate(5px, 5px);
  opacity: 0.14;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  display: block;
  background: var(--rm-media-paper);
  border: 3px solid var(--rm-media-ink);
  border-radius: 0;
  box-sizing: border-box;
}

.post-card-media-fallback span {
  padding: 8px 12px;
  border-radius: 0;
  background: var(--rm-media-paper);
  border: 3px solid var(--rm-media-ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--rm-media-ink);
}

.post-card-body {
  min-width: 0;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--rm-text-tertiary);
}

.article-date,
.article-category-link {
  color: var(--rm-text-tertiary);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
  line-height: 1.2;
  font-size: 12px;
  font-weight: 700;
  text-shadow: none;
}

.article-category-link {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border: 1px solid rgba(0, 100, 255, 0.16);
  border-radius: 999px;
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
}

.article-category {
  float: none;
  margin: 0;
  color: var(--rm-text-tertiary);
  line-height: 1.2;
  text-shadow: none;
}

.article-category::before {
  display: none;
}

.article-category .article-category-list {
  display: flex;
  gap: 6px;
  margin: 0;
}

.article-title {
  margin: 0;
  color: var(--rm-text);
  line-height: 1.25;
  font-size: 24px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.article-title a {
  color: inherit;
  text-decoration: none;
}

.article-title a:hover {
  color: var(--rm-primary);
  text-decoration: none;
}

.post-card-excerpt {
  margin: 12px 0 18px;
  color: var(--rm-text-secondary);
  font-size: 15px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  list-style: none;
  min-width: 0;
}

.article-tag-list-item {
  float: none;
  margin: 0;
}

.article-tag-list-link::before {
  content: "#";
}

.article-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--rm-radius);
  background: var(--rm-primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.article-more-link:hover {
  background: var(--rm-primary-dark);
  color: #fff;
  text-decoration: none;
}

.article-detail .article-inner {
  overflow: visible;
}

.article-detail .article-header {
  max-width: 860px;
  padding: 44px 48px 20px;
}

.article-detail .article-title {
  font-size: 42px;
  line-height: 1.22;
}

.article-description {
  margin: 18px 0 0;
  color: var(--rm-text-secondary);
  font-size: 18px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.translation-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
}

.translation-switcher--top {
  margin-top: 18px;
}

.translation-switcher--bottom {
  max-width: 860px;
  margin: 0 48px 28px;
}

.translation-switcher__label {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.translation-switcher__links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.translation-switcher__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--rm-text-secondary);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}

.translation-switcher__item:hover {
  border-color: var(--rm-primary);
  color: var(--rm-primary-dark);
  text-decoration: none;
}

.translation-switcher__item.is-current {
  border-color: rgba(0, 100, 255, 0.2);
  background: var(--rm-primary-soft);
  color: var(--rm-primary-dark);
}

.translation-switcher__item small {
  color: var(--rm-text-tertiary);
  font-size: 10px;
  font-weight: 800;
}

.article-audio {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
}

.article-audio--radio {
  border-color: rgba(37, 99, 235, 0.28);
  background:
    linear-gradient(135deg, rgba(230, 240, 255, 0.88), rgba(255, 255, 255, 0.96)),
    var(--rm-surface-muted);
}

.article-audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-audio-header strong {
  color: var(--rm-text);
  font-size: 15px;
  line-height: 1.3;
}

.article-audio-header span {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 800;
}

.article-audio-summary {
  margin: -4px 0 0;
  color: var(--rm-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.article-audio audio {
  width: 100%;
}

.article-audio-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.article-audio a {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rm-border);
  border-radius: 6px;
  background: var(--rm-surface);
  color: var(--rm-primary-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.article-audio a:hover {
  text-decoration: underline;
}

.article-body-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  padding: 18px 48px 48px;
  min-width: 0;
}

.article-body-grid--no-toc {
  grid-template-columns: minmax(0, 1fr);
}

.article-body-grid--no-toc .article-entry {
  max-width: 860px;
}

.article-toc {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 16px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
  color: var(--rm-text-secondary);
  font-size: 13px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.article-toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--rm-text);
}

.article-toc ol,
.article-toc ul {
  margin: 0;
  padding-left: 16px;
}

.article-toc li {
  margin: 6px 0;
}

.article-toc a {
  color: var(--rm-text-secondary);
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--rm-primary);
}

.article-entry {
  width: 100%;
  max-width: 820px;
  min-width: 0;
  padding: 0;
  color: var(--rm-text);
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: normal;
}

.article-entry p,
.article-entry table {
  line-height: 1.85;
  margin: 1.05em 0;
}

.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4,
.article-entry h5,
.article-entry h6 {
  color: var(--rm-text);
  line-height: 1.3;
  font-weight: 800;
  margin: 1.8em 0 0.72em;
}

.article-entry h1 {
  font-size: 32px;
}

.article-entry h2 {
  font-size: 26px;
}

.article-entry h3 {
  font-size: 21px;
}

.article-entry a {
  color: var(--rm-primary-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-entry a.external-link::after {
  content: "↗";
  display: inline-block;
  margin-left: 3px;
  font-size: 0.78em;
  text-decoration: none;
}

.article-entry img,
.article-entry video {
  max-width: 100%;
  height: auto;
  border-radius: var(--rm-radius);
  border: 1px solid var(--rm-border);
  background: #fff;
}

.article-entry figure {
  margin: 32px 0;
  max-width: 100%;
  overflow: hidden;
}

.article-entry figcaption,
.article-entry .caption {
  margin-top: 10px;
  color: var(--rm-text-tertiary);
  font-size: 13px;
  text-align: center;
}

.media-preview {
  margin: 28px 0;
  border: 2px solid var(--rm-text);
  border-radius: var(--rm-radius);
  background: #fff;
  box-shadow: 5px 5px 0 rgba(15, 20, 25, 0.12);
}

.media-preview__link {
  display: grid;
  color: var(--rm-text);
  text-decoration: none;
}

.media-preview__link::after {
  display: none !important;
}

.media-preview__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 2px solid var(--rm-text);
  background: #111827;
}

.media-preview__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.media-preview--image .media-preview__thumb {
  background: var(--rm-surface-muted);
}

.media-preview--image .media-preview__thumb img {
  object-fit: contain;
}

.media-preview__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(15, 20, 25, 0.82);
  transform: translate(-50%, -50%);
}

.media-preview__play::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 13px;
  border-left: 18px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

.media-preview__meta {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 13px 16px 15px;
  text-align: left;
}

.media-preview__domain {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.media-preview__title {
  color: var(--rm-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.media-preview:hover {
  box-shadow: 7px 7px 0 rgba(15, 20, 25, 0.18);
  transform: translate(-1px, -1px);
}

.article-entry blockquote {
  margin: 28px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--rm-primary);
  border-radius: var(--rm-radius);
  background: var(--rm-primary-soft);
  color: var(--rm-text);
  font-family: var(--rm-font);
  text-align: left;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.article-entry blockquote p {
  margin: 0.4em 0;
}

.article-entry code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--rm-code-bg);
  color: var(--rm-primary-dark);
  font-family: var(--rm-mono);
  font-size: 0.9em;
}

.article-entry pre {
  border-radius: var(--rm-radius);
  border: 1px solid var(--rm-border);
  background: #101828;
  overflow: auto;
}

.article-entry pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
}

.table-scroll table {
  margin: 0;
  min-width: 620px;
}

.article-entry table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.article-entry th,
.article-entry td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rm-border);
  text-align: left;
}

.article-entry th {
  background: var(--rm-surface-muted);
  color: var(--rm-text);
  font-weight: 800;
}

.link-preview-card {
  margin: 24px 0 !important;
}

.link-preview-card > a {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  color: var(--rm-text);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 20, 25, 0.04);
}

.link-preview-card > a::after {
  display: none;
}

.link-preview-card > a:hover {
  border-color: var(--rm-primary);
  box-shadow: var(--rm-shadow);
}

.link-preview-domain {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.article-footer {
  margin: 0 48px 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rm-border);
}

.book-series-nav {
  display: grid;
  gap: 14px;
  margin: 0 48px 28px;
  padding: 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
}

.book-series-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--rm-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.book-series-nav-header span,
.book-series-nav-header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.book-series-nav-header strong {
  color: var(--rm-primary-dark);
}

.book-series-nav-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.book-series-nav-links a,
.book-series-nav-placeholder {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--rm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--rm-text);
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.book-series-nav-links a:hover {
  border-color: var(--rm-primary);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.book-series-nav-links span {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.book-series-nav-links strong {
  color: var(--rm-text);
  font-size: 14px;
  font-weight: 800;
}

.book-series-nav-placeholder {
  opacity: 0.62;
}

.ad-slot {
  margin: 0 48px 48px;
  min-height: 90px;
  padding: 14px;
  border: 1px dashed var(--rm-border-strong);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
}

#sidebar .ad-slot {
  margin: 0 0 18px;
}

.article-share-link {
  float: none;
  display: inline-flex;
  color: var(--rm-text-tertiary);
}

.related-posts {
  margin-top: 24px;
  padding: 28px;
}

.knowledge-links {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  box-shadow: var(--rm-shadow);
}

.knowledge-link-group + .knowledge-link-group {
  margin-top: 22px;
}

.knowledge-link-group h3 {
  margin: 0 0 12px;
  color: var(--rm-text-secondary);
  font-size: 15px;
  line-height: 1.4;
}

.knowledge-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.knowledge-link-card {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
  color: var(--rm-text);
  text-decoration: none;
}

.knowledge-link-card:hover {
  border-color: var(--rm-primary);
  color: var(--rm-text);
  text-decoration: none;
}

.knowledge-link-card__meta {
  color: var(--rm-primary);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-link-card strong {
  line-height: 1.45;
}

.knowledge-link-card__desc {
  color: var(--rm-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.comments-section {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  box-shadow: var(--rm-shadow);
}

.comments-section-header {
  margin-bottom: 18px;
}

.comments-section-kicker {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--rm-primary);
  font-size: 12px;
  font-weight: 800;
}

.comments-section h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.comments-section p {
  margin: 8px 0 0;
  color: var(--rm-text-secondary);
  font-size: 14px;
}

.giscus,
.giscus-frame {
  width: 100%;
}

.section-heading span {
  color: var(--rm-primary);
  font-size: 12px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 4px 0 18px;
  font-size: 22px;
  line-height: 1.3;
}

.related-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.related-post-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface-muted);
  color: var(--rm-text);
  text-decoration: none;
}

.related-post-card:hover {
  border-color: var(--rm-primary);
  color: var(--rm-text);
  text-decoration: none;
}

.related-post-card time {
  color: var(--rm-text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.related-post-card strong {
  line-height: 1.45;
}

.related-post-card span {
  color: var(--rm-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

#article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 0;
}

#article-nav::before {
  display: none;
}

.article-nav-link-wrap {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  color: var(--rm-text);
  text-shadow: none;
  text-align: left !important;
  text-decoration: none;
  box-shadow: var(--rm-shadow);
}

.article-nav-link-wrap:hover {
  border-color: var(--rm-primary);
  color: var(--rm-text);
}

#article-nav-newer,
#article-nav-older {
  float: none;
  width: auto;
  padding: 18px;
}

.article-nav-caption {
  color: var(--rm-text-tertiary);
  letter-spacing: 0;
  text-transform: none;
}

.article-nav-title {
  color: var(--rm-text);
  font-size: 15px;
}

#sidebar {
  position: sticky;
  top: 20px;
}

.widget-wrap {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: var(--rm-surface);
  box-shadow: var(--rm-shadow-soft);
}

.widget-title {
  margin: 0 0 12px;
  color: var(--rm-text);
  font-size: 14px;
  font-weight: 800;
}

.widget {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  text-shadow: none !important;
  color: var(--rm-text-secondary);
  font-size: 14px;
}

.widget a {
  color: var(--rm-text-secondary);
  text-decoration: none;
}

.widget a:hover {
  color: var(--rm-primary);
}

.widget li {
  margin: 8px 0;
}

.content-map {
  display: grid;
  gap: 14px;
}

.content-map-diagram {
  position: relative;
  padding: 2px 0 0;
}

.content-map-diagram::before {
  content: "";
  position: absolute;
  inset: 44px 22px 64px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: var(--rm-radius);
  pointer-events: none;
}

.content-map-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 4px;
}

.content-map-flow span {
  display: inline-flex;
  justify-content: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  background: #fff;
  color: var(--rm-text-tertiary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.content-map-core {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  justify-items: center;
  margin: 0 18px;
  padding: 14px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--rm-radius);
  background: #fff;
  box-shadow: var(--rm-shadow-soft);
  text-align: center;
}

.content-map-core::before,
.content-map-core::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 14px;
  background: rgba(37, 99, 235, 0.32);
  transform: translateX(-50%);
}

.content-map-core::before {
  top: -14px;
}

.content-map-core::after {
  bottom: -14px;
}

.content-map-core span {
  color: var(--rm-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.content-map-core strong {
  color: var(--rm-primary-dark);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.content-map-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.content-map-orbit::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 14%;
  right: 14%;
  height: 2px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.22);
  pointer-events: none;
}

.content-map-node {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--rm-border);
  border-radius: var(--rm-radius);
  background: #fff;
  color: var(--rm-text);
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: var(--rm-shadow-soft);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.content-map-node::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 2px;
  height: 10px;
  background: rgba(37, 99, 235, 0.22);
  transform: translateX(-50%);
}

.content-map-node b {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--map-accent-soft);
  color: var(--map-accent);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.content-map-node span {
  color: var(--rm-text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.content-map-node small {
  color: var(--rm-text-tertiary);
  font-size: 11px;
  line-height: 1.35;
}

.content-map-node--blue {
  --map-accent: #2563eb;
  --map-accent-soft: rgba(37, 99, 235, 0.12);
}

.content-map-node--rose {
  --map-accent: #e11d48;
  --map-accent-soft: rgba(225, 29, 72, 0.1);
}

.content-map-node--green {
  --map-accent: #059669;
  --map-accent-soft: rgba(5, 150, 105, 0.11);
}

.content-map-node--amber {
  --map-accent: #d97706;
  --map-accent-soft: rgba(217, 119, 6, 0.12);
}

.content-map-node--violet {
  --map-accent: #7c3aed;
  --map-accent-soft: rgba(124, 58, 237, 0.11);
}

.content-map-node:nth-child(7) {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(150px, 100%);
}

.content-map-node:hover {
  border-color: var(--map-accent);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.tagcloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.tagcloud-note {
  margin: -4px 0 12px;
  color: var(--rm-text-tertiary);
  font-size: 12px;
  line-height: 1.5;
}

.tagcloud .tagcloud-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--rm-border);
  border-radius: 999px;
  background: var(--rm-surface-muted);
  color: var(--rm-text-secondary);
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tagcloud .tagcloud-link:hover {
  border-color: var(--rm-primary);
  background: #fff;
  color: var(--rm-primary-dark);
  transform: translateY(-1px);
}

.tagcloud .tagcloud-link span {
  min-width: 0;
}

.tagcloud .tagcloud-link em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--rm-text-tertiary);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.tagcloud-level-1 {
  font-size: 11px;
  opacity: 0.72;
}

.tagcloud-level-2 {
  font-size: 12px;
  opacity: 0.82;
}

.tagcloud-level-3 {
  font-size: 13px;
}

.tagcloud-level-4 {
  font-size: 14px;
  font-weight: 800;
}

.tagcloud-level-5 {
  font-size: 15px;
  font-weight: 900;
}

.follow-list,
.recent-post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.follow-list {
  display: grid;
  gap: 8px;
}

.follow-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--rm-border);
  border-radius: 6px;
  background: var(--rm-surface-muted);
  font-weight: 700;
}

.follow-list a::after {
  content: "↗";
  color: var(--rm-text-tertiary);
  font-size: 12px;
}

.recent-post-list {
  display: grid;
  gap: 12px;
}

.recent-post-list a {
  display: grid;
  gap: 4px;
}

.recent-post-category {
  color: var(--rm-primary);
  font-size: 11px;
  font-weight: 800;
}

.recent-post-list strong {
  color: var(--rm-text);
  font-size: 14px;
  line-height: 1.45;
}

.recent-post-list time {
  color: var(--rm-text-tertiary);
  font-size: 12px;
}

.archives-wrap,
#page-nav {
  margin: 0 0 24px;
}

#page-nav {
  overflow: hidden;
  color: var(--rm-text-secondary);
}

#page-nav a,
#page-nav span {
  height: auto;
  padding: 14px 18px;
}

#footer {
  margin-top: 64px;
  background: #111827;
}

@media screen and (max-width: 979px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-brand {
    min-width: 0;
    flex: 1 1 100%;
  }

  .site-menu,
  .site-actions {
    flex: 0 1 auto;
  }

  .site-menu {
    width: 100%;
    overflow-x: visible;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  .nav-group-menu {
    right: auto;
    left: 0;
  }

  .site-hero h1 {
    font-size: 32px;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card-media {
    aspect-ratio: 16 / 9;
    min-height: 220px;
    margin: 16px 18px 22px 14px;
  }

  .post-card-media img {
    min-height: 184px;
  }

  .article-body-grid {
    grid-template-columns: 1fr;
  }

  .article-toc {
    display: none;
  }

  .related-post-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-link-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 640px) {
  html,
  body,
  #container,
  #wrap {
    max-width: 100%;
    overflow-x: hidden;
  }

  .outer {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
    width: 100%;
  }

  .site-hero {
    min-height: 420px;
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.8) 54%, rgba(2, 6, 23, 0.48) 100%),
      url("/images/brand/reasonofmoon-og.png") 64% center / cover no-repeat;
    padding-top: 30px;
    padding-bottom: 36px;
  }

  .site-hero h1 {
    width: min(330px, calc(100vw - 32px));
    max-width: min(330px, calc(100vw - 32px));
    font-size: 23px;
    line-height: 1.25;
    word-break: keep-all;
  }

  .site-description {
    width: min(330px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    font-size: 15px;
  }

  .site-menu {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    column-gap: 8px;
    max-width: 100%;
    overflow: visible;
    row-gap: 2px;
  }

  .nav-group {
    min-width: 0;
  }

  .nav-group-menu {
    min-width: 176px;
  }

  .main-nav-link {
    height: 32px;
    padding: 0 7px;
    font-size: 12px;
  }

  .site-actions {
    margin-top: 4px;
  }

  .post-card-body {
    padding: 22px;
  }

  .topic-page,
  .topic-posts,
  .book-shelf-stack,
  .book-shelf-block,
  .topic-header,
  .topic-intro,
  .topic-post-card,
  .topic-empty,
  .post-card {
    width: min(330px, calc(100vw - 32px));
    max-width: min(330px, calc(100vw - 32px));
    justify-self: start;
  }

  .post-card-media {
    min-height: 168px;
    margin: 14px 15px 20px 12px;
    padding: 6px;
    border-width: 5px;
    box-shadow: 6px 6px 0 var(--rm-media-ink);
  }

  .post-card-media:hover,
  .post-card-media:focus-visible {
    transform: rotate(0deg) translate(-1px, -1px);
    box-shadow: 7px 7px 0 var(--rm-media-ink);
  }

  .post-card-media::after {
    inset: -8px;
    transform: translate(4px, 4px);
  }

  .post-card-media img {
    min-height: 132px;
    border-width: 2px;
  }

  .post-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-more-link {
    width: 100%;
    justify-content: center;
  }

  .content-map-orbit {
    grid-template-columns: 1fr;
  }

  .content-map-node:nth-child(7) {
    width: 100%;
  }

  .tagcloud {
    max-height: 220px;
  }

  .topic-post-card h2 {
    font-size: 21px;
  }

  .topic-header,
  .topic-intro,
  .topic-post-card,
  .topic-empty,
  .book-shelf-block,
  .article-detail .article-header,
  .article-body-grid,
  .book-series-nav,
  .article-footer,
  .ad-slot,
  .comments-section {
    padding-left: 22px;
    padding-right: 22px;
  }

  .topic-intro.article-entry {
    padding-left: 22px;
    padding-right: 22px;
  }

  .book-shelf-heading {
    align-items: start;
    flex-direction: column;
  }

  .book-shelf-grid {
    grid-template-columns: 1fr;
  }

  .book-volume-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .book-volume-cover {
    width: min(180px, 100%);
    min-height: 220px;
  }

  .book-volume-body h2 {
    font-size: 22px;
  }

  .article-detail .article-title {
    font-size: 27px;
  }

  .article-entry {
    font-size: 16px;
    max-width: 100%;
  }

  .book-series-nav {
    margin-left: 22px;
    margin-right: 22px;
  }

  .translation-switcher {
    align-items: flex-start;
    flex-direction: column;
  }

  .translation-switcher--bottom {
    margin-left: 22px;
    margin-right: 22px;
  }

  .translation-switcher__links {
    justify-content: flex-start;
  }

  .book-series-nav-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-series-nav-links {
    grid-template-columns: 1fr;
  }

  #article-nav {
    grid-template-columns: 1fr;
  }
}
