:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #13202b;
  --muted: #647386;
  --line: #d9e1ea;
  --accent: #0f7c72;
  --accent-dark: #0b625b;
  --accent-soft: #e7f5f2;
  --blue: #2563eb;
  --purple: #7c3aed;
  --warning: #a85f00;
  --warning-bg: #fff8e8;
  --success-bg: #edf9f4;
  --code: #101820;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.docs-topbar { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 820; box-shadow: 0 8px 18px rgba(15,124,114,.2); }
.brand > span:last-child { display: grid; line-height: 1.15; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.top-links { display: flex; align-items: center; gap: 6px; }
.top-links a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 7px; color: var(--muted); font-size: 13px; font-weight: 680; }
.top-links a:hover { background: var(--surface-soft); color: var(--accent); }
.top-links .download-link { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.top-links .download-link:hover { background: var(--accent-dark); color: #fff; }
.docs-layout { max-width: 1480px; min-height: calc(100vh - 68px); margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.docs-sidebar { position: sticky; top: 68px; height: calc(100vh - 68px); padding: 28px 22px; border-right: 1px solid var(--line); overflow-y: auto; background: #f8fafb; }
.sidebar-label { margin-bottom: 12px; color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; }
.docs-sidebar nav { display: grid; gap: 3px; }
.docs-sidebar nav a { padding: 8px 10px; border-radius: 6px; color: #536375; font-size: 13px; font-weight: 620; }
.docs-sidebar nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.sidebar-help { margin-top: 24px; padding: 13px; border: 1px solid #c9e5df; border-radius: 8px; background: var(--accent-soft); }
.sidebar-help strong { color: var(--accent-dark); font-size: 12px; }
.sidebar-help p { margin: 5px 0 0; color: #4b6e69; font-size: 12px; line-height: 1.5; }
.docs-main { min-width: 0; padding: 34px clamp(24px, 4vw, 62px) 50px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 28px; align-items: stretch; padding: 42px; border: 1px solid #1d3440; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 85% 10%, rgba(31,181,165,.18), transparent 32%), linear-gradient(135deg, #101d26 0%, #162d36 100%); color: #fff; box-shadow: 0 18px 44px rgba(16,29,38,.14); }
.eyebrow { color: #73d8cc; font-size: 11px; font-weight: 780; letter-spacing: .12em; }
.hero h1 { margin: 10px 0 12px; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.035em; }
.hero p { max-width: 760px; margin: 0; color: #c7d4da; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.primary-link, .secondary-link { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border-radius: 7px; font-size: 13px; font-weight: 730; }
.primary-link { background: var(--accent); color: #fff; }
.primary-link:hover { background: #129287; }
.secondary-link { border: 1px solid rgba(255,255,255,.28); color: #eff7f8; }
.secondary-link:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.07); }
.base-url-card { align-self: center; min-width: 0; display: grid; gap: 11px; padding: 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: rgba(255,255,255,.06); }
.base-url-card > span { color: #8ca3ad; font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.base-url-card > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.base-url-card code { flex: 1; min-width: 0; color: #86ebdf; font-size: 13px; overflow-wrap: anywhere; }
.base-url-card button, .code-head button { height: 30px; flex: 0 0 auto; padding: 0 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: rgba(255,255,255,.08); color: #dce9ec; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.base-url-card button:hover { background: rgba(255,255,255,.15); }
.base-url-card small { color: #8ca3ad; font-size: 11px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 18px 0 34px; }
.facts article { display: grid; gap: 3px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.facts span, .facts small { color: var(--muted); font-size: 11px; }
.facts strong { font-size: 14px; }
.docs-section { padding: 34px 0; border-top: 1px solid var(--line); }
.docs-section:first-of-type { border-top: 0; }
.section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 19px; }
.section-heading > span { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.section-heading h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.section-heading p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.docs-section > p { color: #4f5f6f; font-size: 14px; }
code { padding: 2px 5px; border-radius: 4px; background: #edf2f6; color: #0d6f68; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.code-card, .response-card { margin-top: 14px; border: 1px solid #243541; border-radius: 9px; overflow: hidden; background: var(--code); }
.code-head { height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; border-bottom: 1px solid #263a48; background: #17242e; color: #aab9c3; font-size: 11px; font-weight: 720; }
.code-head button { border-color: #3a4d59; color: #b9c8d0; }
.code-head button:hover { color: #fff; border-color: #5b7280; }
pre { margin: 0; }
pre code { display: block; padding: 17px; border-radius: 0; background: transparent; color: #d6e3e9; font-size: 12px; line-height: 1.65; overflow-x: auto; white-space: pre; }
.response-card { position: relative; border-color: #cbd8df; background: #f8fbfc; }
.response-card > span { display: block; padding: 8px 13px; border-bottom: 1px solid #dce6eb; background: #edf7f4; color: var(--accent-dark); font-size: 11px; font-weight: 780; }
.response-card pre code { color: #263d49; }
.notice { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0; padding: 13px 15px; border: 1px solid #cbdfe1; border-radius: 8px; background: #f0f7f8; color: #45616a; font-size: 13px; }
.notice strong { flex: 0 0 auto; color: #315a61; }
.notice.warning { border-color: #edd5a5; background: var(--warning-bg); color: #795317; }
.notice.warning strong { color: var(--warning); }
.notice.success { border-color: #bfe2d4; background: var(--success-bg); color: #356a59; }
.notice.success strong { color: #17684f; }
.steps { display: grid; gap: 9px; margin: 0 0 18px; padding: 0; list-style: none; }
.steps li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.steps li > span { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; }
.steps strong { font-size: 13px; }
.steps p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.param-table-wrap { margin-top: 14px; border: 1px solid var(--line); border-radius: 9px; overflow-x: auto; }
.param-table { width: 100%; min-width: 620px; border-collapse: collapse; background: var(--surface); }
.param-table th, .param-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; }
.param-table tr:last-child td { border-bottom: 0; }
.param-table th { background: var(--surface-soft); color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.tabs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tabs-grid .code-card { min-width: 0; }
.method { min-width: 43px; display: inline-flex; align-items: center; justify-content: center; padding: 3px 6px; border-radius: 5px; color: #fff; font-size: 9px; font-weight: 820; letter-spacing: .04em; }
.method.get { background: var(--blue); }
.method.post { background: var(--accent); }
.method.ws { background: var(--purple); }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; margin: 18px 0; }
.flow > div { min-width: 0; display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.flow > div > span { color: var(--accent); font-size: 10px; font-weight: 800; }
.flow strong { font-size: 12px; }
.flow small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.flow i { color: #9aabb8; font-style: normal; }
.language-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.language-grid article { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.language-grid article code { grid-row: 1 / 3; align-self: start; padding: 4px 7px; }
.language-grid strong { font-size: 13px; }
.language-grid span { color: var(--muted); font-size: 11px; }
.language-grid .recommended { border-color: #9bd4cc; background: var(--accent-soft); }
.compact-code { max-width: 560px; }
.endpoint-list { display: grid; gap: 7px; }
.endpoint-list > div { display: grid; grid-template-columns: 52px minmax(210px, .8fr) minmax(190px, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.endpoint-list strong { font-size: 12px; }
.endpoint-list small { color: var(--muted); font-size: 11px; }
.docs-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 30px; padding: 28px; border: 1px solid #243541; border-radius: 12px; background: #13232c; color: #fff; }
.docs-cta > div:first-child > span { color: #76d7cc; font-size: 10px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.docs-cta h2 { margin: 5px 0; font-size: 22px; }
.docs-cta p { margin: 0; color: #aebfc6; font-size: 12px; }
.docs-cta > div:last-child { display: flex; gap: 8px; flex: 0 0 auto; }
.docs-footer { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.docs-footer a { margin-left: auto; color: var(--accent); font-weight: 700; }
.copy-toast { position: fixed; left: 50%; bottom: 26px; z-index: 50; transform: translate(-50%, 14px); padding: 9px 14px; border-radius: 7px; background: #102129; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: .18s ease; box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.copy-toast.visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 1050px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .hero { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .docs-topbar { height: auto; min-height: 64px; padding: 12px 16px; }
  .top-links a:not(.download-link) { display: none; }
  .docs-main { padding: 20px 14px 36px; }
  .hero { padding: 26px 20px; border-radius: 10px; }
  .hero h1 { font-size: 36px; }
  .base-url-card > div { align-items: stretch; flex-direction: column; }
  .facts, .tabs-grid, .language-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow i { display: none; }
  .endpoint-list > div { grid-template-columns: 48px 1fr; }
  .endpoint-list strong, .endpoint-list small { grid-column: 2; }
  .docs-cta { align-items: flex-start; flex-direction: column; }
  .docs-cta > div:last-child { width: 100%; flex-wrap: wrap; }
  .docs-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .docs-footer a { margin-left: 0; }
}
@media print {
  .docs-topbar, .docs-sidebar, .hero-actions, .copy-toast, button { display: none !important; }
  .docs-layout { display: block; }
  .docs-main { padding: 0; }
  .hero { color: #000; border-color: #aaa; background: #fff; box-shadow: none; }
  .hero p { color: #333; }
  .docs-section { break-inside: avoid; }
}
