:root {
  --paper: #f2ede3;
  --paper-deep: #ebe4d7;
  --surface: #fffdf8;
  --surface-soft: #faf6ed;
  --ink: #1f2933;
  --ink-soft: #3c4854;
  --muted: #75808a;
  --line: #ded6c7;
  --line-strong: #c9bfad;
  --accent: #0f766e;
  --accent-deep: #0b5b55;
  --accent-soft: #e4f2ef;
  --gold: #b17b2c;
  --gold-soft: #fbf2df;
  --code: #18222c;
  --code-head: #111a22;
  --code-text: #e8eef4;
  --shadow: 0 1px 2px rgba(43, 35, 20, .04), 0 22px 60px -38px rgba(43, 35, 20, .38);
  --radius: 18px;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 16% -8%, rgba(177, 123, 44, .10), transparent 32rem),
    radial-gradient(circle at 104% 12%, rgba(15, 118, 110, .07), transparent 34rem),
    repeating-linear-gradient(0deg, rgba(77, 58, 30, .018) 0 1px, transparent 1px 4px);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
svg { display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(201, 191, 173, .7);
  background: rgba(255, 253, 248, .88);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; min-width: 190px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #143f3b, #0b2926);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 12px rgba(15, 60, 55, .18);
  color: #e7c77e;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.5px;
}
.brand-copy { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand-name { display: block; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-sub { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.brand-badge {
  margin-left: 2px; padding: 2px 7px; border-radius: 999px;
  background: var(--gold-soft); border: 1px solid #ead6b3;
  color: #8a5a17; font-size: 10px; font-weight: 700; letter-spacing: .04em;
}

.topnav { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.topnav a {
  padding: 8px 11px; border-radius: 8px;
  color: #53606b; font-size: 13px; transition: background .16s, color .16s;
}
.topnav a:hover { background: #f1ece1; color: var(--ink); }
.topnav a.active { color: var(--accent-deep); background: var(--accent-soft); font-weight: 600; }

.search-wrap {
  position: relative;
  flex: 1 1 420px;
  max-width: 520px;
  margin: 0 auto;
}
.search-wrap svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #8a938f;
}
.search-input {
  width: 100%; height: 38px; padding: 0 72px 0 38px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(250, 247, 239, .78);
  color: var(--ink); font-size: 13px;
  outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
.search-input::placeholder { color: #98a09d; }
.search-input:focus {
  border-color: #8fc1b9; background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .10);
}
.search-key {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  padding: 3px 7px; border: 1px solid var(--line); border-bottom-color: var(--line-strong);
  border-radius: 5px; background: #fffdf8; color: #8a938f;
  font-size: 10px; letter-spacing: .04em;
}

.top-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.version-select {
  height: 32px; display: flex; align-items: center; gap: 7px;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf8; color: #53606b; font-size: 12px;
}
.version-select b { color: var(--accent-deep); font-weight: 700; }
.qq-btn {
  height: 32px; display: inline-flex; align-items: center; gap: 7px;
  padding: 0 12px; border-radius: 8px;
  background: var(--ink); color: #fffdf8; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 10px rgba(31, 41, 51, .14);
}
.qq-btn:hover { background: #111a22; }

.shell {
  width: min(1560px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 232px;
  align-items: start;
}

/* ---------------- sidebar ---------------- */
.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow: auto;
  padding: 24px 17px 28px;
  border-right: 1px solid rgba(201, 191, 173, .72);
  scrollbar-width: thin;
  scrollbar-color: #cfc5b3 transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #cfc5b3; border-radius: 99px; }

.side-head { display: flex; align-items: end; justify-content: space-between; margin: 0 5px 15px; }
.side-title { font-size: 11px; font-weight: 700; color: #68736f; letter-spacing: .14em; text-transform: uppercase; }
.side-total { font-size: 10.5px; color: #98a09b; }

.side-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  margin: 0 2px 18px; padding: 3px; border-radius: 9px;
  background: rgba(228, 221, 207, .6); border: 1px solid rgba(201, 191, 173, .55);
}
.side-tabs button {
  border: 0; background: transparent; border-radius: 7px; padding: 6px 8px;
  font-size: 11.5px; color: #77817b; cursor: pointer;
}
.side-tabs button.active {
  background: #fffdf8; color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(60, 48, 28, .06);
}

.side-filter {
  width: 100%; height: 31px; margin: 0 0 16px;
  padding: 0 10px; border: 1px solid rgba(201, 191, 173, .65); border-radius: 7px;
  background: rgba(255, 253, 248, .55); color: var(--ink); font-size: 11.5px;
  outline: none;
}
.side-filter::placeholder { color: #9aa19c; }
.side-filter:focus { border-color: #9bc8c1; background: #fffdf8; }

.tree-group { margin: 0 0 4px; }
.tree-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 8px; border: 0; border-radius: 7px;
  background: transparent; color: #3c4854; font-size: 12.5px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.tree-head:hover { background: rgba(255, 253, 248, .65); }
.tree-head .chev { width: 12px; height: 12px; color: #8c958f; transition: transform .16s; }
.tree-group.open .tree-head .chev { transform: rotate(90deg); }
.tree-head .t-name { flex: 1; }
.tree-head .t-count {
  min-width: 22px; height: 18px; padding: 0 6px; border-radius: 99px;
  display: inline-grid; place-items: center;
  background: rgba(201, 191, 173, .35); color: #7b857e;
  font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
}
.tree-group.open .tree-head .t-count { background: var(--accent-soft); color: var(--accent-deep); }

.tree-list { display: none; margin: 1px 0 8px 17px; padding-left: 10px; border-left: 1px solid rgba(201, 191, 173, .62); }
.tree-group.open .tree-list { display: block; }
.tree-list a {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; margin: 1px 0; border-radius: 6px;
  color: #66716b; font-size: 11.8px; line-height: 1.45;
}
.tree-list a:hover { color: var(--ink); background: rgba(255, 253, 248, .75); }
.tree-list a.active {
  color: var(--accent-deep); background: var(--accent-soft);
  font-weight: 600; box-shadow: inset 2px 0 0 var(--accent);
}
.tree-list a .dot { width: 3px; height: 3px; border-radius: 50%; background: #b5ada0; flex: 0 0 auto; }
.tree-list a.active .dot { background: var(--accent); }

.side-note {
  margin: 18px 2px 0; padding: 12px 13px;
  border: 1px solid rgba(201, 191, 173, .65); border-radius: 10px;
  background: rgba(255, 253, 248, .55);
}
.side-note .k { font-size: 9.5px; color: #8d968f; letter-spacing: .12em; text-transform: uppercase; }
.side-note .v { margin-top: 3px; font-size: 11.5px; color: #4d5a53; line-height: 1.6; }
.side-note .v b { color: var(--accent-deep); }

/* ---------------- main ---------------- */
.main { min-width: 0; padding: 24px 28px 80px; }

.article {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  padding: 39px 52px 44px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.article::after {
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid rgba(201, 191, 173, .26);
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}

.kicker {
  display: flex; align-items: center; gap: 9px;
  margin: 25px 0 8px;
  color: var(--accent-deep); font-size: 10.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--gold); }

h1 {
  margin: 0;
  color: #16232a;
  font-size: 36px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.03em;
}

.lead {
  margin: 13px 0 0;
  color: #5f6b73;
  font-size: 15.5px;
  line-height: 1.85;
}

.meta-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 20px 0 0; padding-bottom: 23px;
  border-bottom: 1px solid #ece5d8;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px; border-radius: 6px;
  background: #f6f1e7; border: 1px solid #e8dfcf;
  color: #6e7a72; font-size: 10.5px;
}
.pill strong { color: #3f4d45; font-weight: 700; }
.pill.accent { background: var(--accent-soft); border-color: #cfe8e3; color: var(--accent-deep); }

.article p { margin: 0 0 13px; color: #47545d; }
.article p strong { color: #1f2d35; }

h2 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 34px 0 13px;
  padding-top: 20px;
  border-top: 1px solid #eee8dc;
  color: #202e36;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -.015em;
}
h2 .num {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
}
h3 { margin: 22px 0 9px; color: #2a3840; font-size: 15.5px; }

.callout {
  display: flex; gap: 12px;
  margin: 20px 0 22px; padding: 14px 16px;
  border: 1px solid #ecdfc6; border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: #fcf7ec;
  color: #665a45; font-size: 12.5px; line-height: 1.75;
}
.callout svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; color: var(--gold); }
.callout b { color: #4b3f2a; }

.code-card {
  margin: 16px 0 22px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--code);
  box-shadow: 0 12px 24px -18px rgba(15, 30, 38, .6);
}
.code-head {
  display: flex; align-items: center; gap: 8px;
  height: 35px; padding: 0 13px;
  background: var(--code-head);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.code-dots { display: flex; gap: 4px; margin-right: 4px; }
.code-dots i { width: 6px; height: 6px; border-radius: 50%; background: #43515b; }
.code-dots i:nth-child(1) { background: #a45b4c; }
.code-dots i:nth-child(2) { background: #a8844e; }
.code-dots i:nth-child(3) { background: #4f8175; }
.code-label { color: #8fa2ae; font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.code-copy {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 5px;
  background: rgba(255, 255, 255, .04); color: #a9b8c1;
  padding: 3px 7px; font-size: 10px; cursor: pointer;
}
.code-copy:hover { color: #fff; border-color: rgba(255, 255, 255, .24); }
.code-body {
  margin: 0; padding: 16px 18px 18px;
  overflow-x: auto;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  white-space: pre;
  tab-size: 4;
}
.code-body .c { color: #6f8f99; }
.code-body .k { color: #e5c07b; }
.code-body .s { color: #98c379; }
.code-body .p { color: #7cc7bc; }

.table-wrap { margin: 16px 0 22px; border: 1px solid #e7dfd1; border-radius: 10px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  padding: 10px 13px; text-align: left;
  background: #f8f3e9; color: #6f7a72;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid #e5dbca;
}
td { padding: 11px 13px; border-bottom: 1px solid #eee7db; color: #536068; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td code, p code, li code {
  padding: 1px 5px; border-radius: 4px;
  background: #f3ede2; border: 1px solid #e8dece;
  color: #7b4f1f; font-family: var(--mono); font-size: .92em;
}

.example {
  margin: 15px 0;
  padding: 15px 16px;
  border: 1px solid #e8e0d2;
  border-radius: 10px;
  background: #fcf9f2;
}
.example-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.example-no {
  width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 10px; font-weight: 700;
}
.example-title { font-size: 12.5px; font-weight: 700; color: #39474f; }
.example-desc { margin: 1px 0 8px; color: #6b7770; font-size: 12px; }
.example-code {
  display: block; padding: 9px 11px; border-radius: 7px;
  background: #fffdf8; border: 1px solid #e9e0d1;
  color: #3f5f59; font-family: var(--mono); font-size: 11.5px;
  overflow-x: auto; white-space: pre;
}

ul.clean { margin: 8px 0 18px; padding: 0 0 0 1.15em; color: #536068; }
ul.clean li { margin: 5px 0; }
ul.clean li::marker { color: var(--gold); }

.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 13px 0 26px; }
.related a {
  display: block; padding: 12px 13px;
  border: 1px solid #e6ddce; border-radius: 9px;
  background: #fffdf8;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.related a:hover { border-color: #b9d8d2; transform: translateY(-1px); box-shadow: 0 7px 16px -14px rgba(15, 80, 70, .7); }
.related .r-k { font-size: 9px; color: #a18f6e; letter-spacing: .12em; text-transform: uppercase; }
.related .r-t { margin-top: 3px; color: #34434a; font-size: 12.5px; font-weight: 700; }
.related .r-d { margin-top: 2px; color: #8a938f; font-size: 10.5px; }

.pager {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid #eee7db;
}
.pager a {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px; border: 1px solid #e8dfd0; border-radius: 9px;
  background: #fffdf8;
}
.pager a:hover { border-color: #b9d8d2; }
.pager .dir { color: #9a8a6e; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; }
.pager .name { color: #34434a; font-size: 12.5px; font-weight: 700; }
.pager .next { text-align: right; }

.article-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 15px; border-top: 1px solid #eee7db;
  color: #99a19b; font-size: 10.5px;
}
.helpful { display: flex; align-items: center; gap: 7px; }
.helpful button {
  border: 1px solid #e4dbcb; border-radius: 6px; background: #fffdf8;
  padding: 4px 9px; color: #6e7a72; font-size: 10.5px; cursor: pointer;
}
.helpful button:hover { border-color: #b9d8d2; color: var(--accent-deep); }

/* ---------------- right rail ---------------- */
.rail {
  position: sticky;
  top: 64px;
  padding: 28px 20px 40px 4px;
  height: calc(100vh - 64px);
  overflow: auto;
}
.rail-card {
  margin-bottom: 16px; padding: 15px 15px 14px;
  border: 1px solid rgba(201, 191, 173, .72);
  border-radius: 10px;
  background: rgba(255, 253, 248, .56);
}
.rail-title {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 10px; color: #6f7b72;
  font-size: 9.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
}
.rail-title svg { width: 13px; height: 13px; color: #9b8a6d; }
.toc { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 1px 0; }
.toc a {
  display: block; padding: 5px 8px; border-left: 2px solid transparent;
  color: #7b857f; font-size: 11px; line-height: 1.5;
}
.toc a:hover { color: var(--ink); background: rgba(255, 253, 248, .7); }
.toc a.active { color: var(--accent-deep); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.quick-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed rgba(201, 191, 173, .55);
  color: #5e6b64; font-size: 11px;
}
.quick-link:last-child { border-bottom: 0; }
.quick-link:hover { color: var(--accent-deep); }
.quick-link .q-ico {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: #f4eee2; border: 1px solid #e7ddcc; color: #9a7a45;
}
.quick-link .q-ico svg { width: 12px; height: 12px; }
.quick-link .q-name { flex: 1; }
.quick-link .q-count { color: #a5aaa4; font-size: 9.5px; }

.rail-version { display: flex; align-items: center; gap: 9px; }
.rail-version .v-mark {
  width: 31px; height: 31px; border-radius: 8px;
  display: grid; place-items: center;
  background: #143f3b; color: #e7c77e;
  font-family: var(--serif); font-size: 11px; font-weight: 700;
}
.rail-version .v-name { color: #43514a; font-size: 11.5px; font-weight: 700; }
.rail-version .v-sub { color: #99a19b; font-size: 9.5px; }
.rail-note { margin-top: 10px; color: #8d968f; font-size: 10px; line-height: 1.6; }
.rail-note b { color: #617068; }

/* progress */
.progress {
  position: fixed; top: 63px; left: 0; z-index: 70;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  transition: width .12s linear;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 250px minmax(0, 1fr); }
  .rail { display: none; }
  .article { padding: 34px 40px 40px; }
}

@media (max-width: 900px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .topnav { display: none; }
  .brand { min-width: 0; }
  .brand-sub { display: none; }
  .top-actions .version-select { display: none; }
  .search-wrap { max-width: none; }
  .shell { display: block; }
  .sidebar {
    position: fixed; z-index: 55; top: 64px; left: 0; bottom: 0;
    width: 280px; height: auto;
    background: #f6f1e8;
    box-shadow: 22px 0 40px -28px rgba(30, 24, 12, .5);
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .main { padding: 18px 15px 50px; }
  .article { padding: 27px 22px 30px; border-radius: 0 0 14px 14px; }
  h1 { font-size: 29px; }
  .lead { font-size: 14.5px; }
  .related { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .article-foot { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .topbar { height: 58px; gap: 8px; padding: 0 10px; }
  .brand { min-width: 0; gap: 0; }
  .brand-copy, .brand-badge { display: none; }
  .qq-btn {
    width: 34px; padding: 0; justify-content: center;
    font-size: 0; gap: 0;
  }
  .qq-btn svg { width: 14px; height: 14px; }
  .search-wrap { flex: 1 1 auto; min-width: 0; }
  .search-input { height: 34px; padding: 0 10px 0 32px; font-size: 12px; }
  .search-wrap svg { left: 10px; width: 14px; height: 14px; }
  .search-key { display: none; }
  .main { width: 100%; padding: 12px 9px 34px; }
  .article { width: 100%; padding: 23px 17px 26px; }
  h1 { font-size: 26px; }
  .meta-row { gap: 5px; }
  .pill { height: 22px; font-size: 9.5px; }
  .code-body { font-size: 11px; padding: 13px 12px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 540px; }
}

/* mobile menu button */
.menu-btn {
  display: none; width: 34px; height: 34px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf8; color: #5f6b64; cursor: pointer;
}
.menu-btn svg { width: 16px; height: 16px; margin: auto; }
@media (max-width: 900px) { .menu-btn { display: grid; } }

/* ---------------- category / branch cards ---------------- */
.tree-sub {
  margin: 2px 0 6px 12px;
  padding-left: 9px;
  border-left: 1px solid rgba(201, 191, 173, .62);
}
.tree-sub a {
  padding-top: 3px;
  padding-bottom: 3px;
  color: #7d8880;
  font-size: 11.2px;
}
.tree-sub a:hover { color: var(--ink); }
.tree-badge {
  margin-left: auto;
  min-width: 17px;
  height: 16px;
  padding: 0 5px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  background: rgba(201, 191, 173, .38);
  color: #7b857e;
  font-size: 9px;
  font-weight: 700;
}
.tree-list > a.active .tree-badge { background: rgba(15, 118, 110, .12); color: var(--accent-deep); }

.category-article { max-width: 884px; }
.category-article h1 { font-size: 38px; }
.category-lead { max-width: 740px; }

.branch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 26px;
}
.branch-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  border: 1px solid #e4dccd;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: 0 1px 1px rgba(50, 40, 20, .02);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.branch-card:hover {
  border-color: #b9d8d2;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -22px rgba(15, 80, 70, .8);
}
.branch-head { display: flex; align-items: flex-start; gap: 9px; }
.branch-no {
  flex: 0 0 auto;
  width: 23px; height: 23px; border-radius: 6px;
  display: grid; place-items: center;
  background: #f4eee2; border: 1px solid #e5d9c5;
  color: #9a7a45; font-family: var(--serif); font-size: 10px; font-weight: 700;
}
.branch-title-wrap { min-width: 0; flex: 1; }
.branch-title {
  margin: 0;
  color: #25333b;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 750;
}
.branch-desc {
  margin: 4px 0 0;
  color: #7a857e;
  font-size: 11px;
  line-height: 1.55;
}
.branch-link {
  flex: 0 0 auto;
  color: #9b8a6e;
  font-size: 10px;
  padding-top: 3px;
}
.branch-link:hover { color: var(--accent-deep); }
.branch-syntax {
  display: block;
  margin: 10px 0 11px;
  padding: 7px 8px;
  border: 1px solid #ece3d4;
  border-radius: 6px;
  background: #faf6ed;
  color: #557069;
  font-family: var(--mono);
  font-size: 10.2px;
  line-height: 1.55;
  white-space: nowrap;
  overflow-x: auto;
}
.mini-demo {
  margin-top: auto;
  padding: 9px 10px 8px;
  border: 1px dashed #e1d6c3;
  border-radius: 8px;
  background: #fcf9f2;
}
.mini-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 7px;
}
.mini-label { color: #a18f6e; font-size: 8.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.mini-state {
  color: #6d7971; font-size: 9.5px;
  padding: 2px 6px; border-radius: 4px;
  background: #f3ede2;
}
.mini-flow { display: flex; align-items: center; gap: 6px; }
.mini-condition {
  flex: 1; color: #5f6b64; font-size: 10.2px; line-height: 1.4;
}
.mini-arrow { color: #b8ad99; font-family: var(--mono); font-size: 11px; }
.mini-result {
  flex: 1; color: var(--accent-deep); font-size: 10.2px; font-weight: 600; line-height: 1.4;
}
.mini-result.false { color: #8a938f; font-weight: 500; }
.demo-toggle {
  margin-top: 8px; width: 100%;
  padding: 4px 7px;
  border: 1px solid #e4dac9; border-radius: 5px;
  background: #fffdf8; color: #8a7b62;
  font-size: 9.2px; cursor: pointer;
}
.demo-toggle:hover { border-color: #b9d8d2; color: var(--accent-deep); }

/* detail hero demo */
.demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
  align-items: center;
  margin: 22px 0 24px;
  padding: 20px 21px;
  border: 1px solid #dcd2c1;
  border-radius: 14px;
  background:
    radial-gradient(circle at 88% 15%, rgba(15, 118, 110, .10), transparent 15rem),
    #fbf7ee;
}
.demo-copy { min-width: 0; }
.demo-eyebrow {
  color: #a18f6e; font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
}
.demo-title { margin: 5px 0 5px; color: #223039; font-size: 20px; line-height: 1.35; }
.demo-desc { margin: 0 0 12px; color: #6d7971; font-size: 12px; line-height: 1.65; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-btn {
  padding: 5px 10px;
  border: 1px solid #dfd5c4; border-radius: 6px;
  background: #fffdf8; color: #786c57;
  font-size: 10.5px; cursor: pointer;
}
.demo-btn:hover { border-color: #b9d8d2; color: var(--accent-deep); }
.demo-btn.active { background: var(--accent-soft); border-color: #bfe0da; color: var(--accent-deep); font-weight: 600; }
.demo-status {
  margin-top: 11px; padding: 8px 10px;
  border-left: 2px solid var(--accent);
  background: rgba(228, 242, 239, .6);
  color: #3e5f58; font-size: 11px; line-height: 1.55;
}
.demo-status.false { border-left-color: #b8ad99; background: #f3eee4; color: #7c7669; }

.radar {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, #f9f5ec 0 36%, #f4efe3 37% 100%);
  border: 1px solid #d8cdb9;
  box-shadow: inset 0 0 0 9px rgba(255, 253, 248, .55);
  overflow: hidden;
}
.radar::before, .radar::after {
  content: ""; position: absolute; background: #d8cdb9;
}
.radar::before { left: 50%; top: 10%; bottom: 10%; width: 1px; opacity: .6; }
.radar::after { top: 50%; left: 10%; right: 10%; height: 1px; opacity: .6; }
.radar-ring { position: absolute; border: 1px solid #d8cdb9; border-radius: 50%; opacity: .65; }
.radar-ring.r1 { inset: 26px; }
.radar-ring.r2 { inset: 58px; }
.radar-ring.r3 { inset: 86px; }
.radar-center {
  position: absolute; left: 50%; top: 50%; width: 9px; height: 9px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}
.radar-dot {
  position: absolute; left: 73%; top: 30%; width: 9px; height: 9px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: #b17b2c; box-shadow: 0 0 0 5px rgba(177, 123, 44, .13);
  transition: left .2s, top .2s, opacity .2s;
}
.radar-dot.none { left: 87%; top: 78%; opacity: .25; }
.radar-label {
  position: absolute; right: 12px; bottom: 10px;
  color: #a1937d; font-family: var(--mono); font-size: 9px;
}
.radar-tag {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, 18px);
  white-space: nowrap; color: #8c7c63; font-size: 9px;
}

.branch-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 13px 0 24px; }
.branch-links a { display: block; padding: 11px 12px; border: 1px solid #e6ddce; border-radius: 9px; background: #fffdf8; }
.branch-links a:hover { border-color: #b9d8d2; }
.branch-links .b-k { color: #a18f6e; font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; }
.branch-links .b-t { margin-top: 2px; color: #34434a; font-size: 12px; font-weight: 700; }

@media (max-width: 760px) {
  .branch-grid, .branch-links { grid-template-columns: 1fr; }
  .demo-hero { grid-template-columns: 1fr; }
  .radar { width: 170px; height: 170px; }
}

@media print {
  .topbar, .sidebar, .rail, .progress, .menu-btn { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .article { border: 0; box-shadow: none; max-width: none; }
}

/* ============================================================
   WordPress integration
   ============================================================ */

/* top navigation from wp_nav_menu */
.topnav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topnav li { position: relative; margin: 0; padding: 0; }
.topnav li a { display: block; }
.topnav li.current-menu-item > a,
.topnav li.current_page_item > a,
.topnav li.current-menu-ancestor > a {
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-weight: 600;
}
.topnav .sub-menu {
  position: absolute;
  z-index: 80;
  top: 100%;
  left: 0;
  min-width: 180px;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 12px 30px -18px rgba(30, 24, 12, .5);
}
.topnav li:hover > .sub-menu { display: block; }
.topnav .sub-menu li a { white-space: nowrap; }

/* search form */
.search-form { position: relative; width: 100%; margin: 0; }
.search-form label { display: block; margin: 0; }
.search-submit {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* docs sidebar menu */
.docs-menu-list,
.docs-menu-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs-menu-list > li { margin: 1px 0; }
.docs-menu-list a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  margin: 1px 0;
  border-radius: 6px;
  color: #66716b;
  font-size: 11.8px;
  line-height: 1.45;
}
.docs-menu-list a:hover { color: var(--ink); background: rgba(255, 253, 248, .75); }
.docs-menu-list .current-menu-item > a,
.docs-menu-list .current_page_item > a,
.docs-menu-list .current-menu-ancestor > a,
.docs-menu-list .current-menu-parent > a {
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.docs-menu-list ul {
  margin: 2px 0 7px 12px;
  padding-left: 9px;
  border-left: 1px solid rgba(201, 191, 173, .62);
}
.docs-menu-list ul a { font-size: 11.2px; color: #7d8880; }
.docs-menu-list ul a:hover { color: var(--ink); }

/* category cards / archive */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 26px;
}
.post-card {
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  border: 1px solid #e4dccd;
  border-radius: 12px;
  background: #fffdf8;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.post-card:hover {
  border-color: #b9d8d2;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -22px rgba(15, 80, 70, .8);
}
.post-card h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.4; }
.post-card h3 a { color: #25333b; }
.post-card h3 a:hover { color: var(--accent-deep); }
.post-card .card-desc { margin: 0 0 9px; color: #7a857e; font-size: 11px; line-height: 1.55; }
.post-card .card-syntax {
  display: block; margin: 0 0 10px; padding: 7px 8px;
  border: 1px solid #ece3d4; border-radius: 6px;
  background: #faf6ed; color: #557069;
  font-family: var(--mono); font-size: 10.2px; line-height: 1.55;
  white-space: nowrap; overflow-x: auto;
}
.post-card .card-link { margin-top: auto; color: var(--accent-deep); font-size: 10.5px; font-weight: 600; }

.archive-header { margin-bottom: 6px; }
.archive-header .kicker { margin-top: 0; }
.archive-header h1 { margin-bottom: 10px; }
.archive-meta { color: #8a938f; font-size: 11px; }
.archive-description { margin: 10px 0 0; color: #5f6b73; font-size: 13px; line-height: 1.75; }
.no-results { padding: 30px 0; color: #6d7971; }

/* pagination */
.pagination {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 24px 0 8px; padding-top: 18px;
  border-top: 1px solid #eee7db;
}
.pagination .page-numbers {
  min-width: 28px; height: 28px; padding: 0 8px;
  display: inline-grid; place-items: center;
  border: 1px solid #e4dbcb; border-radius: 6px;
  background: #fffdf8; color: #69756d; font-size: 11px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  border-color: #b9d8d2; background: var(--accent-soft); color: var(--accent-deep);
}

/* entry content */
.entry-content { color: #47545d; font-size: 15px; line-height: 1.85; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 13px; }
.entry-content h2 {
  scroll-margin-top: 90px;
  display: flex; align-items: baseline; gap: 10px;
  margin: 34px 0 13px; padding-top: 20px;
  border-top: 1px solid #eee8dc;
  color: #202e36; font-size: 20px; line-height: 1.4;
}
.entry-content h3 { margin: 24px 0 9px; color: #2a3840; font-size: 16px; }
.entry-content h4 { margin: 20px 0 8px; color: #34434a; font-size: 14px; }
.entry-content ul, .entry-content ol { margin: 8px 0 18px; padding-left: 1.35em; }
.entry-content li { margin: 5px 0; }
.entry-content li::marker { color: var(--gold); }
.entry-content a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--gold); }
.entry-content blockquote {
  margin: 18px 0; padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: #fcf7ec; color: #665a45;
}
.entry-content img { max-width: 100%; height: auto; border-radius: 8px; }
.entry-content hr { border: 0; border-top: 1px solid #eee7db; margin: 26px 0; }
.entry-content table {
  width: 100%; margin: 16px 0 22px;
  border-collapse: collapse; font-size: 12.5px;
  border: 1px solid #e7dfd1;
}
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid #eee7db; text-align: left; vertical-align: top; }
.entry-content th { background: #f8f3e9; color: #6f7a72; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content :not(pre) > code {
  padding: 1px 5px; border-radius: 4px;
  background: #f3ede2; border: 1px solid #e8dece;
  color: #7b4f1f; font-family: var(--mono); font-size: .92em;
}
.entry-content pre {
  margin: 16px 0 22px; padding: 16px 18px;
  border-radius: 10px; overflow-x: auto;
  background: var(--code); color: var(--code-text);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.9;
}
.entry-content pre code { background: transparent; border: 0; color: inherit; padding: 0; font-size: inherit; }
.code-shell { position: relative; margin: 16px 0 22px; }
.code-shell pre { margin: 0; }
.code-copy-btn {
  position: absolute; top: 8px; right: 9px;
  padding: 3px 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 5px;
  background: rgba(17,26,34,.8); color: #c6d2d8; font-size: 10px; cursor: pointer;
}
.code-copy-btn:hover { color: #fff; border-color: rgba(255,255,255,.3); }

/* WP alignments / captions */
.alignleft { float: left; margin: 4px 18px 12px 0; }
.alignright { float: right; margin: 4px 0 12px 18px; }
.aligncenter { display: block; margin: 12px auto; }
.wp-caption { max-width: 100%; margin-bottom: 12px; }
.wp-caption-text { color: #8a938f; font-size: 10.5px; text-align: center; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fffdf8; border-radius: 3px; box-shadow: 0 0 2px 2px rgba(0,0,0,.6);
  clip: auto !important; clip-path: none; color: #1f2933; display: block; font-size: 14px;
  height: auto; left: 5px; line-height: normal; padding: 15px 23px 14px;
  text-decoration: none; top: 5px; width: auto; z-index: 100000;
}

/* admin bar offset */
.admin-bar .topbar { top: 32px; }
.admin-bar .sidebar, .admin-bar .rail { top: 96px; height: calc(100vh - 96px); }

@media (max-width: 782px) {
  .admin-bar .topbar { top: 46px; }
  .admin-bar .sidebar, .admin-bar .rail { top: 110px; height: calc(100vh - 110px); }
}

@media (max-width: 760px) {
  .post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-bar .sidebar { top: 110px; }
}

/* extra WordPress layout bits */
.tree-all {
  color: var(--accent-deep) !important;
  font-size: 10px !important;
  padding-left: 17px !important;
}
.tree-empty, .side-empty {
  display: block;
  padding: 5px 8px;
  color: #9aa19c;
  font-size: 10.5px;
}
.category-hint { margin: -2px 0 12px; color: #8a938f; font-size: 11px; }
.category-description { color: #47545d; font-size: 14px; line-height: 1.8; }
.category-description p:last-child { margin-bottom: 0; }

.site-footer {
  margin-left: 272px;
  border-top: 1px solid rgba(201, 191, 173, .65);
  background: rgba(246, 241, 232, .6);
}
.footer-inner {
  max-width: 850px;
  margin: 0 auto;
  padding: 18px 28px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8b948e;
  font-size: 10.5px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-mark {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  background: #143f3b; color: #e7c77e;
  font-family: var(--serif); font-size: 8px; font-weight: 700;
}
.footer-meta { display: flex; gap: 14px; color: #9aa19c; }

@media (max-width: 1180px) {
  .site-footer { margin-left: 250px; }
}
@media (max-width: 900px) {
  .site-footer { margin-left: 0; }
  .footer-inner { padding: 16px 18px; }
}
@media (max-width: 560px) {
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* docs menu wrapper */
.docs-menu { margin: 0; }

/* search icon + form alignment */
.search-wrap .search-form { height: 38px; }
.search-wrap .search-input { height: 38px; }
@media (max-width: 560px) {
  .search-wrap .search-form, .search-wrap .search-input { height: 34px; }
}

/* keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #8fc1b9;
  outline-offset: 2px;
}

/* ============================================================
   GGWOW Command Docs additions
   ============================================================ */

/* Home */
.home-wrap { max-width: 920px; margin: 0 auto; }
.home-hero {
  padding: 38px 0 30px;
  border-bottom: 1px solid #e8dfd0;
}
.home-hero h1 {
  margin: 6px 0 12px;
  font-size: 42px;
  line-height: 1.25;
  letter-spacing: -.04em;
  color: #17252c;
}
.home-lede {
  max-width: 720px;
  color: #5d6a72;
  font-size: 15.5px;
  line-height: 1.9;
}
.home-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 22px; }
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary { background: #0f766e; color: #fffdf8; border: 1px solid #0f766e; }
.btn-primary:hover { background: #0b5b55; color: #fffdf8; }
.btn-ghost { background: #fffdf8; color: #42534b; border: 1px solid #d8cdb9; }
.btn-ghost:hover { border-color: #9fc9c2; color: #0f766e; }
.home-stats { display: flex; flex-wrap: wrap; gap: 20px; color: #8a938f; font-size: 11px; }
.home-stats strong { color: #3d4d45; font-size: 13px; }

.home-feature {
  margin: 28px 0 8px;
  padding: 25px 28px;
  border: 1px solid #dcd2c1;
  border-left: 4px solid #b17b2c;
  border-radius: 0 13px 13px 0;
  background:
    radial-gradient(circle at 92% 12%, rgba(15, 118, 110, .12), transparent 17rem),
    #fbf7ee;
}
.feature-label { color: #a18f6e; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.home-feature h2 { margin: 5px 0 8px; padding: 0; border: 0; font-size: 24px; }
.home-feature h2 a { color: #1e2d35; }
.feature-command {
  display: block;
  margin: 10px 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #143f3b;
  color: #f2dfb1;
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.home-feature p { margin: 0 0 10px; color: #66736b; font-size: 13px; }
.feature-link { color: #0f766e; font-size: 12px; font-weight: 600; }

.home-section { margin: 38px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-head h2 { margin: 3px 0 0; padding: 0; border: 0; font-size: 22px; }
.section-more { color: #8a7b62; font-size: 11px; }
.section-more:hover { color: #0f766e; }

.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.home-card {
  display: flex;
  flex-direction: column;
  min-height: 130px;
  padding: 17px 18px 14px;
  border: 1px solid #e1d7c7;
  border-radius: 11px;
  background: #fffdf8;
  text-decoration: none;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.home-card:hover {
  border-color: #b9d8d2;
  transform: translateY(-1px);
  box-shadow: 0 12px 25px -22px rgba(15, 80, 70, .8);
}
.home-card-kicker { color: #b09c7a; font-family: var(--serif); font-size: 10px; letter-spacing: .08em; }
.home-card h3 { margin: 4px 0 4px; color: #23323a; font-size: 16px; }
.home-card p { flex: 1; margin: 0 0 10px; color: #7c877f; font-size: 11.5px; line-height: 1.65; }
.home-card-count { color: #0f766e; font-size: 10.5px; font-weight: 600; }

.command-list { border: 1px solid #e3d9ca; border-radius: 10px; background: #fffdf8; overflow: hidden; }
.command-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-bottom: 1px dashed #e8dfd0;
  text-decoration: none;
}
.command-row:last-child { border-bottom: 0; }
.command-row:hover { background: #faf6ed; }
.command-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.command-row-main strong { color: #2c3b43; font-size: 13px; }
.command-row-main code {
  color: #708078;
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.command-row-date { flex: 0 0 auto; color: #a4aaa4; font-size: 10px; }

/* Command cards */
.command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 24px; }
.command-card {
  display: flex;
  flex-direction: column;
  padding: 17px 17px 15px;
  border: 1px solid #e3d9ca;
  border-radius: 12px;
  background: #fffdf8;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.command-card:hover {
  border-color: #b9d8d2;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -22px rgba(15, 80, 70, .8);
}
.command-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.command-card-index { color: #b09c7a; font-family: var(--serif); font-size: 10px; }
.command-card-type { color: #a1aaa3; font-size: 8.5px; font-weight: 700; letter-spacing: .12em; }
.command-card-title { margin: 0 0 5px; font-size: 16px; line-height: 1.4; }
.command-card-title a { color: #24333b; }
.command-card-title a:hover { color: #0f766e; }
.command-card-desc { margin: 0 0 10px; color: #7a857e; font-size: 11px; line-height: 1.6; }
.command-chip {
  display: block;
  margin: 0 0 7px;
  padding: 8px 9px;
  border-radius: 6px;
  background: #143f3b;
  color: #f2dfb1;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.command-card-syntax {
  display: block;
  margin: 0 0 10px;
  padding: 6px 8px;
  border: 1px solid #ece3d4;
  border-radius: 5px;
  background: #faf6ed;
  color: #64746c;
  font-family: var(--mono);
  font-size: 9.8px;
  white-space: nowrap;
  overflow-x: auto;
}
.command-card-link { margin-top: auto; color: #0f766e; font-size: 10.5px; font-weight: 600; }

/* Command banner */
.command-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #143f3b, #0b2926);
  box-shadow: 0 12px 26px -24px rgba(8, 45, 40, .8);
}
.command-banner-label {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(231, 199, 126, .35);
  border-radius: 4px;
  color: #e7c77e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.command-banner-code {
  flex: 1;
  color: #f8edcf;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.command-copy {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  color: #d6e1dc;
  font-size: 9.5px;
  cursor: pointer;
}
.command-copy:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }

/* Syntax card */
.command-syntax-card {
  margin: 0 0 20px;
  padding: 13px 15px;
  border: 1px solid #e6dccb;
  border-left: 3px solid #b17b2c;
  border-radius: 0 8px 8px 0;
  background: #fcf9f2;
}
.syntax-label { color: #a18f6e; font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.syntax-code {
  display: block;
  margin: 5px 0 5px;
  color: #38564e;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.command-syntax-card p { margin: 0; color: #8a938f; font-size: 10.5px; }

/* Code demo */
.code-demo {
  margin: 24px 0 26px;
  border: 1px solid #dcd2c1;
  border-radius: 13px;
  background: #fbf7ee;
  overflow: hidden;
}
.demo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #143f3b;
  color: #fffdf8;
}
.demo-heading { min-width: 0; }
.demo-eyebrow { color: #e7c77e; font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.demo-heading h2 { margin: 4px 0 0; padding: 0; border: 0; color: #fffdf8; font-size: 18px; line-height: 1.35; }
.demo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.demo-state-label { color: #a9c2ba; font-size: 9px; }
.demo-state-btn, .demo-run-btn, .demo-reset-btn {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 5px;
  background: rgba(255, 255, 255, .06);
  color: #d6e1dc;
  font-size: 10px;
  cursor: pointer;
}
.demo-state-btn:hover, .demo-reset-btn:hover { border-color: rgba(255, 255, 255, .4); color: #fff; }
.demo-state-btn.active { background: #e7c77e; border-color: #e7c77e; color: #26352f; font-weight: 700; }
.demo-run-btn { background: #e7c77e; border-color: #e7c77e; color: #26352f; font-weight: 700; }
.demo-run-btn:hover { background: #f0d69a; }
.demo-run-btn:disabled { opacity: .55; cursor: default; }

.demo-status {
  margin: 14px 16px 0;
  padding: 9px 11px;
  border-left: 3px solid #0f766e;
  background: #eef7f4;
  color: #3e5f58;
  font-size: 11.5px;
  line-height: 1.6;
}
.demo-status.is-false, .demo-status.is-wait { border-left-color: #b8ad99; background: #f3eee4; color: #756f62; }
.demo-status.is-jump { border-left-color: #b17b2c; background: #fbf2df; color: #775823; }
.demo-status.is-true { border-left-color: #0f766e; background: #e4f2ef; color: #245c54; }
.demo-status.is-done { border-left-color: #6d7971; background: #f3eee4; color: #5b665e; }

.demo-lines {
  margin: 12px 16px 0;
  padding: 10px 5px;
  list-style: none;
  border-radius: 8px;
  background: #18222c;
  font-family: var(--mono);
  font-size: 11.8px;
  line-height: 1.7;
}
.demo-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 5px 10px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: #a9b8c1;
  transition: background .18s, color .18s, border-color .18s, opacity .18s;
}
.demo-line.active { background: rgba(15, 118, 110, .28); border-left-color: #7cc7bc; color: #fff; }
.demo-line.done { opacity: .5; }
.demo-line.jump { background: rgba(177, 123, 44, .25); border-left-color: #e7c77e; color: #f4dfb1; }
.demo-line-no { flex: 0 0 22px; color: #6f8f99; font-size: 9px; }
.demo-line-text { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-line-tag { flex: 0 0 auto; color: #7cc7bc; font-size: 8px; letter-spacing: .05em; }
.demo-line.jump .demo-line-tag { color: #e7c77e; }

.demo-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 9px 18px 14px;
  color: #929b95; font-size: 9px;
}
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: #7cc7bc; }
.legend-dot.done { background: #69767a; }
.legend-dot.jump { background: #e7c77e; }

/* Image demo */
.image-demo { margin: 24px 0 26px; padding: 16px; border: 1px solid #e3d9ca; border-radius: 13px; background: #fbf7ee; }
.image-demo-head { margin-bottom: 10px; }
.image-demo-head h2 { margin: 3px 0 0; padding: 0; border: 0; font-size: 18px; }
.image-demo-frame { border-radius: 8px; overflow: hidden; border: 1px solid #d8cdb9; background: #fff; }
.image-demo-frame img { display: block; width: 100%; height: auto; }

/* Professional article typography */
.entry-content { counter-reset: section; }
.entry-content > p:first-of-type {
  margin-bottom: 18px;
  padding: 12px 15px;
  border-left: 3px solid #b17b2c;
  background: #fcf9f2;
  color: #3d4d55;
  font-size: 16px;
  line-height: 1.9;
}
.entry-content h2 {
  counter-increment: section;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 30px 0 12px;
  padding-top: 18px;
  border-top: 1px solid #eee8dc;
  font-size: 20px;
}
.entry-content h2::before {
  content: counter(section, decimal-leading-zero);
  flex: 0 0 auto;
  color: #b17b2c;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .04em;
}
.entry-content h3 {
  position: relative;
  margin: 23px 0 8px;
  padding-left: 11px;
  color: #2e3d45;
  font-size: 16px;
}
.entry-content h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .4em;
  width: 3px;
  height: .95em;
  border-radius: 2px;
  background: #b17b2c;
}
.entry-content p { color: #4a575f; font-size: 14.5px; line-height: 1.95; }
.entry-content blockquote {
  position: relative;
  margin: 18px 0;
  padding: 13px 17px 13px 38px;
  border: 0;
  border-left: 3px solid #b17b2c;
  border-radius: 0 8px 8px 0;
  background: #fcf7ec;
  color: #655a48;
  font-size: 13.5px;
}
.entry-content blockquote::before {
  content: "“";
  position: absolute;
  left: 13px;
  top: 2px;
  color: #d3b984;
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 1;
}
.entry-content hr {
  width: 72px;
  margin: 26px auto;
  border: 0;
  border-top: 2px solid #d8cdb9;
}
.entry-content ul, .entry-content ol { margin: 10px 0 18px; padding-left: 1.35em; }
.entry-content li { margin: 6px 0; color: #4a575f; }
.entry-content ul li::marker { color: #b17b2c; }
.entry-content ol li::marker { color: #0f766e; font-weight: 600; }
.entry-content img { border-radius: 8px; box-shadow: 0 8px 20px -18px rgba(30, 40, 35, .7); }
.entry-content figure { margin: 18px 0; }
.entry-content figcaption { margin-top: 6px; color: #929b95; font-size: 10.5px; text-align: center; }
.entry-content table { border-radius: 8px; overflow: hidden; }
.entry-content table th { background: #f7f2e8; }

/* Three-level menu tree */
.tree-sub .tree-sub {
  margin-left: 10px;
  padding-left: 8px;
  border-left: 1px solid rgba(201, 191, 173, .5);
}
.docs-menu-list ul ul { margin-left: 10px; padding-left: 8px; }
.docs-menu-list ul ul a { font-size: 10.8px; }
.tree-all { color: #0f766e !important; font-size: 10px !important; padding-left: 17px !important; }
.tree-empty, .side-empty { display: block; padding: 5px 8px; color: #9aa19c; font-size: 10.5px; }

/* Footer / misc */
.site-footer { margin-left: 272px; border-top: 1px solid rgba(201, 191, 173, .65); background: rgba(246, 241, 232, .6); }
.footer-inner { max-width: 920px; margin: 0 auto; padding: 18px 28px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #8b948e; font-size: 10.5px; }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-mark { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #143f3b; color: #e7c77e; font-family: var(--serif); font-size: 8px; font-weight: 700; }
.footer-meta { display: flex; gap: 14px; color: #9aa19c; }
.rail-text { margin: 0; color: #7a857e; font-size: 11px; line-height: 1.75; }

@media (max-width: 1180px) { .site-footer { margin-left: 250px; } }
@media (max-width: 900px) {
  .site-footer { margin-left: 0; }
  .footer-inner { padding: 16px 18px; }
  .home-hero h1 { font-size: 34px; }
  .home-grid, .command-grid { grid-template-columns: 1fr; }
  .command-banner { flex-wrap: wrap; }
  .command-banner-code { flex: 1 1 100%; order: 3; font-size: 13px; }
  .command-copy { margin-left: auto; }
  .demo-head { align-items: flex-start; flex-direction: column; }
  .demo-actions { width: 100%; }
  .demo-line { font-size: 11px; }
  .entry-content > p:first-of-type { font-size: 15px; }
}
@media (max-width: 560px) {
  .home-hero { padding: 24px 0 22px; }
  .home-hero h1 { font-size: 29px; }
  .home-lede { font-size: 14px; }
  .home-stats { gap: 11px; }
  .home-feature { padding: 18px 17px; }
  .command-banner { padding: 12px 13px; }
  .demo-lines { margin: 10px 10px 0; font-size: 10.5px; }
  .demo-status { margin: 10px 10px 0; }
  .demo-actions { gap: 4px; }
  .demo-state-btn, .demo-run-btn, .demo-reset-btn { font-size: 9.5px; padding: 0 7px; }
  .command-row { align-items: flex-start; flex-direction: column; gap: 4px; }
}

.demo-line-text { background: transparent !important; border: 0 !important; padding: 0 !important; color: inherit !important; font-family: inherit !important; font-size: inherit !important; }


/* ============================================================
   v1.1 — WoW-inspired palette, larger type, no right rail, no pager
   ============================================================ */

:root {
  --paper: #e9e1d1;
  --paper-deep: #ded2bd;
  --surface: #fbf6ea;
  --surface-soft: #f6efe1;
  --ink: #2b2620;
  --ink-soft: #4b4238;
  --muted: #7b6e5c;
  --line: #d8ccb8;
  --line-strong: #b9a88c;
  --accent: #3f4f66;
  --accent-deep: #2b3a4d;
  --accent-soft: #e7e9ed;
  --gold: #a47a3a;
  --gold-soft: #f4e8d1;
  --code: #1c2230;
  --code-head: #141a24;
  --shadow: 0 1px 2px rgba(52, 40, 22, .05), 0 24px 58px -40px rgba(52, 40, 22, .5);
}

body {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% -10%, rgba(164, 122, 58, .12), transparent 30rem),
    radial-gradient(circle at 100% 2%, rgba(63, 79, 102, .10), transparent 32rem),
    repeating-linear-gradient(0deg, rgba(70, 52, 28, .018) 0 1px, transparent 1px 4px);
}

/* Top bar: dark leather + antique gold */
.topbar {
  background: rgba(27, 23, 18, .97);
  border-bottom: 2px solid var(--gold);
  color: #f4ead5;
}
.brand-mark {
  background: #141a24;
  color: #d8b979;
  border-color: rgba(216, 185, 121, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.brand-name { color: #f4ead5; font-size: 15.5px; }
.brand-sub { color: #bcae97; font-size: 11px; }
.brand-badge { background: #2b2822; border-color: #5a4a33; color: #d8b979; }
.topnav a { color: #d3c6b1; font-size: 13.5px; }
.topnav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.topnav a.active,
.topnav li.current-menu-item > a,
.topnav li.current_page_item > a,
.topnav li.current-menu-ancestor > a {
  color: #f0d7a2;
  background: rgba(164, 122, 58, .20);
}
.search-input {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .16);
  color: #f4ead5;
  font-size: 13.5px;
}
.search-input::placeholder { color: #b9ad99; }
.search-input:focus {
  background: rgba(255, 255, 255, .10);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(164, 122, 58, .16);
}
.search-wrap svg { color: #c7b795; }
.search-key { background: #1b1a16; border-color: #4b4234; color: #c7b795; }
.version-select { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); color: #d3c6b1; }
.version-select b { color: #e3c07a; }
.qq-btn { background: var(--gold); color: #1e1a14; box-shadow: none; }
.qq-btn:hover { background: #b98c47; }
.menu-btn { background: #1b1a16; border-color: #4b4234; color: #d3c6b1; }

/* Two-column shell; right rail removed */
.shell {
  max-width: 1480px;
  grid-template-columns: 272px minmax(0, 1fr);
}
.rail { display: none !important; }
.main { padding: 26px 34px 76px; }
.article {
  max-width: 980px;
  border-top: 3px solid var(--gold);
  background: var(--surface);
  border-color: var(--line);
}
.category-article { max-width: 980px; }
.home-wrap { max-width: 980px; }

/* Sidebar: larger, legible, all items */
.sidebar {
  background: rgba(246, 239, 226, .52);
  border-right-color: rgba(185, 168, 140, .58);
}
.side-title { font-size: 12px; color: #74644f; }
.side-total { font-size: 12px; color: #8f806b; }
.tree-head { color: #4b4032; font-size: 13.5px; }
.tree-head:hover { background: rgba(255, 253, 248, .65); }
.tree-head .t-count { background: #e4d8c5; color: #7b6a54; font-size: 10.5px; }
.tree-group.open .tree-head .t-count { background: var(--accent-soft); color: var(--accent-deep); }
.tree-list a { color: #776b5a; font-size: 13px; }
.tree-list a:hover { color: var(--accent-deep); background: rgba(255, 253, 248, .78); }
.tree-list a.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--gold);
}
.tree-sub a { font-size: 12.5px; color: #7f7362; }
.tree-sub .tree-sub a { font-size: 12px; }
.docs-menu-list a { font-size: 13px; color: #776b5a; }
.docs-menu-list ul a { font-size: 12.5px; }
.docs-menu-list ul ul a { font-size: 12px; }
.docs-menu-list .current-menu-item > a,
.docs-menu-list .current_page_item > a,
.docs-menu-list .current-menu-ancestor > a,
.docs-menu-list .current-menu-parent > a {
  color: var(--accent-deep);
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--gold);
}
.side-note { border-color: var(--line); background: rgba(255, 253, 248, .58); }
.side-note .v { font-size: 12.5px; color: #594d3e; }
.side-note .v b { color: var(--gold); }
.tree-empty, .side-empty { font-size: 12px; }

/* Titles / text */
.kicker { font-size: 11px; color: var(--gold); }
.kicker::before { background: var(--gold); }
h1 { color: #2a2520; }
.lead { color: #5f5344; font-size: 16px; }
.meta-row .pill { font-size: 12px; height: 27px; }
.meta-row .pill strong { color: #3d342a; }
.meta-row .pill.accent { background: var(--accent-soft); border-color: #c9d0da; color: var(--accent-deep); }
.article p { color: #4b4238; font-size: 15.5px; }
.article-foot { font-size: 12px; color: #8b7e6b; }
.helpful button { font-size: 12px; }

/* Command banner: parchment, not a heavy green block */
.command-banner {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 0 9px 9px 0;
  box-shadow: none;
}
.command-banner-label { color: #7b5a2b; border-color: #d8c3a0; font-size: 10.5px; }
.command-banner-code { color: var(--accent-deep); font-size: 15.5px; }
.command-copy {
  background: #fffdf8;
  border-color: #d8c6a8;
  color: #6f5a36;
  font-size: 11.5px;
}
.command-copy:hover { border-color: var(--gold); color: var(--gold); }

.command-syntax-card { border-color: var(--line); border-left-color: var(--gold); background: #f8f2e5; }
.syntax-label { color: #8a6a37; font-size: 10px; }
.syntax-code { color: #41372a; font-size: 13.5px; }
.command-syntax-card p { color: #857863; font-size: 12px; }

/* Code demo: light header, dark code surface, gold execution */
.code-demo { border-color: var(--line); background: var(--surface-soft); }
.demo-head {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  align-items: center;
}
.demo-eyebrow { color: var(--gold); font-size: 10px; }
.demo-heading h2 { color: #2a2520; font-size: 19px; }
.demo-state-label { color: #8b7e6b; font-size: 11px; }
.demo-state-btn, .demo-reset-btn {
  background: #fffdf8;
  border-color: #d8c6a8;
  color: #5f5344;
  font-size: 11.5px;
  min-height: 30px;
}
.demo-state-btn:hover, .demo-reset-btn:hover { border-color: var(--gold); color: var(--gold); }
.demo-state-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbf6ea;
}
.demo-run-btn {
  background: var(--gold);
  border-color: var(--gold);
  color: #1e1a14;
  font-size: 11.5px;
  min-height: 30px;
}
.demo-run-btn:hover { background: #b98c47; }
.demo-status {
  border-left-color: var(--gold);
  background: #f3ecdc;
  color: #5f5344;
  font-size: 13px;
}
.demo-status.is-true { border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.demo-status.is-false, .demo-status.is-wait { border-left-color: #a39682; background: #efe8da; color: #6f6352; }
.demo-status.is-jump { border-left-color: var(--gold); background: var(--gold-soft); color: #6f5122; }
.demo-status.is-done { border-left-color: #8b7e6b; background: #efe8da; color: #5f5344; }
.demo-lines { background: var(--code); font-size: 13px; }
.demo-line { color: #c9c0b1; }
.demo-line.active { background: rgba(164, 122, 58, .30); border-left-color: #d8b979; color: #fff; }
.demo-line.jump { background: rgba(63, 79, 102, .55); border-left-color: #d8b979; color: #f0d6a5; }
.demo-line-no { color: #9a8d79; font-size: 10px; }
.demo-line-tag { font-size: 9.5px; color: #d8b979; }
.demo-line.jump .demo-line-tag { color: #f0d6a5; }
.demo-legend { color: #8b7e6b; font-size: 11px; }
.legend-dot { background: #d8b979; }
.legend-dot.done { background: #8a8175; }
.legend-dot.jump { background: var(--accent); }

/* Home */
.home-hero { border-bottom-color: var(--line); }
.home-hero h1 { color: #2a2520; }
.home-lede { color: #5f5344; font-size: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fbf6ea; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { background: #fffdf8; border-color: var(--line); color: #5f5344; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.home-stats { color: #8b7e6b; font-size: 12.5px; }
.home-stats strong { color: #3d342a; font-size: 14px; }
.home-feature {
  background: var(--surface-soft);
  border-color: var(--line);
  border-left-color: var(--gold);
}
.feature-label { color: #8a6a37; font-size: 10px; }
.feature-command { background: var(--code); color: #e7c77e; font-size: 13.5px; }
.feature-link, .section-more { color: var(--gold); font-size: 12.5px; }
.home-card { border-color: var(--line); background: var(--surface); }
.home-card:hover { border-color: #c9b68f; }
.home-card-kicker { color: #a18f6e; font-size: 11px; }
.home-card h3 { color: #2a2520; font-size: 17px; }
.home-card p { color: #7b6e5c; font-size: 13px; }
.home-card-count { color: var(--accent); font-size: 12px; }
.command-list { border-color: var(--line); background: var(--surface); }
.command-row { border-bottom-color: var(--line); }
.command-row:hover { background: #f8f2e5; }
.command-row-main strong { color: #2a2520; font-size: 14px; }
.command-row-main code { color: #7b6e5c; font-size: 12px; }
.command-row-date { color: #9b8e7b; font-size: 11.5px; }

/* Command cards */
.command-card { border-color: var(--line); background: var(--surface); }
.command-card:hover { border-color: #c9b68f; }
.command-card-index { color: #a18f6e; font-size: 11px; }
.command-card-type { color: #9b8e7b; font-size: 9.5px; }
.command-card-title { font-size: 17px; }
.command-card-title a { color: #2a2520; }
.command-card-title a:hover { color: var(--accent); }
.command-card-desc { color: #7b6e5c; font-size: 13px; }
.command-chip { background: var(--code); color: #e7c77e; font-size: 12px; }
.command-card-syntax { border-color: var(--line); background: #f8f2e5; color: #6f6352; font-size: 11.5px; }
.command-card-link { color: var(--accent); font-size: 12px; }

/* Article typography */
.entry-content { font-size: 15.5px; }
.entry-content p { font-size: 15.5px; color: #4b4238; }
.entry-content > p:first-of-type {
  background: #f8f2e5;
  border-left-color: var(--gold);
  color: #41372a;
  font-size: 16.5px;
}
.entry-content h2 { font-size: 21px; color: #2a2520; }
.entry-content h2::before { color: var(--gold); }
.entry-content h3 { font-size: 17px; color: #3d342a; }
.entry-content h3::before { background: var(--gold); }
.entry-content a { color: var(--accent); }
.entry-content a:hover { color: var(--gold); }
.entry-content blockquote { background: var(--gold-soft); border-left-color: var(--gold); color: #5f5344; font-size: 14.5px; }
.entry-content blockquote::before { color: #c9a86a; }
.entry-content li { font-size: 15px; color: #4b4238; }
.entry-content ul li::marker { color: var(--gold); }
.entry-content ol li::marker { color: var(--accent); }
.entry-content th { background: #f4eddf; color: #6f6352; font-size: 11.5px; }
.entry-content td { font-size: 13.5px; }
.entry-content code { background: #f1e9da; border-color: #ddcfba; color: #7b4f1f; }
.entry-content pre { background: var(--code); }
.entry-content img { border-radius: 7px; }

/* Footer / no right rail */
.site-footer { margin-left: 272px; border-top-color: var(--line); background: rgba(246, 239, 226, .55); }
.footer-inner { max-width: 980px; font-size: 12px; color: #8b7e6b; }
.footer-mark { background: var(--code); color: #e7c77e; }
.footer-meta { color: #9b8e7b; font-size: 11.5px; }

/* Misc sizes */
.pagination .page-numbers { font-size: 12px; }
.category-description, .category-lead { font-size: 15px; }
.no-results { font-size: 14px; }
.section-head h2 { font-size: 23px; }
.rail-text { font-size: 12px; }

@media (max-width: 1180px) {
  .site-footer { margin-left: 250px; }
}
@media (max-width: 900px) {
  .site-footer { margin-left: 0; }
  .main { padding: 18px 15px 56px; }
  .article { padding: 27px 22px 30px; }
  .command-banner { border-radius: 0 8px 8px 0; }
  .command-banner-code { font-size: 14px; }
  .demo-head { align-items: flex-start; }
  .demo-actions { width: 100%; }
  .demo-state-label { display: none; }
  .demo-state-btn, .demo-run-btn, .demo-reset-btn { min-height: 32px; font-size: 12px; }
  .home-hero h1 { font-size: 34px; }
  .home-lede { font-size: 15px; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .main { padding: 12px 10px 38px; }
  .article { padding: 23px 17px 26px; }
  .home-hero h1 { font-size: 29px; }
  .home-lede { font-size: 14.5px; }
  .command-card-title { font-size: 16px; }
  .command-card-desc { font-size: 12.5px; }
  .command-banner-code { font-size: 13px; }
  .demo-heading h2 { font-size: 17px; }
  .demo-lines { font-size: 12px; }
}

/* Final type consistency */
.kicker{font-size:11.5px}.side-title{font-size:12.5px}.side-total{font-size:12.5px}.demo-eyebrow{font-size:11px}.demo-state-label{font-size:12px}.demo-state-btn,.demo-run-btn,.demo-reset-btn{font-size:12px}.command-banner-label{font-size:11px}.syntax-label{font-size:11px}.command-copy{font-size:12px}.command-card-type{font-size:10px}.demo-line-no{font-size:10.5px}.demo-line-tag{font-size:10px}


/* Conditional switch + home demo */
.demo-switch{display:inline-flex;align-items:center;padding:2px;border:1px solid #d8c6a8;border-radius:999px;background:#fffdf8;gap:2px;}
.demo-switch .demo-state-btn{border:0;border-radius:999px;background:transparent;color:#6f6352;min-height:26px;padding:0 10px;font-size:12px;}
.demo-switch .demo-state-btn:hover{background:#f4e8d1;color:#7b5a2b;}
.demo-switch .demo-state-btn.active{background:#3f4f66;color:#fbf6ea;border:0;}
.home-demo-section{margin-top:42px;padding-top:26px;border-top:1px solid #d8ccb8;}
.home-demo-empty{color:#8b7e6b;font-size:13px;background:#f8f2e5;border:1px dashed #d8c6a8;padding:12px 14px;border-radius:8px;}
@media (max-width:560px){.demo-switch{width:100%;justify-content:center}.demo-switch .demo-state-btn{flex:1;padding:0 6px;font-size:11.5px}}



/* Content first, plain text, divider before command reference */
.entry-content--top { margin: 8px 0 0; padding: 0; }
.content-divider {
  height: 1px;
  margin: 10px 0 28px;
  background: linear-gradient(90deg, rgba(164,122,58,.55), rgba(216,204,184,.25) 55%, rgba(216,204,184,0));
  position: relative;
}
.content-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 42px;
  height: 5px;
  border-radius: 2px;
  background: #a47a3a;
  opacity: .55;
}
.entry-content > p:first-of-type {
  background: transparent;
  border-left: 0;
  padding: 0;
  margin-bottom: 16px;
  color: #3d342a;
  font-size: 16.5px;
  line-height: 1.95;
}
.home-demo-section { margin-top: 46px; }


/* Command / syntax sections styled like article sections */
.command-section {
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid #e8dfd0;
}
.command-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.command-section-kicker {
  color: #a47a3a;
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.command-section h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #2a2520;
  font-size: 21px;
  line-height: 1.4;
}
.command-line-block,
.command-syntax-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 0;
  padding: 13px 15px;
  border-left: 3px solid #a47a3a;
  background: #f8f2e5;
}
.command-line-code {
  flex: 1;
  min-width: 0;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: #2b3a4d !important;
  font-family: var(--mono) !important;
  font-size: 15px !important;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.command-line-block .command-copy {
  flex: 0 0 auto;
}
.command-syntax-body {
  display: block;
  border-left-color: #3f4f66;
}
.command-syntax-body .syntax-code {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: #2b3a4d;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.command-syntax-body p {
  margin: 7px 0 0;
  color: #857863;
  font-size: 12.5px;
}


/* Code demo as a normal article section */
.command-section-desc {
  margin: 6px 0 0;
  color: #857863;
  font-size: 12.5px;
  line-height: 1.65;
}
.code-demo.code-demo-section {
  margin: 34px 0 0;
  padding-top: 20px;
  border: 0;
  border-top: 1px solid #e8dfd0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.code-demo-section .command-section-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #2a2520;
  font-size: 21px;
}
.demo-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 12px 0 0;
}
.code-demo-section .demo-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.code-demo-section .demo-status {
  margin: 14px 0 0;
}
.code-demo-section .demo-lines {
  margin: 12px 0 0;
}
.code-demo-section .demo-legend {
  padding: 9px 0 0;
}
.image-demo.image-demo-section {
  margin: 34px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid #e8dfd0;
  border-radius: 0;
  background: transparent;
}
.image-demo-section .command-section-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #2a2520;
  font-size: 21px;
}
.image-demo-section .image-demo-frame {
  margin-top: 12px;
}
@media (max-width: 560px) {
  .demo-toolbar { justify-content: flex-start; }
  .code-demo-section .demo-actions { justify-content: flex-start; }
}


/* QQ group page */
.qq-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 22px 0 30px;
  padding: 22px 24px;
  border: 1px solid #d8ccb8;
  border-left: 4px solid #a47a3a;
  border-radius: 0 10px 10px 0;
  background: #f7f0e2;
}
.qq-card-label {
  display: block;
  color: #8a6a37;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
}
.qq-number {
  display: block;
  margin: 4px 0 5px;
  color: #2b3a4d;
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: .02em;
}
.qq-card p {
  margin: 0;
  color: #7b6e5c;
  font-size: 12.5px;
}
.qq-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qq-content h2:first-child { margin-top: 0; }
@media (max-width: 700px) {
  .qq-card { align-items: flex-start; flex-direction: column; }
  .qq-number { font-size: 26px; }
}


/* Icons before left directory entries */
.ggwow-menu-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #a47a3a;
  opacity: .62;
  transition: opacity .15s, color .15s;
}
.docs-menu-list > li > a .ggwow-menu-icon { opacity: .85; }
.docs-menu-list a:hover .ggwow-menu-icon { opacity: 1; }
.docs-menu-list .current-menu-item > a .ggwow-menu-icon,
.docs-menu-list .current_page_item > a .ggwow-menu-icon,
.docs-menu-list .current-menu-ancestor > a .ggwow-menu-icon,
.docs-menu-list .current-menu-parent > a .ggwow-menu-icon {
  color: #3f4f66;
  opacity: 1;
}
.menu-label { min-width: 0; }
.tree-head .t-name::before {
  content: "▤";
  display: inline-block;
  width: 13px;
  margin-right: 5px;
  color: #a47a3a;
  font-size: 12px;
  line-height: 1;
}
.tree-sub a::before {
  content: "·";
  display: inline-block;
  width: 9px;
  margin-right: 2px;
  color: #a47a3a;
  font-size: 14px;
  line-height: 1;
}


/* Optional command parameters and multiple command rows */
.command-optional {
  color: #8a5a16;
  font-weight: 600;
}
.command-optional-note {
  margin: 8px 0 0;
  color: #8a6a37;
  font-size: 12px;
  line-height: 1.6;
}
.command-line-block + .command-line-block { margin-top: 8px; }
.command-syntax-body .syntax-code + .syntax-code { margin-top: 8px; }


.feature-command .command-optional,
.command-chip .command-optional {
  color: #f0d69a;
}
.command-row-main code .command-optional {
  color: #8a5a16;
}


.home-feature-syntax { margin-top: 10px; }
.home-feature-syntax .feature-label { display: block; margin-bottom: 4px; }


.syntax-note {
  margin: 10px 0 0;
  color: #6f6352;
  font-size: 12.5px;
  line-height: 1.7;
}
.syntax-note-mark {
  color: #a47a3a;
  font-family: var(--mono);
  font-weight: 600;
  margin-right: 4px;
}
.syntax-note-label {
  color: #8a6a37;
  font-weight: 600;
  margin-right: 2px;
}


/* Click-to-load GIF */
.gif-player { position: relative; }
.gif-poster {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}
.gif-poster-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 220px;
  background:
    radial-gradient(circle at 50% 40%, rgba(216, 185, 121, .10), transparent 16rem),
    #1b2230;
  color: #d8c6a8;
  font-size: 13px;
}
.gif-poster-empty .gif-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}
.gif-badge {
  padding: 3px 8px;
  border: 1px solid rgba(216, 185, 121, .45);
  border-radius: 4px;
  color: #f0d69a;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
}
.gif-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(14, 18, 26, .48);
  color: #f0d69a;
  cursor: pointer;
}
.gif-play:hover { background: rgba(14, 18, 26, .38); }
.gif-play-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding-left: 3px;
  border: 1px solid rgba(240, 214, 154, .65);
  border-radius: 50%;
  background: rgba(14, 18, 26, .5);
  font-size: 15px;
  line-height: 1;
}
.gif-play-text { font-size: 12.5px; }
.gif-player.loading .gif-play { cursor: wait; }
.gif-player.loading .gif-play-icon { animation: gifPulse 1s ease-in-out infinite; }
.gif-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #1b2230;
}
@keyframes gifPulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}


/* Posts rendered under category menu items */
.docs-post-list {
  margin: 2px 0 8px 12px !important;
  padding: 0 0 0 9px !important;
  border-left: 1px solid rgba(201, 191, 173, .62);
  list-style: none;
}
.docs-post-item { margin: 1px 0; }
.docs-post-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 5px;
  color: #7f7362;
  font-size: 12.5px;
  line-height: 1.5;
  text-decoration: none;
}
.docs-post-item a:hover { color: #2b3a4d; background: rgba(255, 253, 248, .78); }
.docs-post-item.active a {
  color: #2b3a4d;
  background: #e7e9ed;
  box-shadow: inset 2px 0 0 #a47a3a;
}
.docs-post-item .dot {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  border-radius: 50%;
  background: #a47a3a;
  opacity: .65;
}


/* Expandable docs menu */
.docs-menu-list a[data-docs-toggle] { cursor: pointer; }
.docs-chev {
  flex: 0 0 10px;
  margin-left: auto;
  color: #a47a3a;
  opacity: .7;
  transform: rotate(-90deg);
  transition: transform .16s ease, opacity .16s ease;
}
.menu-item.open > a .docs-chev { transform: rotate(0); opacity: 1; }
.docs-enhanced .docs-children { display: none; }
.docs-enhanced .menu-item.open > .docs-children { display: block; }


.demo-line.stopped {
  background: rgba(164, 122, 58, .24);
  border-left-color: #e7c77e;
  color: #f4dfb1;
  opacity: 1;
}
.demo-line.stopped .demo-line-tag { color: #f0d6a5; }


/* Q&A page template */
.qa-page .lead { margin-bottom: 22px; }
.qa-list { margin-top: 6px; }
.qa-list > p {
  color: #4b4238;
  font-size: 15px;
  line-height: 1.9;
}
.qa-item {
  margin: 0 0 10px;
  border: 1px solid #e1d7c7;
  border-radius: 9px;
  background: #fffdf8;
  overflow: hidden;
}
.qa-question {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #e8dfd0;
  background: transparent;
  color: #2a2520;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}
.qa-question:hover { background: #faf5e9; }
.qa-question::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -1px;
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: #a47a3a;
}
.qa-question-text { min-width: 0; }
.qa-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid #d4bf98;
  border-radius: 50%;
  color: #a47a3a;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
  transition: background .16s, color .16s;
}
.qa-icon::before { content: "+"; }
.qa-item.open .qa-icon {
  background: #a47a3a;
  border-color: #a47a3a;
  color: #fffdf8;
}
.qa-item.open .qa-icon::before { content: "−"; }
.qa-answer {
  display: none;
  padding: 0 17px 16px;
  border-top: 0;
  color: #4b4238;
  font-size: 14.5px;
  line-height: 1.9;
}
.qa-item.open .qa-answer { display: block; }
.qa-answer > :first-child { margin-top: 13px; }
.qa-answer p { margin: 8px 0; }
.qa-answer ul,
.qa-answer ol { margin: 8px 0; padding-left: 1.4em; }
.qa-answer a { color: #3f4f66; }
.qa-answer img { max-width: 100%; height: auto; border-radius: 6px; }
@media (max-width: 560px) {
  .qa-question { padding: 12px 13px; font-size: 15px; }
  .qa-answer { padding: 0 14px 14px; }
}


.qa-title-divider {
  position: relative;
  height: 1px;
  margin: 14px 0 24px;
  background: linear-gradient(90deg, rgba(164, 122, 58, .55), rgba(216, 204, 184, .24) 55%, rgba(216, 204, 184, 0));
}
.qa-title-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 42px;
  height: 5px;
  border-radius: 2px;
  background: #a47a3a;
  opacity: .55;
}


/* ============================================================
   Mobile refinements
   ============================================================ */
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .topbar {
    height: 64px;
    gap: 10px;
    padding: 0 14px;
    background: #1b1712 !important;
    border-bottom: 2px solid #a47a3a;
    box-shadow: 0 6px 22px rgba(16, 12, 8, .28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .brand { min-width: 0; gap: 9px; }
  .brand-sub { display: none; }
  .search-wrap { flex: 1 1 auto; min-width: 0; max-width: none; }
  .search-input { height: 36px; font-size: 13px; }
  .search-key { display: none; }
  .menu-btn { width: 36px; height: 36px; border-radius: 8px; }
  .qq-btn { height: 36px; }

  .sidebar {
    top: 64px;
    width: min(86vw, 330px);
    background: #f6efe2 !important;
    border-right: 1px solid #d8ccb8;
    box-shadow: 22px 0 46px -26px rgba(20, 14, 8, .55);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.nav-open { overflow: hidden; }
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 64px 0 0;
    z-index: 54;
    background: rgba(22, 17, 12, .48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .mobile-nav {
    display: block;
    margin: 0 4px 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d8ccb8;
  }
  .mobile-nav-label {
    margin: 0 5px 7px;
    color: #8b7e6b;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .mobile-nav-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .mobile-nav-list li { margin: 0; }
  .mobile-nav-list a {
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 6px;
    color: #5f5344;
    font-size: 13px;
    text-decoration: none;
  }
  .mobile-nav-list a:hover,
  .mobile-nav-list li.current-menu-item > a,
  .mobile-nav-list li.current_page_item > a {
    background: #e7e9ed;
    color: #2b3a4d;
  }

  .main { padding: 16px 14px 54px; }
  .article { padding: 24px 20px 28px; border-radius: 0 0 12px 12px; }
  .article h1 { overflow-wrap: anywhere; }

  .command-line-block { align-items: flex-start; flex-wrap: wrap; padding: 12px 13px; }
  .command-line-code { flex: 1 1 100%; font-size: 14px !important; }
  .command-copy { margin-left: auto; }
  .command-section { margin-top: 28px; padding-top: 17px; }

  .entry-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .entry-content pre { overflow-x: auto; }

  .site-footer { margin-left: 0; }
  .footer-inner { padding: 16px 18px; }
}

@media (max-width: 560px) {
  .topbar { height: 60px; padding: 0 10px; gap: 8px; }
  .brand { gap: 0; }
  .brand-copy, .brand-badge { display: none; }
  .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
  .search-input { height: 36px; padding: 0 9px 0 31px; font-size: 12.5px; }
  .search-wrap svg { left: 9px; width: 14px; height: 14px; }
  .top-actions { gap: 6px; }
  .qq-btn { width: 36px; height: 36px; }
  .menu-btn { width: 36px; height: 36px; }

  .sidebar { top: 60px; width: min(88vw, 330px); padding: 16px 12px 30px; }
  body.nav-open::before { inset: 60px 0 0; }

  .main { padding: 12px 9px 40px; }
  .article { padding: 22px 16px 26px; border-radius: 0 0 10px 10px; }
  .article h1 { font-size: 27px; line-height: 1.3; }
  .lead { font-size: 14.5px; line-height: 1.8; }

  .command-line-block { padding: 11px 12px; }
  .command-line-code { font-size: 13px !important; }
  .command-optional-note { font-size: 11.5px; }
  .syntax-note { font-size: 12px; }

  .code-demo-section .demo-actions { gap: 4px; }
  .demo-switch { width: 100%; justify-content: center; }
  .demo-line { font-size: 11.5px; }

  .entry-content { font-size: 15px; }
  .entry-content p { font-size: 15px; }
  .entry-content h2 { font-size: 20px; }
  .entry-content h3 { font-size: 16px; }

  .qa-question { padding: 13px 12px; font-size: 15px; }
  .qa-question::after { left: 12px; }
  .qa-answer { padding: 0 13px 14px; font-size: 14px; }
}


@media (max-width: 560px) {
  .entry-content table,
  .article table {
    min-width: 0 !important;
    width: 100%;
    table-layout: auto;
  }
  .entry-content th,
  .entry-content td {
    padding: 7px 8px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
}
