.cm {
  --cm-ink: #f8f2e8;
  --cm-muted: #c1b6a8;
  --cm-accent: #ffc56a;
  --cm-rule: #42382e;
  background: #100e0c;
  color: var(--cm-ink);
  font-family: var(--font-serif);
}
.cm-wrap { width: min(1180px, calc(100% - clamp(36px, 8vw, 106px))); margin-inline: auto; }
.cm-section { padding-block: clamp(65px, 9vw, 125px); }
.cm [id] { scroll-margin-top: calc(var(--header-height) + 26px); }
.cm h1, .cm h2, .cm h3 { color: inherit; text-wrap: balance; line-height: 1.08; letter-spacing: 0; margin: 0; font-weight: 600; }
.cm h1 { font-size: clamp(3.1rem, 7vw, 6rem); }
.cm h2 { font-size: clamp(2.2rem, 4.2vw, 4rem); }
.cm h3 { font-size: clamp(1.8rem, 3.2vw, 2.9rem); }
.cm p, .cm dd { color: var(--cm-muted); line-height: 1.65; text-wrap: pretty; }
.cm h1 + p, .cm h2 + p, .cm h3 + p { margin-top: 16px; max-width: 58ch; }
.cm :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.cm figure { margin: 0; }
.cm-button, .cm-link { display: inline-flex; min-height: 46px; align-items: center; gap: .55em; font-size: .94rem; font-weight: 700; }
.cm-button { padding: 9px 18px; background: var(--cm-accent); color: #201306; border-radius: 8px; }
.cm-button:hover { background: #ffdda4; color: #201306; }
.cm-link { color: var(--cm-accent); }
.cm-link:hover { text-decoration: underline; }
.cm p.cm-meta { margin-top: 14px; font: .76rem/1.55 var(--font-sans); }

.cm-hero { padding-top: calc(var(--header-height) + clamp(50px, 7vw, 106px)); padding-bottom: clamp(40px, 6vw, 92px); text-align: center; overflow: clip; background: radial-gradient(ellipse at 50% 100%, #352515, transparent 66%); }
.cm-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; font: 650 1rem var(--font-sans); }
.cm-hero h1 { max-width: 15ch; margin-inline: auto; }
.cm-hero h1 + p { max-width: 53ch; margin-inline: auto; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.cm-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 25px; }
.cm .cm-hero-art { max-width: 970px; margin: clamp(25px, 5vw, 68px) auto 0; }
.cm-hero-art img { width: 100%; height: auto; border-radius: 12px; }

.cm-split {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 28px clamp(34px, 8vw, 105px);
  align-items: start;
}
.cm-chapters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--cm-rule);
}
.cm-chapters a { padding: 15px 6px; text-align: center; font-weight: 650; }
.cm-chapters a:hover { color: var(--cm-accent); }
.cm-capture { text-align: center; padding-bottom: 0; }
.cm-capture h2 { max-width: 18ch; margin-inline: auto; }
.cm-capture p { margin-inline: auto; }
.cm-capture img { width: 100%; margin-top: clamp(26px, 4vw, 52px); border-radius: 10px; }

.cm-editorial-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 14px clamp(24px, 8vw, 100px);
  margin-bottom: clamp(24px, 5vw, 54px);
}
.cm-editorial-intro h2 + p { margin-top: 0; }
.cm-detail > img { width: 100%; }
.cm-organize { background: #211810; }
.cm-organization-spread, .cm-execution {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: 22px clamp(16px, 3vw, 40px);
  align-items: start;
}
.cm-organization-spread figure + figure { margin-top: clamp(16px, 5vw, 76px); }
.cm-organization-spread img, .cm-execution img { width: 100%; border-radius: 9px; }
.cm figcaption { margin-top: 10px; color: var(--cm-muted); line-height: 1.65; }
.cm-tour { padding-top: 0; }
.cm-tour summary { cursor: pointer; padding: 16px 0; border-block: 1px solid var(--cm-rule); font-weight: 650; }
.cm-tour-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.cm-tour-images img { width: 100%; border-radius: 8px; }

.cm-retrieve { background: #201810; }
.cm-find { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 7vw, 94px); }
.cm-find .cm-link, .cm-local .cm-link { margin-top: 12px; }
.cm-find-copy { grid-area: 1 / 2; }
.cm .cm-side-window { grid-area: 1 / 1; width: min(100%, 245px); margin-inline: auto; }
.cm-side-window img { width: 100%; height: auto; border-radius: 8px; }
.cm-shortcut { display: flex; gap: 14px; align-items: center; margin-top: 24px; max-width: 45ch; }
.cm-shortcut kbd { font: 600 1.35rem var(--font-sans); color: var(--cm-accent); border: 1px solid #836646; border-radius: 7px; padding: 8px 12px; }

.cm-template { background: #edc58b; color: #251a11; --cm-muted: #514030; padding-block: clamp(48px, 8vw, 105px); }
.cm-reuse-intro { max-width: 800px; margin-bottom: clamp(25px, 4vw, 55px); }
.cm-reuse-stage { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); align-items: center; gap: clamp(16px, 3vw, 40px); }
.cm-reuse-stage img { width: 100%; height: auto; border-radius: 8px; }
.cm-execution { align-items: center; }
.cm-execution figure { width: min(100%, 310px); margin-inline: auto; }
.cm-reuse-stage figcaption { margin-top: 9px; font-size: .87rem; }
.cm-example { padding: clamp(17px, 3vw, 33px); background: #fff0d7; border-radius: 12px; }
.cm .cm-example h3 { font-size: 1.25rem; letter-spacing: 0; }
.cm-template-source { margin-bottom: 18px; }
.cm-template-source code { color: #67431e; font-family: var(--font-sans); overflow-wrap: anywhere; }
.cm-example-fields { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px 14px; }
.cm-example label { font-size: .88rem; font-weight: 700; }
.cm-example input, .cm-example select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #876b4e;
  border-radius: 6px;
  padding: 8px;
  background: #fff8ed;
  color: #251a11;
  color-scheme: light;
  font: inherit;
}
.cm p.cm-prompt { margin-top: 18px; min-height: 5.5em; padding: 14px 0; border-top: 1px solid #b79b79; font-family: var(--font-sans); overflow-wrap: anywhere; }
.cm-example button { background: #302116; color: #fff8ed; padding: 9px 14px; min-height: 44px; border: 0; border-radius: 6px; font: inherit; cursor: pointer; }
#cm-copy-status { margin-left: 8px; font-size: .85rem; }
.cm-tools > div, .cm-guides li, .cm-faq details { border-bottom: 1px solid var(--cm-rule); }
.cm-tools > div { padding-block: 12px; }
.cm-tools dt { color: var(--cm-ink); font-weight: 700; margin-bottom: 4px; }
.cm-tools a { color: var(--cm-accent); }
.cm-guides { list-style: none; }
.cm-guides a { display: flex; justify-content: space-between; gap: 13px; }
.cm-guides a, .cm-faq summary { padding: 13px 0; min-height: 46px; font-weight: 650; }
.cm-guides a:hover, .cm-faq summary:hover { color: var(--cm-accent); }
.cm-faq summary { cursor: pointer; }
.cm-faq p { padding-bottom: 14px; }
.cm-faq p a { text-decoration: underline; }
.cm-local { background: #1a1510; }
.cm-faq, .cm-close, .cm-newsletter { border-top: 1px solid var(--cm-rule); }
.cm-close, .cm-newsletter { text-align: center; }
.cm-close p { margin-inline: auto; }
.cm-close .cm-button { margin-top: 20px; }

@media (max-width: 820px) {
  .cm-split, .cm-reuse-stage, .cm-editorial-intro, .cm-organization-spread, .cm-execution { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .cm h1 { font-size: clamp(2.7rem, 12vw, 3.1rem); }
  .cm-chapters { display: flex; flex-wrap: wrap; justify-content: space-evenly; }
  .cm-tour-images { grid-template-columns: minmax(0, 1fr); }
  .cm-find { grid-template-columns: minmax(0, 1fr); }
  .cm-find-copy, .cm .cm-side-window { grid-area: auto; }
  .cm .cm-side-window { width: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.cm) { scroll-behavior: auto; }
}
