.cms-page {
  background: var(--bg, #faf8ff);
  color: var(--ink, #282238);
  font-family: Nunito, system-ui, sans-serif;
}
.cms-header {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1100px;
  margin: 20px auto 40px;
  padding: 18px 24px;
  background: #fff;
  border: 1px solid #e7dff4;
  border-radius: 28px;
}
.cms-header > a:first-child {
  margin-right: auto;
}
.cms-header img {
  object-fit: contain;
}
.cms-header a,
.cms-header summary,
.cms-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.cms-header details {
  position: relative;
}
.cms-header details nav {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2;
  display: grid;
  min-width: 180px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e7dff4;
  border-radius: 18px;
  box-shadow: 0 12px 40px #33136519;
}
.cms-reading,
.cms-archive {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto 80px;
}
.cms-reading {
  max-width: 820px;
}
.cms-article-header {
  padding: 32px 0;
}
.cms-page h1,
.cms-page h2,
.cms-page h3 {
  font-family: "Baloo 2", Nunito, system-ui, sans-serif;
  line-height: 1.15;
}
.cms-page h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  margin: 18px 0 24px;
  overflow-wrap: anywhere;
}
.cms-page h2 {
  font-size: clamp(26px, 3vw, 34px);
}
.cms-page h3 {
  font-size: 24px;
}
.cms-page a {
  color: #6320ca;
  text-underline-offset: 4px;
}
.cms-page a:focus-visible,
.cms-page summary:focus-visible {
  outline: 3px solid #6320ca;
  outline-offset: 4px;
}
.cms-excerpt {
  font-size: 20px;
  line-height: 1.65;
  color: #645a74;
}
.cms-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 900;
  color: #6320ca;
}
.cms-byline {
  font-weight: 800;
}
.cms-dates {
  font-size: 14px;
  line-height: 1.7;
  color: #645a74;
}
.cms-toc {
  margin: 8px 0 44px;
  padding: 24px 28px;
  border-radius: 28px;
  background: #efe7ff;
}
.cms-toc ol {
  padding-left: 22px;
}
.cms-toc li {
  padding: 7px 0;
  line-height: 1.6;
}
.cms-toc-level-3 {
  margin-left: 14px;
}
.cms-prose {
  font-size: 18px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.cms-prose h2,
.cms-prose h3 {
  margin-top: 48px;
  scroll-margin-top: 24px;
}
.cms-prose p,
.cms-prose ul,
.cms-prose ol {
  margin: 22px 0;
}
.cms-prose li {
  margin: 9px 0;
}
.cms-prose figure {
  margin: 32px 0;
}
.cms-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}
.cms-prose figcaption {
  font-size: 14px;
  line-height: 1.65;
  color: #645a74;
  text-align: center;
  margin-top: 12px;
}
.cms-prose blockquote {
  border-left: 5px solid #8b4ded;
  margin: 28px 0;
  padding: 8px 24px;
  background: #f1eaff;
  border-radius: 0 20px 20px 0;
}
.cms-prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.6;
  margin: 28px 0;
}
.cms-prose th,
.cms-prose td {
  border: 1px solid #d9cce9;
  padding: 12px;
  min-width: 120px;
  text-align: left;
}
.cms-prose th {
  background: #ede3ff;
}
.cms-prose pre {
  max-width: 100%;
  overflow-x: auto;
  background: #2b1946;
  color: #faf5ff;
  padding: 22px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
}
.cms-prose code {
  font-family: ui-monospace, monospace;
}
.cms-prose .cms-gf-td {
  padding: 24px;
  border: 2px solid #dbc9ff;
  background: #f3edff;
  border-radius: 24px;
}
.cms-prose .cms-hd,
.cms-prose .cms-nm {
  font-weight: 900;
}
.cms-prose .cms-fin {
  display: grid;
  gap: 8px;
}
.cms-prose .cms-ln {
  display: block;
}
.cms-prose .cms-car,
.cms-prose .cms-rail,
.cms-prose .cms-n {
  display: none;
}
.cms-prose .cms-tk {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}
.cms-prose .cms-nd {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #ded1f0;
  border-radius: 12px;
}
.cms-prose .cms-xp {
  margin-left: auto;
  white-space: nowrap;
  color: #6320ca;
  font-size: 14px;
}
.cms-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 36px;
}
.cms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.cms-card {
  background: #fff;
  padding: 28px;
  border: 1px solid #e6def0;
  border-radius: 28px;
}
.cms-card h2 {
  font-size: 28px;
  margin: 12px 0;
}
.cms-card p {
  line-height: 1.7;
}
.cms-card time {
  font-size: 14px;
  color: #645a74;
}
.cms-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 56px;
  border-top: 1px solid #e0d5ed;
}
.cms-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 18px 0;
}
.cms-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.cms-page summary {
  cursor: pointer;
  color: #6320ca;
  font-weight: 800;
}
@media (max-width: 600px) {
  .cms-header {
    margin: 12px 12px 24px;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 22px;
  }
  .cms-header img {
    width: 100px;
    height: auto;
  }
  .cms-header > a:nth-child(2) {
    font-size: 13px;
    max-width: 85px;
  }
  .cms-reading,
  .cms-archive {
    width: calc(100% - 32px);
  }
  .cms-article-header {
    padding: 16px 0;
  }
  .cms-excerpt {
    font-size: 18px;
  }
  .cms-prose {
    font-size: 17px;
  }
  .cms-toc {
    padding: 20px;
  }
  .cms-grid {
    grid-template-columns: 1fr;
  }
  .cms-card {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cms-page * {
    scroll-behavior: auto !important;
  }
}

.cms-cover {
  margin: 24px 0 36px;
}
.cms-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  border-radius: 24px;
  background: #eee5ff;
}
.cms-card .cms-cover {
  margin: 0 0 24px;
}
.cms-card .cms-cover img {
  max-height: 220px;
  border-radius: 16px;
}

html {
  scroll-behavior: auto;
}
