/* 色板取自 msime.app 的设计令牌（msime-web 的 src/styles/tokens.css）。 */
:root {
  color-scheme: light dark;
  --bg: #F5FAF6;
  --panel: #FFFFFF;
  --panel-2: #E8F3EB;
  --ink: #0F2419;
  --body: #34473B;
  --muted: #5E7266;
  --accent: #1E8E4E;
  --accent-ink: #17783F;
  --accent-soft: rgba(30, 142, 78, .1);
  --accent-ring: rgba(30, 142, 78, .28);
  --btn-fg: #FFFFFF;
  --hair: rgba(23, 32, 26, .1);
  --hair-2: rgba(23, 32, 26, .18);
  --shadow: 0 1px 2px rgba(23, 32, 26, .05), 0 14px 36px rgba(23, 32, 26, .09);
  --hero-a: #DDF3E2;
  --hero-b: #9FD9B0;
  --warn: #9A5A22;
  --warn-soft: rgba(165, 100, 42, .1);
  --code-bg: #0F2419;
  --code-ink: #DDF3E2;
  --radius: 18px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* 深色：默认跟随系统；嵌入 msime.app 时由外层页面用 data-theme 指定，跟官网的主题开关一致。下面两份深色变量必须一起改。 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1712;
    --panel: #15211A;
    --panel-2: #1C2B22;
    --ink: #F1F0E9;
    --body: #C8CABF;
    --muted: #94978D;
    --accent: #7FE08E;
    --accent-ink: #8FE59C;
    --accent-soft: rgba(127, 224, 142, .12);
    --accent-ring: rgba(127, 224, 142, .3);
    --btn-fg: #14200F;
    --hair: rgba(255, 255, 255, .08);
    --hair-2: rgba(255, 255, 255, .15);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .42);
    --hero-a: #0F3A22;
    --hero-b: #16502F;
    --warn: #E3A96B;
    --warn-soft: rgba(227, 169, 107, .12);
    --code-bg: #0A110D;
    --code-ink: #C8E8CF;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #0E1712;
    --panel: #15211A;
    --panel-2: #1C2B22;
    --ink: #F1F0E9;
    --body: #C8CABF;
    --muted: #94978D;
    --accent: #7FE08E;
    --accent-ink: #8FE59C;
    --accent-soft: rgba(127, 224, 142, .12);
    --accent-ring: rgba(127, 224, 142, .3);
    --btn-fg: #14200F;
    --hair: rgba(255, 255, 255, .08);
    --hair-2: rgba(255, 255, 255, .15);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .42);
    --hero-a: #0F3A22;
    --hero-b: #16502F;
    --warn: #E3A96B;
    --warn-soft: rgba(227, 169, 107, .12);
    --code-bg: #0A110D;
    --code-ink: #C8E8CF;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background-color: var(--bg);
  color: var(--body);
}

body {
  font: 16px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 520px at 50% -160px, var(--hero-a), transparent 70%);
  background-repeat: no-repeat;
}

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

kbd, code {
  font-family: var(--mono);
  font-size: .86em;
}

kbd {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--hair-2);
  color: var(--ink);
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---- 嵌入模式：只留演练场 ---- */
/* 背景透明、内容铺满，融进 msime.app 的页面；外层页面自己有「打开完整演示」的链接和说明。 */

html[data-embed], html[data-embed] body { background: transparent; }
html[data-embed] body { background-image: none; }
html[data-embed] main { max-width: none; padding: 0; }
html[data-embed] main > :not(.playground), html[data-embed] .topbar, html[data-embed] .footer { display: none; }
html[data-embed] :is(.options-lead, .option-note) { display: none; }
html[data-embed] .demo, html[data-embed] .options { box-shadow: none; }

/* ---- 顶栏 ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
}

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

.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #252525;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.links {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

.links a { color: var(--body); }
.links a:hover { color: var(--accent-ink); text-decoration: none; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- 首屏 ---- */

.hero {
  padding: clamp(28px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .08em;
}

h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 5.2vw, 56px);
  line-height: 1.2;
  letter-spacing: -.01em;
}

.br-narrow { display: none; }

.lead {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.85;
}

/* ---- 演示卡片 ---- */

.demo {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3vw, 28px);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  border: 1px solid var(--hair);
}

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hair-2);
}

.status[data-state="ready"] .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.status[data-state="loading"] .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.status[data-state="error"] .dot { background: var(--warn); }

@keyframes pulse { 50% { opacity: .3; } }

.progress {
  height: 3px;
  margin-top: 14px;
  border-radius: 3px;
  background: var(--hair);
  overflow: hidden;
  transition: opacity .3s;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .15s;
}

.progress[data-done="true"] { opacity: 0; }

.editor-wrap {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 14px;
}

.editor {
  flex: 1;
  min-height: 220px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--hair-2);
  color: var(--ink);
  font-size: 20px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

/* 接收按键的密码框：不可见、不占位置，但能获得焦点。 */
.keysink {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.editor-wrap:focus-within .editor {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.editor .preedit {
  color: var(--accent-ink);
  text-decoration: underline dotted var(--accent);
  text-underline-offset: 5px;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin: 0 -1px;
  vertical-align: -.2em;
  background: var(--accent);
  visibility: hidden;
}

.editor-wrap:focus-within .caret { visibility: visible; animation: blink 1.06s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

.placeholder {
  position: absolute;
  top: 18px;
  left: 21px;
  right: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
  pointer-events: none;
}

.editor[data-empty="false"] + .placeholder { display: none; }

.demo-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.actions { display: inline-flex; gap: 8px; }

.actions button, .code-head button {
  padding: 6px 14px;
  border: 1px solid var(--hair-2);
  border-radius: 10px;
  background: var(--panel);
  color: var(--body);
  font: 600 13px/1.4 var(--font);
  cursor: pointer;
}

.actions button:hover, .code-head button:hover { border-color: var(--accent); color: var(--accent-ink); }

.notice {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
}

/* ---- 首屏数据 ---- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 860px;
  margin: 40px auto 0;
}

.stats div {
  padding: 16px 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border: 1px solid var(--hair);
  backdrop-filter: blur(6px);
}

.stats dt {
  color: var(--accent-ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---- 按钮 ---- */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font: 600 15px/1.4 var(--font);
  cursor: pointer;
}

.btn:hover { text-decoration: none; border-color: var(--accent); }

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--btn-fg);
}

.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { cursor: progress; opacity: .6; }

/* ---- 演练场 ---- */

/* 左侧卡片拉到和选项栏一样高，多出来的高度给输入区。 */
.playground {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
  scroll-margin-top: 16px;
}

.demo-title {
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
}

.options {
  padding: 22px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow);
}

.options h2 { margin: 0; color: var(--ink); font-size: 17px; }
.options-lead { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.option { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }

.option-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}

.option-head code { font-size: 12px; }

.option-note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.option-note:empty { display: none; }

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--panel-2);
}

.segmented button {
  flex: 1;
  padding: 6px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--body);
  font: 600 13px/1.4 var(--font);
  white-space: nowrap;
  cursor: pointer;
}

.segmented button:hover { color: var(--ink); }

.segmented button[aria-checked="true"] {
  background: var(--panel);
  color: var(--accent-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.segmented button:disabled, .switch input:disabled + span { cursor: progress; opacity: .55; }

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--body);
  font-size: 13.5px;
  cursor: pointer;
}

.switch input {
  appearance: none;
  position: relative;
  flex: none;
  width: 36px;
  height: 21px;
  margin: 0;
  border-radius: 21px;
  background: var(--hair-2);
  cursor: pointer;
  transition: background-color .15s;
}

.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  transition: transform .15s;
}

.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(15px); }
.switch input:disabled { cursor: not-allowed; opacity: .5; }

/* 皮肤色块：底色加一条高亮色，名字在下面。 */
.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.swatches button {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 6px 2px 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--body);
  font: 500 11.5px/1.3 var(--font);
  cursor: pointer;
}

.swatches button:hover { background: var(--panel-2); }
.swatches button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.swatch {
  position: relative;
  width: 100%;
  max-width: 48px;
  height: 26px;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px var(--hair-2);
}

.swatch i {
  position: absolute;
  left: 5px;
  right: 14px;
  top: 9px;
  height: 8px;
  border-radius: 3px;
}

.option-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---- 皮肤画廊 ---- */

.gallery { scroll-margin-top: 16px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-grid button {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.gallery-grid button:hover { border-color: var(--accent-ring); transform: translateY(-2px); box-shadow: var(--shadow); }
.gallery-grid button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.gallery-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; font-size: 15px; }
.gallery-name code { font-size: 11.5px; }

/* 缩略图：按 resolveSkin 解析出的配色和圆角画一个静态候选框。 */
.thumb-stage {
  display: grid;
  place-items: center;
  height: 112px;
  border-radius: 12px;
  background: repeating-conic-gradient(var(--panel-2) 0 25%, transparent 0 50%) 0 0 / 14px 14px;
}

.thumb {
  position: relative;
  overflow: hidden;
  min-width: 176px;
  padding: 7px 8px 8px;
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  background: var(--t-bg);
  color: var(--t-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
  font-size: 14px;
  line-height: 1.5;
}

.thumb[data-decorated="true"] { margin-top: 18px; overflow: visible; }

.thumb .t-bg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: fill; pointer-events: none; }
.thumb .t-deco { position: absolute; right: 6px; top: -22px; width: 44px; pointer-events: none; }

.thumb .t-preedit { position: relative; padding: 0 4px 3px; font-size: 12px; opacity: .9; }

.thumb .t-row { position: relative; display: flex; gap: 2px; }

.thumb .t-row span {
  position: relative;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.thumb .t-row b { margin-right: 2px; color: var(--t-num); font-size: 11px; font-weight: 400; }

.thumb .t-row .on { background: var(--t-selected); color: var(--t-selected-text); }
.thumb .t-row .on b { color: var(--t-selected-num); }
.thumb .t-row .on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 2.5px;
  border-radius: 2px;
  background: var(--t-accent);
  display: var(--t-bar, block);
}

/* ---- 分区标题 ---- */

.section-head { margin: clamp(48px, 7vw, 80px) 0 18px; }

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 2.6vw, 28px);
}

.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }

/* ---- 接入代码与引擎状态 ---- */

.dev { scroll-margin-top: 16px; }

.dev-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.tabs { display: flex; gap: 4px; }

.tabs button {
  padding: 5px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .6);
  font: 600 13px/1.4 var(--font);
  cursor: pointer;
}

.tabs button:hover { color: #fff; }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: #fff; }

.code-head .copy {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .8);
  font: 600 13px/1.4 var(--font);
  cursor: pointer;
}

.code-note {
  margin: 0;
  padding: 12px 18px 0;
  color: rgba(255, 255, 255, .6);
  font-size: 13px;
  line-height: 1.7;
}

.code-note:empty { display: none; }

.inspector { display: grid; gap: 16px; }

.inspector-block {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--hair);
}

.inspector h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.facts { display: grid; gap: 6px; margin: 0; font-size: 13.5px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); font-family: var(--mono); font-size: 12.5px; text-align: right; }

.frame {
  max-height: 300px;
  margin: 0;
  overflow: auto;
  color: var(--body);
  font: 12px/1.6 var(--mono);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---- 看它打字 ---- */

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
}

.examples-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chips button {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font: 600 13.5px/1.4 var(--font);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.chips button:hover { border-color: var(--accent); background: var(--accent-soft); }
.chips button:disabled { cursor: progress; opacity: .55; }
.chips button[data-playing="true"] { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }

.chips code {
  padding: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.hint .typing { color: var(--accent-ink); font-family: var(--mono); }
.hint .typing b { padding: 0 2px; border-radius: 4px; background: var(--accent); color: var(--btn-fg); font-weight: 600; }

/* ---- 按键 ---- */

.key-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--hair);
  border: 1px solid var(--hair);
}

.key-grid > div {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--panel);
  font-size: 14.5px;
}

.key-grid .k {
  flex: none;
  min-width: 150px;
  color: var(--muted);
}

/* ---- 常见问题 ---- */

.faq details {
  border-bottom: 1px solid var(--hair);
}

.faq details:first-of-type { border-top: 1px solid var(--hair); }

.faq summary {
  position: relative;
  padding: 16px 32px 16px 2px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 12px;
  color: var(--accent-ink);
  font-size: 22px;
  font-weight: 400;
  transition: transform .2s;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  margin: 0;
  padding: 0 2px 18px;
  font-size: 15px;
}

/* ---- 特性 ---- */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
}

.features article {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--hair);
}

.features h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.features p { margin: 8px 0 0; font-size: 15px; }

/* ---- 接入 ---- */

.integrate { margin-top: clamp(40px, 6vw, 72px); }

.integrate h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(22px, 2.6vw, 28px);
}

.code {
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}

.code-head button {
  background: transparent;
  border-color: rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .8);
}

.code pre {
  margin: 0;
  padding: 16px 18px 20px;
  overflow-x: auto;
  color: var(--code-ink);
  font: 14px/1.7 var(--mono);
}

.code pre code { padding: 0; background: none; color: inherit; font-size: inherit; }

/* Prism 的高亮配色，配代码面板的深色底，沿用水杉绿系。 */
.code .token.comment { color: #7E9886; font-style: italic; }
.code .token.keyword, .code .token.boolean, .code .token.important { color: #7FE08E; }
.code .token.string, .code .token.attr-value, .code .token.template-string { color: #F2C97D; }
.code .token.function, .code .token.class-name, .code .token.builtin { color: #8FD3FF; }
.code .token.number { color: #D7A8FF; }
.code .token.property, .code .token.attr-name, .code .token.parameter, .code .token.literal-property { color: #FFB38A; }
.code .token.tag { color: #FF9C8F; }
.code .token.punctuation, .code .token.operator { color: #9FB5A3; }

.more { margin: 14px 0 0; font-size: 15px; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  max-width: 1040px;
  margin: clamp(48px, 7vw, 88px) auto 0;
  padding: 24px;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 13px;
}

.footer a { color: var(--muted); }

@media (max-width: 980px) {
  .playground, .dev-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  .links { gap: 14px; font-size: 14px; }
  .br-narrow { display: inline; }
  .segmented button { padding: 7px 4px; font-size: 13px; }
  .key-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-grid .k { min-width: 110px; }
}
