:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #20252b;
  background: #f6f7f8;
  font-synthesis: none;
  --green: #176b51;
  --green-soft: #edf7f2;
  --border: #dfe3e6;
  --muted: #68717b;
  --code: #171b20;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f6f7f8; }
button, input { font: inherit; letter-spacing: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.docs-brand { min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.docs-brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--green); font-size: 15px; font-weight: 850; }
.docs-brand > span:last-child { display: grid; gap: 1px; }
.docs-brand strong { font-size: 15px; }
.docs-brand small { color: #7c848d; font-size: 10px; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions a { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 5px; color: #4d5660; background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.header-actions a:hover { border-color: #aeb6bc; }
.header-actions .back-link { color: var(--green); border-color: #c4d9d1; background: #f3f9f6; }
.version-badge { padding: 4px 7px; border-radius: 4px; color: #5f6871; background: #eef0f2; font: 700 10px/1.2 "Cascadia Code", Consolas, monospace; }

.docs-layout { max-width: 1500px; min-height: calc(100vh - 64px); margin: 0 auto; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.docs-sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); padding: 26px 20px; align-self: start; border-right: 1px solid var(--border); background: #fff; overflow-y: auto; }
.search-box { display: grid; gap: 7px; color: #6f7881; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.search-box input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #cfd5d9; border-radius: 5px; outline: none; color: #252b31; background: #fafbfb; font-size: 12px; text-transform: none; }
.search-box input:focus { border-color: #4a9178; box-shadow: 0 0 0 3px rgba(23, 107, 81, .1); }
.docs-nav { margin-top: 22px; display: grid; gap: 3px; }
.docs-nav a { min-height: 34px; padding: 0 9px; display: flex; align-items: center; justify-content: space-between; border-left: 2px solid transparent; color: #626b74; font-size: 12px; font-weight: 700; text-decoration: none; }
.docs-nav a:hover, .docs-nav a[data-active="true"] { color: var(--green); border-left-color: var(--green); background: #f3f8f6; }
.docs-nav span { color: #8b9299; font-size: 10px; }
.sidebar-meta { margin-top: 28px; padding-top: 16px; display: grid; gap: 7px; border-top: 1px solid #eceef0; }
.sidebar-meta span { color: #7b848d; font-size: 10px; font-weight: 800; }
.sidebar-meta code { overflow-wrap: anywhere; color: var(--green); font-size: 11px; }

.docs-main { min-width: 0; padding: 48px clamp(28px, 5vw, 72px) 60px; background: #fff; }
.document-section { max-width: 1050px; padding: 42px 0; border-bottom: 1px solid #e8ebed; }
.intro-section { padding-top: 8px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: 0; }
h1 { max-width: 780px; margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: 0; }
h2 { margin: 0; font-size: 25px; line-height: 1.25; letter-spacing: 0; }
h3 { margin: 28px 0 10px; font-size: 16px; letter-spacing: 0; }
p { color: #5e6872; font-size: 14px; line-height: 1.75; }
.lead { max-width: 760px; margin: 16px 0 26px; font-size: 16px; line-height: 1.75; }
.section-heading { margin-bottom: 18px; }

.base-url { min-height: 52px; max-width: 760px; padding: 8px 8px 8px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid #bcd4ca; border-radius: 6px; background: #f4f9f7; }
.base-url > span { color: #66716c; font-size: 9px; font-weight: 850; }
.base-url code { min-width: 0; overflow: hidden; color: var(--green); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { min-height: 29px; padding: 0 10px; border: 1px solid #ccd2d6; border-radius: 4px; color: #4f5861; background: #fff; font-size: 11px; font-weight: 750; cursor: pointer; }
.copy-button:hover { border-color: #89949c; color: #22282e; }

.service-facts { max-width: 760px; margin: 20px 0 0; padding: 1px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.service-facts div { min-width: 0; padding: 13px 10px; background: #fff; }
.service-facts dt { color: #7a838c; font-size: 9px; font-weight: 800; }
.service-facts dd { margin: 5px 0 0; overflow: hidden; color: #30363c; font: 700 11px/1.4 "Cascadia Code", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.transport-note { max-width: 760px; margin: 10px 0 0; padding: 9px 11px; border-left: 3px solid var(--green); color: #626c75; background: #f6f9f8; font-size: 12px; }
.transport-note strong { color: #2c493f; }

.flow-steps { margin: 20px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); background: var(--border); }
.flow-steps div { min-width: 0; min-height: 108px; padding: 13px; display: grid; align-content: start; gap: 7px; background: #fff; }
.flow-steps span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 10px; font-weight: 800; }
.flow-steps strong { font-size: 12px; }
.flow-steps code { overflow-wrap: anywhere; color: #717a83; font-size: 10px; line-height: 1.45; }

.code-panel { margin: 18px 0; overflow: hidden; border: 1px solid #2e353d; border-radius: 6px; background: var(--code); }
.code-panel-header { min-height: 39px; padding: 0 10px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #30373e; color: #c7cdd3; font-size: 11px; font-weight: 700; }
.code-panel-header .copy-button { border-color: #4b535b; color: #d8dde1; background: #262c32; }
pre { margin: 0; padding: 16px; overflow: auto; color: #e6eaed; font: 12px/1.65 "Cascadia Code", Consolas, monospace; tab-size: 2; }
pre code { font: inherit; }
.compact-code { min-width: 0; margin: 0; }
.response-strip { min-width: 0; min-height: 44px; padding: 9px 12px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 5px; background: #fafbfb; }
.response-strip span { flex: 0 0 auto; color: #7b848d; font-size: 10px; font-weight: 800; }
.response-strip code { min-width: 0; overflow-wrap: anywhere; color: #30363c; font-size: 11px; }
.two-column-code { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.sequence-list { margin: 20px 0 24px; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.sequence-list li { min-height: 54px; padding: 10px 4px; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; border-bottom: 1px solid var(--border); }
.sequence-list strong { font-size: 13px; }
.sequence-list span { color: #66707a; font-size: 13px; line-height: 1.6; }

.endpoint-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.filter-result { color: #78818a; font-size: 11px; font-weight: 750; }
.endpoint-group { margin-top: 28px; }
.endpoint-group-title { margin: 0 0 9px; color: #4a535c; font-size: 13px; }
.endpoint-list { display: grid; gap: 8px; }
.endpoint { border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.endpoint[open] { border-color: #bdc8c4; box-shadow: 0 8px 24px rgba(31, 39, 44, .06); }
.endpoint summary { min-height: 54px; padding: 9px 13px; display: grid; grid-template-columns: 58px minmax(210px, .9fr) minmax(190px, 1.1fr) auto; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.endpoint summary::-webkit-details-marker { display: none; }
.method { width: 56px; padding: 5px 0; border-radius: 4px; text-align: center; font: 800 10px/1 "Cascadia Code", Consolas, monospace; }
.method-get { color: #176b51; background: #e8f4ef; }
.method-post { color: #8b651f; background: #fff4df; }
.method-put, .method-patch { color: #34647e; background: #eaf3f7; }
.method-delete { color: #a03b47; background: #fbecee; }
.endpoint-path { min-width: 0; overflow: hidden; color: #272d33; font: 700 11px/1.4 "Cascadia Code", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-title { min-width: 0; color: #606a73; font-size: 12px; }
.auth-tag { padding: 4px 6px; border-radius: 4px; color: #6a727a; background: #f0f2f3; font-size: 9px; font-weight: 800; white-space: nowrap; }
.auth-tag[data-auth="session"] { color: var(--green); background: var(--green-soft); }
.endpoint-body { padding: 4px 14px 16px 84px; border-top: 1px solid #eceeef; }
.endpoint-body > p { margin: 13px 0; font-size: 13px; }
.endpoint-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.endpoint-meta span { padding: 4px 7px; border: 1px solid #e0e4e6; border-radius: 4px; color: #69727b; background: #fafbfb; font-size: 9px; font-weight: 750; }
.endpoint-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.endpoint-examples .code-panel { min-width: 0; margin: 12px 0 0; }
.endpoint-examples pre { max-height: 330px; font-size: 10px; }
.empty-endpoints { padding: 34px; border: 1px dashed #cfd5d9; text-align: center; }

.state-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 11px 13px; border-bottom: 1px solid #e8ebed; text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: #68727b; background: #f7f8f8; font-size: 10px; }
td { color: #555f68; line-height: 1.55; }
td:first-child { color: #2f353b; font-weight: 700; white-space: nowrap; }
code { font-family: "Cascadia Code", Consolas, monospace; }
td code, p code, li code { padding: 2px 4px; border-radius: 3px; color: #265e4c; background: #edf5f2; font-size: .9em; }
.notes-list { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.notes-list li { position: relative; padding: 12px 12px 12px 23px; border-bottom: 1px solid var(--border); color: #59636d; font-size: 13px; line-height: 1.65; }
.notes-list li::before { content: ""; position: absolute; top: 20px; left: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.docs-footer { max-width: 1050px; padding: 24px 0 0; display: flex; justify-content: space-between; gap: 20px; color: #818991; font-size: 11px; }
.docs-footer a { color: var(--green); text-decoration: none; }
.copy-toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; padding: 9px 12px; border-radius: 5px; color: #fff; background: #252b31; box-shadow: 0 12px 30px rgba(25, 31, 35, .2); font-size: 11px; font-weight: 750; }

@media (max-width: 900px) {
  .docs-layout { display: block; }
  .docs-sidebar { position: static; width: 100%; height: auto; padding: 13px 18px; border-right: 0; border-bottom: 1px solid var(--border); }
  .search-box, .sidebar-meta { display: none; }
  .docs-nav { margin: 0; display: flex; overflow-x: auto; }
  .docs-nav a { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; }
  .docs-nav a:hover, .docs-nav a[data-active="true"] { border-left-color: transparent; border-bottom-color: var(--green); }
  .docs-main { padding-top: 34px; }
  html { scroll-padding-top: 124px; }
}

@media (max-width: 660px) {
  .docs-header { height: auto; min-height: 58px; padding: 10px 14px; }
  .version-badge, .header-actions > a:first-of-type { display: none; }
  .docs-main { padding: 28px 15px 44px; }
  .document-section { padding: 34px 0; }
  h1 { font-size: 34px; }
  h2 { font-size: 21px; }
  .lead { font-size: 14px; }
  .base-url { grid-template-columns: minmax(0, 1fr) auto; }
  .base-url > span { grid-column: 1 / -1; }
  .service-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column-code, .endpoint-examples { grid-template-columns: 1fr; }
  .sequence-list li { grid-template-columns: 1fr; gap: 4px; }
  .endpoint summary { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 8px; }
  .endpoint-title { grid-column: 2 / -1; }
  .endpoint-body { padding-left: 14px; }
  .docs-footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
