
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-blue: #fef4f3;
  --line: #e6ebf1;
  --line-strong: #d5dce5;
  --text: #111827;
  --text-soft: #384457;
  --muted: #748094;
  --accent: #e32219;
  --accent-dark: #b3150e;
  --accent-soft: #fdeceb;
  --code: #111827;
  --code-text: #e8eef8;
  --success: #16865b;
  --warning: #a7630c;
  --shadow: 0 14px 40px rgba(27, 39, 54, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #f04a3a, #c4160e);
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 7px 18px rgba(227, 34, 25, .22);
}

.brand b { font-size: 17px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 13px; }

.header-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--line-strong);
}

.header-home {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.header-home:hover { color: var(--accent-dark); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.header-actions a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.header-actions .support-button {
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.workspace {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: clamp(42px, 6vw, 76px);
  align-items: start;
}

aside {
  position: sticky;
  top: 94px;
  height: calc(100vh - 118px);
  padding: 0 8px 24px 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d8dee6 transparent;
}

.language {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  gap: 6px;
  padding: 20px 4px 14px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.language select {
  width: 100%;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.language select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(227, 34, 25, .11);
}

nav { padding: 0 4px 16px; }

nav h4 {
  margin: 24px 10px 7px;
  color: #9aa3b1;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .075em;
  text-transform: uppercase;
}

nav a {
  position: relative;
  display: block;
  margin: 2px 0;
  padding: 8px 11px;
  border-radius: 9px;
  color: #526075;
  font-size: 13.5px;
  line-height: 1.45;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
}

nav a.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}

nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

main { min-width: 0; }

article {
  width: min(100%, 880px);
  min-height: calc(100vh - 170px);
  padding: 54px 0 90px;
}

footer {
  width: min(100%, 880px);
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: #9aa3b1;
  font-size: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 48px);
  border: 1px solid #f5d9d6;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(227, 34, 25, .13), transparent 32%),
    linear-gradient(135deg, #fffbfa, #fdf1ef);
}

.hero::after {
  content: "S";
  position: absolute;
  right: clamp(22px, 6vw, 58px);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(227, 34, 25, .09);
  font-size: clamp(100px, 18vw, 176px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.hero h1 { margin: 9px 0 12px; }

h2 {
  margin: 48px 0 14px;
  color: var(--text);
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.025em;
}

h3 {
  margin: 32px 0 10px;
  color: #1e293b;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.01em;
}

p {
  max-width: 780px;
  margin: 0 0 16px;
  color: var(--text-soft);
}

article > h1:first-child {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

b, strong { color: #202938; }

ul, ol {
  max-width: 790px;
  margin: 12px 0 20px;
  padding-left: 24px;
  color: var(--text-soft);
}

li { margin: 7px 0; }
li::marker { color: var(--accent); }

article a:not(.cta) {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-color: rgba(8, 119, 185, .28);
  text-underline-offset: 3px;
}

article a:not(.cta):hover { text-decoration-color: currentColor; }

.lead {
  max-width: 730px;
  color: #526075;
  font-size: 17px;
  line-height: 1.75;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.card {
  min-height: 132px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #cfd8e3;
  box-shadow: 0 12px 30px rgba(31, 45, 61, .06);
}

.card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.notice {
  margin: 20px 0;
  padding: 15px 17px;
  border: 1px solid #f5d6d2;
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  background: #fff7f6;
  color: #4b3836;
}

.endpoint {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.endpoint-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.method {
  min-width: 43px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #e5f6ef;
  color: var(--success);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.5;
  text-align: center;
}

.method.post {
  background: #fff2df;
  color: var(--warning);
}

.endpoint code {
  color: #263449;
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.endpoint p {
  max-width: none;
  margin: 0;
  padding: 13px 15px;
  color: #647186;
  font-size: 13.5px;
}

pre {
  position: relative;
  max-width: 100%;
  margin: 17px 0;
  overflow: auto;
  padding: 18px 19px;
  border: 1px solid #202b3b;
  border-radius: 13px;
  background: var(--code);
  color: var(--code-text);
  box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
  font: 12.5px/1.65 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.inline-code {
  padding: 2px 6px;
  border: 1px solid #dce4ed;
  border-radius: 6px;
  background: var(--surface-soft);
  color: #243247;
  font-size: .92em;
  white-space: normal;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  margin: 18px 0;
  display: block;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  border-spacing: 0;
  border-collapse: separate;
  background: var(--surface);
}

thead, tbody { white-space: nowrap; }
th, td {
  padding: 10px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }

th {
  background: var(--surface-soft);
  color: #4c596c;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

td { color: #5b687b; }

.cta {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 10px 15px;
  border: 1px solid #c4160e;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(227, 34, 25, .18);
  transition: background .15s ease, transform .15s ease;
}

.cta:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
}

.sidebar-backdrop { display: none; }

@media (max-width: 920px) {
  .site-header { height: 64px; }

  .header-inner {
    width: calc(100% - 28px);
    gap: 10px;
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

  .brand small, .header-divider, .header-home, .header-actions a:first-child { display: none; }

  .header-actions .support-button {
    display: inline-flex;
    padding: 7px 10px;
  }

  .workspace {
    width: min(100% - 36px, 880px);
    display: block;
  }

  aside {
    position: fixed;
    z-index: 30;
    inset: 64px auto 0 0;
    width: min(84vw, 310px);
    height: calc(100vh - 64px);
    padding: 0 14px 28px;
    transform: translateX(-104%);
    border-right: 1px solid var(--line);
    background: #fff;
    box-shadow: none;
    transition: transform .2s ease;
  }

  aside.open {
    transform: none;
    box-shadow: 24px 0 60px rgba(26, 38, 52, .15);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 25;
    inset: 64px 0 0;
    border: 0;
    background: rgba(21, 30, 42, .22);
    backdrop-filter: blur(2px);
  }

  aside.open + main { min-width: 0; }
  body:has(aside.open) .sidebar-backdrop { display: block; }

  article {
    width: 100%;
    padding: 38px 0 70px;
  }

  footer { width: 100%; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }

  .header-actions { display: none; }

  .workspace { width: calc(100% - 30px); }

  main, article { min-width: 0; max-width: 100%; }
  article { overflow: hidden; padding-top: 26px; }

  .hero {
    padding: 27px 22px;
    border-radius: 19px;
  }

  .hero::after {
    right: 16px;
    font-size: 100px;
  }

  h1 { font-size: 34px; }
  h2 { margin-top: 38px; font-size: 22px; }

  .lead { font-size: 15.5px; }

  .cards { grid-template-columns: 1fr; }
  .card { min-height: auto; }

  .endpoint-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  th, td { padding: 9px 11px; }

  pre {
    margin-right: -4px;
    padding: 15px;
    border-radius: 11px;
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 2026-10-27: link cards and prose tables for the proxy / API sections */
a.card { display: block; color: inherit; text-decoration: none; }
tbody { white-space: normal; }
td { min-width: 110px; vertical-align: top; line-height: 1.55; }
td a { white-space: nowrap; }
.cards + h2, table + h2 { margin-top: 34px; }

/* API tree in sidebar */
nav .nav-parent { margin: 10px 10px 2px; color: #3f4b5c; font-size: 13px; font-weight: 700; }
nav a.sub { margin-left: 12px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
table.params td:first-child code { white-space: nowrap; font-size: 12.5px; }
table.params td:nth-child(3) { min-width: 50px; text-align: center; }

/* 2026-10-27: brand red + stronger section contrast */
article h2 {
  position: relative;
  margin-top: 44px;
  padding: 16px 0 0 14px;
  border-top: 1px solid var(--line);
}
article h2::before {
  content: "";
  position: absolute;
  left: 0; top: 19px; bottom: 3px;
  width: 4px;
  border-radius: 3px;
  background: var(--accent);
}
.hero + h2, .hero + .cards + h2 { border-top: 0; }
article h3 { margin-top: 28px; color: var(--accent-dark); }
nav h4 { color: var(--accent-dark); opacity: .85; }
nav .nav-parent { color: #2a1715; }
.endpoint { border-color: var(--line-strong); }
.endpoint-head { background: #fff6f5; }
.method { background: #1f2937 !important; color: #fff !important; }
.method.post { background: var(--accent) !important; }
.card strong { color: #1d1413; }
a.card:hover { border-color: #f0b7b1; }
table th { background: #fff1ef; color: #8f1c14; }
.notice { background: #fff6f4; }

/* collapsible sidebar groups */
#nav details { margin: 0; }
#nav summary { list-style: none; cursor: pointer; position: relative; user-select: none; border-radius: 9px; }
#nav summary::-webkit-details-marker { display: none; }
#nav summary::after { content: "›"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%) rotate(0deg); transition: transform .15s ease; color: var(--accent); font-size: 16px; font-weight: 700; }
#nav details[open] > summary::after { transform: translateY(-50%) rotate(90deg); }
#nav summary:hover { background: var(--surface-soft); }
#nav .nav-group > summary { margin: 14px 0 4px; padding: 9px 30px 9px 10px; color: var(--accent-dark); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
#nav .nav-sub > summary { margin: 2px 0; padding: 8px 30px 8px 11px; color: #2a1715; font-size: 13.5px; font-weight: 700; }
#nav .nav-sub a.sub { margin-left: 14px; }
